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 #define PRIV_CMD_GET_BUILD_DATE_CODE 29
204 /* 802.3 Objects (Ethernet) */
205 #define OID_802_3_CURRENT_ADDRESS 0x01010102
207 /* IEEE 802.11 OIDs */
208 #define OID_802_11_SUPPORTED_RATES 0x0D01020E
209 #define OID_802_11_CONFIGURATION 0x0D010211
211 /* PnP and PM OIDs, NDIS default OIDS */
212 #define OID_PNP_SET_POWER 0xFD010101
214 #define OID_CUSTOM_OID_INTERFACE_VERSION 0xFFA0C000
216 /* MT5921 specific OIDs */
217 #define OID_CUSTOM_BT_COEXIST_CTRL 0xFFA0C580
218 #define OID_CUSTOM_POWER_MANAGEMENT_PROFILE 0xFFA0C581
219 #define OID_CUSTOM_PATTERN_CONFIG 0xFFA0C582
220 #define OID_CUSTOM_BG_SSID_SEARCH_CONFIG 0xFFA0C583
221 #define OID_CUSTOM_VOIP_SETUP 0xFFA0C584
222 #define OID_CUSTOM_ADD_TS 0xFFA0C585
223 #define OID_CUSTOM_DEL_TS 0xFFA0C586
224 #define OID_CUSTOM_SLT 0xFFA0C587
225 #define OID_CUSTOM_ROAMING_EN 0xFFA0C588
226 #define OID_CUSTOM_WMM_PS_TEST 0xFFA0C589
227 #define OID_CUSTOM_COUNTRY_STRING 0xFFA0C58A
228 #define OID_CUSTOM_MULTI_DOMAIN_CAPABILITY 0xFFA0C58B
229 #define OID_CUSTOM_GPIO2_MODE 0xFFA0C58C
230 #define OID_CUSTOM_CONTINUOUS_POLL 0xFFA0C58D
231 #define OID_CUSTOM_DISABLE_BEACON_DETECTION 0xFFA0C58E
233 /* CR1460, WPS privacy bit check disable */
234 #define OID_CUSTOM_DISABLE_PRIVACY_CHECK 0xFFA0C600
237 #define OID_CUSTOM_MCR_RW 0xFFA0C801
238 #define OID_CUSTOM_EEPROM_RW 0xFFA0C803
239 #define OID_CUSTOM_SW_CTRL 0xFFA0C805
240 #define OID_CUSTOM_MEM_DUMP 0xFFA0C807
243 /* RF Test specific OIDs */
244 #define OID_CUSTOM_TEST_MODE 0xFFA0C901
245 #define OID_CUSTOM_TEST_RX_STATUS 0xFFA0C903
246 #define OID_CUSTOM_TEST_TX_STATUS 0xFFA0C905
247 #define OID_CUSTOM_ABORT_TEST_MODE 0xFFA0C906
248 #define OID_CUSTOM_MTK_WIFI_TEST 0xFFA0C911
251 #define OID_CUSTOM_BWCS_CMD 0xFFA0C931
252 #define OID_CUSTOM_SINGLE_ANTENNA 0xFFA0C932
253 #define OID_CUSTOM_SET_PTA 0xFFA0C933
256 #define OID_CUSTOM_MTK_NVRAM_RW 0xFFA0C941
257 #define OID_CUSTOM_CFG_SRC_TYPE 0xFFA0C942
258 #define OID_CUSTOM_EEPROM_TYPE 0xFFA0C943
262 #define OID_802_11_WAPI_MODE 0xFFA0CA00
263 #define OID_802_11_WAPI_ASSOC_INFO 0xFFA0CA01
264 #define OID_802_11_SET_WAPI_KEY 0xFFA0CA02
268 #define OID_802_11_WSC_ASSOC_INFO 0xFFA0CB00
272 /* Define magic key of test mode (Don't change it for future compatibity) */
273 #define PRIV_CMD_TEST_MAGIC_KEY 2011
275 /*******************************************************************************
277 ********************************************************************************
279 /* NIC BBCR configuration entry structure */
280 typedef struct _PRIV_CONFIG_ENTRY {
283 } PRIV_CONFIG_ENTRY, *PPRIV_CONFIG_ENTRY;
285 typedef WLAN_STATUS (*PFN_OID_HANDLER_FUNC_REQ) (
289 OUT PUINT_32 pu4OutInfoLen
292 typedef enum _ENUM_OID_METHOD_T {
294 ENUM_OID_GLUE_EXTENSION,
296 } ENUM_OID_METHOD_T, *P_ENUM_OID_METHOD_T;
298 /* OID set/query processing entry */
299 typedef struct _WLAN_REQ_ENTRY {
300 UINT_32 rOid; /* OID */
301 PUINT_8 pucOidName; /* OID name text */
302 BOOLEAN fgQryBufLenChecking;
303 BOOLEAN fgSetBufLenChecking;
304 ENUM_OID_METHOD_T eOidMethod;
305 UINT_32 u4InfoBufLen;
306 PFN_OID_HANDLER_FUNC_REQ pfOidQueryHandler; /* PFN_OID_HANDLER_FUNC*/
307 PFN_OID_HANDLER_FUNC_REQ pfOidSetHandler; /* PFN_OID_HANDLER_FUNC */
308 } WLAN_REQ_ENTRY, *P_WLAN_REQ_ENTRY;
310 typedef struct _NDIS_TRANSPORT_STRUCT {
312 UINT_32 inNdisOidlength;
313 UINT_32 outNdisOidLength;
314 UINT_8 ndisOidContent[16];
315 } NDIS_TRANSPORT_STRUCT, *P_NDIS_TRANSPORT_STRUCT;
317 /*******************************************************************************
318 * P U B L I C D A T A
319 ********************************************************************************
322 /*******************************************************************************
323 * P R I V A T E D A T A
324 ********************************************************************************
327 /*******************************************************************************
329 ********************************************************************************
332 /*******************************************************************************
333 * F U N C T I O N D E C L A R A T I O N S
334 ********************************************************************************
339 IN struct net_device *prNetDev,
340 IN struct iw_request_info *prIwReqInfo,
341 IN union iwreq_data *prIwReqData,
347 IN struct net_device *prNetDev,
348 IN struct iw_request_info *prIwReqInfo,
349 IN union iwreq_data *prIwReqData,
355 IN struct net_device *prNetDev,
356 IN struct iw_request_info *prIwReqInfo,
357 IN union iwreq_data *prIwReqData,
363 IN struct net_device *prNetDev,
364 IN struct iw_request_info *prIwReqInfo,
365 IN union iwreq_data *prIwReqData,
371 IN struct net_device *prNetDev,
372 IN struct iw_request_info *prIwReqInfo,
373 IN union iwreq_data *prIwReqData,
379 IN struct net_device *prNetDev,
380 IN struct iw_request_info *prIwReqInfo,
381 IN union iwreq_data *prIwReqData,
387 IN struct net_device *prDev,
388 IN OUT struct ifreq *prReq,
392 /*******************************************************************************
394 ********************************************************************************
397 #endif /* _GL_WEXT_PRIV_H */