Mistake on this page?
Report an issue in GitHub or email us
whd_wlioctl.h
1 /*
2  * Copyright 2021, Cypress Semiconductor Corporation (an Infineon company)
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 NREINITREASONCOUNT 8
1546 /* XXX NREINITREASONCOUNT is 8 in other branches.
1547  * Any change to this will break wl tool compatibility with other branches
1548  * #define NREINITREASONCOUNT WL_REINIT_RC_LAST
1549  */
1550 
1551 #define NFIFO 6
1552 #define WL_CNT_T_VERSION 6
1553 #define WL_CNT_EXT_T_VERSION 1
1554 #define WL_PHYRATE_LOG_SIZE 1200
1555 typedef struct
1556 {
1557  uint16_t version; /**< see definition of WL_CNT_T_VERSION */
1558  uint16_t datalen; /**< length of data including all paddings. */
1559  uint8_t data[1]; /**< variable length payload:
1560  * 1 or more bcm_xtlv_t type of tuples.
1561  * each tuple is padded to multiple of 4 bytes.
1562  * 'datalen' field of this structure includes all paddings.
1563  */
1564 } wl_cnt_info_t;
1565 /** wlc layer counters */
1566 typedef struct
1567 {
1568  /* transmit stat counters */
1569  uint32_t txframe; /**< tx data frames */
1570  uint32_t txbyte; /**< tx data bytes */
1571  uint32_t txretrans; /**< tx mac retransmits */
1572  uint32_t txerror; /**< tx data errors (derived: sum of others) */
1573  uint32_t txctl; /**< tx management frames */
1574  uint32_t txprshort; /**< tx short preamble frames */
1575  uint32_t txserr; /**< tx status errors */
1576  uint32_t txnobuf; /**< tx out of buffers errors */
1577  uint32_t txnoassoc; /**< tx discard because we're not associated */
1578  uint32_t txrunt; /**< tx runt frames */
1579  uint32_t txchit; /**< tx header cache hit (fastpath) */
1580  uint32_t txcmiss; /**< tx header cache miss (slowpath) */
1581 
1582  /* transmit chip error counters */
1583  uint32_t txuflo; /**< tx fifo underflows */
1584  uint32_t txphyerr; /**< tx phy errors (indicated in tx status) */
1585  uint32_t txphycrs; /**< PR8861/8963 counter */
1586 
1587  /* receive stat counters */
1588  uint32_t rxframe; /**< rx data frames */
1589  uint32_t rxbyte; /**< rx data bytes */
1590  uint32_t rxerror; /**< rx data errors (derived: sum of others) */
1591  uint32_t rxctl; /**< rx management frames */
1592  uint32_t rxnobuf; /**< rx out of buffers errors */
1593  uint32_t rxnondata; /**< rx non data frames in the data channel errors */
1594  uint32_t rxbadds; /**< rx bad DS errors */
1595  uint32_t rxbadcm; /**< rx bad control or management frames */
1596  uint32_t rxfragerr; /**< rx fragmentation errors */
1597  uint32_t rxrunt; /**< rx runt frames */
1598  uint32_t rxgiant; /**< rx giant frames */
1599  uint32_t rxnoscb; /**< rx no scb error */
1600  uint32_t rxbadproto; /**< rx invalid frames */
1601  uint32_t rxbadsrcmac; /**< rx frames with Invalid Src Mac */
1602  uint32_t rxbadda; /**< rx frames tossed for invalid da */
1603  uint32_t rxfilter; /**< rx frames filtered out */
1604 
1605  /* receive chip error counters */
1606  uint32_t rxoflo; /**< rx fifo overflow errors */
1607  uint32_t rxuflo[NFIFO]; /**< rx dma descriptor underflow errors */
1608 
1609  uint32_t d11cnt_txrts_off; /**< d11cnt txrts value when reset d11cnt */
1610  uint32_t d11cnt_rxcrc_off; /**< d11cnt rxcrc value when reset d11cnt */
1611  uint32_t d11cnt_txnocts_off; /**< d11cnt txnocts value when reset d11cnt */
1612 
1613  /* misc counters */
1614  uint32_t dmade; /**< tx/rx dma descriptor errors */
1615  uint32_t dmada; /**< tx/rx dma data errors */
1616  uint32_t dmape; /**< tx/rx dma descriptor protocol errors */
1617  uint32_t reset; /**< reset count */
1618  uint32_t tbtt; /**< cnts the TBTT int's */
1619  uint32_t txdmawar; /**< # occurrences of PR15420 workaround */
1620  uint32_t pkt_callback_reg_fail; /**< callbacks register failure */
1621 
1622  /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
1623  uint32_t txfrag; /**< dot11TransmittedFragmentCount */
1624  uint32_t txmulti; /**< dot11MulticastTransmittedFrameCount */
1625  uint32_t txfail; /**< dot11FailedCount */
1626  uint32_t txretry; /**< dot11RetryCount */
1627  uint32_t txretrie; /**< dot11MultipleRetryCount */
1628  uint32_t rxdup; /**< dot11FrameduplicateCount */
1629  uint32_t txrts; /**< dot11RTSSuccessCount */
1630  uint32_t txnocts; /**< dot11RTSFailureCount */
1631  uint32_t txnoack; /**< dot11ACKFailureCount */
1632  uint32_t rxfrag; /**< dot11ReceivedFragmentCount */
1633  uint32_t rxmulti; /**< dot11MulticastReceivedFrameCount */
1634  uint32_t rxcrc; /**< dot11FCSErrorCount */
1635  uint32_t txfrmsnt; /**< dot11TransmittedFrameCount (bogus MIB?) */
1636  uint32_t rxundec; /**< dot11WEPUndecryptableCount */
1637 
1638  /* WPA2 counters (see rxundec for DecryptFailureCount) */
1639  uint32_t tkipmicfaill; /**< TKIPLocalMICFailures */
1640  uint32_t tkipcntrmsr; /**< TKIPCounterMeasuresInvoked */
1641  uint32_t tkipreplay; /**< TKIPReplays */
1642  uint32_t ccmpfmterr; /**< CCMPFormatErrors */
1643  uint32_t ccmpreplay; /**< CCMPReplays */
1644  uint32_t ccmpundec; /**< CCMPDecryptErrors */
1645  uint32_t fourwayfail; /**< FourWayHandshakeFailures */
1646  uint32_t wepundec; /**< dot11WEPUndecryptableCount */
1647  uint32_t wepicverr; /**< dot11WEPICVErrorCount */
1648  uint32_t decsuccess; /**< DecryptSuccessCount */
1649  uint32_t tkipicverr; /**< TKIPICVErrorCount */
1650  uint32_t wepexcluded; /**< dot11WEPExcludedCount */
1651 
1652  uint32_t txchanrej; /**< Tx frames suppressed due to channel rejection */
1653  uint32_t psmwds; /**< Count PSM watchdogs */
1654  uint32_t phywatchdog; /**< Count Phy watchdogs (triggered by ucode) */
1655 
1656  /* MBSS counters, AP only */
1657  uint32_t prq_entries_handled; /**< PRQ entries read in */
1658  uint32_t prq_undirected_entries; /**< which were bcast bss & ssid */
1659  uint32_t prq_bad_entries; /**< which could not be translated to info */
1660  uint32_t atim_suppress_count; /**< TX suppressions on ATIM fifo */
1661  uint32_t bcn_template_not_ready; /**< Template marked in use on send bcn ... */
1662  uint32_t bcn_template_not_ready_done; /**< ...but "DMA done" interrupt rcvd */
1663  uint32_t late_tbtt_dpc; /**< TBTT DPC did not happen in time */
1664 
1665  /* per-rate receive stat counters */
1666  uint32_t rx1mbps; /**< packets rx at 1Mbps */
1667  uint32_t rx2mbps; /**< packets rx at 2Mbps */
1668  uint32_t rx5mbps5; /**< packets rx at 5.5Mbps */
1669  uint32_t rx6mbps; /**< packets rx at 6Mbps */
1670  uint32_t rx9mbps; /**< packets rx at 9Mbps */
1671  uint32_t rx11mbps; /**< packets rx at 11Mbps */
1672  uint32_t rx12mbps; /**< packets rx at 12Mbps */
1673  uint32_t rx18mbps; /**< packets rx at 18Mbps */
1674  uint32_t rx24mbps; /**< packets rx at 24Mbps */
1675  uint32_t rx36mbps; /**< packets rx at 36Mbps */
1676  uint32_t rx48mbps; /**< packets rx at 48Mbps */
1677  uint32_t rx54mbps; /**< packets rx at 54Mbps */
1678  uint32_t rx108mbps; /**< packets rx at 108mbps */
1679  uint32_t rx162mbps; /**< packets rx at 162mbps */
1680  uint32_t rx216mbps; /**< packets rx at 216 mbps */
1681  uint32_t rx270mbps; /**< packets rx at 270 mbps */
1682  uint32_t rx324mbps; /**< packets rx at 324 mbps */
1683  uint32_t rx378mbps; /**< packets rx at 378 mbps */
1684  uint32_t rx432mbps; /**< packets rx at 432 mbps */
1685  uint32_t rx486mbps; /**< packets rx at 486 mbps */
1686  uint32_t rx540mbps; /**< packets rx at 540 mbps */
1687 
1688  uint32_t rfdisable; /**< count of radio disables */
1689 
1690  uint32_t txexptime; /**< Tx frames suppressed due to timer expiration */
1691 
1692  uint32_t txmpdu_sgi; /**< count for sgi transmit */
1693  uint32_t rxmpdu_sgi; /**< count for sgi received */
1694  uint32_t txmpdu_stbc; /**< count for stbc transmit */
1695  uint32_t rxmpdu_stbc; /**< count for stbc received */
1696 
1697  uint32_t rxundec_mcst; /**< dot11WEPUndecryptableCount */
1698 
1699  /* WPA2 counters (see rxundec for DecryptFailureCount) */
1700  uint32_t tkipmicfaill_mcst; /**< TKIPLocalMICFailures */
1701  uint32_t tkipcntrmsr_mcst; /**< TKIPCounterMeasuresInvoked */
1702  uint32_t tkipreplay_mcst; /**< TKIPReplays */
1703  uint32_t ccmpfmterr_mcst; /**< CCMPFormatErrors */
1704  uint32_t ccmpreplay_mcst; /**< CCMPReplays */
1705  uint32_t ccmpundec_mcst; /**< CCMPDecryptErrors */
1706  uint32_t fourwayfail_mcst; /**< FourWayHandshakeFailures */
1707  uint32_t wepundec_mcst; /**< dot11WEPUndecryptableCount */
1708  uint32_t wepicverr_mcst; /**< dot11WEPICVErrorCount */
1709  uint32_t decsuccess_mcst; /**< DecryptSuccessCount */
1710  uint32_t tkipicverr_mcst; /**< TKIPICVErrorCount */
1711  uint32_t wepexcluded_mcst; /**< dot11WEPExcludedCount */
1712 
1713  uint32_t dma_hang; /**< count for dma hang */
1714  uint32_t reinit; /**< count for reinit */
1715 
1716  uint32_t pstatxucast; /**< count of ucast frames xmitted on all psta assoc */
1717  uint32_t pstatxnoassoc; /**< count of txnoassoc frames xmitted on all psta assoc */
1718  uint32_t pstarxucast; /**< count of ucast frames received on all psta assoc */
1719  uint32_t pstarxbcmc; /**< count of bcmc frames received on all psta */
1720  uint32_t pstatxbcmc; /**< count of bcmc frames transmitted on all psta */
1721 
1722  uint32_t cso_passthrough; /**< hw cso required but passthrough */
1723  uint32_t cso_normal; /**< hw cso hdr for normal process */
1724  uint32_t chained; /**< number of frames chained */
1725  uint32_t chainedsz1; /**< number of chain size 1 frames */
1726  uint32_t unchained; /**< number of frames not chained */
1727  uint32_t maxchainsz; /**< max chain size so far */
1728  uint32_t currchainsz; /**< current chain size */
1729  uint32_t pciereset; /**< Secondary Bus Reset issued by driver */
1730  uint32_t cfgrestore; /**< configspace restore by driver */
1731  uint32_t reinitreason[NREINITREASONCOUNT]; /**< reinitreason counters; 0: Unknown reason */
1732  uint32_t rxrtry;
1733  uint32_t rxmpdu_mu; /**< Number of MU MPDUs received */
1734 
1735  /* detailed control/management frames */
1736  uint32_t txbar; /**< Number of TX BAR */
1737  uint32_t rxbar; /**< Number of RX BAR */
1738  uint32_t txpspoll; /**< Number of TX PS-poll */
1739  uint32_t rxpspoll; /**< Number of RX PS-poll */
1740  uint32_t txnull; /**< Number of TX NULL_DATA */
1741  uint32_t rxnull; /**< Number of RX NULL_DATA */
1742  uint32_t txqosnull; /**< Number of TX NULL_QoSDATA */
1743  uint32_t rxqosnull; /**< Number of RX NULL_QoSDATA */
1744  uint32_t txassocreq; /**< Number of TX ASSOC request */
1745  uint32_t rxassocreq; /**< Number of RX ASSOC request */
1746  uint32_t txreassocreq; /**< Number of TX REASSOC request */
1747  uint32_t rxreassocreq; /**< Number of RX REASSOC request */
1748  uint32_t txdisassoc; /**< Number of TX DISASSOC */
1749  uint32_t rxdisassoc; /**< Number of RX DISASSOC */
1750  uint32_t txassocrsp; /**< Number of TX ASSOC response */
1751  uint32_t rxassocrsp; /**< Number of RX ASSOC response */
1752  uint32_t txreassocrsp; /**< Number of TX REASSOC response */
1753  uint32_t rxreassocrsp; /**< Number of RX REASSOC response */
1754  uint32_t txauth; /**< Number of TX AUTH */
1755  uint32_t rxauth; /**< Number of RX AUTH */
1756  uint32_t txdeauth; /**< Number of TX DEAUTH */
1757  uint32_t rxdeauth; /**< Number of RX DEAUTH */
1758  uint32_t txprobereq; /**< Number of TX probe request */
1759  uint32_t rxprobereq; /**< Number of RX probe request */
1760  uint32_t txprobersp; /**< Number of TX probe response */
1761  uint32_t rxprobersp; /**< Number of RX probe response */
1762  uint32_t txaction; /**< Number of TX action frame */
1763  uint32_t rxaction; /**< Number of RX action frame */
1764  uint32_t ampdu_wds; /**< Number of AMPDU watchdogs */
1765  uint32_t txlost; /**< Number of lost packets reported in txs */
1766  uint32_t txdatamcast; /**< Number of TX multicast data packets */
1767  uint32_t txdatabcast; /**< Number of TX broadcast data packets */
1768  uint32_t psmxwds; /**< Number of PSMx watchdogs */
1769  uint32_t rxback;
1770  uint32_t txback;
1771  uint32_t p2p_tbtt; /**< Number of P2P TBTT Events */
1772  uint32_t p2p_tbtt_miss; /**< Number of P2P TBTT Events Miss */
1773  uint32_t txqueue_start;
1774  uint32_t txqueue_end;
1775  uint32_t txbcast; /* Broadcast TransmittedFrameCount */
1776  uint32_t txdropped; /* tx dropped pkts */
1777  uint32_t rxbcast; /* BroadcastReceivedFrameCount */
1778  uint32_t rxdropped; /* rx dropped pkts (derived: sum of others) */
1779  /* XXX: Do not remove or rename inthe middle of this struct.
1780  * All counter variables have to be of uint32_t.
1781  * Please follow the instruction in
1782  * http://hwnbu-twiki.sj.broadcom.com/bin/view/Mwgroup/WlCounters#Counter_Edition
1783  */
1784 } wl_cnt_ver_30_t;
1785 typedef struct
1786 {
1787  uint16_t version; /* see definition of WL_CNT_T_VERSION */
1788  uint16_t length; /* length of entire structure */
1789 
1790  /* transmit stat counters */
1791  uint32_t txframe; /* tx data frames */
1792  uint32_t txbyte; /* tx data bytes */
1793  uint32_t txretrans; /* tx mac retransmits */
1794  uint32_t txerror; /* tx data errors (derived: sum of others) */
1795  uint32_t txctl; /* tx management frames */
1796  uint32_t txprshort; /* tx short preamble frames */
1797  uint32_t txserr; /* tx status errors */
1798  uint32_t txnobuf; /* tx out of buffers errors */
1799  uint32_t txnoassoc; /* tx discard because we're not associated */
1800  uint32_t txrunt; /* tx runt frames */
1801  uint32_t txchit; /* tx header cache hit (fastpath) */
1802  uint32_t txcmiss; /* tx header cache miss (slowpath) */
1803 
1804  /* transmit chip error counters */
1805  uint32_t txuflo; /* tx fifo underflows */
1806  uint32_t txphyerr; /* tx phy errors (indicated in tx status) */
1807  uint32_t txphycrs; /* PR8861/8963 counter */
1808 
1809  /* receive stat counters */
1810  uint32_t rxframe; /* rx data frames */
1811  uint32_t rxbyte; /* rx data bytes */
1812  uint32_t rxerror; /* rx data errors (derived: sum of others) */
1813  uint32_t rxctl; /* rx management frames */
1814  uint32_t rxnobuf; /* rx out of buffers errors */
1815  uint32_t rxnondata; /* rx non data frames in the data channel errors */
1816  uint32_t rxbadds; /* rx bad DS errors */
1817  uint32_t rxbadcm; /* rx bad control or management frames */
1818  uint32_t rxfragerr; /* rx fragmentation errors */
1819  uint32_t rxrunt; /* rx runt frames */
1820  uint32_t rxgiant; /* rx giant frames */
1821  uint32_t rxnoscb; /* rx no scb error */
1822  uint32_t rxbadproto; /* rx invalid frames */
1823  uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */
1824  uint32_t rxbadda; /* rx frames tossed for invalid da */
1825  uint32_t rxfilter; /* rx frames filtered out */
1826 
1827  /* receive chip error counters */
1828  uint32_t rxoflo; /* rx fifo overflow errors */
1829  uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */
1830 
1831  uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */
1832  uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */
1833  uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */
1834 
1835  /* misc counters */
1836  uint32_t dmade; /* tx/rx dma descriptor errors */
1837  uint32_t dmada; /* tx/rx dma data errors */
1838  uint32_t dmape; /* tx/rx dma descriptor protocol errors */
1839  uint32_t reset; /* reset count */
1840  uint32_t tbtt; /* cnts the TBTT int's */
1841  uint32_t txdmawar; /* # occurrences of PR15420 workaround */
1842  uint32_t pkt_callback_reg_fail; /* callbacks register failure */
1843 
1844  /* MAC counters: 32-bit version of d11.h's macstat_t */
1845  uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
1846  * Control Management (includes retransmissions)
1847  */
1848  uint32_t txrtsfrm; /* number of RTS sent out by the MAC */
1849  uint32_t txctsfrm; /* number of CTS sent out by the MAC */
1850  uint32_t txackfrm; /* number of ACK frames sent out */
1851  uint32_t txdnlfrm; /* Not used */
1852  uint32_t txbcnfrm; /* beacons transmitted */
1853  uint32_t txfunfl[8]; /* per-fifo tx underflows */
1854  uint32_t txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS
1855  * or BCN)
1856  */
1857  uint32_t txphyerror; /* Transmit phy error, type of error is reported in tx-status for
1858  * driver enqueued frames
1859  */
1860  uint32_t rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */
1861  uint32_t rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */
1862  uint32_t rxinvmachdr; /* Either the protocol version != 0 or frame type not
1863  * data/control/management
1864  */
1865  uint32_t rxbadfcs; /* number of frames for which the CRC check failed in the MAC */
1866  uint32_t rxbadplcp; /* parity check of the PLCP header failed */
1867  uint32_t rxcrsglitch; /* PHY was able to correlate the preamble but not the header */
1868  uint32_t rxstrt; /* Number of received frames with a good PLCP
1869  * (i.e. passing parity check)
1870  */
1871  uint32_t rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */
1872  uint32_t rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */
1873  uint32_t rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */
1874  uint32_t rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */
1875  uint32_t rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */
1876  uint32_t rxackucast; /* number of ucast ACKS received (good FCS) */
1877  uint32_t rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */
1878  uint32_t rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */
1879  uint32_t rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */
1880  uint32_t rxrtsocast; /* number of received RTS not addressed to the MAC */
1881  uint32_t rxctsocast; /* number of received CTS not addressed to the MAC */
1882  uint32_t rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */
1883  uint32_t rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */
1884  uint32_t rxcfrmmcast; /* number of RX Control multicast frames received by the MAC
1885  * (unlikely to see these)
1886  */
1887  uint32_t rxbeaconmbss; /* beacons received from member of BSS */
1888  uint32_t rxdfrmucastobss; /* number of unicast frames addressed to the MAC from
1889  * other BSS (WDS FRAME)
1890  */
1891  uint32_t rxbeaconobss; /* beacons received from other BSS */
1892  uint32_t rxrsptmout; /* Number of response timeouts for transmitted frames
1893  * expecting a response
1894  */
1895  uint32_t bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */
1896  uint32_t rxf0ovfl; /* Number of receive fifo 0 overflows */
1897  uint32_t rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */
1898  uint32_t rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */
1899  uint32_t txsfovfl; /* Number of transmit status fifo overflows (obsolete) */
1900  uint32_t pmqovfl; /* Number of PMQ overflows */
1901  uint32_t rxcgprqfrm; /* Number of received Probe requests that made it into
1902  * the PRQ fifo
1903  */
1904  uint32_t rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */
1905  uint32_t txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did
1906  * not get ACK
1907  */
1908  uint32_t txcgprssuc; /* Tx Probe Response Success (ACK was received) */
1909  uint32_t prs_timeout; /* Number of probe requests that were dropped from the PRQ
1910  * fifo because a probe response could not be sent out within
1911  * the time limit defined in M_PRS_MAXTIME
1912  */
1913  uint32_t rxnack; /* XXX Number of NACKS received (Afterburner) */
1914  uint32_t frmscons; /* XXX Number of frames completed without transmission because of an
1915  * Afterburner re-queue
1916  */
1917  uint32_t txnack; /* XXX Number of NACKs transmitted (Afterburner) */
1918  uint32_t txglitch_nack; /* obsolete */
1919  uint32_t txburst; /* obsolete */
1920 
1921  /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
1922  uint32_t txfrag; /* dot11TransmittedFragmentCount */
1923  uint32_t txmulti; /* dot11MulticastTransmittedFrameCount */
1924  uint32_t txfail; /* dot11FailedCount */
1925  uint32_t txretry; /* dot11RetryCount */
1926  uint32_t txretrie; /* dot11MultipleRetryCount */
1927  uint32_t rxdup; /* dot11FrameduplicateCount */
1928  uint32_t txrts; /* dot11RTSSuccessCount */
1929  uint32_t txnocts; /* dot11RTSFailureCount */
1930  uint32_t txnoack; /* dot11ACKFailureCount */
1931  uint32_t rxfrag; /* dot11ReceivedFragmentCount */
1932  uint32_t rxmulti; /* dot11MulticastReceivedFrameCount */
1933  uint32_t rxcrc; /* dot11FCSErrorCount */
1934  uint32_t txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */
1935  uint32_t rxundec; /* dot11WEPUndecryptableCount */
1936 
1937  /* WPA2 counters (see rxundec for DecryptFailureCount) */
1938  uint32_t tkipmicfaill; /* TKIPLocalMICFailures */
1939  uint32_t tkipcntrmsr; /* TKIPCounterMeasuresInvoked */
1940  uint32_t tkipreplay; /* TKIPReplays */
1941  uint32_t ccmpfmterr; /* CCMPFormatErrors */
1942  uint32_t ccmpreplay; /* CCMPReplays */
1943  uint32_t ccmpundec; /* CCMPDecryptErrors */
1944  uint32_t fourwayfail; /* FourWayHandshakeFailures */
1945  uint32_t wepundec; /* dot11WEPUndecryptableCount */
1946  uint32_t wepicverr; /* dot11WEPICVErrorCount */
1947  uint32_t decsuccess; /* DecryptSuccessCount */
1948  uint32_t tkipicverr; /* TKIPICVErrorCount */
1949  uint32_t wepexcluded; /* dot11WEPExcludedCount */
1950 
1951  uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */
1952 
1953  /* WPA2 counters (see rxundec for DecryptFailureCount) */
1954  uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */
1955  uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */
1956  uint32_t tkipreplay_mcst; /* TKIPReplays */
1957  uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */
1958  uint32_t ccmpreplay_mcst; /* CCMPReplays */
1959  uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */
1960  uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */
1961  uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */
1962  uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */
1963  uint32_t decsuccess_mcst; /* DecryptSuccessCount */
1964  uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */
1965  uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */
1966 
1967  uint32_t txchanrej; /* Tx frames suppressed due to channel rejection */
1968  uint32_t txexptime; /* Tx frames suppressed due to timer expiration */
1969  uint32_t psmwds; /* Count PSM watchdogs */
1970  uint32_t phywatchdog; /* Count Phy watchdogs (triggered by ucode) */
1971 
1972  /* MBSS counters, AP only */
1973  uint32_t prq_entries_handled; /* PRQ entries read in */
1974  uint32_t prq_undirected_entries; /* which were bcast bss & ssid */
1975  uint32_t prq_bad_entries; /* which could not be translated to info */
1976  uint32_t atim_suppress_count; /* TX suppressions on ATIM fifo */
1977  uint32_t bcn_template_not_ready; /* Template marked in use on send bcn ... */
1978  uint32_t bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */
1979  uint32_t late_tbtt_dpc; /* TBTT DPC did not happen in time */
1980 
1981  /* per-rate receive stat counters */
1982  uint32_t rx1mbps; /* packets rx at 1Mbps */
1983  uint32_t rx2mbps; /* packets rx at 2Mbps */
1984  uint32_t rx5mbps5; /* packets rx at 5.5Mbps */
1985  uint32_t rx6mbps; /* packets rx at 6Mbps */
1986  uint32_t rx9mbps; /* packets rx at 9Mbps */
1987  uint32_t rx11mbps; /* packets rx at 11Mbps */
1988  uint32_t rx12mbps; /* packets rx at 12Mbps */
1989  uint32_t rx18mbps; /* packets rx at 18Mbps */
1990  uint32_t rx24mbps; /* packets rx at 24Mbps */
1991  uint32_t rx36mbps; /* packets rx at 36Mbps */
1992  uint32_t rx48mbps; /* packets rx at 48Mbps */
1993  uint32_t rx54mbps; /* packets rx at 54Mbps */
1994  uint32_t rx108mbps; /* packets rx at 108mbps */
1995  uint32_t rx162mbps; /* packets rx at 162mbps */
1996  uint32_t rx216mbps; /* packets rx at 216 mbps */
1997  uint32_t rx270mbps; /* packets rx at 270 mbps */
1998  uint32_t rx324mbps; /* packets rx at 324 mbps */
1999  uint32_t rx378mbps; /* packets rx at 378 mbps */
2000  uint32_t rx432mbps; /* packets rx at 432 mbps */
2001  uint32_t rx486mbps; /* packets rx at 486 mbps */
2002  uint32_t rx540mbps; /* packets rx at 540 mbps */
2003 
2004  /* pkteng rx frame stats */
2005  uint32_t pktengrxducast; /* unicast frames rxed by the pkteng code */
2006  uint32_t pktengrxdmcast; /* multicast frames rxed by the pkteng code */
2007 
2008  uint32_t rfdisable; /* count of radio disables */
2009  uint32_t bphy_rxcrsglitch; /* PHY count of bphy glitches */
2010 
2011  uint32_t txmpdu_sgi; /* count for sgi transmit */
2012  uint32_t rxmpdu_sgi; /* count for sgi received */
2013  uint32_t txmpdu_stbc; /* count for stbc transmit */
2014  uint32_t rxmpdu_stbc; /* count for stbc received */
2016 
2017 typedef struct
2018 {
2019  uint16_t version; /* see definition of WL_CNT_T_VERSION */
2020  uint16_t length; /* length of entire structure */
2021 
2022  /* transmit stat counters */
2023  uint32_t txframe; /* tx data frames */
2024  uint32_t txbyte; /* tx data bytes */
2025  uint32_t txretrans; /* tx mac retransmits */
2026  uint32_t txerror; /* tx data errors (derived: sum of others) */
2027  uint32_t txctl; /* tx management frames */
2028  uint32_t txprshort; /* tx short preamble frames */
2029  uint32_t txserr; /* tx status errors */
2030  uint32_t txnobuf; /* tx out of buffers errors */
2031  uint32_t txnoassoc; /* tx discard because we're not associated */
2032  uint32_t txrunt; /* tx runt frames */
2033  uint32_t txchit; /* tx header cache hit (fastpath) */
2034  uint32_t txcmiss; /* tx header cache miss (slowpath) */
2035 
2036  /* transmit chip error counters */
2037  uint32_t txuflo; /* tx fifo underflows */
2038  uint32_t txphyerr; /* tx phy errors (indicated in tx status) */
2039  uint32_t txphycrs; /* PR8861/8963 counter */
2040 
2041  /* receive stat counters */
2042  uint32_t rxframe; /* rx data frames */
2043  uint32_t rxbyte; /* rx data bytes */
2044  uint32_t rxerror; /* rx data errors (derived: sum of others) */
2045  uint32_t rxctl; /* rx management frames */
2046  uint32_t rxnobuf; /* rx out of buffers errors */
2047  uint32_t rxnondata; /* rx non data frames in the data channel errors */
2048  uint32_t rxbadds; /* rx bad DS errors */
2049  uint32_t rxbadcm; /* rx bad control or management frames */
2050  uint32_t rxfragerr; /* rx fragmentation errors */
2051  uint32_t rxrunt; /* rx runt frames */
2052  uint32_t rxgiant; /* rx giant frames */
2053  uint32_t rxnoscb; /* rx no scb error */
2054  uint32_t rxbadproto; /* rx invalid frames */
2055  uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */
2056  uint32_t rxbadda; /* rx frames tossed for invalid da */
2057  uint32_t rxfilter; /* rx frames filtered out */
2058 
2059  /* receive chip error counters */
2060  uint32_t rxoflo; /* rx fifo overflow errors */
2061  uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */
2062 
2063  uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */
2064  uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */
2065  uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */
2066 
2067  /* misc counters */
2068  uint32_t dmade; /* tx/rx dma descriptor errors */
2069  uint32_t dmada; /* tx/rx dma data errors */
2070  uint32_t dmape; /* tx/rx dma descriptor protocol errors */
2071  uint32_t reset; /* reset count */
2072  uint32_t tbtt; /* cnts the TBTT int's */
2073  uint32_t txdmawar; /* # occurrences of PR15420 workaround */
2074  uint32_t pkt_callback_reg_fail; /* callbacks register failure */
2075 
2076  /* MAC counters: 32-bit version of d11.h's macstat_t */
2077  uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
2078  * Control Management (includes retransmissions)
2079  */
2080  uint32_t txrtsfrm; /* number of RTS sent out by the MAC */
2081  uint32_t txctsfrm; /* number of CTS sent out by the MAC */
2082  uint32_t txackfrm; /* number of ACK frames sent out */
2083  uint32_t txdnlfrm; /* Not used */
2084  uint32_t txbcnfrm; /* beacons transmitted */
2085  uint32_t txfunfl[8]; /* per-fifo tx underflows */
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 txglitch_nack; /* obsolete */
2149  uint32_t txburst; /* obsolete */
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 
2224  uint32_t txexptime; /* Tx frames suppressed due to timer expiration */
2225 
2226  uint32_t txmpdu_sgi; /* count for sgi transmit */
2227  uint32_t rxmpdu_sgi; /* count for sgi received */
2228  uint32_t txmpdu_stbc; /* count for stbc transmit */
2229  uint32_t rxmpdu_stbc; /* count for stbc received */
2230 
2231  uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */
2232 
2233  /* WPA2 counters (see rxundec for DecryptFailureCount) */
2234  uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */
2235  uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */
2236  uint32_t tkipreplay_mcst; /* TKIPReplays */
2237  uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */
2238  uint32_t ccmpreplay_mcst; /* CCMPReplays */
2239  uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */
2240  uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */
2241  uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */
2242  uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */
2243  uint32_t decsuccess_mcst; /* DecryptSuccessCount */
2244  uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */
2245  uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */
2246 
2247  uint32_t dma_hang; /* count for stbc received */
2249 
2250 typedef struct
2251 {
2252  uint16_t version; /* see definition of WL_CNT_T_VERSION */
2253  uint16_t length; /* length of entire structure */
2254 
2255  /* transmit stat counters */
2256  uint32_t txframe; /* tx data frames */
2257  uint32_t txbyte; /* tx data bytes */
2258  uint32_t txretrans; /* tx mac retransmits */
2259  uint32_t txerror; /* tx data errors (derived: sum of others) */
2260  uint32_t txctl; /* tx management frames */
2261  uint32_t txprshort; /* tx short preamble frames */
2262  uint32_t txserr; /* tx status errors */
2263  uint32_t txnobuf; /* tx out of buffers errors */
2264  uint32_t txnoassoc; /* tx discard because we're not associated */
2265  uint32_t txrunt; /* tx runt frames */
2266  uint32_t txchit; /* tx header cache hit (fastpath) */
2267  uint32_t txcmiss; /* tx header cache miss (slowpath) */
2268 
2269  /* transmit chip error counters */
2270  uint32_t txuflo; /* tx fifo underflows */
2271  uint32_t txphyerr; /* tx phy errors (indicated in tx status) */
2272  uint32_t txphycrs; /* PR8861/8963 counter */
2273 
2274  /* receive stat counters */
2275  uint32_t rxframe; /* rx data frames */
2276  uint32_t rxbyte; /* rx data bytes */
2277  uint32_t rxerror; /* rx data errors (derived: sum of others) */
2278  uint32_t rxctl; /* rx management frames */
2279  uint32_t rxnobuf; /* rx out of buffers errors */
2280  uint32_t rxnondata; /* rx non data frames in the data channel errors */
2281  uint32_t rxbadds; /* rx bad DS errors */
2282  uint32_t rxbadcm; /* rx bad control or management frames */
2283  uint32_t rxfragerr; /* rx fragmentation errors */
2284  uint32_t rxrunt; /* rx runt frames */
2285  uint32_t rxgiant; /* rx giant frames */
2286  uint32_t rxnoscb; /* rx no scb error */
2287  uint32_t rxbadproto; /* rx invalid frames */
2288  uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */
2289  uint32_t rxbadda; /* rx frames tossed for invalid da */
2290  uint32_t rxfilter; /* rx frames filtered out */
2291 
2292  /* receive chip error counters */
2293  uint32_t rxoflo; /* rx fifo overflow errors */
2294  uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */
2295 
2296  uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */
2297  uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */
2298  uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */
2299 
2300  /* misc counters */
2301  uint32_t dmade; /* tx/rx dma descriptor errors */
2302  uint32_t dmada; /* tx/rx dma data errors */
2303  uint32_t dmape; /* tx/rx dma descriptor protocol errors */
2304  uint32_t reset; /* reset count */
2305  uint32_t tbtt; /* cnts the TBTT int's */
2306  uint32_t txdmawar; /* # occurrences of PR15420 workaround */
2307  uint32_t pkt_callback_reg_fail; /* callbacks register failure */
2308 
2309  /* MAC counters: 32-bit version of d11.h's macstat_t */
2310  uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
2311  * Control Management (includes retransmissions)
2312  */
2313  uint32_t txrtsfrm; /* number of RTS sent out by the MAC */
2314  uint32_t txctsfrm; /* number of CTS sent out by the MAC */
2315  uint32_t txackfrm; /* number of ACK frames sent out */
2316  uint32_t txdnlfrm; /* Not used */
2317  uint32_t txbcnfrm; /* beacons transmitted */
2318  uint32_t txfunfl[6]; /* per-fifo tx underflows */
2319  uint32_t rxtoolate; /* receive too late */
2320  uint32_t txfbw; /* transmit at fallback bw (dynamic bw) */
2321  uint32_t txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS
2322  * or BCN)
2323  */
2324  uint32_t txphyerror; /* Transmit phy error, type of error is reported in tx-status for
2325  * driver enqueued frames
2326  */
2327  uint32_t rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */
2328  uint32_t rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */
2329  uint32_t rxinvmachdr; /* Either the protocol version != 0 or frame type not
2330  * data/control/management
2331  */
2332  uint32_t rxbadfcs; /* number of frames for which the CRC check failed in the MAC */
2333  uint32_t rxbadplcp; /* parity check of the PLCP header failed */
2334  uint32_t rxcrsglitch; /* PHY was able to correlate the preamble but not the header */
2335  uint32_t rxstrt; /* Number of received frames with a good PLCP
2336  * (i.e. passing parity check)
2337  */
2338  uint32_t rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */
2339  uint32_t rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */
2340  uint32_t rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */
2341  uint32_t rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */
2342  uint32_t rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */
2343  uint32_t rxackucast; /* number of ucast ACKS received (good FCS) */
2344  uint32_t rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */
2345  uint32_t rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */
2346  uint32_t rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */
2347  uint32_t rxrtsocast; /* number of received RTS not addressed to the MAC */
2348  uint32_t rxctsocast; /* number of received CTS not addressed to the MAC */
2349  uint32_t rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */
2350  uint32_t rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */
2351  uint32_t rxcfrmmcast; /* number of RX Control multicast frames received by the MAC
2352  * (unlikely to see these)
2353  */
2354  uint32_t rxbeaconmbss; /* beacons received from member of BSS */
2355  uint32_t rxdfrmucastobss; /* number of unicast frames addressed to the MAC from
2356  * other BSS (WDS FRAME)
2357  */
2358  uint32_t rxbeaconobss; /* beacons received from other BSS */
2359  uint32_t rxrsptmout; /* Number of response timeouts for transmitted frames
2360  * expecting a response
2361  */
2362  uint32_t bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */
2363  uint32_t rxf0ovfl; /* Number of receive fifo 0 overflows */
2364  uint32_t rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */
2365  uint32_t rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */
2366  uint32_t txsfovfl; /* Number of transmit status fifo overflows (obsolete) */
2367  uint32_t pmqovfl; /* Number of PMQ overflows */
2368  uint32_t rxcgprqfrm; /* Number of received Probe requests that made it into
2369  * the PRQ fifo
2370  */
2371  uint32_t rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */
2372  uint32_t txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did
2373  * not get ACK
2374  */
2375  uint32_t txcgprssuc; /* Tx Probe Response Success (ACK was received) */
2376  uint32_t prs_timeout; /* Number of probe requests that were dropped from the PRQ
2377  * fifo because a probe response could not be sent out within
2378  * the time limit defined in M_PRS_MAXTIME
2379  */
2380  uint32_t rxnack; /* obsolete */
2381  uint32_t frmscons; /* obsolete */
2382  uint32_t txnack; /* obsolete */
2383  uint32_t rxback; /* blockack rxcnt */
2384  uint32_t txback; /* blockack txcnt */
2385 
2386  /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
2387  uint32_t txfrag; /* dot11TransmittedFragmentCount */
2388  uint32_t txmulti; /* dot11MulticastTransmittedFrameCount */
2389  uint32_t txfail; /* dot11FailedCount */
2390  uint32_t txretry; /* dot11RetryCount */
2391  uint32_t txretrie; /* dot11MultipleRetryCount */
2392  uint32_t rxdup; /* dot11FrameduplicateCount */
2393  uint32_t txrts; /* dot11RTSSuccessCount */
2394  uint32_t txnocts; /* dot11RTSFailureCount */
2395  uint32_t txnoack; /* dot11ACKFailureCount */
2396  uint32_t rxfrag; /* dot11ReceivedFragmentCount */
2397  uint32_t rxmulti; /* dot11MulticastReceivedFrameCount */
2398  uint32_t rxcrc; /* dot11FCSErrorCount */
2399  uint32_t txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */
2400  uint32_t rxundec; /* dot11WEPUndecryptableCount */
2401 
2402  /* WPA2 counters (see rxundec for DecryptFailureCount) */
2403  uint32_t tkipmicfaill; /* TKIPLocalMICFailures */
2404  uint32_t tkipcntrmsr; /* TKIPCounterMeasuresInvoked */
2405  uint32_t tkipreplay; /* TKIPReplays */
2406  uint32_t ccmpfmterr; /* CCMPFormatErrors */
2407  uint32_t ccmpreplay; /* CCMPReplays */
2408  uint32_t ccmpundec; /* CCMPDecryptErrors */
2409  uint32_t fourwayfail; /* FourWayHandshakeFailures */
2410  uint32_t wepundec; /* dot11WEPUndecryptableCount */
2411  uint32_t wepicverr; /* dot11WEPICVErrorCount */
2412  uint32_t decsuccess; /* DecryptSuccessCount */
2413  uint32_t tkipicverr; /* TKIPICVErrorCount */
2414  uint32_t wepexcluded; /* dot11WEPExcludedCount */
2415 
2416  uint32_t txchanrej; /* Tx frames suppressed due to channel rejection */
2417  uint32_t psmwds; /* Count PSM watchdogs */
2418  uint32_t phywatchdog; /* Count Phy watchdogs (triggered by ucode) */
2419 
2420  /* MBSS counters, AP only */
2421  uint32_t prq_entries_handled; /* PRQ entries read in */
2422  uint32_t prq_undirected_entries; /* which were bcast bss & ssid */
2423  uint32_t prq_bad_entries; /* which could not be translated to info */
2424  uint32_t atim_suppress_count; /* TX suppressions on ATIM fifo */
2425  uint32_t bcn_template_not_ready; /* Template marked in use on send bcn ... */
2426  uint32_t bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */
2427  uint32_t late_tbtt_dpc; /* TBTT DPC did not happen in time */
2428 
2429  /* per-rate receive stat counters */
2430  uint32_t rx1mbps; /* packets rx at 1Mbps */
2431  uint32_t rx2mbps; /* packets rx at 2Mbps */
2432  uint32_t rx5mbps5; /* packets rx at 5.5Mbps */
2433  uint32_t rx6mbps; /* packets rx at 6Mbps */
2434  uint32_t rx9mbps; /* packets rx at 9Mbps */
2435  uint32_t rx11mbps; /* packets rx at 11Mbps */
2436  uint32_t rx12mbps; /* packets rx at 12Mbps */
2437  uint32_t rx18mbps; /* packets rx at 18Mbps */
2438  uint32_t rx24mbps; /* packets rx at 24Mbps */
2439  uint32_t rx36mbps; /* packets rx at 36Mbps */
2440  uint32_t rx48mbps; /* packets rx at 48Mbps */
2441  uint32_t rx54mbps; /* packets rx at 54Mbps */
2442  uint32_t rx108mbps; /* packets rx at 108mbps */
2443  uint32_t rx162mbps; /* packets rx at 162mbps */
2444  uint32_t rx216mbps; /* packets rx at 216 mbps */
2445  uint32_t rx270mbps; /* packets rx at 270 mbps */
2446  uint32_t rx324mbps; /* packets rx at 324 mbps */
2447  uint32_t rx378mbps; /* packets rx at 378 mbps */
2448  uint32_t rx432mbps; /* packets rx at 432 mbps */
2449  uint32_t rx486mbps; /* packets rx at 486 mbps */
2450  uint32_t rx540mbps; /* packets rx at 540 mbps */
2451 
2452  /* pkteng rx frame stats */
2453  uint32_t pktengrxducast; /* unicast frames rxed by the pkteng code */
2454  uint32_t pktengrxdmcast; /* multicast frames rxed by the pkteng code */
2455 
2456  uint32_t rfdisable; /* count of radio disables */
2457  uint32_t bphy_rxcrsglitch; /* PHY count of bphy glitches */
2458  uint32_t bphy_badplcp;
2459 
2460  uint32_t txexptime; /* Tx frames suppressed due to timer expiration */
2461 
2462  uint32_t txmpdu_sgi; /* count for sgi transmit */
2463  uint32_t rxmpdu_sgi; /* count for sgi received */
2464  uint32_t txmpdu_stbc; /* count for stbc transmit */
2465  uint32_t rxmpdu_stbc; /* count for stbc received */
2466 
2467  uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */
2468 
2469  /* WPA2 counters (see rxundec for DecryptFailureCount) */
2470  uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */
2471  uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */
2472  uint32_t tkipreplay_mcst; /* TKIPReplays */
2473  uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */
2474  uint32_t ccmpreplay_mcst; /* CCMPReplays */
2475  uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */
2476  uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */
2477  uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */
2478  uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */
2479  uint32_t decsuccess_mcst; /* DecryptSuccessCount */
2480  uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */
2481  uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */
2482 
2483  uint32_t dma_hang; /* count for dma hang */
2484  uint32_t reinit; /* count for reinit */
2485 
2486  uint32_t pstatxucast; /* count of ucast frames xmitted on all psta assoc */
2487  uint32_t pstatxnoassoc; /* count of txnoassoc frames xmitted on all psta assoc */
2488  uint32_t pstarxucast; /* count of ucast frames received on all psta assoc */
2489  uint32_t pstarxbcmc; /* count of bcmc frames received on all psta */
2490  uint32_t pstatxbcmc; /* count of bcmc frames transmitted on all psta */
2491 
2492  uint32_t cso_passthrough; /* hw cso required but passthrough */
2493  uint32_t cso_normal; /* hw cso hdr for normal process */
2494  uint32_t chained; /* number of frames chained */
2495  uint32_t chainedsz1; /* number of chain size 1 frames */
2496  uint32_t unchained; /* number of frames not chained */
2497  uint32_t maxchainsz; /* max chain size so far */
2498  uint32_t currchainsz; /* current chain size */
2499 
2500  uint32_t rxdrop20s; /* drop secondary cnt */
2501 
2503 
2504 /* per-rate receive stat counters subset of full counters */
2505 typedef struct
2506 {
2507  uint32_t rx1mbps; /* packets rx at 1Mbps */
2508  uint32_t rx2mbps; /* packets rx at 2Mbps */
2509  uint32_t rx5mbps5; /* packets rx at 5.5Mbps */
2510  uint32_t rx6mbps; /* packets rx at 6Mbps */
2511  uint32_t rx9mbps; /* packets rx at 9Mbps */
2512  uint32_t rx11mbps; /* packets rx at 11Mbps */
2513  uint32_t rx12mbps; /* packets rx at 12Mbps */
2514  uint32_t rx18mbps; /* packets rx at 18Mbps */
2515  uint32_t rx24mbps; /* packets rx at 24Mbps */
2516  uint32_t rx36mbps; /* packets rx at 36Mbps */
2517  uint32_t rx48mbps; /* packets rx at 48Mbps */
2518  uint32_t rx54mbps; /* packets rx at 54Mbps */
2519  uint32_t rx108mbps; /* packets rx at 108mbps */
2520  uint32_t rx162mbps; /* packets rx at 162mbps */
2521  uint32_t rx216mbps; /* packets rx at 216 mbps */
2522  uint32_t rx270mbps; /* packets rx at 270 mbps */
2524 
2525 typedef struct
2526 {
2527  uint32_t count;
2528  uint8_t log[WL_PHYRATE_LOG_SIZE];
2530 
2531 typedef struct
2532 {
2533  uint16_t version; /* see definition of WL_CNT_T_VERSION */
2534  uint16_t length; /* length of entire structure */
2535 
2536  /* transmit stat counters */
2537  uint32_t txframe; /* tx data frames */
2538  uint32_t txbyte; /* tx data bytes */
2539  uint32_t txretrans; /* tx mac retransmits */
2540  uint32_t txerror; /* tx data errors (derived: sum of others) */
2541  uint32_t txctl; /* tx management frames */
2542  uint32_t txprshort; /* tx short preamble frames */
2543  uint32_t txserr; /* tx status errors */
2544  uint32_t txnobuf; /* tx out of buffers errors */
2545  uint32_t txnoassoc; /* tx discard because we're not associated */
2546  uint32_t txrunt; /* tx runt frames */
2547  uint32_t txchit; /* tx header cache hit (fastpath) */
2548  uint32_t txcmiss; /* tx header cache miss (slowpath) */
2549 
2550  /* transmit chip error counters */
2551  uint32_t txuflo; /* tx fifo underflows */
2552  uint32_t txphyerr; /* tx phy errors (indicated in tx status) */
2553  uint32_t txphycrs; /* PR8861/8963 counter */
2554 
2555  /* receive stat counters */
2556  uint32_t rxframe; /* rx data frames */
2557  uint32_t rxbyte; /* rx data bytes */
2558  uint32_t rxerror; /* rx data errors (derived: sum of others) */
2559  uint32_t rxctl; /* rx management frames */
2560  uint32_t rxnobuf; /* rx out of buffers errors */
2561  uint32_t rxnondata; /* rx non data frames in the data channel errors */
2562  uint32_t rxbadds; /* rx bad DS errors */
2563  uint32_t rxbadcm; /* rx bad control or management frames */
2564  uint32_t rxfragerr; /* rx fragmentation errors */
2565  uint32_t rxrunt; /* rx runt frames */
2566  uint32_t rxgiant; /* rx giant frames */
2567  uint32_t rxnoscb; /* rx no scb error */
2568  uint32_t rxbadproto; /* rx invalid frames */
2569  uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */
2570  uint32_t rxbadda; /* rx frames tossed for invalid da */
2571  uint32_t rxfilter; /* rx frames filtered out */
2572 
2573  /* receive chip error counters */
2574  uint32_t rxoflo; /* rx fifo overflow errors */
2575  uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */
2576 
2577  uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */
2578  uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */
2579  uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */
2580 
2581  /* misc counters */
2582  uint32_t dmade; /* tx/rx dma descriptor errors */
2583  uint32_t dmada; /* tx/rx dma data errors */
2584  uint32_t dmape; /* tx/rx dma descriptor protocol errors */
2585  uint32_t reset; /* reset count */
2586  uint32_t tbtt; /* cnts the TBTT int's */
2587  uint32_t txdmawar; /* # occurrences of PR15420 workaround */
2588  uint32_t pkt_callback_reg_fail; /* callbacks register failure */
2589 
2590  /* MAC counters: 32-bit version of d11.h's macstat_t */
2591  uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
2592  * Control Management (includes retransmissions)
2593  */
2594  uint32_t txrtsfrm; /* number of RTS sent out by the MAC */
2595  uint32_t txctsfrm; /* number of CTS sent out by the MAC */
2596  uint32_t txackfrm; /* number of ACK frames sent out */
2597  uint32_t txdnlfrm; /* Not used */
2598  uint32_t txbcnfrm; /* beacons transmitted */
2599  uint32_t txfunfl[6]; /* per-fifo tx underflows */
2600  uint32_t rxtoolate; /* receive too late */
2601  uint32_t txfbw; /* transmit at fallback bw (dynamic bw) */
2602  uint32_t txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS
2603  * or BCN)
2604  */
2605  uint32_t txphyerror; /* Transmit phy error, type of error is reported in tx-status for
2606  * driver enqueued frames
2607  */
2608  uint32_t rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */
2609  uint32_t rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */
2610  uint32_t rxinvmachdr; /* Either the protocol version != 0 or frame type not
2611  * data/control/management
2612  */
2613  uint32_t rxbadfcs; /* number of frames for which the CRC check failed in the MAC */
2614  uint32_t rxbadplcp; /* parity check of the PLCP header failed */
2615  uint32_t rxcrsglitch; /* PHY was able to correlate the preamble but not the header */
2616  uint32_t rxstrt; /* Number of received frames with a good PLCP
2617  * (i.e. passing parity check)
2618  */
2619  uint32_t rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */
2620  uint32_t rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */
2621  uint32_t rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */
2622  uint32_t rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */
2623  uint32_t rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */
2624  uint32_t rxackucast; /* number of ucast ACKS received (good FCS) */
2625  uint32_t rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */
2626  uint32_t rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */
2627  uint32_t rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */
2628  uint32_t rxrtsocast; /* number of received RTS not addressed to the MAC */
2629  uint32_t rxctsocast; /* number of received CTS not addressed to the MAC */
2630  uint32_t rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */
2631  uint32_t rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */
2632  uint32_t rxcfrmmcast; /* number of RX Control multicast frames received by the MAC
2633  * (unlikely to see these)
2634  */
2635  uint32_t rxbeaconmbss; /* beacons received from member of BSS */
2636  uint32_t rxdfrmucastobss; /* number of unicast frames addressed to the MAC from
2637  * other BSS (WDS FRAME)
2638  */
2639  uint32_t rxbeaconobss; /* beacons received from other BSS */
2640  uint32_t rxrsptmout; /* Number of response timeouts for transmitted frames
2641  * expecting a response
2642  */
2643  uint32_t bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */
2644  uint32_t rxf0ovfl; /* Number of receive fifo 0 overflows */
2645  uint32_t rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */
2646  uint32_t rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */
2647  uint32_t txsfovfl; /* Number of transmit status fifo overflows (obsolete) */
2648  uint32_t pmqovfl; /* Number of PMQ overflows */
2649  uint32_t rxcgprqfrm; /* Number of received Probe requests that made it into
2650  * the PRQ fifo
2651  */
2652  uint32_t rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */
2653  uint32_t txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did
2654  * not get ACK
2655  */
2656  uint32_t txcgprssuc; /* Tx Probe Response Success (ACK was received) */
2657  uint32_t prs_timeout; /* Number of probe requests that were dropped from the PRQ
2658  * fifo because a probe response could not be sent out within
2659  * the time limit defined in M_PRS_MAXTIME
2660  */
2661  uint32_t rxnack; /* obsolete */
2662  uint32_t frmscons; /* obsolete */
2663  uint32_t txnack; /* obsolete */
2664  uint32_t rxback; /* blockack rxcnt */
2665  uint32_t txback; /* blockack txcnt */
2666 
2667  /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
2668  uint32_t txfrag; /* dot11TransmittedFragmentCount */
2669  uint32_t txmulti; /* dot11MulticastTransmittedFrameCount */
2670  uint32_t txfail; /* dot11FailedCount */
2671  uint32_t txretry; /* dot11RetryCount */
2672  uint32_t txretrie; /* dot11MultipleRetryCount */
2673  uint32_t rxdup; /* dot11FrameduplicateCount */
2674  uint32_t txrts; /* dot11RTSSuccessCount */
2675  uint32_t txnocts; /* dot11RTSFailureCount */
2676  uint32_t txnoack; /* dot11ACKFailureCount */
2677  uint32_t rxfrag; /* dot11ReceivedFragmentCount */
2678  uint32_t rxmulti; /* dot11MulticastReceivedFrameCount */
2679  uint32_t rxcrc; /* dot11FCSErrorCount */
2680  uint32_t txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */
2681  uint32_t rxundec; /* dot11WEPUndecryptableCount */
2682 
2683  /* WPA2 counters (see rxundec for DecryptFailureCount) */
2684  uint32_t tkipmicfaill; /* TKIPLocalMICFailures */
2685  uint32_t tkipcntrmsr; /* TKIPCounterMeasuresInvoked */
2686  uint32_t tkipreplay; /* TKIPReplays */
2687  uint32_t ccmpfmterr; /* CCMPFormatErrors */
2688  uint32_t ccmpreplay; /* CCMPReplays */
2689  uint32_t ccmpundec; /* CCMPDecryptErrors */
2690  uint32_t fourwayfail; /* FourWayHandshakeFailures */
2691  uint32_t wepundec; /* dot11WEPUndecryptableCount */
2692  uint32_t wepicverr; /* dot11WEPICVErrorCount */
2693  uint32_t decsuccess; /* DecryptSuccessCount */
2694  uint32_t tkipicverr; /* TKIPICVErrorCount */
2695  uint32_t wepexcluded; /* dot11WEPExcludedCount */
2696 
2697  uint32_t txchanrej; /* Tx frames suppressed due to channel rejection */
2698  uint32_t psmwds; /* Count PSM watchdogs */
2699  uint32_t phywatchdog; /* Count Phy watchdogs (triggered by ucode) */
2700 
2701  /* MBSS counters, AP only */
2702  uint32_t prq_entries_handled; /* PRQ entries read in */
2703  uint32_t prq_undirected_entries; /* which were bcast bss & ssid */
2704  uint32_t prq_bad_entries; /* which could not be translated to info */
2705  uint32_t atim_suppress_count; /* TX suppressions on ATIM fifo */
2706  uint32_t bcn_template_not_ready; /* Template marked in use on send bcn ... */
2707  uint32_t bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */
2708  uint32_t late_tbtt_dpc; /* TBTT DPC did not happen in time */
2709 
2710  /* per-rate receive stat counters */
2711  uint32_t rx1mbps; /* packets rx at 1Mbps */
2712  uint32_t rx2mbps; /* packets rx at 2Mbps */
2713  uint32_t rx5mbps5; /* packets rx at 5.5Mbps */
2714  uint32_t rx6mbps; /* packets rx at 6Mbps */
2715  uint32_t rx9mbps; /* packets rx at 9Mbps */
2716  uint32_t rx11mbps; /* packets rx at 11Mbps */
2717  uint32_t rx12mbps; /* packets rx at 12Mbps */
2718  uint32_t rx18mbps; /* packets rx at 18Mbps */
2719  uint32_t rx24mbps; /* packets rx at 24Mbps */
2720  uint32_t rx36mbps; /* packets rx at 36Mbps */
2721  uint32_t rx48mbps; /* packets rx at 48Mbps */
2722  uint32_t rx54mbps; /* packets rx at 54Mbps */
2723  uint32_t rx108mbps; /* packets rx at 108mbps */
2724  uint32_t rx162mbps; /* packets rx at 162mbps */
2725  uint32_t rx216mbps; /* packets rx at 216 mbps */
2726  uint32_t rx270mbps; /* packets rx at 270 mbps */
2727  uint32_t rx324mbps; /* packets rx at 324 mbps */
2728  uint32_t rx378mbps; /* packets rx at 378 mbps */
2729  uint32_t rx432mbps; /* packets rx at 432 mbps */
2730  uint32_t rx486mbps; /* packets rx at 486 mbps */
2731  uint32_t rx540mbps; /* packets rx at 540 mbps */
2732 
2733  /* pkteng rx frame stats */
2734  uint32_t pktengrxducast; /* unicast frames rxed by the pkteng code */
2735  uint32_t pktengrxdmcast; /* multicast frames rxed by the pkteng code */
2736 
2737  uint32_t rfdisable; /* count of radio disables */
2738  uint32_t bphy_rxcrsglitch; /* PHY count of bphy glitches */
2739  uint32_t bphy_badplcp;
2740 
2741  uint32_t txexptime; /* Tx frames suppressed due to timer expiration */
2742 
2743  uint32_t txmpdu_sgi; /* count for sgi transmit */
2744  uint32_t rxmpdu_sgi; /* count for sgi received */
2745  uint32_t txmpdu_stbc; /* count for stbc transmit */
2746  uint32_t rxmpdu_stbc; /* count for stbc received */
2747 
2748  uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */
2749 
2750  /* WPA2 counters (see rxundec for DecryptFailureCount) */
2751  uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */
2752  uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */
2753  uint32_t tkipreplay_mcst; /* TKIPReplays */
2754  uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */
2755  uint32_t ccmpreplay_mcst; /* CCMPReplays */
2756  uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */
2757  uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */
2758  uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */
2759  uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */
2760  uint32_t decsuccess_mcst; /* DecryptSuccessCount */
2761  uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */
2762  uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */
2763 
2764  uint32_t dma_hang; /* count for dma hang */
2765  uint32_t reinit; /* count for reinit */
2766 
2767  uint32_t pstatxucast; /* count of ucast frames xmitted on all psta assoc */
2768  uint32_t pstatxnoassoc; /* count of txnoassoc frames xmitted on all psta assoc */
2769  uint32_t pstarxucast; /* count of ucast frames received on all psta assoc */
2770  uint32_t pstarxbcmc; /* count of bcmc frames received on all psta */
2771  uint32_t pstatxbcmc; /* count of bcmc frames transmitted on all psta */
2772 
2773  uint32_t cso_passthrough; /* hw cso required but passthrough */
2774  uint32_t cso_normal; /* hw cso hdr for normal process */
2775  uint32_t chained; /* number of frames chained */
2776  uint32_t chainedsz1; /* number of chain size 1 frames */
2777  uint32_t unchained; /* number of frames not chained */
2778  uint32_t maxchainsz; /* max chain size so far */
2779  uint32_t currchainsz; /* current chain size */
2780  uint32_t rxdrop20s; /* drop secondary cnt */
2781  uint32_t pciereset; /* Secondary Bus Reset issued by driver */
2782  uint32_t cfgrestore; /* configspace restore by driver */
2783  uint32_t reinitreason[8]; /* reinitreason counters; 0: Unknown reason */
2784  uint32_t rxrtry; /* num of received packets with retry bit on */
2786 
2787 typedef struct
2788 {
2789  uint16_t version;
2790  uint16_t length;
2791  uint32_t rxampdu_sgi;
2792  uint32_t rxampdu_stbc;
2793  uint32_t rxmpdu_sgi;
2794  uint32_t rxmpdu_stbc;
2795  uint32_t rxmcs0_40M;
2796  uint32_t rxmcs1_40M;
2797  uint32_t rxmcs2_40M;
2798  uint32_t rxmcs3_40M;
2799  uint32_t rxmcs4_40M;
2800  uint32_t rxmcs5_40M;
2801  uint32_t rxmcs6_40M;
2802  uint32_t rxmcs7_40M;
2803  uint32_t rxmcs32_40M;
2804  uint32_t txfrmsnt_20Mlo;
2805  uint32_t txfrmsnt_20Mup;
2806  uint32_t txfrmsnt_40M;
2807  uint32_t rx_20ul;
2808 } wl_cnt_ext_t;
2809 #define WL_RXDIV_STATS_T_VERSION 1
2810 typedef struct
2811 {
2812  uint16_t version;
2813  uint16_t length;
2814  uint32_t rxant[4];
2816 #define WL_DELTA_STATS_T_VERSION 1
2817 typedef struct
2818 {
2819  uint16_t version;
2820  uint16_t length;
2821  uint32_t txframe;
2822  uint32_t txbyte;
2823  uint32_t txretrans;
2824  uint32_t txfail;
2825  uint32_t rxframe;
2826  uint32_t rxbyte;
2827  uint32_t rx1mbps;
2828  uint32_t rx2mbps;
2829  uint32_t rx5mbps5;
2830  uint32_t rx6mbps;
2831  uint32_t rx9mbps;
2832  uint32_t rx11mbps;
2833  uint32_t rx12mbps;
2834  uint32_t rx18mbps;
2835  uint32_t rx24mbps;
2836  uint32_t rx36mbps;
2837  uint32_t rx48mbps;
2838  uint32_t rx54mbps;
2839  uint32_t rx108mbps;
2840  uint32_t rx162mbps;
2841  uint32_t rx216mbps;
2842  uint32_t rx270mbps;
2843  uint32_t rx324mbps;
2844  uint32_t rx378mbps;
2845  uint32_t rx432mbps;
2846  uint32_t rx486mbps;
2847  uint32_t rx540mbps;
2849 #define WL_WME_CNT_VERSION 1
2850 typedef struct
2851 {
2852  uint32_t packets;
2853  uint32_t bytes;
2855 #define AC_COUNT 4
2856 typedef struct
2857 {
2858  uint16_t version;
2859  uint16_t length;
2860  wl_traffic_stats_t tx[AC_COUNT];
2861  wl_traffic_stats_t tx_failed[AC_COUNT];
2862  wl_traffic_stats_t rx[AC_COUNT];
2863  wl_traffic_stats_t rx_failed[AC_COUNT];
2864  wl_traffic_stats_t forward[AC_COUNT];
2865  wl_traffic_stats_t tx_expired[AC_COUNT];
2866 } wl_wme_cnt_t;
2867 
2868 #define WL_MKEEP_ALIVE_VERSION 1
2869 #define WL_MKEEP_ALIVE_FIXED_LEN offsetof(wl_mkeep_alive_pkt_t, data)
2870 #define WL_MKEEP_ALIVE_PRECISION 500
2871 
2872 #define WLC_BA_CNT_VERSION 1
2873 typedef struct wlc_ba_cnt
2874 {
2875  uint16_t version;
2876  uint16_t length;
2877  uint32_t txpdu;
2878  uint32_t txsdu;
2879  uint32_t txfc;
2880  uint32_t txfci;
2881  uint32_t txretrans;
2882  uint32_t txbatimer;
2883  uint32_t txdrop;
2884  uint32_t txaddbareq;
2885  uint32_t txaddbaresp;
2886  uint32_t txdelba;
2887  uint32_t txba;
2888  uint32_t txbar;
2889  uint32_t txpad[4];
2890  uint32_t rxpdu;
2891  uint32_t rxqed;
2892  uint32_t rxdup;
2893  uint32_t rxnobuf;
2894  uint32_t rxaddbareq;
2895  uint32_t rxaddbaresp;
2896  uint32_t rxdelba;
2897  uint32_t rxba;
2898  uint32_t rxbar;
2899  uint32_t rxinvba;
2900  uint32_t rxbaholes;
2901  uint32_t rxunexp;
2902  uint32_t rxpad[4];
2903 } wlc_ba_cnt_t;
2905 {
2906  uint8_t tid;
2907  uint8_t enable;
2908 };
2910 {
2911  uint32_t low;
2912  uint32_t high;
2913 };
2915 {
2916  wl_ether_addr_t ea;
2917  uint8_t tid;
2918 };
2920 {
2921  uint8_t tid;
2922  uint8_t retry;
2923 };
2925 {
2926  uint8_t ba_tx_wsize;
2927  uint8_t ba_rx_wsize;
2928 };
2929 #define DPT_DISCOVERY_MANUAL 0x01
2930 #define DPT_DISCOVERY_AUTO 0x02
2931 #define DPT_DISCOVERY_SCAN 0x04
2932 #define DPT_PATHSEL_AUTO 0
2933 #define DPT_PATHSEL_DIRECT 1
2934 #define DPT_PATHSEL_APPATH 2
2935 #define DPT_DENY_LIST_ADD 1
2936 #define DPT_DENY_LIST_REMOVE 2
2937 #define DPT_MANUAL_EP_CREATE 1
2938 #define DPT_MANUAL_EP_MODIFY 2
2939 #define DPT_MANUAL_EP_DELETE 3
2940 typedef struct dpt_iovar
2941 {
2942  wl_ether_addr_t ea;
2943  uint8_t mode;
2944  uint32_t pad;
2945 } dpt_iovar_t;
2946 #define DPT_STATUS_ACTIVE 0x01
2947 #define DPT_STATUS_AES 0x02
2948 #define DPT_STATUS_FAILED 0x04
2949 #define DPT_FNAME_LEN 48
2950 typedef struct dpt_status
2951 {
2952  uint8_t status;
2953  uint8_t fnlen;
2954  uint8_t name[DPT_FNAME_LEN];
2955  uint32_t rssi;
2956  sta_info_t sta;
2957 } dpt_status_t;
2958 typedef struct dpt_list
2959 {
2960  uint32_t num;
2961  dpt_status_t status[1];
2962 } dpt_list_t;
2963 typedef struct dpt_fname
2964 {
2965  uint8_t len;
2966  uint8_t name[DPT_FNAME_LEN];
2967 } dpt_fname_t;
2968 #define BDD_FNAME_LEN 32
2969 typedef struct bdd_fname
2970 {
2971  uint8_t len;
2972  uint8_t name[BDD_FNAME_LEN];
2973 } bdd_fname_t;
2974 struct ts_list
2975 {
2976  int32_t count;
2977  struct tsinfo_arg tsinfo[1];
2978 };
2979 typedef struct tspec_arg
2980 {
2981  uint16_t version;
2982  uint16_t length;
2983  uint32_t flag;
2984  struct tsinfo_arg tsinfo;
2985  uint16_t nom_msdu_size;
2986  uint16_t max_msdu_size;
2987  uint32_t min_srv_interval;
2988  uint32_t max_srv_interval;
2989  uint32_t inactivity_interval;
2990  uint32_t suspension_interval;
2991  uint32_t srv_start_time;
2992  uint32_t min_data_rate;
2993  uint32_t mean_data_rate;
2994  uint32_t peak_data_rate;
2995  uint32_t max_burst_size;
2996  uint32_t delay_bound;
2997  uint32_t min_phy_rate;
2998  uint16_t surplus_bw;
2999  uint16_t medium_time;
3000  uint8_t dialog_token;
3001 } tspec_arg_t;
3002 typedef struct tspec_per_sta_arg
3003 {
3004  wl_ether_addr_t ea;
3005  struct tspec_arg ts;
3007 typedef struct wme_max_bandwidth
3008 {
3009  uint32_t ac[AC_COUNT];
3011 #define WL_WME_MBW_PARAMS_IO_BYTES (sizeof(wme_max_bandwidth_t) )
3012 #define TSPEC_ARG_VERSION 2
3013 #define TSPEC_ARG_LENGTH 55
3014 #define TSPEC_DEFAULT_DIALOG_TOKEN 42
3015 #define TSPEC_DEFAULT_SBW_FACTOR 0x3000
3016 #define TSPEC_PENDING 0
3017 #define TSPEC_ACCEPTED 1
3018 #define TSPEC_REJECTED 2
3019 #define TSPEC_UNKNOWN 3
3020 #define TSPEC_STATUS_MASK 7
3021 #define WL_WLAN_ASSOC_REASON_NORMAL_NETWORK 0
3022 #define WL_WLAN_ASSOC_REASON_ROAM_FROM_CELLULAR_NETWORK 1
3023 #define WL_WLAN_ASSOC_REASON_ROAM_FROM_LAN 2
3024 #define WL_WLAN_ASSOC_REASON_MAX 2
3025 #define WL_SWFL_ABBFL 0x0001
3026 #define WL_SWFL_ABENCORE 0x0002
3027 #define WL_SWFL_NOHWRADIO 0x0004
3028 #define WL_LIFETIME_MAX 0xFFFF
3029 typedef struct wl_lifetime
3030 {
3031  uint32_t ac;
3032  uint32_t lifetime;
3033 } wl_lifetime_t;
3034 typedef struct wl_chan_switch
3035 {
3036  uint8_t mode;
3037  uint8_t count;
3038  wl_chanspec_t chspec;
3039  uint8_t reg;
3041 #define WLC_ROAM_TRIGGER_DEFAULT 0
3042 #define WLC_ROAM_TRIGGER_BANDWIDTH 1
3043 #define WLC_ROAM_TRIGGER_DISTANCE 2
3044 #define WLC_ROAM_TRIGGER_MAX_VALUE 2
3045 enum
3046 {
3047  PFN_LIST_ORDER, PFN_RSSI
3048 };
3049 #define SORT_CRITERIA_BIT 0
3050 #define AUTO_NET_SWITCH_BIT 1
3051 #define ENABLE_BKGRD_SCAN_BIT 2
3052 #define IMMEDIATE_SCAN_BIT 3
3053 #define AUTO_CONNECT_BIT 4
3054 #define IMMEDIATE_EVENT_BIT 8
3055 #define SUPPRESS_SSID_BIT 9
3056 #define ENABLE_NET_OFFLOAD_BIT 10
3057 #define SORT_CRITERIA_MASK 0x01
3058 #define AUTO_NET_SWITCH_MASK 0x02
3059 #define ENABLE_BKGRD_SCAN_MASK 0x04
3060 #define IMMEDIATE_SCAN_MASK 0x08
3061 #define AUTO_CONNECT_MASK 0x10
3062 #define PFN_VERSION 2
3063 
3064 /* PFN network info structure */
3065 typedef struct wl_pfn_subnet_info
3066 {
3067  struct ether_addr BSSID;
3068  uint8_t channel; /* channel number only */
3069  uint8_t SSID_len;
3070  uint8_t SSID[32];
3072 
3073 typedef struct wl_pfn_net_info
3074 {
3075  wl_pfn_subnet_info_t pfnsubnet;
3076  int16_t RSSI; /* receive signal strength (in dBm) */
3077  uint16_t timestamp; /* age in seconds */
3079 
3080 /* used to report exactly one scan result */
3081 /* plus reports detailed scan info in bss_info */
3082 typedef struct wl_pfn_scanresult
3083 {
3084  uint32_t version;
3085  uint32_t status;
3086  uint32_t count;
3087  wl_pfn_net_info_t netinfo;
3088  wl_bss_info_t bss_info;
3090 
3091 /* PFN data structure */
3092 typedef struct wl_pfn_param
3093 {
3094  int32_t version; /* PNO parameters version */
3095  int32_t scan_freq; /* Scan frequency */
3096  int32_t lost_network_timeout; /* Timeout in sec. to declare
3097  * discovered network as lost
3098  */
3099  int16_t flags; /* Bit field to control features
3100  * of PFN such as sort criteria auto
3101  * enable switch and background scan
3102  */
3103  int16_t rssi_margin; /* Margin to avoid jitter for choosing a
3104  * PFN based on RSSI sort criteria
3105  */
3106  uint8_t bestn; /* number of best networks in each scan */
3107  uint8_t mscan; /* number of scans recorded */
3108  uint8_t repeat; /* Minimum number of scan intervals
3109  * before scan frequency changes in adaptive scan
3110  */
3111  uint8_t exp; /* Exponent of 2 for maximum scan interval */
3112 
3113  int32_t slow_freq; /* slow scan period */
3114 } wl_pfn_param_t;
3115 
3116 typedef struct wl_pfn_bssid
3117 {
3118  struct ether_addr macaddr;
3119  /* Bit4: suppress_lost, Bit3: suppress_found */
3120  uint16_t flags;
3121 } wl_pfn_bssid_t;
3122 
3123 typedef struct wl_pfn_cfg
3124 {
3125  uint32_t reporttype;
3126  int32_t channel_num;
3127  uint16_t channel_list[WL_NUMCHANNELS];
3128  uint32_t flags;
3129 } wl_pfn_cfg_t;
3130 
3131 /* for use with wl_pfn.flags */
3132 #define WL_PFN_HIDDEN_MASK 0x4
3133 #define WL_PFN_SUPPRESSLOST_MASK 0x10
3134 
3135 typedef struct wl_pfn
3136 {
3137  wlc_ssid_t ssid; /* ssid name and its length */
3138  int32_t flags; /* bit2: hidden */
3139  int32_t infra; /* BSS Vs IBSS */
3140  int32_t auth; /* Open Vs Closed */
3141  int32_t wpa_auth; /* WPA type */
3142  int32_t wsec; /* wsec value */
3143 } wl_pfn_t;
3144 
3145 #define TOE_TX_CSUM_OL 0x00000001
3146 #define TOE_RX_CSUM_OL 0x00000002
3147 #define TOE_ERRTEST_TX_CSUM 0x00000001
3148 #define TOE_ERRTEST_RX_CSUM 0x00000002
3149 #define TOE_ERRTEST_RX_CSUM2 0x00000004
3151 {
3152  uint32_t tx_summed;
3153  uint32_t tx_iph_fill;
3154  uint32_t tx_tcp_fill;
3155  uint32_t tx_udp_fill;
3156  uint32_t tx_icmp_fill;
3157  uint32_t rx_iph_good;
3158  uint32_t rx_iph_bad;
3159  uint32_t rx_tcp_good;
3160  uint32_t rx_tcp_bad;
3161  uint32_t rx_udp_good;
3162  uint32_t rx_udp_bad;
3163  uint32_t rx_icmp_good;
3164  uint32_t rx_icmp_bad;
3165  uint32_t tx_tcp_errinj;
3166  uint32_t tx_udp_errinj;
3167  uint32_t tx_icmp_errinj;
3168  uint32_t rx_tcp_errinj;
3169  uint32_t rx_udp_errinj;
3170  uint32_t rx_icmp_errinj;
3171 };
3172 #define ARP_OL_AGENT 0x00000001
3173 #define ARP_OL_SNOOP 0x00000002
3174 #define ARP_OL_HOST_AUTO_REPLY 0x00000004
3175 #define ARP_OL_PEER_AUTO_REPLY 0x00000008
3176 #define ARP_ERRTEST_REPLY_PEER 0x1
3177 #define ARP_ERRTEST_REPLY_HOST 0x2
3178 #define ARP_MULTIHOMING_MAX 8
3179 typedef struct arp_ol_stats
3180 {
3181  uint32_t host_ip_entries;
3182  uint32_t host_ip_overflow;
3183  uint32_t arp_table_entries;
3184  uint32_t arp_table_overflow;
3185  uint32_t host_request;
3186  uint32_t host_reply;
3187  uint32_t host_service;
3188  uint32_t peer_request;
3189  uint32_t peer_request_drop;
3190  uint32_t peer_reply;
3191  uint32_t peer_reply_drop;
3192  uint32_t peer_service;
3194 typedef struct wl_keep_alive_pkt
3195 {
3196  uint32_t period_msec;
3197  uint16_t len_bytes;
3198  uint8_t data[1];
3200 #define WL_KEEP_ALIVE_FIXED_LEN offsetof(wl_keep_alive_pkt_t, data)
3201 typedef enum wl_pkt_filter_type
3202 {
3203  WL_PKT_FILTER_TYPE_PATTERN_MATCH
3204 } wl_pkt_filter_type_t;
3205 #define WL_PKT_FILTER_TYPE wl_pkt_filter_type_t
3207 {
3208  uint32_t offset;
3209  uint32_t size_bytes;
3210  uint8_t mask_and_pattern[1];
3212 typedef struct wl_pkt_filter
3213 {
3214  uint32_t id;
3215  uint32_t type;
3216  uint32_t negate_match;
3217  union
3218  {
3219  wl_pkt_filter_pattern_t pattern;
3220  } u;
3221 } wl_pkt_filter_t;
3222 #define WL_PKT_FILTER_FIXED_LEN offsetof(wl_pkt_filter_t, u)
3223 #define WL_PKT_FILTER_PATTERN_FIXED_LEN offsetof(wl_pkt_filter_pattern_t, mask_and_pattern)
3224 typedef struct wl_pkt_filter_enable
3225 {
3226  uint32_t id;
3227  uint32_t enable;
3229 typedef struct wl_pkt_filter_list
3230 {
3231  uint32_t num;
3232  wl_pkt_filter_t filter[1];
3234 #define WL_PKT_FILTER_LIST_FIXED_LEN offsetof(wl_pkt_filter_list_t, filter)
3235 typedef struct wl_pkt_filter_stats
3236 {
3237  uint32_t num_pkts_matched;
3238  uint32_t num_pkts_forwarded;
3239  uint32_t num_pkts_discarded;
3241 typedef struct wl_seq_cmd_ioctl
3242 {
3243  uint32_t cmd;
3244  uint32_t len;
3246 #define WL_SEQ_CMD_ALIGN_BYTES 4
3247 #define WL_SEQ_CMDS_GET_IOCTL_FILTER(cmd) \
3248  ( ( (cmd) == WLC_GET_MAGIC ) || \
3249  ( (cmd) == WLC_GET_VERSION ) || \
3250  ( (cmd) == WLC_GET_AP ) || \
3251  ( (cmd) == WLC_GET_INSTANCE ) )
3252 #define WL_PKTENG_PER_TX_START 0x01
3253 #define WL_PKTENG_PER_TX_STOP 0x02
3254 #define WL_PKTENG_PER_RX_START 0x04
3255 #define WL_PKTENG_PER_RX_WITH_ACK_START 0x05
3256 #define WL_PKTENG_PER_TX_WITH_ACK_START 0x06
3257 #define WL_PKTENG_PER_RX_STOP 0x08
3258 #define WL_PKTENG_PER_MASK 0xff
3259 #define WL_PKTENG_SYNCHRONOUS 0x100
3260 typedef struct wl_pkteng
3261 {
3262  uint32_t flags;
3263  uint32_t delay;
3264  uint32_t nframes;
3265  uint32_t length;
3266  uint8_t seqno;
3267  wl_ether_addr_t dest;
3268  wl_ether_addr_t src;
3269 } wl_pkteng_t;
3270 #define NUM_80211b_RATES 4
3271 #define NUM_80211ag_RATES 8
3272 #define NUM_80211n_RATES 32
3273 #define NUM_80211_RATES (NUM_80211b_RATES + NUM_80211ag_RATES + NUM_80211n_RATES)
3274 typedef struct wl_pkteng_stats
3275 {
3276  uint32_t lostfrmcnt;
3277  int32_t rssi;
3278  int32_t snr;
3279  uint16_t rxpktcnt[NUM_80211_RATES + 1];
3282 {
3283  uint8_t psat_pwr;
3284  uint8_t psat_indx;
3285  uint8_t final_idx;
3286  uint8_t start_idx;
3287  int32_t min_phase;
3288  int32_t voltage;
3289  int8_t temperature;
3292 {
3293  int16_t papdcompRe[64];
3294  int16_t papdcompIm[64];
3297 {
3298  uint16_t tbl_length;
3299  int16_t spbreal[256];
3300  int16_t spbimg[256];
3303 {
3304  uint32_t cur_idx;
3305  uint32_t tx_drift;
3306  uint8_t prev_cal_idx;
3307  uint32_t percal_ctr;
3308  int32_t nxt_cal_idx;
3309  uint32_t force_1idxcal;
3310  uint32_t onedxacl_req;
3311  int32_t last_cal_volt;
3312  int8_t last_cal_temp;
3313  uint32_t vbat_ripple;
3314  uint32_t exit_route;
3315  int32_t volt_winner;
3317 #define WL_WOWL_MAGIC (1 << 0)
3318 #define WL_WOWL_NET (1 << 1)
3319 #define WL_WOWL_DIS (1 << 2)
3320 #define WL_WOWL_RETR (1 << 3)
3321 #define WL_WOWL_BCN (1 << 4)
3322 #define WL_WOWL_TST (1 << 5)
3323 #define WL_WOWL_TRAFFIC (1 << 12)
3324 #define WL_WOWL_BCAST (1 << 15)
3325 #define WL_WOWL_GTK (0x441f)
3326 #define WL_WOWL_DEAUTH (0x1F)
3327 #define WL_WOWL_ALL (0x541E)
3328 
3329 #define MAGIC_PKT_MINLEN 102
3330 typedef struct
3331 {
3332  uint32_t masksize;
3333  uint32_t offset;
3334  uint32_t patternoffset;
3335  uint32_t patternsize;
3337 typedef struct
3338 {
3339  uint32_t count;
3340  wl_wowl_pattern_t pattern[1];
3342 typedef struct
3343 {
3344  uint8_t pci_wakeind;
3345  uint16_t ucode_wakeind;
3347 typedef struct wl_txrate_class
3348 {
3349  uint8_t init_rate;
3350  uint8_t min_rate;
3351  uint8_t max_rate;
3353 #define WL_DELAYMODE_DEFER 0
3354 #define WL_DELAYMODE_FORCE 1
3355 #define WL_DELAYMODE_AUTO 2
3356 #define WLC_OBSS_SCAN_PASSIVE_DWELL_DEFAULT 100
3357 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MIN 5
3358 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MAX 1000
3359 #define WLC_OBSS_SCAN_ACTIVE_DWELL_DEFAULT 20
3360 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MIN 10
3361 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MAX 1000
3362 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_DEFAULT 300
3363 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MIN 10
3364 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MAX 900
3365 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_DEFAULT 5
3366 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MIN 5
3367 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MAX 100
3368 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_DEFAULT 200
3369 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MIN 200
3370 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MAX 10000
3371 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_DEFAULT 20
3372 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MIN 20
3373 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MAX 10000
3374 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_DEFAULT 25
3375 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MIN 0
3376 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MAX 100
3377 typedef struct wl_obss_scan_arg
3378 {
3379  int16_t passive_dwell;
3380  int16_t active_dwell;
3381  int16_t bss_widthscan_interval;
3382  int16_t passive_total;
3383  int16_t active_total;
3384  int16_t chanwidth_transition_delay;
3385  int16_t activity_threshold;
3387 #define WL_OBSS_SCAN_PARAM_LEN sizeof(wl_obss_scan_arg_t)
3388 #define WL_MIN_NUM_OBSS_SCAN_ARG 7
3389 #define WL_COEX_INFO_MASK 0x07
3390 #define WL_COEX_INFO_REQ 0x01
3391 #define WL_COEX_40MHZ_INTOLERANT 0x02
3392 #define WL_COEX_WIDTH20 0x04
3394 {
3395  uint8_t info;
3396  uint8_t num;
3397  uint8_t ch_list[1];
3399 #define MAX_RSSI_LEVELS 8
3400 typedef struct wl_rssi_event
3401 {
3402  uint32_t rate_limit_msec;
3403  uint8_t num_rssi_levels;
3404  int8_t rssi_levels[MAX_RSSI_LEVELS];
3405 } wl_rssi_event_t;
3406 #define WLFEATURE_DISABLE_11N 0x00000001
3407 #define WLFEATURE_DISABLE_11N_STBC_TX 0x00000002
3408 #define WLFEATURE_DISABLE_11N_STBC_RX 0x00000004
3409 #define WLFEATURE_DISABLE_11N_SGI_TX 0x00000008
3410 #define WLFEATURE_DISABLE_11N_SGI_RX 0x00000010
3411 #define WLFEATURE_DISABLE_11N_AMPDU_TX 0x00000020
3412 #define WLFEATURE_DISABLE_11N_AMPDU_RX 0x00000040
3413 #define WLFEATURE_DISABLE_11N_GF 0x00000080
3414 
3415 #pragma pack(1)
3416 
3418 {
3419  wl_ether_addr_t staAddr;
3420  uint16_t ieLen;
3422 
3424 {
3426  uint8_t ieData[1];
3428 
3430 {
3431  uint32_t totLen;
3432  uint8_t ieDataList[1];
3434 
3435 /* EDCF related items from 802.11.h */
3436 
3437 /* ACI from 802.11.h */
3438 #define EDCF_AIFSN_MIN 1 /* AIFSN minimum value */
3439 #define EDCF_AIFSN_MAX 15 /* AIFSN maximum value */
3440 #define EDCF_AIFSN_MASK 0x0f /* AIFSN mask */
3441 #define EDCF_ACM_MASK 0x10 /* ACM mask */
3442 #define EDCF_ACI_MASK 0x60 /* ACI mask */
3443 #define EDCF_ACI_SHIFT 5 /* ACI shift */
3444 #define EDCF_AIFSN_SHIFT 12 /* 4 MSB(0xFFF) in ifs_ctl for AC idx */
3445 
3446 /* ECW from 802.11.h */
3447 #define EDCF_ECW_MIN 0 /* cwmin/cwmax exponent minimum value */
3448 #define EDCF_ECW_MAX 15 /* cwmin/cwmax exponent maximum value */
3449 #define EDCF_ECW2CW(exp) ( (1 << (exp) ) - 1 )
3450 #define EDCF_ECWMIN_MASK 0x0f /* cwmin exponent form mask */
3451 #define EDCF_ECWMAX_MASK 0xf0 /* cwmax exponent form mask */
3452 #define EDCF_ECWMAX_SHIFT 4 /* cwmax exponent form shift */
3453 
3454 /* TXOP from 802.11.h */
3455 #define EDCF_TXOP_MIN 0 /* TXOP minimum value */
3456 #define EDCF_TXOP_MAX 65535 /* TXOP maximum value */
3457 #define EDCF_TXOP2USEC(txop) ( (txop) << 5 )
3458 
3459 #define EDCF_ACPARAM
3461 {
3462  uint8_t ACI;
3463  uint8_t ECW;
3464  uint16_t TXOP; /* stored in network order (ls octet first) */
3465 };
3466 typedef struct edcf_acparam edcf_acparam_t;
3467 
3468 /* Stop packing structures */
3469 #pragma pack()
3470 
3471 /* discovery state */
3472 typedef struct wl_p2p_disc_st
3473 {
3474  uint8_t state; /* see p2p_discovery_state_t */
3475  uint16_t chanspec; /* valid in listen state */
3476  uint16_t dwell_time_ms; /* valid in listen state, in ms */
3478 
3479 /* scan request */
3480 typedef struct wl_p2p_scan
3481 {
3482  uint8_t type; /* 'S' for WLC_SCAN, 'E' for "escan" */
3483  uint8_t reserved[3];
3484  /* scan or escan parms... */
3485 } wl_p2p_scan_t;
3486 
3487 /* escan request */
3488 typedef struct
3489 {
3490  uint8_t type; /* 'S' for WLC_SCAN, 'E' for "escan" */
3491  uint8_t reserved[3];
3492 
3493  /* escan params */
3494  wl_escan_params_t escan;
3495 } wl_p2p_escan_t;
3496 
3497 /* i/f request */
3498 typedef struct wl_p2p_if
3499 {
3500  struct ether_addr mac_address;
3501  uint8_t interface_type;
3502  uint16_t chan_spec;
3503 } wl_p2p_if_t;
3504 
3505 /* i/f query */
3506 typedef struct wl_p2p_ifq
3507 {
3508  uint32_t bsscfgidx;
3509  char ifname[16];
3510 } wl_p2p_ifq_t;
3511 
3512 /* OppPS & CTWindow */
3513 typedef struct wl_p2p_ops
3514 {
3515  uint8_t ops; /* 0: disable 1: enable */
3516  uint8_t ctw; /* >= 10 */
3517 } wl_p2p_ops_t;
3518 
3519 /* absence and presence request */
3520 typedef struct wl_p2p_sched_desc
3521 {
3522  uint32_t start;
3523  uint32_t interval;
3524  uint32_t duration;
3525  uint32_t count; /* see count */
3527 
3528 typedef struct wl_p2p_sched
3529 {
3530  uint8_t type; /* see schedule type */
3531  uint8_t action; /* see schedule action */
3532  uint8_t option; /* see schedule option */
3533  wl_p2p_sched_desc_t desc[1];
3534 } wl_p2p_sched_t;
3535 
3536 /* schedule type */
3537 #define WL_P2P_SCHED_TYPE_ABS 0 /* Scheduled Absence */
3538 #define WL_P2P_SCHED_TYPE_REQ_ABS 1 /* Requested Absence */
3539 #define WL_P2P_SCHED_TYPE_REQ_PSC 2 /* Requested Presence */
3540 
3541 /* schedule action during absence periods (for WL_P2P_SCHED_ABS type) */
3542 #define WL_P2P_SCHED_ACTION_NONE 0 /* no action */
3543 #define WL_P2P_SCHED_ACTION_DOZE 1 /* doze */
3544 #define WL_P2P_SCHED_ACTION_RESET 255 /* reset */
3545 
3546 /* schedule option - WL_P2P_SCHED_TYPE_ABS */
3547 #define WL_P2P_SCHED_OPTION_NORMAL 0 /* normal start/interval/duration/count in time */
3548 #define WL_P2P_SCHED_OPTION_BCNPCT 1 /* percentage of beacon interval */
3549 
3550 typedef struct wl_p2p_wfds_hash
3551 {
3552  uint32_t advt_id;
3553  uint16_t nw_cfg_method;
3554  uint8_t wfds_hash[6];
3555  uint8_t name_len;
3556  uint8_t service_name[MAX_WFDS_SVC_NAME_LEN];
3558 
3559 #define P2P_IP_ALLOC_LEN 12
3560 /* Definitions for Reliable Multicast */
3561 /* NOTE: RMC structures should not be packed */
3562 
3563 #define WL_RMC_CNT_VERSION (1)
3564 #define WL_RMC_TR_VERSION (1)
3565 #define WL_RMC_MAX_CLIENT (32)
3566 #define WL_RMC_FLAG_INBLACKLIST (1)
3567 #define WL_RMC_FLAG_ACTIVEACKER (2)
3568 #define WL_RMC_FLAG_RELMCAST (4)
3569 #define WL_RMC_FLAG_MASTER_TX (8)
3570 #define WL_RMC_MAX_TABLE_ENTRY (8)
3571 
3572 #define WL_RMC_VER (1)
3573 #define WL_RMC_INDEX_ACK_ALL (255)
3574 #define WL_RMC_NUM_OF_MC_STREAMS (4)
3575 #define WL_RMC_MAX_TRS_PER_GROUP (1)
3576 #define WL_RMC_MAX_TRS_IN_ACKALL (1)
3577 #define WL_RMC_ACK_MCAST0 (0x02)
3578 #define WL_RMC_ACK_MCAST_ALL (0x01)
3579 #define WL_RMC_ACTF_TIME_MIN (300) /* time in ms */
3580 #define WL_RMC_ACTF_TIME_MAX (20000) /* time in ms */
3581 #define WL_RMC_MAX_NUM_TRS (32) /* maximun transmitters allowed */
3582 #define WL_RMC_ARTMO_MIN (350) /* time in ms */
3583 #define WL_RMC_ARTMO_MAX (40000) /* time in ms */
3584 
3585 enum rmc_opcodes
3586 {
3587  RELMCAST_ENTRY_OP_DISABLE = 0, /* Disable multi-cast group */
3588  RELMCAST_ENTRY_OP_DELETE = 1, /* Delete multi-cast group */
3589  RELMCAST_ENTRY_OP_ENABLE = 2, /* Enable multi-cast group */
3590  RELMCAST_ENTRY_OP_ACK_ALL = 3 /* Enable ACK ALL bit in AMT */
3591 };
3592 
3593 /* RMC operational modes */
3594 enum rmc_modes
3595 {
3596  WL_RMC_MODE_RECEIVER = 0, /* Receiver mode by default */
3597  WL_RMC_MODE_TRANSMITTER = 1, /* Transmitter mode using wl ackreq */
3598  WL_RMC_MODE_INITIATOR = 2 /* Initiator mode using wl ackreq */
3599 };
3600 
3601 /* Each RMC mcast client info */
3602 typedef struct wl_relmcast_client
3603 {
3604  uint8_t flag; /* status of client such as AR, R, or blacklisted */
3605  int16_t rssi; /* rssi value of RMC client */
3606  struct ether_addr addr; /* mac address of RMC client */
3608 
3609 /* RMC Counters */
3610 typedef struct wl_rmc_cnts
3611 {
3612  uint16_t version; /* see definition of WL_CNT_T_VERSION */
3613  uint16_t length; /* length of entire structure */
3614  uint16_t dupcnt; /* counter for duplicate rmc MPDU */
3615  uint16_t ackreq_err; /* counter for wl ackreq error */
3616  uint16_t af_tx_err; /* error count for action frame transmit */
3617  uint16_t null_tx_err; /* error count for rmc null frame transmit */
3618  uint16_t af_unicast_tx_err; /* error count for rmc unicast frame transmit */
3619  uint16_t mc_no_amt_slot; /* No mcast AMT entry available */
3620  /* Unused. Keep for rom compatibility */
3621  uint16_t mc_no_glb_slot; /* No mcast entry available in global table */
3622  uint16_t mc_not_mirrored; /* mcast group is not mirrored */
3623  uint16_t mc_existing_tr; /* mcast group is already taken by transmitter */
3624  uint16_t mc_exist_in_amt; /* mcast group is already programmed in amt */
3625  /* Unused. Keep for rom compatibility */
3626  uint16_t mc_not_exist_in_gbl; /* mcast group is not in global table */
3627  uint16_t mc_not_exist_in_amt; /* mcast group is not in AMT table */
3628  uint16_t mc_utilized; /* mcast addressed is already taken */
3629  uint16_t mc_taken_other_tr; /* multi-cast addressed is already taken */
3630  uint32_t rmc_rx_frames_mac; /* no of mc frames received from mac */
3631  uint32_t rmc_tx_frames_mac; /* no of mc frames transmitted to mac */
3632  uint32_t mc_null_ar_cnt; /* no. of times NULL AR is received */
3633  uint32_t mc_ar_role_selected; /* no. of times took AR role */
3634  uint32_t mc_ar_role_deleted; /* no. of times AR role cancelled */
3635  uint32_t mc_noacktimer_expired; /* no. of times noack timer expired */
3636  uint16_t mc_no_wl_clk; /* no wl clk detected when trying to access amt */
3637  uint16_t mc_tr_cnt_exceeded; /* No of transmitters in the network exceeded */
3638 } wl_rmc_cnts_t;
3639 
3640 /* RMC Status */
3641 typedef struct wl_relmcast_st
3642 {
3643  uint8_t ver; /* version of RMC */
3644  uint8_t num; /* number of clients detected by transmitter */
3645  wl_relmcast_client_t clients[WL_RMC_MAX_CLIENT];
3646  uint16_t err; /* error status (used in infra) */
3647  uint16_t actf_time; /* action frame time period */
3649 
3650 /* Entry for each STA/node */
3651 typedef struct wl_rmc_entry
3652 {
3653  /* operation on multi-cast entry such add,
3654  * delete, ack-all
3655  */
3656  int8_t flag;
3657  struct ether_addr addr; /* multi-cast group mac address */
3658 } wl_rmc_entry_t;
3659 
3660 /* RMC table */
3661 typedef struct wl_rmc_entry_table
3662 {
3663  uint8_t index; /* index to a particular mac entry in table */
3664  uint8_t opcode; /* opcodes or operation on entry */
3665  wl_rmc_entry_t entry[WL_RMC_MAX_TABLE_ENTRY];
3667 
3668 typedef struct wl_rmc_trans_elem
3669 {
3670  struct ether_addr tr_mac; /* transmitter mac */
3671  struct ether_addr ar_mac; /* ar mac */
3672  uint16_t artmo; /* AR timeout */
3673  uint8_t amt_idx; /* amt table entry */
3674  uint16_t flag; /* entry will be acked, not acked, programmed, full etc */
3676 
3677 /* RMC transmitters */
3679 {
3680  uint8_t ver; /* version of RMC */
3681  uint8_t num_tr; /* number of transmitters in the network */
3682  wl_rmc_trans_elem_t trs[WL_RMC_MAX_NUM_TRS];
3684 
3685 /* To update vendor specific ie for RMC */
3686 typedef struct wl_rmc_vsie
3687 {
3688  uint8_t oui[3];
3689  uint16_t payload; /* IE Data Payload */
3690 } wl_rmc_vsie_t;
3691 
3692 /* WLC_E_ULP event data */
3693 #define WL_ULP_EVENT_VERSION 1
3694 #define WL_ULP_DISABLE_CONSOLE 1 /* Disable console message on ULP entry */
3695 #define WL_ULP_UCODE_DOWNLOAD 2 /* Download ULP ucode file */
3696 #define WL_ULP_ENTRY 3 /* inform ulp entry to Host during warmboot */
3697 
3698 typedef struct wl_ulp_event
3699 {
3700  uint16_t version;
3701  uint16_t ulp_dongle_action;
3702 } wl_ulp_event_t;
3703 
3704 /* clm download */
3705 #define DLOAD_HANDLER_VER 1 /* Downloader version */
3706 #define DLOAD_FLAG_VER_MASK 0xf000 /* Downloader version mask */
3707 #define DLOAD_FLAG_VER_SHIFT 12 /* Downloader version shift */
3708 
3709 #define DL_CRC_NOT_INUSE 0x0001
3710 #define DL_BEGIN 0x0002
3711 #define DL_END 0x0004
3712 
3713 enum
3714 {
3715  DL_TYPE_UCODE = 1, DL_TYPE_CLM = 2
3716 };
3717 
3719 {
3720  uint16_t flag;
3721  uint16_t dload_type;
3722  uint32_t len;
3723  uint32_t crc;
3724  uint8_t data[1];
3725 };
3726 typedef struct wl_dload_data wl_dload_data_t;
3727 
3729 {
3730  uint32_t ds_id;
3731  uint32_t clm_total_len;
3732  uint32_t num_chunks;
3733  uint32_t chunk_len;
3734  uint32_t chunk_offset;
3735  uint8_t data_chunk[1];
3736 };
3737 typedef struct wl_clm_dload_info wl_clm_dload_info_t;
3738 
3739 #pragma pack(1)
3740 typedef struct mesh_peer_info
3741 {
3742  uint16_t mesh_peer_prot_id;
3743  uint16_t local_link_id;
3744  uint16_t peer_link_id;
3745  uint16_t peer_aid;
3746  uint8_t state;
3748 
3749 typedef struct mesh_peer_info_ext
3750 {
3751  mesh_peer_info_t peer_info;
3752  uint16_t local_aid;
3753  struct ether_addr ea;
3754  uint32_t entry_state;
3755  int32_t rssi;
3757 
3758 typedef struct mesh_peer_info_dump
3759 {
3760  uint32_t buflen;
3761  uint32_t version;
3762  uint32_t count; /* number of results */
3763  mesh_peer_info_ext_t mpi_ext[1];
3765 
3766 #define WL_CHANSPEC_CTL_SB_LLL 0x0000
3767 #define WL_CHANSPEC_CTL_SB_LLU 0x0100
3768 #define WL_CHANSPEC_CTL_SB_LUL 0x0200
3769 #define WL_CHANSPEC_CTL_SB_LUU 0x0300
3770 #define WL_CHANSPEC_CTL_SB_ULL 0x0400
3771 #define WL_CHANSPEC_CTL_SB_ULU 0x0500
3772 #define WL_CHANSPEC_CTL_SB_UUL 0x0600
3773 #define WL_CHANSPEC_CTL_SB_UUU 0x0700
3774 #define WL_CHANSPEC_CTL_SB_LL WL_CHANSPEC_CTL_SB_LLL
3775 #define WL_CHANSPEC_CTL_SB_LU WL_CHANSPEC_CTL_SB_LLU
3776 #define WL_CHANSPEC_CTL_SB_UL WL_CHANSPEC_CTL_SB_LUL
3777 #define WL_CHANSPEC_CTL_SB_UU WL_CHANSPEC_CTL_SB_LUU
3778 #define WL_CHANSPEC_CTL_SB_L WL_CHANSPEC_CTL_SB_LLL
3779 #define WL_CHANSPEC_CTL_SB_U WL_CHANSPEC_CTL_SB_LLU
3780 #define INVCHANSPEC 255
3781 #define WL_CHANSPEC_CTL_SB_SHIFT 8
3782 #define WL_CHANSPEC_BW_5 0x0000
3783 #define WL_CHANSPEC_BW_80 0x2000
3784 #define WL_CHANSPEC_BW_160 0x2800
3785 #define WL_CHANSPEC_BW_8080 0x3000
3786 
3787 struct ether_addr;
3788 struct wl_join_scan_params;
3789 
3790 typedef struct wl_assoc_params
3791 {
3792  struct ether_addr bssid;
3793  uint16_t bssid_cnt;
3794  uint32_t chanspec_num;
3795  chanspec_t chanspec_list[1];
3797 #define WL_ASSOC_PARAMS_FIXED_SIZE (sizeof(wl_assoc_params_t) - sizeof(wl_chanspec_t) )
3799 #define WL_REASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
3801 #define WL_JOIN_ASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
3802 typedef struct wl_join_params
3803 {
3804  wlc_ssid_t ssid;
3805  struct wl_assoc_params params;
3807 #define WL_JOIN_PARAMS_FIXED_SIZE (sizeof(wl_join_params_t) - sizeof(wl_chanspec_t) )
3808 
3809 /* extended join params */
3810 typedef struct wl_extjoin_params
3811 {
3812  wlc_ssid_t ssid; /* {0, ""}: wildcard scan */
3813  struct wl_join_scan_params scan_params;
3814  wl_join_assoc_params_t assoc_params; /* optional field, but it must include the fixed portion
3815  * of the wl_join_assoc_params_t struct when it does
3816  * present.
3817  */
3819 #define WL_EXTJOIN_PARAMS_FIXED_SIZE (sizeof(wl_extjoin_params_t) - sizeof(chanspec_t) )
3820 
3821 #define WLC_SET_CUSTOM_COUNTRY ( (uint32_t)320 )
3822 
3823 /* WLC_GET_AUTH, WLC_SET_AUTH values */
3824 #define WL_AUTH_OPEN_SYSTEM 0 /* d11 open authentication */
3825 #define WL_AUTH_SHARED_KEY 1 /* d11 shared authentication */
3826 #define WL_AUTH_OPEN_SHARED 2 /* try open, then shared if open failed w/rc 13 */
3827 #define WL_AUTH_SAE 3 /* Simultaneous Authentication of Equals (SAE) */
3828 
3829 /** ARP offload statistics */
3831 {
3832  uint32_t version; /**< WLAN version */
3833  uint32_t peerage; /**< Current peer age-out time */
3834  uint32_t arpoe; /**< Agent enabled state */
3835  uint32_t features_enabled; /**< ARP Feature Flags @ref CY_ARP_OL_AGENT_ENABLE, etc. */
3836  arp_ol_stats_t stats; /**< Current stats */
3837  uint32_t host_ip_list[ARP_MULTIHOMING_MAX]; /**< host_ip addresses in one call */
3838 };
3839 
3840 #pragma pack()
3841 
3842 /* TCP Keepalive offload related defintions should not be added inside
3843  * pragma pack to avoid functionality breakage.
3844  */
3845 /*
3846  * TCP keepalive offload definitions
3847  */
3848 #define MAX_TKO_CONN 4
3849 #define IPV4_ADDR_LEN 4 /* IPV4 address length */
3850 
3851 /* Default TCP Keepalive retry parameters. */
3852 #define TCP_KEEPALIVE_OFFLOAD_INTERVAL_SEC (20)
3853 #define TCP_KEEPALIVE_OFFLOAD_RETRY_COUNT (3)
3854 #define TCP_KEEPALIVE_OFFLOAD_RETRY_INTERVAL_SEC (3)
3855 
3856 /* common iovar struct */
3857 typedef struct wl_tko
3858 {
3859  uint16_t subcmd_id; /* subcommand id */
3860  uint16_t len; /* total length of data[] */
3861  uint8_t data[1]; /* subcommand data */
3862 } wl_tko_t;
3863 
3864 /* subcommand ids */
3865 #define WL_TKO_SUBCMD_MAX_TCP 0 /* max TCP connections supported */
3866 #define WL_TKO_SUBCMD_PARAM 1 /* configure offload common parameters */
3867 #define WL_TKO_SUBCMD_CONNECT 2 /* TCP connection info */
3868 #define WL_TKO_SUBCMD_ENABLE 3 /* enable/disable */
3869 #define WL_TKO_SUBCMD_STATUS 4 /* TCP connection status */
3870 
3871 /* WL_TKO_SUBCMD_MAX_CONNECT subcommand data */
3872 typedef struct wl_tko_max_tcp
3873 {
3874  uint8_t max; /* max TCP connections supported */
3875  uint8_t pad[3]; /* 4-byte struct alignment */
3877 
3878 /* WL_TKO_SUBCMD_PARAM subcommand data */
3879 typedef struct wl_tko_param
3880 {
3881  uint16_t interval; /* keepalive tx interval (secs) */
3882  uint16_t retry_interval; /* keepalive retry interval (secs) */
3883  uint16_t retry_count; /* retry_count */
3884  uint8_t pad[2]; /* 4-byte struct alignment */
3885 } wl_tko_param_t;
3886 
3887 /* WL_TKO_SUBCMD_CONNECT subcommand data
3888  * invoke with unique 'index' for each TCP connection
3889  */
3890 typedef struct wl_tko_connect
3891 {
3892  uint8_t index; /* TCP connection index, 0 to max-1 */
3893  uint8_t ip_addr_type; /* 0 - IPv4, 1 - IPv6 */
3894  uint16_t local_port; /* local port */
3895  uint16_t remote_port; /* remote port */
3896  uint32_t local_seq; /* local sequence number */
3897  uint32_t remote_seq; /* remote sequence number */
3898  uint16_t request_len; /* TCP keepalive request packet length */
3899  uint16_t response_len; /* TCP keepalive response packet length */
3900  uint8_t data[1]; /* variable length field containing local/remote IPv4/IPv6,
3901  * TCP keepalive request packet, TCP keepalive response packet
3902  * For IPv4, length is 4 * 2 + request_length + response_length
3903  * offset 0 - local IPv4
3904  * offset 4 - remote IPv4
3905  * offset 8 - TCP keepalive request packet
3906  * offset 8+request_length - TCP keepalive response packet
3907  * For IPv6, length is 16 * 2 + request_length + response_length
3908  * offset 0 - local IPv6
3909  * offset 16 - remote IPv6
3910  * offset 32 - TCP keepalive request packet
3911  * offset 32+request_length - TCP keepalive response packet
3912  */
3914 
3915 /* WL_TKO_SUBCMD_CONNECT subcommand data to GET configured info for specific index */
3916 typedef struct wl_tko_get_connect
3917 {
3918  uint8_t index; /* TCP connection index, 0 to max-1 */
3919  uint8_t pad[3]; /* 4-byte struct alignment */
3921 
3922 typedef struct wl_tko_enable
3923 {
3924  uint8_t enable; /* 1 - enable, 0 - disable */
3925  uint8_t pad[3]; /* 4-byte struct alignment */
3926 } wl_tko_enable_t;
3927 
3928 /* WL_TKO_SUBCMD_STATUS subcommand data */
3929 /* must be invoked before tko is disabled else status is unavailable */
3930 typedef struct wl_tko_status
3931 {
3932  uint8_t count; /* number of status entries (i.e. equals
3933  * max TCP connections supported)
3934  */
3935  uint8_t status[1]; /* variable length field contain status for
3936  * each TCP connection index
3937  */
3938 } wl_tko_status_t;
3939 /** Get/Set TKO intervals & retrys */
3941 {
3942  uint16_t tko_interval; /**< How often to send (in seconds) */
3943  uint16_t tko_retry_count; /**< Max times to retry if original fails */
3944  uint16_t tko_retry_interval; /**< Wait time between retries (in seconds) */
3945 };
3946 
3947 /** Status values used in conjunction with whd_tko_status_t */
3948 typedef enum
3949 {
3950  TKO_STATUS_NORMAL = 0, /**< TCP connection normal, no error */
3951  TKO_STATUS_NO_RESPONSE = 1, /**< no response to TCP keepalive */
3952  TKO_STATUS_NO_TCP_ACK_FLAG = 2, /**< TCP ACK flag not set */
3953  TKO_STATUS_UNEXPECT_TCP_FLAG = 3, /**< unexpect TCP flags set other than ACK */
3954  TKO_STATUS_SEQ_NUM_INVALID = 4, /**< ACK != sequence number */
3955  TKO_STATUS_REMOTE_SEQ_NUM_INVALID = 5, /**< SEQ > remote sequence number */
3956  TKO_STATUS_TCP_DATA = 6, /**< TCP data available */
3957  TKO_STATUS_UNAVAILABLE = 255, /**< not used/configured */
3958 } tko_status_t;
3959 
3960 /** Status of each TCP connection */
3962 {
3963  uint8_t count; /**< number of status entries */
3964  uint8_t status[MAX_TKO_CONN]; /**< each TCP status */
3965 };
3966 
3967 /** Struct to query FW for current TKO configuation */
3969 {
3970  uint8_t index; /**< TCP connection index, 0 to max-1 */
3971  uint8_t ip_addr_type; /**< 0 - IPv4, 1 - IPv6 */
3972  uint16_t local_port; /**< local port */
3973  uint16_t remote_port; /**< remote port */
3974  uint32_t local_seq; /**< local sequence number */
3975  uint32_t remote_seq; /**< remote sequence number */
3976  uint16_t request_len; /**< TCP keepalive request packet length */
3977  uint16_t response_len; /**< TCP keepalive response packet length */
3978  uint8_t data[1]; /**< variable length field containing local/remote IPv4/IPv6,
3979  * TCP keepalive request packet, TCP keepalive response packet
3980  * For IPv4, length is 4 * 2 + request_length + response_length
3981  * offset 0 - local IPv4
3982  * offset 4 - remote IPv4
3983  * offset 8 - TCP keepalive request packet
3984  * offset 8+request_length - TCP keepalive response packet
3985  * For IPv6, length is 16 * 2 + request_length + response_length
3986  * offset 0 - local IPv6
3987  * offset 16 - remote IPv6
3988  * offset 32 - TCP keepalive request packet
3989  * offset 32+request_length - TCP keepalive response packet
3990  */
3991 };
3992 
3993 #ifdef __cplusplus
3994 } /* extern "C" */
3995 #endif
3996 
3997 #endif
3998 
uint32_t rxbar
Number of RX BAR.
Definition: whd_wlioctl.h:1737
uint32_t reset
reset count
Definition: whd_wlioctl.h:1617
uint32_t txnobuf
tx out of buffers errors
Definition: whd_wlioctl.h:1576
uint32_t rx432mbps
packets rx at 432 mbps
Definition: whd_wlioctl.h:1684
uint16_t local_port
local port
Definition: whd_wlioctl.h:3972
uint32_t txnocts
dot11RTSFailureCount
Definition: whd_wlioctl.h:1630
uint32_t d11cnt_txrts_off
d11cnt txrts value when reset d11cnt
Definition: whd_wlioctl.h:1609
uint32_t p2p_tbtt_miss
Number of P2P TBTT Events Miss.
Definition: whd_wlioctl.h:1772
uint32_t txctl
tx management frames
Definition: whd_wlioctl.h:1573
uint16_t tko_retry_interval
Wait time between retries (in seconds)
Definition: whd_wlioctl.h:3944
uint32_t reinit
count for reinit
Definition: whd_wlioctl.h:1714
uint32_t txpspoll
Number of TX PS-poll.
Definition: whd_wlioctl.h:1738
uint32_t tkipcntrmsr_mcst
TKIPCounterMeasuresInvoked.
Definition: whd_wlioctl.h:1701
Get/Set TKO intervals & retrys.
Definition: whd_wlioctl.h:3940
Definition: whd_wlioctl.h:3651
uint32_t bcn_template_not_ready
Template marked in use on send bcn ...
Definition: whd_wlioctl.h:1661
uint32_t rxcrc
dot11FCSErrorCount
Definition: whd_wlioctl.h:1634
uint32_t tkipreplay
TKIPReplays.
Definition: whd_wlioctl.h:1641
uint32_t psmwds
Count PSM watchdogs.
Definition: whd_wlioctl.h:1653
uint8_t ip_addr_type
0 - IPv4, 1 - IPv6
Definition: whd_wlioctl.h:3971
uint32_t txfrmsnt
dot11TransmittedFrameCount (bogus MIB?)
Definition: whd_wlioctl.h:1635
uint32_t rxbadds
rx bad DS errors
Definition: whd_wlioctl.h:1594
uint32_t rxauth
Number of RX AUTH.
Definition: whd_wlioctl.h:1755
uint32_t rxoflo
rx fifo overflow errors
Definition: whd_wlioctl.h:1606
uint32_t txprobereq
Number of TX probe request.
Definition: whd_wlioctl.h:1758
uint32_t txprobersp
Number of TX probe response.
Definition: whd_wlioctl.h:1760
uint16_t response_len
TCP keepalive response packet length.
Definition: whd_wlioctl.h:3977
uint32_t rxundec_mcst
dot11WEPUndecryptableCount
Definition: whd_wlioctl.h:1697
uint32_t ccmpundec_mcst
CCMPDecryptErrors.
Definition: whd_wlioctl.h:1705
uint32_t decsuccess
DecryptSuccessCount.
Definition: whd_wlioctl.h:1648
uint32_t rxmpdu_mu
Number of MU MPDUs received.
Definition: whd_wlioctl.h:1733
uint32_t prq_entries_handled
PRQ entries read in.
Definition: whd_wlioctl.h:1657
Struct to query FW for current TKO configuation.
Definition: whd_wlioctl.h:3968
uint32_t pstatxbcmc
count of bcmc frames transmitted on all psta
Definition: whd_wlioctl.h:1720
uint32_t txqosnull
Number of TX NULL_QoSDATA.
Definition: whd_wlioctl.h:1742
uint32_t txretrie
dot11MultipleRetryCount
Definition: whd_wlioctl.h:1627
uint8_t count
number of status entries
Definition: whd_wlioctl.h:3963
uint32_t wepexcluded_mcst
dot11WEPExcludedCount
Definition: whd_wlioctl.h:1711
uint32_t arpoe
Agent enabled state.
Definition: whd_wlioctl.h:3834
uint32_t wepundec
dot11WEPUndecryptableCount
Definition: whd_wlioctl.h:1646
uint32_t pkt_callback_reg_fail
callbacks register failure
Definition: whd_wlioctl.h:1620
uint32_t rxfilter
rx frames filtered out
Definition: whd_wlioctl.h:1603
uint32_t rx324mbps
packets rx at 324 mbps
Definition: whd_wlioctl.h:1682
uint32_t cfgrestore
configspace restore by driver
Definition: whd_wlioctl.h:1730
uint16_t tko_retry_count
Max times to retry if original fails.
Definition: whd_wlioctl.h:3943
uint32_t rx12mbps
packets rx at 12Mbps
Definition: whd_wlioctl.h:1672
uint16_t tko_interval
How often to send (in seconds)
Definition: whd_wlioctl.h:3942
uint32_t psmxwds
Number of PSMx watchdogs.
Definition: whd_wlioctl.h:1768
uint32_t decsuccess_mcst
DecryptSuccessCount.
Definition: whd_wlioctl.h:1709
The key size.
uint32_t txdatamcast
Number of TX multicast data packets.
Definition: whd_wlioctl.h:1766
uint32_t rxnondata
rx non data frames in the data channel errors
Definition: whd_wlioctl.h:1593
uint32_t rx36mbps
packets rx at 36Mbps
Definition: whd_wlioctl.h:1675
uint16_t remote_port
remote port
Definition: whd_wlioctl.h:3973
uint32_t chainedsz1
number of chain size 1 frames
Definition: whd_wlioctl.h:1725
uint32_t rx2mbps
packets rx at 2Mbps
Definition: whd_wlioctl.h:1667
uint32_t rx108mbps
packets rx at 108mbps
Definition: whd_wlioctl.h:1678
uint32_t rxrunt
rx runt frames
Definition: whd_wlioctl.h:1597
uint32_t dmape
tx/rx dma descriptor protocol errors
Definition: whd_wlioctl.h:1616
uint32_t cso_passthrough
hw cso required but passthrough
Definition: whd_wlioctl.h:1722
uint16_t wl_chanspec_t
Channel specified in uint16_t.
Definition: whd_types.h:720
uint32_t maxchainsz
max chain size so far
Definition: whd_wlioctl.h:1727
uint32_t rx162mbps
packets rx at 162mbps
Definition: whd_wlioctl.h:1679
uint32_t rxpspoll
Number of RX PS-poll.
Definition: whd_wlioctl.h:1739
uint32_t rx48mbps
packets rx at 48Mbps
Definition: whd_wlioctl.h:1676
uint32_t phywatchdog
Count Phy watchdogs (triggered by ucode)
Definition: whd_wlioctl.h:1654
uint32_t txmpdu_stbc
count for stbc transmit
Definition: whd_wlioctl.h:1694
uint32_t rxreassocreq
Number of RX REASSOC request.
Definition: whd_wlioctl.h:1747
uint32_t rxbadcm
rx bad control or management frames
Definition: whd_wlioctl.h:1595
uint32_t cso_normal
hw cso hdr for normal process
Definition: whd_wlioctl.h:1723
uint32_t dmada
tx/rx dma data errors
Definition: whd_wlioctl.h:1615
uint32_t txassocreq
Number of TX ASSOC request.
Definition: whd_wlioctl.h:1744
uint32_t rxmpdu_sgi
count for sgi received
Definition: whd_wlioctl.h:1693
uint32_t wepundec_mcst
dot11WEPUndecryptableCount
Definition: whd_wlioctl.h:1707
uint32_t rxdeauth
Number of RX DEAUTH.
Definition: whd_wlioctl.h:1757
uint32_t rxnoscb
rx no scb error
Definition: whd_wlioctl.h:1599
uint32_t rx24mbps
packets rx at 24Mbps
Definition: whd_wlioctl.h:1674
uint16_t datalen
length of data including all paddings.
Definition: whd_wlioctl.h:1558
uint32_t txrts
dot11RTSSuccessCount
Definition: whd_wlioctl.h:1629
uint32_t ccmpundec
CCMPDecryptErrors.
Definition: whd_wlioctl.h:1644
uint32_t txauth
Number of TX AUTH.
Definition: whd_wlioctl.h:1754
uint32_t wepicverr
dot11WEPICVErrorCount
Definition: whd_wlioctl.h:1647
uint32_t rxerror
rx data errors (derived: sum of others)
Definition: whd_wlioctl.h:1590
uint32_t rx270mbps
packets rx at 270 mbps
Definition: whd_wlioctl.h:1681
uint32_t rxnull
Number of RX NULL_DATA.
Definition: whd_wlioctl.h:1741
Definition: whd_wlioctl.h:3661
uint32_t rx540mbps
packets rx at 540 mbps
Definition: whd_wlioctl.h:1686
uint32_t txdisassoc
Number of TX DISASSOC.
Definition: whd_wlioctl.h:1748
uint32_t pstarxbcmc
count of bcmc frames received on all psta
Definition: whd_wlioctl.h:1719
Status of each TCP connection.
Definition: whd_wlioctl.h:3961
uint32_t rxassocreq
Number of RX ASSOC request.
Definition: whd_wlioctl.h:1745
uint32_t txframe
tx data frames
Definition: whd_wlioctl.h:1569
uint32_t ccmpfmterr_mcst
CCMPFormatErrors.
Definition: whd_wlioctl.h:1703
uint32_t rxreassocrsp
Number of RX REASSOC response.
Definition: whd_wlioctl.h:1753
uint32_t rx18mbps
packets rx at 18Mbps
Definition: whd_wlioctl.h:1673
uint32_t p2p_tbtt
Number of P2P TBTT Events.
Definition: whd_wlioctl.h:1771
uint32_t unchained
number of frames not chained
Definition: whd_wlioctl.h:1726
uint32_t wepicverr_mcst
dot11WEPICVErrorCount
Definition: whd_wlioctl.h:1708
uint32_t rxbadproto
rx invalid frames
Definition: whd_wlioctl.h:1600
uint32_t dmade
tx/rx dma descriptor errors
Definition: whd_wlioctl.h:1614
uint32_t txfail
dot11FailedCount
Definition: whd_wlioctl.h:1625
uint32_t tkipcntrmsr
TKIPCounterMeasuresInvoked.
Definition: whd_wlioctl.h:1640
uint32_t fourwayfail
FourWayHandshakeFailures.
Definition: whd_wlioctl.h:1645
uint32_t txaction
Number of TX action frame.
Definition: whd_wlioctl.h:1762
uint32_t rxprobereq
Number of RX probe request.
Definition: whd_wlioctl.h:1759
uint32_t prq_bad_entries
which could not be translated to info
Definition: whd_wlioctl.h:1659
uint32_t txbyte
tx data bytes
Definition: whd_wlioctl.h:1570
uint32_t features_enabled
ARP Feature Flags CY_ARP_OL_AGENT_ENABLE, etc.
Definition: whd_wlioctl.h:3835
uint32_t rxbyte
rx data bytes
Definition: whd_wlioctl.h:1589
uint32_t rxqosnull
Number of RX NULL_QoSDATA.
Definition: whd_wlioctl.h:1743
uint32_t version
WLAN version.
Definition: whd_wlioctl.h:3832
uint32_t txmpdu_sgi
count for sgi transmit
Definition: whd_wlioctl.h:1692
uint32_t txdmawar
occurrences of PR15420 workaround
Definition: whd_wlioctl.h:1619
uint32_t rxprobersp
Number of RX probe response.
Definition: whd_wlioctl.h:1761
uint32_t txfrag
dot11TransmittedFragmentCount
Definition: whd_wlioctl.h:1623
uint32_t ccmpreplay_mcst
CCMPReplays.
Definition: whd_wlioctl.h:1704
uint32_t ccmpfmterr
CCMPFormatErrors.
Definition: whd_wlioctl.h:1642
uint32_t txreassocrsp
Number of TX REASSOC response.
Definition: whd_wlioctl.h:1752
uint16_t version
see definition of WL_CNT_T_VERSION
Definition: whd_wlioctl.h:1557
uint32_t tbtt
cnts the TBTT int&#39;s
Definition: whd_wlioctl.h:1618
uint32_t tkipmicfaill_mcst
TKIPLocalMICFailures.
Definition: whd_wlioctl.h:1700
uint32_t txdeauth
Number of TX DEAUTH.
Definition: whd_wlioctl.h:1756
uint32_t peerage
Current peer age-out time.
Definition: whd_wlioctl.h:3833
uint32_t rxbadda
rx frames tossed for invalid da
Definition: whd_wlioctl.h:1602
uint32_t prq_undirected_entries
which were bcast bss & ssid
Definition: whd_wlioctl.h:1658
uint32_t late_tbtt_dpc
TBTT DPC did not happen in time.
Definition: whd_wlioctl.h:1663
uint32_t rx6mbps
packets rx at 6Mbps
Definition: whd_wlioctl.h:1669
uint32_t chained
number of frames chained
Definition: whd_wlioctl.h:1724
uint32_t pciereset
Secondary Bus Reset issued by driver.
Definition: whd_wlioctl.h:1729
uint32_t txretrans
tx mac retransmits
Definition: whd_wlioctl.h:1571
uint32_t txbar
Number of TX BAR.
Definition: whd_wlioctl.h:1736
uint32_t txphyerr
tx phy errors (indicated in tx status)
Definition: whd_wlioctl.h:1584
uint32_t txnoack
dot11ACKFailureCount
Definition: whd_wlioctl.h:1631
uint32_t d11cnt_rxcrc_off
d11cnt rxcrc value when reset d11cnt
Definition: whd_wlioctl.h:1610
arp_ol_stats_t stats
Current stats.
Definition: whd_wlioctl.h:3836
uint32_t wepexcluded
dot11WEPExcludedCount
Definition: whd_wlioctl.h:1650
uint32_t rxfrag
dot11ReceivedFragmentCount
Definition: whd_wlioctl.h:1632
uint32_t txretry
dot11RetryCount
Definition: whd_wlioctl.h:1626
uint32_t rxundec
dot11WEPUndecryptableCount
Definition: whd_wlioctl.h:1636
uint32_t txreassocreq
Number of TX REASSOC request.
Definition: whd_wlioctl.h:1746
uint32_t tkipmicfaill
TKIPLocalMICFailures.
Definition: whd_wlioctl.h:1639
ARP offload statistics.
Definition: whd_wlioctl.h:3830
uint32_t rx54mbps
packets rx at 54Mbps
Definition: whd_wlioctl.h:1677
uint32_t dma_hang
count for dma hang
Definition: whd_wlioctl.h:1713
uint32_t rxmulti
dot11MulticastReceivedFrameCount
Definition: whd_wlioctl.h:1633
uint32_t currchainsz
current chain size
Definition: whd_wlioctl.h:1728
uint32_t rxassocrsp
Number of RX ASSOC response.
Definition: whd_wlioctl.h:1751
uint32_t txerror
tx data errors (derived: sum of others)
Definition: whd_wlioctl.h:1572
uint32_t rx5mbps5
packets rx at 5.5Mbps
Definition: whd_wlioctl.h:1668
uint32_t rx11mbps
packets rx at 11Mbps
Definition: whd_wlioctl.h:1671
uint32_t rxgiant
rx giant frames
Definition: whd_wlioctl.h:1598
BSS(Basic Service Set) information structure.
Definition: whd_types.h:728
uint32_t rx216mbps
packets rx at 216 mbps
Definition: whd_wlioctl.h:1680
uint32_t tkipicverr
TKIPICVErrorCount.
Definition: whd_wlioctl.h:1649
uint32_t rxdup
dot11FrameduplicateCount
Definition: whd_wlioctl.h:1628
uint32_t pstatxnoassoc
count of txnoassoc frames xmitted on all psta assoc
Definition: whd_wlioctl.h:1717
uint32_t txlost
Number of lost packets reported in txs.
Definition: whd_wlioctl.h:1765
uint32_t local_seq
local sequence number
Definition: whd_wlioctl.h:3974
uint32_t rxctl
rx management frames
Definition: whd_wlioctl.h:1591
uint32_t rxnobuf
rx out of buffers errors
Definition: whd_wlioctl.h:1592
uint32_t txmulti
dot11MulticastTransmittedFrameCount
Definition: whd_wlioctl.h:1624
uint32_t rx378mbps
packets rx at 378 mbps
Definition: whd_wlioctl.h:1683
uint16_t request_len
TCP keepalive request packet length.
Definition: whd_wlioctl.h:3976
uint32_t remote_seq
remote sequence number
Definition: whd_wlioctl.h:3975
uint32_t pstatxucast
count of ucast frames xmitted on all psta assoc
Definition: whd_wlioctl.h:1716
uint8_t index
TCP connection index, 0 to max-1.
Definition: whd_wlioctl.h:3970
uint32_t txserr
tx status errors
Definition: whd_wlioctl.h:1575
uint32_t tkipreplay_mcst
TKIPReplays.
Definition: whd_wlioctl.h:1702
uint32_t fourwayfail_mcst
FourWayHandshakeFailures.
Definition: whd_wlioctl.h:1706
uint32_t txexptime
Tx frames suppressed due to timer expiration.
Definition: whd_wlioctl.h:1690
wlc layer counters
Definition: whd_wlioctl.h:1566
uint32_t ampdu_wds
Number of AMPDU watchdogs.
Definition: whd_wlioctl.h:1764
uint32_t txnull
Number of TX NULL_DATA.
Definition: whd_wlioctl.h:1740
uint32_t rxfragerr
rx fragmentation errors
Definition: whd_wlioctl.h:1596
uint32_t txnoassoc
tx discard because we&#39;re not associated
Definition: whd_wlioctl.h:1577
uint32_t pstarxucast
count of ucast frames received on all psta assoc
Definition: whd_wlioctl.h:1718
uint32_t txchanrej
Tx frames suppressed due to channel rejection.
Definition: whd_wlioctl.h:1652
uint32_t txuflo
tx fifo underflows
Definition: whd_wlioctl.h:1583
uint32_t tkipicverr_mcst
TKIPICVErrorCount.
Definition: whd_wlioctl.h:1710
uint32_t rxdisassoc
Number of RX DISASSOC.
Definition: whd_wlioctl.h:1749
uint32_t rxmpdu_stbc
count for stbc received
Definition: whd_wlioctl.h:1695
uint32_t bcn_template_not_ready_done
...but "DMA done" interrupt rcvd
Definition: whd_wlioctl.h:1662
uint32_t txphycrs
PR8861/8963 counter.
Definition: whd_wlioctl.h:1585
uint32_t d11cnt_txnocts_off
d11cnt txnocts value when reset d11cnt
Definition: whd_wlioctl.h:1611
uint32_t rxaction
Number of RX action frame.
Definition: whd_wlioctl.h:1763
uint32_t rx1mbps
packets rx at 1Mbps
Definition: whd_wlioctl.h:1666
uint32_t rxbadsrcmac
rx frames with Invalid Src Mac
Definition: whd_wlioctl.h:1601
uint32_t rfdisable
count of radio disables
Definition: whd_wlioctl.h:1688
uint32_t ccmpreplay
CCMPReplays.
Definition: whd_wlioctl.h:1643
uint32_t rxframe
rx data frames
Definition: whd_wlioctl.h:1588
uint32_t rx9mbps
packets rx at 9Mbps
Definition: whd_wlioctl.h:1670
uint32_t txchit
tx header cache hit (fastpath)
Definition: whd_wlioctl.h:1579
uint32_t rx486mbps
packets rx at 486 mbps
Definition: whd_wlioctl.h:1685
uint32_t atim_suppress_count
TX suppressions on ATIM fifo.
Definition: whd_wlioctl.h:1660
uint32_t txdatabcast
Number of TX broadcast data packets.
Definition: whd_wlioctl.h:1767
uint32_t txrunt
tx runt frames
Definition: whd_wlioctl.h:1578
uint32_t txprshort
tx short preamble frames
Definition: whd_wlioctl.h:1574
uint32_t txcmiss
tx header cache miss (slowpath)
Definition: whd_wlioctl.h:1580
uint32_t txassocrsp
Number of TX ASSOC response.
Definition: whd_wlioctl.h:1750
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.