• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef __IOCTL_H
2 #define __IOCTL_H
3 
4 #include "osdep_service.h"
5 #include "drv_types.h"
6 
7 #ifndef OID_802_11_CAPABILITY
8 	#define OID_802_11_CAPABILITY                   0x0d010122
9 #endif
10 
11 #ifndef OID_802_11_PMKID
12 	#define OID_802_11_PMKID                        0x0d010123
13 #endif
14 
15 
16 /* For DDK-defined OIDs*/
17 #define OID_NDIS_SEG1	0x00010100
18 #define OID_NDIS_SEG2	0x00010200
19 #define OID_NDIS_SEG3	0x00020100
20 #define OID_NDIS_SEG4	0x01010100
21 #define OID_NDIS_SEG5	0x01020100
22 #define OID_NDIS_SEG6	0x01020200
23 #define OID_NDIS_SEG7	0xFD010100
24 #define OID_NDIS_SEG8	0x0D010100
25 #define OID_NDIS_SEG9	0x0D010200
26 #define OID_NDIS_SEG10	0x0D020200
27 #define SZ_OID_NDIS_SEG1	23
28 #define SZ_OID_NDIS_SEG2	3
29 #define SZ_OID_NDIS_SEG3	6
30 #define SZ_OID_NDIS_SEG4	6
31 #define SZ_OID_NDIS_SEG5	4
32 #define SZ_OID_NDIS_SEG6	8
33 #define SZ_OID_NDIS_SEG7	7
34 #define SZ_OID_NDIS_SEG8	36
35 #define SZ_OID_NDIS_SEG9	24
36 #define SZ_OID_NDIS_SEG10	19
37 
38 /* For Realtek-defined OIDs*/
39 #define OID_MP_SEG1	0xFF871100
40 #define OID_MP_SEG2	0xFF818000
41 #define OID_MP_SEG3	0xFF818700
42 #define OID_MP_SEG4	0xFF011100
43 
44 enum oid_type {
45 	QUERY_OID,
46 	SET_OID
47 };
48 
49 struct oid_funs_node {
50 	unsigned int oid_start; /*the starting number for OID*/
51 	unsigned int oid_end; /*the ending number for OID*/
52 	struct oid_obj_priv *node_array;
53 	unsigned int array_sz; /*the size of node_array*/
54 	int query_counter; /*count the number of query hits for this segment*/
55 	int set_counter; /*count the number of set hits for this segment*/
56 };
57 
58 struct oid_par_priv {
59 	void	*adapter_context;
60 	uint oid;
61 	void *information_buf;
62 	unsigned long information_buf_len;
63 	unsigned long *bytes_rw;
64 	unsigned long *bytes_needed;
65 	enum oid_type	type_of_oid;
66 	unsigned int dbg;
67 };
68 
69 struct oid_obj_priv {
70 	unsigned char	dbg; /* 0: without OID debug message
71 			      * 1: with OID debug message */
72 	uint(*oidfuns)(struct oid_par_priv *poid_par_priv);
73 };
74 
75 uint oid_null_function(struct oid_par_priv *poid_par_priv);
76 
77 extern struct iw_handler_def  r871x_handlers_def;
78 
79 extern	uint drv_query_info(
80 	struct  net_device *MiniportAdapterContext,
81 	uint Oid,
82 	void *InformationBuffer,
83 	u32 InformationBufferLength,
84 	u32 *BytesWritten,
85 	u32 *BytesNeeded
86 );
87 
88 extern	uint drv_set_info(
89 	struct  net_device *MiniportAdapterContext,
90 	uint Oid,
91 	void *InformationBuffer,
92 	u32 InformationBufferLength,
93 	u32 *BytesRead,
94 	u32 *BytesNeeded
95 );
96 
97 #endif
98