2 ** $Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/os/linux/include/gl_wext_priv.h#3 $
5 /*! \file gl_wext_priv.h
6 \brief This file includes private ioctl support.
12 ** $Log: gl_wext_priv.h $
15 * [WCXRP00001170] [MT6620 Wi-Fi][Driver] Adding the related code for set/get band ioctl
16 * Adding the template code for set / get band IOCTL (with ICS supplicant_6)..
19 * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function
20 * Adding the related ioctl / wlan oid function to set the Tx power cfg.
23 * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function
24 * Adding the proto type function for set_int set_tx_power and get int get_ch_list.
26 * 11 08 2011 yuche.tsai
27 * [WCXRP00001094] [Volunteer Patch][Driver] Driver version & supplicant version query & set support for service discovery version check.
28 * Add a CMD ID for P2P driver version query.
30 * 03 17 2011 chinglan.wang
31 * [WCXRP00000570] [MT6620 Wi-Fi][Driver] Add Wi-Fi Protected Setup v2.0 feature
35 * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code
36 * Add security check code.
39 * [WCXRP00000402] [MT6620 Wi-Fi][Driver] Enable MCR read/write by iwpriv by default
42 * 01 20 2011 eddie.chen
43 * [WCXRP00000374] [MT6620 Wi-Fi][DRV] SW debug control
44 * Add Oid for sw control debug command
47 * [WCXRP00000336] [MT6620 Wi-Fi][Driver] Add test mode commands in normal phone operation
48 * Add a new compiling option to control if MCR read/write is permitted
51 * [WCXRP00000336] [MT6620 Wi-Fi][Driver] Add test mode commands in normal phone operation
52 * Add some iwpriv commands to support test mode operation
55 * [WCXRP00000171] [MT6620 Wi-Fi][Driver] Add message check code same behavior as mt5921
56 * add the message check code from mt5921.
59 * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000086] [MT6620 Wi-Fi][Driver] The mac address is all zero at android
60 * complete implementation of Android NVRAM access
63 * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check
64 * add skeleton for NVRAM integration
68 * revert changelist #15371, efuse read/write access will be done by RF test approach
72 * add OID definitions for EFUSE read/write access.
76 * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
78 * 06 06 2010 kevin.huang
79 * [WPD00003832][MT6620 5931] Create driver base
80 * [MT6620 5931] Create driver base
83 * [WPD00003816][MT6620 Wi-Fi] Adding the security support
84 * modify the wapi related code for new driver's design.
86 * 03 24 2010 jeffrey.chang
87 * [WPD00003826]Initial import for Linux port
88 * initial import for Linux port
89 ** \main\maintrunk.MT5921\16 2009-09-29 16:47:23 GMT mtk01090
90 ** Remove unused functions
91 ** \main\maintrunk.MT5921\15 2009-09-28 20:19:31 GMT mtk01090
92 ** Add private ioctl to carry OID structures. Restructure public/private ioctl interfaces to Linux kernel.
93 ** \main\maintrunk.MT5921\14 2009-05-07 22:26:06 GMT mtk01089
94 ** add private IO control for Linux BWCS
95 ** \main\maintrunk.MT5921\13 2008-08-29 14:55:20 GMT mtk01088
96 ** adjust the code to meet coding style
97 ** \main\maintrunk.MT5921\12 2008-07-16 15:23:45 GMT mtk01104
99 ** \main\maintrunk.MT5921\11 2008-07-14 13:55:58 GMT mtk01104
100 ** Support PRIV_CMD_BT_COEXIST
101 ** \main\maintrunk.MT5921\10 2008-07-09 00:20:24 GMT mtk01461
102 ** Add priv oid to support WMM_PS_TEST
103 ** \main\maintrunk.MT5921\9 2008-05-30 20:27:24 GMT mtk01461
104 ** Add POWER_MODE Private IOCTL cmd
105 ** \main\maintrunk.MT5921\8 2008-04-17 23:06:44 GMT mtk01461
106 ** Add iwpriv support for AdHocMode setting
107 ** \main\maintrunk.MT5921\7 2008-03-31 21:01:24 GMT mtk01461
108 ** Add priv IOCTL for VOIP settings
109 ** \main\maintrunk.MT5921\6 2008-03-31 13:49:47 GMT mtk01461
110 ** add priv ioctl arg definition for turning on / off roaming
111 ** \main\maintrunk.MT5921\5 2008-03-26 15:35:09 GMT mtk01461
112 ** Add CSUM offload priv ioctl for Linux
113 ** \main\maintrunk.MT5921\4 2008-03-11 14:51:11 GMT mtk01461
114 ** Refine private IOCTL functions
115 ** \main\maintrunk.MT5921\3 2007-11-06 19:36:25 GMT mtk01088
116 ** add the WPS related code
119 #ifndef _GL_WEXT_PRIV_H
120 #define _GL_WEXT_PRIV_H
121 /*******************************************************************************
122 * C O M P I L E R F L A G S
123 ********************************************************************************
125 /* If it is set to 1, iwpriv will support register read/write */
126 #define CFG_SUPPORT_PRIV_MCR_RW 1
128 /*******************************************************************************
129 * E X T E R N A L R E F E R E N C E S
130 ********************************************************************************
133 /*******************************************************************************
135 ********************************************************************************
137 /* New wireless extensions API - SET/GET convention (even ioctl numbers are
140 #define IOCTL_SET_INT (SIOCIWFIRSTPRIV + 0)
141 #define IOCTL_GET_INT (SIOCIWFIRSTPRIV + 1)
143 #define IOCTL_SET_ADDRESS (SIOCIWFIRSTPRIV + 2)
144 #define IOCTL_GET_ADDRESS (SIOCIWFIRSTPRIV + 3)
145 #define IOCTL_SET_STR (SIOCIWFIRSTPRIV + 4)
146 #define IOCTL_GET_STR (SIOCIWFIRSTPRIV + 5)
147 #define IOCTL_SET_KEY (SIOCIWFIRSTPRIV + 6)
148 #define IOCTL_GET_KEY (SIOCIWFIRSTPRIV + 7)
149 #define IOCTL_SET_STRUCT (SIOCIWFIRSTPRIV + 8)
150 #define IOCTL_GET_STRUCT (SIOCIWFIRSTPRIV + 9)
151 #define IOCTL_SET_STRUCT_FOR_EM (SIOCIWFIRSTPRIV + 11)
152 #define IOCTL_SET_INTS (SIOCIWFIRSTPRIV + 12)
153 #define IOCTL_GET_INTS (SIOCIWFIRSTPRIV + 13)
155 #define PRIV_CMD_REG_DOMAIN 0
156 #define PRIV_CMD_BEACON_PERIOD 1
157 #define PRIV_CMD_ADHOC_MODE 2
159 #if CFG_TCP_IP_CHKSUM_OFFLOAD
160 #define PRIV_CMD_CSUM_OFFLOAD 3
161 #endif /* CFG_TCP_IP_CHKSUM_OFFLOAD */
163 #define PRIV_CMD_ROAMING 4
164 #define PRIV_CMD_VOIP_DELAY 5
165 #define PRIV_CMD_POWER_MODE 6
167 #define PRIV_CMD_WMM_PS 7
168 #define PRIV_CMD_BT_COEXIST 8
169 #define PRIV_GPIO2_MODE 9
171 #define PRIV_CUSTOM_SET_PTA 10
172 #define PRIV_CUSTOM_CONTINUOUS_POLL 11
173 #define PRIV_CUSTOM_SINGLE_ANTENNA 12
174 #define PRIV_CUSTOM_BWCS_CMD 13
175 #define PRIV_CUSTOM_DISABLE_BEACON_DETECTION 14//later
176 #define PRIV_CMD_OID 15
177 #define PRIV_SEC_MSG_OID 16
179 #define PRIV_CMD_TEST_MODE 17
180 #define PRIV_CMD_TEST_CMD 18
181 #define PRIV_CMD_ACCESS_MCR 19
182 #define PRIV_CMD_SW_CTRL 20
184 #if 1 /* ANTI_PRIVCY */
185 #define PRIV_SEC_CHECK_OID 21
188 #define PRIV_CMD_WSC_PROBE_REQ 22
190 #define PRIV_CMD_P2P_VERSION 23
192 #define PRIV_CMD_GET_CH_LIST 24
194 #define PRIV_CMD_SET_TX_POWER 25
196 #define PRIV_CMD_BAND_CONFIG 26
198 #define PRIV_CMD_DUMP_MEM 27
200 #define PRIV_CMD_P2P_MODE 28
202 /* 802.3 Objects (Ethernet) */
203 #define OID_802_3_CURRENT_ADDRESS 0x01010102
205 /* IEEE 802.11 OIDs */
206 #define OID_802_11_SUPPORTED_RATES 0x0D01020E
207 #define OID_802_11_CONFIGURATION 0x0D010211
209 /* PnP and PM OIDs, NDIS default OIDS */
210 #define OID_PNP_SET_POWER 0xFD010101
212 #define OID_CUSTOM_OID_INTERFACE_VERSION 0xFFA0C000
214 /* MT5921 specific OIDs */
215 #define OID_CUSTOM_BT_COEXIST_CTRL 0xFFA0C580
216 #define OID_CUSTOM_POWER_MANAGEMENT_PROFILE 0xFFA0C581
217 #define OID_CUSTOM_PATTERN_CONFIG 0xFFA0C582
218 #define OID_CUSTOM_BG_SSID_SEARCH_CONFIG 0xFFA0C583
219 #define OID_CUSTOM_VOIP_SETUP 0xFFA0C584
220 #define OID_CUSTOM_ADD_TS 0xFFA0C585
221 #define OID_CUSTOM_DEL_TS 0xFFA0C586
222 #define OID_CUSTOM_SLT 0xFFA0C587
223 #define OID_CUSTOM_ROAMING_EN 0xFFA0C588
224 #define OID_CUSTOM_WMM_PS_TEST 0xFFA0C589
225 #define OID_CUSTOM_COUNTRY_STRING 0xFFA0C58A
226 #define OID_CUSTOM_MULTI_DOMAIN_CAPABILITY 0xFFA0C58B
227 #define OID_CUSTOM_GPIO2_MODE 0xFFA0C58C
228 #define OID_CUSTOM_CONTINUOUS_POLL 0xFFA0C58D
229 #define OID_CUSTOM_DISABLE_BEACON_DETECTION 0xFFA0C58E
231 /* CR1460, WPS privacy bit check disable */
232 #define OID_CUSTOM_DISABLE_PRIVACY_CHECK 0xFFA0C600
235 #define OID_CUSTOM_MCR_RW 0xFFA0C801
236 #define OID_CUSTOM_EEPROM_RW 0xFFA0C803
237 #define OID_CUSTOM_SW_CTRL 0xFFA0C805
238 #define OID_CUSTOM_MEM_DUMP 0xFFA0C807
241 /* RF Test specific OIDs */
242 #define OID_CUSTOM_TEST_MODE 0xFFA0C901
243 #define OID_CUSTOM_TEST_RX_STATUS 0xFFA0C903
244 #define OID_CUSTOM_TEST_TX_STATUS 0xFFA0C905
245 #define OID_CUSTOM_ABORT_TEST_MODE 0xFFA0C906
246 #define OID_CUSTOM_MTK_WIFI_TEST 0xFFA0C911
249 #define OID_CUSTOM_BWCS_CMD 0xFFA0C931
250 #define OID_CUSTOM_SINGLE_ANTENNA 0xFFA0C932
251 #define OID_CUSTOM_SET_PTA 0xFFA0C933
254 #define OID_CUSTOM_MTK_NVRAM_RW 0xFFA0C941
255 #define OID_CUSTOM_CFG_SRC_TYPE 0xFFA0C942
256 #define OID_CUSTOM_EEPROM_TYPE 0xFFA0C943
260 #define OID_802_11_WAPI_MODE 0xFFA0CA00
261 #define OID_802_11_WAPI_ASSOC_INFO 0xFFA0CA01
262 #define OID_802_11_SET_WAPI_KEY 0xFFA0CA02
266 #define OID_802_11_WSC_ASSOC_INFO 0xFFA0CB00
270 /* Define magic key of test mode (Don't change it for future compatibity) */
271 #define PRIV_CMD_TEST_MAGIC_KEY 2011
273 /*******************************************************************************
275 ********************************************************************************
277 /* NIC BBCR configuration entry structure */
278 typedef struct _PRIV_CONFIG_ENTRY {
281 } PRIV_CONFIG_ENTRY, *PPRIV_CONFIG_ENTRY;
283 typedef WLAN_STATUS (*PFN_OID_HANDLER_FUNC_REQ) (
287 OUT PUINT_32 pu4OutInfoLen
290 typedef enum _ENUM_OID_METHOD_T {
292 ENUM_OID_GLUE_EXTENSION,
294 } ENUM_OID_METHOD_T, *P_ENUM_OID_METHOD_T;
296 /* OID set/query processing entry */
297 typedef struct _WLAN_REQ_ENTRY {
298 UINT_32 rOid; /* OID */
299 PUINT_8 pucOidName; /* OID name text */
300 BOOLEAN fgQryBufLenChecking;
301 BOOLEAN fgSetBufLenChecking;
302 ENUM_OID_METHOD_T eOidMethod;
303 UINT_32 u4InfoBufLen;
304 PFN_OID_HANDLER_FUNC_REQ pfOidQueryHandler; /* PFN_OID_HANDLER_FUNC*/
305 PFN_OID_HANDLER_FUNC_REQ pfOidSetHandler; /* PFN_OID_HANDLER_FUNC */
306 } WLAN_REQ_ENTRY, *P_WLAN_REQ_ENTRY;
308 typedef struct _NDIS_TRANSPORT_STRUCT {
310 UINT_32 inNdisOidlength;
311 UINT_32 outNdisOidLength;
312 UINT_8 ndisOidContent[16];
313 } NDIS_TRANSPORT_STRUCT, *P_NDIS_TRANSPORT_STRUCT;
315 /*******************************************************************************
316 * P U B L I C D A T A
317 ********************************************************************************
320 /*******************************************************************************
321 * P R I V A T E D A T A
322 ********************************************************************************
325 /*******************************************************************************
327 ********************************************************************************
330 /*******************************************************************************
331 * F U N C T I O N D E C L A R A T I O N S
332 ********************************************************************************
337 IN struct net_device *prNetDev,
338 IN struct iw_request_info *prIwReqInfo,
339 IN union iwreq_data *prIwReqData,
345 IN struct net_device *prNetDev,
346 IN struct iw_request_info *prIwReqInfo,
347 IN union iwreq_data *prIwReqData,
353 IN struct net_device *prNetDev,
354 IN struct iw_request_info *prIwReqInfo,
355 IN union iwreq_data *prIwReqData,
361 IN struct net_device *prNetDev,
362 IN struct iw_request_info *prIwReqInfo,
363 IN union iwreq_data *prIwReqData,
369 IN struct net_device *prNetDev,
370 IN struct iw_request_info *prIwReqInfo,
371 IN union iwreq_data *prIwReqData,
377 IN struct net_device *prNetDev,
378 IN struct iw_request_info *prIwReqInfo,
379 IN union iwreq_data *prIwReqData,
385 IN struct net_device *prDev,
386 IN OUT struct ifreq *prReq,
390 /*******************************************************************************
392 ********************************************************************************
395 #endif /* _GL_WEXT_PRIV_H */