Mistake on this page?
Report an issue in GitHub or email us
whd_wlioctl.h
1 /*
2  * Copyright 2020 Cypress Semiconductor Corporation
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 /*
18  * Custom OID/ioctl definitions for
19  * 802.11abg Networking Device Driver
20  */
21 #ifndef INCLUDED_WHD_WLIOCTL_H
22 #define INCLUDED_WHD_WLIOCTL_H
23 
24 #ifdef __cplusplus
25 extern "C"
26 {
27 #endif
28 /* These are the flags in the BSS Capability Information field as defined in section 7.3.1.4 of IEEE Std 802.11-2007 */
29 #define DOT11_CAP_ESS (0x0001) /** Extended service set capability */
30 #define DOT11_CAP_IBSS (0x0002) /** Ad-hoc capability (Independent Basic Service Set) */
31 #define DOT11_CAP_PRIVACY (0x0010) /** Privacy subfield - indicates data confidentiality is required for all data frames exchanged */
32 
33 #define CH_MAX_2G_CHANNEL (14) /* Max channel in 2G band */
34 #define MAX_WFDS_SVC_NAME_LEN (200) /* maximum service_name length */
35 
36 #define ACTION_FRAME_SIZE 1040
37 typedef uint16_t chanspec_t;
38 #define ETHER_ADDR_LEN 6
39 
40 typedef struct ether_addr
41 {
42  uint8_t octet[ETHER_ADDR_LEN];
45 {
46  uint8_t ether_dhost[ETHER_ADDR_LEN];
47  uint8_t ether_shost[ETHER_ADDR_LEN];
48  uint16_t ether_type;
49 };
50 typedef struct wl_action_frame
51 {
52  wl_ether_addr_t da;
53  uint16_t len;
54  uint32_t packetId;
55  uint8_t data[ACTION_FRAME_SIZE];
57 
58 typedef struct wl_af_params
59 {
60  uint32_t channel;
61  int32_t dwell_time;
62  struct ether_addr BSSID;
63  wl_action_frame_t action_frame;
65 
66 #define WL_WIFI_AF_PARAMS_SIZE sizeof(struct wl_af_params)
67 
68 /* ether types */
69 #define ETHER_TYPE_LEN 2
70 #define ETHER_TYPE_MIN 0x0600 /* Anything less than MIN is a length */
71 #define ETHER_TYPE_IP 0x0800 /* IP */
72 #define ETHER_TYPE_ARP 0x0806 /* ARP */
73 #define ETHER_TYPE_8021Q 0x8100 /* 802.1Q */
74 #define ETHER_TYPE_802_1X 0x888e /* 802.1x */
75 #define ETHER_TYPE_WAI 0x88b4 /* WAPI WAI */
76 #define ETHER_TYPE_802_1X_PREAUTH 0x88c7 /* 802.1x preauthentication */
77 #define WL_WIFI_ACTION_FRAME_SIZE sizeof(struct wl_action_frame)
78 #define BWL_DEFAULT_PACKING
79 
80 #define RWL_ACTION_WIFI_CATEGORY 127
81 #define RWL_WIFI_OUI_BYTE1 0x90
82 #define RWL_WIFI_OUI_BYTE2 0x4C
83 #define RWL_WIFI_OUI_BYTE3 0x0F
84 #define RWL_WIFI_ACTION_FRAME_SIZE sizeof(struct dot11_action_wifi_vendor_specific)
85 #define RWL_WIFI_DEFAULT 0x00
86 #define RWL_WIFI_FIND_MY_PEER 0x09
87 #define RWL_WIFI_FOUND_PEER 0x0A
88 #define RWL_ACTION_WIFI_FRAG_TYPE 0x55
89 
90 typedef struct ssid_info
91 {
92  uint8_t ssid_len;
93  uint8_t ssid[32];
94 } ssid_info_t;
95 typedef struct cnt_rx
96 {
97  uint32_t cnt_rxundec;
98  uint32_t cnt_rxframe;
99 } cnt_rx_t;
100 #define RWL_REF_MAC_ADDRESS_OFFSET 17
101 #define RWL_DUT_MAC_ADDRESS_OFFSET 23
102 #define RWL_WIFI_CLIENT_CHANNEL_OFFSET 50
103 #define RWL_WIFI_SERVER_CHANNEL_OFFSET 51
104 #define WL_BSS_INFO_VERSION 109
105 #define MCSSET_LEN 16
106 
107 typedef struct wlc_ssid
108 {
109  uint32_t SSID_len;
110  uint8_t SSID[32];
111 } wlc_ssid_t;
112 #define WL_BSSTYPE_INFRA 1
113 #define WL_BSSTYPE_INDEP 0
114 #define WL_BSSTYPE_ANY 2
115 #define WL_SCANFLAGS_PASSIVE 0x01
116 #define WL_SCANFLAGS_PROHIBITED 0x04
117 typedef struct wl_scan_params
118 {
119  wlc_ssid_t ssid;
120  wl_ether_addr_t bssid;
121  int8_t bss_type;
122  int8_t scan_type;
123  int32_t nprobes;
124  int32_t active_time;
125  int32_t passive_time;
126  int32_t home_time;
127  int32_t channel_num;
128  uint16_t channel_list[1];
130 #define WL_SCAN_PARAMS_FIXED_SIZE (64)
131 #define WL_SCAN_PARAMS_COUNT_MASK (0x0000ffff)
132 #define WL_SCAN_PARAMS_NSSID_SHIFT (16)
133 #define WL_SCAN_ACTION_START (1)
134 #define WL_SCAN_ACTION_CONTINUE (2)
135 #define WL_SCAN_ACTION_ABORT (3)
136 #define ISCAN_REQ_VERSION (1)
137 typedef struct wl_iscan_params
138 {
139  uint32_t version;
140  uint16_t action;
141  uint16_t scan_duration;
142  wl_scan_params_t params;
144 #define WL_ISCAN_PARAMS_FIXED_SIZE (offsetof(wl_iscan_params_t, params) + sizeof(wlc_ssid_t) )
145 typedef struct wl_scan_results
146 {
147  uint32_t buflen;
148  uint32_t version;
149  uint32_t count;
150  wl_bss_info_t bss_info[1];
152 #define WL_SCAN_RESULTS_FIXED_SIZE (12)
153 #define WL_SCAN_RESULTS_SUCCESS (0)
154 #define WL_SCAN_RESULTS_PARTIAL (1)
155 #define WL_SCAN_RESULTS_PENDING (2)
156 #define WL_SCAN_RESULTS_ABORTED (3)
157 #define WL_SCAN_RESULTS_NO_MEM (4)
158 #define ESCAN_REQ_VERSION 1
159 typedef struct wl_escan_params
160 {
161  uint32_t version;
162  uint16_t action;
163  uint16_t sync_id;
164  wl_scan_params_t params;
166 #define WL_ESCAN_PARAMS_FIXED_SIZE (offsetof(wl_escan_params_t, params) + sizeof(wlc_ssid_t) )
167 typedef struct wl_escan_result
168 {
169  uint32_t buflen;
170  uint32_t version;
171  uint16_t sync_id;
172  uint16_t bss_count;
173  wl_bss_info_t bss_info[1];
175 #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(wl_escan_result_t) - sizeof(wl_bss_info_t) )
176 typedef struct wl_iscan_results
177 {
178  uint32_t status;
179  wl_scan_results_t results;
181 #define WL_ISCAN_RESULTS_FIXED_SIZE \
182  (WL_SCAN_RESULTS_FIXED_SIZE + offsetof(wl_iscan_results_t, results) )
183 #define WL_MAXRATES_IN_SET 16 /* max # of rates in a rateset */
184 typedef struct wl_rateset
185 {
186  uint32_t count; /* # rates in this set */
187  uint8_t rates[WL_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */
188 } wl_rateset_t;
189 
190 typedef struct wl_rateset_args
191 {
192  uint32_t count; /* # rates in this set */
193  uint8_t rates[WL_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */
194  uint8_t mcs[WL_MAXRATES_IN_SET]; /* supported mcs index bit map */
196 
197 #define WL_RSPEC_RATE_MASK 0x000000FF /* rate or HT MCS value */
198 #define WL_RSPEC_VHT_MCS_MASK 0x0000000F /* VHT MCS value */
199 #define WL_RSPEC_VHT_NSS_MASK 0x000000F0 /* VHT Nss value */
200 #define WL_RSPEC_VHT_NSS_SHIFT 4 /* VHT Nss value shift */
201 #define WL_RSPEC_TXEXP_MASK 0x00000300
202 #define WL_RSPEC_TXEXP_SHIFT 8
203 #define WL_RSPEC_BW_MASK 0x00070000 /* bandwidth mask */
204 #define WL_RSPEC_BW_SHIFT 16 /* bandwidth shift */
205 #define WL_RSPEC_STBC 0x00100000 /* STBC encoding, Nsts = 2 x Nss */
206 #define WL_RSPEC_TXBF 0x00200000 /* bit indicates TXBF mode */
207 #define WL_RSPEC_LDPC 0x00400000 /* bit indicates adv coding in use */
208 #define WL_RSPEC_SGI 0x00800000 /* Short GI mode */
209 #define WL_RSPEC_ENCODING_MASK 0x03000000 /* Encoding of Rate/MCS field */
210 #define WL_RSPEC_OVERRIDE_RATE 0x40000000 /* bit indicate to override mcs only */
211 #define WL_RSPEC_OVERRIDE_MODE 0x80000000 /* bit indicates override both rate & mode */
212 #define WL_RSPEC_BW_UNSPECIFIED 0
213 #define WL_RSPEC_BW_20MHZ 0x00010000
214 #define WL_RSPEC_BW_40MHZ 0x00020000
215 #define WL_RSPEC_BW_80MHZ 0x00030000
216 #define WL_RSPEC_BW_160MHZ 0x00040000
217 #define WL_RSPEC_BW_10MHZ 0x00050000
218 #define WL_RSPEC_BW_5MHZ 0x00060000
219 #define WL_RSPEC_BW_2P5MHZ 0x00070000
220 #define WL_RSPEC_ENCODE_RATE 0x00000000 /* Legacy rate is stored in RSPEC_RATE_MASK */
221 #define WL_RSPEC_ENCODE_HT 0x01000000 /* HT MCS is stored in RSPEC_RATE_MASK */
222 #define WL_RSPEC_ENCODE_VHT 0x02000000 /* VHT MCS and Nss is stored in RSPEC_RATE_MASK */
223 
224 typedef struct wl_uint32_list
225 {
226  uint32_t count;
227  uint32_t element[1];
229 
230 typedef struct wl_join_scan_params
231 {
232  uint8_t scan_type; /* 0 use default, active or passive scan */
233  int32_t nprobes; /* -1 use default, number of probes per channel */
234  int32_t active_time; /* -1 use default, dwell time per channel for
235  * active scanning
236  */
237  int32_t passive_time; /* -1 use default, dwell time per channel
238  * for passive scanning
239  */
240  int32_t home_time; /* -1 use default, dwell time for the home channel
241  * between channel scans
242  */
244 
245 #define NRATE_MCS_INUSE (0x00000080)
246 #define NRATE_RATE_MASK (0x0000007f)
247 #define NRATE_STF_MASK (0x0000ff00)
248 #define NRATE_STF_SHIFT (8)
249 #define NRATE_OVERRIDE (0x80000000)
250 #define NRATE_OVERRIDE_MCS_ONLY (0x40000000)
251 #define NRATE_SGI_MASK (0x00800000)
252 #define NRATE_SGI_SHIFT (23)
253 #define NRATE_LDPC_CODING (0x00400000)
254 #define NRATE_LDPC_SHIFT (22)
255 #define NRATE_BCMC_OVERRIDE (0x00200000)
256 #define NRATE_BCMC_SHIFT (21)
257 #define NRATE_STF_SISO (0)
258 #define NRATE_STF_CDD (1)
259 #define NRATE_STF_STBC (2)
260 #define NRATE_STF_SDM (3)
261 #define ANTENNA_NUM_1 (1)
262 #define ANTENNA_NUM_2 (2)
263 #define ANTENNA_NUM_3 (3)
264 #define ANTENNA_NUM_4 (4)
265 #define ANT_SELCFG_AUTO (0x80)
266 #define ANT_SELCFG_MASK (0x33)
267 #define ANT_SELCFG_MAX (4)
268 #define ANT_SELCFG_TX_UNICAST (0)
269 #define ANT_SELCFG_RX_UNICAST (1)
270 #define ANT_SELCFG_TX_DEF (2)
271 #define ANT_SELCFG_RX_DEF (3)
272 typedef struct
273 {
274  uint8_t ant_config[ANT_SELCFG_MAX];
275  uint8_t num_antcfg;
277 #define HIGHEST_SINGLE_STREAM_MCS (7)
278 #define WLC_CNTRY_BUF_SZ (4)
279 typedef struct wl_country
280 {
281  char country_abbrev[WLC_CNTRY_BUF_SZ];
282  int32_t rev;
283  char ccode[WLC_CNTRY_BUF_SZ];
284 } wl_country_t;
286 {
287  uint32_t buflen;
288  uint32_t band;
289  int8_t country_abbrev[WLC_CNTRY_BUF_SZ];
290  uint32_t count;
291  uint32_t channel[1];
293 typedef struct wl_country_list
294 {
295  uint32_t buflen;
296  uint32_t band_set;
297  uint32_t band;
298  uint32_t count;
299  int8_t country_abbrev[1];
301 #define WL_NUM_RPI_BINS 8
302 #define WL_RM_TYPE_BASIC 1
303 #define WL_RM_TYPE_CCA 2
304 #define WL_RM_TYPE_RPI 3
305 #define WL_RM_FLAG_PARALLEL (1 << 0)
306 #define WL_RM_FLAG_LATE (1 << 1)
307 #define WL_RM_FLAG_INCAPABLE (1 << 2)
308 #define WL_RM_FLAG_REFUSED (1 << 3)
309 typedef struct wl_rm_req_elt
310 {
311  int8_t type;
312  int8_t flags;
313  wl_chanspec_t chanspec;
314  uint32_t token;
315  uint32_t tsf_h;
316  uint32_t tsf_l;
317  uint32_t dur;
319 typedef struct wl_rm_req
320 {
321  uint32_t token;
322  uint32_t count;
323  void *cb;
324  void *cb_arg;
325  wl_rm_req_elt_t req[1];
326 } wl_rm_req_t;
327 #define WL_RM_REQ_FIXED_LEN offsetof(wl_rm_req_t, req)
328 typedef struct wl_rm_rep_elt
329 {
330  int8_t type;
331  int8_t flags;
332  wl_chanspec_t chanspec;
333  uint32_t token;
334  uint32_t tsf_h;
335  uint32_t tsf_l;
336  uint32_t dur;
337  uint32_t len;
338  uint8_t data[1];
340 #define WL_RM_REP_ELT_FIXED_LEN 24
341 #define WL_RPI_REP_BIN_NUM 8
342 typedef struct wl_rm_rpi_rep
343 {
344  uint8_t rpi[WL_RPI_REP_BIN_NUM];
345  int8_t rpi_max[WL_RPI_REP_BIN_NUM];
347 typedef struct wl_rm_rep
348 {
349  uint32_t token;
350  uint32_t len;
351  wl_rm_rep_elt_t rep[1];
352 } wl_rm_rep_t;
353 #define WL_RM_REP_FIXED_LEN 8
354 #define CRYPTO_ALGO_OFF 0
355 #define CRYPTO_ALGO_WEP1 1
356 #define CRYPTO_ALGO_TKIP 2
357 #define CRYPTO_ALGO_WEP128 3
358 #define CRYPTO_ALGO_AES_CCM 4
359 #define CRYPTO_ALGO_AES_OCB_MSDU 5
360 #define CRYPTO_ALGO_AES_OCB_MPDU 6
361 #define CRYPTO_ALGO_NALG 7
362 #define WSEC_GEN_MIC_ERROR 0x0001
363 #define WSEC_GEN_REPLAY 0x0002
364 #define WSEC_GEN_ICV_ERROR 0x0004
365 #define WL_SOFT_KEY (1 << 0)
366 #define WL_PRIMARY_KEY (1 << 1)
367 #define WL_KF_RES_4 (1 << 4)
368 #define WL_KF_RES_5 (1 << 5)
369 #define WL_IBSS_PEER_GROUP_KEY (1 << 6)
370 #define DOT11_MAX_KEY_SIZE 32
371 typedef struct wl_wsec_key
372 {
373  uint32_t index;
374  uint32_t len;
375  uint8_t data[DOT11_MAX_KEY_SIZE];
376  uint32_t pad_1[18];
377  uint32_t algo;
378  uint32_t flags;
379  uint32_t pad_2[2];
380  int32_t pad_3;
381  int32_t iv_initialized;
382  int32_t pad_4;
383  struct
384  {
385  uint32_t hi;
386  uint16_t lo;
387  } rxiv;
388  uint32_t pad_5[2];
389  wl_ether_addr_t ea;
390 } wl_wsec_key_t;
391 #define WSEC_MIN_PSK_LEN 8
392 #define WSEC_MAX_PSK_LEN 64
393 #define WSEC_PASSPHRASE (1 << 0)
394 typedef struct
395 {
396  uint16_t key_len;
397  uint16_t flags;
398  uint8_t key[WSEC_MAX_PSK_LEN];
399 } wsec_pmk_t;
400 
401 #define WSEC_MAX_SAE_PASSWORD_LEN 128
402 typedef struct
403 {
404  uint16_t password_len; /* octets in key materials */
405  uint8_t password[WSEC_MAX_SAE_PASSWORD_LEN]; /* maximum key len for SAE passphrase */
407 
408 #define OPEN_AUTH 0x0000
409 #define SHARED_AUTH 0x0001
410 //#define WEP_ENABLED 0x0001 // moved to whd_types.h
411 //#define TKIP_ENABLED 0x0002
412 //#define AES_ENABLED 0x0004
413 
414 typedef enum
415 {
416  AUTH_ALGO_80211_OPEN = 1, AUTH_ALGO_80211_SHARED_KEY = 2, AUTH_ALGO_WPA = 3, AUTH_ALGO_WPA_PSK = 4,
417  AUTH_ALGO_WPA_NONE = 5, AUTH_ALGO_RSNA = 6, AUTH_ALGO_RSNA_PSK = 7,
418 } AUTH_ALGORITHM;
419 
420 #define WSEC_SWFLAG 0x0008
421 #define CKIP_KP_ENABLED 0x0010
422 #define CKIP_MIC_ENABLED 0x0020
423 #define SES_OW_ENABLED 0x0040
424 #define FIPS_ENABLED 0x0080
425 #define SMS4_ENABLED 0x0100
426 
427 #define MFP_NONE 0x0000
428 #define MFP_CAPABLE 0x0200
429 #define MFP_REQUIRED 0x0400
430 #define MFP_SHA256 0x0800 /* a special configuration for STA for WIFI test tool */
431 
432 #define WPA_AUTH_DISABLED 0x0000
433 #define WPA_AUTH_NONE 0x0001
434 #define WPA_AUTH_UNSPECIFIED 0x0002
435 #define WPA_AUTH_PSK 0x0004
436 #define WPA_AUTH_CCKM 0x0008
437 #define WPA2_AUTH_CCKM 0x0010
438 #define WPA2_AUTH_UNSPECIFIED 0x0040
439 #define WPA2_AUTH_PSK 0x0080
440 #define BRCM_AUTH_PSK 0x0100
441 #define BRCM_AUTH_DPT 0x0200
442 #define WPA_AUTH_WAPI 0x0400
443 #define WPA2_AUTH_MFP 0x1000 /* MFP (11w) in contrast to CCX */
444 
445 #define WPA2_AUTH_1X_SHA256 0x1000 /* 1X with SHA256 key derivation */
446 #define WPA2_AUTH_TPK 0x2000 /* TDLS Peer Key */
447 #define WPA2_AUTH_FT 0x4000 /* Fast Transition. */
448 #define WPA2_AUTH_PSK_SHA256 0x8000 /* PSK with SHA256 key derivation */
449 #define WPA2_AUTH_FILS_SHA256 0x10000 /* FILS with SHA256 key derivation */
450 #define WPA2_AUTH_FILS_SHA384 0x20000 /* FILS with SHA384 key derivation */
451 #define WPA2_AUTH_IS_FILS(auth) ( (auth) & (WPA2_AUTH_FILS_SHA256 | WPA2_AUTH_FILS_SHA384) )
452 #define WPA3_AUTH_SAE_PSK 0x40000 /* SAE authentication with SHA-256 */
453 #define WPA3_AUTH_SAE_FBT 0x80000 /* FT authentication over SAE */
454 #define WPA3_AUTH_OWE 0x100000 /* OWE */
455 #define WPA_AUTH_PFN_ANY 0xffffffff /* for PFN, match only ssid */
456 
457 #define MAXPMKID 16
458 #define WPA2_PMKID_LEN 16
459 typedef struct _pmkid
460 {
461  wl_ether_addr_t BSSID;
462  uint8_t PMKID[WPA2_PMKID_LEN];
463 } pmkid_t;
464 typedef struct _pmkid_list
465 {
466  uint32_t npmkid;
467  pmkid_t pmkid[1];
468 } pmkid_list_t;
469 typedef struct _pmkid_cand
470 {
471  wl_ether_addr_t BSSID;
472  uint8_t preauth;
473 } pmkid_cand_t;
474 typedef struct _pmkid_cand_list
475 {
476  uint32_t npmkid_cand;
477  pmkid_cand_t pmkid_cand[1];
479 typedef struct wl_led_info
480 {
481  uint32_t index;
482  uint32_t behavior;
483  uint8_t activehi;
484 } wl_led_info_t;
486 {
487  uint16_t capability;
488  uint16_t listen;
489 };
491 {
492  uint16_t capability;
493  uint16_t status;
494  uint16_t aid;
495 };
496 typedef struct wl_assoc_info
497 {
498  uint32_t req_len;
499  uint32_t resp_len;
500  uint32_t flags;
501  struct wl_dot11_assoc_req req;
502  wl_ether_addr_t reassoc_bssid;
503  struct wl_dot11_assoc_resp resp;
505 #define WLC_ASSOC_REQ_IS_REASSOC 0x01
506 typedef struct
507 {
508  uint32_t byteoff;
509  uint32_t nbytes;
510  uint16_t buf[1];
511 } srom_rw_t;
512 typedef struct
513 {
514  uint32_t source;
515  uint32_t byteoff;
516  uint32_t nbytes;
517 } cis_rw_t;
518 #define WLC_CIS_DEFAULT 0
519 #define WLC_CIS_SROM 1
520 #define WLC_CIS_OTP 2
521 typedef struct
522 {
523  uint32_t byteoff;
524  uint32_t val;
525  uint32_t size;
526  uint32_t band;
527 } rw_reg_t;
528 #define WL_ATTEN_APP_INPUT_PCL_OFF 0
529 #define WL_ATTEN_PCL_ON 1
530 #define WL_ATTEN_PCL_OFF 2
531 typedef struct
532 {
533  uint16_t auto_ctrl;
534  uint16_t bb;
535  uint16_t radio;
536  uint16_t txctl1;
537 } atten_t;
539 {
540  uint8_t short_retry;
541  uint8_t short_fallback;
542  uint8_t long_retry;
543  uint8_t long_fallback;
544  uint16_t max_rate;
545 };
546 typedef struct wme_tx_params_s wme_tx_params_t;
547 #define WL_WME_TX_PARAMS_IO_BYTES (sizeof(wme_tx_params_t) * AC_COUNT)
548 #define WL_PWRIDX_PCL_OFF -2
549 #define WL_PWRIDX_PCL_ON -1
550 #define WL_PWRIDX_LOWER_LIMIT -2
551 #define WL_PWRIDX_UPPER_LIMIT 63
552 typedef struct
553 {
554  uint32_t val;
555  wl_ether_addr_t ea;
556 } scb_val_t;
557 #define BCM_MAC_STATUS_INDICATION (0x40010200L)
558 typedef struct
559 {
560  uint16_t ver;
561  uint16_t len;
562  uint16_t cap;
563  uint32_t flags;
564  uint32_t idle;
565  wl_ether_addr_t ea;
566  wl_rateset_t rateset;
567  uint32_t in;
568  uint32_t listen_interval_inms;
569  uint32_t tx_pkts;
570  uint32_t tx_failures;
571  uint32_t rx_ucast_pkts;
572  uint32_t rx_mcast_pkts;
573  uint32_t tx_rate;
574  uint32_t rx_rate;
575 } sta_info_t;
576 #define WL_OLD_STAINFO_SIZE offsetof(sta_info_t, tx_pkts)
577 #define WL_STA_VER 2
578 #define WL_STA_BRCM 0x1
579 #define WL_STA_WME 0x2
580 #define WL_STA_ABCAP 0x4
581 #define WL_STA_AUTHE 0x8
582 #define WL_STA_ASSOC 0x10
583 #define WL_STA_AUTHO 0x20
584 #define WL_STA_WDS 0x40
585 #define WL_STA_WDS_LINKUP 0x80
586 #define WL_STA_PS 0x100
587 #define WL_STA_APSD_BE 0x200
588 #define WL_STA_APSD_BK 0x400
589 #define WL_STA_APSD_VI 0x800
590 #define WL_STA_APSD_VO 0x1000
591 #define WL_STA_N_CAP 0x2000
592 #define WL_STA_SCBSTATS 0x4000
593 #define WL_WDS_LINKUP WL_STA_WDS_LINKUP
594 typedef struct channel_info
595 {
596  int32_t hw_channel;
597  int32_t target_channel;
598  int32_t scan_channel;
600 struct mac_list
601 {
602  uint32_t count;
603  wl_ether_addr_t ea[1];
604 };
605 typedef struct get_pktcnt
606 {
607  uint32_t rx_good_pkt;
608  uint32_t rx_bad_pkt;
609  uint32_t tx_good_pkt;
610  uint32_t tx_bad_pkt;
611  uint32_t rx_ocast_good_pkt;
612 } get_pktcnt_t;
613 typedef struct wl_ioctl
614 {
615  uint32_t cmd;
616  void *buf;
617  uint32_t len;
618  uint8_t set;
619  uint32_t used;
620  uint32_t needed;
621 } wl_ioctl_t;
622 typedef struct wlc_rev_info
623 {
624  uint32_t vendorid;
625  uint32_t deviceid;
626  uint32_t radiorev;
627  uint32_t chiprev;
628  uint32_t corerev;
629  uint32_t boardid;
630  uint32_t boardvendor;
631  uint32_t boardrev;
632  uint32_t driverrev;
633  uint32_t ucoderev;
634  uint32_t bus;
635  uint32_t chipnum;
636  uint32_t phytype;
637  uint32_t phyrev;
638  uint32_t anarev;
640 #define WL_REV_INFO_LEGACY_LENGTH 48
641 #define WL_BRAND_MAX 10
642 typedef struct wl_instance_info
643 {
644  uint32_t instance;
645  int8_t brand[WL_BRAND_MAX];
647 typedef struct wl_txfifo_sz
648 {
649  uint8_t fifo;
650  uint8_t size;
652 #define WLC_IOV_NAME_LEN 30
653 typedef struct wlc_iov_trx_s
654 {
655  uint8_t module;
656  uint8_t type;
657  int8_t name[WLC_IOV_NAME_LEN];
658 } wlc_iov_trx_t;
659 
660 /* Event mask ext support */
661 typedef enum event_msgs_ext_command
662 {
663  EVENTMSGS_NONE = 0, EVENTMSGS_SET_BIT = 1, EVENTMSGS_RESET_BIT = 2, EVENTMSGS_SET_MASK = 3
664 } event_msgs_ext_command_t;
665 
666 #define EVENTMSGS_VER 1
667 
668 /* len- for SET it would be mask size from the application to the firmware */
669 /* for GET it would be actual firmware mask size */
670 /* maxgetsize - is only used for GET. indicate max mask size that the */
671 /* application can read from the firmware */
672 typedef struct eventmsgs_ext
673 {
674  uint8_t ver;
675  uint8_t command;
676  uint8_t len;
677  uint8_t maxgetsize;
678  uint8_t mask[1];
680 
681 #define IOVAR_STR_ACTFRAME "actframe"
682 #define IOVAR_STR_BSS "bss"
683 #define IOVAR_STR_BSS_RATESET "bss_rateset"
684 #define IOVAR_STR_CSA "csa"
685 #define IOVAR_STR_AMPDU_TID "ampdu_tid"
686 #define IOVAR_STR_APSTA "apsta"
687 #define IOVAR_STR_ALLMULTI "allmulti"
688 #define IOVAR_STR_COUNTRY "country"
689 #define IOVAR_STR_EVENT_MSGS "event_msgs"
690 #define IOVAR_STR_EVENT_MSGS_EXT "event_msgs_ext"
691 #define IOVAR_STR_ESCAN "escan"
692 #define IOVAR_STR_SUP_WPA "sup_wpa"
693 #define IOVAR_STR_CUR_ETHERADDR "cur_etheraddr"
694 #define IOVAR_STR_QTXPOWER "qtxpower"
695 #define IOVAR_STR_MCAST_LIST "mcast_list"
696 #define IOVAR_STR_PM2_SLEEP_RET "pm2_sleep_ret"
697 #define IOVAR_STR_PM_LIMIT "pm_limit"
698 #define IOVAR_STR_LISTEN_INTERVAL_BEACON "bcn_li_bcn"
699 #define IOVAR_STR_LISTEN_INTERVAL_DTIM "bcn_li_dtim"
700 #define IOVAR_STR_LISTEN_INTERVAL_ASSOC "assoc_listen"
701 #define IOVAR_PSPOLL_PERIOD "pspoll_prd"
702 #define IOVAR_STR_VENDOR_IE "vndr_ie"
703 #define IOVAR_STR_TX_GLOM "bus:txglom"
704 #define IOVAR_STR_ACTION_FRAME "actframe"
705 #define IOVAR_STR_AC_PARAMS_STA "wme_ac_sta"
706 #define IOVAR_STR_COUNTERS "counters"
707 #define IOVAR_STR_PKT_FILTER_ADD "pkt_filter_add"
708 #define IOVAR_STR_PKT_FILTER_DELETE "pkt_filter_delete"
709 #define IOVAR_STR_PKT_FILTER_ENABLE "pkt_filter_enable"
710 #define IOVAR_STR_PKT_FILTER_MODE "pkt_filter_mode"
711 #define IOVAR_STR_PKT_FILTER_LIST "pkt_filter_list"
712 #define IOVAR_STR_PKT_FILTER_STATS "pkt_filter_stats"
713 #define IOVAR_STR_PKT_FILTER_CLEAR_STATS "pkt_filter_clear_stats"
714 #define IOVAR_STR_DUTY_CYCLE_CCK "dutycycle_cck"
715 #define IOVAR_STR_DUTY_CYCLE_OFDM "dutycycle_ofdm"
716 #define IOVAR_STR_MKEEP_ALIVE "mkeep_alive"
717 #define IOVAR_STR_VERSION "ver"
718 #define IOVAR_STR_SUP_WPA2_EAPVER "sup_wpa2_eapver"
719 #define IOVAR_STR_ROAM_OFF "roam_off"
720 #define IOVAR_STR_CLOSEDNET "closednet"
721 #define IOVAR_STR_P2P_DISC "p2p_disc"
722 #define IOVAR_STR_P2P_DEV "p2p_dev"
723 #define IOVAR_STR_P2P_IF "p2p_if"
724 #define IOVAR_STR_P2P_IFADD "p2p_ifadd"
725 #define IOVAR_STR_P2P_IFDEL "p2p_ifdel"
726 #define IOVAR_STR_P2P_IFUPD "p2p_ifupd"
727 #define IOVAR_STR_P2P_SCAN "p2p_scan"
728 #define IOVAR_STR_P2P_STATE "p2p_state"
729 #define IOVAR_STR_P2P_SSID "p2p_ssid"
730 #define IOVAR_STR_P2P_IP_ADDR "p2p_ip_addr"
731 #define IOVAR_STR_NRATE "nrate"
732 #define IOVAR_STR_BGRATE "bg_rate"
733 #define IOVAR_STR_ARATE "a_rate"
734 #define IOVAR_STR_NMODE "nmode"
735 #define IOVAR_STR_MAX_ASSOC "maxassoc"
736 #define IOVAR_STR_2G_MULTICAST_RATE "2g_mrate"
737 #define IOVAR_STR_2G_RATE "2g_rate"
738 #define IOVAR_STR_MPC "mpc"
739 #define IOVAR_STR_IBSS_JOIN "IBSS_join_only"
740 #define IOVAR_STR_AMPDU_BA_WINDOW_SIZE "ampdu_ba_wsize"
741 #define IOVAR_STR_AMPDU_MPDU "ampdu_mpdu"
742 #define IOVAR_STR_AMPDU_RX "ampdu_rx"
743 #define IOVAR_STR_AMPDU_RX_FACTOR "ampdu_rx_factor"
744 #define IOVAR_STR_AMPDU_HOST_REORDER "ampdu_hostreorder"
745 #define IOVAR_STR_MIMO_BW_CAP "mimo_bw_cap"
746 #define IOVAR_STR_RMC_ACKREQ "rmc_ackreq"
747 #define IOVAR_STR_RMC_STATUS "rmc_status"
748 #define IOVAR_STR_RMC_COUNTS "rmc_stats"
749 #define IOVAR_STR_RMC_ROLE "rmc_role"
750 #define IOVAR_STR_HT40_INTOLERANCE "intol40"
751 #define IOVAR_STR_RAND "rand"
752 #define IOVAR_STR_SSID "ssid"
753 #define IOVAR_STR_WSEC "wsec"
754 #define IOVAR_STR_WPA_AUTH "wpa_auth"
755 #define IOVAR_STR_INTERFACE_REMOVE "interface_remove"
756 #define IOVAR_STR_SUP_WPA_TMO "sup_wpa_tmo"
757 #define IOVAR_STR_JOIN "join"
758 #define IOVAR_STR_TLV "tlv"
759 #define IOVAR_STR_NPHY_ANTSEL "nphy_antsel"
760 #define IOVAR_STR_AVB_TIMESTAMP_ADDR "avb_timestamp_addr"
761 #define IOVAR_STR_BSS_MAX_ASSOC "bss_maxassoc"
762 #define IOVAR_STR_RM_REQ "rm_req"
763 #define IOVAR_STR_RM_REP "rm_rep"
764 #define IOVAR_STR_PSPRETEND_RETRY_LIMIT "pspretend_retry_limit"
765 #define IOVAR_STR_PSPRETEND_THRESHOLD "pspretend_threshold"
766 #define IOVAR_STR_SWDIV_TIMEOUT "swdiv_timeout"
767 #define IOVAR_STR_RESET_CNTS "reset_cnts"
768 #define IOVAR_STR_PHYRATE_LOG "phyrate_log"
769 #define IOVAR_STR_PHYRATE_LOG_SIZE "phyrate_log_size"
770 #define IOVAR_STR_PHYRATE_LOG_DUMP "phyrate_dump"
771 #define IOVAR_STR_SCAN_ASSOC_TIME "scan_assoc_time"
772 #define IOVAR_STR_SCAN_UNASSOC_TIME "scan_unassoc_time"
773 #define IOVAR_STR_SCAN_PASSIVE_TIME "scan_passive_time"
774 #define IOVAR_STR_SCAN_HOME_TIME "scan_home_time"
775 #define IOVAR_STR_SCAN_NPROBES "scan_nprobes"
776 #define IOVAR_STR_AUTOCOUNTRY "autocountry"
777 #define IOVAR_STR_CAP "cap"
778 #define IOVAR_STR_MPDU_PER_AMPDU "ampdu_mpdu"
779 #define IOVAR_STR_VHT_FEATURES "vht_features"
780 #define IOVAR_STR_CHANSPEC "chanspec"
781 
782 #define IOVAR_STR_WOWL "wowl"
783 #define IOVAR_STR_WOWL_OS "wowl_os"
784 #define IOVAR_STR_WOWL_KEEP_ALIVE "wowl_keepalive"
785 #define IOVAR_STR_WOWL_PATTERN "wowl_pattern"
786 #define IOVAR_STR_WOWL_PATTERN_CLR "clr"
787 #define IOVAR_STR_WOWL_PATTERN_ADD "add"
788 #define IOVAR_STR_WOWL_ARP_HOST_IP "wowl_arp_hostip"
789 #define IOVAR_STR_ULP_WAIT "ulp_wait"
790 #define IOVAR_STR_ULP "ulp"
791 
792 #define IOVAR_STR_PNO_ON "pfn"
793 #define IOVAR_STR_PNO_ADD "pfn_add"
794 #define IOVAR_STR_PNO_SET "pfn_set"
795 #define IOVAR_STR_PNO_CLEAR "pfnclear"
796 #define IOVAR_STR_SCAN_CACHE_CLEAR "scancache_clear"
797 #define MCS_SETLEN 16
798 
799 #define IOVAR_STR_RRM "rrm"
800 #define IOVAR_STR_RRM_NOISE_REQ "rrm_noise_req"
801 #define IOVAR_STR_RRM_NBR_REQ "rrm_nbr_req"
802 #define IOVAR_STR_RRM_LM_REQ "rrm_lm_req"
803 #define IOVAR_STR_RRM_STAT_REQ "rrm_stat_req"
804 #define IOVAR_STR_RRM_FRAME_REQ "rrm_frame_req"
805 #define IOVAR_STR_RRM_CHLOAD_REQ "rrm_chload_req"
806 #define IOVAR_STR_RRM_BCN_REQ "rrm_bcn_req"
807 #define IOVAR_STR_RRM_NBR_LIST "rrm_nbr_list"
808 #define IOVAR_STR_RRM_NBR_ADD "rrm_nbr_add_nbr"
809 #define IOVAR_STR_RRM_NBR_DEL "rrm_nbr_del_nbr"
810 #define IOVAR_STR_RRM_BCNREQ_THRTL_WIN "rrm_bcn_req_thrtl_win"
811 #define IOVAR_STR_RRM_BCNREQ_MAXOFF_TIME "rrm_bcn_req_max_off_chan_time"
812 #define IOVAR_STR_RRM_BCNREQ_TRFMS_PRD "rrm_bcn_req_traff_meas_per"
813 
814 #define IOVAR_STR_WNM "wnm"
815 #define IOVAR_STR_BSSTRANS_QUERY "wnm_bsstrans_query"
816 #define IOVAR_STR_BSSTRANS_RESP "wnm_bsstrans_resp"
817 
818 #define IOVAR_STR_MESH_ADD_ROUTE "mesh_add_route"
819 #define IOVAR_STR_MESH_DEL_ROUTE "mesh_del_route"
820 #define IOVAR_STR_MESH_FIND "mesh_find"
821 #define IOVAR_STR_MESH_FILTER "mesh_filter"
822 #define IOVAR_STR_MESH_PEER "mesh_peer"
823 #define IOVAR_STR_MESH_PEER_STATUS "mesh_peer_status"
824 #define IOVAR_STR_MESH_DELFILTER "mesh_delfilter"
825 #define IOVAR_STR_MESH_MAX_PEERS "mesh_max_peers"
826 
827 #define IOVAR_STR_FBT_OVER_DS "fbtoverds"
828 #define IOVAR_STR_FBT_CAPABILITIES "fbt_cap"
829 
830 #define IOVAR_STR_MFP "mfp"
831 
832 #define IOVAR_STR_OTPRAW "otpraw"
833 #define IOVAR_NAN "nan"
834 #define IOVAR_STR_CLMLOAD "clmload"
835 #define IOVAR_STR_CLMLOAD_STATUS "clmload_status"
836 #define IOVAR_STR_CLMVER "clmver"
837 #define IOVAR_STR_MEMUSE "memuse"
838 
839 #define IOVAR_STR_LDPC_CAP "ldpc_cap"
840 #define IOVAR_STR_LDPC_TX "ldpc_tx"
841 #define IOVAR_STR_SGI_RX "sgi_rx"
842 #define IOVAR_STR_SGI_TX "sgi_tx"
843 
844 #define IOVAR_STR_APIVTW_OVERRIDE "brcmapivtwo"
845 
846 #define IOVAR_STR_BWTE_BWTE_GCI_MASK "bwte_gci_mask"
847 #define IOVAR_STR_BWTE_GCI_SENDMSG "bwte_gci_sendm"
848 #define IOVAR_STR_WD_DISABLE "wd_disable"
849 #define IOVAR_STR_DLTRO "dltro"
850 #define IOVAR_STR_SAE_PASSWORD "sae_password"
851 
852 #define IOVAR_STR_BTC_LESCAN_PARAMS "btc_lescan_params"
853 
854 #define IOVAR_STR_ARP_VERSION "arp_version"
855 #define IOVAR_STR_ARP_PEERAGE "arp_peerage"
856 #define IOVAR_STR_ARPOE "arpoe"
857 #define IOVAR_STR_ARP_OL "arp_ol"
858 #define IOVAR_STR_ARP_TABLE_CLEAR "arp_table_clear"
859 #define IOVAR_STR_ARP_HOSTIP "arp_hostip"
860 #define IOVAR_STR_ARP_HOSTIP_CLEAR "arp_hostip_clear"
861 #define IOVAR_STR_ARP_STATS "arp_stats"
862 #define IOVAR_STR_ARP_STATS_CLEAR "arp_stats_clear"
863 #define IOVAR_STR_TKO "tko"
864 
865 /* This value derived from the above strings, which appear maxed out in the 20s */
866 #define IOVAR_NAME_STR_MAX_SIZE 32
867 
868 #define WLC_IOCTL_MAGIC (0x14e46c77)
869 #define WLC_IOCTL_VERSION (1)
870 #define WLC_IOCTL_SMLEN (256)
871 #define WLC_IOCTL_MEDLEN (1536)
872 #define WLC_IOCTL_MAXLEN (8192)
873 
874 #define WLC_GET_MAGIC ( (uint32_t)0 )
875 #define WLC_GET_VERSION ( (uint32_t)1 )
876 #define WLC_UP ( (uint32_t)2 )
877 #define WLC_DOWN ( (uint32_t)3 )
878 #define WLC_GET_LOOP ( (uint32_t)4 )
879 #define WLC_SET_LOOP ( (uint32_t)5 )
880 #define WLC_DUMP ( (uint32_t)6 )
881 #define WLC_GET_MSGLEVEL ( (uint32_t)7 )
882 #define WLC_SET_MSGLEVEL ( (uint32_t)8 )
883 #define WLC_GET_PROMISC ( (uint32_t)9 )
884 #define WLC_SET_PROMISC ( (uint32_t)10 )
885 #define WLC_GET_RATE ( (uint32_t)12 )
886 #define WLC_GET_INSTANCE ( (uint32_t)14 )
887 #define WLC_GET_INFRA ( (uint32_t)19 )
888 #define WLC_SET_INFRA ( (uint32_t)20 )
889 #define WLC_GET_AUTH ( (uint32_t)21 )
890 #define WLC_SET_AUTH ( (uint32_t)22 )
891 #define WLC_GET_BSSID ( (uint32_t)23 )
892 #define WLC_SET_BSSID ( (uint32_t)24 )
893 #define WLC_GET_SSID ( (uint32_t)25 )
894 #define WLC_SET_SSID ( (uint32_t)26 )
895 #define WLC_RESTART ( (uint32_t)27 )
896 #define WLC_GET_CHANNEL ( (uint32_t)29 )
897 #define WLC_SET_CHANNEL ( (uint32_t)30 )
898 #define WLC_GET_SRL ( (uint32_t)31 )
899 #define WLC_SET_SRL ( (uint32_t)32 )
900 #define WLC_GET_LRL ( (uint32_t)33 )
901 #define WLC_SET_LRL ( (uint32_t)34 )
902 #define WLC_GET_PLCPHDR ( (uint32_t)35 )
903 #define WLC_SET_PLCPHDR ( (uint32_t)36 )
904 #define WLC_GET_RADIO ( (uint32_t)37 )
905 #define WLC_SET_RADIO ( (uint32_t)38 )
906 #define WLC_GET_PHYTYPE ( (uint32_t)39 )
907 #define WLC_DUMP_RATE ( (uint32_t)40 )
908 #define WLC_SET_RATE_PARAMS ( (uint32_t)41 )
909 #define WLC_GET_KEY ( (uint32_t)44 )
910 #define WLC_SET_KEY ( (uint32_t)45 )
911 #define WLC_GET_REGULATORY ( (uint32_t)46 )
912 #define WLC_SET_REGULATORY ( (uint32_t)47 )
913 #define WLC_GET_PASSIVE_SCAN ( (uint32_t)48 )
914 #define WLC_SET_PASSIVE_SCAN ( (uint32_t)49 )
915 #define WLC_SCAN ( (uint32_t)50 )
916 #define WLC_SCAN_RESULTS ( (uint32_t)51 )
917 #define WLC_DISASSOC ( (uint32_t)52 )
918 #define WLC_REASSOC ( (uint32_t)53 )
919 #define WLC_GET_ROAM_TRIGGER ( (uint32_t)54 )
920 #define WLC_SET_ROAM_TRIGGER ( (uint32_t)55 )
921 #define WLC_GET_ROAM_DELTA ( (uint32_t)56 )
922 #define WLC_SET_ROAM_DELTA ( (uint32_t)57 )
923 #define WLC_GET_ROAM_SCAN_PERIOD ( (uint32_t)58 )
924 #define WLC_SET_ROAM_SCAN_PERIOD ( (uint32_t)59 )
925 #define WLC_EVM ( (uint32_t)60 )
926 #define WLC_GET_TXANT ( (uint32_t)61 )
927 #define WLC_SET_TXANT ( (uint32_t)62 )
928 #define WLC_GET_ANTDIV ( (uint32_t)63 )
929 #define WLC_SET_ANTDIV ( (uint32_t)64 )
930 #define WLC_GET_CLOSED ( (uint32_t)67 )
931 #define WLC_SET_CLOSED ( (uint32_t)68 )
932 #define WLC_GET_MACLIST ( (uint32_t)69 )
933 #define WLC_SET_MACLIST ( (uint32_t)70 )
934 #define WLC_GET_RATESET ( (uint32_t)71 )
935 #define WLC_SET_RATESET ( (uint32_t)72 )
936 #define WLC_LONGTRAIN ( (uint32_t)74 )
937 #define WLC_GET_BCNPRD ( (uint32_t)75 )
938 #define WLC_SET_BCNPRD ( (uint32_t)76 )
939 #define WLC_GET_DTIMPRD ( (uint32_t)77 )
940 #define WLC_SET_DTIMPRD ( (uint32_t)78 )
941 #define WLC_GET_SROM ( (uint32_t)79 )
942 #define WLC_SET_SROM ( (uint32_t)80 )
943 #define WLC_GET_WEP_RESTRICT ( (uint32_t)81 )
944 #define WLC_SET_WEP_RESTRICT ( (uint32_t)82 )
945 #define WLC_GET_COUNTRY ( (uint32_t)83 )
946 #define WLC_SET_COUNTRY ( (uint32_t)84 )
947 #define WLC_GET_PM ( (uint32_t)85 )
948 #define WLC_SET_PM ( (uint32_t)86 )
949 #define WLC_GET_WAKE ( (uint32_t)87 )
950 #define WLC_SET_WAKE ( (uint32_t)88 )
951 #define WLC_GET_FORCELINK ( (uint32_t)90 )
952 #define WLC_SET_FORCELINK ( (uint32_t)91 )
953 #define WLC_FREQ_ACCURACY ( (uint32_t)92 )
954 #define WLC_CARRIER_SUPPRESS ( (uint32_t)93 )
955 #define WLC_GET_PHYREG ( (uint32_t)94 )
956 #define WLC_SET_PHYREG ( (uint32_t)95 )
957 #define WLC_GET_RADIOREG ( (uint32_t)96 )
958 #define WLC_SET_RADIOREG ( (uint32_t)97 )
959 #define WLC_GET_REVINFO ( (uint32_t)98 )
960 #define WLC_GET_UCANTDIV ( (uint32_t)99 )
961 #define WLC_SET_UCANTDIV ( (uint32_t)100 )
962 #define WLC_R_REG ( (uint32_t)101 )
963 #define WLC_W_REG ( (uint32_t)102 )
964 #define WLC_GET_MACMODE ( (uint32_t)105 )
965 #define WLC_SET_MACMODE ( (uint32_t)106 )
966 #define WLC_GET_MONITOR ( (uint32_t)107 )
967 #define WLC_SET_MONITOR ( (uint32_t)108 )
968 #define WLC_GET_GMODE ( (uint32_t)109 )
969 #define WLC_SET_GMODE ( (uint32_t)110 )
970 #define WLC_GET_LEGACY_ERP ( (uint32_t)111 )
971 #define WLC_SET_LEGACY_ERP ( (uint32_t)112 )
972 #define WLC_GET_RX_ANT ( (uint32_t)113 )
973 #define WLC_GET_CURR_RATESET ( (uint32_t)114 )
974 #define WLC_GET_SCANSUPPRESS ( (uint32_t)115 )
975 #define WLC_SET_SCANSUPPRESS ( (uint32_t)116 )
976 #define WLC_GET_AP ( (uint32_t)117 )
977 #define WLC_SET_AP ( (uint32_t)118 )
978 #define WLC_GET_EAP_RESTRICT ( (uint32_t)119 )
979 #define WLC_SET_EAP_RESTRICT ( (uint32_t)120 )
980 #define WLC_SCB_AUTHORIZE ( (uint32_t)121 )
981 #define WLC_SCB_DEAUTHORIZE ( (uint32_t)122 )
982 #define WLC_GET_WDSLIST ( (uint32_t)123 )
983 #define WLC_SET_WDSLIST ( (uint32_t)124 )
984 #define WLC_GET_ATIM ( (uint32_t)125 )
985 #define WLC_SET_ATIM ( (uint32_t)126 )
986 #define WLC_GET_RSSI ( (uint32_t)127 )
987 #define WLC_GET_PHYANTDIV ( (uint32_t)128 )
988 #define WLC_SET_PHYANTDIV ( (uint32_t)129 )
989 #define WLC_AP_RX_ONLY ( (uint32_t)130 )
990 #define WLC_GET_TX_PATH_PWR ( (uint32_t)131 )
991 #define WLC_SET_TX_PATH_PWR ( (uint32_t)132 )
992 #define WLC_GET_WSEC ( (uint32_t)133 )
993 #define WLC_SET_WSEC ( (uint32_t)134 )
994 #define WLC_GET_PHY_NOISE ( (uint32_t)135 )
995 #define WLC_GET_BSS_INFO ( (uint32_t)136 )
996 #define WLC_GET_PKTCNTS ( (uint32_t)137 )
997 #define WLC_GET_LAZYWDS ( (uint32_t)138 )
998 #define WLC_SET_LAZYWDS ( (uint32_t)139 )
999 #define WLC_GET_BANDLIST ( (uint32_t)140 )
1000 #define WLC_GET_BAND ( (uint32_t)141 )
1001 #define WLC_SET_BAND ( (uint32_t)142 )
1002 #define WLC_SCB_DEAUTHENTICATE ( (uint32_t)143 )
1003 #define WLC_GET_SHORTSLOT ( (uint32_t)144 )
1004 #define WLC_GET_SHORTSLOT_OVERRIDE ( (uint32_t)145 )
1005 #define WLC_SET_SHORTSLOT_OVERRIDE ( (uint32_t)146 )
1006 #define WLC_GET_SHORTSLOT_RESTRICT ( (uint32_t)147 )
1007 #define WLC_SET_SHORTSLOT_RESTRICT ( (uint32_t)148 )
1008 #define WLC_GET_GMODE_PROTECTION ( (uint32_t)149 )
1009 #define WLC_GET_GMODE_PROTECTION_OVERRIDE ( (uint32_t)150 )
1010 #define WLC_SET_GMODE_PROTECTION_OVERRIDE ( (uint32_t)151 )
1011 #define WLC_UPGRADE ( (uint32_t)152 )
1012 #define WLC_GET_IGNORE_BCNS ( (uint32_t)155 )
1013 #define WLC_SET_IGNORE_BCNS ( (uint32_t)156 )
1014 #define WLC_GET_SCB_TIMEOUT ( (uint32_t)157 )
1015 #define WLC_SET_SCB_TIMEOUT ( (uint32_t)158 )
1016 #define WLC_GET_ASSOCLIST ( (uint32_t)159 )
1017 #define WLC_GET_CLK ( (uint32_t)160 )
1018 #define WLC_SET_CLK ( (uint32_t)161 )
1019 #define WLC_GET_UP ( (uint32_t)162 )
1020 #define WLC_OUT ( (uint32_t)163 )
1021 #define WLC_GET_WPA_AUTH ( (uint32_t)164 )
1022 #define WLC_SET_WPA_AUTH ( (uint32_t)165 )
1023 #define WLC_GET_UCFLAGS ( (uint32_t)166 )
1024 #define WLC_SET_UCFLAGS ( (uint32_t)167 )
1025 #define WLC_GET_PWRIDX ( (uint32_t)168 )
1026 #define WLC_SET_PWRIDX ( (uint32_t)169 )
1027 #define WLC_GET_TSSI ( (uint32_t)170 )
1028 #define WLC_GET_SUP_RATESET_OVERRIDE ( (uint32_t)171 )
1029 #define WLC_SET_SUP_RATESET_OVERRIDE ( (uint32_t)172 )
1030 #define WLC_GET_PROTECTION_CONTROL ( (uint32_t)178 )
1031 #define WLC_SET_PROTECTION_CONTROL ( (uint32_t)179 )
1032 #define WLC_GET_PHYLIST ( (uint32_t)180 )
1033 #define WLC_ENCRYPT_STRENGTH ( (uint32_t)181 )
1034 #define WLC_DECRYPT_STATUS ( (uint32_t)182 )
1035 #define WLC_GET_KEY_SEQ ( (uint32_t)183 )
1036 #define WLC_GET_SCAN_CHANNEL_TIME ( (uint32_t)184 )
1037 #define WLC_SET_SCAN_CHANNEL_TIME ( (uint32_t)185 )
1038 #define WLC_GET_SCAN_UNASSOC_TIME ( (uint32_t)186 )
1039 #define WLC_SET_SCAN_UNASSOC_TIME ( (uint32_t)187 )
1040 #define WLC_GET_SCAN_HOME_TIME ( (uint32_t)188 )
1041 #define WLC_SET_SCAN_HOME_TIME ( (uint32_t)189 )
1042 #define WLC_GET_SCAN_NPROBES ( (uint32_t)190 )
1043 #define WLC_SET_SCAN_NPROBES ( (uint32_t)191 )
1044 #define WLC_GET_PRB_RESP_TIMEOUT ( (uint32_t)192 )
1045 #define WLC_SET_PRB_RESP_TIMEOUT ( (uint32_t)193 )
1046 #define WLC_GET_ATTEN ( (uint32_t)194 )
1047 #define WLC_SET_ATTEN ( (uint32_t)195 )
1048 #define WLC_GET_SHMEM ( (uint32_t)196 )
1049 #define WLC_SET_SHMEM ( (uint32_t)197 )
1050 #define WLC_SET_WSEC_TEST ( (uint32_t)200 )
1051 #define WLC_SCB_DEAUTHENTICATE_FOR_REASON ( (uint32_t)201 )
1052 #define WLC_TKIP_COUNTERMEASURES ( (uint32_t)202 )
1053 #define WLC_GET_PIOMODE ( (uint32_t)203 )
1054 #define WLC_SET_PIOMODE ( (uint32_t)204 )
1055 #define WLC_SET_ASSOC_PREFER ( (uint32_t)205 )
1056 #define WLC_GET_ASSOC_PREFER ( (uint32_t)206 )
1057 #define WLC_SET_ROAM_PREFER ( (uint32_t)207 )
1058 #define WLC_GET_ROAM_PREFER ( (uint32_t)208 )
1059 #define WLC_SET_LED ( (uint32_t)209 )
1060 #define WLC_GET_LED ( (uint32_t)210 )
1061 #define WLC_GET_INTERFERENCE_MODE ( (uint32_t)211 )
1062 #define WLC_SET_INTERFERENCE_MODE ( (uint32_t)212 )
1063 #define WLC_GET_CHANNEL_QA ( (uint32_t)213 )
1064 #define WLC_START_CHANNEL_QA ( (uint32_t)214 )
1065 #define WLC_GET_CHANNEL_SEL ( (uint32_t)215 )
1066 #define WLC_START_CHANNEL_SEL ( (uint32_t)216 )
1067 #define WLC_GET_VALID_CHANNELS ( (uint32_t)217 )
1068 #define WLC_GET_FAKEFRAG ( (uint32_t)218 )
1069 #define WLC_SET_FAKEFRAG ( (uint32_t)219 )
1070 #define WLC_GET_PWROUT_PERCENTAGE ( (uint32_t)220 )
1071 #define WLC_SET_PWROUT_PERCENTAGE ( (uint32_t)221 )
1072 #define WLC_SET_BAD_FRAME_PREEMPT ( (uint32_t)222 )
1073 #define WLC_GET_BAD_FRAME_PREEMPT ( (uint32_t)223 )
1074 #define WLC_SET_LEAP_LIST ( (uint32_t)224 )
1075 #define WLC_GET_LEAP_LIST ( (uint32_t)225 )
1076 #define WLC_GET_CWMIN ( (uint32_t)226 )
1077 #define WLC_SET_CWMIN ( (uint32_t)227 )
1078 #define WLC_GET_CWMAX ( (uint32_t)228 )
1079 #define WLC_SET_CWMAX ( (uint32_t)229 )
1080 #define WLC_GET_WET ( (uint32_t)230 )
1081 #define WLC_SET_WET ( (uint32_t)231 )
1082 #define WLC_GET_PUB ( (uint32_t)232 )
1083 #define WLC_GET_KEY_PRIMARY ( (uint32_t)235 )
1084 #define WLC_SET_KEY_PRIMARY ( (uint32_t)236 )
1085 #define WLC_GET_ACI_ARGS ( (uint32_t)238 )
1086 #define WLC_SET_ACI_ARGS ( (uint32_t)239 )
1087 #define WLC_UNSET_CALLBACK ( (uint32_t)240 )
1088 #define WLC_SET_CALLBACK ( (uint32_t)241 )
1089 #define WLC_GET_RADAR ( (uint32_t)242 )
1090 #define WLC_SET_RADAR ( (uint32_t)243 )
1091 #define WLC_SET_SPECT_MANAGMENT ( (uint32_t)244 )
1092 #define WLC_GET_SPECT_MANAGMENT ( (uint32_t)245 )
1093 #define WLC_WDS_GET_REMOTE_HWADDR ( (uint32_t)246 )
1094 #define WLC_WDS_GET_WPA_SUP ( (uint32_t)247 )
1095 #define WLC_SET_CS_SCAN_TIMER ( (uint32_t)248 )
1096 #define WLC_GET_CS_SCAN_TIMER ( (uint32_t)249 )
1097 #define WLC_MEASURE_REQUEST ( (uint32_t)250 )
1098 #define WLC_INIT ( (uint32_t)251 )
1099 #define WLC_SEND_QUIET ( (uint32_t)252 )
1100 #define WLC_KEEPALIVE ( (uint32_t)253 )
1101 #define WLC_SEND_PWR_CONSTRAINT ( (uint32_t)254 )
1102 #define WLC_UPGRADE_STATUS ( (uint32_t)255 )
1103 #define WLC_CURRENT_PWR ( (uint32_t)256 )
1104 #define WLC_GET_SCAN_PASSIVE_TIME ( (uint32_t)257 )
1105 #define WLC_SET_SCAN_PASSIVE_TIME ( (uint32_t)258 )
1106 #define WLC_LEGACY_LINK_BEHAVIOR ( (uint32_t)259 )
1107 #define WLC_GET_CHANNELS_IN_COUNTRY ( (uint32_t)260 )
1108 #define WLC_GET_COUNTRY_LIST ( (uint32_t)261 )
1109 #define WLC_GET_VAR ( (uint32_t)262 )
1110 #define WLC_SET_VAR ( (uint32_t)263 )
1111 #define WLC_NVRAM_GET ( (uint32_t)264 )
1112 #define WLC_NVRAM_SET ( (uint32_t)265 )
1113 #define WLC_NVRAM_DUMP ( (uint32_t)266 )
1114 #define WLC_REBOOT ( (uint32_t)267 )
1115 #define WLC_SET_WSEC_PMK ( (uint32_t)268 )
1116 #define WLC_GET_AUTH_MODE ( (uint32_t)269 )
1117 #define WLC_SET_AUTH_MODE ( (uint32_t)270 )
1118 #define WLC_GET_WAKEENTRY ( (uint32_t)271 )
1119 #define WLC_SET_WAKEENTRY ( (uint32_t)272 )
1120 #define WLC_NDCONFIG_ITEM ( (uint32_t)273 )
1121 #define WLC_NVOTPW ( (uint32_t)274 )
1122 #define WLC_OTPW ( (uint32_t)275 )
1123 #define WLC_IOV_BLOCK_GET ( (uint32_t)276 )
1124 #define WLC_IOV_MODULES_GET ( (uint32_t)277 )
1125 #define WLC_SOFT_RESET ( (uint32_t)278 )
1126 #define WLC_GET_ALLOW_MODE ( (uint32_t)279 )
1127 #define WLC_SET_ALLOW_MODE ( (uint32_t)280 )
1128 #define WLC_GET_DESIRED_BSSID ( (uint32_t)281 )
1129 #define WLC_SET_DESIRED_BSSID ( (uint32_t)282 )
1130 #define WLC_DISASSOC_MYAP ( (uint32_t)283 )
1131 #define WLC_GET_NBANDS ( (uint32_t)284 )
1132 #define WLC_GET_BANDSTATES ( (uint32_t)285 )
1133 #define WLC_GET_WLC_BSS_INFO ( (uint32_t)286 )
1134 #define WLC_GET_ASSOC_INFO ( (uint32_t)287 )
1135 #define WLC_GET_OID_PHY ( (uint32_t)288 )
1136 #define WLC_SET_OID_PHY ( (uint32_t)289 )
1137 #define WLC_SET_ASSOC_TIME ( (uint32_t)290 )
1138 #define WLC_GET_DESIRED_SSID ( (uint32_t)291 )
1139 #define WLC_GET_CHANSPEC ( (uint32_t)292 )
1140 #define WLC_GET_ASSOC_STATE ( (uint32_t)293 )
1141 #define WLC_SET_PHY_STATE ( (uint32_t)294 )
1142 #define WLC_GET_SCAN_PENDING ( (uint32_t)295 )
1143 #define WLC_GET_SCANREQ_PENDING ( (uint32_t)296 )
1144 #define WLC_GET_PREV_ROAM_REASON ( (uint32_t)297 )
1145 #define WLC_SET_PREV_ROAM_REASON ( (uint32_t)298 )
1146 #define WLC_GET_BANDSTATES_PI ( (uint32_t)299 )
1147 #define WLC_GET_PHY_STATE ( (uint32_t)300 )
1148 #define WLC_GET_BSS_WPA_RSN ( (uint32_t)301 )
1149 #define WLC_GET_BSS_WPA2_RSN ( (uint32_t)302 )
1150 #define WLC_GET_BSS_BCN_TS ( (uint32_t)303 )
1151 #define WLC_GET_INT_DISASSOC ( (uint32_t)304 )
1152 #define WLC_SET_NUM_PEERS ( (uint32_t)305 )
1153 #define WLC_GET_NUM_BSS ( (uint32_t)306 )
1154 #define WLC_GET_WSEC_PMK ( (uint32_t)318 )
1155 #define WLC_GET_RANDOM_BYTES ( (uint32_t)319 )
1156 #define WLC_LAST ( (uint32_t)320 )
1157 
1158 #define EPICTRL_COOKIE 0xABADCEDE
1159 #define CMN_IOCTL_OFF 0x180
1160 #define WL_OID_BASE 0xFFE41420
1161 #define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE)
1162 #define OID_WL_GET_FORCELINK (WL_OID_BASE + WLC_GET_FORCELINK)
1163 #define OID_WL_SET_FORCELINK (WL_OID_BASE + WLC_SET_FORCELINK)
1164 #define OID_WL_ENCRYPT_STRENGTH (WL_OID_BASE + WLC_ENCRYPT_STRENGTH)
1165 #define OID_WL_DECRYPT_STATUS (WL_OID_BASE + WLC_DECRYPT_STATUS)
1166 #define OID_LEGACY_LINK_BEHAVIOR (WL_OID_BASE + WLC_LEGACY_LINK_BEHAVIOR)
1167 #define OID_WL_NDCONFIG_ITEM (WL_OID_BASE + WLC_NDCONFIG_ITEM)
1168 #define OID_STA_CHANSPEC (WL_OID_BASE + WLC_GET_CHANSPEC)
1169 #define OID_STA_NBANDS (WL_OID_BASE + WLC_GET_NBANDS)
1170 #define OID_STA_GET_PHY (WL_OID_BASE + WLC_GET_OID_PHY)
1171 #define OID_STA_SET_PHY (WL_OID_BASE + WLC_SET_OID_PHY)
1172 #define OID_STA_ASSOC_TIME (WL_OID_BASE + WLC_SET_ASSOC_TIME)
1173 #define OID_STA_DESIRED_SSID (WL_OID_BASE + WLC_GET_DESIRED_SSID)
1174 #define OID_STA_SET_PHY_STATE (WL_OID_BASE + WLC_SET_PHY_STATE)
1175 #define OID_STA_SCAN_PENDING (WL_OID_BASE + WLC_GET_SCAN_PENDING)
1176 #define OID_STA_SCANREQ_PENDING (WL_OID_BASE + WLC_GET_SCANREQ_PENDING)
1177 #define OID_STA_GET_ROAM_REASON (WL_OID_BASE + WLC_GET_PREV_ROAM_REASON)
1178 #define OID_STA_SET_ROAM_REASON (WL_OID_BASE + WLC_SET_PREV_ROAM_REASON)
1179 #define OID_STA_GET_PHY_STATE (WL_OID_BASE + WLC_GET_PHY_STATE)
1180 #define OID_STA_INT_DISASSOC (WL_OID_BASE + WLC_GET_INT_DISASSOC)
1181 #define OID_STA_SET_NUM_PEERS (WL_OID_BASE + WLC_SET_NUM_PEERS)
1182 #define OID_STA_GET_NUM_BSS (WL_OID_BASE + WLC_GET_NUM_BSS)
1183 #define WL_DECRYPT_STATUS_SUCCESS 1
1184 #define WL_DECRYPT_STATUS_FAILURE 2
1185 #define WL_DECRYPT_STATUS_UNKNOWN 3
1186 #define WLC_UPGRADE_SUCCESS 0
1187 #define WLC_UPGRADE_PENDING 1
1188 typedef struct
1189 {
1190  int8_t *name;
1191  void *param;
1192 } ndconfig_item_t;
1193 typedef struct _wl_assoc_result
1194 {
1195  unsigned long associated;
1196  unsigned long NDIS_auth;
1197  unsigned long NDIS_infra;
1199 #define WL_RADIO_SW_DISABLE (1 << 0)
1200 #define WL_RADIO_HW_DISABLE (1 << 1)
1201 #define WL_RADIO_MPC_DISABLE (1 << 2)
1202 #define WL_RADIO_COUNTRY_DISABLE (1 << 3)
1203 #define WL_TXPWR_OVERRIDE (1U << 31)
1204 #define WL_PHY_PAVARS_LEN (6)
1205 #define WL_DIAG_INTERRUPT (1)
1206 #define WL_DIAG_LOOPBACK (2)
1207 #define WL_DIAG_MEMORY (3)
1208 #define WL_DIAG_LED (4)
1209 #define WL_DIAG_REG (5)
1210 #define WL_DIAG_SROM (6)
1211 #define WL_DIAG_DMA (7)
1212 #define WL_DIAGERR_SUCCESS (0)
1213 #define WL_DIAGERR_FAIL_TO_RUN (1)
1214 #define WL_DIAGERR_NOT_SUPPORTED (2)
1215 #define WL_DIAGERR_INTERRUPT_FAIL (3)
1216 #define WL_DIAGERR_LOOPBACK_FAIL (4)
1217 #define WL_DIAGERR_SROM_FAIL (5)
1218 #define WL_DIAGERR_SROM_BADCRC (6)
1219 #define WL_DIAGERR_REG_FAIL (7)
1220 #define WL_DIAGERR_MEMORY_FAIL (8)
1221 #define WL_DIAGERR_NOMEM (9)
1222 #define WL_DIAGERR_DMA_FAIL (10)
1223 #define WL_DIAGERR_MEMORY_TIMEOUT (11)
1224 #define WL_DIAGERR_MEMORY_BADPATTERN (12)
1225 #define WLC_BAND_AUTO (0)
1226 #define WLC_BAND_5G (1)
1227 #define WLC_BAND_2G (2)
1228 #define WLC_BAND_ALL (3)
1229 #define WL_CHAN_FREQ_RANGE_2G (0)
1230 #define WL_CHAN_FREQ_RANGE_5GL (1)
1231 #define WL_CHAN_FREQ_RANGE_5GM (2)
1232 #define WL_CHAN_FREQ_RANGE_5GH (3)
1233 #define WLC_PHY_TYPE_A (0)
1234 #define WLC_PHY_TYPE_B (1)
1235 #define WLC_PHY_TYPE_G (2)
1236 #define WLC_PHY_TYPE_N (4)
1237 #define WLC_PHY_TYPE_LP (5)
1238 #define WLC_PHY_TYPE_SSN (6)
1239 #define WLC_PHY_TYPE_NULL (0xf)
1240 #define WLC_MACMODE_DISABLED (0)
1241 #define WLC_MACMODE_DENY (1)
1242 #define WLC_MACMODE_ALLOW (2)
1243 #define GMODE_LEGACY_B (0)
1244 #define GMODE_AUTO (1)
1245 #define GMODE_ONLY (2)
1246 #define GMODE_B_DEFERRED (3)
1247 #define GMODE_PERFORMANCE (4)
1248 #define GMODE_LRS (5)
1249 #define GMODE_MAX (6)
1250 #define WLC_PLCP_AUTO (-1)
1251 #define WLC_PLCP_SHORT (0)
1252 #define WLC_PLCP_LONG (1)
1253 #define WLC_PROTECTION_AUTO (-1)
1254 #define WLC_PROTECTION_OFF (0)
1255 #define WLC_PROTECTION_ON (1)
1256 #define WLC_PROTECTION_MMHDR_ONLY (2)
1257 #define WLC_PROTECTION_CTS_ONLY (3)
1258 #define WLC_PROTECTION_CTL_OFF (0)
1259 #define WLC_PROTECTION_CTL_LOCAL (1)
1260 #define WLC_PROTECTION_CTL_OVERLAP (2)
1261 #define WLC_N_PROTECTION_OFF (0)
1262 #define WLC_N_PROTECTION_OPTIONAL (1)
1263 #define WLC_N_PROTECTION_20IN40 (2)
1264 #define WLC_N_PROTECTION_MIXEDMODE (3)
1265 #define WLC_N_PREAMBLE_MIXEDMODE (0)
1266 #define WLC_N_PREAMBLE_GF (1)
1267 #define WLC_N_BW_20ALL (0)
1268 #define WLC_N_BW_40ALL (1)
1269 #define WLC_N_BW_20IN2G_40IN5G (2)
1270 #define WLC_N_TXRX_CHAIN0 (0)
1271 #define WLC_N_TXRX_CHAIN1 (1)
1272 #define WLC_N_SGI_20 (0x01)
1273 #define WLC_N_SGI_40 (0x02)
1274 #define PM_OFF (0)
1275 #define PM_MAX (1)
1276 #define PM_FAST (2)
1277 #define PM_FORCE_OFF (3)
1278 #define INTERFERE_NONE (0)
1279 #define NON_WLAN (1)
1280 #define WLAN_MANUAL (2)
1281 #define WLAN_AUTO (3)
1282 #define AUTO_ACTIVE (1 << 7)
1283 typedef struct wl_aci_args
1284 {
1285  int32_t enter_aci_thresh;
1286  int32_t exit_aci_thresh;
1287  int32_t usec_spin;
1288  int32_t glitch_delay;
1289  uint16_t nphy_adcpwr_enter_thresh;
1290  uint16_t nphy_adcpwr_exit_thresh;
1291  uint16_t nphy_repeat_ctr;
1292  uint16_t nphy_num_samples;
1293  uint16_t nphy_undetect_window_sz;
1294  uint16_t nphy_b_energy_lo_aci;
1295  uint16_t nphy_b_energy_md_aci;
1296  uint16_t nphy_b_energy_hi_aci;
1297 } wl_aci_args_t;
1298 #define WL_ACI_ARGS_LEGACY_LENGTH 16
1299 typedef struct
1300 {
1301  int32_t npulses;
1302  int32_t ncontig;
1303  int32_t min_pw;
1304  int32_t max_pw;
1305  uint16_t thresh0;
1306  uint16_t thresh1;
1307  uint16_t blank;
1308  uint16_t fmdemodcfg;
1309  int32_t npulses_lp;
1310  int32_t min_pw_lp;
1311  int32_t max_pw_lp;
1312  int32_t min_fm_lp;
1313  int32_t max_deltat_lp;
1314  int32_t min_deltat;
1315  int32_t max_deltat;
1316  uint16_t autocorr;
1317  uint16_t st_level_time;
1318  uint16_t t2_min;
1319  uint32_t version;
1320 } wl_radar_args_t;
1321 #define WL_RADAR_ARGS_VERSION 1
1322 #define WL_RADAR_DETECTOR_OFF 0
1323 #define WL_RADAR_DETECTOR_ON 1
1324 #define WL_RADAR_SIMULATED 2
1325 #define WL_RSSI_ANT_VERSION 1
1326 #define WL_RSSI_ANT_MAX 4
1327 typedef struct
1328 {
1329  uint32_t version;
1330  uint32_t count;
1331  int8_t rssi_ant[WL_RSSI_ANT_MAX];
1332 } wl_rssi_ant_t;
1333 #define WL_DFS_CACSTATE_IDLE 0
1334 #define WL_DFS_CACSTATE_PREISM_CAC 1
1335 #define WL_DFS_CACSTATE_ISM 2
1336 #define WL_DFS_CACSTATE_CSA 3
1337 #define WL_DFS_CACSTATE_POSTISM_CAC 4
1338 #define WL_DFS_CACSTATE_PREISM_OOC 5
1339 #define WL_DFS_CACSTATE_POSTISM_OOC 6
1340 #define WL_DFS_CACSTATES 7
1341 typedef struct
1342 {
1343  uint32_t state;
1344  uint32_t duration;
1345  wl_chanspec_t chanspec_cleared;
1346  uint16_t pad;
1347 } wl_dfs_status_t;
1348 #define NUM_PWRCTRL_RATES 12
1349 typedef struct
1350 {
1351  uint8_t txpwr_band_max[NUM_PWRCTRL_RATES];
1352  uint8_t txpwr_limit[NUM_PWRCTRL_RATES];
1353  uint8_t txpwr_local_max;
1354  uint8_t txpwr_local_constraint;
1355  uint8_t txpwr_chan_reg_max;
1356  uint8_t txpwr_target[2][NUM_PWRCTRL_RATES];
1357  uint8_t txpwr_est_Pout[2];
1358  uint8_t txpwr_opo[NUM_PWRCTRL_RATES];
1359  uint8_t txpwr_bphy_cck_max[NUM_PWRCTRL_RATES];
1360  uint8_t txpwr_bphy_ofdm_max;
1361  uint8_t txpwr_aphy_max[NUM_PWRCTRL_RATES];
1362  int8_t txpwr_antgain[2];
1363  uint8_t txpwr_est_Pout_gofdm;
1365 #define WL_TX_POWER_RATES 45
1366 #define WL_TX_POWER_CCK_FIRST 0
1367 #define WL_TX_POWER_CCK_NUM 4
1368 #define WL_TX_POWER_OFDM_FIRST 4
1369 #define WL_TX_POWER_OFDM_NUM 8
1370 #define WL_TX_POWER_MCS_SISO_NUM 8
1371 #define WL_TX_POWER_MCS20_FIRST 12
1372 #define WL_TX_POWER_MCS20_NUM 16
1373 #define WL_TX_POWER_MCS40_FIRST 28
1374 #define WL_TX_POWER_MCS40_NUM 17
1375 #define WL_TX_POWER_MCS20SISO_NUM 8
1376 #define WL_TX_POWER_MCS40_LAST 44
1377 #define WL_TX_POWER_F_ENABLED 1
1378 #define WL_TX_POWER_F_HW 2
1379 #define WL_TX_POWER_F_MIMO 4
1380 #define WL_TX_POWER_F_SISO 8
1381 #define WL_TX_POWER_F_40M_CAP 16
1382 
1383 #define MAX_QTX_POWER 32
1384 typedef struct
1385 {
1386  uint32_t flags;
1387  wl_chanspec_t chanspec;
1388  wl_chanspec_t local_chanspec;
1389  uint8_t local_max;
1390  uint8_t local_constraint;
1391  int8_t antgain[2];
1392  uint8_t rf_cores;
1393  uint8_t est_Pout[4];
1394  uint8_t est_Pout_cck;
1395  uint8_t user_limit[WL_TX_POWER_RATES];
1396  uint8_t reg_limit[WL_TX_POWER_RATES];
1397  uint8_t board_limit[WL_TX_POWER_RATES];
1398  uint8_t target[WL_TX_POWER_RATES];
1399 } tx_power_t;
1400 typedef struct tx_inst_power
1401 {
1402  uint8_t txpwr_est_Pout[2];
1403  uint8_t txpwr_est_Pout_gofdm;
1404 } tx_inst_power_t;
1405 #define WLC_MEASURE_TPC 1
1406 #define WLC_MEASURE_CHANNEL_BASIC 2
1407 #define WLC_MEASURE_CHANNEL_CCA 3
1408 #define WLC_MEASURE_CHANNEL_RPI 4
1409 #define SPECT_MNGMT_OFF 0
1410 #define SPECT_MNGMT_LOOSE_11H 1
1411 #define SPECT_MNGMT_STRICT_11H 2
1412 #define SPECT_MNGMT_STRICT_11D 3
1413 #define SPECT_MNGMT_LOOSE_11H_D 4
1414 #define WL_CHAN_VALID_HW (1 << 0)
1415 #define WL_CHAN_VALID_SW (1 << 1)
1416 #define WL_CHAN_BAND_5G (1 << 2)
1417 #define WL_CHAN_RADAR (1 << 3)
1418 #define WL_CHAN_INACTIVE (1 << 4)
1419 #define WL_CHAN_PASSIVE (1 << 5)
1420 #define WL_CHAN_RESTRICTED (1 << 6)
1421 #define WL_BTC_DISABLE 0
1422 #define WL_BTC_ENABLE (1 << 0)
1423 #define WL_BTC_PREMPT (1 << 1)
1424 #define WL_BTC_PARTIAL (1 << 2)
1425 #define WL_BTC_DEFAULT (1 << 3)
1426 #define WL_BTC_HYBRID (WL_BTC_ENABLE | WL_BTC_PARTIAL)
1427 #define WL_INF_BTC_DISABLE 0
1428 #define WL_INF_BTC_ENABLE 1
1429 #define WL_INF_BTC_AUTO 3
1430 #define WL_BTC_DEFWIRE 0
1431 #define WL_BTC_2WIRE 2
1432 #define WL_BTC_3WIRE 3
1433 #define WL_BTC_4WIRE 4
1434 #define WL_BTC_FLAG_PREMPT (1 << 0)
1435 #define WL_BTC_FLAG_BT_DEF (1 << 1)
1436 #define WL_BTC_FLAG_ACTIVE_PROT (1 << 2)
1437 #define WL_BTC_FLAG_SIM_RSP (1 << 3)
1438 #define WL_BTC_FLAG_PS_PROTECT (1 << 4)
1439 #define WL_BTC_FLAG_SIM_TX_LP (1 << 5)
1440 #define WL_BTC_FLAG_ECI (1 << 6)
1441 #define WL_ERROR_VAL 0x00000001
1442 #define WL_TRACE_VAL 0x00000002
1443 #define WL_PRHDRS_VAL 0x00000004
1444 #define WL_PRPKT_VAL 0x00000008
1445 #define WL_INFORM_VAL 0x00000010
1446 #define WL_TMP_VAL 0x00000020
1447 #define WL_OID_VAL 0x00000040
1448 #define WL_RATE_VAL 0x00000080
1449 #define WL_ASSOC_VAL 0x00000100
1450 #define WL_PRUSR_VAL 0x00000200
1451 #define WL_PS_VAL 0x00000400
1452 #define WL_TXPWR_VAL 0x00000800
1453 #define WL_PORT_VAL 0x00001000
1454 #define WL_DUAL_VAL 0x00002000
1455 #define WL_WSEC_VAL 0x00004000
1456 #define WL_WSEC_DUMP_VAL 0x00008000
1457 #define WL_LOG_VAL 0x00010000
1458 #define WL_NRSSI_VAL 0x00020000
1459 #define WL_LOFT_VAL 0x00040000
1460 #define WL_REGULATORY_VAL 0x00080000
1461 #define WL_PHYCAL_VAL 0x00100000
1462 #define WL_RADAR_VAL 0x00200000
1463 #define WL_MPC_VAL 0x00400000
1464 #define WL_APSTA_VAL 0x00800000
1465 #define WL_DFS_VAL 0x01000000
1466 #define WL_BA_VAL 0x02000000
1467 #define WL_NITRO_VAL 0x04000000
1468 #define WL_MBSS_VAL 0x04000000
1469 #define WL_CAC_VAL 0x08000000
1470 #define WL_AMSDU_VAL 0x10000000
1471 #define WL_AMPDU_VAL 0x20000000
1472 #define WL_FFPLD_VAL 0x40000000
1473 #define WL_NIN_VAL 0x80000000
1474 #define WL_DPT_VAL 0x00000001
1475 #define WL_SCAN_VAL 0x00000002
1476 #define WL_WOWL_VAL 0x00000004
1477 #define WL_COEX_VAL 0x00000008
1478 #define WL_RTDC_VAL 0x00000010
1479 #define WL_BTA_VAL 0x00000040
1480 #define WL_LED_NUMGPIO 16
1481 #define WL_LED_OFF 0
1482 #define WL_LED_ON 1
1483 #define WL_LED_ACTIVITY 2
1484 #define WL_LED_RADIO 3
1485 #define WL_LED_ARADIO 4
1486 #define WL_LED_BRADIO 5
1487 #define WL_LED_BGMODE 6
1488 #define WL_LED_WI1 7
1489 #define WL_LED_WI2 8
1490 #define WL_LED_WI3 9
1491 #define WL_LED_ASSOC 10
1492 #define WL_LED_INACTIVE 11
1493 #define WL_LED_ASSOCACT 12
1494 #define WL_LED_NUMBEHAVIOR 13
1495 #define WL_LED_BEH_MASK 0x7f
1496 #define WL_LED_AL_MASK 0x80
1497 #define WL_NUMCHANNELS 64
1498 #define WL_NUMCHANSPECS 100
1499 #define WL_WDS_WPA_ROLE_AUTH 0
1500 #define WL_WDS_WPA_ROLE_SUP 1
1501 #define WL_WDS_WPA_ROLE_AUTO 255
1502 #define WL_EVENTING_MASK_LEN ( (WLC_E_LAST + 7) / 8 )
1503 
1504 #define VNDR_IE_CMD_LEN 4
1505 #define VNDR_IE_BEACON_FLAG 0x1
1506 #define VNDR_IE_PRBRSP_FLAG 0x2
1507 #define VNDR_IE_ASSOCRSP_FLAG 0x4
1508 #define VNDR_IE_AUTHRSP_FLAG 0x8
1509 #define VNDR_IE_PRBREQ_FLAG 0x10
1510 #define VNDR_IE_ASSOCREQ_FLAG 0x20
1511 #define VNDR_IE_CUSTOM_FLAG 0x100
1512 #define VNDR_IE_INFO_HDR_LEN (sizeof(uint32_t) )
1514 {
1515  uint8_t id;
1516  uint8_t len;
1517  uint8_t oui[3];
1518  uint8_t data[1];
1519 };
1520 typedef struct wl_vndr_ie wl_vndr_ie_t;
1521 typedef struct
1522 {
1523  uint32_t pktflag;
1524  wl_vndr_ie_t vndr_ie_data;
1525 } vndr_ie_info_t;
1526 typedef struct
1527 {
1528  int32_t iecount;
1529  vndr_ie_info_t vndr_ie_list[1];
1530 } vndr_ie_buf_t;
1531 typedef struct
1532 {
1533  int8_t cmd[VNDR_IE_CMD_LEN];
1534  vndr_ie_buf_t vndr_ie_buffer;
1536 #define WL_JOIN_PREF_RSSI 1
1537 #define WL_JOIN_PREF_WPA 2
1538 #define WL_JOIN_PREF_BAND 3
1539 #define WLJP_BAND_ASSOC_PREF 255
1540 #define WL_WPA_ACP_MCS_ANY "\x00\x00\x00\x00"
1542 {
1543  uint8_t octets[3];
1544 };
1545 #define NFIFO 6
1546 #define WL_CNT_T_VERSION 6
1547 #define WL_CNT_EXT_T_VERSION 1
1548 #define WL_PHYRATE_LOG_SIZE 1200
1549 
1550 typedef struct
1551 {
1552  uint16_t version; /* see definition of WL_CNT_T_VERSION */
1553  uint16_t length; /* length of entire structure */
1554 
1555  /* transmit stat counters */
1556  uint32_t txframe; /* tx data frames */
1557  uint32_t txbyte; /* tx data bytes */
1558  uint32_t txretrans; /* tx mac retransmits */
1559  uint32_t txerror; /* tx data errors (derived: sum of others) */
1560  uint32_t txctl; /* tx management frames */
1561  uint32_t txprshort; /* tx short preamble frames */
1562  uint32_t txserr; /* tx status errors */
1563  uint32_t txnobuf; /* tx out of buffers errors */
1564  uint32_t txnoassoc; /* tx discard because we're not associated */
1565  uint32_t txrunt; /* tx runt frames */
1566  uint32_t txchit; /* tx header cache hit (fastpath) */
1567  uint32_t txcmiss; /* tx header cache miss (slowpath) */
1568 
1569  /* transmit chip error counters */
1570  uint32_t txuflo; /* tx fifo underflows */
1571  uint32_t txphyerr; /* tx phy errors (indicated in tx status) */
1572  uint32_t txphycrs; /* PR8861/8963 counter */
1573 
1574  /* receive stat counters */
1575  uint32_t rxframe; /* rx data frames */
1576  uint32_t rxbyte; /* rx data bytes */
1577  uint32_t rxerror; /* rx data errors (derived: sum of others) */
1578  uint32_t rxctl; /* rx management frames */
1579  uint32_t rxnobuf; /* rx out of buffers errors */
1580  uint32_t rxnondata; /* rx non data frames in the data channel errors */
1581  uint32_t rxbadds; /* rx bad DS errors */
1582  uint32_t rxbadcm; /* rx bad control or management frames */
1583  uint32_t rxfragerr; /* rx fragmentation errors */
1584  uint32_t rxrunt; /* rx runt frames */
1585  uint32_t rxgiant; /* rx giant frames */
1586  uint32_t rxnoscb; /* rx no scb error */
1587  uint32_t rxbadproto; /* rx invalid frames */
1588  uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */
1589  uint32_t rxbadda; /* rx frames tossed for invalid da */
1590  uint32_t rxfilter; /* rx frames filtered out */
1591 
1592  /* receive chip error counters */
1593  uint32_t rxoflo; /* rx fifo overflow errors */
1594  uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */
1595 
1596  uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */
1597  uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */
1598  uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */
1599 
1600  /* misc counters */
1601  uint32_t dmade; /* tx/rx dma descriptor errors */
1602  uint32_t dmada; /* tx/rx dma data errors */
1603  uint32_t dmape; /* tx/rx dma descriptor protocol errors */
1604  uint32_t reset; /* reset count */
1605  uint32_t tbtt; /* cnts the TBTT int's */
1606  uint32_t txdmawar; /* # occurrences of PR15420 workaround */
1607  uint32_t pkt_callback_reg_fail; /* callbacks register failure */
1608 
1609  /* MAC counters: 32-bit version of d11.h's macstat_t */
1610  uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
1611  * Control Management (includes retransmissions)
1612  */
1613  uint32_t txrtsfrm; /* number of RTS sent out by the MAC */
1614  uint32_t txctsfrm; /* number of CTS sent out by the MAC */
1615  uint32_t txackfrm; /* number of ACK frames sent out */
1616  uint32_t txdnlfrm; /* Not used */
1617  uint32_t txbcnfrm; /* beacons transmitted */
1618  uint32_t txfunfl[8]; /* per-fifo tx underflows */
1619  uint32_t txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS
1620  * or BCN)
1621  */
1622  uint32_t txphyerror; /* Transmit phy error, type of error is reported in tx-status for
1623  * driver enqueued frames
1624  */
1625  uint32_t rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */
1626  uint32_t rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */
1627  uint32_t rxinvmachdr; /* Either the protocol version != 0 or frame type not
1628  * data/control/management
1629  */
1630  uint32_t rxbadfcs; /* number of frames for which the CRC check failed in the MAC */
1631  uint32_t rxbadplcp; /* parity check of the PLCP header failed */
1632  uint32_t rxcrsglitch; /* PHY was able to correlate the preamble but not the header */
1633  uint32_t rxstrt; /* Number of received frames with a good PLCP
1634  * (i.e. passing parity check)
1635  */
1636  uint32_t rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */
1637  uint32_t rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */
1638  uint32_t rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */
1639  uint32_t rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */
1640  uint32_t rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */
1641  uint32_t rxackucast; /* number of ucast ACKS received (good FCS) */
1642  uint32_t rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */
1643  uint32_t rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */
1644  uint32_t rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */
1645  uint32_t rxrtsocast; /* number of received RTS not addressed to the MAC */
1646  uint32_t rxctsocast; /* number of received CTS not addressed to the MAC */
1647  uint32_t rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */
1648  uint32_t rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */
1649  uint32_t rxcfrmmcast; /* number of RX Control multicast frames received by the MAC
1650  * (unlikely to see these)
1651  */
1652  uint32_t rxbeaconmbss; /* beacons received from member of BSS */
1653  uint32_t rxdfrmucastobss; /* number of unicast frames addressed to the MAC from
1654  * other BSS (WDS FRAME)
1655  */
1656  uint32_t rxbeaconobss; /* beacons received from other BSS */
1657  uint32_t rxrsptmout; /* Number of response timeouts for transmitted frames
1658  * expecting a response
1659  */
1660  uint32_t bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */
1661  uint32_t rxf0ovfl; /* Number of receive fifo 0 overflows */
1662  uint32_t rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */
1663  uint32_t rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */
1664  uint32_t txsfovfl; /* Number of transmit status fifo overflows (obsolete) */
1665  uint32_t pmqovfl; /* Number of PMQ overflows */
1666  uint32_t rxcgprqfrm; /* Number of received Probe requests that made it into
1667  * the PRQ fifo
1668  */
1669  uint32_t rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */
1670  uint32_t txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did
1671  * not get ACK
1672  */
1673  uint32_t txcgprssuc; /* Tx Probe Response Success (ACK was received) */
1674  uint32_t prs_timeout; /* Number of probe requests that were dropped from the PRQ
1675  * fifo because a probe response could not be sent out within
1676  * the time limit defined in M_PRS_MAXTIME
1677  */
1678  uint32_t rxnack; /* XXX Number of NACKS received (Afterburner) */
1679  uint32_t frmscons; /* XXX Number of frames completed without transmission because of an
1680  * Afterburner re-queue
1681  */
1682  uint32_t txnack; /* XXX Number of NACKs transmitted (Afterburner) */
1683  uint32_t txglitch_nack; /* obsolete */
1684  uint32_t txburst; /* obsolete */
1685 
1686  /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
1687  uint32_t txfrag; /* dot11TransmittedFragmentCount */
1688  uint32_t txmulti; /* dot11MulticastTransmittedFrameCount */
1689  uint32_t txfail; /* dot11FailedCount */
1690  uint32_t txretry; /* dot11RetryCount */
1691  uint32_t txretrie; /* dot11MultipleRetryCount */
1692  uint32_t rxdup; /* dot11FrameduplicateCount */
1693  uint32_t txrts; /* dot11RTSSuccessCount */
1694  uint32_t txnocts; /* dot11RTSFailureCount */
1695  uint32_t txnoack; /* dot11ACKFailureCount */
1696  uint32_t rxfrag; /* dot11ReceivedFragmentCount */
1697  uint32_t rxmulti; /* dot11MulticastReceivedFrameCount */
1698  uint32_t rxcrc; /* dot11FCSErrorCount */
1699  uint32_t txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */
1700  uint32_t rxundec; /* dot11WEPUndecryptableCount */
1701 
1702  /* WPA2 counters (see rxundec for DecryptFailureCount) */
1703  uint32_t tkipmicfaill; /* TKIPLocalMICFailures */
1704  uint32_t tkipcntrmsr; /* TKIPCounterMeasuresInvoked */
1705  uint32_t tkipreplay; /* TKIPReplays */
1706  uint32_t ccmpfmterr; /* CCMPFormatErrors */
1707  uint32_t ccmpreplay; /* CCMPReplays */
1708  uint32_t ccmpundec; /* CCMPDecryptErrors */
1709  uint32_t fourwayfail; /* FourWayHandshakeFailures */
1710  uint32_t wepundec; /* dot11WEPUndecryptableCount */
1711  uint32_t wepicverr; /* dot11WEPICVErrorCount */
1712  uint32_t decsuccess; /* DecryptSuccessCount */
1713  uint32_t tkipicverr; /* TKIPICVErrorCount */
1714  uint32_t wepexcluded; /* dot11WEPExcludedCount */
1715 
1716  uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */
1717 
1718  /* WPA2 counters (see rxundec for DecryptFailureCount) */
1719  uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */
1720  uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */
1721  uint32_t tkipreplay_mcst; /* TKIPReplays */
1722  uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */
1723  uint32_t ccmpreplay_mcst; /* CCMPReplays */
1724  uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */
1725  uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */
1726  uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */
1727  uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */
1728  uint32_t decsuccess_mcst; /* DecryptSuccessCount */
1729  uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */
1730  uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */
1731 
1732  uint32_t txchanrej; /* Tx frames suppressed due to channel rejection */
1733  uint32_t txexptime; /* Tx frames suppressed due to timer expiration */
1734  uint32_t psmwds; /* Count PSM watchdogs */
1735  uint32_t phywatchdog; /* Count Phy watchdogs (triggered by ucode) */
1736 
1737  /* MBSS counters, AP only */
1738  uint32_t prq_entries_handled; /* PRQ entries read in */
1739  uint32_t prq_undirected_entries; /* which were bcast bss & ssid */
1740  uint32_t prq_bad_entries; /* which could not be translated to info */
1741  uint32_t atim_suppress_count; /* TX suppressions on ATIM fifo */
1742  uint32_t bcn_template_not_ready; /* Template marked in use on send bcn ... */
1743  uint32_t bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */
1744  uint32_t late_tbtt_dpc; /* TBTT DPC did not happen in time */
1745 
1746  /* per-rate receive stat counters */
1747  uint32_t rx1mbps; /* packets rx at 1Mbps */
1748  uint32_t rx2mbps; /* packets rx at 2Mbps */
1749  uint32_t rx5mbps5; /* packets rx at 5.5Mbps */
1750  uint32_t rx6mbps; /* packets rx at 6Mbps */
1751  uint32_t rx9mbps; /* packets rx at 9Mbps */
1752  uint32_t rx11mbps; /* packets rx at 11Mbps */
1753  uint32_t rx12mbps; /* packets rx at 12Mbps */
1754  uint32_t rx18mbps; /* packets rx at 18Mbps */
1755  uint32_t rx24mbps; /* packets rx at 24Mbps */
1756  uint32_t rx36mbps; /* packets rx at 36Mbps */
1757  uint32_t rx48mbps; /* packets rx at 48Mbps */
1758  uint32_t rx54mbps; /* packets rx at 54Mbps */
1759  uint32_t rx108mbps; /* packets rx at 108mbps */
1760  uint32_t rx162mbps; /* packets rx at 162mbps */
1761  uint32_t rx216mbps; /* packets rx at 216 mbps */
1762  uint32_t rx270mbps; /* packets rx at 270 mbps */
1763  uint32_t rx324mbps; /* packets rx at 324 mbps */
1764  uint32_t rx378mbps; /* packets rx at 378 mbps */
1765  uint32_t rx432mbps; /* packets rx at 432 mbps */
1766  uint32_t rx486mbps; /* packets rx at 486 mbps */
1767  uint32_t rx540mbps; /* packets rx at 540 mbps */
1768 
1769  /* pkteng rx frame stats */
1770  uint32_t pktengrxducast; /* unicast frames rxed by the pkteng code */
1771  uint32_t pktengrxdmcast; /* multicast frames rxed by the pkteng code */
1772 
1773  uint32_t rfdisable; /* count of radio disables */
1774  uint32_t bphy_rxcrsglitch; /* PHY count of bphy glitches */
1775 
1776  uint32_t txmpdu_sgi; /* count for sgi transmit */
1777  uint32_t rxmpdu_sgi; /* count for sgi received */
1778  uint32_t txmpdu_stbc; /* count for stbc transmit */
1779  uint32_t rxmpdu_stbc; /* count for stbc received */
1781 
1782 typedef struct
1783 {
1784  uint16_t version; /* see definition of WL_CNT_T_VERSION */
1785  uint16_t length; /* length of entire structure */
1786 
1787  /* transmit stat counters */
1788  uint32_t txframe; /* tx data frames */
1789  uint32_t txbyte; /* tx data bytes */
1790  uint32_t txretrans; /* tx mac retransmits */
1791  uint32_t txerror; /* tx data errors (derived: sum of others) */
1792  uint32_t txctl; /* tx management frames */
1793  uint32_t txprshort; /* tx short preamble frames */
1794  uint32_t txserr; /* tx status errors */
1795  uint32_t txnobuf; /* tx out of buffers errors */
1796  uint32_t txnoassoc; /* tx discard because we're not associated */
1797  uint32_t txrunt; /* tx runt frames */
1798  uint32_t txchit; /* tx header cache hit (fastpath) */
1799  uint32_t txcmiss; /* tx header cache miss (slowpath) */
1800 
1801  /* transmit chip error counters */
1802  uint32_t txuflo; /* tx fifo underflows */
1803  uint32_t txphyerr; /* tx phy errors (indicated in tx status) */
1804  uint32_t txphycrs; /* PR8861/8963 counter */
1805 
1806  /* receive stat counters */
1807  uint32_t rxframe; /* rx data frames */
1808  uint32_t rxbyte; /* rx data bytes */
1809  uint32_t rxerror; /* rx data errors (derived: sum of others) */
1810  uint32_t rxctl; /* rx management frames */
1811  uint32_t rxnobuf; /* rx out of buffers errors */
1812  uint32_t rxnondata; /* rx non data frames in the data channel errors */
1813  uint32_t rxbadds; /* rx bad DS errors */
1814  uint32_t rxbadcm; /* rx bad control or management frames */
1815  uint32_t rxfragerr; /* rx fragmentation errors */
1816  uint32_t rxrunt; /* rx runt frames */
1817  uint32_t rxgiant; /* rx giant frames */
1818  uint32_t rxnoscb; /* rx no scb error */
1819  uint32_t rxbadproto; /* rx invalid frames */
1820  uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */
1821  uint32_t rxbadda; /* rx frames tossed for invalid da */
1822  uint32_t rxfilter; /* rx frames filtered out */
1823 
1824  /* receive chip error counters */
1825  uint32_t rxoflo; /* rx fifo overflow errors */
1826  uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */
1827 
1828  uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */
1829  uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */
1830  uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */
1831 
1832  /* misc counters */
1833  uint32_t dmade; /* tx/rx dma descriptor errors */
1834  uint32_t dmada; /* tx/rx dma data errors */
1835  uint32_t dmape; /* tx/rx dma descriptor protocol errors */
1836  uint32_t reset; /* reset count */
1837  uint32_t tbtt; /* cnts the TBTT int's */
1838  uint32_t txdmawar; /* # occurrences of PR15420 workaround */
1839  uint32_t pkt_callback_reg_fail; /* callbacks register failure */
1840 
1841  /* MAC counters: 32-bit version of d11.h's macstat_t */
1842  uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
1843  * Control Management (includes retransmissions)
1844  */
1845  uint32_t txrtsfrm; /* number of RTS sent out by the MAC */
1846  uint32_t txctsfrm; /* number of CTS sent out by the MAC */
1847  uint32_t txackfrm; /* number of ACK frames sent out */
1848  uint32_t txdnlfrm; /* Not used */
1849  uint32_t txbcnfrm; /* beacons transmitted */
1850  uint32_t txfunfl[8]; /* per-fifo tx underflows */
1851  uint32_t txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS
1852  * or BCN)
1853  */
1854  uint32_t txphyerror; /* Transmit phy error, type of error is reported in tx-status for
1855  * driver enqueued frames
1856  */
1857  uint32_t rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */
1858  uint32_t rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */
1859  uint32_t rxinvmachdr; /* Either the protocol version != 0 or frame type not
1860  * data/control/management
1861  */
1862  uint32_t rxbadfcs; /* number of frames for which the CRC check failed in the MAC */
1863  uint32_t rxbadplcp; /* parity check of the PLCP header failed */
1864  uint32_t rxcrsglitch; /* PHY was able to correlate the preamble but not the header */
1865  uint32_t rxstrt; /* Number of received frames with a good PLCP
1866  * (i.e. passing parity check)
1867  */
1868  uint32_t rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */
1869  uint32_t rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */
1870  uint32_t rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */
1871  uint32_t rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */
1872  uint32_t rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */
1873  uint32_t rxackucast; /* number of ucast ACKS received (good FCS) */
1874  uint32_t rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */
1875  uint32_t rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */
1876  uint32_t rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */
1877  uint32_t rxrtsocast; /* number of received RTS not addressed to the MAC */
1878  uint32_t rxctsocast; /* number of received CTS not addressed to the MAC */
1879  uint32_t rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */
1880  uint32_t rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */
1881  uint32_t rxcfrmmcast; /* number of RX Control multicast frames received by the MAC
1882  * (unlikely to see these)
1883  */
1884  uint32_t rxbeaconmbss; /* beacons received from member of BSS */
1885  uint32_t rxdfrmucastobss; /* number of unicast frames addressed to the MAC from
1886  * other BSS (WDS FRAME)
1887  */
1888  uint32_t rxbeaconobss; /* beacons received from other BSS */
1889  uint32_t rxrsptmout; /* Number of response timeouts for transmitted frames
1890  * expecting a response
1891  */
1892  uint32_t bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */
1893  uint32_t rxf0ovfl; /* Number of receive fifo 0 overflows */
1894  uint32_t rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */
1895  uint32_t rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */
1896  uint32_t txsfovfl; /* Number of transmit status fifo overflows (obsolete) */
1897  uint32_t pmqovfl; /* Number of PMQ overflows */
1898  uint32_t rxcgprqfrm; /* Number of received Probe requests that made it into
1899  * the PRQ fifo
1900  */
1901  uint32_t rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */
1902  uint32_t txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did
1903  * not get ACK
1904  */
1905  uint32_t txcgprssuc; /* Tx Probe Response Success (ACK was received) */
1906  uint32_t prs_timeout; /* Number of probe requests that were dropped from the PRQ
1907  * fifo because a probe response could not be sent out within
1908  * the time limit defined in M_PRS_MAXTIME
1909  */
1910  uint32_t rxnack; /* obsolete */
1911  uint32_t frmscons; /* obsolete */
1912  uint32_t txnack; /* obsolete */
1913  uint32_t txglitch_nack; /* obsolete */
1914  uint32_t txburst; /* obsolete */
1915 
1916  /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
1917  uint32_t txfrag; /* dot11TransmittedFragmentCount */
1918  uint32_t txmulti; /* dot11MulticastTransmittedFrameCount */
1919  uint32_t txfail; /* dot11FailedCount */
1920  uint32_t txretry; /* dot11RetryCount */
1921  uint32_t txretrie; /* dot11MultipleRetryCount */
1922  uint32_t rxdup; /* dot11FrameduplicateCount */
1923  uint32_t txrts; /* dot11RTSSuccessCount */
1924  uint32_t txnocts; /* dot11RTSFailureCount */
1925  uint32_t txnoack; /* dot11ACKFailureCount */
1926  uint32_t rxfrag; /* dot11ReceivedFragmentCount */
1927  uint32_t rxmulti; /* dot11MulticastReceivedFrameCount */
1928  uint32_t rxcrc; /* dot11FCSErrorCount */
1929  uint32_t txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */
1930  uint32_t rxundec; /* dot11WEPUndecryptableCount */
1931 
1932  /* WPA2 counters (see rxundec for DecryptFailureCount) */
1933  uint32_t tkipmicfaill; /* TKIPLocalMICFailures */
1934  uint32_t tkipcntrmsr; /* TKIPCounterMeasuresInvoked */
1935  uint32_t tkipreplay; /* TKIPReplays */
1936  uint32_t ccmpfmterr; /* CCMPFormatErrors */
1937  uint32_t ccmpreplay; /* CCMPReplays */
1938  uint32_t ccmpundec; /* CCMPDecryptErrors */
1939  uint32_t fourwayfail; /* FourWayHandshakeFailures */
1940  uint32_t wepundec; /* dot11WEPUndecryptableCount */
1941  uint32_t wepicverr; /* dot11WEPICVErrorCount */
1942  uint32_t decsuccess; /* DecryptSuccessCount */
1943  uint32_t tkipicverr; /* TKIPICVErrorCount */
1944  uint32_t wepexcluded; /* dot11WEPExcludedCount */
1945 
1946  uint32_t txchanrej; /* Tx frames suppressed due to channel rejection */
1947  uint32_t psmwds; /* Count PSM watchdogs */
1948  uint32_t phywatchdog; /* Count Phy watchdogs (triggered by ucode) */
1949 
1950  /* MBSS counters, AP only */
1951  uint32_t prq_entries_handled; /* PRQ entries read in */
1952  uint32_t prq_undirected_entries; /* which were bcast bss & ssid */
1953  uint32_t prq_bad_entries; /* which could not be translated to info */
1954  uint32_t atim_suppress_count; /* TX suppressions on ATIM fifo */
1955  uint32_t bcn_template_not_ready; /* Template marked in use on send bcn ... */
1956  uint32_t bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */
1957  uint32_t late_tbtt_dpc; /* TBTT DPC did not happen in time */
1958 
1959  /* per-rate receive stat counters */
1960  uint32_t rx1mbps; /* packets rx at 1Mbps */
1961  uint32_t rx2mbps; /* packets rx at 2Mbps */
1962  uint32_t rx5mbps5; /* packets rx at 5.5Mbps */
1963  uint32_t rx6mbps; /* packets rx at 6Mbps */
1964  uint32_t rx9mbps; /* packets rx at 9Mbps */
1965  uint32_t rx11mbps; /* packets rx at 11Mbps */
1966  uint32_t rx12mbps; /* packets rx at 12Mbps */
1967  uint32_t rx18mbps; /* packets rx at 18Mbps */
1968  uint32_t rx24mbps; /* packets rx at 24Mbps */
1969  uint32_t rx36mbps; /* packets rx at 36Mbps */
1970  uint32_t rx48mbps; /* packets rx at 48Mbps */
1971  uint32_t rx54mbps; /* packets rx at 54Mbps */
1972  uint32_t rx108mbps; /* packets rx at 108mbps */
1973  uint32_t rx162mbps; /* packets rx at 162mbps */
1974  uint32_t rx216mbps; /* packets rx at 216 mbps */
1975  uint32_t rx270mbps; /* packets rx at 270 mbps */
1976  uint32_t rx324mbps; /* packets rx at 324 mbps */
1977  uint32_t rx378mbps; /* packets rx at 378 mbps */
1978  uint32_t rx432mbps; /* packets rx at 432 mbps */
1979  uint32_t rx486mbps; /* packets rx at 486 mbps */
1980  uint32_t rx540mbps; /* packets rx at 540 mbps */
1981 
1982  /* pkteng rx frame stats */
1983  uint32_t pktengrxducast; /* unicast frames rxed by the pkteng code */
1984  uint32_t pktengrxdmcast; /* multicast frames rxed by the pkteng code */
1985 
1986  uint32_t rfdisable; /* count of radio disables */
1987  uint32_t bphy_rxcrsglitch; /* PHY count of bphy glitches */
1988 
1989  uint32_t txexptime; /* Tx frames suppressed due to timer expiration */
1990 
1991  uint32_t txmpdu_sgi; /* count for sgi transmit */
1992  uint32_t rxmpdu_sgi; /* count for sgi received */
1993  uint32_t txmpdu_stbc; /* count for stbc transmit */
1994  uint32_t rxmpdu_stbc; /* count for stbc received */
1995 
1996  uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */
1997 
1998  /* WPA2 counters (see rxundec for DecryptFailureCount) */
1999  uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */
2000  uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */
2001  uint32_t tkipreplay_mcst; /* TKIPReplays */
2002  uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */
2003  uint32_t ccmpreplay_mcst; /* CCMPReplays */
2004  uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */
2005  uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */
2006  uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */
2007  uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */
2008  uint32_t decsuccess_mcst; /* DecryptSuccessCount */
2009  uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */
2010  uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */
2011 
2012  uint32_t dma_hang; /* count for stbc received */
2014 
2015 typedef struct
2016 {
2017  uint16_t version; /* see definition of WL_CNT_T_VERSION */
2018  uint16_t length; /* length of entire structure */
2019 
2020  /* transmit stat counters */
2021  uint32_t txframe; /* tx data frames */
2022  uint32_t txbyte; /* tx data bytes */
2023  uint32_t txretrans; /* tx mac retransmits */
2024  uint32_t txerror; /* tx data errors (derived: sum of others) */
2025  uint32_t txctl; /* tx management frames */
2026  uint32_t txprshort; /* tx short preamble frames */
2027  uint32_t txserr; /* tx status errors */
2028  uint32_t txnobuf; /* tx out of buffers errors */
2029  uint32_t txnoassoc; /* tx discard because we're not associated */
2030  uint32_t txrunt; /* tx runt frames */
2031  uint32_t txchit; /* tx header cache hit (fastpath) */
2032  uint32_t txcmiss; /* tx header cache miss (slowpath) */
2033 
2034  /* transmit chip error counters */
2035  uint32_t txuflo; /* tx fifo underflows */
2036  uint32_t txphyerr; /* tx phy errors (indicated in tx status) */
2037  uint32_t txphycrs; /* PR8861/8963 counter */
2038 
2039  /* receive stat counters */
2040  uint32_t rxframe; /* rx data frames */
2041  uint32_t rxbyte; /* rx data bytes */
2042  uint32_t rxerror; /* rx data errors (derived: sum of others) */
2043  uint32_t rxctl; /* rx management frames */
2044  uint32_t rxnobuf; /* rx out of buffers errors */
2045  uint32_t rxnondata; /* rx non data frames in the data channel errors */
2046  uint32_t rxbadds; /* rx bad DS errors */
2047  uint32_t rxbadcm; /* rx bad control or management frames */
2048  uint32_t rxfragerr; /* rx fragmentation errors */
2049  uint32_t rxrunt; /* rx runt frames */
2050  uint32_t rxgiant; /* rx giant frames */
2051  uint32_t rxnoscb; /* rx no scb error */
2052  uint32_t rxbadproto; /* rx invalid frames */
2053  uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */
2054  uint32_t rxbadda; /* rx frames tossed for invalid da */
2055  uint32_t rxfilter; /* rx frames filtered out */
2056 
2057  /* receive chip error counters */
2058  uint32_t rxoflo; /* rx fifo overflow errors */
2059  uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */
2060 
2061  uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */
2062  uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */
2063  uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */
2064 
2065  /* misc counters */
2066  uint32_t dmade; /* tx/rx dma descriptor errors */
2067  uint32_t dmada; /* tx/rx dma data errors */
2068  uint32_t dmape; /* tx/rx dma descriptor protocol errors */
2069  uint32_t reset; /* reset count */
2070  uint32_t tbtt; /* cnts the TBTT int's */
2071  uint32_t txdmawar; /* # occurrences of PR15420 workaround */
2072  uint32_t pkt_callback_reg_fail; /* callbacks register failure */
2073 
2074  /* MAC counters: 32-bit version of d11.h's macstat_t */
2075  uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
2076  * Control Management (includes retransmissions)
2077  */
2078  uint32_t txrtsfrm; /* number of RTS sent out by the MAC */
2079  uint32_t txctsfrm; /* number of CTS sent out by the MAC */
2080  uint32_t txackfrm; /* number of ACK frames sent out */
2081  uint32_t txdnlfrm; /* Not used */
2082  uint32_t txbcnfrm; /* beacons transmitted */
2083  uint32_t txfunfl[6]; /* per-fifo tx underflows */
2084  uint32_t rxtoolate; /* receive too late */
2085  uint32_t txfbw; /* transmit at fallback bw (dynamic bw) */
2086  uint32_t txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS
2087  * or BCN)
2088  */
2089  uint32_t txphyerror; /* Transmit phy error, type of error is reported in tx-status for
2090  * driver enqueued frames
2091  */
2092  uint32_t rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */
2093  uint32_t rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */
2094  uint32_t rxinvmachdr; /* Either the protocol version != 0 or frame type not
2095  * data/control/management
2096  */
2097  uint32_t rxbadfcs; /* number of frames for which the CRC check failed in the MAC */
2098  uint32_t rxbadplcp; /* parity check of the PLCP header failed */
2099  uint32_t rxcrsglitch; /* PHY was able to correlate the preamble but not the header */
2100  uint32_t rxstrt; /* Number of received frames with a good PLCP
2101  * (i.e. passing parity check)
2102  */
2103  uint32_t rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */
2104  uint32_t rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */
2105  uint32_t rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */
2106  uint32_t rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */
2107  uint32_t rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */
2108  uint32_t rxackucast; /* number of ucast ACKS received (good FCS) */
2109  uint32_t rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */
2110  uint32_t rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */
2111  uint32_t rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */
2112  uint32_t rxrtsocast; /* number of received RTS not addressed to the MAC */
2113  uint32_t rxctsocast; /* number of received CTS not addressed to the MAC */
2114  uint32_t rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */
2115  uint32_t rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */
2116  uint32_t rxcfrmmcast; /* number of RX Control multicast frames received by the MAC
2117  * (unlikely to see these)
2118  */
2119  uint32_t rxbeaconmbss; /* beacons received from member of BSS */
2120  uint32_t rxdfrmucastobss; /* number of unicast frames addressed to the MAC from
2121  * other BSS (WDS FRAME)
2122  */
2123  uint32_t rxbeaconobss; /* beacons received from other BSS */
2124  uint32_t rxrsptmout; /* Number of response timeouts for transmitted frames
2125  * expecting a response
2126  */
2127  uint32_t bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */
2128  uint32_t rxf0ovfl; /* Number of receive fifo 0 overflows */
2129  uint32_t rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */
2130  uint32_t rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */
2131  uint32_t txsfovfl; /* Number of transmit status fifo overflows (obsolete) */
2132  uint32_t pmqovfl; /* Number of PMQ overflows */
2133  uint32_t rxcgprqfrm; /* Number of received Probe requests that made it into
2134  * the PRQ fifo
2135  */
2136  uint32_t rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */
2137  uint32_t txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did
2138  * not get ACK
2139  */
2140  uint32_t txcgprssuc; /* Tx Probe Response Success (ACK was received) */
2141  uint32_t prs_timeout; /* Number of probe requests that were dropped from the PRQ
2142  * fifo because a probe response could not be sent out within
2143  * the time limit defined in M_PRS_MAXTIME
2144  */
2145  uint32_t rxnack; /* obsolete */
2146  uint32_t frmscons; /* obsolete */
2147  uint32_t txnack; /* obsolete */
2148  uint32_t rxback; /* blockack rxcnt */
2149  uint32_t txback; /* blockack txcnt */
2150 
2151  /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
2152  uint32_t txfrag; /* dot11TransmittedFragmentCount */
2153  uint32_t txmulti; /* dot11MulticastTransmittedFrameCount */
2154  uint32_t txfail; /* dot11FailedCount */
2155  uint32_t txretry; /* dot11RetryCount */
2156  uint32_t txretrie; /* dot11MultipleRetryCount */
2157  uint32_t rxdup; /* dot11FrameduplicateCount */
2158  uint32_t txrts; /* dot11RTSSuccessCount */
2159  uint32_t txnocts; /* dot11RTSFailureCount */
2160  uint32_t txnoack; /* dot11ACKFailureCount */
2161  uint32_t rxfrag; /* dot11ReceivedFragmentCount */
2162  uint32_t rxmulti; /* dot11MulticastReceivedFrameCount */
2163  uint32_t rxcrc; /* dot11FCSErrorCount */
2164  uint32_t txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */
2165  uint32_t rxundec; /* dot11WEPUndecryptableCount */
2166 
2167  /* WPA2 counters (see rxundec for DecryptFailureCount) */
2168  uint32_t tkipmicfaill; /* TKIPLocalMICFailures */
2169  uint32_t tkipcntrmsr; /* TKIPCounterMeasuresInvoked */
2170  uint32_t tkipreplay; /* TKIPReplays */
2171  uint32_t ccmpfmterr; /* CCMPFormatErrors */
2172  uint32_t ccmpreplay; /* CCMPReplays */
2173  uint32_t ccmpundec; /* CCMPDecryptErrors */
2174  uint32_t fourwayfail; /* FourWayHandshakeFailures */
2175  uint32_t wepundec; /* dot11WEPUndecryptableCount */
2176  uint32_t wepicverr; /* dot11WEPICVErrorCount */
2177  uint32_t decsuccess; /* DecryptSuccessCount */
2178  uint32_t tkipicverr; /* TKIPICVErrorCount */
2179  uint32_t wepexcluded; /* dot11WEPExcludedCount */
2180 
2181  uint32_t txchanrej; /* Tx frames suppressed due to channel rejection */
2182  uint32_t psmwds; /* Count PSM watchdogs */
2183  uint32_t phywatchdog; /* Count Phy watchdogs (triggered by ucode) */
2184 
2185  /* MBSS counters, AP only */
2186  uint32_t prq_entries_handled; /* PRQ entries read in */
2187  uint32_t prq_undirected_entries; /* which were bcast bss & ssid */
2188  uint32_t prq_bad_entries; /* which could not be translated to info */
2189  uint32_t atim_suppress_count; /* TX suppressions on ATIM fifo */
2190  uint32_t bcn_template_not_ready; /* Template marked in use on send bcn ... */
2191  uint32_t bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */
2192  uint32_t late_tbtt_dpc; /* TBTT DPC did not happen in time */
2193 
2194  /* per-rate receive stat counters */
2195  uint32_t rx1mbps; /* packets rx at 1Mbps */
2196  uint32_t rx2mbps; /* packets rx at 2Mbps */
2197  uint32_t rx5mbps5; /* packets rx at 5.5Mbps */
2198  uint32_t rx6mbps; /* packets rx at 6Mbps */
2199  uint32_t rx9mbps; /* packets rx at 9Mbps */
2200  uint32_t rx11mbps; /* packets rx at 11Mbps */
2201  uint32_t rx12mbps; /* packets rx at 12Mbps */
2202  uint32_t rx18mbps; /* packets rx at 18Mbps */
2203  uint32_t rx24mbps; /* packets rx at 24Mbps */
2204  uint32_t rx36mbps; /* packets rx at 36Mbps */
2205  uint32_t rx48mbps; /* packets rx at 48Mbps */
2206  uint32_t rx54mbps; /* packets rx at 54Mbps */
2207  uint32_t rx108mbps; /* packets rx at 108mbps */
2208  uint32_t rx162mbps; /* packets rx at 162mbps */
2209  uint32_t rx216mbps; /* packets rx at 216 mbps */
2210  uint32_t rx270mbps; /* packets rx at 270 mbps */
2211  uint32_t rx324mbps; /* packets rx at 324 mbps */
2212  uint32_t rx378mbps; /* packets rx at 378 mbps */
2213  uint32_t rx432mbps; /* packets rx at 432 mbps */
2214  uint32_t rx486mbps; /* packets rx at 486 mbps */
2215  uint32_t rx540mbps; /* packets rx at 540 mbps */
2216 
2217  /* pkteng rx frame stats */
2218  uint32_t pktengrxducast; /* unicast frames rxed by the pkteng code */
2219  uint32_t pktengrxdmcast; /* multicast frames rxed by the pkteng code */
2220 
2221  uint32_t rfdisable; /* count of radio disables */
2222  uint32_t bphy_rxcrsglitch; /* PHY count of bphy glitches */
2223  uint32_t bphy_badplcp;
2224 
2225  uint32_t txexptime; /* Tx frames suppressed due to timer expiration */
2226 
2227  uint32_t txmpdu_sgi; /* count for sgi transmit */
2228  uint32_t rxmpdu_sgi; /* count for sgi received */
2229  uint32_t txmpdu_stbc; /* count for stbc transmit */
2230  uint32_t rxmpdu_stbc; /* count for stbc received */
2231 
2232  uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */
2233 
2234  /* WPA2 counters (see rxundec for DecryptFailureCount) */
2235  uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */
2236  uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */
2237  uint32_t tkipreplay_mcst; /* TKIPReplays */
2238  uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */
2239  uint32_t ccmpreplay_mcst; /* CCMPReplays */
2240  uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */
2241  uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */
2242  uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */
2243  uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */
2244  uint32_t decsuccess_mcst; /* DecryptSuccessCount */
2245  uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */
2246  uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */
2247 
2248  uint32_t dma_hang; /* count for dma hang */
2249  uint32_t reinit; /* count for reinit */
2250 
2251  uint32_t pstatxucast; /* count of ucast frames xmitted on all psta assoc */
2252  uint32_t pstatxnoassoc; /* count of txnoassoc frames xmitted on all psta assoc */
2253  uint32_t pstarxucast; /* count of ucast frames received on all psta assoc */
2254  uint32_t pstarxbcmc; /* count of bcmc frames received on all psta */
2255  uint32_t pstatxbcmc; /* count of bcmc frames transmitted on all psta */
2256 
2257  uint32_t cso_passthrough; /* hw cso required but passthrough */
2258  uint32_t cso_normal; /* hw cso hdr for normal process */
2259  uint32_t chained; /* number of frames chained */
2260  uint32_t chainedsz1; /* number of chain size 1 frames */
2261  uint32_t unchained; /* number of frames not chained */
2262  uint32_t maxchainsz; /* max chain size so far */
2263  uint32_t currchainsz; /* current chain size */
2264 
2265  uint32_t rxdrop20s; /* drop secondary cnt */
2266 
2268 
2269 /* per-rate receive stat counters subset of full counters */
2270 typedef struct
2271 {
2272  uint32_t rx1mbps; /* packets rx at 1Mbps */
2273  uint32_t rx2mbps; /* packets rx at 2Mbps */
2274  uint32_t rx5mbps5; /* packets rx at 5.5Mbps */
2275  uint32_t rx6mbps; /* packets rx at 6Mbps */
2276  uint32_t rx9mbps; /* packets rx at 9Mbps */
2277  uint32_t rx11mbps; /* packets rx at 11Mbps */
2278  uint32_t rx12mbps; /* packets rx at 12Mbps */
2279  uint32_t rx18mbps; /* packets rx at 18Mbps */
2280  uint32_t rx24mbps; /* packets rx at 24Mbps */
2281  uint32_t rx36mbps; /* packets rx at 36Mbps */
2282  uint32_t rx48mbps; /* packets rx at 48Mbps */
2283  uint32_t rx54mbps; /* packets rx at 54Mbps */
2284  uint32_t rx108mbps; /* packets rx at 108mbps */
2285  uint32_t rx162mbps; /* packets rx at 162mbps */
2286  uint32_t rx216mbps; /* packets rx at 216 mbps */
2287  uint32_t rx270mbps; /* packets rx at 270 mbps */
2289 
2290 typedef struct
2291 {
2292  uint32_t count;
2293  uint8_t log[WL_PHYRATE_LOG_SIZE];
2295 
2296 typedef struct
2297 {
2298  uint16_t version; /* see definition of WL_CNT_T_VERSION */
2299  uint16_t length; /* length of entire structure */
2300 
2301  /* transmit stat counters */
2302  uint32_t txframe; /* tx data frames */
2303  uint32_t txbyte; /* tx data bytes */
2304  uint32_t txretrans; /* tx mac retransmits */
2305  uint32_t txerror; /* tx data errors (derived: sum of others) */
2306  uint32_t txctl; /* tx management frames */
2307  uint32_t txprshort; /* tx short preamble frames */
2308  uint32_t txserr; /* tx status errors */
2309  uint32_t txnobuf; /* tx out of buffers errors */
2310  uint32_t txnoassoc; /* tx discard because we're not associated */
2311  uint32_t txrunt; /* tx runt frames */
2312  uint32_t txchit; /* tx header cache hit (fastpath) */
2313  uint32_t txcmiss; /* tx header cache miss (slowpath) */
2314 
2315  /* transmit chip error counters */
2316  uint32_t txuflo; /* tx fifo underflows */
2317  uint32_t txphyerr; /* tx phy errors (indicated in tx status) */
2318  uint32_t txphycrs; /* PR8861/8963 counter */
2319 
2320  /* receive stat counters */
2321  uint32_t rxframe; /* rx data frames */
2322  uint32_t rxbyte; /* rx data bytes */
2323  uint32_t rxerror; /* rx data errors (derived: sum of others) */
2324  uint32_t rxctl; /* rx management frames */
2325  uint32_t rxnobuf; /* rx out of buffers errors */
2326  uint32_t rxnondata; /* rx non data frames in the data channel errors */
2327  uint32_t rxbadds; /* rx bad DS errors */
2328  uint32_t rxbadcm; /* rx bad control or management frames */
2329  uint32_t rxfragerr; /* rx fragmentation errors */
2330  uint32_t rxrunt; /* rx runt frames */
2331  uint32_t rxgiant; /* rx giant frames */
2332  uint32_t rxnoscb; /* rx no scb error */
2333  uint32_t rxbadproto; /* rx invalid frames */
2334  uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */
2335  uint32_t rxbadda; /* rx frames tossed for invalid da */
2336  uint32_t rxfilter; /* rx frames filtered out */
2337 
2338  /* receive chip error counters */
2339  uint32_t rxoflo; /* rx fifo overflow errors */
2340  uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */
2341 
2342  uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */
2343  uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */
2344  uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */
2345 
2346  /* misc counters */
2347  uint32_t dmade; /* tx/rx dma descriptor errors */
2348  uint32_t dmada; /* tx/rx dma data errors */
2349  uint32_t dmape; /* tx/rx dma descriptor protocol errors */
2350  uint32_t reset; /* reset count */
2351  uint32_t tbtt; /* cnts the TBTT int's */
2352  uint32_t txdmawar; /* # occurrences of PR15420 workaround */
2353  uint32_t pkt_callback_reg_fail; /* callbacks register failure */
2354 
2355  /* MAC counters: 32-bit version of d11.h's macstat_t */
2356  uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
2357  * Control Management (includes retransmissions)
2358  */
2359  uint32_t txrtsfrm; /* number of RTS sent out by the MAC */
2360  uint32_t txctsfrm; /* number of CTS sent out by the MAC */
2361  uint32_t txackfrm; /* number of ACK frames sent out */
2362  uint32_t txdnlfrm; /* Not used */
2363  uint32_t txbcnfrm; /* beacons transmitted */
2364  uint32_t txfunfl[6]; /* per-fifo tx underflows */
2365  uint32_t rxtoolate; /* receive too late */
2366  uint32_t txfbw; /* transmit at fallback bw (dynamic bw) */
2367  uint32_t txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS
2368  * or BCN)
2369  */
2370  uint32_t txphyerror; /* Transmit phy error, type of error is reported in tx-status for
2371  * driver enqueued frames
2372  */
2373  uint32_t rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */
2374  uint32_t rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */
2375  uint32_t rxinvmachdr; /* Either the protocol version != 0 or frame type not
2376  * data/control/management
2377  */
2378  uint32_t rxbadfcs; /* number of frames for which the CRC check failed in the MAC */
2379  uint32_t rxbadplcp; /* parity check of the PLCP header failed */
2380  uint32_t rxcrsglitch; /* PHY was able to correlate the preamble but not the header */
2381  uint32_t rxstrt; /* Number of received frames with a good PLCP
2382  * (i.e. passing parity check)
2383  */
2384  uint32_t rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */
2385  uint32_t rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */
2386  uint32_t rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */
2387  uint32_t rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */
2388  uint32_t rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */
2389  uint32_t rxackucast; /* number of ucast ACKS received (good FCS) */
2390  uint32_t rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */
2391  uint32_t rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */
2392  uint32_t rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */
2393  uint32_t rxrtsocast; /* number of received RTS not addressed to the MAC */
2394  uint32_t rxctsocast; /* number of received CTS not addressed to the MAC */
2395  uint32_t rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */
2396  uint32_t rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */
2397  uint32_t rxcfrmmcast; /* number of RX Control multicast frames received by the MAC
2398  * (unlikely to see these)
2399  */
2400  uint32_t rxbeaconmbss; /* beacons received from member of BSS */
2401  uint32_t rxdfrmucastobss; /* number of unicast frames addressed to the MAC from
2402  * other BSS (WDS FRAME)
2403  */
2404  uint32_t rxbeaconobss; /* beacons received from other BSS */
2405  uint32_t rxrsptmout; /* Number of response timeouts for transmitted frames
2406  * expecting a response
2407  */
2408  uint32_t bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */
2409  uint32_t rxf0ovfl; /* Number of receive fifo 0 overflows */
2410  uint32_t rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */
2411  uint32_t rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */
2412  uint32_t txsfovfl; /* Number of transmit status fifo overflows (obsolete) */
2413  uint32_t pmqovfl; /* Number of PMQ overflows */
2414  uint32_t rxcgprqfrm; /* Number of received Probe requests that made it into
2415  * the PRQ fifo
2416  */
2417  uint32_t rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */
2418  uint32_t txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did
2419  * not get ACK
2420  */
2421  uint32_t txcgprssuc; /* Tx Probe Response Success (ACK was received) */
2422  uint32_t prs_timeout; /* Number of probe requests that were dropped from the PRQ
2423  * fifo because a probe response could not be sent out within
2424  * the time limit defined in M_PRS_MAXTIME
2425  */
2426  uint32_t rxnack; /* obsolete */
2427  uint32_t frmscons; /* obsolete */
2428  uint32_t txnack; /* obsolete */
2429  uint32_t rxback; /* blockack rxcnt */
2430  uint32_t txback; /* blockack txcnt */
2431 
2432  /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
2433  uint32_t txfrag; /* dot11TransmittedFragmentCount */
2434  uint32_t txmulti; /* dot11MulticastTransmittedFrameCount */
2435  uint32_t txfail; /* dot11FailedCount */
2436  uint32_t txretry; /* dot11RetryCount */
2437  uint32_t txretrie; /* dot11MultipleRetryCount */
2438  uint32_t rxdup; /* dot11FrameduplicateCount */
2439  uint32_t txrts; /* dot11RTSSuccessCount */
2440  uint32_t txnocts; /* dot11RTSFailureCount */
2441  uint32_t txnoack; /* dot11ACKFailureCount */
2442  uint32_t rxfrag; /* dot11ReceivedFragmentCount */
2443  uint32_t rxmulti; /* dot11MulticastReceivedFrameCount */
2444  uint32_t rxcrc; /* dot11FCSErrorCount */
2445  uint32_t txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */
2446  uint32_t rxundec; /* dot11WEPUndecryptableCount */
2447 
2448  /* WPA2 counters (see rxundec for DecryptFailureCount) */
2449  uint32_t tkipmicfaill; /* TKIPLocalMICFailures */
2450  uint32_t tkipcntrmsr; /* TKIPCounterMeasuresInvoked */
2451  uint32_t tkipreplay; /* TKIPReplays */
2452  uint32_t ccmpfmterr; /* CCMPFormatErrors */
2453  uint32_t ccmpreplay; /* CCMPReplays */
2454  uint32_t ccmpundec; /* CCMPDecryptErrors */
2455  uint32_t fourwayfail; /* FourWayHandshakeFailures */
2456  uint32_t wepundec; /* dot11WEPUndecryptableCount */
2457  uint32_t wepicverr; /* dot11WEPICVErrorCount */
2458  uint32_t decsuccess; /* DecryptSuccessCount */
2459  uint32_t tkipicverr; /* TKIPICVErrorCount */
2460  uint32_t wepexcluded; /* dot11WEPExcludedCount */
2461 
2462  uint32_t txchanrej; /* Tx frames suppressed due to channel rejection */
2463  uint32_t psmwds; /* Count PSM watchdogs */
2464  uint32_t phywatchdog; /* Count Phy watchdogs (triggered by ucode) */
2465 
2466  /* MBSS counters, AP only */
2467  uint32_t prq_entries_handled; /* PRQ entries read in */
2468  uint32_t prq_undirected_entries; /* which were bcast bss & ssid */
2469  uint32_t prq_bad_entries; /* which could not be translated to info */
2470  uint32_t atim_suppress_count; /* TX suppressions on ATIM fifo */
2471  uint32_t bcn_template_not_ready; /* Template marked in use on send bcn ... */
2472  uint32_t bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */
2473  uint32_t late_tbtt_dpc; /* TBTT DPC did not happen in time */
2474 
2475  /* per-rate receive stat counters */
2476  uint32_t rx1mbps; /* packets rx at 1Mbps */
2477  uint32_t rx2mbps; /* packets rx at 2Mbps */
2478  uint32_t rx5mbps5; /* packets rx at 5.5Mbps */
2479  uint32_t rx6mbps; /* packets rx at 6Mbps */
2480  uint32_t rx9mbps; /* packets rx at 9Mbps */
2481  uint32_t rx11mbps; /* packets rx at 11Mbps */
2482  uint32_t rx12mbps; /* packets rx at 12Mbps */
2483  uint32_t rx18mbps; /* packets rx at 18Mbps */
2484  uint32_t rx24mbps; /* packets rx at 24Mbps */
2485  uint32_t rx36mbps; /* packets rx at 36Mbps */
2486  uint32_t rx48mbps; /* packets rx at 48Mbps */
2487  uint32_t rx54mbps; /* packets rx at 54Mbps */
2488  uint32_t rx108mbps; /* packets rx at 108mbps */
2489  uint32_t rx162mbps; /* packets rx at 162mbps */
2490  uint32_t rx216mbps; /* packets rx at 216 mbps */
2491  uint32_t rx270mbps; /* packets rx at 270 mbps */
2492  uint32_t rx324mbps; /* packets rx at 324 mbps */
2493  uint32_t rx378mbps; /* packets rx at 378 mbps */
2494  uint32_t rx432mbps; /* packets rx at 432 mbps */
2495  uint32_t rx486mbps; /* packets rx at 486 mbps */
2496  uint32_t rx540mbps; /* packets rx at 540 mbps */
2497 
2498  /* pkteng rx frame stats */
2499  uint32_t pktengrxducast; /* unicast frames rxed by the pkteng code */
2500  uint32_t pktengrxdmcast; /* multicast frames rxed by the pkteng code */
2501 
2502  uint32_t rfdisable; /* count of radio disables */
2503  uint32_t bphy_rxcrsglitch; /* PHY count of bphy glitches */
2504  uint32_t bphy_badplcp;
2505 
2506  uint32_t txexptime; /* Tx frames suppressed due to timer expiration */
2507 
2508  uint32_t txmpdu_sgi; /* count for sgi transmit */
2509  uint32_t rxmpdu_sgi; /* count for sgi received */
2510  uint32_t txmpdu_stbc; /* count for stbc transmit */
2511  uint32_t rxmpdu_stbc; /* count for stbc received */
2512 
2513  uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */
2514 
2515  /* WPA2 counters (see rxundec for DecryptFailureCount) */
2516  uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */
2517  uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */
2518  uint32_t tkipreplay_mcst; /* TKIPReplays */
2519  uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */
2520  uint32_t ccmpreplay_mcst; /* CCMPReplays */
2521  uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */
2522  uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */
2523  uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */
2524  uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */
2525  uint32_t decsuccess_mcst; /* DecryptSuccessCount */
2526  uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */
2527  uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */
2528 
2529  uint32_t dma_hang; /* count for dma hang */
2530  uint32_t reinit; /* count for reinit */
2531 
2532  uint32_t pstatxucast; /* count of ucast frames xmitted on all psta assoc */
2533  uint32_t pstatxnoassoc; /* count of txnoassoc frames xmitted on all psta assoc */
2534  uint32_t pstarxucast; /* count of ucast frames received on all psta assoc */
2535  uint32_t pstarxbcmc; /* count of bcmc frames received on all psta */
2536  uint32_t pstatxbcmc; /* count of bcmc frames transmitted on all psta */
2537 
2538  uint32_t cso_passthrough; /* hw cso required but passthrough */
2539  uint32_t cso_normal; /* hw cso hdr for normal process */
2540  uint32_t chained; /* number of frames chained */
2541  uint32_t chainedsz1; /* number of chain size 1 frames */
2542  uint32_t unchained; /* number of frames not chained */
2543  uint32_t maxchainsz; /* max chain size so far */
2544  uint32_t currchainsz; /* current chain size */
2545  uint32_t rxdrop20s; /* drop secondary cnt */
2546  uint32_t pciereset; /* Secondary Bus Reset issued by driver */
2547  uint32_t cfgrestore; /* configspace restore by driver */
2548  uint32_t reinitreason[8]; /* reinitreason counters; 0: Unknown reason */
2549  uint32_t rxrtry; /* num of received packets with retry bit on */
2551 
2552 typedef struct
2553 {
2554  uint16_t version;
2555  uint16_t length;
2556  uint32_t rxampdu_sgi;
2557  uint32_t rxampdu_stbc;
2558  uint32_t rxmpdu_sgi;
2559  uint32_t rxmpdu_stbc;
2560  uint32_t rxmcs0_40M;
2561  uint32_t rxmcs1_40M;
2562  uint32_t rxmcs2_40M;
2563  uint32_t rxmcs3_40M;
2564  uint32_t rxmcs4_40M;
2565  uint32_t rxmcs5_40M;
2566  uint32_t rxmcs6_40M;
2567  uint32_t rxmcs7_40M;
2568  uint32_t rxmcs32_40M;
2569  uint32_t txfrmsnt_20Mlo;
2570  uint32_t txfrmsnt_20Mup;
2571  uint32_t txfrmsnt_40M;
2572  uint32_t rx_20ul;
2573 } wl_cnt_ext_t;
2574 #define WL_RXDIV_STATS_T_VERSION 1
2575 typedef struct
2576 {
2577  uint16_t version;
2578  uint16_t length;
2579  uint32_t rxant[4];
2581 #define WL_DELTA_STATS_T_VERSION 1
2582 typedef struct
2583 {
2584  uint16_t version;
2585  uint16_t length;
2586  uint32_t txframe;
2587  uint32_t txbyte;
2588  uint32_t txretrans;
2589  uint32_t txfail;
2590  uint32_t rxframe;
2591  uint32_t rxbyte;
2592  uint32_t rx1mbps;
2593  uint32_t rx2mbps;
2594  uint32_t rx5mbps5;
2595  uint32_t rx6mbps;
2596  uint32_t rx9mbps;
2597  uint32_t rx11mbps;
2598  uint32_t rx12mbps;
2599  uint32_t rx18mbps;
2600  uint32_t rx24mbps;
2601  uint32_t rx36mbps;
2602  uint32_t rx48mbps;
2603  uint32_t rx54mbps;
2604  uint32_t rx108mbps;
2605  uint32_t rx162mbps;
2606  uint32_t rx216mbps;
2607  uint32_t rx270mbps;
2608  uint32_t rx324mbps;
2609  uint32_t rx378mbps;
2610  uint32_t rx432mbps;
2611  uint32_t rx486mbps;
2612  uint32_t rx540mbps;
2614 #define WL_WME_CNT_VERSION 1
2615 typedef struct
2616 {
2617  uint32_t packets;
2618  uint32_t bytes;
2620 #define AC_COUNT 4
2621 typedef struct
2622 {
2623  uint16_t version;
2624  uint16_t length;
2625  wl_traffic_stats_t tx[AC_COUNT];
2626  wl_traffic_stats_t tx_failed[AC_COUNT];
2627  wl_traffic_stats_t rx[AC_COUNT];
2628  wl_traffic_stats_t rx_failed[AC_COUNT];
2629  wl_traffic_stats_t forward[AC_COUNT];
2630  wl_traffic_stats_t tx_expired[AC_COUNT];
2631 } wl_wme_cnt_t;
2632 
2633 #define WL_MKEEP_ALIVE_VERSION 1
2634 #define WL_MKEEP_ALIVE_FIXED_LEN offsetof(wl_mkeep_alive_pkt_t, data)
2635 #define WL_MKEEP_ALIVE_PRECISION 500
2636 
2637 #define WLC_BA_CNT_VERSION 1
2638 typedef struct wlc_ba_cnt
2639 {
2640  uint16_t version;
2641  uint16_t length;
2642  uint32_t txpdu;
2643  uint32_t txsdu;
2644  uint32_t txfc;
2645  uint32_t txfci;
2646  uint32_t txretrans;
2647  uint32_t txbatimer;
2648  uint32_t txdrop;
2649  uint32_t txaddbareq;
2650  uint32_t txaddbaresp;
2651  uint32_t txdelba;
2652  uint32_t txba;
2653  uint32_t txbar;
2654  uint32_t txpad[4];
2655  uint32_t rxpdu;
2656  uint32_t rxqed;
2657  uint32_t rxdup;
2658  uint32_t rxnobuf;
2659  uint32_t rxaddbareq;
2660  uint32_t rxaddbaresp;
2661  uint32_t rxdelba;
2662  uint32_t rxba;
2663  uint32_t rxbar;
2664  uint32_t rxinvba;
2665  uint32_t rxbaholes;
2666  uint32_t rxunexp;
2667  uint32_t rxpad[4];
2668 } wlc_ba_cnt_t;
2670 {
2671  uint8_t tid;
2672  uint8_t enable;
2673 };
2675 {
2676  uint32_t low;
2677  uint32_t high;
2678 };
2680 {
2681  wl_ether_addr_t ea;
2682  uint8_t tid;
2683 };
2685 {
2686  uint8_t tid;
2687  uint8_t retry;
2688 };
2690 {
2691  uint8_t ba_tx_wsize;
2692  uint8_t ba_rx_wsize;
2693 };
2694 #define DPT_DISCOVERY_MANUAL 0x01
2695 #define DPT_DISCOVERY_AUTO 0x02
2696 #define DPT_DISCOVERY_SCAN 0x04
2697 #define DPT_PATHSEL_AUTO 0
2698 #define DPT_PATHSEL_DIRECT 1
2699 #define DPT_PATHSEL_APPATH 2
2700 #define DPT_DENY_LIST_ADD 1
2701 #define DPT_DENY_LIST_REMOVE 2
2702 #define DPT_MANUAL_EP_CREATE 1
2703 #define DPT_MANUAL_EP_MODIFY 2
2704 #define DPT_MANUAL_EP_DELETE 3
2705 typedef struct dpt_iovar
2706 {
2707  wl_ether_addr_t ea;
2708  uint8_t mode;
2709  uint32_t pad;
2710 } dpt_iovar_t;
2711 #define DPT_STATUS_ACTIVE 0x01
2712 #define DPT_STATUS_AES 0x02
2713 #define DPT_STATUS_FAILED 0x04
2714 #define DPT_FNAME_LEN 48
2715 typedef struct dpt_status
2716 {
2717  uint8_t status;
2718  uint8_t fnlen;
2719  uint8_t name[DPT_FNAME_LEN];
2720  uint32_t rssi;
2721  sta_info_t sta;
2722 } dpt_status_t;
2723 typedef struct dpt_list
2724 {
2725  uint32_t num;
2726  dpt_status_t status[1];
2727 } dpt_list_t;
2728 typedef struct dpt_fname
2729 {
2730  uint8_t len;
2731  uint8_t name[DPT_FNAME_LEN];
2732 } dpt_fname_t;
2733 #define BDD_FNAME_LEN 32
2734 typedef struct bdd_fname
2735 {
2736  uint8_t len;
2737  uint8_t name[BDD_FNAME_LEN];
2738 } bdd_fname_t;
2739 struct ts_list
2740 {
2741  int32_t count;
2742  struct tsinfo_arg tsinfo[1];
2743 };
2744 typedef struct tspec_arg
2745 {
2746  uint16_t version;
2747  uint16_t length;
2748  uint32_t flag;
2749  struct tsinfo_arg tsinfo;
2750  uint16_t nom_msdu_size;
2751  uint16_t max_msdu_size;
2752  uint32_t min_srv_interval;
2753  uint32_t max_srv_interval;
2754  uint32_t inactivity_interval;
2755  uint32_t suspension_interval;
2756  uint32_t srv_start_time;
2757  uint32_t min_data_rate;
2758  uint32_t mean_data_rate;
2759  uint32_t peak_data_rate;
2760  uint32_t max_burst_size;
2761  uint32_t delay_bound;
2762  uint32_t min_phy_rate;
2763  uint16_t surplus_bw;
2764  uint16_t medium_time;
2765  uint8_t dialog_token;
2766 } tspec_arg_t;
2767 typedef struct tspec_per_sta_arg
2768 {
2769  wl_ether_addr_t ea;
2770  struct tspec_arg ts;
2772 typedef struct wme_max_bandwidth
2773 {
2774  uint32_t ac[AC_COUNT];
2776 #define WL_WME_MBW_PARAMS_IO_BYTES (sizeof(wme_max_bandwidth_t) )
2777 #define TSPEC_ARG_VERSION 2
2778 #define TSPEC_ARG_LENGTH 55
2779 #define TSPEC_DEFAULT_DIALOG_TOKEN 42
2780 #define TSPEC_DEFAULT_SBW_FACTOR 0x3000
2781 #define TSPEC_PENDING 0
2782 #define TSPEC_ACCEPTED 1
2783 #define TSPEC_REJECTED 2
2784 #define TSPEC_UNKNOWN 3
2785 #define TSPEC_STATUS_MASK 7
2786 #define WL_WLAN_ASSOC_REASON_NORMAL_NETWORK 0
2787 #define WL_WLAN_ASSOC_REASON_ROAM_FROM_CELLULAR_NETWORK 1
2788 #define WL_WLAN_ASSOC_REASON_ROAM_FROM_LAN 2
2789 #define WL_WLAN_ASSOC_REASON_MAX 2
2790 #define WL_SWFL_ABBFL 0x0001
2791 #define WL_SWFL_ABENCORE 0x0002
2792 #define WL_SWFL_NOHWRADIO 0x0004
2793 #define WL_LIFETIME_MAX 0xFFFF
2794 typedef struct wl_lifetime
2795 {
2796  uint32_t ac;
2797  uint32_t lifetime;
2798 } wl_lifetime_t;
2799 typedef struct wl_chan_switch
2800 {
2801  uint8_t mode;
2802  uint8_t count;
2803  wl_chanspec_t chspec;
2804  uint8_t reg;
2806 #define WLC_ROAM_TRIGGER_DEFAULT 0
2807 #define WLC_ROAM_TRIGGER_BANDWIDTH 1
2808 #define WLC_ROAM_TRIGGER_DISTANCE 2
2809 #define WLC_ROAM_TRIGGER_MAX_VALUE 2
2810 enum
2811 {
2812  PFN_LIST_ORDER, PFN_RSSI
2813 };
2814 #define SORT_CRITERIA_BIT 0
2815 #define AUTO_NET_SWITCH_BIT 1
2816 #define ENABLE_BKGRD_SCAN_BIT 2
2817 #define IMMEDIATE_SCAN_BIT 3
2818 #define AUTO_CONNECT_BIT 4
2819 #define IMMEDIATE_EVENT_BIT 8
2820 #define SUPPRESS_SSID_BIT 9
2821 #define ENABLE_NET_OFFLOAD_BIT 10
2822 #define SORT_CRITERIA_MASK 0x01
2823 #define AUTO_NET_SWITCH_MASK 0x02
2824 #define ENABLE_BKGRD_SCAN_MASK 0x04
2825 #define IMMEDIATE_SCAN_MASK 0x08
2826 #define AUTO_CONNECT_MASK 0x10
2827 #define PFN_VERSION 2
2828 
2829 /* PFN network info structure */
2830 typedef struct wl_pfn_subnet_info
2831 {
2832  struct ether_addr BSSID;
2833  uint8_t channel; /* channel number only */
2834  uint8_t SSID_len;
2835  uint8_t SSID[32];
2837 
2838 typedef struct wl_pfn_net_info
2839 {
2840  wl_pfn_subnet_info_t pfnsubnet;
2841  int16_t RSSI; /* receive signal strength (in dBm) */
2842  uint16_t timestamp; /* age in seconds */
2844 
2845 /* used to report exactly one scan result */
2846 /* plus reports detailed scan info in bss_info */
2847 typedef struct wl_pfn_scanresult
2848 {
2849  uint32_t version;
2850  uint32_t status;
2851  uint32_t count;
2852  wl_pfn_net_info_t netinfo;
2853  wl_bss_info_t bss_info;
2855 
2856 /* PFN data structure */
2857 typedef struct wl_pfn_param
2858 {
2859  int32_t version; /* PNO parameters version */
2860  int32_t scan_freq; /* Scan frequency */
2861  int32_t lost_network_timeout; /* Timeout in sec. to declare
2862  * discovered network as lost
2863  */
2864  int16_t flags; /* Bit field to control features
2865  * of PFN such as sort criteria auto
2866  * enable switch and background scan
2867  */
2868  int16_t rssi_margin; /* Margin to avoid jitter for choosing a
2869  * PFN based on RSSI sort criteria
2870  */
2871  uint8_t bestn; /* number of best networks in each scan */
2872  uint8_t mscan; /* number of scans recorded */
2873  uint8_t repeat; /* Minimum number of scan intervals
2874  * before scan frequency changes in adaptive scan
2875  */
2876  uint8_t exp; /* Exponent of 2 for maximum scan interval */
2877 
2878  int32_t slow_freq; /* slow scan period */
2879 } wl_pfn_param_t;
2880 
2881 typedef struct wl_pfn_bssid
2882 {
2883  struct ether_addr macaddr;
2884  /* Bit4: suppress_lost, Bit3: suppress_found */
2885  uint16_t flags;
2886 } wl_pfn_bssid_t;
2887 
2888 typedef struct wl_pfn_cfg
2889 {
2890  uint32_t reporttype;
2891  int32_t channel_num;
2892  uint16_t channel_list[WL_NUMCHANNELS];
2893  uint32_t flags;
2894 } wl_pfn_cfg_t;
2895 
2896 /* for use with wl_pfn.flags */
2897 #define WL_PFN_HIDDEN_MASK 0x4
2898 #define WL_PFN_SUPPRESSLOST_MASK 0x10
2899 
2900 typedef struct wl_pfn
2901 {
2902  wlc_ssid_t ssid; /* ssid name and its length */
2903  int32_t flags; /* bit2: hidden */
2904  int32_t infra; /* BSS Vs IBSS */
2905  int32_t auth; /* Open Vs Closed */
2906  int32_t wpa_auth; /* WPA type */
2907  int32_t wsec; /* wsec value */
2908 } wl_pfn_t;
2909 
2910 #define TOE_TX_CSUM_OL 0x00000001
2911 #define TOE_RX_CSUM_OL 0x00000002
2912 #define TOE_ERRTEST_TX_CSUM 0x00000001
2913 #define TOE_ERRTEST_RX_CSUM 0x00000002
2914 #define TOE_ERRTEST_RX_CSUM2 0x00000004
2916 {
2917  uint32_t tx_summed;
2918  uint32_t tx_iph_fill;
2919  uint32_t tx_tcp_fill;
2920  uint32_t tx_udp_fill;
2921  uint32_t tx_icmp_fill;
2922  uint32_t rx_iph_good;
2923  uint32_t rx_iph_bad;
2924  uint32_t rx_tcp_good;
2925  uint32_t rx_tcp_bad;
2926  uint32_t rx_udp_good;
2927  uint32_t rx_udp_bad;
2928  uint32_t rx_icmp_good;
2929  uint32_t rx_icmp_bad;
2930  uint32_t tx_tcp_errinj;
2931  uint32_t tx_udp_errinj;
2932  uint32_t tx_icmp_errinj;
2933  uint32_t rx_tcp_errinj;
2934  uint32_t rx_udp_errinj;
2935  uint32_t rx_icmp_errinj;
2936 };
2937 #define ARP_OL_AGENT 0x00000001
2938 #define ARP_OL_SNOOP 0x00000002
2939 #define ARP_OL_HOST_AUTO_REPLY 0x00000004
2940 #define ARP_OL_PEER_AUTO_REPLY 0x00000008
2941 #define ARP_ERRTEST_REPLY_PEER 0x1
2942 #define ARP_ERRTEST_REPLY_HOST 0x2
2943 #define ARP_MULTIHOMING_MAX 8
2944 typedef struct arp_ol_stats
2945 {
2946  uint32_t host_ip_entries;
2947  uint32_t host_ip_overflow;
2948  uint32_t arp_table_entries;
2949  uint32_t arp_table_overflow;
2950  uint32_t host_request;
2951  uint32_t host_reply;
2952  uint32_t host_service;
2953  uint32_t peer_request;
2954  uint32_t peer_request_drop;
2955  uint32_t peer_reply;
2956  uint32_t peer_reply_drop;
2957  uint32_t peer_service;
2959 typedef struct wl_keep_alive_pkt
2960 {
2961  uint32_t period_msec;
2962  uint16_t len_bytes;
2963  uint8_t data[1];
2965 #define WL_KEEP_ALIVE_FIXED_LEN offsetof(wl_keep_alive_pkt_t, data)
2966 typedef enum wl_pkt_filter_type
2967 {
2968  WL_PKT_FILTER_TYPE_PATTERN_MATCH
2969 } wl_pkt_filter_type_t;
2970 #define WL_PKT_FILTER_TYPE wl_pkt_filter_type_t
2972 {
2973  uint32_t offset;
2974  uint32_t size_bytes;
2975  uint8_t mask_and_pattern[1];
2977 typedef struct wl_pkt_filter
2978 {
2979  uint32_t id;
2980  uint32_t type;
2981  uint32_t negate_match;
2982  union
2983  {
2984  wl_pkt_filter_pattern_t pattern;
2985  } u;
2986 } wl_pkt_filter_t;
2987 #define WL_PKT_FILTER_FIXED_LEN offsetof(wl_pkt_filter_t, u)
2988 #define WL_PKT_FILTER_PATTERN_FIXED_LEN offsetof(wl_pkt_filter_pattern_t, mask_and_pattern)
2989 typedef struct wl_pkt_filter_enable
2990 {
2991  uint32_t id;
2992  uint32_t enable;
2994 typedef struct wl_pkt_filter_list
2995 {
2996  uint32_t num;
2997  wl_pkt_filter_t filter[1];
2999 #define WL_PKT_FILTER_LIST_FIXED_LEN offsetof(wl_pkt_filter_list_t, filter)
3000 typedef struct wl_pkt_filter_stats
3001 {
3002  uint32_t num_pkts_matched;
3003  uint32_t num_pkts_forwarded;
3004  uint32_t num_pkts_discarded;
3006 typedef struct wl_seq_cmd_ioctl
3007 {
3008  uint32_t cmd;
3009  uint32_t len;
3011 #define WL_SEQ_CMD_ALIGN_BYTES 4
3012 #define WL_SEQ_CMDS_GET_IOCTL_FILTER(cmd) \
3013  ( ( (cmd) == WLC_GET_MAGIC ) || \
3014  ( (cmd) == WLC_GET_VERSION ) || \
3015  ( (cmd) == WLC_GET_AP ) || \
3016  ( (cmd) == WLC_GET_INSTANCE ) )
3017 #define WL_PKTENG_PER_TX_START 0x01
3018 #define WL_PKTENG_PER_TX_STOP 0x02
3019 #define WL_PKTENG_PER_RX_START 0x04
3020 #define WL_PKTENG_PER_RX_WITH_ACK_START 0x05
3021 #define WL_PKTENG_PER_TX_WITH_ACK_START 0x06
3022 #define WL_PKTENG_PER_RX_STOP 0x08
3023 #define WL_PKTENG_PER_MASK 0xff
3024 #define WL_PKTENG_SYNCHRONOUS 0x100
3025 typedef struct wl_pkteng
3026 {
3027  uint32_t flags;
3028  uint32_t delay;
3029  uint32_t nframes;
3030  uint32_t length;
3031  uint8_t seqno;
3032  wl_ether_addr_t dest;
3033  wl_ether_addr_t src;
3034 } wl_pkteng_t;
3035 #define NUM_80211b_RATES 4
3036 #define NUM_80211ag_RATES 8
3037 #define NUM_80211n_RATES 32
3038 #define NUM_80211_RATES (NUM_80211b_RATES + NUM_80211ag_RATES + NUM_80211n_RATES)
3039 typedef struct wl_pkteng_stats
3040 {
3041  uint32_t lostfrmcnt;
3042  int32_t rssi;
3043  int32_t snr;
3044  uint16_t rxpktcnt[NUM_80211_RATES + 1];
3047 {
3048  uint8_t psat_pwr;
3049  uint8_t psat_indx;
3050  uint8_t final_idx;
3051  uint8_t start_idx;
3052  int32_t min_phase;
3053  int32_t voltage;
3054  int8_t temperature;
3057 {
3058  int16_t papdcompRe[64];
3059  int16_t papdcompIm[64];
3062 {
3063  uint16_t tbl_length;
3064  int16_t spbreal[256];
3065  int16_t spbimg[256];
3068 {
3069  uint32_t cur_idx;
3070  uint32_t tx_drift;
3071  uint8_t prev_cal_idx;
3072  uint32_t percal_ctr;
3073  int32_t nxt_cal_idx;
3074  uint32_t force_1idxcal;
3075  uint32_t onedxacl_req;
3076  int32_t last_cal_volt;
3077  int8_t last_cal_temp;
3078  uint32_t vbat_ripple;
3079  uint32_t exit_route;
3080  int32_t volt_winner;
3082 #define WL_WOWL_MAGIC (1 << 0)
3083 #define WL_WOWL_NET (1 << 1)
3084 #define WL_WOWL_DIS (1 << 2)
3085 #define WL_WOWL_RETR (1 << 3)
3086 #define WL_WOWL_BCN (1 << 4)
3087 #define WL_WOWL_TST (1 << 5)
3088 #define WL_WOWL_TRAFFIC (1 << 12)
3089 #define WL_WOWL_BCAST (1 << 15)
3090 #define WL_WOWL_GTK (0x441f)
3091 #define WL_WOWL_DEAUTH (0x1F)
3092 #define WL_WOWL_ALL (0x541E)
3093 
3094 #define MAGIC_PKT_MINLEN 102
3095 typedef struct
3096 {
3097  uint32_t masksize;
3098  uint32_t offset;
3099  uint32_t patternoffset;
3100  uint32_t patternsize;
3102 typedef struct
3103 {
3104  uint32_t count;
3105  wl_wowl_pattern_t pattern[1];
3107 typedef struct
3108 {
3109  uint8_t pci_wakeind;
3110  uint16_t ucode_wakeind;
3112 typedef struct wl_txrate_class
3113 {
3114  uint8_t init_rate;
3115  uint8_t min_rate;
3116  uint8_t max_rate;
3118 #define WL_DELAYMODE_DEFER 0
3119 #define WL_DELAYMODE_FORCE 1
3120 #define WL_DELAYMODE_AUTO 2
3121 #define WLC_OBSS_SCAN_PASSIVE_DWELL_DEFAULT 100
3122 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MIN 5
3123 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MAX 1000
3124 #define WLC_OBSS_SCAN_ACTIVE_DWELL_DEFAULT 20
3125 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MIN 10
3126 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MAX 1000
3127 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_DEFAULT 300
3128 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MIN 10
3129 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MAX 900
3130 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_DEFAULT 5
3131 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MIN 5
3132 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MAX 100
3133 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_DEFAULT 200
3134 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MIN 200
3135 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MAX 10000
3136 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_DEFAULT 20
3137 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MIN 20
3138 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MAX 10000
3139 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_DEFAULT 25
3140 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MIN 0
3141 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MAX 100
3142 typedef struct wl_obss_scan_arg
3143 {
3144  int16_t passive_dwell;
3145  int16_t active_dwell;
3146  int16_t bss_widthscan_interval;
3147  int16_t passive_total;
3148  int16_t active_total;
3149  int16_t chanwidth_transition_delay;
3150  int16_t activity_threshold;
3152 #define WL_OBSS_SCAN_PARAM_LEN sizeof(wl_obss_scan_arg_t)
3153 #define WL_MIN_NUM_OBSS_SCAN_ARG 7
3154 #define WL_COEX_INFO_MASK 0x07
3155 #define WL_COEX_INFO_REQ 0x01
3156 #define WL_COEX_40MHZ_INTOLERANT 0x02
3157 #define WL_COEX_WIDTH20 0x04
3159 {
3160  uint8_t info;
3161  uint8_t num;
3162  uint8_t ch_list[1];
3164 #define MAX_RSSI_LEVELS 8
3165 typedef struct wl_rssi_event
3166 {
3167  uint32_t rate_limit_msec;
3168  uint8_t num_rssi_levels;
3169  int8_t rssi_levels[MAX_RSSI_LEVELS];
3170 } wl_rssi_event_t;
3171 #define WLFEATURE_DISABLE_11N 0x00000001
3172 #define WLFEATURE_DISABLE_11N_STBC_TX 0x00000002
3173 #define WLFEATURE_DISABLE_11N_STBC_RX 0x00000004
3174 #define WLFEATURE_DISABLE_11N_SGI_TX 0x00000008
3175 #define WLFEATURE_DISABLE_11N_SGI_RX 0x00000010
3176 #define WLFEATURE_DISABLE_11N_AMPDU_TX 0x00000020
3177 #define WLFEATURE_DISABLE_11N_AMPDU_RX 0x00000040
3178 #define WLFEATURE_DISABLE_11N_GF 0x00000080
3179 
3180 #pragma pack(1)
3181 
3183 {
3184  wl_ether_addr_t staAddr;
3185  uint16_t ieLen;
3187 
3189 {
3191  uint8_t ieData[1];
3193 
3195 {
3196  uint32_t totLen;
3197  uint8_t ieDataList[1];
3199 
3200 /* EDCF related items from 802.11.h */
3201 
3202 /* ACI from 802.11.h */
3203 #define EDCF_AIFSN_MIN 1 /* AIFSN minimum value */
3204 #define EDCF_AIFSN_MAX 15 /* AIFSN maximum value */
3205 #define EDCF_AIFSN_MASK 0x0f /* AIFSN mask */
3206 #define EDCF_ACM_MASK 0x10 /* ACM mask */
3207 #define EDCF_ACI_MASK 0x60 /* ACI mask */
3208 #define EDCF_ACI_SHIFT 5 /* ACI shift */
3209 #define EDCF_AIFSN_SHIFT 12 /* 4 MSB(0xFFF) in ifs_ctl for AC idx */
3210 
3211 /* ECW from 802.11.h */
3212 #define EDCF_ECW_MIN 0 /* cwmin/cwmax exponent minimum value */
3213 #define EDCF_ECW_MAX 15 /* cwmin/cwmax exponent maximum value */
3214 #define EDCF_ECW2CW(exp) ( (1 << (exp) ) - 1 )
3215 #define EDCF_ECWMIN_MASK 0x0f /* cwmin exponent form mask */
3216 #define EDCF_ECWMAX_MASK 0xf0 /* cwmax exponent form mask */
3217 #define EDCF_ECWMAX_SHIFT 4 /* cwmax exponent form shift */
3218 
3219 /* TXOP from 802.11.h */
3220 #define EDCF_TXOP_MIN 0 /* TXOP minimum value */
3221 #define EDCF_TXOP_MAX 65535 /* TXOP maximum value */
3222 #define EDCF_TXOP2USEC(txop) ( (txop) << 5 )
3223 
3224 #define EDCF_ACPARAM
3226 {
3227  uint8_t ACI;
3228  uint8_t ECW;
3229  uint16_t TXOP; /* stored in network order (ls octet first) */
3230 };
3231 typedef struct edcf_acparam edcf_acparam_t;
3232 
3233 /* Stop packing structures */
3234 #pragma pack()
3235 
3236 /* discovery state */
3237 typedef struct wl_p2p_disc_st
3238 {
3239  uint8_t state; /* see p2p_discovery_state_t */
3240  uint16_t chanspec; /* valid in listen state */
3241  uint16_t dwell_time_ms; /* valid in listen state, in ms */
3243 
3244 /* scan request */
3245 typedef struct wl_p2p_scan
3246 {
3247  uint8_t type; /* 'S' for WLC_SCAN, 'E' for "escan" */
3248  uint8_t reserved[3];
3249  /* scan or escan parms... */
3250 } wl_p2p_scan_t;
3251 
3252 /* escan request */
3253 typedef struct
3254 {
3255  uint8_t type; /* 'S' for WLC_SCAN, 'E' for "escan" */
3256  uint8_t reserved[3];
3257 
3258  /* escan params */
3259  wl_escan_params_t escan;
3260 } wl_p2p_escan_t;
3261 
3262 /* i/f request */
3263 typedef struct wl_p2p_if
3264 {
3265  struct ether_addr mac_address;
3266  uint8_t interface_type;
3267  uint16_t chan_spec;
3268 } wl_p2p_if_t;
3269 
3270 /* i/f query */
3271 typedef struct wl_p2p_ifq
3272 {
3273  uint32_t bsscfgidx;
3274  char ifname[16];
3275 } wl_p2p_ifq_t;
3276 
3277 /* OppPS & CTWindow */
3278 typedef struct wl_p2p_ops
3279 {
3280  uint8_t ops; /* 0: disable 1: enable */
3281  uint8_t ctw; /* >= 10 */
3282 } wl_p2p_ops_t;
3283 
3284 /* absence and presence request */
3285 typedef struct wl_p2p_sched_desc
3286 {
3287  uint32_t start;
3288  uint32_t interval;
3289  uint32_t duration;
3290  uint32_t count; /* see count */
3292 
3293 typedef struct wl_p2p_sched
3294 {
3295  uint8_t type; /* see schedule type */
3296  uint8_t action; /* see schedule action */
3297  uint8_t option; /* see schedule option */
3298  wl_p2p_sched_desc_t desc[1];
3299 } wl_p2p_sched_t;
3300 
3301 /* schedule type */
3302 #define WL_P2P_SCHED_TYPE_ABS 0 /* Scheduled Absence */
3303 #define WL_P2P_SCHED_TYPE_REQ_ABS 1 /* Requested Absence */
3304 #define WL_P2P_SCHED_TYPE_REQ_PSC 2 /* Requested Presence */
3305 
3306 /* schedule action during absence periods (for WL_P2P_SCHED_ABS type) */
3307 #define WL_P2P_SCHED_ACTION_NONE 0 /* no action */
3308 #define WL_P2P_SCHED_ACTION_DOZE 1 /* doze */
3309 #define WL_P2P_SCHED_ACTION_RESET 255 /* reset */
3310 
3311 /* schedule option - WL_P2P_SCHED_TYPE_ABS */
3312 #define WL_P2P_SCHED_OPTION_NORMAL 0 /* normal start/interval/duration/count in time */
3313 #define WL_P2P_SCHED_OPTION_BCNPCT 1 /* percentage of beacon interval */
3314 
3315 typedef struct wl_p2p_wfds_hash
3316 {
3317  uint32_t advt_id;
3318  uint16_t nw_cfg_method;
3319  uint8_t wfds_hash[6];
3320  uint8_t name_len;
3321  uint8_t service_name[MAX_WFDS_SVC_NAME_LEN];
3323 
3324 #define P2P_IP_ALLOC_LEN 12
3325 /* Definitions for Reliable Multicast */
3326 /* NOTE: RMC structures should not be packed */
3327 
3328 #define WL_RMC_CNT_VERSION (1)
3329 #define WL_RMC_TR_VERSION (1)
3330 #define WL_RMC_MAX_CLIENT (32)
3331 #define WL_RMC_FLAG_INBLACKLIST (1)
3332 #define WL_RMC_FLAG_ACTIVEACKER (2)
3333 #define WL_RMC_FLAG_RELMCAST (4)
3334 #define WL_RMC_FLAG_MASTER_TX (8)
3335 #define WL_RMC_MAX_TABLE_ENTRY (8)
3336 
3337 #define WL_RMC_VER (1)
3338 #define WL_RMC_INDEX_ACK_ALL (255)
3339 #define WL_RMC_NUM_OF_MC_STREAMS (4)
3340 #define WL_RMC_MAX_TRS_PER_GROUP (1)
3341 #define WL_RMC_MAX_TRS_IN_ACKALL (1)
3342 #define WL_RMC_ACK_MCAST0 (0x02)
3343 #define WL_RMC_ACK_MCAST_ALL (0x01)
3344 #define WL_RMC_ACTF_TIME_MIN (300) /* time in ms */
3345 #define WL_RMC_ACTF_TIME_MAX (20000) /* time in ms */
3346 #define WL_RMC_MAX_NUM_TRS (32) /* maximun transmitters allowed */
3347 #define WL_RMC_ARTMO_MIN (350) /* time in ms */
3348 #define WL_RMC_ARTMO_MAX (40000) /* time in ms */
3349 
3350 enum rmc_opcodes
3351 {
3352  RELMCAST_ENTRY_OP_DISABLE = 0, /* Disable multi-cast group */
3353  RELMCAST_ENTRY_OP_DELETE = 1, /* Delete multi-cast group */
3354  RELMCAST_ENTRY_OP_ENABLE = 2, /* Enable multi-cast group */
3355  RELMCAST_ENTRY_OP_ACK_ALL = 3 /* Enable ACK ALL bit in AMT */
3356 };
3357 
3358 /* RMC operational modes */
3359 enum rmc_modes
3360 {
3361  WL_RMC_MODE_RECEIVER = 0, /* Receiver mode by default */
3362  WL_RMC_MODE_TRANSMITTER = 1, /* Transmitter mode using wl ackreq */
3363  WL_RMC_MODE_INITIATOR = 2 /* Initiator mode using wl ackreq */
3364 };
3365 
3366 /* Each RMC mcast client info */
3367 typedef struct wl_relmcast_client
3368 {
3369  uint8_t flag; /* status of client such as AR, R, or blacklisted */
3370  int16_t rssi; /* rssi value of RMC client */
3371  struct ether_addr addr; /* mac address of RMC client */
3373 
3374 /* RMC Counters */
3375 typedef struct wl_rmc_cnts
3376 {
3377  uint16_t version; /* see definition of WL_CNT_T_VERSION */
3378  uint16_t length; /* length of entire structure */
3379  uint16_t dupcnt; /* counter for duplicate rmc MPDU */
3380  uint16_t ackreq_err; /* counter for wl ackreq error */
3381  uint16_t af_tx_err; /* error count for action frame transmit */
3382  uint16_t null_tx_err; /* error count for rmc null frame transmit */
3383  uint16_t af_unicast_tx_err; /* error count for rmc unicast frame transmit */
3384  uint16_t mc_no_amt_slot; /* No mcast AMT entry available */
3385  /* Unused. Keep for rom compatibility */
3386  uint16_t mc_no_glb_slot; /* No mcast entry available in global table */
3387  uint16_t mc_not_mirrored; /* mcast group is not mirrored */
3388  uint16_t mc_existing_tr; /* mcast group is already taken by transmitter */
3389  uint16_t mc_exist_in_amt; /* mcast group is already programmed in amt */
3390  /* Unused. Keep for rom compatibility */
3391  uint16_t mc_not_exist_in_gbl; /* mcast group is not in global table */
3392  uint16_t mc_not_exist_in_amt; /* mcast group is not in AMT table */
3393  uint16_t mc_utilized; /* mcast addressed is already taken */
3394  uint16_t mc_taken_other_tr; /* multi-cast addressed is already taken */
3395  uint32_t rmc_rx_frames_mac; /* no of mc frames received from mac */
3396  uint32_t rmc_tx_frames_mac; /* no of mc frames transmitted to mac */
3397  uint32_t mc_null_ar_cnt; /* no. of times NULL AR is received */
3398  uint32_t mc_ar_role_selected; /* no. of times took AR role */
3399  uint32_t mc_ar_role_deleted; /* no. of times AR role cancelled */
3400  uint32_t mc_noacktimer_expired; /* no. of times noack timer expired */
3401  uint16_t mc_no_wl_clk; /* no wl clk detected when trying to access amt */
3402  uint16_t mc_tr_cnt_exceeded; /* No of transmitters in the network exceeded */
3403 } wl_rmc_cnts_t;
3404 
3405 /* RMC Status */
3406 typedef struct wl_relmcast_st
3407 {
3408  uint8_t ver; /* version of RMC */
3409  uint8_t num; /* number of clients detected by transmitter */
3410  wl_relmcast_client_t clients[WL_RMC_MAX_CLIENT];
3411  uint16_t err; /* error status (used in infra) */
3412  uint16_t actf_time; /* action frame time period */
3414 
3415 /* Entry for each STA/node */
3416 typedef struct wl_rmc_entry
3417 {
3418  /* operation on multi-cast entry such add,
3419  * delete, ack-all
3420  */
3421  int8_t flag;
3422  struct ether_addr addr; /* multi-cast group mac address */
3423 } wl_rmc_entry_t;
3424 
3425 /* RMC table */
3426 typedef struct wl_rmc_entry_table
3427 {
3428  uint8_t index; /* index to a particular mac entry in table */
3429  uint8_t opcode; /* opcodes or operation on entry */
3430  wl_rmc_entry_t entry[WL_RMC_MAX_TABLE_ENTRY];
3432 
3433 typedef struct wl_rmc_trans_elem
3434 {
3435  struct ether_addr tr_mac; /* transmitter mac */
3436  struct ether_addr ar_mac; /* ar mac */
3437  uint16_t artmo; /* AR timeout */
3438  uint8_t amt_idx; /* amt table entry */
3439  uint16_t flag; /* entry will be acked, not acked, programmed, full etc */
3441 
3442 /* RMC transmitters */
3444 {
3445  uint8_t ver; /* version of RMC */
3446  uint8_t num_tr; /* number of transmitters in the network */
3447  wl_rmc_trans_elem_t trs[WL_RMC_MAX_NUM_TRS];
3449 
3450 /* To update vendor specific ie for RMC */
3451 typedef struct wl_rmc_vsie
3452 {
3453  uint8_t oui[3];
3454  uint16_t payload; /* IE Data Payload */
3455 } wl_rmc_vsie_t;
3456 
3457 /* WLC_E_ULP event data */
3458 #define WL_ULP_EVENT_VERSION 1
3459 #define WL_ULP_DISABLE_CONSOLE 1 /* Disable console message on ULP entry */
3460 #define WL_ULP_UCODE_DOWNLOAD 2 /* Download ULP ucode file */
3461 #define WL_ULP_ENTRY 3 /* inform ulp entry to Host during warmboot */
3462 
3463 typedef struct wl_ulp_event
3464 {
3465  uint16_t version;
3466  uint16_t ulp_dongle_action;
3467 } wl_ulp_event_t;
3468 
3469 /* clm download */
3470 #define DLOAD_HANDLER_VER 1 /* Downloader version */
3471 #define DLOAD_FLAG_VER_MASK 0xf000 /* Downloader version mask */
3472 #define DLOAD_FLAG_VER_SHIFT 12 /* Downloader version shift */
3473 
3474 #define DL_CRC_NOT_INUSE 0x0001
3475 #define DL_BEGIN 0x0002
3476 #define DL_END 0x0004
3477 
3478 enum
3479 {
3480  DL_TYPE_UCODE = 1, DL_TYPE_CLM = 2
3481 };
3482 
3484 {
3485  uint16_t flag;
3486  uint16_t dload_type;
3487  uint32_t len;
3488  uint32_t crc;
3489  uint8_t data[1];
3490 };
3491 typedef struct wl_dload_data wl_dload_data_t;
3492 
3494 {
3495  uint32_t ds_id;
3496  uint32_t clm_total_len;
3497  uint32_t num_chunks;
3498  uint32_t chunk_len;
3499  uint32_t chunk_offset;
3500  uint8_t data_chunk[1];
3501 };
3502 typedef struct wl_clm_dload_info wl_clm_dload_info_t;
3503 
3504 #pragma pack(1)
3505 typedef struct mesh_peer_info
3506 {
3507  uint16_t mesh_peer_prot_id;
3508  uint16_t local_link_id;
3509  uint16_t peer_link_id;
3510  uint16_t peer_aid;
3511  uint8_t state;
3513 
3514 typedef struct mesh_peer_info_ext
3515 {
3516  mesh_peer_info_t peer_info;
3517  uint16_t local_aid;
3518  struct ether_addr ea;
3519  uint32_t entry_state;
3520  int32_t rssi;
3522 
3523 typedef struct mesh_peer_info_dump
3524 {
3525  uint32_t buflen;
3526  uint32_t version;
3527  uint32_t count; /* number of results */
3528  mesh_peer_info_ext_t mpi_ext[1];
3530 
3531 #define WL_CHANSPEC_CTL_SB_LLL 0x0000
3532 #define WL_CHANSPEC_CTL_SB_LLU 0x0100
3533 #define WL_CHANSPEC_CTL_SB_LUL 0x0200
3534 #define WL_CHANSPEC_CTL_SB_LUU 0x0300
3535 #define WL_CHANSPEC_CTL_SB_ULL 0x0400
3536 #define WL_CHANSPEC_CTL_SB_ULU 0x0500
3537 #define WL_CHANSPEC_CTL_SB_UUL 0x0600
3538 #define WL_CHANSPEC_CTL_SB_UUU 0x0700
3539 #define WL_CHANSPEC_CTL_SB_LL WL_CHANSPEC_CTL_SB_LLL
3540 #define WL_CHANSPEC_CTL_SB_LU WL_CHANSPEC_CTL_SB_LLU
3541 #define WL_CHANSPEC_CTL_SB_UL WL_CHANSPEC_CTL_SB_LUL
3542 #define WL_CHANSPEC_CTL_SB_UU WL_CHANSPEC_CTL_SB_LUU
3543 #define WL_CHANSPEC_CTL_SB_L WL_CHANSPEC_CTL_SB_LLL
3544 #define WL_CHANSPEC_CTL_SB_U WL_CHANSPEC_CTL_SB_LLU
3545 #define INVCHANSPEC 255
3546 #define WL_CHANSPEC_CTL_SB_SHIFT 8
3547 #define WL_CHANSPEC_BW_5 0x0000
3548 #define WL_CHANSPEC_BW_80 0x2000
3549 #define WL_CHANSPEC_BW_160 0x2800
3550 #define WL_CHANSPEC_BW_8080 0x3000
3551 
3552 struct ether_addr;
3553 struct wl_join_scan_params;
3554 
3555 typedef struct wl_assoc_params
3556 {
3557  struct ether_addr bssid;
3558  uint16_t bssid_cnt;
3559  uint32_t chanspec_num;
3560  chanspec_t chanspec_list[1];
3562 #define WL_ASSOC_PARAMS_FIXED_SIZE (sizeof(wl_assoc_params_t) - sizeof(wl_chanspec_t) )
3564 #define WL_REASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
3566 #define WL_JOIN_ASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
3567 typedef struct wl_join_params
3568 {
3569  wlc_ssid_t ssid;
3570  struct wl_assoc_params params;
3572 #define WL_JOIN_PARAMS_FIXED_SIZE (sizeof(wl_join_params_t) - sizeof(wl_chanspec_t) )
3573 
3574 /* extended join params */
3575 typedef struct wl_extjoin_params
3576 {
3577  wlc_ssid_t ssid; /* {0, ""}: wildcard scan */
3578  struct wl_join_scan_params scan_params;
3579  wl_join_assoc_params_t assoc_params; /* optional field, but it must include the fixed portion
3580  * of the wl_join_assoc_params_t struct when it does
3581  * present.
3582  */
3584 #define WL_EXTJOIN_PARAMS_FIXED_SIZE (sizeof(wl_extjoin_params_t) - sizeof(chanspec_t) )
3585 
3586 #define WLC_SET_CUSTOM_COUNTRY ( (uint32_t)320 )
3587 
3588 /* WLC_GET_AUTH, WLC_SET_AUTH values */
3589 #define WL_AUTH_OPEN_SYSTEM 0 /* d11 open authentication */
3590 #define WL_AUTH_SHARED_KEY 1 /* d11 shared authentication */
3591 #define WL_AUTH_OPEN_SHARED 2 /* try open, then shared if open failed w/rc 13 */
3592 #define WL_AUTH_SAE 3 /* Simultaneous Authentication of Equals (SAE) */
3593 
3594 /** ARP offload statistics */
3596 {
3597  uint32_t version; /**< WLAN version */
3598  uint32_t peerage; /**< Current peer age-out time */
3599  uint32_t arpoe; /**< Agent enabled state */
3600  uint32_t features_enabled; /**< ARP Feature Flags @ref CY_ARP_OL_AGENT_ENABLE, etc. */
3601  arp_ol_stats_t stats; /**< Current stats */
3602  uint32_t host_ip_list[ARP_MULTIHOMING_MAX]; /**< host_ip addresses in one call */
3603 };
3604 
3605 #pragma pack()
3606 
3607 /* TCP Keepalive offload related defintions should not be added inside
3608  * pragma pack to avoid functionality breakage.
3609  */
3610 /*
3611  * TCP keepalive offload definitions
3612  */
3613 #define MAX_TKO_CONN 4
3614 #define IPV4_ADDR_LEN 4 /* IPV4 address length */
3615 
3616 /* Default TCP Keepalive retry parameters. */
3617 #define TCP_KEEPALIVE_OFFLOAD_INTERVAL_SEC (20)
3618 #define TCP_KEEPALIVE_OFFLOAD_RETRY_COUNT (3)
3619 #define TCP_KEEPALIVE_OFFLOAD_RETRY_INTERVAL_SEC (3)
3620 
3621 /* common iovar struct */
3622 typedef struct wl_tko
3623 {
3624  uint16_t subcmd_id; /* subcommand id */
3625  uint16_t len; /* total length of data[] */
3626  uint8_t data[1]; /* subcommand data */
3627 } wl_tko_t;
3628 
3629 /* subcommand ids */
3630 #define WL_TKO_SUBCMD_MAX_TCP 0 /* max TCP connections supported */
3631 #define WL_TKO_SUBCMD_PARAM 1 /* configure offload common parameters */
3632 #define WL_TKO_SUBCMD_CONNECT 2 /* TCP connection info */
3633 #define WL_TKO_SUBCMD_ENABLE 3 /* enable/disable */
3634 #define WL_TKO_SUBCMD_STATUS 4 /* TCP connection status */
3635 
3636 /* WL_TKO_SUBCMD_MAX_CONNECT subcommand data */
3637 typedef struct wl_tko_max_tcp
3638 {
3639  uint8_t max; /* max TCP connections supported */
3640  uint8_t pad[3]; /* 4-byte struct alignment */
3642 
3643 /* WL_TKO_SUBCMD_PARAM subcommand data */
3644 typedef struct wl_tko_param
3645 {
3646  uint16_t interval; /* keepalive tx interval (secs) */
3647  uint16_t retry_interval; /* keepalive retry interval (secs) */
3648  uint16_t retry_count; /* retry_count */
3649  uint8_t pad[2]; /* 4-byte struct alignment */
3650 } wl_tko_param_t;
3651 
3652 /* WL_TKO_SUBCMD_CONNECT subcommand data
3653  * invoke with unique 'index' for each TCP connection
3654  */
3655 typedef struct wl_tko_connect
3656 {
3657  uint8_t index; /* TCP connection index, 0 to max-1 */
3658  uint8_t ip_addr_type; /* 0 - IPv4, 1 - IPv6 */
3659  uint16_t local_port; /* local port */
3660  uint16_t remote_port; /* remote port */
3661  uint32_t local_seq; /* local sequence number */
3662  uint32_t remote_seq; /* remote sequence number */
3663  uint16_t request_len; /* TCP keepalive request packet length */
3664  uint16_t response_len; /* TCP keepalive response packet length */
3665  uint8_t data[1]; /* variable length field containing local/remote IPv4/IPv6,
3666  * TCP keepalive request packet, TCP keepalive response packet
3667  * For IPv4, length is 4 * 2 + request_length + response_length
3668  * offset 0 - local IPv4
3669  * offset 4 - remote IPv4
3670  * offset 8 - TCP keepalive request packet
3671  * offset 8+request_length - TCP keepalive response packet
3672  * For IPv6, length is 16 * 2 + request_length + response_length
3673  * offset 0 - local IPv6
3674  * offset 16 - remote IPv6
3675  * offset 32 - TCP keepalive request packet
3676  * offset 32+request_length - TCP keepalive response packet
3677  */
3679 
3680 /* WL_TKO_SUBCMD_CONNECT subcommand data to GET configured info for specific index */
3681 typedef struct wl_tko_get_connect
3682 {
3683  uint8_t index; /* TCP connection index, 0 to max-1 */
3684  uint8_t pad[3]; /* 4-byte struct alignment */
3686 
3687 typedef struct wl_tko_enable
3688 {
3689  uint8_t enable; /* 1 - enable, 0 - disable */
3690  uint8_t pad[3]; /* 4-byte struct alignment */
3691 } wl_tko_enable_t;
3692 
3693 /* WL_TKO_SUBCMD_STATUS subcommand data */
3694 /* must be invoked before tko is disabled else status is unavailable */
3695 typedef struct wl_tko_status
3696 {
3697  uint8_t count; /* number of status entries (i.e. equals
3698  * max TCP connections supported)
3699  */
3700  uint8_t status[1]; /* variable length field contain status for
3701  * each TCP connection index
3702  */
3703 } wl_tko_status_t;
3704 /** Get/Set TKO intervals & retrys */
3706 {
3707  uint16_t tko_interval; /**< How often to send (in seconds) */
3708  uint16_t tko_retry_count; /**< Max times to retry if original fails */
3709  uint16_t tko_retry_interval; /**< Wait time between retries (in seconds) */
3710 };
3711 
3712 /** Status values used in conjunction with whd_tko_status_t */
3713 typedef enum
3714 {
3715  TKO_STATUS_NORMAL = 0, /**< TCP connection normal, no error */
3716  TKO_STATUS_NO_RESPONSE = 1, /**< no response to TCP keepalive */
3717  TKO_STATUS_NO_TCP_ACK_FLAG = 2, /**< TCP ACK flag not set */
3718  TKO_STATUS_UNEXPECT_TCP_FLAG = 3, /**< unexpect TCP flags set other than ACK */
3719  TKO_STATUS_SEQ_NUM_INVALID = 4, /**< ACK != sequence number */
3720  TKO_STATUS_REMOTE_SEQ_NUM_INVALID = 5, /**< SEQ > remote sequence number */
3721  TKO_STATUS_TCP_DATA = 6, /**< TCP data available */
3722  TKO_STATUS_UNAVAILABLE = 255, /**< not used/configured */
3723 } tko_status_t;
3724 
3725 /** Status of each TCP connection */
3727 {
3728  uint8_t count; /**< number of status entries */
3729  uint8_t status[MAX_TKO_CONN]; /**< each TCP status */
3730 };
3731 
3732 /** Struct to query FW for current TKO configuation */
3734 {
3735  uint8_t index; /**< TCP connection index, 0 to max-1 */
3736  uint8_t ip_addr_type; /**< 0 - IPv4, 1 - IPv6 */
3737  uint16_t local_port; /**< local port */
3738  uint16_t remote_port; /**< remote port */
3739  uint32_t local_seq; /**< local sequence number */
3740  uint32_t remote_seq; /**< remote sequence number */
3741  uint16_t request_len; /**< TCP keepalive request packet length */
3742  uint16_t response_len; /**< TCP keepalive response packet length */
3743  uint8_t data[1]; /**< variable length field containing local/remote IPv4/IPv6,
3744  * TCP keepalive request packet, TCP keepalive response packet
3745  * For IPv4, length is 4 * 2 + request_length + response_length
3746  * offset 0 - local IPv4
3747  * offset 4 - remote IPv4
3748  * offset 8 - TCP keepalive request packet
3749  * offset 8+request_length - TCP keepalive response packet
3750  * For IPv6, length is 16 * 2 + request_length + response_length
3751  * offset 0 - local IPv6
3752  * offset 16 - remote IPv6
3753  * offset 32 - TCP keepalive request packet
3754  * offset 32+request_length - TCP keepalive response packet
3755  */
3756 };
3757 
3758 #ifdef __cplusplus
3759 } /* extern "C" */
3760 #endif
3761 
3762 #endif
3763 
uint16_t local_port
local port
Definition: whd_wlioctl.h:3737
uint16_t tko_retry_interval
Wait time between retries (in seconds)
Definition: whd_wlioctl.h:3709
Get/Set TKO intervals & retrys.
Definition: whd_wlioctl.h:3705
Definition: whd_wlioctl.h:3416
uint8_t ip_addr_type
0 - IPv4, 1 - IPv6
Definition: whd_wlioctl.h:3736
uint16_t response_len
TCP keepalive response packet length.
Definition: whd_wlioctl.h:3742
Struct to query FW for current TKO configuation.
Definition: whd_wlioctl.h:3733
uint8_t count
number of status entries
Definition: whd_wlioctl.h:3728
uint32_t arpoe
Agent enabled state.
Definition: whd_wlioctl.h:3599
uint16_t tko_retry_count
Max times to retry if original fails.
Definition: whd_wlioctl.h:3708
uint16_t tko_interval
How often to send (in seconds)
Definition: whd_wlioctl.h:3707
The key size.
uint16_t remote_port
remote port
Definition: whd_wlioctl.h:3738
uint16_t wl_chanspec_t
Channel specified in uint16_t.
Definition: whd_types.h:720
Definition: whd_wlioctl.h:3426
Status of each TCP connection.
Definition: whd_wlioctl.h:3726
uint32_t features_enabled
ARP Feature Flags CY_ARP_OL_AGENT_ENABLE, etc.
Definition: whd_wlioctl.h:3600
uint32_t version
WLAN version.
Definition: whd_wlioctl.h:3597
uint32_t peerage
Current peer age-out time.
Definition: whd_wlioctl.h:3598
arp_ol_stats_t stats
Current stats.
Definition: whd_wlioctl.h:3601
ARP offload statistics.
Definition: whd_wlioctl.h:3595
BSS(Basic Service Set) information structure.
Definition: whd_types.h:728
uint32_t local_seq
local sequence number
Definition: whd_wlioctl.h:3739
uint16_t request_len
TCP keepalive request packet length.
Definition: whd_wlioctl.h:3741
uint32_t remote_seq
remote sequence number
Definition: whd_wlioctl.h:3740
uint8_t index
TCP connection index, 0 to max-1.
Definition: whd_wlioctl.h:3735
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.