xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/nxp/mlinux/moal_priv.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 
2 /** @file moal_priv.h
3  *
4  * @brief This file contains definition for extended private IOCTL call.
5  *
6  *
7  * Copyright 2008-2021 NXP
8  *
9  * This software file (the File) is distributed by NXP
10  * under the terms of the GNU General Public License Version 2, June 1991
11  * (the License).  You may use, redistribute and/or modify the File in
12  * accordance with the terms and conditions of the License, a copy of which
13  * is available by writing to the Free Software Foundation, Inc.,
14  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
15  * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
16  *
17  * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
19  * ARE EXPRESSLY DISCLAIMED.  The License provides additional details about
20  * this warranty disclaimer.
21  *
22  */
23 
24 /********************************************************
25 Change log:
26     10/31/2008: initial version
27 ********************************************************/
28 
29 #ifndef _WOAL_PRIV_H_
30 #define _WOAL_PRIV_H_
31 
32 /** 2K bytes */
33 #define WOAL_2K_BYTES 2000
34 
35 /** PRIVATE CMD ID */
36 #define WOAL_IOCTL (SIOCIWFIRSTPRIV) /* 0x8BE0 defined in wireless.h */
37 
38 /** Private command ID to set one int/get word char */
39 #define WOAL_SETONEINT_GETWORDCHAR (WOAL_IOCTL + 1)
40 /** Private command ID to get version */
41 #define WOAL_VERSION 1
42 /** Private command ID to get extended version */
43 #define WOAL_VEREXT 2
44 
45 /** Private command ID to set/get none */
46 #define WOAL_SETNONE_GETNONE (WOAL_IOCTL + 2)
47 /** Private command ID for warm reset */
48 #define WOAL_WARMRESET 1
49 
50 /**
51  * Linux Kernels later 3.9 use CONFIG_PM_RUNTIME instead of
52  * CONFIG_USB_SUSPEND
53  */
54 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
55 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
56 #ifdef CONFIG_PM
57 #ifndef CONFIG_USB_SUSPEND
58 #define CONFIG_USB_SUSPEND
59 #endif
60 #endif
61 #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
62 #ifdef CONFIG_PM_RUNTIME
63 #ifndef CONFIG_USB_SUSPEND
64 #define CONFIG_USB_SUSPEND
65 #endif
66 #endif
67 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
68 #endif
69 
70 #ifdef CONFIG_USB_SUSPEND
71 /** Private command ID for usb suspend */
72 #define WOAL_USB_SUSPEND 2
73 /** Private command ID for usb resume */
74 #define WOAL_USB_RESUME 3
75 #endif /* CONFIG_USB_SUSPEND */
76 /** Private command ID to clear 11d chan table */
77 #define WOAL_11D_CLR_CHAN_TABLE 4
78 
79 /** Private command ID to set/get sixteen int */
80 #define WOAL_SET_GET_SIXTEEN_INT (WOAL_IOCTL + 3)
81 /** Private command ID to set/get TX power configurations */
82 #define WOAL_TX_POWERCFG 1
83 #ifdef DEBUG_LEVEL1
84 /** Private command ID to set/get driver debug */
85 #define WOAL_DRV_DBG 2
86 #endif
87 /** Private command ID to set/get beacon interval */
88 #define WOAL_BEACON_INTERVAL 3
89 /** Private command ID to get RSSI */
90 #define WOAL_SIGNAL 5
91 /** Private command ID to set/get Deep Sleep mode */
92 #define WOAL_DEEP_SLEEP 7
93 /** Private command ID for 11n ht configration */
94 #define WOAL_11N_TX_CFG 8
95 /** Private command ID for 11n usr ht configration */
96 #define WOAL_11N_HTCAP_CFG 9
97 /** Private command ID for TX Aggregation */
98 #define WOAL_PRIO_TBL 10
99 /** Private command ID for Updating ADDBA variables */
100 #define WOAL_ADDBA_UPDT 11
101 /** Private command ID to set/get Host Sleep configuration */
102 #define WOAL_HS_CFG 12
103 /** Private command ID to set Host Sleep parameters */
104 #define WOAL_HS_SETPARA 13
105 /** Private command ID to read/write registers */
106 #define WOAL_REG_READ_WRITE 14
107 /** Private command ID to set/get band/adhocband */
108 #define WOAL_BAND_CFG 15
109 /** Private command ID for TX Aggregation */
110 #define WOAL_11N_AMSDU_AGGR_CTRL 17
111 /** Private command ID to set/get Inactivity timeout */
112 #define WOAL_INACTIVITY_TIMEOUT_EXT 18
113 #ifdef SDIO
114 /** Private command ID to turn on/off sdio clock */
115 #define WOAL_SDIO_CLOCK 19
116 /** Private command ID to read/write Command 52 */
117 #define WOAL_CMD_52RDWR 20
118 #endif
119 /** Private command ID to set/get scan configuration parameter */
120 #define WOAL_SCAN_CFG 21
121 /** Private command ID to set/get PS configuration parameter */
122 #define WOAL_PS_CFG 22
123 /** Private command ID to read/write memory */
124 #define WOAL_MEM_READ_WRITE 23
125 #ifdef SDIO
126 /** Private command ID to control SDIO MP-A */
127 #define WOAL_SDIO_MPA_CTRL 25
128 #endif
129 /** Private command ID for Updating ADDBA variables */
130 #define WOAL_ADDBA_REJECT 27
131 /** Private command ID to set/get sleep parameters */
132 #define WOAL_SLEEP_PARAMS 28
133 /** Private command ID to set/get network monitor */
134 #define WOAL_NET_MONITOR 30
135 /** Private command ID to set/get TX BF capabilities */
136 #define WOAL_TX_BF_CAP 31
137 /** Private command ID to set/get dfs testing settings */
138 #define WOAL_DFS_TESTING 33
139 /** Private command ID to set/get CFP table codes */
140 #define WOAL_CFP_CODE 34
141 /** Private command ID to set/get tx/rx antenna */
142 #define WOAL_SET_GET_TX_RX_ANT 35
143 /** Private command ID to set/get management frame passthru mask */
144 #define WOAL_MGMT_FRAME_CTRL 36
145 
146 /** Private command ID to configure gpio independent reset */
147 #define WOAL_IND_RST_CFG 37
148 
149 /** Private command ID to set one int/get one int */
150 #define WOAL_SETONEINT_GETONEINT (WOAL_IOCTL + 5)
151 /** Private command ID to set/get Tx rate */
152 #define WOAL_SET_GET_TXRATE 1
153 /** Private command ID to set/get region code */
154 #define WOAL_SET_GET_REGIONCODE 2
155 /** Private command ID to turn on/off radio */
156 #define WOAL_SET_RADIO 3
157 /** Private command ID to enable WMM */
158 #define WOAL_WMM_ENABLE 4
159 /** Private command ID to enable 802.11D */
160 #define WOAL_11D_ENABLE 5
161 /** Private command ID to set/get QoS configuration */
162 #define WOAL_SET_GET_QOS_CFG 7
163 #if defined(REASSOCIATION)
164 /** Private command ID to set/get reassociation setting */
165 #define WOAL_SET_GET_REASSOC 9
166 #endif /* REASSOCIATION */
167 /** Private command ID for Updating Transmit buffer configration */
168 #define WOAL_TXBUF_CFG 10
169 /** Private command ID to set/get WWS mode */
170 #define WOAL_SET_GET_WWS_CFG 12
171 /** Private command ID to set/get sleep period */
172 #define WOAL_SLEEP_PD 13
173 /** Private command ID to set/get auth type */
174 #define WOAL_AUTH_TYPE 18
175 /** Private command ID to set/get port control */
176 #define WOAL_PORT_CTRL 19
177 #ifdef WIFI_DIRECT_SUPPORT
178 #if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
179 /** Private command ID for set/get BSS role */
180 #define WOAL_SET_GET_BSS_ROLE 21
181 #endif
182 #endif
183 /** Private command ID for set/get 11h local power constraint */
184 #define WOAL_SET_GET_11H_LOCAL_PWR_CONSTRAINT 22
185 /** Private command ID to set/get 11N HT stream configuration */
186 #define WOAL_HT_STREAM_CFG 23
187 /** Private command ID to set/get MAC control */
188 #define WOAL_MAC_CONTROL 24
189 /** Private command ID to get thermal value */
190 #define WOAL_THERMAL 25
191 /** Private command ID to set/get hs cfg param */
192 #define WOAL_CFG_HOTSPOT 26
193 
194 /** Private command ID to get log */
195 #define WOALGETLOG (WOAL_IOCTL + 7)
196 
197 /** Private command ID to set a wext address variable */
198 #define WOAL_SETADDR_GETNONE (WOAL_IOCTL + 8)
199 /** Private command ID to send deauthentication */
200 #define WOAL_DEAUTH 1
201 
202 /** Private command to get/set 256 chars */
203 #define WOAL_SET_GET_256_CHAR (WOAL_IOCTL + 9)
204 /** Private command to read/write passphrase */
205 #define WOAL_PASSPHRASE 1
206 #define WOAL_ASSOCIATE 3
207 /** Private command ID to get WMM queue status */
208 #define WOAL_WMM_QUEUE_STATUS 4
209 /** Private command ID to get Traffic stream status */
210 #define WOAL_WMM_TS_STATUS 5
211 #define WOAL_IP_ADDRESS 7
212 /** Private command ID to set/get TX bemaforming */
213 #define WOAL_TX_BF_CFG 8
214 /** Private command ID to get PTK/GTK */
215 #define WOAL_GET_KEY 9
216 
217 /** Get log buffer size */
218 #define GETLOG_BUFSIZE 1500
219 
220 /** Private command ID to set none/get twelve chars*/
221 #define WOAL_SETNONE_GETTWELVE_CHAR (WOAL_IOCTL + 11)
222 /** Private command ID for WPS session */
223 #define WOAL_WPS_SESSION 1
224 
225 /** Private command ID to set none/get four int */
226 #define WOAL_SETNONE_GET_FOUR_INT (WOAL_IOCTL + 13)
227 /** Private command ID to get data rates */
228 #define WOAL_DATA_RATE 1
229 /** Private command ID to get E-Supplicant mode */
230 #define WOAL_ESUPP_MODE 2
231 
232 /** Private command to get/set 64 ints */
233 #define WOAL_SET_GET_64_INT (WOAL_IOCTL + 15)
234 /** Private command ID to set/get ECL system clock */
235 #define WOAL_ECL_SYS_CLOCK 1
236 
237 /** Private command ID for hostcmd */
238 #define WOAL_HOST_CMD (WOAL_IOCTL + 17)
239 
240 /** Private command ID for arpfilter */
241 #define WOAL_ARP_FILTER (WOAL_IOCTL + 19)
242 
243 /** Private command ID to set ints and get chars */
244 #define WOAL_SET_INTS_GET_CHARS (WOAL_IOCTL + 21)
245 /** Private command ID to read EEPROM data */
246 #define WOAL_READ_EEPROM 1
247 
248 /** Private command ID to set/get 2K bytes */
249 #define WOAL_SET_GET_2K_BYTES (WOAL_IOCTL + 23)
250 
251 #ifdef SDIO
252 /** Private command ID to read/write Command 53 */
253 #define WOAL_CMD_53RDWR 2
254 #endif
255 
256 /** Private command ID for setuserscan */
257 #define WOAL_SET_USER_SCAN 3
258 /** Private command ID for getscantable */
259 #define WOAL_GET_SCAN_TABLE 4
260 /** Private command ID for setuserscanext: async without wait */
261 #define WOAL_SET_USER_SCAN_EXT 5
262 
263 /** Private command ID to request ADDTS */
264 #define WOAL_WMM_ADDTS 7
265 /** Private command ID to request DELTS */
266 #define WOAL_WMM_DELTS 8
267 /** Private command ID to queue configuration */
268 #define WOAL_WMM_QUEUE_CONFIG 9
269 /** Private command ID to queue stats */
270 #define WOAL_WMM_QUEUE_STATS 10
271 /** Private command ID to Bypass auth packet */
272 #define WOAL_BYPASSED_PACKET 11
273 
274 #ifdef UAP_WEXT
275 /** The following command IDs are for Froyo app */
276 /** Private command ID to start driver */
277 #define WOAL_FROYO_START (WOAL_IOCTL + 28)
278 /** Private command ID to reload FW */
279 #define WOAL_FROYO_WL_FW_RELOAD (WOAL_IOCTL + 29)
280 /** Private command ID to stop driver */
281 #define WOAL_FROYO_STOP (WOAL_IOCTL + 30)
282 #endif
283 
284 /** moal_802_11_rates  */
285 typedef struct _moal_802_11_rates {
286 	/** Num of rates */
287 	t_u8 num_of_rates;
288 	/** Rates */
289 	t_u8 rates[MLAN_SUPPORTED_RATES];
290 } moal_802_11_rates, *pmoal_802_11_rates;
291 
292 #if defined(STA_WEXT) || defined(UAP_WEXT)
293 int woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd);
294 #endif
295 
296 #endif /* _WOAL_PRIV_H_ */
297