blob: 08bcb3b41bbd4888d195828b5ff8a8a3d5c3187b [file] [log] [blame]
Larry Finger2865d422010-08-20 10:15:30 -05001#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
44enum oid_type {
45 QUERY_OID,
46 SET_OID
47};
48
49struct 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
58struct 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
69struct oid_obj_priv {
70 unsigned char dbg; /* 0: without OID debug message
Raphaƫl Beamontebef611a2016-09-09 11:31:45 -040071 * 1: with OID debug message
72 */
Tapasweni Pathaka9882652014-09-21 07:03:31 +053073 uint (*oidfuns)(struct oid_par_priv *poid_par_priv);
Larry Finger2865d422010-08-20 10:15:30 -050074};
75
76uint oid_null_function(struct oid_par_priv *poid_par_priv);
77
78extern struct iw_handler_def r871x_handlers_def;
79
Joe Perchesa5ee4692015-08-10 14:51:31 -070080uint drv_query_info(struct net_device *MiniportAdapterContext,
81 uint Oid,
82 void *InformationBuffer,
83 u32 InformationBufferLength,
84 u32 *BytesWritten,
85 u32 *BytesNeeded);
Larry Finger2865d422010-08-20 10:15:30 -050086
Joe Perchesa5ee4692015-08-10 14:51:31 -070087uint drv_set_info(struct net_device *MiniportAdapterContext,
88 uint Oid,
89 void *InformationBuffer,
90 u32 InformationBufferLength,
91 u32 *BytesRead,
92 u32 *BytesNeeded);
Larry Finger2865d422010-08-20 10:15:30 -050093
94#endif