blob: 037ad42950507aa7bda19f9ded7ee2854bf5cc00 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
2 * Copyright (c) 2011, 2014-2015 The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28#ifndef CDS_IEEE80211_DEFINES_H_
29#define CDS_IEEE80211_DEFINES_H_
30
31#include "cds_ieee80211_common.h"
32
33/*
34 * Public defines for Atheros Upper MAC Layer
35 */
36
37/**
38 * @brief Opaque handle of 802.11 protocal layer.
39 */
40struct ieee80211com;
41typedef struct ieee80211com *wlan_dev_t;
42
43/**
44 * @brief Opaque handle to App IE module.
45 */
46struct wlan_mlme_app_ie;
47typedef struct wlan_mlme_app_ie *wlan_mlme_app_ie_t;
48
49/**
50 * @brief Opaque handle of network instance (vap) in 802.11 protocal layer.
51 */
52struct ieee80211vap;
53typedef struct ieee80211vap *wlan_if_t;
54
55struct ieee80211vapprofile;
56typedef struct ieee80211vapprofile *wlan_if_info_t;
57
58/**
59 * @brief Opaque handle of a node in the wifi network.
60 */
61struct ieee80211_node;
62typedef struct ieee80211_node *wlan_node_t;
63
64/**
65 * @brief Opaque handle of OS interface (ifp in the case of unix ).
66 */
67struct _os_if_t;
68typedef struct _os_if_t *os_if_t;
69
70/**
71 *
72 * @brief Opaque handle.
73 */
74typedef void *os_handle_t;
75
76/**
77 * @brief Opaque handle of a channel.
78 */
79struct ieee80211_channel;
80typedef struct ieee80211_channel *wlan_chan_t;
81
82/**
83 * @brief Opaque handle scan_entry.
84 */
85struct ieee80211_scan_entry;
86typedef struct ieee80211_scan_entry *wlan_scan_entry_t;
87
88/* AoW related defines */
89#define AOW_MAX_RECEIVER_COUNT 10
90
91#define IEEE80211_NWID_LEN 32
92#define IEEE80211_ISO_COUNTRY_LENGTH 3 /* length of 11d ISO country string */
93
94typedef struct _ieee80211_ssid {
95 int len;
96 uint8_t ssid[IEEE80211_NWID_LEN];
97} ieee80211_ssid;
98
99typedef struct ieee80211_tx_status {
100 int ts_flags;
101#define IEEE80211_TX_ERROR 0x01
102#define IEEE80211_TX_XRETRY 0x02
103
104 int ts_retries; /* number of retries to successfully transmit this frame */
105#ifdef ATH_SUPPORT_TxBF
106 uint8_t ts_txbfstatus;
107#define AR_BW_Mismatch 0x1
108#define AR_Stream_Miss 0x2
109#define AR_CV_Missed 0x4
110#define AR_Dest_Miss 0x8
111#define AR_Expired 0x10
112#define AR_TxBF_Valid_HW_Status (AR_BW_Mismatch|AR_Stream_Miss|AR_CV_Missed|AR_Dest_Miss|AR_Expired)
113#define TxBF_STATUS_Sounding_Complete 0x20
114#define TxBF_STATUS_Sounding_Request 0x40
115#define TxBF_Valid_SW_Status (TxBF_STATUS_Sounding_Complete | TxBF_STATUS_Sounding_Request)
116#define TxBF_Valid_Status (AR_TxBF_Valid_HW_Status | TxBF_Valid_SW_Status)
117 uint32_t ts_tstamp; /* tx time stamp */
118#endif
119#ifdef ATH_SUPPORT_FLOWMAC_MODULE
120 uint8_t ts_flowmac_flags;
121#define IEEE80211_TX_FLOWMAC_DONE 0x01
122#endif
123 uint32_t ts_rateKbps;
124} ieee80211_xmit_status;
125
126#ifndef EXTERNAL_USE_ONLY
127typedef struct ieee80211_rx_status {
128 int rs_numchains;
129 int rs_flags;
130#define IEEE80211_RX_FCS_ERROR 0x01
131#define IEEE80211_RX_MIC_ERROR 0x02
132#define IEEE80211_RX_DECRYPT_ERROR 0x04
133/* holes in flags here between, ATH_RX_XXXX to IEEE80211_RX_XXX */
134#define IEEE80211_RX_KEYMISS 0x200
135 int rs_rssi; /* RSSI (noise floor ajusted) */
136 int rs_abs_rssi; /* absolute RSSI */
137 int rs_datarate; /* data rate received */
138 int rs_rateieee;
139 int rs_ratephy;
140
141#define IEEE80211_MAX_ANTENNA 3 /* Keep the same as ATH_MAX_ANTENNA */
142 uint8_t rs_rssictl[IEEE80211_MAX_ANTENNA]; /* RSSI (noise floor ajusted) */
143 uint8_t rs_rssiextn[IEEE80211_MAX_ANTENNA]; /* RSSI (noise floor ajusted) */
144 uint8_t rs_isvalidrssi; /* rs_rssi is valid or not */
145
146 enum ieee80211_phymode rs_phymode;
147 int rs_freq;
148
149 union {
150 uint8_t data[8];
151 uint64_t tsf;
152 } rs_tstamp;
153
154 /*
155 * Detail channel structure of recv frame.
156 * It could be NULL if not available
157 */
158 struct ieee80211_channel *rs_full_chan;
159
160 uint8_t rs_isaggr;
161 uint8_t rs_isapsd;
162 int16_t rs_noisefloor;
163 uint16_t rs_channel;
164#ifdef ATH_SUPPORT_TxBF
165 uint32_t rs_rpttstamp; /* txbf report time stamp */
166#endif
167
168 /* The following counts are meant to assist in stats calculation.
169 These variables are incremented only in specific situations, and
170 should not be relied upon for any purpose other than the original
171 stats related purpose they have been introduced for. */
172
173 uint16_t rs_cryptodecapcount; /* Crypto bytes decapped/demic'ed. */
174 uint8_t rs_padspace; /* No. of padding bytes present after header
175 in wbuf. */
176 uint8_t rs_qosdecapcount; /* QoS/HTC bytes decapped. */
177
178 /* End of stats calculation related counts. */
179
180 uint8_t rs_lsig[IEEE80211_LSIG_LEN];
181 uint8_t rs_htsig[IEEE80211_HTSIG_LEN];
182 uint8_t rs_servicebytes[IEEE80211_SB_LEN];
183
184} ieee80211_recv_status;
185#endif /* EXTERNAL_USE_ONLY */
186
187/*
188 * flags to be passed to ieee80211_vap_create function .
189 */
190#define IEEE80211_CLONE_BSSID 0x0001 /* allocate unique mac/bssid */
191#define IEEE80211_CLONE_NOBEACONS 0x0002 /* don't setup beacon timers */
192#define IEEE80211_CLONE_WDS 0x0004 /* enable WDS processing */
193#define IEEE80211_CLONE_WDSLEGACY 0x0008 /* legacy WDS operation */
194#define IEEE80211_PRIMARY_VAP 0x0010 /* primary vap */
195#define IEEE80211_P2PDEV_VAP 0x0020 /* p2pdev vap */
196#define IEEE80211_P2PGO_VAP 0x0040 /* p2p-go vap */
197#define IEEE80211_P2PCLI_VAP 0x0080 /* p2p-client vap */
198#define IEEE80211_CLONE_MACADDR 0x0100 /* create vap w/ specified mac/bssid */
199#define IEEE80211_CLONE_MATADDR 0x0200 /* create vap w/ specified MAT addr */
200#define IEEE80211_WRAP_VAP 0x0400 /* wireless repeater ap vap */
201
202/*
203 * For the new multi-vap scan feature, there is a set of default priority tables
204 * for each OpMode.
205 * The following are the default list of the VAP Scan Priority Mapping based on OpModes.
206 * NOTE: the following are only used when "#if ATH_SUPPORT_MULTIPLE_SCANS" is true.
207 */
208/* For IBSS opmode */
209#define DEF_VAP_SCAN_PRI_MAP_OPMODE_IBSS_BASE 0
210/* For STA opmode */
211#define DEF_VAP_SCAN_PRI_MAP_OPMODE_STA_BASE 0
212#define DEF_VAP_SCAN_PRI_MAP_OPMODE_STA_P2P_CLIENT 1
213/* For HostAp opmode */
214#define DEF_VAP_SCAN_PRI_MAP_OPMODE_AP_BASE 0
215#define DEF_VAP_SCAN_PRI_MAP_OPMODE_AP_P2P_GO 1
216#define DEF_VAP_SCAN_PRI_MAP_OPMODE_AP_P2P_DEVICE 2
217/* For BTAmp opmode */
218#define DEF_VAP_SCAN_PRI_MAP_OPMODE_BTAMP_BASE 0
219
220typedef enum _ieee80211_dev_vap_event {
221 IEEE80211_VAP_CREATED = 1,
222 IEEE80211_VAP_STOPPED,
223 IEEE80211_VAP_DELETED
224} ieee80211_dev_vap_event;
225
226typedef struct _wlan_dev_event_handler_table {
227 void (*wlan_dev_vap_event)(void *event_arg, wlan_dev_t, os_if_t, ieee80211_dev_vap_event); /* callback to receive vap events */
228#ifdef ATH_SUPPORT_SPECTRAL
229 void (*wlan_dev_spectral_indicate)(void *, void *, uint32_t);
230#endif
231} wlan_dev_event_handler_table;
232
233typedef enum _ieee80211_ap_stopped_reason {
234 IEEE80211_AP_STOPPED_REASON_DUMMY = 0, /* Dummy placeholder. Should not use */
235 IEEE80211_AP_STOPPED_REASON_CHANNEL_DFS = 1,
236} ieee80211_ap_stopped_reason;
237
238typedef int IEEE80211_REASON_CODE;
239typedef int IEEE80211_STATUS;
240
241/*
242 * scan API related structs.
243 */
244typedef enum _ieee80211_scan_type {
245 IEEE80211_SCAN_BACKGROUND,
246 IEEE80211_SCAN_FOREGROUND,
247 IEEE80211_SCAN_SPECTRAL,
248 IEEE80211_SCAN_REPEATER_BACKGROUND,
249 IEEE80211_SCAN_REPEATER_EXT_BACKGROUND,
250 IEEE80211_SCAN_RADIO_MEASUREMENTS,
251} ieee80211_scan_type;
252
253/*
254 * Priority numbers must be sequential, starting with 0.
255 */
256typedef enum ieee80211_scan_priority_t {
257 IEEE80211_SCAN_PRIORITY_VERY_LOW = 0,
258 IEEE80211_SCAN_PRIORITY_LOW,
259 IEEE80211_SCAN_PRIORITY_MEDIUM,
260 IEEE80211_SCAN_PRIORITY_HIGH,
261 IEEE80211_SCAN_PRIORITY_VERY_HIGH,
262
263 IEEE80211_SCAN_PRIORITY_COUNT /* number of priorities supported */
264} IEEE80211_SCAN_PRIORITY;
265
266typedef uint16_t IEEE80211_SCAN_REQUESTOR;
267typedef uint32_t IEEE80211_SCAN_ID;
268
269#define IEEE80211_SCAN_ID_NONE 0
270
271/* All P2P scans currently use medium priority */
272#define IEEE80211_P2P_DEFAULT_SCAN_PRIORITY IEEE80211_SCAN_PRIORITY_MEDIUM
273#define IEEE80211_P2P_SCAN_PRIORITY_HIGH IEEE80211_SCAN_PRIORITY_HIGH
274
275/* Masks identifying types/ID of scans */
276#define IEEE80211_SPECIFIC_SCAN 0x00000000
277#define IEEE80211_VAP_SCAN 0x01000000
278#define IEEE80211_ALL_SCANS 0x04000000
279
280/**
281 * host scan bit. only relevant for host/target architecture.
282 * do not reuse this bit definition. target uses this .
283 *
284 */
285#define IEEE80211_HOST_SCAN 0x80000000
286#define IEEE80211_SCAN_CLASS_MASK 0xFF000000
287
288#define IEEE80211_SCAN_PASSIVE 0x0001 /* passively scan all the channels */
289#define IEEE80211_SCAN_ACTIVE 0x0002 /* actively scan all the channels (regdomain rules still apply) */
290#define IEEE80211_SCAN_2GHZ 0x0004 /* scan 2GHz band */
291#define IEEE80211_SCAN_5GHZ 0x0008 /* scan 5GHz band */
292#define IEEE80211_SCAN_ALLBANDS (IEEE80211_SCAN_5GHZ | IEEE80211_SCAN_2GHZ)
293#define IEEE80211_SCAN_CONTINUOUS 0x0010 /* keep scanning until maxscantime expires */
294#define IEEE80211_SCAN_FORCED 0x0020 /* forced scan (OS request) - should proceed even in the presence of data traffic */
295#define IEEE80211_SCAN_NOW 0x0040 /* scan now (User request) - should proceed even in the presence of data traffic */
296#define IEEE80211_SCAN_ADD_BCAST_PROBE 0x0080 /* add wildcard ssid and broadcast probe request if there is none */
297#define IEEE80211_SCAN_EXTERNAL 0x0100 /* scan requested by OS */
298#define IEEE80211_SCAN_BURST 0x0200 /* scan multiple channels before returning to BSS channel */
299#define IEEE80211_SCAN_CHAN_EVENT 0x0400 /* scan chan event for offload architectures */
300#define IEEE80211_SCAN_FILTER_PROBE_REQ 0x0800 /* Filter probe requests- applicable only for offload architectures */
301
302#define IEEE80211_SCAN_PARAMS_MAX_SSID 10
303#define IEEE80211_SCAN_PARAMS_MAX_BSSID 10
304
305/* flag definitions passed to scan_cancel API */
306
307#define IEEE80211_SCAN_CANCEL_ASYNC 0x0 /* asynchronouly wait for scan SM to complete cancel */
308#define IEEE80211_SCAN_CANCEL_WAIT 0x1 /* wait for scan SM to complete cancel */
309#define IEEE80211_SCAN_CANCEL_SYNC 0x2 /* synchronously execute cancel scan */
310
311#ifndef EXTERNAL_USE_ONLY
312typedef bool (*ieee80211_scan_termination_check)(void *arg);
313
314typedef struct _ieee80211_scan_params {
315 ieee80211_scan_type type;
316 int min_dwell_time_active; /* min time in msec on active channels */
317 int max_dwell_time_active; /* max time in msec on active channels (if no response) */
318 int min_dwell_time_passive; /* min time in msec on passive channels */
319 int max_dwell_time_passive; /* max time in msec on passive channels (if no response) */
320 int min_rest_time; /* min time in msec on the BSS channel, only valid for BG scan */
321 int max_rest_time; /* max time in msec on the BSS channel, only valid for BG scan */
322 int max_offchannel_time; /* max time away from BSS channel, in ms */
323 int repeat_probe_time; /* time before sending second probe request */
324 int idle_time; /* time in msec on bss channel before switching channel */
325 int max_scan_time; /* maximum time in msec allowed for scan */
326 int probe_delay; /* delay in msec before sending probe request */
327 int offchan_retry_delay; /* delay in msec before retrying off-channel switch */
328 int min_beacon_count; /* number of home AP beacons to receive before leaving the home channel */
329 int max_offchan_retries; /* maximum number of times to retry off-channel switch */
330 int beacon_timeout; /* maximum time to wait for beacons */
331 int flags; /* scan flags */
332 int num_channels; /* number of channels to scan */
333 bool multiple_ports_active; /* driver has multiple ports active in the home channel */
334 bool restricted_scan; /* Perform restricted scan */
335 bool chan_list_allocated;
336 IEEE80211_SCAN_PRIORITY p2p_scan_priority; /* indicates the scan priority if this is a P2P-related scan */
337 uint32_t *chan_list; /* array of ieee channels (or) frequencies to scan */
338 int num_ssid; /* number of desired ssids */
339 ieee80211_ssid ssid_list[IEEE80211_SCAN_PARAMS_MAX_SSID];
340 int num_bssid; /* number of desired bssids */
341 uint8_t bssid_list[IEEE80211_SCAN_PARAMS_MAX_BSSID][IEEE80211_ADDR_LEN];
342 struct ieee80211_node *bss_node; /* BSS node */
343 int ie_len; /* length of the ie data to be added to probe req */
344 uint8_t *ie_data; /* pointer to ie data */
345 ieee80211_scan_termination_check check_termination_function; /* function checking for termination condition */
346 void *check_termination_context; /* context passed to function above */
347} ieee80211_scan_params;
348
349/* Data types used to specify scan priorities */
350typedef uint32_t IEEE80211_PRIORITY_MAPPING[IEEE80211_SCAN_PRIORITY_COUNT];
351
352/**************************************
353 * Called before attempting to roam. Modifies the rssiAdder of a BSS
354 * based on the preferred status of a BSS.
355 *
356 * According to CCX spec, AP in the neighbor list is not meant for giving extra
357 * weightage in roaming. By doing so, roaming becomes sticky. See bug 21220.
358 * Change the weightage to 0. Cisco may ask in future for a user control of
359 * this weightage.
360 */
361#define PREFERRED_BSS_RANK 20
362#define NEIGHBOR_BSS_RANK 0 /* must be less than preferred BSS rank */
363
364/*
365 * The utility of the BSS is the metric used in the selection
366 * of a BSS. The Utility of the BSS is reduced if we just left the BSS.
367 * The Utility of the BSS is not reduced if we have left the
368 * BSS for 8 seconds (8000ms) or more.
369 * 2^13 milliseconds is a close approximation to avoid expensive division
370 */
371#define LAST_ASSOC_TIME_DELTA_REQUIREMENT (1 << 13) /* 8192 */
372
373#define QBSS_SCALE_MAX 255 /* Qbss channel load Max value */
374#define QBSS_SCALE_DOWN_FACTOR 2 /* scale factor to reduce Qbss channel load */
375#define QBSS_HYST_ADJ 60 /* Qbss Weightage factor for the current AP */
376
377/*
378 * Flags used to set field APState
379 */
380#define AP_STATE_GOOD 0x00
381#define AP_STATE_BAD 0x01
382#define AP_STATE_RETRY 0x10
383#define BAD_AP_TIMEOUT 6000 /* In milli seconds */
384/*
385 * To disable BAD_AP status check on any scan entry
386 */
387#define BAD_AP_TIMEOUT_DISABLED 0
388
389/*
390 * BAD_AP timeout specified in seconds
391 */
392#define BAD_AP_TIMEOUT_IN_SECONDS 10
393
394/*
395 * State values used to represent our assoc_state with ap (discrete, not bitmasks)
396 */
397#define AP_ASSOC_STATE_NONE 0
398#define AP_ASSOC_STATE_AUTH 1
399#define AP_ASSOC_STATE_ASSOC 2
400
401/*
402 * Entries in the scan list are considered obsolete after 75 seconds.
403 */
404#define IEEE80211_SCAN_ENTRY_EXPIRE_TIME 75000
405
406/*
407 * idle time is only valid for scan type IEEE80211_SCAN_BACKGROUND.
408 * if idle time is set then the scanner would change channel from BSS
409 * channel to foreign channel only if both resttime is expired and
410 * the theres was not traffic for idletime msec on the bss channel.
411 * value of 0 for idletime would cause the channel to switch from BSS
412 * channel to foreign channel as soon as the resttime is expired.
413 *
414 * if maxscantime is nonzero and if the scanner can not complete the
415 * scan in maxscantime msec then the scanner will cancel the scan and
416 * post IEEE80211_SCAN_COMPLETED event with reason SCAN_TIMEDOUT.
417 *
418 */
419
420/*
421 * chanlist can be either ieee channels (or) frequencies.
422 * if a value is less than 1000 implementation assumes it
423 * as ieee channel # otherwise implementation assumes it
424 * as frequency in Mhz.
425 */
426
427typedef enum _ieee80211_scan_event_type {
428 IEEE80211_SCAN_STARTED,
429 IEEE80211_SCAN_COMPLETED,
430 IEEE80211_SCAN_RADIO_MEASUREMENT_START,
431 IEEE80211_SCAN_RADIO_MEASUREMENT_END,
432 IEEE80211_SCAN_RESTARTED,
433 IEEE80211_SCAN_HOME_CHANNEL,
434 IEEE80211_SCAN_FOREIGN_CHANNEL,
435 IEEE80211_SCAN_BSSID_MATCH,
436 IEEE80211_SCAN_FOREIGN_CHANNEL_GET_NF,
437 IEEE80211_SCAN_DEQUEUED,
438 IEEE80211_SCAN_PREEMPTED,
439
440 IEEE80211_SCAN_EVENT_COUNT
441} ieee80211_scan_event_type;
442
443typedef enum ieee80211_scan_completion_reason {
444 IEEE80211_REASON_NONE,
445 IEEE80211_REASON_COMPLETED,
446 IEEE80211_REASON_CANCELLED,
447 IEEE80211_REASON_TIMEDOUT,
448 IEEE80211_REASON_TERMINATION_FUNCTION,
449 IEEE80211_REASON_MAX_OFFCHAN_RETRIES,
450 IEEE80211_REASON_PREEMPTED,
451 IEEE80211_REASON_RUN_FAILED,
452 IEEE80211_REASON_INTERNAL_STOP,
453
454 IEEE80211_REASON_COUNT
455} ieee80211_scan_completion_reason;
456
457typedef struct _ieee80211_scan_event {
458 ieee80211_scan_event_type type;
459 ieee80211_scan_completion_reason reason;
460 wlan_chan_t chan;
461 IEEE80211_SCAN_REQUESTOR requestor; /* Requestor ID passed to the scan_start function */
462 IEEE80211_SCAN_ID scan_id; /* Specific ID of the scan reporting the event */
463} ieee80211_scan_event;
464
465typedef enum _ieee80211_scan_request_status {
466 IEEE80211_SCAN_STATUS_QUEUED,
467 IEEE80211_SCAN_STATUS_RUNNING,
468 IEEE80211_SCAN_STATUS_PREEMPTED,
469 IEEE80211_SCAN_STATUS_COMPLETED
470} ieee80211_scan_request_status;
471
472/*
473 * the sentry field of tht ieee80211_scan_event is only valid if the
474 * event type is IEEE80211_SCAN_BSSID_MATCH.
475 */
476
477typedef void (*ieee80211_scan_event_handler)(wlan_if_t vaphandle,
478 ieee80211_scan_event *event,
479 void *arg);
480
481typedef struct _ieee80211_scan_info {
482 ieee80211_scan_type type;
483 IEEE80211_SCAN_REQUESTOR requestor; /* Originator ID passed to the scan_start function */
484 IEEE80211_SCAN_ID scan_id; /* Specific ID of the scan reporting the event */
485 IEEE80211_SCAN_PRIORITY priority; /* Requested priority level (low/medium/high) */
486 ieee80211_scan_request_status scheduling_status; /* Queued/running/preempted/completed */
487 int min_dwell_time_active; /* min time in msec on active channels */
488 int max_dwell_time_active; /* max time in msec on active channel (if no response) */
489 int min_dwell_time_passive; /* min time in msec on passive channels */
490 int max_dwell_time_passive; /* max time in msec on passive channel */
491 int min_rest_time; /* min time in msec on the BSS channel, only valid for BG scan */
492 int max_rest_time; /* max time in msec on the BSS channel, only valid for BG scan */
493 int max_offchannel_time; /* max time away from BSS channel, in ms */
494 int repeat_probe_time; /* time before sending second probe request */
495 int min_beacon_count; /* number of home AP beacons to receive before leaving the home channel */
496 int flags; /* scan flags */
497 systime_t scan_start_time; /* system time when last scani started */
498 int scanned_channels; /* number of scanned channels */
499 int default_channel_list_length; /* number of channels in the default channel list */
500 int channel_list_length; /* number of channels in the channel list used for the current scan */
501 uint8_t in_progress : 1, /* if the scan is in progress */
502 cancelled : 1, /* if the scan is cancelled */
503 preempted : 1, /* if the scan is preempted */
504 restricted : 1; /* if the scan is restricted */
505} ieee80211_scan_info;
506
507typedef struct _ieee80211_scan_request_info {
508 wlan_if_t vaphandle;
509 IEEE80211_SCAN_REQUESTOR requestor;
510 IEEE80211_SCAN_PRIORITY requested_priority;
511 IEEE80211_SCAN_PRIORITY absolute_priority;
512 IEEE80211_SCAN_ID scan_id;
513 ieee80211_scan_request_status scheduling_status;
514 ieee80211_scan_params params;
515 systime_t request_timestamp;
516 uint32_t maximum_duration;
517} ieee80211_scan_request_info;
518
519#endif /* EXTERNAL_USE_ONLY */
520
521#ifndef EXTERNAL_USE_ONLY
522typedef void (*ieee80211_acs_event_handler)(void *arg, wlan_chan_t channel);
523#endif /* EXTERNAL_USE_ONLY */
524
525#define MAX_CHAINS 3
526
527typedef struct _wlan_rssi_info {
528 int8_t avg_rssi; /* average rssi */
529 uint8_t valid_mask; /* bitmap of valid elements in rssi_ctrl/ext array */
530 int8_t rssi_ctrl[MAX_CHAINS];
531 int8_t rssi_ext[MAX_CHAINS];
532} wlan_rssi_info;
533
534typedef enum _wlan_rssi_type {
535 WLAN_RSSI_TX,
536 WLAN_RSSI_RX,
537 WLAN_RSSI_BEACON, /* rssi of the beacon, only valid for STA/IBSS vap */
538 WLAN_RSSI_RX_DATA
539} wlan_rssi_type;
540
541typedef enum _ieee80211_rate_type {
542 IEEE80211_RATE_TYPE_LEGACY,
543 IEEE80211_RATE_TYPE_MCS,
544} ieee80211_rate_type;
545
546typedef struct _ieee80211_rate_info {
547 ieee80211_rate_type type;
548 uint32_t rate; /* average rate in kbps */
549 uint32_t lastrate; /* last packet rate in kbps */
550 uint8_t mcs; /* mcs index . is valid if rate type is MCS20 or MCS40 */
551 uint8_t maxrate_per_client;
552} ieee80211_rate_info;
553
554typedef enum _ieee80211_node_param_type {
555 IEEE80211_NODE_PARAM_TX_POWER,
556 IEEE80211_NODE_PARAM_ASSOCID,
557 IEEE80211_NODE_PARAM_INACT, /* inactivity timer value */
558 IEEE80211_NODE_PARAM_AUTH_MODE, /* auth mode */
559 IEEE80211_NODE_PARAM_CAP_INFO, /* auth mode */
560} ieee80211_node_param_type;
561
562/*
563 * Per/node (station) statistics available when operating as an AP.
564 */
565struct ieee80211_nodestats {
566 uint32_t ns_rx_data; /* rx data frames */
567 uint32_t ns_rx_mgmt; /* rx management frames */
568 uint32_t ns_rx_ctrl; /* rx control frames */
569 uint32_t ns_rx_ucast; /* rx unicast frames */
570 uint32_t ns_rx_mcast; /* rx multi/broadcast frames */
571 uint64_t ns_rx_bytes; /* rx data count (bytes) */
572 uint64_t ns_rx_beacons; /* rx beacon frames */
573 uint32_t ns_rx_proberesp; /* rx probe response frames */
574
575 uint32_t ns_rx_dup; /* rx discard 'cuz dup */
576 uint32_t ns_rx_noprivacy; /* rx w/ wep but privacy off */
577 uint32_t ns_rx_wepfail; /* rx wep processing failed */
578 uint32_t ns_rx_demicfail; /* rx demic failed */
579
580 /* We log MIC and decryption failures against Transmitter STA stats.
581 Though the frames may not actually be sent by STAs corresponding
582 to TA, the stats are still valuable for some customers as a sort
583 of rough indication.
584 Also note that the mapping from TA to STA may fail sometimes. */
585 uint32_t ns_rx_tkipmic; /* rx TKIP MIC failure */
586 uint32_t ns_rx_ccmpmic; /* rx CCMP MIC failure */
587 uint32_t ns_rx_wpimic; /* rx WAPI MIC failure */
588 uint32_t ns_rx_tkipicv; /* rx ICV check failed (TKIP) */
589 uint32_t ns_rx_decap; /* rx decapsulation failed */
590 uint32_t ns_rx_defrag; /* rx defragmentation failed */
591 uint32_t ns_rx_disassoc; /* rx disassociation */
592 uint32_t ns_rx_deauth; /* rx deauthentication */
593 uint32_t ns_rx_action; /* rx action */
594 uint32_t ns_rx_decryptcrc; /* rx decrypt failed on crc */
595 uint32_t ns_rx_unauth; /* rx on unauthorized port */
596 uint32_t ns_rx_unencrypted; /* rx unecrypted w/ privacy */
597
598 uint32_t ns_tx_data; /* tx data frames */
599 uint32_t ns_tx_data_success; /* tx data frames successfully
600 transmitted (unicast only) */
601 uint32_t ns_tx_mgmt; /* tx management frames */
602 uint32_t ns_tx_ucast; /* tx unicast frames */
603 uint32_t ns_tx_mcast; /* tx multi/broadcast frames */
604 uint64_t ns_tx_bytes; /* tx data count (bytes) */
605 uint64_t ns_tx_bytes_success; /* tx success data count - unicast only
606 (bytes) */
607 uint32_t ns_tx_probereq; /* tx probe request frames */
608 uint32_t ns_tx_uapsd; /* tx on uapsd queue */
609 uint32_t ns_tx_discard; /* tx dropped by NIC */
610
611 uint32_t ns_tx_novlantag; /* tx discard 'cuz no tag */
612 uint32_t ns_tx_vlanmismatch; /* tx discard 'cuz bad tag */
613
614 uint32_t ns_tx_eosplost; /* uapsd EOSP retried out */
615
616 uint32_t ns_ps_discard; /* ps discard 'cuz of age */
617
618 uint32_t ns_uapsd_triggers; /* uapsd triggers */
619 uint32_t ns_uapsd_duptriggers; /* uapsd duplicate triggers */
620 uint32_t ns_uapsd_ignoretriggers; /* uapsd duplicate triggers */
621 uint32_t ns_uapsd_active; /* uapsd duplicate triggers */
622 uint32_t ns_uapsd_triggerenabled; /* uapsd duplicate triggers */
623
624 /* MIB-related state */
625 uint32_t ns_tx_assoc; /* [re]associations */
626 uint32_t ns_tx_assoc_fail; /* [re]association failures */
627 uint32_t ns_tx_auth; /* [re]authentications */
628 uint32_t ns_tx_auth_fail; /* [re]authentication failures */
629 uint32_t ns_tx_deauth; /* deauthentications */
630 uint32_t ns_tx_deauth_code; /* last deauth reason */
631 uint32_t ns_tx_disassoc; /* disassociations */
632 uint32_t ns_tx_disassoc_code; /* last disassociation reason */
633 uint32_t ns_psq_drops; /* power save queue drops */
634};
635
636/*
637 * station power save mode.
638 */
639typedef enum ieee80211_psmode {
640 IEEE80211_PWRSAVE_NONE = 0, /* no power save */
641 IEEE80211_PWRSAVE_LOW,
642 IEEE80211_PWRSAVE_NORMAL,
643 IEEE80211_PWRSAVE_MAXIMUM,
644 IEEE80211_PWRSAVE_WNM /* WNM-Sleep Mode */
645} ieee80211_pwrsave_mode;
646
647/* station power save pspoll handling */
648typedef enum {
649 IEEE80211_CONTINUE_PSPOLL_FOR_MORE_DATA,
650 IEEE80211_WAKEUP_FOR_MORE_DATA,
651} ieee80211_pspoll_moredata_handling;
652
653/*
654 * apps power save state.
655 */
656typedef enum {
657 APPS_AWAKE = 0,
658 APPS_PENDING_SLEEP,
659 APPS_SLEEP,
660 APPS_FAKE_SLEEP, /* Pending blocking sleep */
661 APPS_FAKING_SLEEP, /* Blocking sleep */
662 APPS_UNKNOWN_PWRSAVE,
663} ieee80211_apps_pwrsave_state;
664
665typedef enum _iee80211_mimo_powersave_mode {
666 IEEE80211_MIMO_POWERSAVE_NONE, /* no mimo power save */
667 IEEE80211_MIMO_POWERSAVE_STATIC, /* static mimo power save */
668 IEEE80211_MIMO_POWERSAVE_DYNAMIC /* dynamic mimo powersave */
669} ieee80211_mimo_powersave_mode;
670
671#ifdef ATH_COALESCING
672typedef enum _ieee80211_coalescing_state {
673 IEEE80211_COALESCING_DISABLED = 0, /* Coalescing is disabled */
674 IEEE80211_COALESCING_DYNAMIC = 1, /* Dynamically move to Enabled state based on Uruns */
675 IEEE80211_COALESCING_ENABLED = 2, /* Coalescing is enabled */
676} ieee80211_coalescing_state;
677
678#define IEEE80211_TX_COALESCING_THRESHOLD 5 /* Number of underrun errors to trigger coalescing */
679#endif
680
681typedef enum _ieee80211_cap {
682 IEEE80211_CAP_SHSLOT, /* CAPABILITY: short slot */
683 IEEE80211_CAP_SHPREAMBLE, /* CAPABILITY: short premable */
684 IEEE80211_CAP_MULTI_DOMAIN, /* CAPABILITY: multiple domain */
685 IEEE80211_CAP_WMM, /* CAPABILITY: WMM */
686 IEEE80211_CAP_HT, /* CAPABILITY: HT */
687 IEEE80211_CAP_PERF_PWR_OFLD, /* CAPABILITY: power performance offload support */
688 IEEE80211_CAP_11AC, /* CAPABILITY: 11ac support */
689} ieee80211_cap;
690
691typedef enum _ieee80211_device_param {
692 IEEE80211_DEVICE_RSSI_CTL,
693 IEEE80211_DEVICE_NUM_TX_CHAIN,
694 IEEE80211_DEVICE_NUM_RX_CHAIN,
695 IEEE80211_DEVICE_TX_CHAIN_MASK,
696 IEEE80211_DEVICE_RX_CHAIN_MASK,
697 IEEE80211_DEVICE_TX_CHAIN_MASK_LEGACY,
698 IEEE80211_DEVICE_RX_CHAIN_MASK_LEGACY,
699 IEEE80211_DEVICE_BMISS_LIMIT, /* # of beacon misses for HW to generate BMISS intr */
700 IEEE80211_DEVICE_PROTECTION_MODE, /* protection mode */
701 IEEE80211_DEVICE_BLKDFSCHAN, /* block the use of DFS channels */
702 IEEE80211_DEVICE_GREEN_AP_PS_ENABLE,
703 IEEE80211_DEVICE_GREEN_AP_PS_TIMEOUT,
704 IEEE80211_DEVICE_GREEN_AP_PS_ON_TIME,
705 IEEE80211_DEVICE_CWM_EXTPROTMODE,
706 IEEE80211_DEVICE_CWM_EXTPROTSPACING,
707 IEEE80211_DEVICE_CWM_ENABLE,
708 IEEE80211_DEVICE_CWM_EXTBUSYTHRESHOLD,
709 IEEE80211_DEVICE_DOTH,
710 IEEE80211_DEVICE_ADDBA_MODE,
711 IEEE80211_DEVICE_COUNTRYCODE,
712 IEEE80211_DEVICE_MULTI_CHANNEL, /* turn on/off off channel support */
713 IEEE80211_DEVICE_MAX_AMSDU_SIZE, /* Size of AMSDU to be sent on the air */
714 IEEE80211_DEVICE_P2P, /* Enable or Disable P2P */
715 IEEE80211_DEVICE_OVERRIDE_SCAN_PROBERESPONSE_IE, /* Override scan Probe response IE, 0: Don't over-ride */
716 IEEE80211_DEVICE_2G_CSA,
717 IEEE80211_DEVICE_PWRTARGET,
718 IEEE80211_DEVICE_OFF_CHANNEL_SUPPORT,
719} ieee80211_device_param;
720
721typedef enum _ieee80211_param {
722 IEEE80211_BEACON_INTVAL, /* in TUs */
723 IEEE80211_LISTEN_INTVAL, /* number of beacons */
724 IEEE80211_DTIM_INTVAL, /* number of beacons */
725 IEEE80211_BMISS_COUNT_RESET, /* number of beacon miss intrs before reset */
726 IEEE80211_BMISS_COUNT_MAX, /* number of beacon miss intrs for bmiss notificationst */
727 IEEE80211_ATIM_WINDOW, /* ATIM window */
728 IEEE80211_SHORT_SLOT, /* short slot on/off */
729 IEEE80211_SHORT_PREAMBLE, /* short preamble on/off */
730 IEEE80211_RTS_THRESHOLD, /* rts threshold, 0 means no rts threshold */
731 IEEE80211_FRAG_THRESHOLD, /* fragmentation threshold, 0 means no rts threshold */
732 IEEE80211_FIXED_RATE, /*
733 * rate code series(0: auto rate, 32 bit value: rate
734 * codes for 4 rate series. each byte for one rate series)
735 */
736 IEEE80211_MCAST_RATE, /* rate in Kbps */
737 IEEE80211_TXPOWER, /* in 0.5db units */
738 IEEE80211_AMPDU_DENCITY, /* AMPDU dencity */
739 IEEE80211_AMPDU_LIMIT, /* AMPDU limit */
740 IEEE80211_MAX_AMPDU, /* Max AMPDU Exp */
741 IEEE80211_VHT_MAX_AMPDU, /* VHT Max AMPDU Exp */
742 IEEE80211_WPS_MODE, /* WPS mode */
743 IEEE80211_TSN_MODE, /* TSN mode */
744 IEEE80211_MULTI_DOMAIN, /* Multiple domain */
745 IEEE80211_SAFE_MODE, /* Safe mode */
746 IEEE80211_NOBRIDGE_MODE, /* No bridging done, all frames sent up the stack */
747 IEEE80211_PERSTA_KEYTABLE_SIZE, /* IBSS-only, read-only: persta key table size */
748 IEEE80211_RECEIVE_80211, /* deliver std 802.11 frames 802.11 instead of ethernet frames on the rx */
749 IEEE80211_SEND_80211, /* OS sends std 802.11 frames 802.11 instead of ethernet frames on tx side */
750 IEEE80211_MIN_BEACON_COUNT, /* minumum number beacons to tx/rx before vap can pause */
751 IEEE80211_IDLE_TIME, /* minimun no activity time before vap can pause */
752 IEEE80211_MIN_FRAMESIZE, /* smallest frame size we are allowed to receive */
753 /* features. 0:feature is off. 1:feature is on. */
754 IEEE80211_FEATURE_WMM, /* WMM */
755 IEEE80211_FEATURE_WMM_PWRSAVE, /* WMM Power Save */
756 IEEE80211_FEATURE_UAPSD, /* UAPSD setting (BE/BK/VI/VO) */
757 IEEE80211_FEATURE_WDS, /* dynamic WDS feature */
758 IEEE80211_FEATURE_PRIVACY, /* encryption */
759 IEEE80211_FEATURE_DROP_UNENC, /* drop un encrypted frames */
760 IEEE80211_FEATURE_COUNTER_MEASURES, /* turn on couter measures */
761 IEEE80211_FEATURE_HIDE_SSID, /* turn on hide ssid feature */
762 IEEE80211_FEATURE_APBRIDGE, /* turn on internal mcast traffic bridging for AP */
763 IEEE80211_FEATURE_PUREB, /* turn on pure B mode for AP */
764 IEEE80211_FEATURE_PUREG, /* turn on pure G mode for AP */
765 IEEE80211_FEATURE_REGCLASS, /* add regulatory class IE in AP */
766 IEEE80211_FEATURE_COUNTRY_IE, /* add country IE for vap in AP */
767 IEEE80211_FEATURE_IC_COUNTRY_IE, /* add country IE for ic in AP */
768 IEEE80211_FEATURE_DOTH, /* enable 802.11h */
769 IEEE80211_FEATURE_PURE11N, /* enable pure 11n mode */
770 IEEE80211_FEATURE_PRIVATE_RSNIE, /* enable OS shim to setup RSN IE */
771 IEEE80211_FEATURE_COPY_BEACON, /* keep a copy of beacon */
772 IEEE80211_FEATURE_PSPOLL, /* enable/disable pspoll mode in power save SM */
773 IEEE80211_FEATURE_CONTINUE_PSPOLL_FOR_MOREDATA, /* enable/disable option to contunue sending ps polls when there is more data */
774 IEEE80211_FEATURE_AMPDU, /* Enable or Disable Aggregation */
775#ifdef ATH_COALESCING
776 IEEE80211_FEATURE_TX_COALESCING, /* enable tx coalescing */
777#endif
778 IEEE80211_FEATURE_VAP_IND, /* Repeater independant VAP */
779 IEEE80211_FIXED_RETRIES, /* fixed retries 0-4 */
780 IEEE80211_SHORT_GI, /* short gi on/off */
781 IEEE80211_HT40_INTOLERANT,
782 IEEE80211_CHWIDTH,
783 IEEE80211_CHEXTOFFSET,
784 IEEE80211_DISABLE_2040COEXIST,
785 IEEE80211_DISABLE_HTPROTECTION,
786 IEEE80211_STA_QUICKKICKOUT,
787 IEEE80211_CHSCANINIT,
788 IEEE80211_FEATURE_STAFWD, /* dynamic AP Client feature */
789 IEEE80211_DRIVER_CAPS,
790 IEEE80211_UAPSD_MAXSP, /* UAPSD service period setting (0:unlimited, 2,4,6) */
791 IEEE80211_WEP_MBSSID,
792 IEEE80211_MGMT_RATE, /* ieee rate to be used for management */
793 IEEE80211_RESMGR_VAP_AIR_TIME_LIMIT, /* When multi-channel enabled, restrict air-time allocated to a VAP */
794 IEEE80211_TDLS_MACADDR1, /* Upper 4 bytes of device's MAC address */
795 IEEE80211_TDLS_MACADDR2, /* Lower 2 bytes of device's MAC address */
796 IEEE80211_TDLS_ACTION, /* TDLS action requested */
797 IEEE80211_AUTO_ASSOC,
798 IEEE80211_PROTECTION_MODE, /* per VAP protection mode */
799 IEEE80211_AUTH_INACT_TIMEOUT, /* inactivity time while waiting for 802.11x auth to complete */
800 IEEE80211_INIT_INACT_TIMEOUT, /* inactivity time while waiting for 802.11 auth/assoc to complete */
801 IEEE80211_RUN_INACT_TIMEOUT, /* inactivity time when fully authed */
802 IEEE80211_PROBE_INACT_TIMEOUT, /* inactivity counter value below which starts probing */
803 IEEE80211_QBSS_LOAD,
804 IEEE80211_WNM_CAP,
805 IEEE80211_WNM_BSS_CAP,
806 IEEE80211_WNM_TFS_CAP,
807 IEEE80211_WNM_TIM_CAP,
808 IEEE80211_WNM_SLEEP_CAP,
809 IEEE80211_WNM_FMS_CAP,
810 IEEE80211_AP_REJECT_DFS_CHAN, /* AP to reject resuming on DFS Channel */
811 IEEE80211_ABOLT,
812 IEEE80211_COMP,
813 IEEE80211_FF,
814 IEEE80211_TURBO,
815 IEEE80211_BURST,
816 IEEE80211_AR,
817 IEEE80211_SLEEP,
818 IEEE80211_EOSPDROP,
819 IEEE80211_MARKDFS,
820 IEEE80211_WDS_AUTODETECT,
821 IEEE80211_WEP_TKIP_HT,
822 IEEE80211_ATH_RADIO,
823 IEEE80211_IGNORE_11DBEACON,
824 /* Video debug feature */
825 IEEE80211_VI_DBG_CFG, /* Video debug configuration - Bit0- enable dbg, Bit1 - enable stats log */
826 IEEE80211_VI_DBG_NUM_STREAMS, /* Total number of receive streams */
827 IEEE80211_VI_STREAM_NUM, /* the stream number whose marker parameters are being set */
828 IEEE80211_VI_DBG_NUM_MARKERS, /* total number of markers used to filter pkts */
829 IEEE80211_VI_MARKER_NUM, /* the marker number whose parameters (offset, size & match) are being set */
830 IEEE80211_VI_MARKER_OFFSET_SIZE, /* byte offset from skb start (upper 16 bits) & size in bytes(lower 16 bits) */
831 IEEE80211_VI_MARKER_MATCH, /* marker pattern match used in filtering */
832 IEEE80211_VI_RXSEQ_OFFSET_SIZE, /* Rx Seq num offset skb start (upper 16 bits) & size in bytes(lower 16 bits) */
833 IEEE80211_VI_RX_SEQ_RSHIFT, /* right-shift value in case field is not word aligned */
834 IEEE80211_VI_RX_SEQ_MAX, /* maximum Rx Seq number (to check wrap around) */
835 IEEE80211_VI_RX_SEQ_DROP, /* Indicator to the debug app that a particular seq num has been dropped */
836 IEEE80211_VI_TIME_OFFSET_SIZE, /* Timestamp offset skb start (upper 16 bits) & size in bytes(lower 16 bits) */
837 IEEE80211_VI_RESTART, /* If set to 1 resets all internal variables/counters & restarts debug tool */
838 IEEE80211_VI_RXDROP_STATUS, /* Total RX drops in wireless */
839 IEEE80211_TRIGGER_MLME_RESP, /* Option for App to trigger mlme response */
840#ifdef ATH_SUPPORT_TxBF
841 IEEE80211_TXBF_AUTO_CVUPDATE, /* auto CV update enable */
842 IEEE80211_TXBF_CVUPDATE_PER, /* per threshold to initial CV update */
843#endif
844 IEEE80211_MAX_CLIENT_NUMBERS,
845 IEEE80211_SMARTNET,
846 IEEE80211_FEATURE_MFP_TEST, /* MFP test */
847 IEEE80211_WEATHER_RADAR, /* weather radar channel skip */
848 IEEE80211_WEP_KEYCACHE, /* WEP KEYCACHE is enable */
849 IEEE80211_SEND_DEAUTH, /* send deauth instead of disassoc while doing interface down */
850 IEEE80211_SET_TXPWRADJUST,
851 IEEE80211_RRM_CAP,
852 IEEE80211_RRM_DEBUG,
853 IEEE80211_RRM_STATS,
854 IEEE80211_RRM_SLWINDOW,
855 IEEE80211_FEATURE_OFF_CHANNEL_SUPPORT,
856 IEEE80211_FIXED_VHT_MCS, /* VHT mcs index */
857 IEEE80211_FIXED_NSS, /* Spatial Streams count */
858 IEEE80211_SUPPORT_LDPC, /* LDPC Support */
859 IEEE80211_SUPPORT_TX_STBC, /* TX STBC enable/disable */
860 IEEE80211_SUPPORT_RX_STBC, /* RX STBC enable/disable */
861 IEEE80211_DEFAULT_KEYID, /* XMIT default key */
862 IEEE80211_OPMODE_NOTIFY_ENABLE, /* Op mode notification enable/disable */
863 IEEE80211_ENABLE_RTSCTS, /* Enable/Disable RTS-CTS */
864 IEEE80211_VHT_MCSMAP, /* VHT MCS Map */
865 IEEE80211_GET_ACS_STATE, /* get acs state */
866 IEEE80211_GET_CAC_STATE, /* get cac state */
867} ieee80211_param;
868
869#define IEEE80211_PROTECTION_NONE 0
870#define IEEE80211_PROTECTION_CTSTOSELF 1
871#define IEEE80211_PROTECTION_RTS_CTS 2
872
873typedef enum _ieee80211_privacy_filter {
874 IEEE80211_PRIVACY_FILTER_ALLWAYS,
875 IEEE80211_PRIVACY_FILTER_KEY_UNAVAILABLE,
876} ieee80211_privacy_filter;
877
878typedef enum _ieee80211_privacy_filter_packet_type {
879 IEEE80211_PRIVACY_FILTER_PACKET_UNICAST,
880 IEEE80211_PRIVACY_FILTER_PACKET_MULTICAST,
881 IEEE80211_PRIVACY_FILTER_PACKET_BOTH
882} ieee80211_privacy_filter_packet_type;
883
884typedef struct _ieee80211_privacy_excemption_filter {
885 uint16_t ether_type; /* type of ethernet to apply this filter, in host byte order */
886 ieee80211_privacy_filter filter_type;
887 ieee80211_privacy_filter_packet_type packet_type;
888} ieee80211_privacy_exemption;
889
890/*
891 * Authentication mode.
892 * NB: the usage of auth modes NONE, AUTO are deprecated,
893 * they are implemented through combinations of other auth modes
894 * and cipher types. The deprecated values are preserved here to
895 * maintain binary compatibility with applications like
896 * wpa_supplicant and hostapd.
897 */
898typedef enum _ieee80211_auth_mode {
899 IEEE80211_AUTH_NONE = 0, /* deprecated */
900 IEEE80211_AUTH_OPEN = 1, /* open */
901 IEEE80211_AUTH_SHARED = 2, /* shared-key */
902 IEEE80211_AUTH_8021X = 3, /* 802.1x */
903 IEEE80211_AUTH_AUTO = 4, /* deprecated */
904 IEEE80211_AUTH_WPA = 5, /* WPA */
905 IEEE80211_AUTH_RSNA = 6, /* WPA2/RSNA */
906 IEEE80211_AUTH_CCKM = 7, /* CCK */
907 IEEE80211_AUTH_WAPI = 8, /* WAPI */
908} ieee80211_auth_mode;
909
910#define IEEE80211_AUTH_MAX (IEEE80211_AUTH_WAPI+1)
911
912/*
913 * Cipher types.
914 * NB: The values are preserved here to maintain binary compatibility
915 * with applications like wpa_supplicant and hostapd.
916 */
917typedef enum _ieee80211_cipher_type {
918 IEEE80211_CIPHER_WEP = 0,
919 IEEE80211_CIPHER_TKIP = 1,
920 IEEE80211_CIPHER_AES_OCB = 2,
921 IEEE80211_CIPHER_AES_CCM = 3,
922 IEEE80211_CIPHER_WAPI = 4,
923 IEEE80211_CIPHER_CKIP = 5,
924 IEEE80211_CIPHER_AES_CMAC = 6,
925 IEEE80211_CIPHER_NONE = 7,
926} ieee80211_cipher_type;
927
928#define IEEE80211_CIPHER_MAX (IEEE80211_CIPHER_NONE+1)
929
930/* key direction */
931typedef enum _ieee80211_key_direction {
932 IEEE80211_KEY_DIR_TX,
933 IEEE80211_KEY_DIR_RX,
934 IEEE80211_KEY_DIR_BOTH
935} ieee80211_key_direction;
936
937#define IEEE80211_KEYIX_NONE ((uint16_t) -1)
938
939typedef struct _ieee80211_keyval {
940 ieee80211_cipher_type keytype;
941 ieee80211_key_direction keydir;
942 u_int persistent : 1, /* persistent key */
943 mfp : 1; /* management frame protection */
944 uint16_t keylen; /* length of the key data fields */
945 uint8_t *macaddr; /* mac address of length IEEE80211_ADDR_LEN . all bytes are 0xff for multicast key */
946 uint64_t keyrsc;
947 uint64_t keytsc;
948 uint16_t txmic_offset; /* TKIP/SMS4 only: offset to tx mic key */
949 uint16_t rxmic_offset; /* TKIP/SMS4 only: offset to rx mic key */
950 uint8_t *keydata;
951#ifdef ATH_SUPPORT_WAPI
952 uint8_t key_used; /*index for WAPI rekey labeling */
953#endif
954} ieee80211_keyval;
955
956#define IEEE80211_AES_CMAC_LEN 128
957typedef enum _ieee80211_rsn_param {
958 IEEE80211_UCAST_CIPHER_LEN,
959 IEEE80211_MCAST_CIPHER_LEN,
960 IEEE80211_MCASTMGMT_CIPHER_LEN,
961 IEEE80211_KEYMGT_ALGS,
962 IEEE80211_RSN_CAPS
963} ieee80211_rsn_param;
964
965#define IEEE80211_PMKID_LEN 16
966
967typedef struct _ieee80211_pmkid_entry {
968 uint8_t bssid[IEEE80211_ADDR_LEN];
969 uint8_t pmkid[IEEE80211_PMKID_LEN];
970} ieee80211_pmkid_entry;
971
972typedef enum _wlan_wme_param {
973 WLAN_WME_CWMIN,
974 WLAN_WME_CWMAX,
975 WLAN_WME_AIFS,
976 WLAN_WME_TXOPLIMIT,
977 WLAN_WME_ACM, /*bss only */
978 WLAN_WME_ACKPOLICY /*bss only */
979} wlan_wme_param;
980
981typedef enum _ieee80211_frame_type {
982 IEEE80211_FRAME_TYPE_PROBEREQ,
983 IEEE80211_FRAME_TYPE_BEACON,
984 IEEE80211_FRAME_TYPE_PROBERESP,
985 IEEE80211_FRAME_TYPE_ASSOCREQ,
986 IEEE80211_FRAME_TYPE_ASSOCRESP,
987 IEEE80211_FRAME_TYPE_AUTH
988} ieee80211_frame_type;
989
990#define IEEE80211_FRAME_TYPE_MAX (IEEE80211_FRAME_TYPE_AUTH+1)
991
992typedef enum _ieee80211_ampdu_mode {
993 IEEE80211_AMPDU_MODE_OFF, /* disable AMPDU */
994 IEEE80211_AMPDU_MODE_ON, /* enable AMPDU */
995 IEEE80211_AMPDU_MODE_WDSVAR /* enable AMPDU with 4addr WAR */
996} ieee80211_ampdu_mode;
997
998typedef enum _ieee80211_reset_type {
999 IEEE80211_RESET_TYPE_DEVICE = 0, /* device reset on error: tx timeout and etc. */
1000 IEEE80211_RESET_TYPE_DOT11_INTF, /* dot11 reset: only reset one network interface (vap) */
1001 IEEE80211_RESET_TYPE_INTERNAL, /* internal reset */
1002} ieee80211_reset_type;
1003
1004typedef struct _ieee80211_reset_request {
1005 ieee80211_reset_type type;
1006
1007 u_int reset_hw : 1, /* reset the actual H/W */
1008 /*
1009 * The following fields are only valid for DOT11 reset, i.e.,
1010 * IEEE80211_RESET_TYPE_DOT11_INTF
1011 */
1012 reset_phy : 1, /* reset PHY */
1013 reset_mac : 1, /* reset MAC */
1014 set_default_mib : 1, /* set default MIB variables */
1015 no_flush : 1;
1016 uint8_t macaddr[IEEE80211_ADDR_LEN];
1017 enum ieee80211_phymode phy_mode;
1018} ieee80211_reset_request;
1019
1020#define IEEE80211_MSG_MAX 63
1021#define IEEE80211_MSG_SMARTANT 7 /* Bit 7 (0x80)for Smart Antenna debug */
1022enum {
1023 /* IEEE80211_PARAM_DBG_LVL */
1024 IEEE80211_MSG_TDLS = 0, /* TDLS */
1025 IEEE80211_MSG_ACS, /* auto channel selection */
1026 IEEE80211_MSG_SCAN_SM, /* scan state machine */
1027 IEEE80211_MSG_SCANENTRY, /* scan entry */
1028 IEEE80211_MSG_WDS, /* WDS handling */
1029 IEEE80211_MSG_ACTION, /* action management frames */
1030 IEEE80211_MSG_ROAM, /* sta-mode roaming */
1031 IEEE80211_MSG_INACT, /* inactivity handling */
1032 IEEE80211_MSG_DOTH = 8, /* 11.h */
1033 IEEE80211_MSG_IQUE, /* IQUE features */
1034 IEEE80211_MSG_WME, /* WME protocol */
1035 IEEE80211_MSG_ACL, /* ACL handling */
1036 IEEE80211_MSG_WPA, /* WPA/RSN protocol */
1037 IEEE80211_MSG_RADKEYS, /* dump 802.1x keys */
1038 IEEE80211_MSG_RADDUMP, /* dump 802.1x radius packets */
1039 IEEE80211_MSG_RADIUS, /* 802.1x radius client */
1040 IEEE80211_MSG_DOT1XSM = 16, /* 802.1x state machine */
1041 IEEE80211_MSG_DOT1X, /* 802.1x authenticator */
1042 IEEE80211_MSG_POWER, /* power save handling */
1043 IEEE80211_MSG_STATE, /* state machine */
1044 IEEE80211_MSG_OUTPUT, /* output handling */
1045 IEEE80211_MSG_SCAN, /* scanning */
1046 IEEE80211_MSG_AUTH, /* authentication handling */
1047 IEEE80211_MSG_ASSOC, /* association handling */
1048 IEEE80211_MSG_NODE = 24, /* node handling */
1049 IEEE80211_MSG_ELEMID, /* element id parsing */
1050 IEEE80211_MSG_XRATE, /* rate set handling */
1051 IEEE80211_MSG_INPUT, /* input handling */
1052 IEEE80211_MSG_CRYPTO, /* crypto work */
1053 IEEE80211_MSG_DUMPPKTS, /* IFF_LINK2 equivalant */
1054 IEEE80211_MSG_DEBUG, /* IFF_DEBUG equivalent */
1055 IEEE80211_MSG_MLME, /* MLME */
1056 /* IEEE80211_PARAM_DBG_LVL_HIGH */
1057 IEEE80211_MSG_RRM = 32, /* Radio resource measurement */
1058 IEEE80211_MSG_WNM, /* Wireless Network Management */
1059 IEEE80211_MSG_P2P_PROT, /* P2P Protocol driver */
1060 IEEE80211_MSG_PROXYARP, /* 11v Proxy ARP */
1061 IEEE80211_MSG_L2TIF, /* Hotspot 2.0 L2 TIF */
1062 IEEE80211_MSG_WIFIPOS, /* WifiPositioning Feature */
1063 IEEE80211_MSG_WRAP, /* WRAP or Wireless ProxySTA */
1064 IEEE80211_MSG_DFS, /* DFS debug mesg */
1065
1066 IEEE80211_MSG_NUM_CATEGORIES, /* total ieee80211 messages */
1067 IEEE80211_MSG_UNMASKABLE = IEEE80211_MSG_MAX, /* anything */
1068 IEEE80211_MSG_ANY = IEEE80211_MSG_MAX, /* anything */
1069};
1070
1071/* verbosity levels */
1072#define IEEE80211_VERBOSE_OFF 100
1073#define IEEE80211_VERBOSE_FORCE 1
1074#define IEEE80211_VERBOSE_SERIOUS 2
1075#define IEEE80211_VERBOSE_NORMAL 3
1076#define IEEE80211_VERBOSE_LOUD 4
1077#define IEEE80211_VERBOSE_DETAILED 5
1078#define IEEE80211_VERBOSE_COMPLEX 6
1079#define IEEE80211_VERBOSE_FUNCTION 7
1080#define IEEE80211_VERBOSE_TRACE 8
1081
1082#define IEEE80211_DEBUG_DEFAULT IEEE80211_MSG_DEBUG
1083
1084/*
1085 * the lower 4 bits of the msg flags are used for extending the
1086 * debug flags.
1087 */
1088
1089/*
1090 * flag defintions for wlan_mlme_stop_bss(vap) API.
1091 */
1092#define WLAN_MLME_STOP_BSS_F_SEND_DEAUTH 0x01
1093#define WLAN_MLME_STOP_BSS_F_CLEAR_ASSOC_STATE 0x02
1094#define WLAN_MLME_STOP_BSS_F_FORCE_STOP_RESET 0x04
1095#define WLAN_MLME_STOP_BSS_F_WAIT_RX_DONE 0x08
1096#define WLAN_MLME_STOP_BSS_F_NO_RESET 0x10
1097#define WLAN_MLME_STOP_BSS_F_STANDBY 0x20
1098
1099/*
1100 * WAPI commands to authenticator
1101 */
1102#define WAPI_WAI_REQUEST (uint16_t)0x00F1
1103#define WAPI_UNICAST_REKEY (uint16_t)0x00F2
1104#define WAPI_STA_AGING (uint16_t)0x00F3
1105#define WAPI_MULTI_REKEY (uint16_t)0x00F4
1106#define WAPI_STA_STATS (uint16_t)0x00F5
1107
1108/*
1109 * IEEE80211 PHY Statistics.
1110 */
1111struct ieee80211_phy_stats {
1112 uint64_t ips_tx_packets; /* frames successfully transmitted */
1113 uint64_t ips_tx_multicast; /* multicast/broadcast frames successfully transmitted */
1114 uint64_t ips_tx_fragments; /* fragments successfully transmitted */
1115 uint64_t ips_tx_xretries; /* frames that are xretried. NB: not number of retries */
1116 uint64_t ips_tx_retries; /* frames transmitted after retries. NB: not number of retries */
1117 uint64_t ips_tx_multiretries; /* frames transmitted after more than one retry. */
1118 uint64_t ips_tx_timeout; /* frames that expire the dot11MaxTransmitMSDULifetime */
1119 uint64_t ips_rx_packets; /* frames successfully received */
1120 uint64_t ips_rx_multicast; /* multicast/broadcast frames successfully received */
1121 uint64_t ips_rx_fragments; /* fragments successfully received */
1122 uint64_t ips_rx_timeout; /* frmaes that expired the dot11MaxReceiveLifetime */
1123 uint64_t ips_rx_dup; /* duplicated fragments */
1124 uint64_t ips_rx_mdup; /* multiple duplicated fragments */
1125 uint64_t ips_rx_promiscuous; /* frames that are received only because promiscuous filter is on */
1126 uint64_t ips_rx_promiscuous_fragments; /* fragments that are received only because promiscuous filter is on */
1127 uint64_t ips_tx_rts; /* RTS success count */
1128 uint64_t ips_tx_shortretry; /* tx on-chip retries (short). RTSFailCnt */
1129 uint64_t ips_tx_longretry; /* tx on-chip retries (long). DataFailCnt */
1130 uint64_t ips_rx_crcerr; /* rx failed 'cuz of bad CRC */
1131 uint64_t ips_rx_fifoerr; /* rx failed 'cuz of FIFO overrun */
1132 uint64_t ips_rx_decrypterr; /* rx decryption error */
1133};
1134
1135struct ieee80211_chan_stats {
1136 uint32_t chan_clr_cnt;
1137 uint32_t cycle_cnt;
1138 uint32_t phy_err_cnt;
1139};
1140
1141struct ieee80211_mac_stats {
1142 uint64_t ims_tx_packets; /* frames successfully transmitted */
1143 uint64_t ims_rx_packets; /* frames successfully received */
1144 uint64_t ims_tx_bytes; /* bytes successfully transmitted */
1145 uint64_t ims_rx_bytes; /* bytes successfully received */
1146
1147 /* TODO: For the byte counts below, we need to handle some scenarios
1148 such as encryption related decaps, etc */
1149 uint64_t ims_tx_data_packets; /* data frames successfully transmitted */
1150 uint64_t ims_rx_data_packets; /* data frames successfully received */
1151 uint64_t ims_tx_data_bytes; /* data bytes successfully transmitted,
1152 inclusive of FCS. */
1153 uint64_t ims_rx_data_bytes; /* data bytes successfully received,
1154 inclusive of FCS. */
1155
1156 uint64_t ims_tx_datapyld_bytes; /* data payload bytes successfully
1157 transmitted */
1158 uint64_t ims_rx_datapyld_bytes; /* data payload successfully
1159 received */
1160
1161 /* Decryption errors */
1162 uint64_t ims_rx_unencrypted; /* rx w/o wep and privacy on */
1163 uint64_t ims_rx_badkeyid; /* rx w/ incorrect keyid */
1164 uint64_t ims_rx_decryptok; /* rx decrypt okay */
1165 uint64_t ims_rx_decryptcrc; /* rx decrypt failed on crc */
1166 uint64_t ims_rx_wepfail; /* rx wep processing failed */
1167 uint64_t ims_rx_tkipreplay; /* rx seq# violation (TKIP) */
1168 uint64_t ims_rx_tkipformat; /* rx format bad (TKIP) */
1169 uint64_t ims_rx_tkipmic; /* rx MIC check failed (TKIP) */
1170 uint64_t ims_rx_tkipicv; /* rx ICV check failed (TKIP) */
1171 uint64_t ims_rx_ccmpreplay; /* rx seq# violation (CCMP) */
1172 uint64_t ims_rx_ccmpformat; /* rx format bad (CCMP) */
1173 uint64_t ims_rx_ccmpmic; /* rx MIC check failed (CCMP) */
1174/*this file can be included by applications as 80211stats that has no such MACRO definition*/
1175/* #if ATH_SUPPORT_WAPI */
1176 uint64_t ims_rx_wpireplay; /* rx seq# violation (WPI) */
1177 uint64_t ims_rx_wpimic; /* rx MIC check failed (WPI) */
1178/* #endif */
1179 /* Other Tx/Rx errors */
1180 uint64_t ims_tx_discard; /* tx dropped by NIC */
1181 uint64_t ims_rx_discard; /* rx dropped by NIC */
1182
1183 uint64_t ims_rx_countermeasure; /* rx TKIP countermeasure activation count */
1184};
1185
1186/*
1187 * Summary statistics.
1188 */
1189struct ieee80211_stats {
1190 uint32_t is_rx_badversion; /* rx frame with bad version */
1191 uint32_t is_rx_tooshort; /* rx frame too short */
1192 uint32_t is_rx_wrongbss; /* rx from wrong bssid */
1193 uint32_t is_rx_wrongdir; /* rx w/ wrong direction */
1194 uint32_t is_rx_mcastecho; /* rx discard 'cuz mcast echo */
1195 uint32_t is_rx_notassoc; /* rx discard 'cuz sta !assoc */
1196 uint32_t is_rx_noprivacy; /* rx w/ wep but privacy off */
1197 uint32_t is_rx_decap; /* rx decapsulation failed */
1198 uint32_t is_rx_mgtdiscard; /* rx discard mgt frames */
1199 uint32_t is_rx_ctl; /* rx discard ctrl frames */
1200 uint32_t is_rx_beacon; /* rx beacon frames */
1201 uint32_t is_rx_rstoobig; /* rx rate set truncated */
1202 uint32_t is_rx_elem_missing; /* rx required element missing */
1203 uint32_t is_rx_elem_toobig; /* rx element too big */
1204 uint32_t is_rx_elem_toosmall; /* rx element too small */
1205 uint32_t is_rx_elem_unknown; /* rx element unknown */
1206 uint32_t is_rx_badchan; /* rx frame w/ invalid chan */
1207 uint32_t is_rx_chanmismatch; /* rx frame chan mismatch */
1208 uint32_t is_rx_nodealloc; /* rx frame dropped */
1209 uint32_t is_rx_ssidmismatch; /* rx frame ssid mismatch */
1210 uint32_t is_rx_auth_unsupported; /* rx w/ unsupported auth alg */
1211 uint32_t is_rx_auth_fail; /* rx sta auth failure */
1212 uint32_t is_rx_auth_countermeasures; /* rx auth discard 'cuz CM */
1213 uint32_t is_rx_assoc_bss; /* rx assoc from wrong bssid */
1214 uint32_t is_rx_assoc_notauth; /* rx assoc w/o auth */
1215 uint32_t is_rx_assoc_capmismatch; /* rx assoc w/ cap mismatch */
1216 uint32_t is_rx_assoc_norate; /* rx assoc w/ no rate match */
1217 uint32_t is_rx_assoc_badwpaie; /* rx assoc w/ bad WPA IE */
1218 uint32_t is_rx_deauth; /* rx deauthentication */
1219 uint32_t is_rx_disassoc; /* rx disassociation */
1220 uint32_t is_rx_action; /* rx action mgt */
1221 uint32_t is_rx_badsubtype; /* rx frame w/ unknown subtype */
1222 uint32_t is_rx_nobuf; /* rx failed for lack of buf */
1223 uint32_t is_rx_ahdemo_mgt; /* rx discard ahdemo mgt frame */
1224 uint32_t is_rx_bad_auth; /* rx bad auth request */
1225 uint32_t is_rx_unauth; /* rx on unauthorized port */
1226 uint32_t is_rx_badcipher; /* rx failed 'cuz key type */
1227 uint32_t is_tx_nodefkey; /* tx failed 'cuz no defkey */
1228 uint32_t is_tx_noheadroom; /* tx failed 'cuz no space */
1229 uint32_t is_rx_nocipherctx; /* rx failed 'cuz key !setup */
1230 uint32_t is_rx_acl; /* rx discard 'cuz acl policy */
1231 uint32_t is_rx_ffcnt; /* rx fast frames */
1232 uint32_t is_rx_badathtnl; /* driver key alloc failed */
1233 uint32_t is_rx_nowds; /* 4-addr packets received with no wds enabled */
1234 uint32_t is_tx_nobuf; /* tx failed for lack of buf */
1235 uint32_t is_tx_nonode; /* tx failed for no node */
1236 uint32_t is_tx_unknownmgt; /* tx of unknown mgt frame */
1237 uint32_t is_tx_badcipher; /* tx failed 'cuz key type */
1238 uint32_t is_tx_ffokcnt; /* tx fast frames sent success */
1239 uint32_t is_tx_fferrcnt; /* tx fast frames sent success */
1240 uint32_t is_scan_active; /* active scans started */
1241 uint32_t is_scan_passive; /* passive scans started */
1242 uint32_t is_node_timeout; /* nodes timed out inactivity */
1243 uint32_t is_crypto_nomem; /* no memory for crypto ctx */
1244 uint32_t is_crypto_tkip; /* tkip crypto done in s/w */
1245 uint32_t is_crypto_tkipenmic; /* tkip en-MIC done in s/w */
1246 uint32_t is_crypto_tkipdemic; /* tkip de-MIC done in s/w */
1247 uint32_t is_crypto_tkipcm; /* tkip counter measures */
1248 uint32_t is_crypto_ccmp; /* ccmp crypto done in s/w */
1249 uint32_t is_crypto_wep; /* wep crypto done in s/w */
1250 uint32_t is_crypto_setkey_cipher; /* cipher rejected key */
1251 uint32_t is_crypto_setkey_nokey; /* no key index for setkey */
1252 uint32_t is_crypto_delkey; /* driver key delete failed */
1253 uint32_t is_crypto_badcipher; /* unknown cipher */
1254 uint32_t is_crypto_nocipher; /* cipher not available */
1255 uint32_t is_crypto_attachfail; /* cipher attach failed */
1256 uint32_t is_crypto_swfallback; /* cipher fallback to s/w */
1257 uint32_t is_crypto_keyfail; /* driver key alloc failed */
1258 uint32_t is_crypto_enmicfail; /* en-MIC failed */
1259 uint32_t is_ibss_capmismatch; /* merge failed-cap mismatch */
1260 uint32_t is_ibss_norate; /* merge failed-rate mismatch */
1261 uint32_t is_ps_unassoc; /* ps-poll for unassoc. sta */
1262 uint32_t is_ps_badaid; /* ps-poll w/ incorrect aid */
1263 uint32_t is_ps_qempty; /* ps-poll w/ nothing to send */
1264};
1265
1266typedef enum _ieee80211_send_frame_type {
1267 IEEE80211_SEND_NULL,
1268 IEEE80211_SEND_QOSNULL,
1269} ieee80211_send_frame_type;
1270
1271typedef struct _ieee80211_tspec_info {
1272 uint8_t traffic_type;
1273 uint8_t direction;
1274 uint8_t dot1Dtag;
1275 uint8_t tid;
1276 uint8_t acc_policy_edca;
1277 uint8_t acc_policy_hcca;
1278 uint8_t aggregation;
1279 uint8_t psb;
1280 uint8_t ack_policy;
1281 uint16_t norminal_msdu_size;
1282 uint16_t max_msdu_size;
1283 uint32_t min_srv_interval;
1284 uint32_t max_srv_interval;
1285 uint32_t inactivity_interval;
1286 uint32_t suspension_interval;
1287 uint32_t srv_start_time;
1288 uint32_t min_data_rate;
1289 uint32_t mean_data_rate;
1290 uint32_t peak_data_rate;
1291 uint32_t max_burst_size;
1292 uint32_t delay_bound;
1293 uint32_t min_phy_rate;
1294 uint16_t surplus_bw;
1295 uint16_t medium_time;
1296} ieee80211_tspec_info;
1297
1298#ifndef EXTERNAL_USE_ONLY
1299/*
1300 * Manual ADDBA support
1301 */
1302enum {
1303 ADDBA_SEND = 0,
1304 ADDBA_STATUS = 1,
1305 DELBA_SEND = 2,
1306 ADDBA_RESP = 3,
1307 ADDBA_CLR_RESP = 4,
1308 SINGLE_AMSDU = 5,
1309};
1310
1311enum {
1312 ADDBA_MODE_AUTO = 0,
1313 ADDBA_MODE_MANUAL = 1,
1314};
1315
1316struct ieee80211_addba_delba_request {
1317 wlan_dev_t ic;
1318 uint8_t action;
1319 uint8_t tid;
1320 uint16_t status;
1321 uint16_t aid;
1322 uint32_t arg1;
1323 uint32_t arg2;
1324};
1325#endif /* EXTERNAL_USE_ONLY */
1326
1327#ifdef ATH_BT_COEX
1328typedef enum _ieee80211_bt_coex_info_type {
1329 IEEE80211_BT_COEX_INFO_SCHEME = 0,
1330 IEEE80211_BT_COEX_INFO_BTBUSY = 1,
1331} ieee80211_bt_coex_info_type;
1332#endif
1333
1334struct tkip_countermeasure {
1335 uint16_t mic_count_in_60s;
1336 uint32_t timestamp;
1337};
1338
1339enum _ieee80211_qos_frame_direction {
1340 IEEE80211_RX_QOS_FRAME = 0,
1341 IEEE80211_TX_QOS_FRAME = 1,
1342 IEEE80211_TX_COMPLETE_QOS_FRAME = 2
1343};
1344
1345typedef struct ieee80211_vap_opmode_count {
1346 int total_vaps;
1347 int ibss_count;
1348 int sta_count;
1349 int wds_count;
1350 int ahdemo_count;
1351 int ap_count;
1352 int monitor_count;
1353 int btamp_count;
1354 int unknown_count;
1355} ieee80211_vap_opmode_count;
1356
1357struct ieee80211_app_ie_t {
1358 uint32_t length;
1359 uint8_t *ie;
1360};
1361
1362/*
1363 * MAC ACL operations.
1364 */
1365enum {
1366 IEEE80211_MACCMD_POLICY_OPEN = 0, /* set policy: no ACL's */
1367 IEEE80211_MACCMD_POLICY_ALLOW = 1, /* set policy: allow traffic */
1368 IEEE80211_MACCMD_POLICY_DENY = 2, /* set policy: deny traffic */
1369 IEEE80211_MACCMD_FLUSH = 3, /* flush ACL database */
1370 IEEE80211_MACCMD_DETACH = 4, /* detach ACL policy */
1371 IEEE80211_MACCMD_POLICY_RADIUS = 5, /* set policy: RADIUS managed ACLs */
1372};
1373
1374#endif