Larry Finger | 2865d42 | 2010-08-20 10:15:30 -0500 | [diff] [blame] | 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 |
Raphaƫl Beamonte | bef611a | 2016-09-09 11:31:45 -0400 | [diff] [blame] | 71 | * 1: with OID debug message |
| 72 | */ |
Tapasweni Pathak | a988265 | 2014-09-21 07:03:31 +0530 | [diff] [blame] | 73 | uint (*oidfuns)(struct oid_par_priv *poid_par_priv); |
Larry Finger | 2865d42 | 2010-08-20 10:15:30 -0500 | [diff] [blame] | 74 | }; |
| 75 | |
| 76 | uint oid_null_function(struct oid_par_priv *poid_par_priv); |
| 77 | |
| 78 | extern struct iw_handler_def r871x_handlers_def; |
| 79 | |
Joe Perches | a5ee469 | 2015-08-10 14:51:31 -0700 | [diff] [blame] | 80 | uint drv_query_info(struct net_device *MiniportAdapterContext, |
| 81 | uint Oid, |
| 82 | void *InformationBuffer, |
| 83 | u32 InformationBufferLength, |
| 84 | u32 *BytesWritten, |
| 85 | u32 *BytesNeeded); |
Larry Finger | 2865d42 | 2010-08-20 10:15:30 -0500 | [diff] [blame] | 86 | |
Joe Perches | a5ee469 | 2015-08-10 14:51:31 -0700 | [diff] [blame] | 87 | uint drv_set_info(struct net_device *MiniportAdapterContext, |
| 88 | uint Oid, |
| 89 | void *InformationBuffer, |
| 90 | u32 InformationBufferLength, |
| 91 | u32 *BytesRead, |
| 92 | u32 *BytesNeeded); |
Larry Finger | 2865d42 | 2010-08-20 10:15:30 -0500 | [diff] [blame] | 93 | |
| 94 | #endif |