1 //------------------------------------------------------------------------------
2 // Copyright (c) 2004-2010 Atheros Communications Inc.
3 // All rights reserved.
4 //
5 //
6 //
7 // Permission to use, copy, modify, and/or distribute this software for any
8 // purpose with or without fee is hereby granted, provided that the above
9 // copyright notice and this permission notice appear in all copies.
10 //
11 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 //
19 //
20 //
21 // Author(s): ="Atheros"
22 //------------------------------------------------------------------------------
23 
24 #ifndef _ATHDRV_LINUX_H
25 #define _ATHDRV_LINUX_H
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 
32 /*
33  * There are two types of ioctl's here: Standard ioctls and
34  * eXtended ioctls.  All extended ioctls (XIOCTL) are multiplexed
35  * off of the single ioctl command, AR6000_IOCTL_EXTENDED.  The
36  * arguments for every XIOCTL starts with a 32-bit command word
37  * that is used to select which extended ioctl is in use.  After
38  * the command word are command-specific arguments.
39  */
40 
41 /* Linux standard Wireless Extensions, private ioctl interfaces */
42 #define IEEE80211_IOCTL_SETPARAM             (SIOCIWFIRSTPRIV+0)
43 #define IEEE80211_IOCTL_SETKEY               (SIOCIWFIRSTPRIV+1)
44 #define IEEE80211_IOCTL_DELKEY               (SIOCIWFIRSTPRIV+2)
45 #define IEEE80211_IOCTL_SETMLME              (SIOCIWFIRSTPRIV+3)
46 #define IEEE80211_IOCTL_ADDPMKID             (SIOCIWFIRSTPRIV+4)
47 #define IEEE80211_IOCTL_SETOPTIE             (SIOCIWFIRSTPRIV+5)
48 //#define IEEE80211_IOCTL_GETPARAM             (SIOCIWFIRSTPRIV+6)
49 //#define IEEE80211_IOCTL_SETWMMPARAMS         (SIOCIWFIRSTPRIV+7)
50 //#define IEEE80211_IOCTL_GETWMMPARAMS         (SIOCIWFIRSTPRIV+8)
51 //#define IEEE80211_IOCTL_GETOPTIE             (SIOCIWFIRSTPRIV+9)
52 //#define IEEE80211_IOCTL_SETAUTHALG           (SIOCIWFIRSTPRIV+10)
53 #define IEEE80211_IOCTL_LASTONE              (SIOCIWFIRSTPRIV+10)
54 
55 
56 
57 /*                      ====WMI Ioctls====                                    */
58 /*
59  *
60  * Many ioctls simply provide WMI services to application code:
61  * an application makes such an ioctl call with a set of arguments
62  * that are packaged into the corresponding WMI message, and sent
63  * to the Target.
64  */
65 
66 #define AR6000_IOCTL_WMI_GETREV              (SIOCIWFIRSTPRIV+11)
67 /*
68  * arguments:
69  *   ar6000_version *revision
70  */
71 
72 #define AR6000_IOCTL_WMI_SETPWR              (SIOCIWFIRSTPRIV+12)
73 /*
74  * arguments:
75  *   WMI_POWER_MODE_CMD pwrModeCmd (see include/wmi.h)
76  * uses: WMI_SET_POWER_MODE_CMDID
77  */
78 
79 #define AR6000_IOCTL_WMI_SETSCAN             (SIOCIWFIRSTPRIV+13)
80 /*
81  * arguments:
82  *   WMI_SCAN_PARAMS_CMD scanParams (see include/wmi.h)
83  * uses: WMI_SET_SCAN_PARAMS_CMDID
84  */
85 
86 #define AR6000_IOCTL_WMI_SETLISTENINT        (SIOCIWFIRSTPRIV+14)
87 /*
88  * arguments:
89  *   UINT32 listenInterval
90  * uses: WMI_SET_LISTEN_INT_CMDID
91  */
92 
93 #define AR6000_IOCTL_WMI_SETBSSFILTER        (SIOCIWFIRSTPRIV+15)
94 /*
95  * arguments:
96  *   WMI_BSS_FILTER filter (see include/wmi.h)
97  * uses: WMI_SET_BSS_FILTER_CMDID
98  */
99 
100 #define AR6000_IOCTL_WMI_SET_CHANNELPARAMS   (SIOCIWFIRSTPRIV+16)
101 /*
102  * arguments:
103  *   WMI_CHANNEL_PARAMS_CMD chParams
104  * uses: WMI_SET_CHANNEL_PARAMS_CMDID
105  */
106 
107 #define AR6000_IOCTL_WMI_SET_PROBEDSSID      (SIOCIWFIRSTPRIV+17)
108 /*
109  * arguments:
110  *   WMI_PROBED_SSID_CMD probedSsids (see include/wmi.h)
111  * uses: WMI_SETPROBED_SSID_CMDID
112  */
113 
114 #define AR6000_IOCTL_WMI_SET_PMPARAMS        (SIOCIWFIRSTPRIV+18)
115 /*
116  * arguments:
117  *   WMI_POWER_PARAMS_CMD powerParams (see include/wmi.h)
118  * uses: WMI_SET_POWER_PARAMS_CMDID
119  */
120 
121 #define AR6000_IOCTL_WMI_SET_BADAP           (SIOCIWFIRSTPRIV+19)
122 /*
123  * arguments:
124  *   WMI_ADD_BAD_AP_CMD badAPs (see include/wmi.h)
125  * uses: WMI_ADD_BAD_AP_CMDID
126  */
127 
128 #define AR6000_IOCTL_WMI_GET_QOS_QUEUE       (SIOCIWFIRSTPRIV+20)
129 /*
130  * arguments:
131  *   ar6000_queuereq queueRequest (see below)
132  */
133 
134 #define AR6000_IOCTL_WMI_CREATE_QOS          (SIOCIWFIRSTPRIV+21)
135 /*
136  * arguments:
137  *   WMI_CREATE_PSTREAM createPstreamCmd (see include/wmi.h)
138  * uses: WMI_CREATE_PSTREAM_CMDID
139  */
140 
141 #define AR6000_IOCTL_WMI_DELETE_QOS          (SIOCIWFIRSTPRIV+22)
142 /*
143  * arguments:
144  *   WMI_DELETE_PSTREAM_CMD deletePstreamCmd (see include/wmi.h)
145  * uses: WMI_DELETE_PSTREAM_CMDID
146  */
147 
148 #define AR6000_IOCTL_WMI_SET_SNRTHRESHOLD   (SIOCIWFIRSTPRIV+23)
149 /*
150  * arguments:
151  *   WMI_SNR_THRESHOLD_PARAMS_CMD thresholdParams (see include/wmi.h)
152  * uses: WMI_SNR_THRESHOLD_PARAMS_CMDID
153  */
154 
155 #define AR6000_IOCTL_WMI_SET_ERROR_REPORT_BITMASK (SIOCIWFIRSTPRIV+24)
156 /*
157  * arguments:
158  *   WMI_TARGET_ERROR_REPORT_BITMASK errorReportBitMask (see include/wmi.h)
159  * uses: WMI_TARGET_ERROR_REPORT_BITMASK_CMDID
160  */
161 
162 #define AR6000_IOCTL_WMI_GET_TARGET_STATS    (SIOCIWFIRSTPRIV+25)
163 /*
164  * arguments:
165  *   TARGET_STATS *targetStats (see below)
166  * uses: WMI_GET_STATISTICS_CMDID
167  */
168 
169 #define AR6000_IOCTL_WMI_SET_ASSOC_INFO      (SIOCIWFIRSTPRIV+26)
170 /*
171  * arguments:
172  *   WMI_SET_ASSOC_INFO_CMD setAssocInfoCmd
173  * uses: WMI_SET_ASSOC_INFO_CMDID
174  */
175 
176 #define AR6000_IOCTL_WMI_SET_ACCESS_PARAMS   (SIOCIWFIRSTPRIV+27)
177 /*
178  * arguments:
179  *   WMI_SET_ACCESS_PARAMS_CMD setAccessParams (see include/wmi.h)
180  * uses: WMI_SET_ACCESS_PARAMS_CMDID
181  */
182 
183 #define AR6000_IOCTL_WMI_SET_BMISS_TIME      (SIOCIWFIRSTPRIV+28)
184 /*
185  * arguments:
186  *   UINT32 beaconMissTime
187  * uses: WMI_SET_BMISS_TIME_CMDID
188  */
189 
190 #define AR6000_IOCTL_WMI_SET_DISC_TIMEOUT    (SIOCIWFIRSTPRIV+29)
191 /*
192  * arguments:
193  *   WMI_DISC_TIMEOUT_CMD disconnectTimeoutCmd (see include/wmi.h)
194  * uses: WMI_SET_DISC_TIMEOUT_CMDID
195  */
196 
197 #define AR6000_IOCTL_WMI_SET_IBSS_PM_CAPS    (SIOCIWFIRSTPRIV+30)
198 /*
199  * arguments:
200  *   WMI_IBSS_PM_CAPS_CMD ibssPowerMgmtCapsCmd
201  * uses: WMI_SET_IBSS_PM_CAPS_CMDID
202  */
203 
204 /*
205  * There is a very small space available for driver-private
206  * wireless ioctls.  In order to circumvent this limitation,
207  * we multiplex a bunch of ioctls (XIOCTLs) on top of a
208  * single AR6000_IOCTL_EXTENDED ioctl.
209  */
210 #define AR6000_IOCTL_EXTENDED                (SIOCIWFIRSTPRIV+31)
211 
212 
213 /*                         ====BMI Extended Ioctls====                        */
214 
215 #define AR6000_XIOCTL_BMI_DONE                                  1
216 /*
217  * arguments:
218  *   UINT32 cmd (AR6000_XIOCTL_BMI_DONE)
219  * uses: BMI_DONE
220  */
221 
222 #define AR6000_XIOCTL_BMI_READ_MEMORY                           2
223 /*
224  * arguments:
225  *   union {
226  *     struct {
227  *       UINT32 cmd (AR6000_XIOCTL_BMI_READ_MEMORY)
228  *       UINT32 address
229  *       UINT32 length
230  *     }
231  *     char results[length]
232  *   }
233  * uses: BMI_READ_MEMORY
234  */
235 
236 #define AR6000_XIOCTL_BMI_WRITE_MEMORY                          3
237 /*
238  * arguments:
239  *   UINT32 cmd (AR6000_XIOCTL_BMI_WRITE_MEMORY)
240  *   UINT32 address
241  *   UINT32 length
242  *   char data[length]
243  * uses: BMI_WRITE_MEMORY
244  */
245 
246 #define AR6000_XIOCTL_BMI_EXECUTE                               4
247 /*
248  * arguments:
249  *   UINT32 cmd (AR6000_XIOCTL_BMI_EXECUTE)
250  *   UINT32 TargetAddress
251  *   UINT32 parameter
252  * uses: BMI_EXECUTE
253  */
254 
255 #define AR6000_XIOCTL_BMI_SET_APP_START                         5
256 /*
257  * arguments:
258  *   UINT32 cmd (AR6000_XIOCTL_BMI_SET_APP_START)
259  *   UINT32 TargetAddress
260  * uses: BMI_SET_APP_START
261  */
262 
263 #define AR6000_XIOCTL_BMI_READ_SOC_REGISTER                     6
264 /*
265  * arguments:
266  *   union {
267  *     struct {
268  *       UINT32 cmd (AR6000_XIOCTL_BMI_READ_SOC_REGISTER)
269  *       UINT32 TargetAddress, 32-bit aligned
270  *     }
271  *     UINT32 result
272  *   }
273  * uses: BMI_READ_SOC_REGISTER
274  */
275 
276 #define AR6000_XIOCTL_BMI_WRITE_SOC_REGISTER                    7
277 /*
278  * arguments:
279  *     struct {
280  *       UINT32 cmd (AR6000_XIOCTL_BMI_WRITE_SOC_REGISTER)
281  *       UINT32 TargetAddress, 32-bit aligned
282  *       UINT32 newValue
283  *     }
284  * uses: BMI_WRITE_SOC_REGISTER
285  */
286 
287 #define AR6000_XIOCTL_BMI_TEST                                  8
288 /*
289  * arguments:
290  *   UINT32 cmd (AR6000_XIOCTL_BMI_TEST)
291  *   UINT32 address
292  *   UINT32 length
293  *   UINT32 count
294  */
295 
296 
297 
298 /* Historical Host-side DataSet support */
299 #define AR6000_XIOCTL_UNUSED9                                   9
300 #define AR6000_XIOCTL_UNUSED10                                  10
301 #define AR6000_XIOCTL_UNUSED11                                  11
302 
303 /*                      ====Misc Extended Ioctls====                          */
304 
305 #define AR6000_XIOCTL_FORCE_TARGET_RESET                        12
306 /*
307  * arguments:
308  *   UINT32 cmd (AR6000_XIOCTL_FORCE_TARGET_RESET)
309  */
310 
311 
312 #ifdef HTC_RAW_INTERFACE
313 /* HTC Raw Interface Ioctls */
314 #define AR6000_XIOCTL_HTC_RAW_OPEN                              13
315 /*
316  * arguments:
317  *   UINT32 cmd (AR6000_XIOCTL_HTC_RAW_OPEN)
318  */
319 
320 #define AR6000_XIOCTL_HTC_RAW_CLOSE                             14
321 /*
322  * arguments:
323  *   UINT32 cmd (AR6000_XIOCTL_HTC_RAW_CLOSE)
324  */
325 
326 #define AR6000_XIOCTL_HTC_RAW_READ                              15
327 /*
328  * arguments:
329  *   union {
330  *     struct {
331  *       UINT32 cmd (AR6000_XIOCTL_HTC_RAW_READ)
332  *       UINT32 mailboxID
333  *       UINT32 length
334  *     }
335  *     results[length]
336  *   }
337  */
338 
339 #define AR6000_XIOCTL_HTC_RAW_WRITE                             16
340 /*
341  * arguments:
342  *   UINT32 cmd (AR6000_XIOCTL_HTC_RAW_WRITE)
343  *   UINT32 mailboxID
344  *   UINT32 length
345  *   char buffer[length]
346  */
347 #endif /* HTC_RAW_INTERFACE */
348 
349 #define AR6000_XIOCTL_CHECK_TARGET_READY                        17
350 /*
351  * arguments:
352  *   UINT32 cmd (AR6000_XIOCTL_CHECK_TARGET_READY)
353  */
354 
355 
356 
357 /*                ====GPIO (General Purpose I/O) Extended Ioctls====          */
358 
359 #define AR6000_XIOCTL_GPIO_OUTPUT_SET                           18
360 /*
361  * arguments:
362  *   UINT32 cmd (AR6000_XIOCTL_GPIO_OUTPUT_SET)
363  *   ar6000_gpio_output_set_cmd_s (see below)
364  * uses: WMIX_GPIO_OUTPUT_SET_CMDID
365  */
366 
367 #define AR6000_XIOCTL_GPIO_INPUT_GET                            19
368 /*
369  * arguments:
370  *   UINT32 cmd (AR6000_XIOCTL_GPIO_INPUT_GET)
371  * uses: WMIX_GPIO_INPUT_GET_CMDID
372  */
373 
374 #define AR6000_XIOCTL_GPIO_REGISTER_SET                         20
375 /*
376  * arguments:
377  *   UINT32 cmd (AR6000_XIOCTL_GPIO_REGISTER_SET)
378  *   ar6000_gpio_register_cmd_s (see below)
379  * uses: WMIX_GPIO_REGISTER_SET_CMDID
380  */
381 
382 #define AR6000_XIOCTL_GPIO_REGISTER_GET                         21
383 /*
384  * arguments:
385  *   UINT32 cmd (AR6000_XIOCTL_GPIO_REGISTER_GET)
386  *   ar6000_gpio_register_cmd_s (see below)
387  * uses: WMIX_GPIO_REGISTER_GET_CMDID
388  */
389 
390 #define AR6000_XIOCTL_GPIO_INTR_ACK                             22
391 /*
392  * arguments:
393  *   UINT32 cmd (AR6000_XIOCTL_GPIO_INTR_ACK)
394  *   ar6000_cpio_intr_ack_cmd_s (see below)
395  * uses: WMIX_GPIO_INTR_ACK_CMDID
396  */
397 
398 #define AR6000_XIOCTL_GPIO_INTR_WAIT                            23
399 /*
400  * arguments:
401  *   UINT32 cmd (AR6000_XIOCTL_GPIO_INTR_WAIT)
402  */
403 
404 
405 
406 /*                    ====more wireless commands====                          */
407 
408 #define AR6000_XIOCTL_SET_ADHOC_BSSID                           24
409 /*
410  * arguments:
411  *   UINT32 cmd (AR6000_XIOCTL_SET_ADHOC_BSSID)
412  *   WMI_SET_ADHOC_BSSID_CMD setAdHocBssidCmd (see include/wmi.h)
413  */
414 
415 #define AR6000_XIOCTL_SET_OPT_MODE                              25
416 /*
417  * arguments:
418  *   UINT32 cmd (AR6000_XIOCTL_SET_OPT_MODE)
419  *   WMI_SET_OPT_MODE_CMD setOptModeCmd (see include/wmi.h)
420  * uses: WMI_SET_OPT_MODE_CMDID
421  */
422 
423 #define AR6000_XIOCTL_OPT_SEND_FRAME                            26
424 /*
425  * arguments:
426  *   UINT32 cmd (AR6000_XIOCTL_OPT_SEND_FRAME)
427  *   WMI_OPT_TX_FRAME_CMD optTxFrameCmd (see include/wmi.h)
428  * uses: WMI_OPT_TX_FRAME_CMDID
429  */
430 
431 #define AR6000_XIOCTL_SET_BEACON_INTVAL                         27
432 /*
433  * arguments:
434  *   UINT32 cmd (AR6000_XIOCTL_SET_BEACON_INTVAL)
435  *   WMI_BEACON_INT_CMD beaconIntCmd (see include/wmi.h)
436  * uses: WMI_SET_BEACON_INT_CMDID
437  */
438 
439 
440 #define IEEE80211_IOCTL_SETAUTHALG                              28
441 
442 
443 #define AR6000_XIOCTL_SET_VOICE_PKT_SIZE                        29
444 /*
445  * arguments:
446  *   UINT32 cmd (AR6000_XIOCTL_SET_VOICE_PKT_SIZE)
447  *   WMI_SET_VOICE_PKT_SIZE_CMD setVoicePktSizeCmd (see include/wmi.h)
448  * uses: WMI_SET_VOICE_PKT_SIZE_CMDID
449  */
450 
451 
452 #define AR6000_XIOCTL_SET_MAX_SP                                30
453 /*
454  * arguments:
455  *   UINT32 cmd (AR6000_XIOCTL_SET_MAX_SP)
456  *   WMI_SET_MAX_SP_LEN_CMD maxSPLen(see include/wmi.h)
457  * uses: WMI_SET_MAX_SP_LEN_CMDID
458  */
459 
460 #define AR6000_XIOCTL_WMI_GET_ROAM_TBL                          31
461 
462 #define AR6000_XIOCTL_WMI_SET_ROAM_CTRL                         32
463 
464 #define AR6000_XIOCTRL_WMI_SET_POWERSAVE_TIMERS                 33
465 
466 
467 /*
468  * arguments:
469  *   UINT32 cmd (AR6000_XIOCTRL_WMI_SET_POWERSAVE_TIMERS)
470  *   WMI_SET_POWERSAVE_TIMERS_CMD powerSaveTimers(see include/wmi.h)
471  *   WMI_SET_POWERSAVE_TIMERS_CMDID
472  */
473 
474 #define AR6000_XIOCTRL_WMI_GET_POWER_MODE                        34
475 /*
476  * arguments:
477  *   UINT32 cmd (AR6000_XIOCTRL_WMI_GET_POWER_MODE)
478  */
479 
480 #define AR6000_XIOCTRL_WMI_SET_WLAN_STATE                       35
481 typedef enum {
482     WLAN_DISABLED,
483     WLAN_ENABLED
484 } AR6000_WLAN_STATE;
485 /*
486  * arguments:
487  * enable/disable
488  */
489 
490 #define AR6000_XIOCTL_WMI_GET_ROAM_DATA                         36
491 
492 #define AR6000_XIOCTL_WMI_SETRETRYLIMITS                37
493 /*
494  * arguments:
495  *   WMI_SET_RETRY_LIMITS_CMD ibssSetRetryLimitsCmd
496  * uses: WMI_SET_RETRY_LIMITS_CMDID
497  */
498 
499 #ifdef CONFIG_HOST_TCMD_SUPPORT
500 /*       ====extended commands for radio test ====                          */
501 
502 #define AR6000_XIOCTL_TCMD_CONT_TX                      38
503 /*
504  * arguments:
505  *   UINT32 cmd (AR6000_XIOCTL_TCMD_CONT_TX)
506  *   WMI_TCMD_CONT_TX_CMD contTxCmd (see include/wmi.h)
507  * uses: WMI_TCMD_CONT_TX_CMDID
508  */
509 
510 #define AR6000_XIOCTL_TCMD_CONT_RX                      39
511 /*
512  * arguments:
513  *   UINT32 cmd (AR6000_XIOCTL_TCMD_CONT_RX)
514  *   WMI_TCMD_CONT_RX_CMD rxCmd (see include/wmi.h)
515  * uses: WMI_TCMD_CONT_RX_CMDID
516  */
517 
518 #define AR6000_XIOCTL_TCMD_PM                           40
519 /*
520  * arguments:
521  *   UINT32 cmd (AR6000_XIOCTL_TCMD_PM)
522  *   WMI_TCMD_PM_CMD pmCmd (see include/wmi.h)
523  * uses: WMI_TCMD_PM_CMDID
524  */
525 
526 #endif /* CONFIG_HOST_TCMD_SUPPORT */
527 
528 #define AR6000_XIOCTL_WMI_STARTSCAN                     41
529 /*
530  * arguments:
531  *   UINT32 cmd (AR6000_XIOCTL_WMI_STARTSCAN)
532  *   UINT8  scanType
533  *   UINT8  scanConnected
534  *   u32 forceFgScan
535  * uses: WMI_START_SCAN_CMDID
536  */
537 
538 #define AR6000_XIOCTL_WMI_SETFIXRATES                   42
539 
540 #define AR6000_XIOCTL_WMI_GETFIXRATES                   43
541 
542 
543 #define AR6000_XIOCTL_WMI_SET_RSSITHRESHOLD             44
544 /*
545  * arguments:
546  *   WMI_RSSI_THRESHOLD_PARAMS_CMD thresholdParams (see include/wmi.h)
547  * uses: WMI_RSSI_THRESHOLD_PARAMS_CMDID
548  */
549 
550 #define AR6000_XIOCTL_WMI_CLR_RSSISNR                   45
551 /*
552  * arguments:
553  *   WMI_CLR_RSSISNR_CMD thresholdParams (see include/wmi.h)
554  * uses: WMI_CLR_RSSISNR_CMDID
555  */
556 
557 #define AR6000_XIOCTL_WMI_SET_LQTHRESHOLD               46
558 /*
559  * arguments:
560  *   WMI_LQ_THRESHOLD_PARAMS_CMD thresholdParams (see include/wmi.h)
561  * uses: WMI_LQ_THRESHOLD_PARAMS_CMDID
562  */
563 
564 #define AR6000_XIOCTL_WMI_SET_RTS                        47
565 /*
566  * arguments:
567  *   WMI_SET_RTS_MODE_CMD (see include/wmi.h)
568  * uses: WMI_SET_RTS_MODE_CMDID
569  */
570 
571 #define AR6000_XIOCTL_WMI_SET_LPREAMBLE                 48
572 
573 #define AR6000_XIOCTL_WMI_SET_AUTHMODE                  49
574 /*
575  * arguments:
576  *   UINT32 cmd (AR6000_XIOCTL_WMI_SET_AUTHMODE)
577  *   UINT8  mode
578  * uses: WMI_SET_RECONNECT_AUTH_MODE_CMDID
579  */
580 
581 #define AR6000_XIOCTL_WMI_SET_REASSOCMODE               50
582 
583 /*
584  * arguments:
585  *   UINT32 cmd (AR6000_XIOCTL_WMI_SET_WMM)
586  *   UINT8  mode
587  * uses: WMI_SET_WMM_CMDID
588  */
589 #define AR6000_XIOCTL_WMI_SET_WMM                       51
590 
591 /*
592  * arguments:
593  * UINT32 cmd (AR6000_XIOCTL_WMI_SET_HB_CHALLENGE_RESP_PARAMS)
594  * UINT32 frequency
595  * UINT8  threshold
596  */
597 #define AR6000_XIOCTL_WMI_SET_HB_CHALLENGE_RESP_PARAMS  52
598 
599 /*
600  * arguments:
601  * UINT32 cmd (AR6000_XIOCTL_WMI_GET_HB_CHALLENGE_RESP)
602  * UINT32 cookie
603  */
604 #define AR6000_XIOCTL_WMI_GET_HB_CHALLENGE_RESP         53
605 
606 /*
607  * arguments:
608  *   UINT32 cmd (AR6000_XIOCTL_WMI_GET_RD)
609  *   UINT32 regDomain
610  */
611 #define AR6000_XIOCTL_WMI_GET_RD                        54
612 
613 #define AR6000_XIOCTL_DIAG_READ                         55
614 
615 #define AR6000_XIOCTL_DIAG_WRITE                        56
616 
617 /*
618  * arguments cmd (AR6000_XIOCTL_SET_TXOP)
619  * WMI_TXOP_CFG  txopEnable
620  */
621 #define AR6000_XIOCTL_WMI_SET_TXOP                      57
622 
623 #ifdef USER_KEYS
624 /*
625  * arguments:
626  * UINT32 cmd (AR6000_XIOCTL_USER_SETKEYS)
627  * UINT32 keyOpCtrl
628  * uses struct ar6000_user_setkeys_info
629  */
630 #define AR6000_XIOCTL_USER_SETKEYS                      58
631 #endif /* USER_KEYS */
632 
633 #define AR6000_XIOCTL_WMI_SET_KEEPALIVE                 59
634 /*
635  * arguments:
636  *   UINT8 cmd (AR6000_XIOCTL_WMI_SET_KEEPALIVE)
637  *   UINT8 keepaliveInterval
638  * uses: WMI_SET_KEEPALIVE_CMDID
639  */
640 
641 #define AR6000_XIOCTL_WMI_GET_KEEPALIVE                 60
642 /*
643  * arguments:
644  *   UINT8 cmd (AR6000_XIOCTL_WMI_GET_KEEPALIVE)
645  *   UINT8 keepaliveInterval
646  *   u32 configured
647  * uses: WMI_GET_KEEPALIVE_CMDID
648  */
649 
650 /*               ====ROM Patching Extended Ioctls====                       */
651 
652 #define AR6000_XIOCTL_BMI_ROMPATCH_INSTALL              61
653 /*
654  * arguments:
655  *     union {
656  *       struct {
657  *         UINT32 cmd (AR6000_XIOCTL_BMI_ROMPATCH_INSTALL)
658  *         UINT32 ROM Address
659  *         UINT32 RAM Address
660  *         UINT32 number of bytes
661  *         UINT32 activate? (0 or 1)
662  *       }
663  *       u32 resulting rompatch ID
664  *     }
665  * uses: BMI_ROMPATCH_INSTALL
666  */
667 
668 #define AR6000_XIOCTL_BMI_ROMPATCH_UNINSTALL            62
669 /*
670  * arguments:
671  *     struct {
672  *       UINT32 cmd (AR6000_XIOCTL_BMI_ROMPATCH_UNINSTALL)
673  *       UINT32 rompatch ID
674  *     }
675  * uses: BMI_ROMPATCH_UNINSTALL
676  */
677 
678 #define AR6000_XIOCTL_BMI_ROMPATCH_ACTIVATE             63
679 /*
680  * arguments:
681  *     struct {
682  *       UINT32 cmd (AR6000_XIOCTL_BMI_ROMPATCH_ACTIVATE)
683  *       UINT32 rompatch count
684  *       UINT32 rompatch IDs[rompatch count]
685  *     }
686  * uses: BMI_ROMPATCH_ACTIVATE
687  */
688 
689 #define AR6000_XIOCTL_BMI_ROMPATCH_DEACTIVATE           64
690 /*
691  * arguments:
692  *     struct {
693  *       UINT32 cmd (AR6000_XIOCTL_BMI_ROMPATCH_DEACTIVATE)
694  *       UINT32 rompatch count
695  *       UINT32 rompatch IDs[rompatch count]
696  *     }
697  * uses: BMI_ROMPATCH_DEACTIVATE
698  */
699 
700 #define AR6000_XIOCTL_WMI_SET_APPIE             65
701 /*
702  * arguments:
703  *      struct {
704  *          UINT32 cmd (AR6000_XIOCTL_WMI_SET_APPIE)
705  *          UINT32  app_frmtype;
706  *          UINT32  app_buflen;
707  *          UINT8   app_buf[];
708  *      }
709  */
710 #define AR6000_XIOCTL_WMI_SET_MGMT_FRM_RX_FILTER    66
711 /*
712  * arguments:
713  *      u32 filter_type;
714  */
715 
716 #define AR6000_XIOCTL_DBGLOG_CFG_MODULE             67
717 
718 #define AR6000_XIOCTL_DBGLOG_GET_DEBUG_LOGS         68
719 
720 #define AR6000_XIOCTL_WMI_SET_WSC_STATUS            70
721 /*
722  * arguments:
723  *      u32 wsc_status;
724  *            (WSC_REG_INACTIVE or WSC_REG_ACTIVE)
725  */
726 
727 /*
728  * arguments:
729  *      struct {
730  *          u8 streamType;
731  *          u8 status;
732  *      }
733  * uses: WMI_SET_BT_STATUS_CMDID
734  */
735 #define AR6000_XIOCTL_WMI_SET_BT_STATUS             71
736 
737 /*
738  * arguments:
739  *      struct {
740  *           u8 paramType;
741  *           union {
742  *               u8 noSCOPkts;
743  *               BT_PARAMS_A2DP a2dpParams;
744  *               BT_COEX_REGS regs;
745  *           };
746  *      }
747  * uses: WMI_SET_BT_PARAM_CMDID
748  */
749 #define AR6000_XIOCTL_WMI_SET_BT_PARAMS             72
750 
751 #define AR6000_XIOCTL_WMI_SET_HOST_SLEEP_MODE       73
752 #define AR6000_XIOCTL_WMI_SET_WOW_MODE              74
753 #define AR6000_XIOCTL_WMI_GET_WOW_LIST              75
754 #define AR6000_XIOCTL_WMI_ADD_WOW_PATTERN           76
755 #define AR6000_XIOCTL_WMI_DEL_WOW_PATTERN           77
756 
757 
758 
759 #define AR6000_XIOCTL_TARGET_INFO                   78
760 /*
761  * arguments:
762  *   UINT32 cmd (AR6000_XIOCTL_TARGET_INFO)
763  *   u32 TargetVersion (returned)
764  *   u32 TargetType    (returned)
765  * (See also bmi_msg.h target_ver and target_type)
766  */
767 
768 #define AR6000_XIOCTL_DUMP_HTC_CREDIT_STATE         79
769 /*
770  * arguments:
771  *      none
772  */
773 
774 #define AR6000_XIOCTL_TRAFFIC_ACTIVITY_CHANGE       80
775 /*
776  * This ioctl is used to emulate traffic activity
777  * timeouts.  Activity/inactivity will trigger the driver
778  * to re-balance credits.
779  *
780  * arguments:
781  *      ar6000_traffic_activity_change
782  */
783 
784 #define AR6000_XIOCTL_WMI_SET_CONNECT_CTRL_FLAGS    81
785 /*
786  * This ioctl is used to set the connect control flags
787  *
788  * arguments:
789  *      u32 connectCtrlFlags
790  */
791 
792 #define AR6000_XIOCTL_WMI_SET_AKMP_PARAMS              82
793 /*
794  * This IOCTL sets any Authentication,Key Management and Protection
795  * related parameters. This is used along with the information set in
796  * Connect Command.
797  * Currently this enables Multiple PMKIDs to an AP.
798  *
799  * arguments:
800  *      struct {
801  *          u32 akmpInfo;
802  *      }
803  * uses: WMI_SET_AKMP_PARAMS_CMD
804  */
805 
806 #define AR6000_XIOCTL_WMI_GET_PMKID_LIST            83
807 
808 #define AR6000_XIOCTL_WMI_SET_PMKID_LIST            84
809 /*
810  * This IOCTL is used to set a list of PMKIDs. This list of
811  * PMKIDs is used in the [Re]AssocReq Frame. This list is used
812  * only if the MultiPMKID option is enabled via the
813  * AR6000_XIOCTL_WMI_SET_AKMP_PARAMS  IOCTL.
814  *
815  * arguments:
816  *      struct {
817  *          u32 numPMKID;
818  *          WMI_PMKID   pmkidList[WMI_MAX_PMKID_CACHE];
819  *      }
820  * uses: WMI_SET_PMKIDLIST_CMD
821  */
822 
823 #define AR6000_XIOCTL_WMI_SET_PARAMS                85
824 #define AR6000_XIOCTL_WMI_SET_MCAST_FILTER     86
825 #define AR6000_XIOCTL_WMI_DEL_MCAST_FILTER     87
826 
827 
828 /* Historical DSETPATCH support for INI patches */
829 #define AR6000_XIOCTL_UNUSED90                      90
830 
831 
832 /* Support LZ-compressed firmware download */
833 #define AR6000_XIOCTL_BMI_LZ_STREAM_START           91
834 /*
835  * arguments:
836  *   UINT32 cmd (AR6000_XIOCTL_BMI_LZ_STREAM_START)
837  *   UINT32 address
838  * uses: BMI_LZ_STREAM_START
839  */
840 
841 #define AR6000_XIOCTL_BMI_LZ_DATA                   92
842 /*
843  * arguments:
844  *   UINT32 cmd (AR6000_XIOCTL_BMI_LZ_DATA)
845  *   UINT32 length
846  *   char data[length]
847  * uses: BMI_LZ_DATA
848  */
849 
850 #define AR6000_XIOCTL_PROF_CFG                      93
851 /*
852  * arguments:
853  *   u32 period
854  *   u32 nbins
855  */
856 
857 #define AR6000_XIOCTL_PROF_ADDR_SET                 94
858 /*
859  * arguments:
860  *   u32 Target address
861  */
862 
863 #define AR6000_XIOCTL_PROF_START                    95
864 
865 #define AR6000_XIOCTL_PROF_STOP                     96
866 
867 #define AR6000_XIOCTL_PROF_COUNT_GET                97
868 
869 #define AR6000_XIOCTL_WMI_ABORT_SCAN                98
870 
871 /*
872  * AP mode
873  */
874 #define AR6000_XIOCTL_AP_GET_STA_LIST               99
875 
876 #define AR6000_XIOCTL_AP_HIDDEN_SSID                100
877 
878 #define AR6000_XIOCTL_AP_SET_NUM_STA                101
879 
880 #define AR6000_XIOCTL_AP_SET_ACL_MAC                102
881 
882 #define AR6000_XIOCTL_AP_GET_ACL_LIST               103
883 
884 #define AR6000_XIOCTL_AP_COMMIT_CONFIG              104
885 
886 #define IEEE80211_IOCTL_GETWPAIE                    105
887 
888 #define AR6000_XIOCTL_AP_CONN_INACT_TIME            106
889 
890 #define AR6000_XIOCTL_AP_PROT_SCAN_TIME             107
891 
892 #define AR6000_XIOCTL_AP_SET_COUNTRY                108
893 
894 #define AR6000_XIOCTL_AP_SET_DTIM                   109
895 
896 
897 
898 
899 #define AR6000_XIOCTL_WMI_TARGET_EVENT_REPORT       110
900 
901 #define AR6000_XIOCTL_SET_IP                        111
902 
903 #define AR6000_XIOCTL_AP_SET_ACL_POLICY             112
904 
905 #define AR6000_XIOCTL_AP_INTRA_BSS_COMM             113
906 
907 #define AR6000_XIOCTL_DUMP_MODULE_DEBUG_INFO        114
908 
909 #define AR6000_XIOCTL_MODULE_DEBUG_SET_MASK         115
910 
911 #define AR6000_XIOCTL_MODULE_DEBUG_GET_MASK         116
912 
913 #define AR6000_XIOCTL_DUMP_RCV_AGGR_STATS           117
914 
915 #define AR6000_XIOCTL_SET_HT_CAP                    118
916 
917 #define AR6000_XIOCTL_SET_HT_OP                     119
918 
919 #define AR6000_XIOCTL_AP_GET_STAT                   120
920 
921 #define AR6000_XIOCTL_SET_TX_SELECT_RATES           121
922 
923 #define AR6000_XIOCTL_SETUP_AGGR                    122
924 
925 #define AR6000_XIOCTL_ALLOW_AGGR                    123
926 
927 #define AR6000_XIOCTL_AP_GET_HIDDEN_SSID            124
928 
929 #define AR6000_XIOCTL_AP_GET_COUNTRY                125
930 
931 #define AR6000_XIOCTL_AP_GET_WMODE                  126
932 
933 #define AR6000_XIOCTL_AP_GET_DTIM                   127
934 
935 #define AR6000_XIOCTL_AP_GET_BINTVL                 128
936 
937 #define AR6000_XIOCTL_AP_GET_RTS                    129
938 
939 #define AR6000_XIOCTL_DELE_AGGR                     130
940 
941 #define AR6000_XIOCTL_FETCH_TARGET_REGS             131
942 
943 #define AR6000_XIOCTL_HCI_CMD                       132
944 
945 #define AR6000_XIOCTL_ACL_DATA                      133
946 
947 #define AR6000_XIOCTL_WLAN_CONN_PRECEDENCE          134
948 
949 #define AR6000_XIOCTL_AP_SET_11BG_RATESET           135
950 
951 /*
952  * arguments:
953  *   WMI_AP_PS_CMD apPsCmd
954  * uses: WMI_AP_PS_CMDID
955  */
956 
957 #define AR6000_XIOCTL_WMI_SET_AP_PS                 136
958 
959 #define AR6000_XIOCTL_WMI_MCAST_FILTER              137
960 
961 #define AR6000_XIOCTL_WMI_SET_BTCOEX_FE_ANT					138
962 
963 #define AR6000_XIOCTL_WMI_SET_BTCOEX_COLOCATED_BT_DEV			139
964 
965 #define AR6000_XIOCTL_WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG 	140
966 
967 #define AR6000_XIOCTL_WMI_SET_BTCOEX_SCO_CONFIG				141
968 
969 #define AR6000_XIOCTL_WMI_SET_BTCOEX_A2DP_CONFIG				142
970 
971 #define AR6000_XIOCTL_WMI_SET_BTCOEX_ACLCOEX_CONFIG			143
972 
973 #define AR6000_XIOCTL_WMI_SET_BTCOEX_DEBUG						144
974 
975 #define AR6000_XIOCTL_WMI_SET_BT_OPERATING_STATUS   			145
976 
977 #define AR6000_XIOCTL_WMI_GET_BTCOEX_CONFIG					146
978 
979 #define AR6000_XIOCTL_WMI_GET_BTCOEX_STATS						147
980 /*
981  * arguments:
982  *   UINT32 cmd (AR6000_XIOCTL_WMI_SET_QOS_SUPP)
983  *   UINT8  mode
984  * uses: WMI_SET_QOS_SUPP_CMDID
985  */
986 #define AR6000_XIOCTL_WMI_SET_QOS_SUPP                  148
987 
988 #define AR6000_XIOCTL_GET_WLAN_SLEEP_STATE              149
989 
990 #define AR6000_XIOCTL_SET_BT_HW_POWER_STATE             150
991 
992 #define AR6000_XIOCTL_GET_BT_HW_POWER_STATE             151
993 
994 #define AR6000_XIOCTL_ADD_AP_INTERFACE                  152
995 
996 #define AR6000_XIOCTL_REMOVE_AP_INTERFACE               153
997 
998 #define AR6000_XIOCTL_WMI_SET_TX_SGI_PARAM              154
999 
1000 #define AR6000_XIOCTL_WMI_SET_EXCESS_TX_RETRY_THRES     161
1001 
1002 /* used by AR6000_IOCTL_WMI_GETREV */
1003 struct ar6000_version {
1004     u32 host_ver;
1005     u32 target_ver;
1006     u32 wlan_ver;
1007     u32 abi_ver;
1008 };
1009 
1010 /* used by AR6000_IOCTL_WMI_GET_QOS_QUEUE */
1011 struct ar6000_queuereq {
1012     u8 trafficClass;
1013     u16 activeTsids;
1014 };
1015 
1016 /* used by AR6000_IOCTL_WMI_GET_TARGET_STATS */
1017 typedef struct targetStats_t {
1018     u64 tx_packets;
1019     u64 tx_bytes;
1020     u64 tx_unicast_pkts;
1021     u64 tx_unicast_bytes;
1022     u64 tx_multicast_pkts;
1023     u64 tx_multicast_bytes;
1024     u64 tx_broadcast_pkts;
1025     u64 tx_broadcast_bytes;
1026     u64 tx_rts_success_cnt;
1027     u64 tx_packet_per_ac[4];
1028 
1029     u64 tx_errors;
1030     u64 tx_failed_cnt;
1031     u64 tx_retry_cnt;
1032     u64 tx_mult_retry_cnt;
1033     u64 tx_rts_fail_cnt;
1034 
1035     u64 rx_packets;
1036     u64 rx_bytes;
1037     u64 rx_unicast_pkts;
1038     u64 rx_unicast_bytes;
1039     u64 rx_multicast_pkts;
1040     u64 rx_multicast_bytes;
1041     u64 rx_broadcast_pkts;
1042     u64 rx_broadcast_bytes;
1043     u64 rx_fragment_pkt;
1044 
1045     u64 rx_errors;
1046     u64 rx_crcerr;
1047     u64 rx_key_cache_miss;
1048     u64 rx_decrypt_err;
1049     u64 rx_duplicate_frames;
1050 
1051     u64 tkip_local_mic_failure;
1052     u64 tkip_counter_measures_invoked;
1053     u64 tkip_replays;
1054     u64 tkip_format_errors;
1055     u64 ccmp_format_errors;
1056     u64 ccmp_replays;
1057 
1058     u64 power_save_failure_cnt;
1059 
1060     u64 cs_bmiss_cnt;
1061     u64 cs_lowRssi_cnt;
1062     u64 cs_connect_cnt;
1063     u64 cs_disconnect_cnt;
1064 
1065     s32 tx_unicast_rate;
1066     s32 rx_unicast_rate;
1067 
1068     u32 lq_val;
1069 
1070     u32 wow_num_pkts_dropped;
1071     u16 wow_num_events_discarded;
1072 
1073     s16 noise_floor_calibation;
1074     s16 cs_rssi;
1075     s16 cs_aveBeacon_rssi;
1076     u8 cs_aveBeacon_snr;
1077     u8 cs_lastRoam_msec;
1078     u8 cs_snr;
1079 
1080     u8 wow_num_host_pkt_wakeups;
1081     u8 wow_num_host_event_wakeups;
1082 
1083     u32 arp_received;
1084     u32 arp_matched;
1085     u32 arp_replied;
1086 }TARGET_STATS;
1087 
1088 typedef struct targetStats_cmd_t {
1089     TARGET_STATS targetStats;
1090     int clearStats;
1091 } TARGET_STATS_CMD;
1092 
1093 /* used by AR6000_XIOCTL_USER_SETKEYS */
1094 
1095 /*
1096  * Setting this bit to 1 doesnot initialize the RSC on the firmware
1097  */
1098 #define AR6000_XIOCTL_USER_SETKEYS_RSC_CTRL    1
1099 #define AR6000_USER_SETKEYS_RSC_UNCHANGED     0x00000002
1100 
1101 struct ar6000_user_setkeys_info {
1102     u32 keyOpCtrl;  /* Bit Map of Key Mgmt Ctrl Flags */
1103 }; /* XXX: unused !? */
1104 
1105 /* used by AR6000_XIOCTL_GPIO_OUTPUT_SET */
1106 struct ar6000_gpio_output_set_cmd_s {
1107     u32 set_mask;
1108     u32 clear_mask;
1109     u32 enable_mask;
1110     u32 disable_mask;
1111 };
1112 
1113 /*
1114  * used by AR6000_XIOCTL_GPIO_REGISTER_GET and AR6000_XIOCTL_GPIO_REGISTER_SET
1115  */
1116 struct ar6000_gpio_register_cmd_s {
1117     u32 gpioreg_id;
1118     u32 value;
1119 };
1120 
1121 /* used by AR6000_XIOCTL_GPIO_INTR_ACK */
1122 struct ar6000_gpio_intr_ack_cmd_s {
1123     u32 ack_mask;
1124 };
1125 
1126 /* used by AR6000_XIOCTL_GPIO_INTR_WAIT */
1127 struct ar6000_gpio_intr_wait_cmd_s {
1128     u32 intr_mask;
1129     u32 input_values;
1130 };
1131 
1132 /* used by the AR6000_XIOCTL_DBGLOG_CFG_MODULE */
1133 typedef struct ar6000_dbglog_module_config_s {
1134     u32 valid;
1135     u16 mmask;
1136     u16 tsr;
1137     u32   rep;
1138     u16 size;
1139 } DBGLOG_MODULE_CONFIG;
1140 
1141 typedef struct user_rssi_thold_t {
1142     s16 tag;
1143     s16 rssi;
1144 } USER_RSSI_THOLD;
1145 
1146 typedef struct user_rssi_params_t {
1147     u8 weight;
1148     u32 pollTime;
1149     USER_RSSI_THOLD    tholds[12];
1150 } USER_RSSI_PARAMS;
1151 
1152 typedef struct ar6000_get_btcoex_config_cmd_t{
1153 	u32 btProfileType;
1154 	u32 linkId;
1155  }AR6000_GET_BTCOEX_CONFIG_CMD;
1156 
1157 typedef struct ar6000_btcoex_config_t {
1158     AR6000_GET_BTCOEX_CONFIG_CMD  configCmd;
1159     u32 *configEvent;
1160 } AR6000_BTCOEX_CONFIG;
1161 
1162 typedef struct ar6000_btcoex_stats_t {
1163     u32 *statsEvent;
1164  }AR6000_BTCOEX_STATS;
1165 /*
1166  * Host driver may have some config parameters. Typically, these
1167  * config params are one time config parameters. These could
1168  * correspond to any of the underlying modules. Host driver exposes
1169  * an api for the underlying modules to get this config.
1170  */
1171 #define AR6000_DRIVER_CFG_BASE                  0x8000
1172 
1173 /* Should driver perform wlan node caching? */
1174 #define AR6000_DRIVER_CFG_GET_WLANNODECACHING   0x8001
1175 /*Should we log raw WMI msgs */
1176 #define AR6000_DRIVER_CFG_LOG_RAW_WMI_MSGS      0x8002
1177 
1178 /* used by AR6000_XIOCTL_DIAG_READ & AR6000_XIOCTL_DIAG_WRITE */
1179 struct ar6000_diag_window_cmd_s {
1180     unsigned int addr;
1181     unsigned int value;
1182 };
1183 
1184 
1185 struct ar6000_traffic_activity_change {
1186     u32 StreamID;   /* stream ID to indicate activity change */
1187     u32 Active;     /* active (1) or inactive (0) */
1188 };
1189 
1190 /* Used with AR6000_XIOCTL_PROF_COUNT_GET */
1191 struct prof_count_s {
1192     u32 addr;       /* bin start address */
1193     u32 count;      /* hit count */
1194 };
1195 
1196 
1197 /* used by AR6000_XIOCTL_MODULE_DEBUG_SET_MASK */
1198 /*         AR6000_XIOCTL_MODULE_DEBUG_GET_MASK */
1199 /*         AR6000_XIOCTL_DUMP_MODULE_DEBUG_INFO */
1200 struct drv_debug_module_s {
1201     char modulename[128];   /* name of module */
1202     u32 mask;              /* new mask to set .. or .. current mask */
1203 };
1204 
1205 
1206 /* All HCI related rx events are sent up to the host app
1207  * via a wmi event id. It can contain ACL data or HCI event,
1208  * based on which it will be de-multiplexed.
1209  */
1210 typedef enum {
1211     PAL_HCI_EVENT = 0,
1212     PAL_HCI_RX_DATA,
1213 } WMI_PAL_EVENT_INFO;
1214 
1215 
1216 #ifdef __cplusplus
1217 }
1218 #endif
1219 #endif
1220