2 * Custom OID/ioctl definitions for
5 * Broadcom 802.11abg Networking Device Driver
7 * Definitions subject to change without notice.
9 * Copyright (C) 1999-2019, Broadcom.
11 * Unless you and Broadcom execute a separate written software license
12 * agreement governing use of this software, this software is licensed to you
13 * under the terms of the GNU General Public License version 2 (the "GPL"),
14 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
15 * following added to such license:
17 * As a special exception, the copyright holders of this software give you
18 * permission to link this software with independent modules, and to copy and
19 * distribute the resulting executable under terms of your choice, provided that
20 * you also meet, for each linked independent module, the terms and conditions of
21 * the license of that module. An independent module is a module which is not
22 * derived from this software. The special exception does not apply to any
23 * modifications of the software.
25 * Notwithstanding the above, under no circumstances may you combine this
26 * software in any way with any other Broadcom software provided under a license
27 * other than the GPL, without Broadcom's express prior written consent.
30 * <<Broadcom-WL-IPTag/Open:>>
32 * $Id: wlioctl.h 816311 2019-04-24 07:19:37Z $
48 #include <bcmwifi_channels.h>
52 #include <bcmwifi_rates.h>
53 #include <wlioctl_defs.h>
56 #include <bcm_mpool_pub.h>
59 /* NOTE re: Module specific error codes.
61 * BCME_.. error codes are extended by various features - e.g. FTM, NAN, SAE etc.
62 * The current process is to allocate a range of 1024 negative 32 bit integers to
63 * each module that extends the error codes to indicate a module specific status.
65 * The next range to use is below. If that range is used for a new feature, please
66 * update the range to be used by the next feature.
68 * The error codes -4096 ... -5119 are reserved for firmware signing.
70 * Next available (inclusive) range: [-6*1024 + 1, -5*1024]
75 /* 11ax trigger frame format - versioning info */
76 #define TRIG_FRAME_FORMAT_11AX_DRAFT_1P1 0
83 #define RSN_KCK_LENGTH 16
84 #define RSN_KEK_LENGTH 16
85 #define TPK_FTM_LEN 16
87 #define INTF_NAME_SIZ 16
90 #define WL_ASSOC_START_EVT_DATA_VERSION 1
92 typedef struct assoc_event_data
{
95 chanspec_t join_chspec
;
98 /**Used to send ioctls over the transport pipe */
99 typedef struct remote_ioctl
{
102 char intf_name
[INTF_NAME_SIZ
];
104 #define REMOTE_SIZE sizeof(rem_ioctl_t)
106 #define BCM_IOV_XTLV_VERSION 0
108 #define MAX_NUM_D11CORES 2
110 /**DFS Forced param */
111 typedef struct wl_dfs_forced_params
{
114 chanspec_list_t chspec_list
;
117 #define DFS_PREFCHANLIST_VER 0x01
118 #define WL_CHSPEC_LIST_FIXED_SIZE OFFSETOF(chanspec_list_t, list)
119 /* size of dfs forced param size given n channels are in the list */
120 #define WL_DFS_FORCED_PARAMS_SIZE(n) \
121 (sizeof(wl_dfs_forced_t) + (((n) < 1) ? (0) : (((n) - 1)* sizeof(chanspec_t))))
122 #define WL_DFS_FORCED_PARAMS_FIXED_SIZE \
123 (WL_CHSPEC_LIST_FIXED_SIZE + OFFSETOF(wl_dfs_forced_t, chspec_list))
124 #define WL_DFS_FORCED_PARAMS_MAX_SIZE \
125 WL_DFS_FORCED_PARAMS_FIXED_SIZE + (WL_NUMCHANNELS * sizeof(chanspec_t))
127 /**association decision information */
129 uint8 assoc_approved
; /**< (re)association approved */
131 uint16 reject_reason
; /**< reason code for rejecting association */
132 struct ether_addr da
;
134 int64 sys_time
; /**< current system time */
137 #define DFS_SCAN_S_IDLE -1
138 #define DFS_SCAN_S_RADAR_FREE 0
139 #define DFS_SCAN_S_RADAR_FOUND 1
140 #define DFS_SCAN_S_INPROGESS 2
141 #define DFS_SCAN_S_SCAN_ABORTED 3
142 #define DFS_SCAN_S_SCAN_MODESW_INPROGRESS 4
143 #define DFS_SCAN_S_MAX 5
145 #define ACTION_FRAME_SIZE 1800
147 typedef struct wl_action_frame
{
148 struct ether_addr da
;
151 uint8 data
[ACTION_FRAME_SIZE
];
154 #define WL_WIFI_ACTION_FRAME_SIZE sizeof(struct wl_action_frame)
156 typedef struct ssid_info
158 uint8 ssid_len
; /**< the length of SSID */
159 uint8 ssid
[32]; /**< SSID string */
162 typedef struct wl_af_params
{
165 struct ether_addr BSSID
;
167 wl_action_frame_t action_frame
;
170 #define WL_WIFI_AF_PARAMS_SIZE sizeof(struct wl_af_params)
172 #define MFP_TEST_FLAG_NORMAL 0
173 #define MFP_TEST_FLAG_ANY_KEY 1
174 typedef struct wl_sa_query
{
179 struct ether_addr da
;
184 /**association information */
186 uint32 assoc_req
; /**< offset to association request frame */
187 uint32 assoc_req_len
; /**< association request frame length */
188 uint32 assoc_rsp
; /**< offset to association response frame */
189 uint32 assoc_rsp_len
; /**< association response frame length */
190 uint32 bcn
; /**< offset to AP beacon */
191 uint32 bcn_len
; /**< AP beacon length */
192 uint32 wsec
; /**< ucast security algo */
193 uint32 wpaie
; /**< offset to WPA ie */
194 uint8 auth_alg
; /**< 802.11 authentication mode */
195 uint8 WPA_auth
; /**< WPA: authenticated key management */
196 uint8 ewc_cap
; /**< EWC (MIMO) capable */
197 uint8 ofdm
; /**< OFDM */
199 /* defined(EXT_STA) */
201 /* Flags for OBSS IOVAR Parameters */
202 #define WL_OBSS_DYN_BWSW_FLAG_ACTIVITY_PERIOD (0x01)
203 #define WL_OBSS_DYN_BWSW_FLAG_NOACTIVITY_PERIOD (0x02)
204 #define WL_OBSS_DYN_BWSW_FLAG_NOACTIVITY_INCR_PERIOD (0x04)
205 #define WL_OBSS_DYN_BWSW_FLAG_PSEUDO_SENSE_PERIOD (0x08)
206 #define WL_OBSS_DYN_BWSW_FLAG_RX_CRS_PERIOD (0x10)
207 #define WL_OBSS_DYN_BWSW_FLAG_DUR_THRESHOLD (0x20)
208 #define WL_OBSS_DYN_BWSW_FLAG_TXOP_PERIOD (0x40)
210 /* OBSS IOVAR Version information */
211 #define WL_PROT_OBSS_CONFIG_PARAMS_VERSION 1
213 #include <packed_section_start.h>
214 typedef BWL_PRE_PACKED_STRUCT
struct {
215 uint8 obss_bwsw_activity_cfm_count_cfg
; /**< configurable count in
216 * seconds before we confirm that OBSS is present and
217 * dynamically activate dynamic bwswitch.
219 uint8 obss_bwsw_no_activity_cfm_count_cfg
; /**< configurable count in
220 * seconds before we confirm that OBSS is GONE and
221 * dynamically start pseudo upgrade. If in pseudo sense time, we
222 * will see OBSS, [means that, we false detected that OBSS-is-gone
223 * in watchdog] this count will be incremented in steps of
224 * obss_bwsw_no_activity_cfm_count_incr_cfg for confirming OBSS
225 * detection again. Note that, at present, max 30seconds is
226 * allowed like this. [OBSS_BWSW_NO_ACTIVITY_MAX_INCR_DEFAULT]
228 uint8 obss_bwsw_no_activity_cfm_count_incr_cfg
; /* see above
230 uint16 obss_bwsw_pseudo_sense_count_cfg
; /**< number of msecs/cnt to be in
231 * pseudo state. This is used to sense/measure the stats from lq.
233 uint8 obss_bwsw_rx_crs_threshold_cfg
; /**< RX CRS default threshold */
234 uint8 obss_bwsw_dur_thres
; /**< OBSS dyn bwsw trigger/RX CRS Sec */
235 uint8 obss_bwsw_txop_threshold_cfg
; /**< TXOP default threshold */
236 } BWL_POST_PACKED_STRUCT wlc_obss_dynbwsw_config_t
;
237 #include <packed_section_end.h>
239 #include <packed_section_start.h>
240 typedef BWL_PRE_PACKED_STRUCT
struct {
241 uint32 version
; /**< version field */
244 wlc_obss_dynbwsw_config_t config_params
;
245 } BWL_POST_PACKED_STRUCT obss_config_params_t
;
246 #include <packed_section_end.h>
249 typedef enum bsscfg_type
{
250 BSSCFG_TYPE_GENERIC
= 0, /**< Generic AP/STA/IBSS BSS */
251 BSSCFG_TYPE_P2P
= 1, /**< P2P BSS */
252 /* index 2 earlier used for BTAMP */
253 BSSCFG_TYPE_PSTA
= 3,
254 BSSCFG_TYPE_TDLS
= 4,
255 BSSCFG_TYPE_SLOTTED_BSS
= 5,
256 BSSCFG_TYPE_PROXD
= 6,
258 BSSCFG_TYPE_MESH
= 8,
259 BSSCFG_TYPE_AIBSS
= 9
263 typedef enum bsscfg_subtype
{
264 BSSCFG_SUBTYPE_NONE
= 0,
265 BSSCFG_GENERIC_STA
= 1, /* GENERIC */
266 BSSCFG_GENERIC_AP
= 2,
267 BSSCFG_GENERIC_IBSS
= 6,
268 BSSCFG_P2P_GC
= 3, /* P2P */
271 /* Index 7 & 8 earlier used for BTAMP */
272 BSSCFG_SUBTYPE_AWDL
= 9, /* SLOTTED_BSS_TYPE */
273 BSSCFG_SUBTYPE_NAN_MGMT
= 10,
274 BSSCFG_SUBTYPE_NAN_DATA
= 11,
275 BSSCFG_SUBTYPE_NAN_MGMT_DATA
= 12
278 typedef struct wlc_bsscfg_info
{
283 /* ULP SHM Offsets info */
284 typedef struct ulp_shm_info
{
285 uint32 m_ulp_ctrl_sdio
;
286 uint32 m_ulp_wakeevt_ind
;
287 uint32 m_ulp_wakeind
;
290 /* Legacy structure to help keep backward compatible wl tool and tray app */
292 #define LEGACY_WL_BSS_INFO_VERSION 107 /**< older version of wl_bss_info struct */
294 typedef struct wl_bss_info_107
{
295 uint32 version
; /**< version field */
296 uint32 length
; /**< byte length of data in this record,
297 * starting at version and including IEs
299 struct ether_addr BSSID
;
300 uint16 beacon_period
; /**< units are Kusec */
301 uint16 capability
; /**< Capability information */
306 uint32 count
; /**< # rates in this set */
307 uint8 rates
[16]; /**< rates in 500kbps units w/hi bit set if basic */
308 } rateset
; /**< supported rates */
309 uint8 channel
; /**< Channel no. */
311 uint16 atim_window
; /**< units are Kusec */
312 uint8 dtim_period
; /**< DTIM period */
314 int16 RSSI
; /**< receive signal strength (in dBm) */
315 int8 phy_noise
; /**< noise (in dBm) */
317 uint32 ie_length
; /**< byte length of Information Elements */
318 /* variable length Information Elements */
322 * Per-BSS information structure.
325 #define LEGACY2_WL_BSS_INFO_VERSION 108 /**< old version of wl_bss_info struct */
329 * Applications MUST CHECK ie_offset field and length field to access IEs and
330 * next bss_info structure in a vector (in wl_scan_results_t)
332 typedef struct wl_bss_info_108
{
333 uint32 version
; /**< version field */
334 uint32 length
; /**< byte length of data in this record,
335 * starting at version and including IEs
337 struct ether_addr BSSID
;
338 uint16 beacon_period
; /**< units are Kusec */
339 uint16 capability
; /**< Capability information */
344 uint32 count
; /**< # rates in this set */
345 uint8 rates
[16]; /**< rates in 500kbps units w/hi bit set if basic */
346 } rateset
; /**< supported rates */
347 chanspec_t chanspec
; /**< chanspec for bss */
348 uint16 atim_window
; /**< units are Kusec */
349 uint8 dtim_period
; /**< DTIM period */
351 int16 RSSI
; /**< receive signal strength (in dBm) */
352 int8 phy_noise
; /**< noise (in dBm) */
354 uint8 n_cap
; /**< BSS is 802.11N Capable */
356 uint32 nbss_cap
; /**< 802.11N BSS Capabilities (based on HT_CAP_*) */
357 uint8 ctl_ch
; /**< 802.11N BSS control channel number */
359 uint32 reserved32
[1]; /**< Reserved for expansion of BSS properties */
360 uint8 flags
; /**< flags */
361 uint8 reserved
[3]; /**< Reserved for expansion of BSS properties */
362 uint8 basic_mcs
[MCSSET_LEN
]; /**< 802.11N BSS required MCS set */
364 uint16 ie_offset
; /**< offset at which IEs start, from beginning */
366 uint32 ie_length
; /**< byte length of Information Elements */
367 /* Add new fields here */
368 /* variable length Information Elements */
371 #define WL_BSS_INFO_VERSION 109 /**< current version of wl_bss_info struct */
375 * Applications MUST CHECK ie_offset field and length field to access IEs and
376 * next bss_info structure in a vector (in wl_scan_results_t)
378 typedef struct wl_bss_info
{
379 uint32 version
; /**< version field */
380 uint32 length
; /**< byte length of data in this record,
381 * starting at version and including IEs
383 struct ether_addr BSSID
;
384 uint16 beacon_period
; /**< units are Kusec */
385 uint16 capability
; /**< Capability information */
388 uint8 bcnflags
; /* additional flags w.r.t. beacon */
390 uint32 count
; /**< # rates in this set */
391 uint8 rates
[16]; /**< rates in 500kbps units w/hi bit set if basic */
392 } rateset
; /**< supported rates */
393 chanspec_t chanspec
; /**< chanspec for bss */
394 uint16 atim_window
; /**< units are Kusec */
395 uint8 dtim_period
; /**< DTIM period */
396 uint8 accessnet
; /* from beacon interwork IE (if bcnflags) */
397 int16 RSSI
; /**< receive signal strength (in dBm) */
398 int8 phy_noise
; /**< noise (in dBm) */
399 uint8 n_cap
; /**< BSS is 802.11N Capable */
400 uint16 freespace1
; /* make implicit padding explicit */
401 uint32 nbss_cap
; /**< 802.11N+AC BSS Capabilities */
402 uint8 ctl_ch
; /**< 802.11N BSS control channel number */
403 uint8 padding1
[3]; /**< explicit struct alignment padding */
404 uint16 vht_rxmcsmap
; /**< VHT rx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */
405 uint16 vht_txmcsmap
; /**< VHT tx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */
406 uint8 flags
; /**< flags */
407 uint8 vht_cap
; /**< BSS is vht capable */
408 uint8 reserved
[2]; /**< Reserved for expansion of BSS properties */
409 uint8 basic_mcs
[MCSSET_LEN
]; /**< 802.11N BSS required MCS set */
411 uint16 ie_offset
; /**< offset at which IEs start, from beginning */
412 uint16 freespace2
; /* making implicit padding explicit */
413 uint32 ie_length
; /**< byte length of Information Elements */
414 int16 SNR
; /**< average SNR of during frame reception */
415 uint16 vht_mcsmap
; /**< STA's Associated vhtmcsmap */
416 uint16 vht_mcsmap_prop
; /**< STA's Associated prop vhtmcsmap */
417 uint16 vht_txmcsmap_prop
; /**< prop VHT tx mcs prop */
418 } wl_bss_info_v109_t
;
422 * Applications MUST CHECK ie_offset field and length field to access IEs and
423 * next bss_info structure in a vector (in wl_scan_results_t)
425 typedef struct wl_bss_info_v109_1
{
426 uint32 version
; /**< version field */
427 uint32 length
; /**< byte length of data in this record,
428 * starting at version and including IEs
430 struct ether_addr BSSID
;
431 uint16 beacon_period
; /**< units are Kusec */
432 uint16 capability
; /**< Capability information */
435 uint8 bcnflags
; /* additional flags w.r.t. beacon */
437 uint32 count
; /**< # rates in this set */
438 uint8 rates
[16]; /**< rates in 500kbps units w/hi bit set if basic */
439 } rateset
; /**< supported rates */
440 chanspec_t chanspec
; /**< chanspec for bss */
441 uint16 atim_window
; /**< units are Kusec */
442 uint8 dtim_period
; /**< DTIM period */
443 uint8 accessnet
; /* from beacon interwork IE (if bcnflags) */
444 int16 RSSI
; /**< receive signal strength (in dBm) */
445 int8 phy_noise
; /**< noise (in dBm) */
446 uint8 n_cap
; /**< BSS is 802.11N Capable */
447 uint8 he_cap
; /**< BSS is he capable */
448 uint8 freespace1
; /* make implicit padding explicit */
449 uint32 nbss_cap
; /**< 802.11N+AC BSS Capabilities */
450 uint8 ctl_ch
; /**< 802.11N BSS control channel number */
451 uint8 padding1
[3]; /**< explicit struct alignment padding */
452 uint16 vht_rxmcsmap
; /**< VHT rx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */
453 uint16 vht_txmcsmap
; /**< VHT tx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */
454 uint8 flags
; /**< flags */
455 uint8 vht_cap
; /**< BSS is vht capable */
456 uint8 reserved
[2]; /**< Reserved for expansion of BSS properties */
457 uint8 basic_mcs
[MCSSET_LEN
]; /**< 802.11N BSS required MCS set */
459 uint16 ie_offset
; /**< offset at which IEs start, from beginning */
460 uint16 freespace2
; /* making implicit padding explicit */
461 uint32 ie_length
; /**< byte length of Information Elements */
462 int16 SNR
; /**< average SNR of during frame reception */
463 uint16 vht_mcsmap
; /**< STA's Associated vhtmcsmap */
464 uint16 vht_mcsmap_prop
; /**< STA's Associated prop vhtmcsmap */
465 uint16 vht_txmcsmap_prop
; /**< prop VHT tx mcs prop */
466 uint32 he_mcsmap
; /**< STA's Associated hemcsmap */
467 uint32 he_rxmcsmap
; /**< HE rx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */
468 uint32 he_txmcsmap
; /**< HE tx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */
469 } wl_bss_info_v109_1_t
;
473 * Applications MUST CHECK ie_offset field and length field to access IEs and
474 * next bss_info structure in a vector (in wl_scan_results_t)
476 typedef struct wl_bss_info_v109_2
{
477 uint32 version
; /**< version field */
478 uint32 length
; /**< byte length of data in this record,
479 * starting at version and including IEs
481 struct ether_addr BSSID
;
482 uint16 beacon_period
; /**< units are Kusec */
483 uint16 capability
; /**< Capability information */
486 uint8 bcnflags
; /* additional flags w.r.t. beacon */
488 uint32 count
; /**< # rates in this set */
489 uint8 rates
[16]; /**< rates in 500kbps units w/hi bit set if basic */
490 } rateset
; /**< supported rates */
491 chanspec_t chanspec
; /**< chanspec for bss */
492 uint16 atim_window
; /**< units are Kusec */
493 uint8 dtim_period
; /**< DTIM period */
494 uint8 accessnet
; /* from beacon interwork IE (if bcnflags) */
495 int16 RSSI
; /**< receive signal strength (in dBm) */
496 int8 phy_noise
; /**< noise (in dBm) */
497 uint8 n_cap
; /**< BSS is 802.11N Capable */
498 uint8 he_cap
; /**< BSS is he capable */
499 uint8 freespace1
; /* make implicit padding explicit */
500 uint32 nbss_cap
; /**< 802.11N+AC BSS Capabilities */
501 uint8 ctl_ch
; /**< 802.11N BSS control channel number */
502 uint8 padding1
[3]; /**< explicit struct alignment padding */
503 uint16 vht_rxmcsmap
; /**< VHT rx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */
504 uint16 vht_txmcsmap
; /**< VHT tx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */
505 uint8 flags
; /**< flags */
506 uint8 vht_cap
; /**< BSS is vht capable */
507 uint8 reserved
[2]; /**< Reserved for expansion of BSS properties */
508 uint8 basic_mcs
[MCSSET_LEN
]; /**< 802.11N BSS required MCS set */
510 uint16 ie_offset
; /**< offset at which IEs start, from beginning */
511 uint16 freespace2
; /* making implicit padding explicit */
512 uint32 ie_length
; /**< byte length of Information Elements */
513 int16 SNR
; /**< average SNR of during frame reception */
514 uint16 vht_mcsmap
; /**< STA's Associated vhtmcsmap */
515 uint16 vht_mcsmap_prop
; /**< STA's Associated prop vhtmcsmap */
516 uint16 vht_txmcsmap_prop
; /**< prop VHT tx mcs prop */
517 uint32 he_mcsmap
; /**< STA's Associated hemcsmap */
518 uint32 he_rxmcsmap
; /**< HE rx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */
519 uint32 he_txmcsmap
; /**< HE tx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */
520 uint32 timestamp
[2]; /* Beacon Timestamp for FAKEAP req */
521 } wl_bss_info_v109_2_t
;
523 #ifndef WL_BSS_INFO_TYPEDEF_HAS_ALIAS
524 typedef wl_bss_info_v109_t wl_bss_info_t
;
527 #define WL_GSCAN_FULL_RESULT_VERSION 2 /* current version of wl_gscan_result_t struct */
529 typedef struct wl_gscan_bss_info
{
531 wl_bss_info_v109_t info
;
532 /* Do not add any more members below, fixed */
533 /* and variable length Information Elements to follow */
534 } wl_gscan_bss_info_v2_t
;
536 typedef struct wl_gscan_bss_info_v3
{
538 uint8 info
[]; /* var length wl_bss_info_X structures */
539 /* Do not add any more members below, fixed */
540 /* and variable length Information Elements to follow */
541 } wl_gscan_bss_info_v3_t
;
543 #ifndef WL_BSS_INFO_TYPEDEF_HAS_ALIAS
544 typedef wl_gscan_bss_info_v2_t wl_gscan_bss_info_t
;
545 #define WL_GSCAN_INFO_FIXED_FIELD_SIZE (sizeof(wl_gscan_bss_info_t) - sizeof(wl_bss_info_t))
548 typedef struct wl_bsscfg
{
556 struct ether_addr prev_BSSID
;
557 struct ether_addr BSSID
;
558 uint32 targetbss_wpa2_flags
;
563 typedef struct wl_if_add
{
567 struct ether_addr mac_addr
;
572 typedef struct wl_bss_config
{
574 uint32 beacon_period
;
578 /* Number of Bsscolor supported per core */
579 #ifndef HE_MAX_BSSCOLOR_RES
580 #define HE_MAX_BSSCOLOR_RES 2
583 #ifndef HE_MAX_STAID_PER_BSSCOLOR
584 #define HE_MAX_STAID_PER_BSSCOLOR 4
587 /* BSSColor indices */
588 #define BSSCOLOR0_IDX 0
589 #define BSSCOLOR1_IDX 1
590 #define HE_BSSCOLOR0 0
591 #define HE_BSSCOLOR_MAX_VAL 63
598 #define HE_STAID_MAX_VAL 0x07FF
600 typedef struct wl_bsscolor_info
{
601 uint16 version
; /**< structure version */
602 uint16 length
; /**< length of the bsscolor info */
603 uint8 bsscolor_index
; /**< bsscolor index 0-1 */
604 uint8 bsscolor
; /**<bsscolor value from 0 to 63 */
605 uint8 partial_bsscolor_ind
;
606 uint8 disable_bsscolor_ind
; /**< To disable particular bsscolor */
607 uint16 staid_info
[HE_MAX_STAID_PER_BSSCOLOR
]; /**< 0-3 staid info of each bsscolor */
608 } wl_bsscolor_info_t
;
610 #define WL_BSS_USER_RADAR_CHAN_SELECT 0x1 /**< User application will randomly select
614 #define DLOAD_HANDLER_VER 1 /**< Downloader version */
615 #define DLOAD_FLAG_VER_MASK 0xf000 /**< Downloader version mask */
616 #define DLOAD_FLAG_VER_SHIFT 12 /**< Downloader version shift */
618 #define DL_CRC_NOT_INUSE 0x0001
619 #define DL_BEGIN 0x0002
620 #define DL_END 0x0004
622 /* Flags for Major/Minor/Date number shift and mask */
623 #define EPI_VER_SHIFT 16
624 #define EPI_VER_MASK 0xFFFF
625 /** generic download types & flags */
631 /** ucode type values */
638 struct wl_dload_data
{
645 typedef struct wl_dload_data wl_dload_data_t
;
647 struct wl_ucode_info
{
654 typedef struct wl_ucode_info wl_ucode_info_t
;
656 struct wl_clm_dload_info
{
658 uint32 clm_total_len
;
664 typedef struct wl_clm_dload_info wl_clm_dload_info_t
;
666 typedef struct wlc_ssid
{
668 uint8 SSID
[DOT11_MAX_SSID_LEN
];
671 typedef struct wlc_ssid_ext
{
677 uint8 SSID
[DOT11_MAX_SSID_LEN
];
680 #define MAX_PREFERRED_AP_NUM 5
681 typedef struct wlc_fastssidinfo
{
682 uint32 SSID_channel
[MAX_PREFERRED_AP_NUM
];
683 wlc_ssid_t SSID_info
[MAX_PREFERRED_AP_NUM
];
684 } wlc_fastssidinfo_t
;
686 typedef struct wnm_url
{
691 typedef struct chan_scandata
{
694 chanspec_t channel
; /**< Channel num, bw, ctrl_sb and band */
695 uint32 channel_mintime
;
696 uint32 channel_maxtime
;
699 typedef enum wl_scan_type
{
700 EXTDSCAN_FOREGROUND_SCAN
,
701 EXTDSCAN_BACKGROUND_SCAN
,
702 EXTDSCAN_FORCEDBACKGROUND_SCAN
705 #define WLC_EXTDSCAN_MAX_SSID 5
707 typedef struct wl_extdscan_params
{
708 int8 nprobes
; /**< 0, passive, otherwise active */
709 int8 split_scan
; /**< split scan */
710 int8 band
; /**< band */
712 wlc_ssid_t ssid
[WLC_EXTDSCAN_MAX_SSID
]; /**< ssid list */
713 uint32 tx_rate
; /**< in 500ksec units */
714 wl_scan_type_t scan_type
; /**< enum */
716 chan_scandata_t channel_list
[1]; /**< list of chandata structs */
717 } wl_extdscan_params_t
;
719 #define WL_EXTDSCAN_PARAMS_FIXED_SIZE (sizeof(wl_extdscan_params_t) - sizeof(chan_scandata_t))
721 #define WL_SCAN_PARAMS_SSID_MAX 10
723 typedef struct wl_scan_params
{
724 wlc_ssid_t ssid
; /**< default: {0, ""} */
725 struct ether_addr bssid
; /**< default: bcast */
726 int8 bss_type
; /**< default: any,
727 * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT
729 uint8 scan_type
; /**< flags, 0 use default */
730 int32 nprobes
; /**< -1 use default, number of probes per channel */
731 int32 active_time
; /**< -1 use default, dwell time per channel for
734 int32 passive_time
; /**< -1 use default, dwell time per channel
735 * for passive scanning
737 int32 home_time
; /**< -1 use default, dwell time for the home channel
738 * between channel scans
740 int32 channel_num
; /**< count of channels and ssids that follow
742 * low half is count of channels in channel_list, 0
743 * means default (use all available channels)
745 * high half is entries in wlc_ssid_t array that
746 * follows channel_list, aligned for int32 (4 bytes)
747 * meaning an odd channel count implies a 2-byte pad
748 * between end of channel_list and first ssid
750 * if ssid count is zero, single ssid in the fixed
751 * parameter portion is assumed, otherwise ssid in
752 * the fixed portion is ignored
754 uint16 channel_list
[1]; /**< list of chanspecs */
757 /** size of wl_scan_params not including variable length array */
758 #define WL_SCAN_PARAMS_FIXED_SIZE 64
759 #define WL_MAX_ROAMSCAN_DATSZ (WL_SCAN_PARAMS_FIXED_SIZE + (WL_NUMCHANNELS * sizeof(uint16)))
761 #define ISCAN_REQ_VERSION 1
763 /** incremental scan struct */
764 typedef struct wl_iscan_params
{
767 uint16 scan_duration
;
768 wl_scan_params_t params
;
771 /** 3 fields + size of wl_scan_params, not including variable length array */
772 #define WL_ISCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_iscan_params_t, params) + sizeof(wlc_ssid_t))
774 typedef struct wl_scan_results
{
778 wl_bss_info_v109_t bss_info
[1];
779 } wl_scan_results_v109_t
;
781 typedef struct wl_scan_results_v2
{
785 uint8 bss_info
[]; /* var length wl_bss_info_X structures */
786 } wl_scan_results_v2_t
;
788 #ifndef WL_BSS_INFO_TYPEDEF_HAS_ALIAS
789 typedef wl_scan_results_v109_t wl_scan_results_t
;
790 /** size of wl_scan_results not including variable length array */
791 #define WL_SCAN_RESULTS_FIXED_SIZE (sizeof(wl_scan_results_t) - sizeof(wl_bss_info_t))
794 #if defined(SIMPLE_ISCAN)
795 /** the buf lengh can be WLC_IOCTL_MAXLEN (8K) to reduce iteration */
796 #define WLC_IW_ISCAN_MAXLEN 2048
797 typedef struct iscan_buf
{
798 struct iscan_buf
* next
;
799 int8 iscan_buf
[WLC_IW_ISCAN_MAXLEN
];
801 #endif /* SIMPLE_ISCAN */
802 #define ESCAN_REQ_VERSION 1
804 /** event scan reduces amount of SOC memory needed to store scan results */
805 typedef struct wl_escan_params
{
809 wl_scan_params_t params
;
812 #define WL_ESCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_escan_params_t, params) + sizeof(wlc_ssid_t))
814 /** event scan reduces amount of SOC memory needed to store scan results */
815 typedef struct wl_escan_result
{
820 wl_bss_info_v109_t bss_info
[1];
821 } wl_escan_result_v109_t
;
823 /** event scan reduces amount of SOC memory needed to store scan results */
824 typedef struct wl_escan_result_v2
{
829 uint8 bss_info
[]; /* var length wl_bss_info_X structures */
830 } wl_escan_result_v2_t
;
832 #ifndef WL_BSS_INFO_TYPEDEF_HAS_ALIAS
833 typedef wl_escan_result_v109_t wl_escan_result_t
;
834 #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(wl_escan_result_t) - sizeof(wl_bss_info_t))
837 typedef struct wl_gscan_result
{
840 uint32 scan_ch_bucket
;
841 wl_gscan_bss_info_v2_t bss_info
[1];
842 } wl_gscan_result_v2_t
;
844 typedef struct wl_gscan_result_v2_1
{
847 uint32 scan_ch_bucket
;
848 uint8 bss_info
[]; /* var length wl_bss_info_X structures */
849 } wl_gscan_result_v2_1_t
;
851 #ifndef WL_BSS_INFO_TYPEDEF_HAS_ALIAS
852 typedef wl_gscan_result_v2_t wl_gscan_result_t
;
853 #define WL_GSCAN_RESULTS_FIXED_SIZE (sizeof(wl_gscan_result_t) - sizeof(wl_gscan_bss_info_t))
856 /** incremental scan results struct */
857 typedef struct wl_iscan_results
{
859 wl_scan_results_v109_t results
;
860 } wl_iscan_results_v109_t
;
862 /** incremental scan results struct */
863 typedef struct wl_iscan_results_v2
{
865 wl_scan_results_v2_t results
;
866 } wl_iscan_results_v2_t
;
868 #ifndef WL_BSS_INFO_TYPEDEF_HAS_ALIAS
869 typedef wl_iscan_results_v109_t wl_iscan_results_t
;
870 /** size of wl_iscan_results not including variable length array */
871 #define WL_ISCAN_RESULTS_FIXED_SIZE \
872 (WL_SCAN_RESULTS_FIXED_SIZE + OFFSETOF(wl_iscan_results_t, results))
875 typedef struct wl_probe_params
{
877 struct ether_addr bssid
;
878 struct ether_addr mac
;
881 #define WL_MAXRATES_IN_SET 16 /**< max # of rates in a rateset */
883 typedef struct wl_rateset
{
884 uint32 count
; /**< # rates in this set */
885 uint8 rates
[WL_MAXRATES_IN_SET
]; /**< rates in 500kbps units w/hi bit set if basic */
888 #define WL_VHT_CAP_MCS_MAP_NSS_MAX 8
890 typedef struct wl_rateset_args_v1
{
891 uint32 count
; /**< # rates in this set */
892 uint8 rates
[WL_MAXRATES_IN_SET
]; /**< rates in 500kbps units w/hi bit set if basic */
893 uint8 mcs
[MCSSET_LEN
]; /**< supported mcs index bit map */
894 uint16 vht_mcs
[WL_VHT_CAP_MCS_MAP_NSS_MAX
]; /**< supported mcs index bit map per nss */
895 } wl_rateset_args_v1_t
;
897 #define RATESET_ARGS_V1 (1)
898 #define RATESET_ARGS_V2 (2)
900 #ifndef RATESET_VERSION_ENABLED
901 /* rateset structure before versioning. legacy. DONOT update anymore here */
902 #define RATESET_ARGS_VERSION (RATESET_ARGS_V1)
903 typedef wl_rateset_args_v1_t wl_rateset_args_t
;
904 #endif /* RATESET_VERSION_ENABLED */
906 /* Note: dependent structures: sta_info_vX_t. When any update to this structure happens,
907 * update sta_info_vX_t also.
909 #define WL_HE_CAP_MCS_MAP_NSS_MAX 8
911 typedef struct wl_rateset_args_v2
{
912 uint16 version
; /**< version. */
913 uint16 len
; /**< length */
914 uint32 count
; /**< # rates in this set */
915 uint8 rates
[WL_MAXRATES_IN_SET
]; /**< rates in 500kbps units w/hi bit set if basic */
916 uint8 mcs
[MCSSET_LEN
]; /**< supported mcs index bit map */
917 uint16 vht_mcs
[WL_VHT_CAP_MCS_MAP_NSS_MAX
]; /**< supported mcs index bit map per nss */
918 uint16 he_mcs
[WL_HE_CAP_MCS_MAP_NSS_MAX
]; /**< supported he mcs index bit map per nss */
919 } wl_rateset_args_v2_t
;
921 /* HE Rates BITMAP */
922 #define WL_HE_CAP_MCS_0_7_MAP 0x00ff
923 #define WL_HE_CAP_MCS_0_8_MAP 0x01ff
924 #define WL_HE_CAP_MCS_0_9_MAP 0x03ff
925 #define WL_HE_CAP_MCS_0_10_MAP 0x07ff
926 #define WL_HE_CAP_MCS_0_11_MAP 0x0fff
928 #define TXBF_RATE_MCS_ALL 4
929 #define TXBF_RATE_VHT_ALL 4
930 #define TXBF_RATE_OFDM_ALL 8
932 typedef struct wl_txbf_rateset
{
933 uint8 txbf_rate_mcs
[TXBF_RATE_MCS_ALL
]; /**< one for each stream */
934 uint8 txbf_rate_mcs_bcm
[TXBF_RATE_MCS_ALL
]; /**< one for each stream */
935 uint16 txbf_rate_vht
[TXBF_RATE_VHT_ALL
]; /**< one for each stream */
936 uint16 txbf_rate_vht_bcm
[TXBF_RATE_VHT_ALL
]; /**< one for each stream */
937 uint8 txbf_rate_ofdm
[TXBF_RATE_OFDM_ALL
]; /**< bitmap of ofdm rates that enables txbf */
938 uint8 txbf_rate_ofdm_bcm
[TXBF_RATE_OFDM_ALL
]; /* bitmap of ofdm rates that enables txbf */
939 uint8 txbf_rate_ofdm_cnt
;
940 uint8 txbf_rate_ofdm_cnt_bcm
;
943 #define NUM_BFGAIN_ARRAY_1RX 2
944 #define NUM_BFGAIN_ARRAY_2RX 3
945 #define NUM_BFGAIN_ARRAY_3RX 4
946 #define NUM_BFGAIN_ARRAY_4RX 5
948 typedef struct wl_txbf_expgainset
{
949 /* bitmap for each element: B[4:0]=>c0, B[9:5]=>c1, B[14:10]=>c2, B[19:15]=>c[3-7]
950 * B[24:20]=>c[8-9], B[29:25]=>c[10-11]
952 uint32 bfgain_2x1
[NUM_BFGAIN_ARRAY_1RX
]; /* exp 1ss, imp 1ss */
953 uint32 bfgain_2x2
[NUM_BFGAIN_ARRAY_2RX
]; /* exp [1-2]ss, imp 1ss */
954 uint32 bfgain_3x1
[NUM_BFGAIN_ARRAY_1RX
];
955 uint32 bfgain_3x2
[NUM_BFGAIN_ARRAY_2RX
];
956 uint32 bfgain_3x3
[NUM_BFGAIN_ARRAY_3RX
]; /* exp [1-3]ss, imp 1ss */
957 uint32 bfgain_4x1
[NUM_BFGAIN_ARRAY_1RX
];
958 uint32 bfgain_4x2
[NUM_BFGAIN_ARRAY_2RX
];
959 uint32 bfgain_4x3
[NUM_BFGAIN_ARRAY_3RX
];
960 uint32 bfgain_4x4
[NUM_BFGAIN_ARRAY_4RX
]; /* exp [1-4]ss, imp 1ss */
961 } wl_txbf_expgainset_t
;
963 #define OFDM_RATE_MASK 0x0000007f
964 typedef uint8 ofdm_rates_t
;
966 typedef struct wl_rates_info
{
979 typedef struct wl_uint32_list
{
980 /** in - # of elements, out - # of entries */
982 /** variable length uint32 list */
986 /* WLC_SET_ALLOW_MODE values */
987 #define ALLOW_MODE_ANY_BSSID 0
988 #define ALLOW_MODE_ONLY_DESIRED_BSSID 1
989 #define ALLOW_MODE_NO_BSSID 2
991 /** used for association with a specific BSSID and chanspec list */
992 typedef struct wl_assoc_params
{
993 struct ether_addr bssid
; /**< 00:00:00:00:00:00: broadcast scan */
994 uint16 bssid_cnt
; /**< 0: use chanspec_num, and the single bssid,
995 * otherwise count of chanspecs in chanspec_list
996 * AND paired bssids following chanspec_list
997 * also, chanspec_num has to be set to zero
998 * for bssid list to be used
1000 int32 chanspec_num
; /**< 0: all available channels,
1001 * otherwise count of chanspecs in chanspec_list
1003 chanspec_t chanspec_list
[1]; /**< list of chanspecs */
1004 } wl_assoc_params_t
;
1006 #define WL_ASSOC_PARAMS_FIXED_SIZE OFFSETOF(wl_assoc_params_t, chanspec_list)
1008 /** used for reassociation/roam to a specific BSSID and channel */
1009 typedef wl_assoc_params_t wl_reassoc_params_t
;
1010 #define WL_REASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
1012 /** used for association to a specific BSSID and channel */
1013 typedef wl_assoc_params_t wl_join_assoc_params_t
;
1014 #define WL_JOIN_ASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
1016 /** used for join with or without a specific bssid and channel list */
1017 typedef struct wl_join_params
{
1019 wl_assoc_params_t params
; /**< optional field, but it must include the fixed portion
1020 * of the wl_assoc_params_t struct when it does present.
1024 #define WL_JOIN_PARAMS_FIXED_SIZE (OFFSETOF(wl_join_params_t, params) + \
1025 WL_ASSOC_PARAMS_FIXED_SIZE)
1027 typedef struct wlc_roam_exp_params
{
1028 int8 a_band_boost_threshold
;
1029 int8 a_band_penalty_threshold
;
1030 int8 a_band_boost_factor
;
1031 int8 a_band_penalty_factor
;
1032 int8 cur_bssid_boost
;
1033 int8 alert_roam_trigger_threshold
;
1034 int16 a_band_max_boost
;
1035 } wlc_roam_exp_params_t
;
1037 #define ROAM_EXP_CFG_VERSION 1
1039 #define ROAM_EXP_ENABLE_FLAG (1 << 0)
1041 #define ROAM_EXP_CFG_PRESENT (1 << 1)
1043 typedef struct wl_roam_exp_cfg
{
1046 wlc_roam_exp_params_t params
;
1047 } wl_roam_exp_cfg_t
;
1049 typedef struct wl_bssid_pref_list
{
1050 struct ether_addr bssid
;
1051 /* Add this to modify rssi */
1054 } wl_bssid_pref_list_t
;
1056 #define BSSID_PREF_LIST_VERSION 1
1057 #define ROAM_EXP_CLEAR_BSSID_PREF (1 << 0)
1059 typedef struct wl_bssid_pref_cfg
{
1064 wl_bssid_pref_list_t bssids
[];
1065 } wl_bssid_pref_cfg_t
;
1067 #define SSID_WHITELIST_VERSION 1
1069 #define ROAM_EXP_CLEAR_SSID_WHITELIST (1 << 0)
1071 /* Roam SSID whitelist, ssids in this list are ok to */
1072 /* be considered as targets to join when considering a roam */
1074 typedef struct wl_ssid_whitelist
{
1082 } wl_ssid_whitelist_t
;
1084 #define ROAM_EXP_EVENT_VERSION 1
1086 typedef struct wl_roam_exp_event
{
1090 wlc_ssid_t cur_ssid
;
1091 } wl_roam_exp_event_t
;
1093 /** scan params for extended join */
1094 typedef struct wl_join_scan_params
{
1095 uint8 scan_type
; /**< 0 use default, active or passive scan */
1097 int32 nprobes
; /**< -1 use default, number of probes per channel */
1098 int32 active_time
; /**< -1 use default, dwell time per channel for
1101 int32 passive_time
; /**< -1 use default, dwell time per channel
1102 * for passive scanning
1104 int32 home_time
; /**< -1 use default, dwell time for the home channel
1105 * between channel scans
1107 } wl_join_scan_params_t
;
1109 /** extended join params */
1110 typedef struct wl_extjoin_params
{
1111 wlc_ssid_t ssid
; /**< {0, ""}: wildcard scan */
1112 wl_join_scan_params_t scan
;
1113 wl_join_assoc_params_t assoc
; /**< optional field, but it must include the fixed portion
1114 * of the wl_join_assoc_params_t struct when it does
1117 } wl_extjoin_params_t
;
1118 #define WL_EXTJOIN_PARAMS_FIXED_SIZE (OFFSETOF(wl_extjoin_params_t, assoc) + \
1119 WL_JOIN_ASSOC_PARAMS_FIXED_SIZE)
1121 #define ANT_SELCFG_MAX 4 /**< max number of antenna configurations */
1122 #define MAX_STREAMS_SUPPORTED 4 /**< max number of streams supported */
1124 uint8 ant_config
[ANT_SELCFG_MAX
]; /**< antenna configuration */
1125 uint8 num_antcfg
; /**< number of available antenna configurations */
1129 uint32 duration
; /**< millisecs spent sampling this channel */
1130 uint32 congest_ibss
; /**< millisecs in our bss (presumably this traffic will */
1131 /**< move if cur bss moves channels) */
1132 uint32 congest_obss
; /**< traffic not in our bss */
1133 uint32 interference
; /**< millisecs detecting a non 802.11 interferer. */
1134 uint32 timestamp
; /**< second timestamp */
1138 chanspec_t chanspec
; /**< Which channel? */
1139 uint16 num_secs
; /**< How many secs worth of data */
1140 cca_congest_t secs
[1]; /**< Data */
1141 } cca_congest_channel_req_t
;
1143 uint32 duration
; /**< millisecs spent sampling this channel */
1144 uint32 congest
; /**< millisecs detecting busy CCA */
1145 uint32 timestamp
; /**< second timestamp */
1146 } cca_congest_simple_t
;
1151 chanspec_t chanspec
; /**< Which channel? */
1154 cca_congest_simple_t cca_busy
; /**< CCA busy */
1155 cca_congest_t cca_busy_ext
; /**< Extended CCA report */
1156 int32 noise
; /**< noise floor */
1158 } cca_chan_qual_event_t
;
1161 uint32 msrmnt_time
; /**< Time for Measurement (msec) */
1162 uint32 msrmnt_done
; /**< flag set when measurement complete */
1164 } cca_stats_n_flags
;
1167 uint32 msrmnt_query
; /* host to driver query for measurement done */
1168 uint32 time_req
; /* time required for measurement */
1169 uint8 report_opt
; /* option to print different stats in report */
1173 /* interference sources */
1174 enum interference_source
{
1175 ITFR_NONE
= 0, /**< interference */
1176 ITFR_PHONE
, /**< wireless phone */
1177 ITFR_VIDEO_CAMERA
, /**< wireless video camera */
1178 ITFR_MICROWAVE_OVEN
, /**< microwave oven */
1179 ITFR_BABY_MONITOR
, /**< wireless baby monitor */
1180 ITFR_BLUETOOTH
, /**< bluetooth */
1181 ITFR_VIDEO_CAMERA_OR_BABY_MONITOR
, /**< wireless camera or baby monitor */
1182 ITFR_BLUETOOTH_OR_BABY_MONITOR
, /**< bluetooth or baby monitor */
1183 ITFR_VIDEO_CAMERA_OR_PHONE
, /**< video camera or phone */
1184 ITFR_UNIDENTIFIED
/**< interference from unidentified source */
1187 /** structure for interference source report */
1189 uint32 flags
; /**< flags. bit definitions below */
1190 uint32 source
; /**< last detected interference source */
1191 uint32 timestamp
; /**< second timestamp on interferenced flag change */
1192 } interference_source_rep_t
;
1194 #define WLC_CNTRY_BUF_SZ 4 /**< Country string is 3 bytes + NUL */
1196 typedef struct wl_country
{
1197 char country_abbrev
[WLC_CNTRY_BUF_SZ
]; /**< nul-terminated country code used in
1200 int32 rev
; /**< revision specifier for ccode
1201 * on set, -1 indicates unspecified.
1204 char ccode
[WLC_CNTRY_BUF_SZ
]; /**< nul-terminated built-in country code.
1205 * variable length, but fixed size in
1206 * struct allows simple allocation for
1207 * expected country strings <= 3 chars.
1211 #define CCODE_INFO_VERSION 1
1213 typedef enum wl_ccode_role
{
1214 WLC_CCODE_ROLE_ACTIVE
= 0,
1215 WLC_CCODE_ROLE_HOST
,
1216 WLC_CCODE_ROLE_80211D_ASSOC
,
1217 WLC_CCODE_ROLE_80211D_SCAN
,
1218 WLC_CCODE_ROLE_DEFAULT
,
1221 #define WLC_NUM_CCODE_INFO WLC_CCODE_LAST
1223 typedef struct wl_ccode_entry
{
1227 char ccode
[WLC_CNTRY_BUF_SZ
];
1230 typedef struct wl_ccode_info
{
1232 uint16 count
; /**< Number of ccodes entries in the set */
1233 wl_ccode_entry_t ccodelist
[1];
1235 #define WL_CCODE_INFO_FIXED_LEN OFFSETOF(wl_ccode_info_t, ccodelist)
1236 typedef struct wl_channels_in_country
{
1239 char country_abbrev
[WLC_CNTRY_BUF_SZ
];
1242 } wl_channels_in_country_t
;
1244 typedef struct wl_country_list
{
1249 char country_abbrev
[1];
1250 } wl_country_list_t
;
1252 typedef struct wl_rm_req_elt
{
1255 chanspec_t chanspec
;
1256 uint32 token
; /**< token for this measurement */
1257 uint32 tsf_h
; /**< TSF high 32-bits of Measurement start time */
1258 uint32 tsf_l
; /**< TSF low 32-bits */
1259 uint32 dur
; /**< TUs */
1262 typedef struct wl_rm_req
{
1263 uint32 token
; /**< overall measurement set token */
1264 uint32 count
; /**< number of measurement requests */
1265 void *cb
; /**< completion callback function: may be NULL */
1266 void *cb_arg
; /**< arg to completion callback function */
1267 wl_rm_req_elt_t req
[1]; /**< variable length block of requests */
1269 #define WL_RM_REQ_FIXED_LEN OFFSETOF(wl_rm_req_t, req)
1271 typedef struct wl_rm_rep_elt
{
1274 chanspec_t chanspec
;
1275 uint32 token
; /**< token for this measurement */
1276 uint32 tsf_h
; /**< TSF high 32-bits of Measurement start time */
1277 uint32 tsf_l
; /**< TSF low 32-bits */
1278 uint32 dur
; /**< TUs */
1279 uint32 len
; /**< byte length of data block */
1280 uint8 data
[1]; /**< variable length data block */
1282 #define WL_RM_REP_ELT_FIXED_LEN 24 /**< length excluding data block */
1284 #define WL_RPI_REP_BIN_NUM 8
1285 typedef struct wl_rm_rpi_rep
{
1286 uint8 rpi
[WL_RPI_REP_BIN_NUM
];
1287 int8 rpi_max
[WL_RPI_REP_BIN_NUM
];
1290 typedef struct wl_rm_rep
{
1291 uint32 token
; /**< overall measurement set token */
1292 uint32 len
; /**< length of measurement report block */
1293 wl_rm_rep_elt_t rep
[1]; /**< variable length block of reports */
1295 #define WL_RM_REP_FIXED_LEN 8
1298 #define LEAP_USER_MAX 32
1299 #define LEAP_DOMAIN_MAX 32
1300 #define LEAP_PASSWORD_MAX 32
1302 typedef struct wl_leap_info
{
1305 uint8 user
[LEAP_USER_MAX
];
1307 uint8 password
[LEAP_PASSWORD_MAX
];
1309 uint8 domain
[LEAP_DOMAIN_MAX
];
1313 typedef struct wl_leap_list
{
1317 wl_leap_info_t leap_info
[1];
1320 typedef enum sup_auth_status
{
1321 /* Basic supplicant authentication states */
1322 WLC_SUP_DISCONNECTED
= 0,
1325 WLC_SUP_AUTHENTICATING
,
1326 WLC_SUP_AUTHENTICATED
,
1330 WLC_SUP_LAST_BASIC_STATE
,
1332 /* Extended supplicant authentication states */
1333 /** Waiting to receive handshake msg M1 */
1334 WLC_SUP_KEYXCHANGE_WAIT_M1
= WLC_SUP_AUTHENTICATED
,
1335 /** Preparing to send handshake msg M2 */
1336 WLC_SUP_KEYXCHANGE_PREP_M2
= WLC_SUP_KEYXCHANGE
,
1337 /* Waiting to receive handshake msg M3 */
1338 WLC_SUP_KEYXCHANGE_WAIT_M3
= WLC_SUP_LAST_BASIC_STATE
,
1339 WLC_SUP_KEYXCHANGE_PREP_M4
, /**< Preparing to send handshake msg M4 */
1340 WLC_SUP_KEYXCHANGE_WAIT_G1
, /**< Waiting to receive handshake msg G1 */
1341 WLC_SUP_KEYXCHANGE_PREP_G2
/**< Preparing to send handshake msg G2 */
1342 } sup_auth_status_t
;
1344 typedef struct wl_wsec_key
{
1345 uint32 index
; /**< key index */
1346 uint32 len
; /**< key length */
1347 uint8 data
[DOT11_MAX_KEY_SIZE
]; /**< key data */
1349 uint32 algo
; /**< CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
1350 uint32 flags
; /**< misc flags */
1353 int32 iv_initialized
; /**< has IV been initialized already? */
1357 uint32 hi
; /**< upper 32 bits of IV */
1358 uint16 lo
; /**< lower 16 bits of IV */
1362 struct ether_addr ea
; /**< per station */
1366 #define WSEC_MIN_PSK_LEN 8
1367 #define WSEC_MAX_PSK_LEN 64
1369 /** Flag for key material needing passhash'ing */
1370 #define WSEC_PASSPHRASE (1<<0)
1372 /**receptacle for WLC_SET_WSEC_PMK parameter */
1373 typedef struct wsec_pmk
{
1374 ushort key_len
; /**< octets in key material */
1375 ushort flags
; /**< key handling qualification */
1376 uint8 key
[WSEC_MAX_PSK_LEN
]; /**< PMK material */
1379 #define FILS_CACHE_ID_LEN 2
1380 #define PMK_LEN_MAX 48
1382 typedef struct _pmkid_v1
{
1383 struct ether_addr BSSID
;
1384 uint8 PMKID
[WPA2_PMKID_LEN
];
1387 #define PMKID_ELEM_V2_LENGTH (sizeof(struct ether_addr) + WPA2_PMKID_LEN + PMK_LEN_MAX + \
1388 sizeof(ssid_info_t) + FILS_CACHE_ID_LEN)
1390 typedef struct _pmkid_v2
{
1391 uint16 length
; /* Should match PMKID_ELEM_VX_LENGTH */
1392 struct ether_addr BSSID
;
1393 uint8 PMKID
[WPA2_PMKID_LEN
];
1394 uint8 pmk
[PMK_LEN_MAX
]; /* for FILS key deriviation */
1397 uint8 fils_cache_id
[FILS_CACHE_ID_LEN
];
1400 #define PMKID_LIST_VER_2 2
1401 typedef struct _pmkid_list_v1
{
1403 pmkid_v1_t pmkid
[1];
1406 typedef struct _pmkid_list_v2
{
1409 pmkid_v2_t pmkid
[1];
1412 #ifndef PMKID_VERSION_ENABLED
1413 /* pmkid structure before versioning. legacy. DONOT update anymore here */
1414 typedef pmkid_v1_t pmkid_t
;
1415 typedef pmkid_list_v1_t pmkid_list_t
;
1416 #endif /* PMKID_VERSION_ENABLED */
1418 typedef struct _pmkid_cand
{
1419 struct ether_addr BSSID
;
1423 typedef struct _pmkid_cand_list
{
1425 pmkid_cand_t pmkid_cand
[1];
1426 } pmkid_cand_list_t
;
1428 #define WL_STA_ANT_MAX 4 /**< max possible rx antennas */
1430 typedef struct wl_assoc_info
{
1434 struct dot11_assoc_req req
;
1435 struct ether_addr reassoc_bssid
; /**< used in reassoc's */
1436 struct dot11_assoc_resp resp
;
1440 typedef struct wl_led_info
{
1441 uint32 index
; /**< led index */
1447 /** srom read/write struct passed through ioctl */
1449 uint32 byteoff
; /**< byte offset */
1450 uint32 nbytes
; /**< number of bytes */
1454 #define CISH_FLAG_PCIECIS (1 << 15) /**< write CIS format bit for PCIe CIS */
1456 /** similar cis (srom or otp) struct [iovar: may not be aligned] */
1458 uint16 source
; /**< cis source */
1459 uint16 flags
; /**< flags */
1460 uint32 byteoff
; /**< byte offset */
1461 uint32 nbytes
; /**< number of bytes */
1462 /* data follows here */
1465 /** R_REG and W_REG struct passed through ioctl */
1467 uint32 byteoff
; /**< byte offset of the field in d11regs_t */
1468 uint32 val
; /**< read/write value of the field */
1469 uint32 size
; /**< sizeof the field */
1470 uint32 band
; /**< band (optional) */
1474 * Structure used by GET/SET_ATTEN ioctls - it controls power in b/g-band
1475 * PCL - Power Control Loop
1478 uint16 auto_ctrl
; /**< WL_ATTEN_XX */
1479 uint16 bb
; /**< Baseband attenuation */
1480 uint16 radio
; /**< Radio attenuation */
1481 uint16 txctl1
; /**< Radio TX_CTL1 value */
1484 /** Per-AC retry parameters */
1485 struct wme_tx_params_s
{
1487 uint8 short_fallback
;
1489 uint8 long_fallback
;
1490 uint16 max_rate
; /**< In units of 512 Kbps */
1493 typedef struct wme_tx_params_s wme_tx_params_t
;
1495 #define WL_WME_TX_PARAMS_IO_BYTES (sizeof(wme_tx_params_t) * AC_COUNT)
1497 /**Used to get specific link/ac parameters */
1501 struct ether_addr ea
;
1505 #define WL_PM_MUTE_TX_VER 1
1507 typedef struct wl_pm_mute_tx
{
1508 uint16 version
; /**< version */
1509 uint16 len
; /**< length */
1510 uint16 deadline
; /**< deadline timer (in milliseconds) */
1511 uint8 enable
; /**< set to 1 to enable mode; set to 0 to disable it */
1515 /* sta_info_t version 4 */
1517 uint16 ver
; /**< version of this struct */
1518 uint16 len
; /**< length in bytes of this structure */
1519 uint16 cap
; /**< sta's advertised capabilities */
1521 uint32 flags
; /**< flags defined below */
1522 uint32 idle
; /**< time since data pkt rx'd from sta */
1523 struct ether_addr ea
; /**< Station address */
1525 wl_rateset_t rateset
; /**< rateset in use */
1526 uint32 in
; /**< seconds elapsed since associated */
1527 uint32 listen_interval_inms
; /**< Min Listen interval in ms for this STA */
1528 uint32 tx_pkts
; /**< # of user packets transmitted (unicast) */
1529 uint32 tx_failures
; /**< # of user packets failed */
1530 uint32 rx_ucast_pkts
; /**< # of unicast packets received */
1531 uint32 rx_mcast_pkts
; /**< # of multicast packets received */
1532 uint32 tx_rate
; /**< Rate used by last tx frame */
1533 uint32 rx_rate
; /**< Rate of last successful rx frame */
1534 uint32 rx_decrypt_succeeds
; /**< # of packet decrypted successfully */
1535 uint32 rx_decrypt_failures
; /**< # of packet decrypted unsuccessfully */
1536 uint32 tx_tot_pkts
; /**< # of user tx pkts (ucast + mcast) */
1537 uint32 rx_tot_pkts
; /**< # of data packets recvd (uni + mcast) */
1538 uint32 tx_mcast_pkts
; /**< # of mcast pkts txed */
1539 uint64 tx_tot_bytes
; /**< data bytes txed (ucast + mcast) */
1540 uint64 rx_tot_bytes
; /**< data bytes recvd (ucast + mcast) */
1541 uint64 tx_ucast_bytes
; /**< data bytes txed (ucast) */
1542 uint64 tx_mcast_bytes
; /**< # data bytes txed (mcast) */
1543 uint64 rx_ucast_bytes
; /**< data bytes recvd (ucast) */
1544 uint64 rx_mcast_bytes
; /**< data bytes recvd (mcast) */
1545 int8 rssi
[WL_STA_ANT_MAX
]; /**< average rssi per antenna
1548 int8 nf
[WL_STA_ANT_MAX
]; /**< per antenna noise floor */
1549 uint16 aid
; /**< association ID */
1550 uint16 ht_capabilities
; /**< advertised ht caps */
1551 uint16 vht_flags
; /**< converted vht flags */
1553 uint32 tx_pkts_retried
; /**< # of frames where a retry was
1556 uint32 tx_pkts_retry_exhausted
; /**< # of user frames where a retry
1559 int8 rx_lastpkt_rssi
[WL_STA_ANT_MAX
]; /**< Per antenna RSSI of last
1560 * received data frame.
1562 /* TX WLAN retry/failure statistics:
1563 * Separated for host requested frames and WLAN locally generated frames.
1564 * Include unicast frame only where the retries/failures can be counted.
1566 uint32 tx_pkts_total
; /**< # user frames sent successfully */
1567 uint32 tx_pkts_retries
; /**< # user frames retries */
1568 uint32 tx_pkts_fw_total
; /**< # FW generated sent successfully */
1569 uint32 tx_pkts_fw_retries
; /**< # retries for FW generated frames */
1570 uint32 tx_pkts_fw_retry_exhausted
; /**< # FW generated where a retry
1573 uint32 rx_pkts_retried
; /**< # rx with retry bit set */
1574 uint32 tx_rate_fallback
; /**< lowest fallback TX rate */
1575 /* Fields above this line are common to sta_info_t versions 4 and 5 */
1577 uint32 rx_dur_total
; /* total user RX duration (estimated) */
1579 chanspec_t chanspec
; /** chanspec this sta is on */
1581 wl_rateset_args_v1_t rateset_adv
; /* rateset along with mcs index bitmap */
1585 /* Note: Version 4 is the latest version of sta_info_t. Version 5 is abandoned.
1586 * Please add new fields to version 4, not version 5.
1588 /* sta_info_t version 5 */
1590 uint16 ver
; /**< version of this struct */
1591 uint16 len
; /**< length in bytes of this structure */
1592 uint16 cap
; /**< sta's advertised capabilities */
1594 uint32 flags
; /**< flags defined below */
1595 uint32 idle
; /**< time since data pkt rx'd from sta */
1596 struct ether_addr ea
; /**< Station address */
1598 wl_rateset_t rateset
; /**< rateset in use */
1599 uint32 in
; /**< seconds elapsed since associated */
1600 uint32 listen_interval_inms
; /**< Min Listen interval in ms for this STA */
1601 uint32 tx_pkts
; /**< # of user packets transmitted (unicast) */
1602 uint32 tx_failures
; /**< # of user packets failed */
1603 uint32 rx_ucast_pkts
; /**< # of unicast packets received */
1604 uint32 rx_mcast_pkts
; /**< # of multicast packets received */
1605 uint32 tx_rate
; /**< Rate used by last tx frame */
1606 uint32 rx_rate
; /**< Rate of last successful rx frame */
1607 uint32 rx_decrypt_succeeds
; /**< # of packet decrypted successfully */
1608 uint32 rx_decrypt_failures
; /**< # of packet decrypted unsuccessfully */
1609 uint32 tx_tot_pkts
; /**< # of user tx pkts (ucast + mcast) */
1610 uint32 rx_tot_pkts
; /**< # of data packets recvd (uni + mcast) */
1611 uint32 tx_mcast_pkts
; /**< # of mcast pkts txed */
1612 uint64 tx_tot_bytes
; /**< data bytes txed (ucast + mcast) */
1613 uint64 rx_tot_bytes
; /**< data bytes recvd (ucast + mcast) */
1614 uint64 tx_ucast_bytes
; /**< data bytes txed (ucast) */
1615 uint64 tx_mcast_bytes
; /**< # data bytes txed (mcast) */
1616 uint64 rx_ucast_bytes
; /**< data bytes recvd (ucast) */
1617 uint64 rx_mcast_bytes
; /**< data bytes recvd (mcast) */
1618 int8 rssi
[WL_STA_ANT_MAX
]; /**< average rssi per antenna
1621 int8 nf
[WL_STA_ANT_MAX
]; /**< per antenna noise floor */
1622 uint16 aid
; /**< association ID */
1623 uint16 ht_capabilities
; /**< advertised ht caps */
1624 uint16 vht_flags
; /**< converted vht flags */
1626 uint32 tx_pkts_retried
; /**< # of frames where a retry was
1629 uint32 tx_pkts_retry_exhausted
; /**< # of user frames where a retry
1632 int8 rx_lastpkt_rssi
[WL_STA_ANT_MAX
]; /**< Per antenna RSSI of last
1633 * received data frame.
1635 /* TX WLAN retry/failure statistics:
1636 * Separated for host requested frames and WLAN locally generated frames.
1637 * Include unicast frame only where the retries/failures can be counted.
1639 uint32 tx_pkts_total
; /**< # user frames sent successfully */
1640 uint32 tx_pkts_retries
; /**< # user frames retries */
1641 uint32 tx_pkts_fw_total
; /**< # FW generated sent successfully */
1642 uint32 tx_pkts_fw_retries
; /**< # retries for FW generated frames */
1643 uint32 tx_pkts_fw_retry_exhausted
; /**< # FW generated where a retry
1646 uint32 rx_pkts_retried
; /**< # rx with retry bit set */
1647 uint32 tx_rate_fallback
; /**< lowest fallback TX rate */
1648 /* Fields above this line are common to sta_info_t versions 4 and 5 */
1650 chanspec_t chanspec
; /** chanspec this sta is on */
1652 wl_rateset_args_v1_t rateset_adv
; /* rateset along with mcs index bitmap */
1655 /* sta_info_t version 6
1656 changes to wl_rateset_args_t is leading to update this struct version as well.
1659 uint16 ver
; /**< version of this struct */
1660 uint16 len
; /**< length in bytes of this structure */
1661 uint16 cap
; /**< sta's advertised capabilities */
1663 uint32 flags
; /**< flags defined below */
1664 uint32 idle
; /**< time since data pkt rx'd from sta */
1665 struct ether_addr ea
; /**< Station address */
1667 wl_rateset_t rateset
; /**< rateset in use */
1668 uint32 in
; /**< seconds elapsed since associated */
1669 uint32 listen_interval_inms
; /**< Min Listen interval in ms for this STA */
1670 uint32 tx_pkts
; /**< # of user packets transmitted (unicast) */
1671 uint32 tx_failures
; /**< # of user packets failed */
1672 uint32 rx_ucast_pkts
; /**< # of unicast packets received */
1673 uint32 rx_mcast_pkts
; /**< # of multicast packets received */
1674 uint32 tx_rate
; /**< Rate used by last tx frame */
1675 uint32 rx_rate
; /**< Rate of last successful rx frame */
1676 uint32 rx_decrypt_succeeds
; /**< # of packet decrypted successfully */
1677 uint32 rx_decrypt_failures
; /**< # of packet decrypted unsuccessfully */
1678 uint32 tx_tot_pkts
; /**< # of user tx pkts (ucast + mcast) */
1679 uint32 rx_tot_pkts
; /**< # of data packets recvd (uni + mcast) */
1680 uint32 tx_mcast_pkts
; /**< # of mcast pkts txed */
1681 uint64 tx_tot_bytes
; /**< data bytes txed (ucast + mcast) */
1682 uint64 rx_tot_bytes
; /**< data bytes recvd (ucast + mcast) */
1683 uint64 tx_ucast_bytes
; /**< data bytes txed (ucast) */
1684 uint64 tx_mcast_bytes
; /**< # data bytes txed (mcast) */
1685 uint64 rx_ucast_bytes
; /**< data bytes recvd (ucast) */
1686 uint64 rx_mcast_bytes
; /**< data bytes recvd (mcast) */
1687 int8 rssi
[WL_STA_ANT_MAX
]; /**< average rssi per antenna
1690 int8 nf
[WL_STA_ANT_MAX
]; /**< per antenna noise floor */
1691 uint16 aid
; /**< association ID */
1692 uint16 ht_capabilities
; /**< advertised ht caps */
1693 uint16 vht_flags
; /**< converted vht flags */
1695 uint32 tx_pkts_retried
; /**< # of frames where a retry was
1698 uint32 tx_pkts_retry_exhausted
; /**< # of user frames where a retry
1701 int8 rx_lastpkt_rssi
[WL_STA_ANT_MAX
]; /**< Per antenna RSSI of last
1702 * received data frame.
1704 /* TX WLAN retry/failure statistics:
1705 * Separated for host requested frames and WLAN locally generated frames.
1706 * Include unicast frame only where the retries/failures can be counted.
1708 uint32 tx_pkts_total
; /**< # user frames sent successfully */
1709 uint32 tx_pkts_retries
; /**< # user frames retries */
1710 uint32 tx_pkts_fw_total
; /**< # FW generated sent successfully */
1711 uint32 tx_pkts_fw_retries
; /**< # retries for FW generated frames */
1712 uint32 tx_pkts_fw_retry_exhausted
; /**< # FW generated where a retry
1715 uint32 rx_pkts_retried
; /**< # rx with retry bit set */
1716 uint32 tx_rate_fallback
; /**< lowest fallback TX rate */
1717 /* Fields above this line are common to sta_info_t versions 4 and 5 */
1719 uint32 rx_dur_total
; /* total user RX duration (estimated) */
1721 chanspec_t chanspec
; /** chanspec this sta is on */
1723 wl_rateset_args_v2_t rateset_adv
; /* rateset along with mcs index bitmap */
1726 #define WL_OLD_STAINFO_SIZE OFFSETOF(sta_info_t, tx_tot_pkts)
1728 #define WL_STA_VER_4 4
1729 #define WL_STA_VER_5 5
1730 #define WL_STA_VER WL_STA_VER_4
1732 #define SWDIV_STATS_VERSION_2 2
1733 #define SWDIV_STATS_CURRENT_VERSION SWDIV_STATS_VERSION_2
1735 struct wlc_swdiv_stats_v1
{
1739 int32 avg_snr_per_ant0
;
1740 int32 avg_snr_per_ant1
;
1741 int32 avg_snr_per_ant2
;
1742 uint32 swap_ge_rxcount0
;
1743 uint32 swap_ge_rxcount1
;
1744 uint32 swap_ge_snrthresh0
;
1745 uint32 swap_ge_snrthresh1
;
1746 uint32 swap_txfail0
;
1747 uint32 swap_txfail1
;
1750 uint32 swap_alivecheck0
;
1751 uint32 swap_alivecheck1
;
1752 uint32 rxcount_per_ant0
;
1753 uint32 rxcount_per_ant1
;
1755 uint32 acc_rxcount_per_ant0
;
1756 uint32 acc_rxcount_per_ant1
;
1758 uint32 tx_active_ant
;
1762 uint32 swap_snrdrop0
;
1763 uint32 swap_snrdrop1
;
1764 uint32 mws_antsel_ovr_tx
;
1765 uint32 mws_antsel_ovr_rx
;
1766 uint8 swap_trig_event_id
;
1769 struct wlc_swdiv_stats_v2
{
1770 uint16 version
; /* version of the structure
1771 * as defined by SWDIV_STATS_CURRENT_VERSION
1773 uint16 length
; /* length of the entire structure */
1777 int32 avg_snr_per_ant0
;
1778 int32 avg_snr_per_ant1
;
1779 int32 avg_snr_per_ant2
;
1780 uint32 swap_ge_rxcount0
;
1781 uint32 swap_ge_rxcount1
;
1782 uint32 swap_ge_snrthresh0
;
1783 uint32 swap_ge_snrthresh1
;
1784 uint32 swap_txfail0
;
1785 uint32 swap_txfail1
;
1788 uint32 swap_alivecheck0
;
1789 uint32 swap_alivecheck1
;
1790 uint32 rxcount_per_ant0
;
1791 uint32 rxcount_per_ant1
;
1793 uint32 acc_rxcount_per_ant0
;
1794 uint32 acc_rxcount_per_ant1
;
1796 uint32 tx_active_ant
;
1800 uint32 swap_snrdrop0
;
1801 uint32 swap_snrdrop1
;
1802 uint32 mws_antsel_ovr_tx
;
1803 uint32 mws_antsel_ovr_rx
;
1804 uint32 swap_trig_event_id
;
1807 #define WLC_NUMRATES 16 /**< max # of rates in a rateset */
1809 /**Used to get specific STA parameters */
1812 struct ether_addr ea
;
1816 /**Used by iovar versions of some ioctls, i.e. WLC_SCB_AUTHORIZE et al */
1819 scb_val_t ioctl_args
;
1822 /** channel encoding */
1823 typedef struct channel_info
{
1825 int32 target_channel
;
1829 /** For ioctls that take a list of MAC addresses */
1830 typedef struct maclist
{
1831 uint32 count
; /**< number of MAC addresses */
1832 struct ether_addr ea
[1]; /**< variable length array of MAC addresses */
1835 typedef struct wds_client_info
{
1836 char ifname
[INTF_NAME_SIZ
]; /* WDS ifname */
1837 struct ether_addr ea
; /* WDS client MAC address */
1838 } wds_client_info_t
;
1840 #define WDS_MACLIST_MAGIC 0xFFFFFFFF
1841 #define WDS_MACLIST_VERSION 1
1843 /* For wds MAC list ioctls */
1844 typedef struct wds_maclist
{
1845 uint32 count
; /* Number of WDS clients */
1846 uint32 magic
; /* Magic number */
1847 uint32 version
; /* Version number */
1848 struct wds_client_info client_list
[1]; /* Variable length array of WDS clients */
1851 /**get pkt count struct passed through ioctl */
1852 typedef struct get_pktcnt
{
1857 uint32 rx_ocast_good_pkt
; /**< unicast packets destined for others */
1861 #define LQ_IDX_MIN 0
1862 #define LQ_IDX_MAX 1
1863 #define LQ_IDX_AVG 2
1864 #define LQ_IDX_SUM 2
1865 #define LQ_IDX_LAST 3
1866 #define LQ_STOP_MONITOR 0
1867 #define LQ_START_MONITOR 1
1869 /** Get averages RSSI, Rx PHY rate and SNR values */
1872 int32 rssi
[LQ_IDX_LAST
]; /**< Array to keep min, max, avg rssi */
1873 int32 snr
[LQ_IDX_LAST
]; /**< Array to keep min, max, avg snr */
1874 int32 isvalid
; /**< Flag indicating whether above data is valid */
1877 typedef enum wl_wakeup_reason_type
{
1886 /** Unique filter id */
1888 /** stores the reason for the last wake up */
1893 /** Get MAC specific rate histogram command */
1895 struct ether_addr ea
; /**< MAC Address */
1896 uint8 ac_cat
; /**< Access Category */
1897 uint8 num_pkts
; /**< Number of packet entries to be averaged */
1898 } wl_mac_ratehisto_cmd_t
;
1899 /** Get MAC rate histogram response */
1901 uint32 rate
[DOT11_RATE_MAX
+ 1]; /**< Rates */
1902 uint32 mcs
[WL_RATESET_SZ_HT_IOCTL
* WL_TX_CHAINS_MAX
]; /**< MCS counts */
1903 uint32 vht
[WL_RATESET_SZ_VHT_MCS
][WL_TX_CHAINS_MAX
]; /**< VHT counts */
1904 uint32 tsf_timer
[2][2]; /**< Start and End time for 8bytes value */
1905 uint32 prop11n_mcs
[WLC_11N_LAST_PROP_MCS
- WLC_11N_FIRST_PROP_MCS
+ 1]; /** MCS counts */
1906 } wl_mac_ratehisto_res_t
;
1908 /* sta_info ecounters */
1910 struct ether_addr ea
; /* Station MAC addr */
1911 struct ether_addr BSSID
; /* BSSID of the BSS */
1912 uint32 tx_pkts_fw_total
; /* # FW generated sent successfully */
1913 uint32 tx_pkts_fw_retries
; /* # retries for FW generated frames */
1914 uint32 tx_pkts_fw_retry_exhausted
; /* # FW generated which
1915 * failed after retry
1917 } sta_info_ecounters_t
;
1919 #define STAMON_MODULE_VER 1
1921 /**Linux network driver ioctl encoding */
1922 typedef struct wl_ioctl
{
1923 uint32 cmd
; /**< common ioctl definition */
1924 void *buf
; /**< pointer to user buffer */
1925 uint32 len
; /**< length of user buffer */
1926 uint8 set
; /**< 1=set IOCTL; 0=query IOCTL */
1927 uint32 used
; /**< bytes read or written (optional) */
1928 uint32 needed
; /**< bytes needed (optional) */
1931 #ifdef CONFIG_COMPAT
1932 typedef struct compat_wl_ioctl
{
1933 uint32 cmd
; /**< common ioctl definition */
1934 uint32 buf
; /**< pointer to user buffer */
1935 uint32 len
; /**< length of user buffer */
1936 uint8 set
; /**< 1=set IOCTL; 0=query IOCTL */
1937 uint32 used
; /**< bytes read or written (optional) */
1938 uint32 needed
; /**< bytes needed (optional) */
1939 } compat_wl_ioctl_t
;
1940 #endif /* CONFIG_COMPAT */
1942 #define WL_NUM_RATES_CCK 4 /**< 1, 2, 5.5, 11 Mbps */
1943 #define WL_NUM_RATES_OFDM 8 /**< 6, 9, 12, 18, 24, 36, 48, 54 Mbps SISO/CDD */
1944 #define WL_NUM_RATES_MCS_1STREAM 8 /**< MCS 0-7 1-stream rates - SISO/CDD/STBC/MCS */
1945 #define WL_NUM_RATES_EXTRA_VHT 2 /**< Additional VHT 11AC rates */
1946 #define WL_NUM_RATES_VHT 10
1947 #define WL_NUM_RATES_MCS32 1
1950 * Structure for passing hardware and software
1951 * revision info up from the driver.
1953 typedef struct wlc_rev_info
{
1954 uint32 vendorid
; /**< PCI vendor id */
1955 uint32 deviceid
; /**< device id of chip */
1956 uint32 radiorev
; /**< radio revision */
1957 uint32 chiprev
; /**< chip revision */
1958 uint32 corerev
; /**< core revision */
1959 uint32 boardid
; /**< board identifier (usu. PCI sub-device id) */
1960 uint32 boardvendor
; /**< board vendor (usu. PCI sub-vendor id) */
1961 uint32 boardrev
; /**< board revision */
1962 uint32 driverrev
; /**< driver version */
1963 uint32 ucoderev
; /**< microcode version */
1964 uint32 bus
; /**< bus type */
1965 uint32 chipnum
; /**< chip number */
1966 uint32 phytype
; /**< phy type */
1967 uint32 phyrev
; /**< phy revision */
1968 uint32 anarev
; /**< anacore rev */
1969 uint32 chippkg
; /**< chip package info */
1970 uint32 nvramrev
; /**< nvram revision number */
1971 uint32 phyminorrev
; /**< phy minor rev */
1972 uint32 coreminorrev
; /**< core minor rev */
1973 uint32 drvrev_major
; /**< driver version: major */
1974 uint32 drvrev_minor
; /**< driver version: minor */
1975 uint32 drvrev_rc
; /**< driver version: rc */
1976 uint32 drvrev_rc_inc
; /**< driver version: rc incremental */
1979 #define WL_REV_INFO_LEGACY_LENGTH 48
1981 #define WL_BRAND_MAX 10
1982 typedef struct wl_instance_info
{
1984 int8 brand
[WL_BRAND_MAX
];
1985 int8 PAD
[4-(WL_BRAND_MAX
%4)];
1986 } wl_instance_info_t
;
1988 /** structure to change size of tx fifo */
1989 typedef struct wl_txfifo_sz
{
1995 /* Transfer info about an IOVar from the driver */
1996 /**Max supported IOV name size in bytes, + 1 for nul termination */
1997 #define WLC_IOV_NAME_LEN (32 + 1)
1999 typedef struct wlc_iov_trx_s
{
2002 char name
[WLC_IOV_NAME_LEN
];
2005 /** bump this number if you change the ioctl interface */
2006 #define WLC_IOCTL_VERSION 2
2007 #define WLC_IOCTL_VERSION_LEGACY_IOTYPES 1
2009 typedef struct _wl_assoc_result
{
2013 } wl_assoc_result_t
;
2016 #define WL_PHY_PAVARS_LEN 32 /**< Phytype, Bandrange, chain, a[0], b[0], c[0], d[0] .. */
2018 #define WL_PHY_PAVAR_VER 1 /**< pavars version */
2019 #define WL_PHY_PAVARS2_NUM 3 /**< a1, b0, b1 */
2020 typedef struct wl_pavars2
{
2021 uint16 ver
; /**< version of this struct */
2022 uint16 len
; /**< len of this structure */
2023 uint16 inuse
; /**< driver return 1 for a1,b0,b1 in current band range */
2024 uint16 phy_type
; /**< phy type */
2027 uint16 inpa
[WL_PHY_PAVARS2_NUM
]; /**< phy pavars for one band range */
2030 typedef struct wl_po
{
2031 uint16 phy_type
; /**< Phy type */
2039 #define WL_NUM_RPCALVARS 5 /**< number of rpcal vars */
2041 typedef struct wl_rpcal
{
2046 #define WL_NUM_RPCALPHASEVARS 5 /* number of rpcal phase vars */
2048 typedef struct wl_rpcal_phase
{
2053 typedef struct wl_aci_args
{
2054 int32 enter_aci_thresh
; /* Trigger level to start detecting ACI */
2055 int32 exit_aci_thresh
; /* Trigger level to exit ACI mode */
2056 int32 usec_spin
; /* microsecs to delay between rssi samples */
2057 int32 glitch_delay
; /* interval between ACI scans when glitch count is consistently high */
2058 uint16 nphy_adcpwr_enter_thresh
; /**< ADC power to enter ACI mitigation mode */
2059 uint16 nphy_adcpwr_exit_thresh
; /**< ADC power to exit ACI mitigation mode */
2060 uint16 nphy_repeat_ctr
; /**< Number of tries per channel to compute power */
2061 uint16 nphy_num_samples
; /**< Number of samples to compute power on one channel */
2062 uint16 nphy_undetect_window_sz
; /**< num of undetects to exit ACI Mitigation mode */
2063 uint16 nphy_b_energy_lo_aci
; /**< low ACI power energy threshold for bphy */
2064 uint16 nphy_b_energy_md_aci
; /**< mid ACI power energy threshold for bphy */
2065 uint16 nphy_b_energy_hi_aci
; /**< high ACI power energy threshold for bphy */
2066 uint16 nphy_noise_noassoc_glitch_th_up
; /**< wl interference 4 */
2067 uint16 nphy_noise_noassoc_glitch_th_dn
;
2068 uint16 nphy_noise_assoc_glitch_th_up
;
2069 uint16 nphy_noise_assoc_glitch_th_dn
;
2070 uint16 nphy_noise_assoc_aci_glitch_th_up
;
2071 uint16 nphy_noise_assoc_aci_glitch_th_dn
;
2072 uint16 nphy_noise_assoc_enter_th
;
2073 uint16 nphy_noise_noassoc_enter_th
;
2074 uint16 nphy_noise_assoc_rx_glitch_badplcp_enter_th
;
2075 uint16 nphy_noise_noassoc_crsidx_incr
;
2076 uint16 nphy_noise_assoc_crsidx_incr
;
2077 uint16 nphy_noise_crsidx_decr
;
2080 #define WL_ACI_ARGS_LEGACY_LENGTH 16 /**< bytes of pre NPHY aci args */
2081 #define WL_SAMPLECOLLECT_T_VERSION 2 /**< version of wl_samplecollect_args_t struct */
2082 typedef struct wl_samplecollect_args
{
2083 /* version 0 fields */
2087 /* add'l version 1 fields */
2088 uint16 version
; /**< see definition of WL_SAMPLECOLLECT_T_VERSION */
2089 uint16 length
; /**< length of entire structure */
2100 uint8 agc
; /**< loop from init gain and going down */
2101 uint8 filter
; /**< override high pass corners to lowest */
2102 /* add'l version 2 fields */
2103 uint8 trigger_state
;
2110 uint8 gpio_collection
;
2112 } wl_samplecollect_args_t
;
2114 #define WL_SAMPLEDATA_T_VERSION 1 /**< version of wl_samplecollect_args_t struct */
2115 /* version for unpacked sample data, int16 {(I,Q),Core(0..N)} */
2116 #define WL_SAMPLEDATA_T_VERSION_SPEC_AN 2
2118 typedef struct wl_sampledata
{
2119 uint16 version
; /**< structure version */
2120 uint16 size
; /**< size of structure */
2121 uint16 tag
; /**< Header/Data */
2122 uint16 length
; /**< data length */
2123 uint32 flag
; /**< bit def */
2127 /* OTA Test Status */
2129 WL_OTA_TEST_IDLE
= 0, /**< Default Idle state */
2130 WL_OTA_TEST_ACTIVE
= 1, /**< Test Running */
2131 WL_OTA_TEST_SUCCESS
= 2, /**< Successfully Finished Test */
2132 WL_OTA_TEST_FAIL
= 3 /**< Test Failed in the Middle */
2135 /* OTA SYNC Status */
2137 WL_OTA_SYNC_IDLE
= 0, /**< Idle state */
2138 WL_OTA_SYNC_ACTIVE
= 1, /**< Waiting for Sync */
2139 WL_OTA_SYNC_FAIL
= 2 /**< Sync pkt not recieved */
2142 /* Various error states dut can get stuck during test */
2144 WL_OTA_SKIP_TEST_CAL_FAIL
= 1, /**< Phy calibration failed */
2145 WL_OTA_SKIP_TEST_SYNCH_FAIL
= 2, /**< Sync Packet not recieved */
2146 WL_OTA_SKIP_TEST_FILE_DWNLD_FAIL
= 3, /**< Cmd flow file download failed */
2147 WL_OTA_SKIP_TEST_NO_TEST_FOUND
= 4, /**< No test found in Flow file */
2148 WL_OTA_SKIP_TEST_WL_NOT_UP
= 5, /**< WL UP failed */
2149 WL_OTA_SKIP_TEST_UNKNOWN_CALL
/**< Unintentional scheduling on ota test */
2152 /* Differentiator for ota_tx and ota_rx */
2154 WL_OTA_TEST_TX
= 0, /**< ota_tx */
2155 WL_OTA_TEST_RX
= 1, /**< ota_rx */
2158 /* Catch 3 modes of operation: 20Mhz, 40Mhz, 20 in 40 Mhz */
2160 WL_OTA_TEST_BW_20_IN_40MHZ
= 0, /**< 20 in 40 operation */
2161 WL_OTA_TEST_BW_20MHZ
= 1, /**< 20 Mhz operation */
2162 WL_OTA_TEST_BW_40MHZ
= 2, /**< full 40Mhz operation */
2163 WL_OTA_TEST_BW_80MHZ
= 3 /* full 80Mhz operation */
2165 #define HT_MCS_INUSE 0x00000080 /* HT MCS in use,indicates b0-6 holds an mcs */
2166 #define VHT_MCS_INUSE 0x00000100 /* VHT MCS in use,indicates b0-6 holds an mcs */
2167 #define OTA_RATE_MASK 0x0000007f /* rate/mcs value */
2168 #define OTA_STF_SISO 0
2169 #define OTA_STF_CDD 1
2170 #define OTA_STF_STBC 2
2171 #define OTA_STF_SDM 3
2173 typedef struct ota_rate_info
{
2174 uint8 rate_cnt
; /**< Total number of rates */
2176 uint16 rate_val_mbps
[WL_OTA_TEST_MAX_NUM_RATE
]; /**< array of rates from 1mbps to 130mbps */
2177 /**< for legacy rates : ratein mbps * 2 */
2178 /**< for HT rates : mcs index */
2181 typedef struct ota_power_info
{
2182 int8 pwr_ctrl_on
; /**< power control on/off */
2183 int8 start_pwr
; /**< starting power/index */
2184 int8 delta_pwr
; /**< delta power/index */
2185 int8 end_pwr
; /**< end power/index */
2188 typedef struct ota_packetengine
{
2189 uint16 delay
; /**< Inter-packet delay */
2190 /**< for ota_tx, delay is tx ifs in micro seconds */
2191 /* for ota_rx, delay is wait time in milliseconds */
2192 uint16 nframes
; /**< Number of frames */
2193 uint16 length
; /**< Packet length */
2194 } ota_packetengine_t
;
2197 * OTA txant/rxant parameter
2198 * bit7-4: 4 bits swdiv_tx/rx_policy bitmask, specify antenna-policy for SW diversity
2199 * bit3-0: 4 bits TxCore bitmask, specify cores used for transmit frames
2200 * (maximum spatial expansion)
2202 #define WL_OTA_TEST_ANT_MASK 0xF0
2203 #define WL_OTA_TEST_CORE_MASK 0x0F
2205 /* OTA txant/rxant 'ant_mask' field; map to Tx/Rx antenna policy for SW diversity */
2207 WL_OTA_TEST_FORCE_ANT0
= 0x10, /* force antenna to Ant 0 */
2208 WL_OTA_TEST_FORCE_ANT1
= 0x20, /* force antenna to Ant 1 */
2211 /* antenna/core fields access */
2212 #define WL_OTA_TEST_GET_ANT(_txant) ((_txant) & WL_OTA_TEST_ANT_MASK)
2213 #define WL_OTA_TEST_GET_CORE(_txant) ((_txant) & WL_OTA_TEST_CORE_MASK)
2215 /** Test info vector */
2216 typedef struct wl_ota_test_args
{
2217 uint8 cur_test
; /**< test phase */
2218 uint8 chan
; /**< channel */
2219 uint8 bw
; /**< bandwidth */
2220 uint8 control_band
; /**< control band */
2221 uint8 stf_mode
; /**< stf mode */
2223 ota_rate_info_t rt_info
; /**< Rate info */
2224 ota_packetengine_t pkteng
; /**< packeteng info */
2225 uint8 txant
; /**< tx antenna */
2226 uint8 rxant
; /**< rx antenna */
2227 ota_power_info_t pwr_info
; /**< power sweep info */
2228 uint8 wait_for_sync
; /**< wait for sync or not */
2232 /* Update WL_OTA_TESTVEC_T_VERSION for adding new members to this structure */
2233 } wl_ota_test_args_t
;
2235 #define WL_OTA_TESTVEC_T_VERSION 1 /* version of wl_ota_test_vector_t struct */
2236 typedef struct wl_ota_test_vector
{
2238 wl_ota_test_args_t test_arg
[WL_OTA_TEST_MAX_NUM_SEQ
]; /**< Test argument struct */
2239 uint16 test_cnt
; /**< Total no of test */
2240 uint8 file_dwnld_valid
; /**< File successfully downloaded */
2241 uint8 sync_timeout
; /**< sync packet timeout */
2242 int8 sync_fail_action
; /**< sync fail action */
2243 struct ether_addr sync_mac
; /**< macaddress for sync pkt */
2244 struct ether_addr tx_mac
; /**< macaddress for tx */
2245 struct ether_addr rx_mac
; /**< macaddress for rx */
2246 int8 loop_test
; /**< dbg feature to loop the test */
2248 /* Update WL_OTA_TESTVEC_T_VERSION for adding new members to this structure */
2249 } wl_ota_test_vector_t
;
2251 /** struct copied back form dongle to host to query the status */
2252 typedef struct wl_ota_test_status
{
2253 int16 cur_test_cnt
; /**< test phase */
2254 int8 skip_test_reason
; /**< skip test reasoin */
2256 wl_ota_test_args_t test_arg
; /**< cur test arg details */
2257 uint16 test_cnt
; /**< total no of test downloaded */
2258 uint8 file_dwnld_valid
; /**< file successfully downloaded ? */
2259 uint8 sync_timeout
; /**< sync timeout */
2260 int8 sync_fail_action
; /**< sync fail action */
2261 struct ether_addr sync_mac
; /**< macaddress for sync pkt */
2262 struct ether_addr tx_mac
; /**< tx mac address */
2263 struct ether_addr rx_mac
; /**< rx mac address */
2264 uint8 test_stage
; /**< check the test status */
2265 int8 loop_test
; /**< Debug feature to puts test enfine in a loop */
2266 uint8 sync_status
; /**< sync status */
2267 } wl_ota_test_status_t
;
2269 /* FOR ioctl that take the sta monitor information */
2270 typedef struct stamon_data
{
2271 struct ether_addr ea
;
2276 typedef struct stamon_info
{
2279 stamon_data_t sta_data
[1];
2282 typedef struct wl_ota_rx_rssi
{
2283 uint16 pktcnt
; /* Pkt count used for this rx test */
2284 chanspec_t chanspec
; /* Channel info on which the packets are received */
2285 int16 rssi
; /* Average RSSI of the first 50% packets received */
2288 #define WL_OTARSSI_T_VERSION 1 /* version of wl_ota_test_rssi_t struct */
2289 #define WL_OTA_TEST_RSSI_FIXED_SIZE OFFSETOF(wl_ota_test_rssi_t, rx_rssi)
2291 typedef struct wl_ota_test_rssi
{
2293 uint8 testcnt
; /* total measured RSSI values, valid on output only */
2294 wl_ota_rx_rssi_t rx_rssi
[1]; /* Variable length array of wl_ota_rx_rssi_t */
2295 } wl_ota_test_rssi_t
;
2299 /**wl_radar_args_t */
2301 int32 npulses
; /**< required number of pulses at n * t_int */
2302 int32 ncontig
; /**< required number of pulses at t_int */
2303 int32 min_pw
; /**< minimum pulse width (20 MHz clocks) */
2304 int32 max_pw
; /**< maximum pulse width (20 MHz clocks) */
2305 uint16 thresh0
; /**< Radar detection, thresh 0 */
2306 uint16 thresh1
; /**< Radar detection, thresh 1 */
2307 uint16 blank
; /**< Radar detection, blank control */
2308 uint16 fmdemodcfg
; /**< Radar detection, fmdemod config */
2309 int32 npulses_lp
; /**< Radar detection, minimum long pulses */
2310 int32 min_pw_lp
; /**< Minimum pulsewidth for long pulses */
2311 int32 max_pw_lp
; /**< Maximum pulsewidth for long pulses */
2312 int32 min_fm_lp
; /**< Minimum fm for long pulses */
2313 int32 max_span_lp
; /**< Maximum deltat for long pulses */
2314 int32 min_deltat
; /**< Minimum spacing between pulses */
2315 int32 max_deltat
; /**< Maximum spacing between pulses */
2316 uint16 autocorr
; /**< Radar detection, autocorr on or off */
2317 uint16 st_level_time
; /**< Radar detection, start_timing level */
2318 uint16 t2_min
; /**< minimum clocks needed to remain in state 2 */
2320 uint32 version
; /**< version */
2321 uint32 fra_pulse_err
; /**< sample error margin for detecting French radar pulsed */
2322 int32 npulses_fra
; /**< Radar detection, minimum French pulses set */
2323 int32 npulses_stg2
; /**< Radar detection, minimum staggered-2 pulses set */
2324 int32 npulses_stg3
; /**< Radar detection, minimum staggered-3 pulses set */
2325 uint16 percal_mask
; /**< defines which period cal is masked from radar detection */
2327 int32 quant
; /**< quantization resolution to pulse positions */
2328 uint32 min_burst_intv_lp
; /**< minimum burst to burst interval for bin3 radar */
2329 uint32 max_burst_intv_lp
; /**< maximum burst to burst interval for bin3 radar */
2330 int32 nskip_rst_lp
; /**< number of skipped pulses before resetting lp buffer */
2331 int32 max_pw_tol
; /* maximum tolerance allowd in detected pulse width for radar detection */
2332 uint16 feature_mask
; /**< 16-bit mask to specify enabled features */
2333 uint16 thresh0_sc
; /**< Radar detection, thresh 0 */
2334 uint16 thresh1_sc
; /**< Radar detection, thresh 1 */
2338 #define WL_RADAR_ARGS_VERSION 2
2341 uint32 version
; /**< version */
2342 uint16 thresh0_20_lo
; /**< Radar detection, thresh 0 (range 5250-5350MHz) for BW 20MHz */
2343 uint16 thresh1_20_lo
; /**< Radar detection, thresh 1 (range 5250-5350MHz) for BW 20MHz */
2344 uint16 thresh0_40_lo
; /**< Radar detection, thresh 0 (range 5250-5350MHz) for BW 40MHz */
2345 uint16 thresh1_40_lo
; /**< Radar detection, thresh 1 (range 5250-5350MHz) for BW 40MHz */
2346 uint16 thresh0_80_lo
; /**< Radar detection, thresh 0 (range 5250-5350MHz) for BW 80MHz */
2347 uint16 thresh1_80_lo
; /**< Radar detection, thresh 1 (range 5250-5350MHz) for BW 80MHz */
2348 uint16 thresh0_20_hi
; /**< Radar detection, thresh 0 (range 5470-5725MHz) for BW 20MHz */
2349 uint16 thresh1_20_hi
; /**< Radar detection, thresh 1 (range 5470-5725MHz) for BW 20MHz */
2350 uint16 thresh0_40_hi
; /**< Radar detection, thresh 0 (range 5470-5725MHz) for BW 40MHz */
2351 uint16 thresh1_40_hi
; /**< Radar detection, thresh 1 (range 5470-5725MHz) for BW 40MHz */
2352 uint16 thresh0_80_hi
; /**< Radar detection, thresh 0 (range 5470-5725MHz) for BW 80MHz */
2353 uint16 thresh1_80_hi
; /**< Radar detection, thresh 1 (range 5470-5725MHz) for BW 80MHz */
2354 uint16 thresh0_160_lo
; /**< Radar detection, thresh 0 (range 5250-5350MHz) for BW 160MHz */
2355 uint16 thresh1_160_lo
; /**< Radar detection, thresh 1 (range 5250-5350MHz) for BW 160MHz */
2356 uint16 thresh0_160_hi
; /**< Radar detection, thresh 0 (range 5470-5725MHz) for BW 160MHz */
2357 uint16 thresh1_160_hi
; /**< Radar detection, thresh 1 (range 5470-5725MHz) for BW 160MHz */
2361 uint32 version
; /* version */
2362 uint16 thresh0_sc_20_lo
;
2363 uint16 thresh1_sc_20_lo
;
2364 uint16 thresh0_sc_40_lo
;
2365 uint16 thresh1_sc_40_lo
;
2366 uint16 thresh0_sc_80_lo
;
2367 uint16 thresh1_sc_80_lo
;
2368 uint16 thresh0_sc_20_hi
;
2369 uint16 thresh1_sc_20_hi
;
2370 uint16 thresh0_sc_40_hi
;
2371 uint16 thresh1_sc_40_hi
;
2372 uint16 thresh0_sc_80_hi
;
2373 uint16 thresh1_sc_80_hi
;
2375 uint16 fc_varth_bin5_sb
;
2376 uint16 notradar_enb
;
2377 uint16 max_notradar_lp
;
2378 uint16 max_notradar
;
2379 uint16 max_notradar_lp_sc
;
2380 uint16 max_notradar_sc
;
2381 uint16 highpow_war_enb
;
2382 uint16 highpow_sp_ratio
; //unit is 0.5
2385 #define WL_RADAR_THR_VERSION 2
2391 uint8 rssi_gain_80
[4];
2392 uint8 rssi_gain_160
[4];
2393 } wl_dyn_switch_th_t
;
2395 #define WL_PHY_DYN_SWITCH_TH_VERSION 1
2397 /** RSSI per antenna */
2399 uint32 version
; /**< version field */
2400 uint32 count
; /**< number of valid antenna rssi */
2401 int8 rssi_ant
[WL_RSSI_ANT_MAX
]; /**< rssi per antenna */
2402 int8 rssi_sum
; /**< summed rssi across all antennas */
2406 /* SNR per antenna */
2408 uint32 version
; /* version field */
2409 uint32 count
; /* number of valid antenna snr */
2410 int8 snr_ant
[WL_RSSI_ANT_MAX
]; /* snr per antenna */
2413 /** data structure used in 'dfs_status' wl interface, which is used to query dfs status */
2415 uint32 state
; /**< noted by WL_DFS_CACSTATE_XX. */
2416 uint32 duration
; /**< time spent in ms in state. */
2418 * as dfs enters ISM state, it removes the operational channel from quiet channel
2419 * list and notes the channel in channel_cleared. set to 0 if no channel is cleared
2421 chanspec_t chanspec_cleared
;
2422 /** chanspec cleared used to be a uint32, add another to uint16 to maintain size */
2427 uint32 state
; /* noted by WL_DFS_CACSTATE_XX */
2428 uint32 duration
; /* time spent in ms in state */
2429 chanspec_t chanspec
; /* chanspec of this core */
2430 chanspec_t chanspec_last_cleared
; /* chanspec last cleared for operation by scanning */
2431 uint16 sub_type
; /* currently just the index of the core or the respective PLL */
2433 } wl_dfs_sub_status_t
;
2435 #define WL_DFS_STATUS_ALL_VERSION (1)
2437 uint16 version
; /* version field; current max version 1 */
2438 uint16 num_sub_status
;
2439 wl_dfs_sub_status_t dfs_sub_status
[1]; /* struct array of length num_sub_status */
2440 } wl_dfs_status_all_t
;
2442 #define WL_DFS_AP_MOVE_VERSION (1)
2444 struct wl_dfs_ap_move_status_v1
{
2445 int16 dfs_status
; /* DFS scan status */
2446 chanspec_t chanspec
; /* New AP Chanspec */
2447 wl_dfs_status_t cac_status
; /* CAC status */
2450 typedef struct wl_dfs_ap_move_status_v2
{
2451 int8 version
; /* version field; current max version 1 */
2452 int8 move_status
; /* DFS move status */
2453 chanspec_t chanspec
; /* New AP Chanspec */
2454 wl_dfs_status_all_t scan_status
; /* status; see dfs_status_all for wl_dfs_status_all_t */
2455 } wl_dfs_ap_move_status_v2_t
;
2457 #define WL_DFS_AP_MOVE_ABORT -1 /* Abort any dfs_ap_move in progress immediately */
2458 #define WL_DFS_AP_MOVE_STUNT -2 /* Stunt move but continue background CSA if in progress */
2460 /** data structure used in 'radar_status' wl interface, which is use to query radar det status */
2470 int32 lp_csect_single
;
2471 int32 detected_pulse_index
;
2472 int32 nconsecq_pulses
;
2478 } wl_radar_status_t
;
2480 #define NUM_PWRCTRL_RATES 12
2483 uint8 txpwr_band_max
[NUM_PWRCTRL_RATES
]; /**< User set target */
2484 uint8 txpwr_limit
[NUM_PWRCTRL_RATES
]; /**< reg and local power limit */
2485 uint8 txpwr_local_max
; /**< local max according to the AP */
2486 uint8 txpwr_local_constraint
; /**< local constraint according to the AP */
2487 uint8 txpwr_chan_reg_max
; /**< Regulatory max for this channel */
2488 uint8 txpwr_target
[2][NUM_PWRCTRL_RATES
]; /**< Latest target for 2.4 and 5 Ghz */
2489 uint8 txpwr_est_Pout
[2]; /**< Latest estimate for 2.4 and 5 Ghz */
2490 uint8 txpwr_opo
[NUM_PWRCTRL_RATES
]; /**< On G phy, OFDM power offset */
2491 uint8 txpwr_bphy_cck_max
[NUM_PWRCTRL_RATES
]; /**< Max CCK power for this band (SROM) */
2492 uint8 txpwr_bphy_ofdm_max
; /**< Max OFDM power for this band (SROM) */
2493 uint8 txpwr_aphy_max
[NUM_PWRCTRL_RATES
]; /**< Max power for A band (SROM) */
2494 int8 txpwr_antgain
[2]; /**< Ant gain for each band - from SROM */
2495 uint8 txpwr_est_Pout_gofdm
; /**< Pwr estimate for 2.4 OFDM */
2496 } tx_power_legacy_t
;
2498 #define WL_TX_POWER_RATES_LEGACY 45
2499 #define WL_TX_POWER_MCS20_FIRST 12
2500 #define WL_TX_POWER_MCS20_NUM 16
2501 #define WL_TX_POWER_MCS40_FIRST 28
2502 #define WL_TX_POWER_MCS40_NUM 17
2506 chanspec_t chanspec
; /**< txpwr report for this channel */
2507 chanspec_t local_chanspec
; /**< channel on which we are associated */
2508 uint8 local_max
; /**< local max according to the AP */
2509 uint8 local_constraint
; /**< local constraint according to the AP */
2510 int8 antgain
[2]; /**< Ant gain for each band - from SROM */
2511 uint8 rf_cores
; /**< count of RF Cores being reported */
2512 uint8 est_Pout
[4]; /**< Latest tx power out estimate per RF
2513 * chain without adjustment
2515 uint8 est_Pout_cck
; /**< Latest CCK tx power out estimate */
2516 uint8 user_limit
[WL_TX_POWER_RATES_LEGACY
]; /**< User limit */
2517 uint8 reg_limit
[WL_TX_POWER_RATES_LEGACY
]; /**< Regulatory power limit */
2518 uint8 board_limit
[WL_TX_POWER_RATES_LEGACY
]; /**< Max power board can support (SROM) */
2519 uint8 target
[WL_TX_POWER_RATES_LEGACY
]; /**< Latest target power */
2521 } tx_power_legacy2_t
;
2523 #define WL_NUM_2x2_ELEMENTS 4
2524 #define WL_NUM_3x3_ELEMENTS 6
2525 #define WL_NUM_4x4_ELEMENTS 10
2528 uint16 ver
; /**< version of this struct */
2529 uint16 len
; /**< length in bytes of this structure */
2531 chanspec_t chanspec
; /**< txpwr report for this channel */
2532 chanspec_t local_chanspec
; /**< channel on which we are associated */
2533 uint32 buflen
; /**< ppr buffer length */
2534 uint8 pprbuf
[1]; /**< Latest target power buffer */
2537 #define WL_TXPPR_VERSION 1
2538 #define WL_TXPPR_LENGTH (sizeof(wl_txppr_t))
2539 #define TX_POWER_T_VERSION 45
2540 /** number of ppr serialization buffers, it should be reg, board and target */
2541 #define WL_TXPPR_SER_BUF_NUM (3)
2542 /* curpower ppr types */
2544 PPRTYPE_TARGETPOWER
= 1,
2545 PPRTYPE_BOARDLIMITS
= 2,
2546 PPRTYPE_REGLIMITS
= 3
2549 typedef struct chanspec_txpwr_max
{
2550 chanspec_t chanspec
; /**< chanspec */
2551 uint8 txpwr_max
; /**< max txpwr in all the rates */
2553 } chanspec_txpwr_max_t
;
2555 typedef struct wl_chanspec_txpwr_max
{
2556 uint16 ver
; /**< version of this struct */
2557 uint16 len
; /**< length in bytes of this structure */
2558 uint32 count
; /**< number of elements of (chanspec, txpwr_max) pair */
2559 chanspec_txpwr_max_t txpwr
[1]; /**< array of (chanspec, max_txpwr) pair */
2560 } wl_chanspec_txpwr_max_t
;
2562 #define WL_CHANSPEC_TXPWR_MAX_VER 1
2563 #define WL_CHANSPEC_TXPWR_MAX_LEN (sizeof(wl_chanspec_txpwr_max_t))
2565 typedef struct tx_inst_power
{
2566 uint8 txpwr_est_Pout
[2]; /**< Latest estimate for 2.4 and 5 Ghz */
2567 uint8 txpwr_est_Pout_gofdm
; /**< Pwr estimate for 2.4 OFDM */
2570 #define WL_NUM_TXCHAIN_MAX 4
2571 typedef struct wl_txchain_pwr_offsets
{
2572 int8 offset
[WL_NUM_TXCHAIN_MAX
]; /**< quarter dBm signed offset for each chain */
2573 } wl_txchain_pwr_offsets_t
;
2575 /** maximum channels returned by the get valid channels iovar */
2576 #define WL_NUMCHANNELS 64
2577 #define WL_NUMCHANNELS_MANY_CHAN 10
2578 #define WL_ITER_LIMIT_MANY_CHAN 5
2580 #define WL_MIMO_PS_CFG_VERSION_1 1
2582 typedef struct wl_mimops_cfg
{
2584 /* active_chains: 0 for all, 1 for 1 chain. */
2585 uint8 active_chains
;
2586 /* static (0) or dynamic (1).or disabled (3) Mode applies only when active_chains = 0. */
2588 /* bandwidth = Full (0), 20M (1), 40M (2), 80M (3). */
2590 uint8 applychangesafterlearning
;
2594 /* This event is for tracing MIMO PS metrics snapshot calls.
2595 * It is helpful to debug out-of-sync issue between
2596 * ucode SHM values and FW snapshot calculation.
2597 * It is part of the EVENT_LOG_TAG_MIMO_PS_TRACE.
2599 #define WL_MIMO_PS_METRICS_SNAPSHOT_TRACE_TYPE 0
2600 typedef struct wl_mimo_ps_metrics_snapshot_trace
{
2601 /* type field for this TLV: */
2603 /* length field for this TLV */
2605 uint32 idle_slotcnt_mimo
; /* MIMO idle slotcnt raw SHM value */
2606 uint32 last_idle_slotcnt_mimo
; /* stored value snapshot */
2607 uint32 idle_slotcnt_siso
; /* SISO idle slotcnt raw SHM value */
2608 uint32 last_idle_slotcnt_siso
; /* stored value snapshot */
2609 uint32 rx_time_mimo
; /* Rx MIMO raw SHM value */
2610 uint32 last_rx_time_mimo
; /* stored value snapshot */
2611 uint32 rx_time_siso
; /* RX SISO raw SHM value */
2612 uint32 last_rx_time_siso
; /* stored value snapshot */
2613 uint32 tx_time_1chain
; /* Tx 1-chain raw SHM value */
2614 uint32 last_tx_time_1chain
; /* stored value snapshot */
2615 uint32 tx_time_2chain
; /* Tx 2-chain raw SHM value */
2616 uint32 last_tx_time_2chain
; /* stored value snapshot */
2617 uint32 tx_time_3chain
; /* Tx 3-chain raw SHM value */
2618 uint32 last_tx_time_3chain
; /* stored value snapshot */
2619 uint16 reason
; /* reason for snapshot call, see below */
2620 /* Does the call reset last values after delta calculation */
2622 } wl_mimo_ps_metrics_snapshot_trace_t
;
2623 /* reason codes for mimo ps metrics snapshot function calls */
2624 #define WL_MIMOPS_METRICS_SNAPSHOT_REPORT 1
2625 #define WL_MIMOPS_METRICS_SNAPSHOT_RXCHAIN_SET 2
2626 #define WL_MIMOPS_METRICS_SNAPSHOT_ARBI 3
2627 #define WL_MIMOPS_METRICS_SNAPSHOT_SLOTUPD 4
2628 #define WL_MIMOPS_METRICS_SNAPSHOT_PMBCNRX 5
2629 #define WL_MIMOPS_METRICS_SNAPSHOT_BMACINIT 6
2630 #define WL_MIMOPS_METRICS_SNAPSHOT_HT_COMPLETE 7
2631 #define WL_MIMOPS_METRICS_SNAPSHOT_OCL 8
2633 #define WL_MIMO_PS_STATUS_VERSION_2 2
2634 typedef struct wl_mimo_ps_status
{
2636 uint8 ap_cap
; /* The associated AP's capability (BW, MIMO/SISO). */
2637 uint8 association_status
; /* How we are associated to the AP (MIMO/SISO). */
2638 uint8 mimo_ps_state
; /* mimo_ps_cfg states: [0-5]. See below for values */
2639 uint8 mrc_state
; /* MRC state: NONE (0), ACTIVE(1) */
2640 uint8 bss_rxchain
; /* bss rxchain bitmask */
2641 uint8 bss_txchain
; /* bss txchain bitmask */
2642 uint8 bss_bw
; /* bandwidth: Full (0), 20M (1), 40M (2), 80M (3), etc */
2643 uint16 hw_state
; /* bitmask of hw state. See below for values */
2644 uint8 hw_rxchain
; /* actual HW rxchain bitmask */
2645 uint8 hw_txchain
; /* actual HW txchain bitmask */
2646 uint8 hw_bw
; /* bandwidth: Full (0), 20M (1), 40M (2), 80M (3), etc */
2647 uint8 pm_bcnrx_state
; /* actual state of ucode flag */
2648 uint8 basic_rates_present
; /* internal flag to trigger siso bcmc rx */
2649 uint8 siso_bcmc_rx_state
; /* actual state of ucode flag */
2650 } wl_mimo_ps_status_t
;
2652 #define WL_MIMO_PS_STATUS_VERSION_1 1
2653 typedef struct wl_mimo_ps_status_v1
{
2655 uint8 ap_cap
; /* The associated AP's capability (BW, MIMO/SISO). */
2656 uint8 association_status
; /* How we are associated to the AP (MIMO/SISO). */
2657 uint8 mimo_ps_state
; /* mimo_ps_cfg states: [0-5]. See below for values */
2658 uint8 mrc_state
; /* MRC state: NONE (0), ACTIVE(1) */
2659 uint8 bss_rxchain
; /* bss rxchain bitmask */
2660 uint8 bss_txchain
; /* bss txchain bitmask */
2661 uint8 bss_bw
; /* bandwidth: Full (0), 20M (1), 40M (2), 80M (3), etc */
2662 uint16 hw_state
; /* bitmask of hw state. See below for values */
2663 uint8 hw_rxchain
; /* actual HW rxchain bitmask */
2664 uint8 hw_txchain
; /* actual HW txchain bitmask */
2665 uint8 hw_bw
; /* bandwidth: Full (0), 20M (1), 40M (2), 80M (3), etc */
2667 } wl_mimo_ps_status_v1_t
;
2669 #define WL_MIMO_PS_STATUS_AP_CAP(ap_cap) (ap_cap & 0x0F)
2670 #define WL_MIMO_PS_STATUS_AP_CAP_BW(ap_cap) (ap_cap >> 4)
2671 #define WL_MIMO_PS_STATUS_ASSOC_BW_SHIFT 4
2673 /* version 3: assoc status: low nibble is status enum, high other flags */
2674 #define WL_MIMO_PS_STATUS_VERSION_3 3
2675 #define WL_MIMO_PS_STATUS_ASSOC_STATUS_MASK 0x0F
2676 #define WL_MIMO_PS_STATUS_ASSOC_STATUS_VHT_WITHOUT_OMN 0x80
2678 /* mimo_ps_status: ap_cap/association status */
2680 WL_MIMO_PS_STATUS_ASSOC_NONE
= 0,
2681 WL_MIMO_PS_STATUS_ASSOC_SISO
= 1,
2682 WL_MIMO_PS_STATUS_ASSOC_MIMO
= 2,
2683 WL_MIMO_PS_STATUS_ASSOC_LEGACY
= 3
2686 /* mimo_ps_status: mimo_ps_cfg states */
2688 WL_MIMO_PS_CFG_STATE_NONE
= 0,
2689 WL_MIMO_PS_CFG_STATE_INFORM_AP_INPROGRESS
= 1,
2690 WL_MIMO_PS_CFG_STATE_INFORM_AP_DONE
= 2,
2691 WL_MIMO_PS_CFG_STATE_LEARNING
= 3,
2692 WL_MIMO_PS_CFG_STATE_HW_CONFIGURE
= 4,
2693 WL_MIMO_PS_CFG_STATE_INFORM_AP_PENDING
= 5
2696 /* mimo_ps_status: hw_state values */
2697 #define WL_MIMO_PS_STATUS_HW_STATE_NONE 0
2698 #define WL_MIMO_PS_STATUS_HW_STATE_LTECOEX (0x1 << 0)
2699 #define WL_MIMO_PS_STATUS_HW_STATE_MIMOPS_BSS (0x1 << 1)
2700 #define WL_MIMO_PS_STATUS_HW_STATE_AWDL_BSS (0x1 << 2)
2701 #define WL_MIMO_PS_STATUS_HW_STATE_SCAN (0x1 << 3)
2702 #define WL_MIMO_PS_STATUS_HW_STATE_TXPPR (0x1 << 4)
2703 #define WL_MIMO_PS_STATUS_HW_STATE_PWRTHOTTLE (0x1 << 5)
2704 #define WL_MIMO_PS_STATUS_HW_STATE_TMPSENSE (0x1 << 6)
2705 #define WL_MIMO_PS_STATUS_HW_STATE_IOVAR (0x1 << 7)
2706 #define WL_MIMO_PS_STATUS_HW_STATE_AP_BSS (0x1 << 8)
2708 /* mimo_ps_status: mrc states */
2709 #define WL_MIMO_PS_STATUS_MRC_NONE 0
2710 #define WL_MIMO_PS_STATUS_MRC_ACTIVE 1
2712 /* mimo_ps_status: core flag states for single-core beacon and siso-bcmc rx */
2713 #define WL_MIMO_PS_STATUS_MHF_FLAG_NONE 0
2714 #define WL_MIMO_PS_STATUS_MHF_FLAG_ACTIVE 1
2715 #define WL_MIMO_PS_STATUS_MHF_FLAG_COREDOWN 2
2716 #define WL_MIMO_PS_STATUS_MHF_FLAG_INVALID 3
2718 /* Type values for the REASON */
2719 #define WL_MIMO_PS_PS_LEARNING_ABORTED (1 << 0)
2720 #define WL_MIMO_PS_PS_LEARNING_COMPLETED (1 << 1)
2721 #define WL_MIMO_PS_PS_LEARNING_ONGOING (1 << 2)
2723 typedef struct wl_mimo_ps_learning_event_data
{
2724 uint32 startTimeStamp
;
2725 uint32 endTimeStamp
;
2727 struct ether_addr BSSID
;
2728 uint32 totalSISO_below_rssi_threshold
;
2729 uint32 totalMIMO_below_rssi_threshold
;
2730 uint32 totalSISO_above_rssi_threshold
;
2731 uint32 totalMIMO_above_rssi_threshold
;
2732 } wl_mimo_ps_learning_event_data_t
;
2734 #define WL_MIMO_PS_PS_LEARNING_CFG_ABORT (1 << 0)
2735 #define WL_MIMO_PS_PS_LEARNING_CFG_STATUS (1 << 1)
2736 #define WL_MIMO_PS_PS_LEARNING_CFG_CONFIG (1 << 2)
2737 #define WL_MIMO_PS_PS_LEARNING_CFG_MASK (0x7)
2739 #define WL_MIMO_PS_PS_LEARNING_CFG_V1 1
2741 typedef struct wl_mimops_learning_cfg
{
2742 /* flag: bit 0 for abort */
2743 /* flag: bit 1 for status */
2744 /* flag: bit 2 for configuring no of packets and rssi */
2746 /* mimo ps learning version, compatible version is 0 */
2748 /* if version is 0 or rssi is 0, ignored */
2749 int8 learning_rssi_threshold
;
2751 uint32 no_of_packets_for_learning
;
2752 wl_mimo_ps_learning_event_data_t mimops_learning_data
;
2753 } wl_mimops_learning_cfg_t
;
2755 #define WL_OCL_STATUS_VERSION 1
2756 typedef struct ocl_status_info
{
2759 uint16 fw_status
; /* Bits representing FW disable reasons */
2760 uint8 hw_status
; /* Bits for actual HW config and SISO/MIMO coremask */
2761 uint8 coremask
; /* The ocl core mask (indicating listening core) */
2762 } ocl_status_info_t
;
2765 #define WL_MWS_OCL_OVERRIDE_VERSION 1
2766 typedef struct wl_mws_ocl_override
{
2767 uint16 version
; /* Structure version */
2768 uint16 bitmap_2g
; /* bitmap for 2.4G channels bits 1-13 */
2769 uint16 bitmap_5g_lo
; /* bitmap for 5G low channels by 2:
2770 *34-48, 52-56, 60-64, 100-102
2772 uint16 bitmap_5g_mid
; /* bitmap for 5G mid channels by 2:
2773 * 104, 108-112, 116-120, 124-128,
2774 * 132-136, 140, 149-151
2776 uint16 bitmap_5g_high
; /* bitmap for 5G high channels by 2
2779 } wl_mws_ocl_override_t
;
2781 /* Bits for fw_status */
2782 #define OCL_DISABLED_HOST 0x01 /* Host has disabled through ocl_enable */
2783 #define OCL_DISABLED_RSSI 0x02 /* Disabled because of ocl_rssi_threshold */
2784 #define OCL_DISABLED_LTEC 0x04 /* Disabled due to LTE Coex activity */
2785 #define OCL_DISABLED_SISO 0x08 /* Disabled while in SISO mode */
2786 #define OCL_DISABLED_CAL 0x10 /* Disabled during active calibration */
2787 #define OCL_DISABLED_CHANSWITCH 0x20 /* Disabled during active channel switch */
2788 #define OCL_DISABLED_ASPEND 0x40 /* Disabled due to assoc pending */
2790 /* Bits for hw_status */
2791 #define OCL_HWCFG 0x01 /* State of OCL config bit in phy HW */
2792 #define OCL_HWMIMO 0x02 /* Set if current coremask is > 1 bit */
2793 #define OCL_COREDOWN 0x80 /* Set if core is currently down */
2795 #define WL_OPS_CFG_VERSION_1 1
2796 /* Common IOVAR struct */
2797 typedef struct wl_ops_cfg_v1
{
2799 uint16 len
; /* total length includes fixed fields and variable data[] */
2800 uint16 subcmd_id
; /* subcommand id */
2801 uint16 padding
; /* reserved / padding for 4 byte align */
2802 uint8 data
[]; /* subcommand data; could be empty */
2805 /* subcommands ids */
2807 WL_OPS_CFG_SUBCMD_ENABLE
= 0, /* OPS enable/disable mybss and obss
2808 * for nav and plcp options
2810 WL_OPS_CFG_SUBCMD_MAX_SLEEP_DUR
= 1, /* Max sleep duration used for OPS */
2811 WL_OPS_CFG_SUBCMD_RESET_STATS
= 2 /* Reset stats part of ops_status
2816 #define WL_OPS_CFG_MASK 0xffff
2817 #define WL_OPS_CFG_CAP_MASK 0xffff0000
2818 #define WL_OPS_CFG_CAP_SHIFT 16 /* Shift bits to locate the OPS CAP */
2819 #define WL_OPS_MAX_SLEEP_DUR 12500 /* max ops duration in us */
2820 #define WL_OPS_MINOF_MAX_SLEEP_DUR 512 /* minof max ops duration in us */
2821 #define WL_OPS_SUPPORTED_CFG (WL_OPS_MYBSS_PLCP_DUR | WL_OPS_MYBSS_NAV_DUR \
2822 | WL_OPS_OBSS_PLCP_DUR | WL_OPS_OBSS_NAV_DUR)
2823 #define WL_OPS_DEFAULT_CFG WL_OPS_SUPPORTED_CFG
2825 /* WL_OPS_CFG_SUBCMD_ENABLE */
2826 typedef struct wl_ops_cfg_enable
{
2827 uint32 bits
; /* selectively enable ops for mybss and obss */
2828 } wl_ops_cfg_enable_t
;
2829 /* Bits for WL_OPS_CFG_SUBCMD_ENABLE Parameter */
2830 #define WL_OPS_MYBSS_PLCP_DUR 0x1 /* OPS based on mybss 11b & 11n mixed HT frames
2831 * PLCP header duration
2833 #define WL_OPS_MYBSS_NAV_DUR 0x2 /* OPS based on mybss RTS-CTS duration */
2834 #define WL_OPS_OBSS_PLCP_DUR 0x4 /* OPS based on obss 11b & 11n mixed HT frames
2835 * PLCP header duration
2837 #define WL_OPS_OBSS_NAV_DUR 0x8 /* OPS based on obss RTS-CTS duration */
2839 /* WL_OPS_CFG_SUBCMD_MAX_SLEEP_DUR */
2840 typedef struct wl_ops_cfg_max_sleep_dur
{
2841 uint32 val
; /* maximum sleep duration (us) used for OPS */
2842 } wl_ops_cfg_max_sleep_dur_t
;
2844 /* WL_OPS_CFG_SUBCMD_RESET_STATS */
2845 typedef struct wl_ops_cfg_reset_stats
{
2846 uint32 val
; /* bitmap of slices, 0 means all slices */
2847 } wl_ops_cfg_reset_stats_t
;
2849 #define WL_OPS_STATUS_VERSION_1 1
2850 #define OPS_DUR_HIST_BINS 5 /* number of bins used, 0-1, 1-2, 2-4, 4-8, >8 msec */
2851 typedef struct wl_ops_status_v1
{
2853 uint16 len
; /* Total length including all fixed fields */
2854 uint8 slice_index
; /* Slice for which status is reported */
2855 uint8 disable_obss
; /* indicate if obss cfg is disabled */
2856 uint8 pad
[2]; /* 4-byte alignment */
2857 uint32 disable_reasons
; /* FW disable reasons */
2858 uint32 disable_duration
; /* ops disable time(ms) due to disable reasons */
2859 uint32 applied_ops_config
; /* currently applied ops config */
2860 uint32 partial_ops_dur
; /* Total time (in usec) of partial ops duration */
2861 uint32 full_ops_dur
; /* Total time (in usec) of full ops duration */
2862 uint32 count_dur_hist
[OPS_DUR_HIST_BINS
]; /* ops occurrence histogram */
2863 uint32 nav_cnt
; /* number of times ops triggered based NAV duration */
2864 uint32 plcp_cnt
; /* number of times ops triggered based PLCP duration */
2865 uint32 mybss_cnt
; /* number of times mybss ops trigger */
2866 uint32 obss_cnt
; /* number of times obss ops trigger */
2867 uint32 miss_dur_cnt
; /* number of times ops couldn't happen
2868 * due to insufficient duration
2870 uint32 miss_premt_cnt
; /* number of times ops couldn't happen due
2871 * to not meeting Phy preemption thresh
2873 uint32 max_dur_cnt
; /* number of times ops did not trigger due to
2874 * frames exceeding max sleep duration
2876 uint32 wake_cnt
; /* number of ops miss due to wake reason */
2877 uint32 bcn_wait_cnt
; /* number of ops miss due to waiting for bcn */
2878 } wl_ops_status_v1_t
;
2879 /* Bits for disable_reasons */
2880 #define OPS_DISABLED_HOST 0x01 /* Host has disabled through ops_cfg */
2881 #define OPS_DISABLED_UNASSOC 0x02 /* Disabled because the slice is in unassociated state */
2882 #define OPS_DISABLED_SCAN 0x04 /* Disabled because the slice is in scan state */
2883 #define OPS_DISABLED_BCN_MISS 0x08 /* Disabled because beacon missed for a duration */
2885 #define WL_PSBW_CFG_VERSION_1 1
2886 /* Common IOVAR struct */
2887 typedef struct wl_psbw_cfg_v1
{
2889 uint16 len
; /* total length includes fixed fields and variable data[] */
2890 uint16 subcmd_id
; /* subcommand id */
2891 uint16 pad
; /* reserved / padding for 4 byte align */
2892 uint8 data
[]; /* subcommand data */
2895 /* subcommands ids */
2897 /* PSBW enable/disable */
2898 WL_PSBW_CFG_SUBCMD_ENABLE
= 0,
2899 /* override psbw disable requests */
2900 WL_PSBW_CFG_SUBCMD_OVERRIDE_DISABLE_MASK
= 1,
2901 /* Reset stats part of psbw status */
2902 WL_PSBW_CFG_SUBCMD_RESET_STATS
= 2
2905 #define WL_PSBW_OVERRIDE_DISA_CFG_MASK 0x0000ffff
2906 #define WL_PSBW_OVERRIDE_DISA_CAP_MASK 0xffff0000
2907 #define WL_PSBW_OVERRIDE_DISA_CAP_SHIFT 16 /* shift bits for cap */
2909 /* WL_PSBW_CFG_SUBCMD_ENABLE */
2910 typedef struct wl_psbw_cfg_enable
{
2911 bool enable
; /* enable or disable */
2912 } wl_psbw_cfg_enable_t
;
2914 /* WL_PSBW_CFG_SUBCMD_OVERRIDE_DISABLE_MASK */
2915 typedef struct wl_psbw_cfg_override_disable_mask
{
2916 uint32 mask
; /* disable requests to override, cap and current cfg */
2917 } wl_psbw_cfg_override_disable_mask_t
;
2919 /* WL_PSBW_CFG_SUBCMD_RESET_STATS */
2920 typedef struct wl_psbw_cfg_reset_stats
{
2921 uint32 val
; /* infra interface index, 0 */
2922 } wl_psbw_cfg_reset_stats_t
;
2924 #define WL_PSBW_STATUS_VERSION_1 1
2925 typedef struct wl_psbw_status_v1
{
2927 uint16 len
; /* total length including all fixed fields */
2928 uint8 curr_slice_index
; /* current slice index of the interface */
2929 uint8 associated
; /* interface associatd */
2930 chanspec_t chspec
; /* radio chspec */
2931 uint32 state
; /* psbw state */
2932 uint32 disable_reasons
; /* FW disable reasons */
2933 uint32 slice_enable_dur
; /* time(ms) psbw remains enabled on this slice */
2934 uint32 total_enable_dur
; /* time(ms) psbw remains enabled total */
2935 uint32 enter_cnt
; /* total cnt entering PSBW active */
2936 uint32 exit_cnt
; /* total cnt exiting PSBW active */
2937 uint32 exit_imd_cnt
; /* total cnt imd exit when waited N tbtts */
2938 uint32 enter_skip_cnt
; /* total cnt entering PSBW active skipped */
2939 } wl_psbw_status_v1_t
;
2942 #define PSBW_ACTIVE 0x1 /* active 20MHz */
2943 #define PSBW_TTTT_PEND 0x2 /* waiting for TTTT intr */
2944 #define PSBW_WAIT_ENTER 0x4 /* in wait period before entering */
2945 #define PSBW_CAL_DONE 0x8 /* 20M channel cal done */
2947 /* Bits for disable_reasons */
2948 #define WL_PSBW_DISA_HOST 0x00000001 /* Host has disabled through psbw_cfg */
2949 #define WL_PSBW_DISA_AP20M 0x00000002 /* AP is operating on 20 MHz */
2950 #define WL_PSBW_DISA_SLOTTED_BSS 0x00000004 /* AWDL or NAN active */
2951 #define WL_PSBW_DISA_NOT_PMFAST 0x00000008 /* Not PM_FAST */
2952 #define WL_PSBW_DISA_BASICRATESET 0x00000010 /* BasicRateSet is empty */
2953 #define WL_PSBW_DISA_NOT_D3 0x00000020 /* PCIe not in D3 */
2954 #define WL_PSBW_DISA_CSA 0x00000040 /* CSA IE is present */
2955 #define WL_PSBW_DISA_ASSOC 0x00000080 /* assoc state is active/or unassoc */
2956 #define WL_PSBW_DISA_SCAN 0x00000100 /* scan state is active */
2957 #define WL_PSBW_DISA_CAL 0x00000200 /* cal pending or active */
2958 /* following are not part of disable reasons */
2959 #define WL_PSBW_EXIT_PM 0x00001000 /* Out of PM */
2960 #define WL_PSBW_EXIT_TIM 0x00002000 /* unicast TIM bit present */
2961 #define WL_PSBW_EXIT_DATA 0x00004000 /* Data for transmission */
2962 #define WL_PSBW_EXIT_MGMTDATA 0x00008000 /* management frame for transmission */
2963 #define WL_PSBW_EXIT_BW_UPD 0x00010000 /* BW being updated */
2964 #define WL_PSBW_DISA_NONE 0x80000000 /* reserved for internal use only */
2967 * Join preference iovar value is an array of tuples. Each tuple has a one-byte type,
2968 * a one-byte length, and a variable length value. RSSI type tuple must be present
2971 * Types are defined in "join preference types" section.
2973 * Length is the value size in octets. It is reserved for WL_JOIN_PREF_WPA type tuple
2974 * and must be set to zero.
2976 * Values are defined below.
2978 * 1. RSSI - 2 octets
2979 * offset 0: reserved
2980 * offset 1: reserved
2982 * 2. WPA - 2 + 12 * n octets (n is # tuples defined below)
2983 * offset 0: reserved
2984 * offset 1: # of tuples
2986 * offset 14: tuple 2
2988 * offset 2 + 12 * (n - 1) octets: tuple n
2990 * struct wpa_cfg_tuple {
2991 * uint8 akm[DOT11_OUI_LEN+1]; akm suite
2992 * uint8 ucipher[DOT11_OUI_LEN+1]; unicast cipher suite
2993 * uint8 mcipher[DOT11_OUI_LEN+1]; multicast cipher suite
2996 * multicast cipher suite can be specified as a specific cipher suite or WL_WPA_ACP_MCS_ANY.
2998 * 3. BAND - 2 octets
2999 * offset 0: reserved
3000 * offset 1: see "band preference" and "band types"
3002 * 4. BAND RSSI - 2 octets
3003 * offset 0: band types
3004 * offset 1: +ve RSSI boost value in dB
3011 #define RATE_CCK_1MBPS 0
3012 #define RATE_CCK_2MBPS 1
3013 #define RATE_CCK_5_5MBPS 2
3014 #define RATE_CCK_11MBPS 3
3016 #define RATE_LEGACY_OFDM_6MBPS 0
3017 #define RATE_LEGACY_OFDM_9MBPS 1
3018 #define RATE_LEGACY_OFDM_12MBPS 2
3019 #define RATE_LEGACY_OFDM_18MBPS 3
3020 #define RATE_LEGACY_OFDM_24MBPS 4
3021 #define RATE_LEGACY_OFDM_36MBPS 5
3022 #define RATE_LEGACY_OFDM_48MBPS 6
3023 #define RATE_LEGACY_OFDM_54MBPS 7
3025 #define WL_BSSTRANS_RSSI_RATE_MAP_VERSION 1
3027 typedef struct wl_bsstrans_rssi
{
3028 int8 rssi_2g
; /**< RSSI in dbm for 2.4 G */
3029 int8 rssi_5g
; /**< RSSI in dbm for 5G, unused for cck */
3030 } wl_bsstrans_rssi_t
;
3032 #define RSSI_RATE_MAP_MAX_STREAMS 4 /**< max streams supported */
3034 /** RSSI to rate mapping, all 20Mhz, no SGI */
3035 typedef struct wl_bsstrans_rssi_rate_map
{
3037 uint16 len
; /**< length of entire structure */
3038 wl_bsstrans_rssi_t cck
[WL_NUM_RATES_CCK
]; /**< 2.4G only */
3039 wl_bsstrans_rssi_t ofdm
[WL_NUM_RATES_OFDM
]; /**< 6 to 54mbps */
3040 wl_bsstrans_rssi_t phy_n
[RSSI_RATE_MAP_MAX_STREAMS
][WL_NUM_RATES_MCS_1STREAM
]; /* MCS0-7 */
3041 wl_bsstrans_rssi_t phy_ac
[RSSI_RATE_MAP_MAX_STREAMS
][WL_NUM_RATES_VHT
]; /**< MCS0-9 */
3042 } wl_bsstrans_rssi_rate_map_t
;
3044 #define WL_BSSTRANS_ROAMTHROTTLE_VERSION 1
3046 /** Configure number of scans allowed per throttle period */
3047 typedef struct wl_bsstrans_roamthrottle
{
3050 uint16 scans_allowed
;
3051 } wl_bsstrans_roamthrottle_t
;
3053 #define NFIFO 6 /**< # tx/rx fifopairs */
3055 #if defined(BCM_AQM_DMA_DESC) && !defined(BCM_AQM_DMA_DESC_DISABLED)
3056 #if defined(WL_MU_TX) && !defined(WL_MU_TX_DISABLED)
3057 #define NFIFO_EXT 32 /* 6 traditional FIFOs + 2 rsvd + 24 MU FIFOs */
3059 #define NFIFO_EXT 10 /* 4EDCA + 4 TWT + 1 Mcast/Bcast + 1 Spare */
3061 #elif defined(WL11AX_TRIGGERQ) && !defined(WL11AX_TRIGGERQ_DISABLED)
3062 #define NFIFO_EXT 10
3064 #define NFIFO_EXT NFIFO
3065 #endif /* BCM_AQM_DMA_DESC && !BCM_AQM_DMA_DESC_DISABLED */
3067 /* Reinit reason codes */
3069 WL_REINIT_RC_NONE
= 0,
3070 WL_REINIT_RC_PS_SYNC
= 1,
3071 WL_REINIT_RC_PSM_WD
= 2,
3072 WL_REINIT_RC_MAC_WAKE
= 3,
3073 WL_REINIT_RC_MAC_SUSPEND
= 4,
3074 WL_REINIT_RC_MAC_SPIN_WAIT
= 5,
3075 WL_REINIT_RC_AXI_BUS_ERROR
= 6,
3076 WL_REINIT_RC_DEVICE_REMOVED
= 7,
3077 WL_REINIT_RC_PCIE_FATAL_ERROR
= 8,
3078 WL_REINIT_RC_OL_FW_TRAP
= 9,
3079 WL_REINIT_RC_FIFO_ERR
= 10,
3080 WL_REINIT_RC_INV_TX_STATUS
= 11,
3081 WL_REINIT_RC_MQ_ERROR
= 12,
3082 WL_REINIT_RC_PHYTXERR_THRESH
= 13,
3083 WL_REINIT_RC_USER_FORCED
= 14,
3084 WL_REINIT_RC_FULL_RESET
= 15,
3085 WL_REINIT_RC_AP_BEACON
= 16,
3086 WL_REINIT_RC_PM_EXCESSED
= 17,
3087 WL_REINIT_RC_NO_CLK
= 18,
3088 WL_REINIT_RC_SW_ASSERT
= 19,
3089 WL_REINIT_RC_PSM_JMP0
= 20,
3090 WL_REINIT_RC_PSM_RUN
= 21,
3091 WL_REINIT_RC_ENABLE_MAC
= 22,
3092 WL_REINIT_RC_SCAN_TIMEOUT
= 23,
3093 WL_REINIT_RC_JOIN_TIMEOUT
= 24,
3094 /* Below error codes are generated during D3 exit validation */
3095 WL_REINIT_RC_LINK_NOT_ACTIVE
= 25,
3096 WL_REINIT_RC_PCI_CFG_RD_FAIL
= 26,
3097 WL_REINIT_RC_INV_VEN_ID
= 27,
3098 WL_REINIT_RC_INV_DEV_ID
= 28,
3099 WL_REINIT_RC_INV_BAR0
= 29,
3100 WL_REINIT_RC_INV_BAR2
= 30,
3101 WL_REINIT_RC_AER_UC_FATAL
= 31,
3102 WL_REINIT_RC_AER_UC_NON_FATAL
= 32,
3103 WL_REINIT_RC_AER_CORR
= 33,
3104 WL_REINIT_RC_AER_DEV_STS
= 34,
3105 WL_REINIT_RC_PCIe_STS
= 35,
3106 WL_REINIT_RC_MMIO_RD_FAIL
= 36,
3107 WL_REINIT_RC_MMIO_RD_INVAL
= 37,
3108 WL_REINIT_RC_MMIO_ARM_MEM_RD_FAIL
= 38,
3109 WL_REINIT_RC_MMIO_ARM_MEM_INVAL
= 39,
3110 WL_REINIT_RC_SROM_LOAD_FAILED
= 40,
3111 WL_REINIT_RC_PHY_CRASH
= 41,
3112 WL_REINIT_TX_STALL
= 42,
3113 WL_REINIT_RC_TX_FLOW_CONTROL_BLOCKED
= 43,
3114 WL_REINIT_RC_RX_HC_FAIL
= 44,
3115 WL_REINIT_RC_RX_DMA_STALL
= 45,
3116 WL_REINIT_UTRACE_BUF_OVERLAP_SR
= 46,
3117 WL_REINIT_UTRACE_TPL_OUT_BOUNDS
= 47,
3118 WL_REINIT_UTRACE_TPL_OSET_STRT0
= 48,
3119 WL_REINIT_RC_PHYTXERR
= 49,
3120 WL_REINIT_RC_PSM_FATAL_SUSP
= 50,
3121 WL_REINIT_RC_TX_FIFO_SUSP
= 51,
3122 WL_REINIT_RC_MAC_ENABLE
= 52,
3123 WL_REINIT_RC_SCAN_STALLED
= 53,
3124 WL_REINIT_RC_PHY_HC
= 54,
3125 WL_REINIT_RC_LAST
/* This must be the last entry */
3128 #define NREINITREASONCOUNT 8
3130 #define REINITRSNIDX(_x) (((_x) < WL_REINIT_RC_LAST) ? (_x) : 0)
3132 #define WL_CNT_T_VERSION 30 /**< current version of wl_cnt_t struct */
3133 #define WL_CNT_VERSION_6 6
3134 #define WL_CNT_VERSION_7 7
3135 #define WL_CNT_VERSION_11 11
3136 #define WL_CNT_VERSION_XTLV 30
3138 #define WL_COUNTERS_IOV_VERSION_1 1
3139 #define WL_SUBCNTR_IOV_VER WL_COUNTERS_IOV_VERSION_1
3140 /* First two uint16 are version and lenght fields. So offset of the first counter will be 4 */
3141 #define FIRST_COUNTER_OFFSET 0x04
3143 #define WLC_WITH_XTLV_CNT
3145 /* Number of xtlv info as required to calculate subcounter offsets */
3146 #define WL_CNT_XTLV_ID_NUM 10
3147 #define WL_TLV_IOV_VER 1
3150 * tlv IDs uniquely identifies counter component
3151 * packed into wl_cmd_t container
3153 enum wl_cnt_xtlv_id
{
3154 WL_CNT_XTLV_SLICE_IDX
= 0x1, /**< Slice index */
3155 WL_CNT_XTLV_WLC
= 0x100, /**< WLC layer counters */
3156 WL_CNT_XTLV_WLC_RINIT_RSN
= 0x101, /**< WLC layer reinitreason extension */
3157 WL_CNT_XTLV_WLC_HE
= 0x102, /* he counters */
3158 WL_CNT_XTLV_WLC_SECVLN
= 0x103, /* security vulnerabilities counters */
3159 WL_CNT_XTLV_CNTV_LE10_UCODE
= 0x200, /**< wl counter ver < 11 UCODE MACSTAT */
3160 WL_CNT_XTLV_LT40_UCODE_V1
= 0x300, /**< corerev < 40 UCODE MACSTAT */
3161 WL_CNT_XTLV_GE40_UCODE_V1
= 0x400, /**< corerev >= 40 UCODE MACSTAT */
3162 WL_CNT_XTLV_GE64_UCODEX_V1
= 0x800, /* corerev >= 64 UCODEX MACSTAT */
3163 WL_CNT_XTLV_GE80_UCODE_V1
= 0x900, /* corerev >= 80 UCODEX MACSTAT */
3164 WL_CNT_XTLV_GE80_TXFUNFL_UCODE_V1
= 0x1000 /* corerev >= 80 UCODEX MACSTAT */
3167 /* tlv IDs uniquely identifies periodic state component */
3168 enum wl_periodic_slice_state_xtlv_id
{
3169 WL_STATE_COMPACT_COUNTERS
= 0x1,
3170 WL_STATE_TXBF_COUNTERS
= 0x2,
3171 WL_STATE_COMPACT_HE_COUNTERS
= 0x3
3174 /* tlv IDs uniquely identifies periodic state component */
3175 enum wl_periodic_if_state_xtlv_id
{
3176 WL_STATE_IF_COMPACT_STATE
= 0x1,
3177 WL_STATE_IF_ADPS_STATE
= 0x02
3180 #define TDMTX_CNT_VERSION_V1 1
3181 #define TDMTX_CNT_VERSION_V2 2
3183 /* structure holding tdm counters that interface to iovar */
3184 typedef struct tdmtx_cnt_v1
{
3186 uint16 length
; /* length of this structure */
3187 uint16 wlc_idx
; /* index for wlc */
3188 uint16 enabled
; /* tdmtx is enabled on slice */
3189 uint32 tdmtx_txa_on
; /* TXA on requests */
3190 uint32 tdmtx_txa_tmcnt
; /* Total number of TXA timeout */
3191 uint32 tdmtx_por_on
; /* TXA POR requests */
3192 uint32 tdmtx_txpuen
; /* Path enable requests */
3193 uint32 tdmtx_txpudis
; /* Total number of times Tx path is muted on the slice */
3194 uint32 tdmtx_txpri_on
; /* Total number of times Tx priority was obtained by the slice */
3195 uint32 tdmtx_txdefer
; /* Total number of times Tx was deferred on the slice */
3196 uint32 tdmtx_txmute
; /* Total number of times active Tx muted on the slice */
3197 uint32 tdmtx_actpwrboff
; /* Total number of times TX power is backed off by the slice */
3198 uint32 tdmtx_txa_dur
; /* Total time txa on */
3199 uint32 tdmtx_txpri_dur
; /* Total time TXPri */
3200 uint32 tdmtx_txdefer_dur
; /* Total time txdefer */
3201 /* TDMTX input fields */
3204 uint32 tdmtx_threshold
;
3205 uint32 tdmtx_rssi_threshold
;
3206 uint32 tdmtx_txpwrboff
;
3207 uint32 tdmtx_txpwrboff_dt
;
3212 uint16 length
; /* length of the data portion */
3214 uint16 pad
; /* pad to align to 32 bit */
3215 uint8 data
[]; /* array of tdmtx_cnt_v1_t */
3218 /* structure holding counters that match exactly shm field sizes */
3219 typedef struct tdmtx_cnt_shm_v1
{
3220 uint16 tdmtx_txa_on
; /* TXA on requests */
3221 uint16 tdmtx_tmcnt
; /* TXA on requests */
3222 uint16 tdmtx_por_on
; /* TXA POR requests */
3223 uint16 tdmtx_txpuen
; /* Path enable requests */
3224 uint16 tdmtx_txpudis
; /* Total number of times Tx path is muted on the slice */
3225 uint16 tdmtx_txpri_on
; /* Total number of times Tx priority was obtained by the slice */
3226 uint16 tdmtx_txdefer
; /* Total number of times Tx was defered by the slice */
3227 uint16 tdmtx_txmute
; /* Total number of times active Tx muted on the slice */
3228 uint16 tdmtx_actpwrboff
; /* Total number of times TX power is backed off by the slice */
3229 uint16 tdmtx_txa_dur_l
; /* Total time (low 16 bits) txa on */
3230 uint16 tdmtx_txa_dur_h
; /* Total time (low 16 bits) txa on */
3231 uint16 tdmtx_txpri_dur_l
; /* Total time (low 16 bits) TXPri */
3232 uint16 tdmtx_txpri_dur_h
; /* Total time (high 16 bits) TXPri */
3233 uint16 tdmtx_txdefer_dur_l
; /* Total time (low 16 bits) txdefer */
3234 uint16 tdmtx_txdefer_dur_h
; /* Total time (high 16 bits) txdefer */
3235 } tdmtx_cnt_shm_v1_t
;
3237 /* structure holding tdm counters that interface to iovar for version 2 */
3238 typedef struct tdmtx_cnt_v2
{
3240 uint16 length
; /* length of this structure */
3241 uint16 wlc_idx
; /* index for wlc */
3242 uint16 enabled
; /* tdmtx is enabled on slice */
3243 uint32 tdmtx_txa_on
; /* TXA on requests */
3244 uint32 tdmtx_txa_tmcnt
; /* Total number of TXA timeout */
3245 uint32 tdmtx_porhi_on
; /* TXA PORHI requests */
3246 uint32 tdmtx_porlo_on
; /* TXA PORLO requests */
3247 uint32 tdmtx_txpuen
; /* Path enable requests */
3248 uint32 tdmtx_txpudis
; /* Total number of times Tx path is muted on the slice */
3249 uint32 tdmtx_txpri_on
; /* Total number of times Tx priority was obtained by the slice */
3250 uint32 tdmtx_txdefer
; /* Total number of times Tx was deferred on the slice */
3251 uint32 tdmtx_txmute
; /* Total number of times active Tx muted on the slice */
3252 uint32 tdmtx_actpwrboff
; /* Total number of times TX power is backed off by the slice */
3253 uint32 tdmtx_txa_dur
; /* Total time txa on */
3254 uint32 tdmtx_txpri_dur
; /* Total time TXPri */
3255 uint32 tdmtx_txdefer_dur
; /* Total time txdefer */
3256 /* TDMTX input fields */
3259 uint32 tdmtx_threshold
;
3260 uint32 tdmtx_rssi_threshold
;
3261 uint32 tdmtx_txpwrboff
;
3262 uint32 tdmtx_txpwrboff_dt
;
3265 /* structure holding counters that match exactly shm field sizes */
3266 typedef struct tdmtx_cnt_shm_v2
{
3267 uint16 tdmtx_txa_on
; /* TXA on requests */
3268 uint16 tdmtx_tmcnt
; /* TXA on requests */
3269 uint16 tdmtx_porhi_on
; /* TXA PORHI requests */
3270 uint16 tdmtx_porlo_on
; /* TXA PORLO requests */
3271 uint16 tdmtx_txpuen
; /* Path enable requests */
3272 uint16 tdmtx_txpudis
; /* Total number of times Tx path is muted on the slice */
3273 uint16 tdmtx_txpri_on
; /* Total number of times Tx priority was obtained by the slice */
3274 uint16 tdmtx_txdefer
; /* Total number of times Tx was defered by the slice */
3275 uint16 tdmtx_txmute
; /* Total number of times active Tx muted on the slice */
3276 uint16 tdmtx_actpwrboff
; /* Total number of times TX power is backed off by the slice */
3277 uint16 tdmtx_txa_dur_l
; /* Total time (low 16 bits) txa on */
3278 uint16 tdmtx_txa_dur_h
; /* Total time (low 16 bits) txa on */
3279 uint16 tdmtx_txpri_dur_l
; /* Total time (low 16 bits) TXPri */
3280 uint16 tdmtx_txpri_dur_h
; /* Total time (high 16 bits) TXPri */
3281 uint16 tdmtx_txdefer_dur_l
; /* Total time (low 16 bits) txdefer */
3282 uint16 tdmtx_txdefer_dur_h
; /* Total time (high 16 bits) txdefer */
3283 } tdmtx_cnt_shm_v2_t
;
3285 typedef struct wl_tdmtx_ioc
{
3286 uint16 id
; /* ID of the sub-command */
3287 uint16 len
; /* total length of all data[] */
3288 uint8 data
[]; /* var len payload */
3292 * iovar subcommand ids
3296 IOV_TDMTX_STATUS
= 2,
3297 IOV_TDMTX_TXPRI
= 3,
3298 IOV_TDMTX_DEFER
= 4,
3305 * The number of variables in wl macstat cnt struct.
3306 * (wl_cnt_ge40mcst_v1_t, wl_cnt_lt40mcst_v1_t, wl_cnt_v_le10_mcst_t)
3308 #define WL_CNT_MCST_VAR_NUM 64
3309 /* sizeof(wl_cnt_ge40mcst_v1_t), sizeof(wl_cnt_lt40mcst_v1_t), and sizeof(wl_cnt_v_le10_mcst_t) */
3310 #define WL_CNT_MCST_STRUCT_SZ ((uint32)sizeof(uint32) * WL_CNT_MCST_VAR_NUM)
3311 #define WL_CNT_REV80_MCST_STRUCT_SZ ((uint32)sizeof(wl_cnt_ge80mcst_v1_t))
3312 #define WL_CNT_REV80_MCST_TXFUNFlW_STRUCT_FIXED_SZ \
3313 ((uint32)OFFSETOF(wl_cnt_ge80_txfunfl_v1_t, txfunfl))
3314 #define WL_CNT_REV80_MCST_TXFUNFl_STRUCT_SZ(fcnt) \
3315 (WL_CNT_REV80_MCST_TXFUNFlW_STRUCT_FIXED_SZ + (fcnt * sizeof(uint32)))
3316 #define WL_CNT_REV80_MCST_TXFUNFlW_STRUCT_SZ (WL_CNT_REV80_MCST_TXFUNFl_STRUCT_SZ(NFIFO_EXT))
3318 #define WL_CNT_MCXST_STRUCT_SZ ((uint32)sizeof(wl_cnt_ge64mcxst_v1_t))
3320 #define WL_CNT_HE_STRUCT_SZ ((uint32)sizeof(wl_he_cnt_wlc_t))
3322 #define WL_CNT_SECVLN_STRUCT_SZ ((uint32)sizeof(wl_secvln_cnt_t))
3324 #define INVALID_CNT_VAL (uint32)(-1)
3326 #define WL_XTLV_CNTBUF_MAX_SIZE ((uint32)(OFFSETOF(wl_cnt_info_t, data)) + \
3327 (uint32)BCM_XTLV_HDR_SIZE + (uint32)sizeof(wl_cnt_wlc_t) + \
3328 (uint32)BCM_XTLV_HDR_SIZE + WL_CNT_MCST_STRUCT_SZ + \
3329 (uint32)BCM_XTLV_HDR_SIZE + WL_CNT_MCXST_STRUCT_SZ)
3331 #define WL_CNTBUF_MAX_SIZE MAX(WL_XTLV_CNTBUF_MAX_SIZE, (uint32)sizeof(wl_cnt_ver_11_t))
3333 /** Top structure of counters IOVar buffer */
3335 uint16 version
; /**< see definition of WL_CNT_T_VERSION */
3336 uint16 datalen
; /**< length of data including all paddings. */
3337 uint8 data
[]; /**< variable length payload:
3338 * 1 or more bcm_xtlv_t type of tuples.
3339 * each tuple is padded to multiple of 4 bytes.
3340 * 'datalen' field of this structure includes all paddings.
3344 /* Top structure of subcounters IOVar buffer
3345 * Whenever we make any change in this structure
3346 * WL_SUBCNTR_IOV_VER should be updated accordingly
3347 * The structure definition should remain consistant b/w
3348 * FW and wl/WLM app.
3351 uint16 version
; /* Version of IOVAR structure. Used for backward
3352 * compatibility in future. Whenever we make any
3353 * changes to this structure then value of WL_SUBCNTR_IOV_VER
3354 * needs to be updated properly.
3356 uint16 length
; /* length in bytes of this structure */
3357 uint16 counters_version
; /* see definition of WL_CNT_T_VERSION
3358 * wl app will send the version of counters
3359 * which is used to calculate the offset of counters.
3360 * It must match the version of counters FW is using
3361 * else FW will return error with his version of counters
3362 * set in this field.
3364 uint16 num_subcounters
; /* Number of counter offset passed by wl app to FW. */
3365 uint32 data
[1]; /* variable length payload:
3366 * Offsets to the counters will be passed to FW
3367 * throught this data field. FW will return the value of counters
3368 * at the offsets passed by wl app in this fiels itself.
3372 /* Top structure of counters TLV version IOVar buffer
3373 * The structure definition should remain consistant b/w
3374 * FW and wl/WLM app.
3377 uint16 version
; /* Version of IOVAR structure. Added for backward
3378 * compatibility feature. If any changes are done,
3379 * WL_TLV_IOV_VER need to be updated.
3381 uint16 length
; /* total len in bytes of this structure + payload */
3382 uint16 counters_version
; /* See definition of WL_CNT_VERSION_XTLV
3383 * wl app will update counter tlv version to be used
3384 * so to calculate offset of supported TLVs.
3385 * If there is a mismatch in the version, FW will update an error
3387 uint16 num_tlv
; /* Max number of TLV info passed by FW to WL app.
3390 uint32 data
[]; /* variable length payload:
3391 * This stores the tlv as supported by F/W to the wl app.
3392 * This table is required to compute subcounter offsets at WLapp end.
3394 } wl_cntr_tlv_info_t
;
3396 /** wlc layer counters */
3398 /* transmit stat counters */
3399 uint32 txframe
; /**< tx data frames */
3400 uint32 txbyte
; /**< tx data bytes */
3401 uint32 txretrans
; /**< tx mac retransmits */
3402 uint32 txerror
; /**< tx data errors (derived: sum of others) */
3403 uint32 txctl
; /**< tx management frames */
3404 uint32 txprshort
; /**< tx short preamble frames */
3405 uint32 txserr
; /**< tx status errors */
3406 uint32 txnobuf
; /**< tx out of buffers errors */
3407 uint32 txnoassoc
; /**< tx discard because we're not associated */
3408 uint32 txrunt
; /**< tx runt frames */
3409 uint32 txchit
; /**< tx header cache hit (fastpath) */
3410 uint32 txcmiss
; /**< tx header cache miss (slowpath) */
3412 /* transmit chip error counters */
3413 uint32 txuflo
; /**< tx fifo underflows */
3414 uint32 txphyerr
; /**< tx phy errors (indicated in tx status) */
3417 /* receive stat counters */
3418 uint32 rxframe
; /**< rx data frames */
3419 uint32 rxbyte
; /**< rx data bytes */
3420 uint32 rxerror
; /**< rx data errors (derived: sum of others) */
3421 uint32 rxctl
; /**< rx management frames */
3422 uint32 rxnobuf
; /**< rx out of buffers errors */
3423 uint32 rxnondata
; /**< rx non data frames in the data channel errors */
3424 uint32 rxbadds
; /**< rx bad DS errors */
3425 uint32 rxbadcm
; /**< rx bad control or management frames */
3426 uint32 rxfragerr
; /**< rx fragmentation errors */
3427 uint32 rxrunt
; /**< rx runt frames */
3428 uint32 rxgiant
; /**< rx giant frames */
3429 uint32 rxnoscb
; /**< rx no scb error */
3430 uint32 rxbadproto
; /**< rx invalid frames */
3431 uint32 rxbadsrcmac
; /**< rx frames with Invalid Src Mac */
3432 uint32 rxbadda
; /**< rx frames tossed for invalid da */
3433 uint32 rxfilter
; /**< rx frames filtered out */
3435 /* receive chip error counters */
3436 uint32 rxoflo
; /**< rx fifo overflow errors */
3437 uint32 rxuflo
[NFIFO
]; /**< rx dma descriptor underflow errors */
3439 uint32 d11cnt_txrts_off
; /**< d11cnt txrts value when reset d11cnt */
3440 uint32 d11cnt_rxcrc_off
; /**< d11cnt rxcrc value when reset d11cnt */
3441 uint32 d11cnt_txnocts_off
; /**< d11cnt txnocts value when reset d11cnt */
3444 uint32 dmade
; /**< tx/rx dma descriptor errors */
3445 uint32 dmada
; /**< tx/rx dma data errors */
3446 uint32 dmape
; /**< tx/rx dma descriptor protocol errors */
3447 uint32 reset
; /**< reset count */
3448 uint32 tbtt
; /**< cnts the TBTT int's */
3450 uint32 pkt_callback_reg_fail
; /**< callbacks register failure */
3452 /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
3453 uint32 txfrag
; /**< dot11TransmittedFragmentCount */
3454 uint32 txmulti
; /**< dot11MulticastTransmittedFrameCount */
3455 uint32 txfail
; /**< dot11FailedCount */
3456 uint32 txretry
; /**< dot11RetryCount */
3457 uint32 txretrie
; /**< dot11MultipleRetryCount */
3458 uint32 rxdup
; /**< dot11FrameduplicateCount */
3459 uint32 txrts
; /**< dot11RTSSuccessCount */
3460 uint32 txnocts
; /**< dot11RTSFailureCount */
3461 uint32 txnoack
; /**< dot11ACKFailureCount */
3462 uint32 rxfrag
; /**< dot11ReceivedFragmentCount */
3463 uint32 rxmulti
; /**< dot11MulticastReceivedFrameCount */
3464 uint32 rxcrc
; /**< dot11FCSErrorCount */
3465 uint32 txfrmsnt
; /**< dot11TransmittedFrameCount (bogus MIB?) */
3466 uint32 rxundec
; /**< dot11WEPUndecryptableCount */
3468 /* WPA2 counters (see rxundec for DecryptFailureCount) */
3469 uint32 tkipmicfaill
; /**< TKIPLocalMICFailures */
3470 uint32 tkipcntrmsr
; /**< TKIPCounterMeasuresInvoked */
3471 uint32 tkipreplay
; /**< TKIPReplays */
3472 uint32 ccmpfmterr
; /**< CCMPFormatErrors */
3473 uint32 ccmpreplay
; /**< CCMPReplays */
3474 uint32 ccmpundec
; /**< CCMPDecryptErrors */
3475 uint32 fourwayfail
; /**< FourWayHandshakeFailures */
3476 uint32 wepundec
; /**< dot11WEPUndecryptableCount */
3477 uint32 wepicverr
; /**< dot11WEPICVErrorCount */
3478 uint32 decsuccess
; /**< DecryptSuccessCount */
3479 uint32 tkipicverr
; /**< TKIPICVErrorCount */
3480 uint32 wepexcluded
; /**< dot11WEPExcludedCount */
3482 uint32 txchanrej
; /**< Tx frames suppressed due to channel rejection */
3483 uint32 psmwds
; /**< Count PSM watchdogs */
3484 uint32 phywatchdog
; /**< Count Phy watchdogs (triggered by ucode) */
3486 /* MBSS counters, AP only */
3487 uint32 prq_entries_handled
; /**< PRQ entries read in */
3488 uint32 prq_undirected_entries
; /**< which were bcast bss & ssid */
3489 uint32 prq_bad_entries
; /**< which could not be translated to info */
3490 uint32 atim_suppress_count
; /**< TX suppressions on ATIM fifo */
3491 uint32 bcn_template_not_ready
; /**< Template marked in use on send bcn ... */
3492 uint32 bcn_template_not_ready_done
; /**< ...but "DMA done" interrupt rcvd */
3493 uint32 late_tbtt_dpc
; /**< TBTT DPC did not happen in time */
3495 /* per-rate receive stat counters */
3496 uint32 rx1mbps
; /**< packets rx at 1Mbps */
3497 uint32 rx2mbps
; /**< packets rx at 2Mbps */
3498 uint32 rx5mbps5
; /**< packets rx at 5.5Mbps */
3499 uint32 rx6mbps
; /**< packets rx at 6Mbps */
3500 uint32 rx9mbps
; /**< packets rx at 9Mbps */
3501 uint32 rx11mbps
; /**< packets rx at 11Mbps */
3502 uint32 rx12mbps
; /**< packets rx at 12Mbps */
3503 uint32 rx18mbps
; /**< packets rx at 18Mbps */
3504 uint32 rx24mbps
; /**< packets rx at 24Mbps */
3505 uint32 rx36mbps
; /**< packets rx at 36Mbps */
3506 uint32 rx48mbps
; /**< packets rx at 48Mbps */
3507 uint32 rx54mbps
; /**< packets rx at 54Mbps */
3508 uint32 rx108mbps
; /**< packets rx at 108mbps */
3509 uint32 rx162mbps
; /**< packets rx at 162mbps */
3510 uint32 rx216mbps
; /**< packets rx at 216 mbps */
3511 uint32 rx270mbps
; /**< packets rx at 270 mbps */
3512 uint32 rx324mbps
; /**< packets rx at 324 mbps */
3513 uint32 rx378mbps
; /**< packets rx at 378 mbps */
3514 uint32 rx432mbps
; /**< packets rx at 432 mbps */
3515 uint32 rx486mbps
; /**< packets rx at 486 mbps */
3516 uint32 rx540mbps
; /**< packets rx at 540 mbps */
3518 uint32 rfdisable
; /**< count of radio disables */
3520 uint32 txexptime
; /**< Tx frames suppressed due to timer expiration */
3522 uint32 txmpdu_sgi
; /**< count for sgi transmit */
3523 uint32 rxmpdu_sgi
; /**< count for sgi received */
3524 uint32 txmpdu_stbc
; /**< count for stbc transmit */
3525 uint32 rxmpdu_stbc
; /**< count for stbc received */
3527 uint32 rxundec_mcst
; /**< dot11WEPUndecryptableCount */
3529 /* WPA2 counters (see rxundec for DecryptFailureCount) */
3530 uint32 tkipmicfaill_mcst
; /**< TKIPLocalMICFailures */
3531 uint32 tkipcntrmsr_mcst
; /**< TKIPCounterMeasuresInvoked */
3532 uint32 tkipreplay_mcst
; /**< TKIPReplays */
3533 uint32 ccmpfmterr_mcst
; /**< CCMPFormatErrors */
3534 uint32 ccmpreplay_mcst
; /**< CCMPReplays */
3535 uint32 ccmpundec_mcst
; /**< CCMPDecryptErrors */
3536 uint32 fourwayfail_mcst
; /**< FourWayHandshakeFailures */
3537 uint32 wepundec_mcst
; /**< dot11WEPUndecryptableCount */
3538 uint32 wepicverr_mcst
; /**< dot11WEPICVErrorCount */
3539 uint32 decsuccess_mcst
; /**< DecryptSuccessCount */
3540 uint32 tkipicverr_mcst
; /**< TKIPICVErrorCount */
3541 uint32 wepexcluded_mcst
; /**< dot11WEPExcludedCount */
3543 uint32 dma_hang
; /**< count for dma hang */
3544 uint32 reinit
; /**< count for reinit */
3546 uint32 pstatxucast
; /**< count of ucast frames xmitted on all psta assoc */
3547 uint32 pstatxnoassoc
; /**< count of txnoassoc frames xmitted on all psta assoc */
3548 uint32 pstarxucast
; /**< count of ucast frames received on all psta assoc */
3549 uint32 pstarxbcmc
; /**< count of bcmc frames received on all psta */
3550 uint32 pstatxbcmc
; /**< count of bcmc frames transmitted on all psta */
3552 uint32 cso_passthrough
; /**< hw cso required but passthrough */
3553 uint32 cso_normal
; /**< hw cso hdr for normal process */
3554 uint32 chained
; /**< number of frames chained */
3555 uint32 chainedsz1
; /**< number of chain size 1 frames */
3556 uint32 unchained
; /**< number of frames not chained */
3557 uint32 maxchainsz
; /**< max chain size so far */
3558 uint32 currchainsz
; /**< current chain size */
3559 uint32 pciereset
; /**< Secondary Bus Reset issued by driver */
3560 uint32 cfgrestore
; /**< configspace restore by driver */
3561 uint32 reinitreason
[NREINITREASONCOUNT
]; /**< reinitreason counters; 0: Unknown reason */
3563 uint32 rxmpdu_mu
; /**< Number of MU MPDUs received */
3565 /* detailed control/management frames */
3566 uint32 txbar
; /**< Number of TX BAR */
3567 uint32 rxbar
; /**< Number of RX BAR */
3568 uint32 txpspoll
; /**< Number of TX PS-poll */
3569 uint32 rxpspoll
; /**< Number of RX PS-poll */
3570 uint32 txnull
; /**< Number of TX NULL_DATA */
3571 uint32 rxnull
; /**< Number of RX NULL_DATA */
3572 uint32 txqosnull
; /**< Number of TX NULL_QoSDATA */
3573 uint32 rxqosnull
; /**< Number of RX NULL_QoSDATA */
3574 uint32 txassocreq
; /**< Number of TX ASSOC request */
3575 uint32 rxassocreq
; /**< Number of RX ASSOC request */
3576 uint32 txreassocreq
; /**< Number of TX REASSOC request */
3577 uint32 rxreassocreq
; /**< Number of RX REASSOC request */
3578 uint32 txdisassoc
; /**< Number of TX DISASSOC */
3579 uint32 rxdisassoc
; /**< Number of RX DISASSOC */
3580 uint32 txassocrsp
; /**< Number of TX ASSOC response */
3581 uint32 rxassocrsp
; /**< Number of RX ASSOC response */
3582 uint32 txreassocrsp
; /**< Number of TX REASSOC response */
3583 uint32 rxreassocrsp
; /**< Number of RX REASSOC response */
3584 uint32 txauth
; /**< Number of TX AUTH */
3585 uint32 rxauth
; /**< Number of RX AUTH */
3586 uint32 txdeauth
; /**< Number of TX DEAUTH */
3587 uint32 rxdeauth
; /**< Number of RX DEAUTH */
3588 uint32 txprobereq
; /**< Number of TX probe request */
3589 uint32 rxprobereq
; /**< Number of RX probe request */
3590 uint32 txprobersp
; /**< Number of TX probe response */
3591 uint32 rxprobersp
; /**< Number of RX probe response */
3592 uint32 txaction
; /**< Number of TX action frame */
3593 uint32 rxaction
; /**< Number of RX action frame */
3594 uint32 ampdu_wds
; /**< Number of AMPDU watchdogs */
3595 uint32 txlost
; /**< Number of lost packets reported in txs */
3596 uint32 txdatamcast
; /**< Number of TX multicast data packets */
3597 uint32 txdatabcast
; /**< Number of TX broadcast data packets */
3598 uint32 psmxwds
; /**< Number of PSMx watchdogs */
3601 uint32 p2p_tbtt
; /**< Number of P2P TBTT Events */
3602 uint32 p2p_tbtt_miss
; /**< Number of P2P TBTT Events Miss */
3603 uint32 txqueue_start
;
3605 uint32 txbcast
; /* Broadcast TransmittedFrameCount */
3606 uint32 txdropped
; /* tx dropped pkts */
3607 uint32 rxbcast
; /* BroadcastReceivedFrameCount */
3608 uint32 rxdropped
; /* rx dropped pkts (derived: sum of others) */
3609 uint32 txq_end_assoccb
; /* forced txqueue_end callback fired in assoc */
3610 uint32 tx_toss_cnt
; /* number of tx packets tossed */
3611 uint32 rx_toss_cnt
; /* number of rx packets tossed */
3612 uint32 last_tx_toss_rsn
; /* reason because of which last tx pkt tossed */
3613 uint32 last_rx_toss_rsn
; /* reason because of which last rx pkt tossed */
3614 uint32 pmk_badlen_cnt
; /* number of invalid pmk len */
3618 /* he counters Version 1 */
3619 #define HE_COUNTERS_V1 (1)
3620 typedef struct wl_he_cnt_wlc_v1
{
3621 uint32 he_rxtrig_myaid
;
3622 uint32 he_rxtrig_rand
;
3623 uint32 he_colormiss_cnt
;
3625 uint32 he_txmtid_back
;
3626 uint32 he_rxmtid_back
;
3627 uint32 he_rxmsta_back
;
3631 uint32 he_rxtrig_basic
;
3632 uint32 he_rxtrig_murts
;
3633 uint32 he_rxtrig_bsrp
;
3638 } wl_he_cnt_wlc_v1_t
;
3640 /* he counters Version 2 */
3641 #define HE_COUNTERS_V2 (2)
3642 typedef struct wl_he_cnt_wlc_v2
{
3645 uint32 he_rxtrig_myaid
; /**< rxed valid trigger frame with myaid */
3646 uint32 he_rxtrig_rand
; /**< rxed valid trigger frame with random aid */
3647 uint32 he_colormiss_cnt
; /**< for bss color mismatch cases */
3648 uint32 he_txmampdu
; /**< for multi-TID AMPDU transmission */
3649 uint32 he_txmtid_back
; /**< for multi-TID BACK transmission */
3650 uint32 he_rxmtid_back
; /**< reception of multi-TID BACK */
3651 uint32 he_rxmsta_back
; /**< reception of multi-STA BACK */
3652 uint32 he_txfrag
; /**< transmission of Dynamic fragmented packets */
3653 uint32 he_rxdefrag
; /**< reception of dynamic fragmented packets */
3654 uint32 he_txtrig
; /**< transmission of trigger frames */
3655 uint32 he_rxtrig_basic
; /**< reception of basic trigger frame */
3656 uint32 he_rxtrig_murts
; /**< reception of MU-RTS trigger frame */
3657 uint32 he_rxtrig_bsrp
; /**< reception of BSR poll trigger frame */
3658 uint32 he_rxdlmu
; /**< reception of DL MU PPDU */
3659 uint32 he_physu_rx
; /**< reception of SU frame */
3660 uint32 he_phyru_rx
; /**< reception of RU frame */
3661 uint32 he_txtbppdu
; /**< increments on transmission of every TB PPDU */
3662 uint32 he_null_tbppdu
; /**< null TB PPDU's sent as a response to basic trigger frame */
3663 } wl_he_cnt_wlc_v2_t
;
3665 #ifndef HE_COUNTERS_VERSION_ENABLED
3666 #define HE_COUNTERS_VERSION (HE_COUNTERS_V1)
3667 typedef wl_he_cnt_wlc_v1_t wl_he_cnt_wlc_t
;
3668 #endif /* HE_COUNTERS_VERSION_ENABLED */
3670 /* security vulnerabilities counters */
3672 uint32 ie_unknown
; /* number of unknown IEs */
3673 uint32 ie_invalid_length
; /* number of IEs with invalid length */
3674 uint32 ie_invalid_data
; /* number of IEs with invalid data */
3675 uint32 ipv6_invalid_length
; /* number of IPv6 packets with invalid payload length */
3678 /* Reinit reasons - do not put anything else other than reinit reasons here */
3680 uint32 rsn
[WL_REINIT_RC_LAST
];
3683 /* MACXSTAT counters for ucodex (corerev >= 64) */
3691 } wl_cnt_ge64mcxst_v1_t
;
3693 /** MACSTAT counters for ucode (corerev >= 40) */
3695 /* MAC counters: 32-bit version of d11.h's macstat_t */
3696 uint32 txallfrm
; /**< total number of frames sent, incl. Data, ACK, RTS, CTS,
3697 * Control Management (includes retransmissions)
3699 uint32 txrtsfrm
; /**< number of RTS sent out by the MAC */
3700 uint32 txctsfrm
; /**< number of CTS sent out by the MAC */
3701 uint32 txackfrm
; /**< number of ACK frames sent out */
3702 uint32 txdnlfrm
; /**< number of Null-Data transmission generated from template */
3703 uint32 txbcnfrm
; /**< beacons transmitted */
3704 uint32 txfunfl
[6]; /**< per-fifo tx underflows */
3705 uint32 txampdu
; /**< number of AMPDUs transmitted */
3706 uint32 txmpdu
; /**< number of MPDUs transmitted */
3707 uint32 txtplunfl
; /**< Template underflows (mac was too slow to transmit ACK/CTS
3710 uint32 txphyerror
; /**< Transmit phy error, type of error is reported in tx-status for
3711 * driver enqueued frames
3713 uint32 pktengrxducast
; /**< unicast frames rxed by the pkteng code */
3714 uint32 pktengrxdmcast
; /**< multicast frames rxed by the pkteng code */
3715 uint32 rxfrmtoolong
; /**< Received frame longer than legal limit (2346 bytes) */
3716 uint32 rxfrmtooshrt
; /**< Received frame did not contain enough bytes for its frame type */
3717 uint32 rxanyerr
; /**< Any RX error that is not counted by other counters. */
3718 uint32 rxbadfcs
; /**< number of frames for which the CRC check failed in the MAC */
3719 uint32 rxbadplcp
; /**< parity check of the PLCP header failed */
3720 uint32 rxcrsglitch
; /**< PHY was able to correlate the preamble but not the header */
3721 uint32 rxstrt
; /**< Number of received frames with a good PLCP
3722 * (i.e. passing parity check)
3724 uint32 rxdtucastmbss
; /**< number of received DATA frames with good FCS and matching RA */
3725 uint32 rxmgucastmbss
; /**< number of received mgmt frames with good FCS and matching RA */
3726 uint32 rxctlucast
; /**< number of received CNTRL frames with good FCS and matching RA */
3727 uint32 rxrtsucast
; /**< number of unicast RTS addressed to the MAC (good FCS) */
3728 uint32 rxctsucast
; /**< number of unicast CTS addressed to the MAC (good FCS) */
3729 uint32 rxackucast
; /**< number of ucast ACKS received (good FCS) */
3730 uint32 rxdtocast
; /**< number of received DATA frames (good FCS and not matching RA) */
3731 uint32 rxmgocast
; /**< number of received MGMT frames (good FCS and not matching RA) */
3732 uint32 rxctlocast
; /**< number of received CNTRL frame (good FCS and not matching RA) */
3733 uint32 rxrtsocast
; /**< number of received RTS not addressed to the MAC */
3734 uint32 rxctsocast
; /**< number of received CTS not addressed to the MAC */
3735 uint32 rxdtmcast
; /**< number of RX Data multicast frames received by the MAC */
3736 uint32 rxmgmcast
; /**< number of RX Management multicast frames received by the MAC */
3737 uint32 rxctlmcast
; /**< number of RX Control multicast frames received by the MAC
3738 * (unlikely to see these)
3740 uint32 rxbeaconmbss
; /**< beacons received from member of BSS */
3741 uint32 rxdtucastobss
; /**< number of unicast frames addressed to the MAC from
3742 * other BSS (WDS FRAME)
3744 uint32 rxbeaconobss
; /**< beacons received from other BSS */
3745 uint32 rxrsptmout
; /**< number of response timeouts for transmitted frames
3746 * expecting a response
3748 uint32 bcntxcancl
; /**< transmit beacons canceled due to receipt of beacon (IBSS) */
3749 uint32 rxnodelim
; /**< number of no valid delimiter detected by ampdu parser */
3750 uint32 rxf0ovfl
; /**< number of receive fifo 0 overflows */
3751 uint32 rxf1ovfl
; /**< number of receive fifo 1 overflows */
3752 uint32 rxhlovfl
; /**< number of length / header fifo overflows */
3753 uint32 missbcn_dbg
; /**< number of beacon missed to receive */
3754 uint32 pmqovfl
; /**< number of PMQ overflows */
3755 uint32 rxcgprqfrm
; /**< number of received Probe requests that made it into
3758 uint32 rxcgprsqovfl
; /**< Rx Probe Request Que overflow in the AP */
3759 uint32 txcgprsfail
; /**< Tx Probe Response Fail. AP sent probe response but did
3762 uint32 txcgprssuc
; /**< Tx Probe Response Success (ACK was received) */
3763 uint32 prs_timeout
; /**< number of probe requests that were dropped from the PRQ
3764 * fifo because a probe response could not be sent out within
3765 * the time limit defined in M_PRS_MAXTIME
3767 uint32 txrtsfail
; /**< number of rts transmission failure that reach retry limit */
3768 uint32 txucast
; /**< number of unicast tx expecting response other than cts/cwcts */
3769 uint32 txinrtstxop
; /**< number of data frame transmissions during rts txop */
3770 uint32 rxback
; /**< blockack rxcnt */
3771 uint32 txback
; /**< blockack txcnt */
3772 uint32 bphy_rxcrsglitch
; /**< PHY count of bphy glitches */
3773 uint32 rxdrop20s
; /**< drop secondary cnt */
3774 uint32 rxtoolate
; /**< receive too late */
3775 uint32 bphy_badplcp
; /**< number of bad PLCP reception on BPHY rate */
3776 } wl_cnt_ge40mcst_v1_t
;
3778 /** MACSTAT counters for ucode (corerev < 40) */
3780 /* MAC counters: 32-bit version of d11.h's macstat_t */
3781 uint32 txallfrm
; /**< total number of frames sent, incl. Data, ACK, RTS, CTS,
3782 * Control Management (includes retransmissions)
3784 uint32 txrtsfrm
; /**< number of RTS sent out by the MAC */
3785 uint32 txctsfrm
; /**< number of CTS sent out by the MAC */
3786 uint32 txackfrm
; /**< number of ACK frames sent out */
3787 uint32 txdnlfrm
; /**< number of Null-Data transmission generated from template */
3788 uint32 txbcnfrm
; /**< beacons transmitted */
3789 uint32 txfunfl
[6]; /**< per-fifo tx underflows */
3790 uint32 txampdu
; /**< number of AMPDUs transmitted */
3791 uint32 txmpdu
; /**< number of MPDUs transmitted */
3792 uint32 txtplunfl
; /**< Template underflows (mac was too slow to transmit ACK/CTS
3795 uint32 txphyerror
; /**< Transmit phy error, type of error is reported in tx-status for
3796 * driver enqueued frames
3798 uint32 pktengrxducast
; /**< unicast frames rxed by the pkteng code */
3799 uint32 pktengrxdmcast
; /**< multicast frames rxed by the pkteng code */
3800 uint32 rxfrmtoolong
; /**< Received frame longer than legal limit (2346 bytes) */
3801 uint32 rxfrmtooshrt
; /**< Received frame did not contain enough bytes for its frame type */
3802 uint32 rxanyerr
; /**< Any RX error that is not counted by other counters. */
3803 uint32 rxbadfcs
; /**< number of frames for which the CRC check failed in the MAC */
3804 uint32 rxbadplcp
; /**< parity check of the PLCP header failed */
3805 uint32 rxcrsglitch
; /**< PHY was able to correlate the preamble but not the header */
3806 uint32 rxstrt
; /**< Number of received frames with a good PLCP
3807 * (i.e. passing parity check)
3809 uint32 rxdtucastmbss
; /**< number of received DATA frames with good FCS and matching RA */
3810 uint32 rxmgucastmbss
; /**< number of received mgmt frames with good FCS and matching RA */
3811 uint32 rxctlucast
; /**< number of received CNTRL frames with good FCS and matching RA */
3812 uint32 rxrtsucast
; /**< number of unicast RTS addressed to the MAC (good FCS) */
3813 uint32 rxctsucast
; /**< number of unicast CTS addressed to the MAC (good FCS) */
3814 uint32 rxackucast
; /**< number of ucast ACKS received (good FCS) */
3815 uint32 rxdtocast
; /**< number of received DATA frames (good FCS and not matching RA) */
3816 uint32 rxmgocast
; /**< number of received MGMT frames (good FCS and not matching RA) */
3817 uint32 rxctlocast
; /**< number of received CNTRL frame (good FCS and not matching RA) */
3818 uint32 rxrtsocast
; /**< number of received RTS not addressed to the MAC */
3819 uint32 rxctsocast
; /**< number of received CTS not addressed to the MAC */
3820 uint32 rxdtmcast
; /**< number of RX Data multicast frames received by the MAC */
3821 uint32 rxmgmcast
; /**< number of RX Management multicast frames received by the MAC */
3822 uint32 rxctlmcast
; /**< number of RX Control multicast frames received by the MAC
3823 * (unlikely to see these)
3825 uint32 rxbeaconmbss
; /**< beacons received from member of BSS */
3826 uint32 rxdtucastobss
; /**< number of unicast frames addressed to the MAC from
3827 * other BSS (WDS FRAME)
3829 uint32 rxbeaconobss
; /**< beacons received from other BSS */
3830 uint32 rxrsptmout
; /**< number of response timeouts for transmitted frames
3831 * expecting a response
3833 uint32 bcntxcancl
; /**< transmit beacons canceled due to receipt of beacon (IBSS) */
3834 uint32 rxnodelim
; /**< number of no valid delimiter detected by ampdu parser */
3835 uint32 rxf0ovfl
; /**< number of receive fifo 0 overflows */
3838 uint32 dbgoff48
; /**< Used for counting txstatus queue overflow (corerev <= 4) */
3839 uint32 pmqovfl
; /**< number of PMQ overflows */
3840 uint32 rxcgprqfrm
; /**< number of received Probe requests that made it into
3843 uint32 rxcgprsqovfl
; /**< Rx Probe Request Que overflow in the AP */
3844 uint32 txcgprsfail
; /**< Tx Probe Response Fail. AP sent probe response but did
3847 uint32 txcgprssuc
; /**< Tx Probe Response Success (ACK was received) */
3848 uint32 prs_timeout
; /**< number of probe requests that were dropped from the PRQ
3849 * fifo because a probe response could not be sent out within
3850 * the time limit defined in M_PRS_MAXTIME
3852 uint32 txrtsfail
; /**< number of rts transmission failure that reach retry limit */
3853 uint32 txucast
; /**< number of unicast tx expecting response other than cts/cwcts */
3854 uint32 txinrtstxop
; /**< number of data frame transmissions during rts txop */
3855 uint32 rxback
; /**< blockack rxcnt */
3856 uint32 txback
; /**< blockack txcnt */
3857 uint32 bphy_rxcrsglitch
; /**< PHY count of bphy glitches */
3859 uint32 rxtoolate
; /**< receive too late */
3860 uint32 bphy_badplcp
; /**< number of bad PLCP reception on BPHY rate */
3861 } wl_cnt_lt40mcst_v1_t
;
3863 /** MACSTAT counters for ucode (corerev >= 80) */
3865 /* MAC counters: 32-bit version of d11.h's macstat_t */
3866 /* Start of PSM2HOST stats(72) block */
3867 uint32 txallfrm
; /**< total number of frames sent, incl. Data, ACK, RTS, CTS,
3868 * Control Management (includes retransmissions)
3870 uint32 txrtsfrm
; /**< number of RTS sent out by the MAC */
3871 uint32 txctsfrm
; /**< number of CTS sent out by the MAC */
3872 uint32 txackfrm
; /**< number of ACK frames sent out */
3873 uint32 txdnlfrm
; /**< number of Null-Data transmission generated from template */
3874 uint32 txbcnfrm
; /**< beacons transmitted */
3875 uint32 txampdu
; /**< number of AMPDUs transmitted */
3876 uint32 txmpdu
; /**< number of MPDUs transmitted */
3877 uint32 txtplunfl
; /**< Template underflows (mac was too slow to transmit ACK/CTS
3880 uint32 txphyerror
; /**< Transmit phy error, type of error is reported in tx-status for
3881 * driver enqueued frames
3883 uint32 pktengrxducast
; /**< unicast frames rxed by the pkteng code */
3884 uint32 pktengrxdmcast
; /**< multicast frames rxed by the pkteng code */
3885 uint32 rxfrmtoolong
; /**< Received frame longer than legal limit (2346 bytes) */
3886 uint32 rxfrmtooshrt
; /**< Received frame did not contain enough bytes for its frame type */
3887 uint32 rxanyerr
; /**< Any RX error that is not counted by other counters. */
3888 uint32 rxbadfcs
; /**< number of frames for which the CRC check failed in the MAC */
3889 uint32 rxbadplcp
; /**< parity check of the PLCP header failed */
3890 uint32 rxcrsglitch
; /**< PHY was able to correlate the preamble but not the header */
3891 uint32 rxstrt
; /**< Number of received frames with a good PLCP
3892 * (i.e. passing parity check)
3894 uint32 rxdtucastmbss
; /**< number of received DATA frames with good FCS and matching RA */
3895 uint32 rxmgucastmbss
; /**< number of received mgmt frames with good FCS and matching RA */
3896 uint32 rxctlucast
; /**< number of received CNTRL frames with good FCS and matching RA */
3897 uint32 rxrtsucast
; /**< number of unicast RTS addressed to the MAC (good FCS) */
3898 uint32 rxctsucast
; /**< number of unicast CTS addressed to the MAC (good FCS) */
3899 uint32 rxackucast
; /**< number of ucast ACKS received (good FCS) */
3900 uint32 rxdtocast
; /**< number of received DATA frames (good FCS and not matching RA) */
3901 uint32 rxmgocast
; /**< number of received MGMT frames (good FCS and not matching RA) */
3902 uint32 rxctlocast
; /**< number of received CNTRL frame (good FCS and not matching RA) */
3903 uint32 rxrtsocast
; /**< number of received RTS not addressed to the MAC */
3904 uint32 rxctsocast
; /**< number of received CTS not addressed to the MAC */
3905 uint32 rxdtmcast
; /**< number of RX Data multicast frames received by the MAC */
3906 uint32 rxmgmcast
; /**< number of RX Management multicast frames received by the MAC */
3907 uint32 rxctlmcast
; /**< number of RX Control multicast frames received by the MAC
3908 * (unlikely to see these)
3910 uint32 rxbeaconmbss
; /**< beacons received from member of BSS */
3911 uint32 rxdtucastobss
; /**< number of unicast frames addressed to the MAC from
3912 * other BSS (WDS FRAME)
3914 uint32 rxbeaconobss
; /**< beacons received from other BSS */
3915 uint32 rxrsptmout
; /**< number of response timeouts for transmitted frames
3916 * expecting a response
3918 uint32 bcntxcancl
; /**< transmit beacons canceled due to receipt of beacon (IBSS) */
3919 uint32 rxnodelim
; /**< number of no valid delimiter detected by ampdu parser */
3920 uint32 missbcn_dbg
; /**< number of beacon missed to receive */
3921 uint32 pmqovfl
; /**< number of PMQ overflows */
3922 uint32 rxcgprqfrm
; /**< number of received Probe requests that made it into
3925 uint32 rxcgprsqovfl
; /**< Rx Probe Request Que overflow in the AP */
3926 uint32 txcgprsfail
; /**< Tx Probe Response Fail. AP sent probe response but did
3929 uint32 txcgprssuc
; /**< Tx Probe Response Success (ACK was received) */
3930 uint32 prs_timeout
; /**< number of probe requests that were dropped from the PRQ
3931 * fifo because a probe response could not be sent out within
3932 * the time limit defined in M_PRS_MAXTIME
3934 uint32 txrtsfail
; /**< number of rts transmission failure that reach retry limit */
3935 uint32 txucast
; /**< number of unicast tx expecting response other than cts/cwcts */
3936 uint32 txinrtstxop
; /**< number of data frame transmissions during rts txop */
3937 uint32 rxback
; /**< blockack rxcnt */
3938 uint32 txback
; /**< blockack txcnt */
3939 uint32 bphy_rxcrsglitch
; /**< PHY count of bphy glitches */
3940 uint32 rxdrop20s
; /**< drop secondary cnt */
3941 uint32 rxtoolate
; /**< receive too late */
3942 uint32 bphy_badplcp
; /**< number of bad PLCP reception on BPHY rate */
3943 uint32 rxtrig_myaid
; /* New counters added in corerev 80 */
3951 /* End of PSM2HOST stats block */
3952 /* start of rxerror overflow counter(24) block which are modified/added in corerev 80 */
3954 uint32 rxf0ovfl
; /**< number of receive fifo 0 overflows */
3955 uint32 rxf1ovfl
; /**< number of receive fifo 1 overflows */
3965 uint32 ctx_fifo_full
;
3966 uint32 PAD
[38]; /* PAD added for counter elements to be added soon */
3967 } wl_cnt_ge80mcst_v1_t
;
3972 } wl_cnt_ge80_txfunfl_v1_t
;
3974 /** MACSTAT counters for "wl counter" version <= 10 */
3976 /* MAC counters: 32-bit version of d11.h's macstat_t */
3977 uint32 txallfrm
; /**< total number of frames sent, incl. Data, ACK, RTS, CTS,
3978 * Control Management (includes retransmissions)
3980 uint32 txrtsfrm
; /**< number of RTS sent out by the MAC */
3981 uint32 txctsfrm
; /**< number of CTS sent out by the MAC */
3982 uint32 txackfrm
; /**< number of ACK frames sent out */
3983 uint32 txdnlfrm
; /**< number of Null-Data transmission generated from template */
3984 uint32 txbcnfrm
; /**< beacons transmitted */
3985 uint32 txfunfl
[6]; /**< per-fifo tx underflows */
3986 uint32 txfbw
; /**< transmit at fallback bw (dynamic bw) */
3987 uint32 PAD0
; /**< number of MPDUs transmitted */
3988 uint32 txtplunfl
; /**< Template underflows (mac was too slow to transmit ACK/CTS
3991 uint32 txphyerror
; /**< Transmit phy error, type of error is reported in tx-status for
3992 * driver enqueued frames
3994 uint32 pktengrxducast
; /**< unicast frames rxed by the pkteng code */
3995 uint32 pktengrxdmcast
; /**< multicast frames rxed by the pkteng code */
3996 uint32 rxfrmtoolong
; /**< Received frame longer than legal limit (2346 bytes) */
3997 uint32 rxfrmtooshrt
; /**< Received frame did not contain enough bytes for its frame type */
3998 uint32 rxinvmachdr
; /**< Either the protocol version != 0 or frame type not
3999 * data/control/management
4001 uint32 rxbadfcs
; /**< number of frames for which the CRC check failed in the MAC */
4002 uint32 rxbadplcp
; /**< parity check of the PLCP header failed */
4003 uint32 rxcrsglitch
; /**< PHY was able to correlate the preamble but not the header */
4004 uint32 rxstrt
; /**< Number of received frames with a good PLCP
4005 * (i.e. passing parity check)
4007 uint32 rxdfrmucastmbss
; /* number of received DATA frames with good FCS and matching RA */
4008 uint32 rxmfrmucastmbss
; /* number of received mgmt frames with good FCS and matching RA */
4009 uint32 rxcfrmucast
; /**< number of received CNTRL frames with good FCS and matching RA */
4010 uint32 rxrtsucast
; /**< number of unicast RTS addressed to the MAC (good FCS) */
4011 uint32 rxctsucast
; /**< number of unicast CTS addressed to the MAC (good FCS) */
4012 uint32 rxackucast
; /**< number of ucast ACKS received (good FCS) */
4013 uint32 rxdfrmocast
; /**< number of received DATA frames (good FCS and not matching RA) */
4014 uint32 rxmfrmocast
; /**< number of received MGMT frames (good FCS and not matching RA) */
4015 uint32 rxcfrmocast
; /**< number of received CNTRL frame (good FCS and not matching RA) */
4016 uint32 rxrtsocast
; /**< number of received RTS not addressed to the MAC */
4017 uint32 rxctsocast
; /**< number of received CTS not addressed to the MAC */
4018 uint32 rxdfrmmcast
; /**< number of RX Data multicast frames received by the MAC */
4019 uint32 rxmfrmmcast
; /**< number of RX Management multicast frames received by the MAC */
4020 uint32 rxcfrmmcast
; /**< number of RX Control multicast frames received by the MAC
4021 * (unlikely to see these)
4023 uint32 rxbeaconmbss
; /**< beacons received from member of BSS */
4024 uint32 rxdfrmucastobss
; /**< number of unicast frames addressed to the MAC from
4025 * other BSS (WDS FRAME)
4027 uint32 rxbeaconobss
; /**< beacons received from other BSS */
4028 uint32 rxrsptmout
; /**< number of response timeouts for transmitted frames
4029 * expecting a response
4031 uint32 bcntxcancl
; /**< transmit beacons canceled due to receipt of beacon (IBSS) */
4033 uint32 rxf0ovfl
; /**< number of receive fifo 0 overflows */
4034 uint32 rxf1ovfl
; /**< Number of receive fifo 1 overflows (obsolete) */
4035 uint32 rxf2ovfl
; /**< Number of receive fifo 2 overflows (obsolete) */
4036 uint32 txsfovfl
; /**< Number of transmit status fifo overflows (obsolete) */
4037 uint32 pmqovfl
; /**< number of PMQ overflows */
4038 uint32 rxcgprqfrm
; /**< number of received Probe requests that made it into
4041 uint32 rxcgprsqovfl
; /**< Rx Probe Request Que overflow in the AP */
4042 uint32 txcgprsfail
; /**< Tx Probe Response Fail. AP sent probe response but did
4045 uint32 txcgprssuc
; /**< Tx Probe Response Success (ACK was received) */
4046 uint32 prs_timeout
; /**< number of probe requests that were dropped from the PRQ
4047 * fifo because a probe response could not be sent out within
4048 * the time limit defined in M_PRS_MAXTIME
4050 uint32 rxnack
; /**< obsolete */
4051 uint32 frmscons
; /**< obsolete */
4052 uint32 txnack
; /**< obsolete */
4053 uint32 rxback
; /**< blockack rxcnt */
4054 uint32 txback
; /**< blockack txcnt */
4055 uint32 bphy_rxcrsglitch
; /**< PHY count of bphy glitches */
4056 uint32 rxdrop20s
; /**< drop secondary cnt */
4057 uint32 rxtoolate
; /**< receive too late */
4058 uint32 bphy_badplcp
; /**< number of bad PLCP reception on BPHY rate */
4059 } wl_cnt_v_le10_mcst_t
;
4061 #define MAX_RX_FIFO 3
4062 #define WL_RXFIFO_CNT_VERSION 1 /* current version of wl_rxfifo_cnt_t */
4064 /* Counters for frames received from rx fifos */
4066 uint16 length
; /* length of entire structure */
4067 uint32 rxf_data
[MAX_RX_FIFO
]; /* data frames from rx fifo */
4068 uint32 rxf_mgmtctl
[MAX_RX_FIFO
]; /* mgmt/ctl frames from rx fifo */
4072 uint16 version
; /**< see definition of WL_CNT_T_VERSION */
4073 uint16 length
; /**< length of entire structure */
4075 /* transmit stat counters */
4076 uint32 txframe
; /**< tx data frames */
4077 uint32 txbyte
; /**< tx data bytes */
4078 uint32 txretrans
; /**< tx mac retransmits */
4079 uint32 txerror
; /**< tx data errors (derived: sum of others) */
4080 uint32 txctl
; /**< tx management frames */
4081 uint32 txprshort
; /**< tx short preamble frames */
4082 uint32 txserr
; /**< tx status errors */
4083 uint32 txnobuf
; /**< tx out of buffers errors */
4084 uint32 txnoassoc
; /**< tx discard because we're not associated */
4085 uint32 txrunt
; /**< tx runt frames */
4086 uint32 txchit
; /**< tx header cache hit (fastpath) */
4087 uint32 txcmiss
; /**< tx header cache miss (slowpath) */
4089 /* transmit chip error counters */
4090 uint32 txuflo
; /**< tx fifo underflows */
4091 uint32 txphyerr
; /**< tx phy errors (indicated in tx status) */
4094 /* receive stat counters */
4095 uint32 rxframe
; /**< rx data frames */
4096 uint32 rxbyte
; /**< rx data bytes */
4097 uint32 rxerror
; /**< rx data errors (derived: sum of others) */
4098 uint32 rxctl
; /**< rx management frames */
4099 uint32 rxnobuf
; /**< rx out of buffers errors */
4100 uint32 rxnondata
; /**< rx non data frames in the data channel errors */
4101 uint32 rxbadds
; /**< rx bad DS errors */
4102 uint32 rxbadcm
; /**< rx bad control or management frames */
4103 uint32 rxfragerr
; /**< rx fragmentation errors */
4104 uint32 rxrunt
; /**< rx runt frames */
4105 uint32 rxgiant
; /**< rx giant frames */
4106 uint32 rxnoscb
; /**< rx no scb error */
4107 uint32 rxbadproto
; /**< rx invalid frames */
4108 uint32 rxbadsrcmac
; /**< rx frames with Invalid Src Mac */
4109 uint32 rxbadda
; /**< rx frames tossed for invalid da */
4110 uint32 rxfilter
; /**< rx frames filtered out */
4112 /* receive chip error counters */
4113 uint32 rxoflo
; /**< rx fifo overflow errors */
4114 uint32 rxuflo
[NFIFO
]; /**< rx dma descriptor underflow errors */
4116 uint32 d11cnt_txrts_off
; /**< d11cnt txrts value when reset d11cnt */
4117 uint32 d11cnt_rxcrc_off
; /**< d11cnt rxcrc value when reset d11cnt */
4118 uint32 d11cnt_txnocts_off
; /**< d11cnt txnocts value when reset d11cnt */
4121 uint32 dmade
; /**< tx/rx dma descriptor errors */
4122 uint32 dmada
; /**< tx/rx dma data errors */
4123 uint32 dmape
; /**< tx/rx dma descriptor protocol errors */
4124 uint32 reset
; /**< reset count */
4125 uint32 tbtt
; /**< cnts the TBTT int's */
4127 uint32 pkt_callback_reg_fail
; /**< callbacks register failure */
4129 /* MAC counters: 32-bit version of d11.h's macstat_t */
4130 uint32 txallfrm
; /**< total number of frames sent, incl. Data, ACK, RTS, CTS,
4131 * Control Management (includes retransmissions)
4133 uint32 txrtsfrm
; /**< number of RTS sent out by the MAC */
4134 uint32 txctsfrm
; /**< number of CTS sent out by the MAC */
4135 uint32 txackfrm
; /**< number of ACK frames sent out */
4136 uint32 txdnlfrm
; /**< Not used */
4137 uint32 txbcnfrm
; /**< beacons transmitted */
4138 uint32 txfunfl
[6]; /**< per-fifo tx underflows */
4139 uint32 rxtoolate
; /**< receive too late */
4140 uint32 txfbw
; /**< transmit at fallback bw (dynamic bw) */
4141 uint32 txtplunfl
; /**< Template underflows (mac was too slow to transmit ACK/CTS
4144 uint32 txphyerror
; /**< Transmit phy error, type of error is reported in tx-status for
4145 * driver enqueued frames
4147 uint32 rxfrmtoolong
; /**< Received frame longer than legal limit (2346 bytes) */
4148 uint32 rxfrmtooshrt
; /**< Received frame did not contain enough bytes for its frame type */
4149 uint32 rxinvmachdr
; /**< Either the protocol version != 0 or frame type not
4150 * data/control/management
4152 uint32 rxbadfcs
; /**< number of frames for which the CRC check failed in the MAC */
4153 uint32 rxbadplcp
; /**< parity check of the PLCP header failed */
4154 uint32 rxcrsglitch
; /**< PHY was able to correlate the preamble but not the header */
4155 uint32 rxstrt
; /**< Number of received frames with a good PLCP
4156 * (i.e. passing parity check)
4158 uint32 rxdfrmucastmbss
; /* Number of received DATA frames with good FCS and matching RA */
4159 uint32 rxmfrmucastmbss
; /* number of received mgmt frames with good FCS and matching RA */
4160 uint32 rxcfrmucast
; /**< number of received CNTRL frames with good FCS and matching RA */
4161 uint32 rxrtsucast
; /**< number of unicast RTS addressed to the MAC (good FCS) */
4162 uint32 rxctsucast
; /**< number of unicast CTS addressed to the MAC (good FCS) */
4163 uint32 rxackucast
; /**< number of ucast ACKS received (good FCS) */
4164 uint32 rxdfrmocast
; /**< number of received DATA frames (good FCS and not matching RA) */
4165 uint32 rxmfrmocast
; /**< number of received MGMT frames (good FCS and not matching RA) */
4166 uint32 rxcfrmocast
; /**< number of received CNTRL frame (good FCS and not matching RA) */
4167 uint32 rxrtsocast
; /**< number of received RTS not addressed to the MAC */
4168 uint32 rxctsocast
; /**< number of received CTS not addressed to the MAC */
4169 uint32 rxdfrmmcast
; /**< number of RX Data multicast frames received by the MAC */
4170 uint32 rxmfrmmcast
; /**< number of RX Management multicast frames received by the MAC */
4171 uint32 rxcfrmmcast
; /**< number of RX Control multicast frames received by the MAC
4172 * (unlikely to see these)
4174 uint32 rxbeaconmbss
; /**< beacons received from member of BSS */
4175 uint32 rxdfrmucastobss
; /**< number of unicast frames addressed to the MAC from
4176 * other BSS (WDS FRAME)
4178 uint32 rxbeaconobss
; /**< beacons received from other BSS */
4179 uint32 rxrsptmout
; /**< Number of response timeouts for transmitted frames
4180 * expecting a response
4182 uint32 bcntxcancl
; /**< transmit beacons canceled due to receipt of beacon (IBSS) */
4183 uint32 rxf0ovfl
; /**< Number of receive fifo 0 overflows */
4184 uint32 rxf1ovfl
; /**< Number of receive fifo 1 overflows (obsolete) */
4185 uint32 rxf2ovfl
; /**< Number of receive fifo 2 overflows (obsolete) */
4186 uint32 txsfovfl
; /**< Number of transmit status fifo overflows (obsolete) */
4187 uint32 pmqovfl
; /**< Number of PMQ overflows */
4188 uint32 rxcgprqfrm
; /**< Number of received Probe requests that made it into
4191 uint32 rxcgprsqovfl
; /**< Rx Probe Request Que overflow in the AP */
4192 uint32 txcgprsfail
; /**< Tx Probe Response Fail. AP sent probe response but did
4195 uint32 txcgprssuc
; /**< Tx Probe Response Success (ACK was received) */
4196 uint32 prs_timeout
; /**< Number of probe requests that were dropped from the PRQ
4197 * fifo because a probe response could not be sent out within
4198 * the time limit defined in M_PRS_MAXTIME
4200 uint32 rxnack
; /**< obsolete */
4201 uint32 frmscons
; /**< obsolete */
4202 uint32 txnack
; /**< obsolete */
4203 uint32 rxback
; /**< blockack rxcnt */
4204 uint32 txback
; /**< blockack txcnt */
4206 /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
4207 uint32 txfrag
; /**< dot11TransmittedFragmentCount */
4208 uint32 txmulti
; /**< dot11MulticastTransmittedFrameCount */
4209 uint32 txfail
; /**< dot11FailedCount */
4210 uint32 txretry
; /**< dot11RetryCount */
4211 uint32 txretrie
; /**< dot11MultipleRetryCount */
4212 uint32 rxdup
; /**< dot11FrameduplicateCount */
4213 uint32 txrts
; /**< dot11RTSSuccessCount */
4214 uint32 txnocts
; /**< dot11RTSFailureCount */
4215 uint32 txnoack
; /**< dot11ACKFailureCount */
4216 uint32 rxfrag
; /**< dot11ReceivedFragmentCount */
4217 uint32 rxmulti
; /**< dot11MulticastReceivedFrameCount */
4218 uint32 rxcrc
; /**< dot11FCSErrorCount */
4219 uint32 txfrmsnt
; /**< dot11TransmittedFrameCount (bogus MIB?) */
4220 uint32 rxundec
; /**< dot11WEPUndecryptableCount */
4222 /* WPA2 counters (see rxundec for DecryptFailureCount) */
4223 uint32 tkipmicfaill
; /**< TKIPLocalMICFailures */
4224 uint32 tkipcntrmsr
; /**< TKIPCounterMeasuresInvoked */
4225 uint32 tkipreplay
; /**< TKIPReplays */
4226 uint32 ccmpfmterr
; /**< CCMPFormatErrors */
4227 uint32 ccmpreplay
; /**< CCMPReplays */
4228 uint32 ccmpundec
; /**< CCMPDecryptErrors */
4229 uint32 fourwayfail
; /**< FourWayHandshakeFailures */
4230 uint32 wepundec
; /**< dot11WEPUndecryptableCount */
4231 uint32 wepicverr
; /**< dot11WEPICVErrorCount */
4232 uint32 decsuccess
; /**< DecryptSuccessCount */
4233 uint32 tkipicverr
; /**< TKIPICVErrorCount */
4234 uint32 wepexcluded
; /**< dot11WEPExcludedCount */
4236 uint32 txchanrej
; /**< Tx frames suppressed due to channel rejection */
4237 uint32 psmwds
; /**< Count PSM watchdogs */
4238 uint32 phywatchdog
; /**< Count Phy watchdogs (triggered by ucode) */
4240 /* MBSS counters, AP only */
4241 uint32 prq_entries_handled
; /**< PRQ entries read in */
4242 uint32 prq_undirected_entries
; /**< which were bcast bss & ssid */
4243 uint32 prq_bad_entries
; /**< which could not be translated to info */
4244 uint32 atim_suppress_count
; /**< TX suppressions on ATIM fifo */
4245 uint32 bcn_template_not_ready
; /**< Template marked in use on send bcn ... */
4246 uint32 bcn_template_not_ready_done
; /**< ...but "DMA done" interrupt rcvd */
4247 uint32 late_tbtt_dpc
; /**< TBTT DPC did not happen in time */
4249 /* per-rate receive stat counters */
4250 uint32 rx1mbps
; /**< packets rx at 1Mbps */
4251 uint32 rx2mbps
; /**< packets rx at 2Mbps */
4252 uint32 rx5mbps5
; /**< packets rx at 5.5Mbps */
4253 uint32 rx6mbps
; /**< packets rx at 6Mbps */
4254 uint32 rx9mbps
; /**< packets rx at 9Mbps */
4255 uint32 rx11mbps
; /**< packets rx at 11Mbps */
4256 uint32 rx12mbps
; /**< packets rx at 12Mbps */
4257 uint32 rx18mbps
; /**< packets rx at 18Mbps */
4258 uint32 rx24mbps
; /**< packets rx at 24Mbps */
4259 uint32 rx36mbps
; /**< packets rx at 36Mbps */
4260 uint32 rx48mbps
; /**< packets rx at 48Mbps */
4261 uint32 rx54mbps
; /**< packets rx at 54Mbps */
4262 uint32 rx108mbps
; /**< packets rx at 108mbps */
4263 uint32 rx162mbps
; /**< packets rx at 162mbps */
4264 uint32 rx216mbps
; /**< packets rx at 216 mbps */
4265 uint32 rx270mbps
; /**< packets rx at 270 mbps */
4266 uint32 rx324mbps
; /**< packets rx at 324 mbps */
4267 uint32 rx378mbps
; /**< packets rx at 378 mbps */
4268 uint32 rx432mbps
; /**< packets rx at 432 mbps */
4269 uint32 rx486mbps
; /**< packets rx at 486 mbps */
4270 uint32 rx540mbps
; /**< packets rx at 540 mbps */
4272 /* pkteng rx frame stats */
4273 uint32 pktengrxducast
; /**< unicast frames rxed by the pkteng code */
4274 uint32 pktengrxdmcast
; /**< multicast frames rxed by the pkteng code */
4276 uint32 rfdisable
; /**< count of radio disables */
4277 uint32 bphy_rxcrsglitch
; /**< PHY count of bphy glitches */
4278 uint32 bphy_badplcp
;
4280 uint32 txexptime
; /**< Tx frames suppressed due to timer expiration */
4282 uint32 txmpdu_sgi
; /**< count for sgi transmit */
4283 uint32 rxmpdu_sgi
; /**< count for sgi received */
4284 uint32 txmpdu_stbc
; /**< count for stbc transmit */
4285 uint32 rxmpdu_stbc
; /**< count for stbc received */
4287 uint32 rxundec_mcst
; /**< dot11WEPUndecryptableCount */
4289 /* WPA2 counters (see rxundec for DecryptFailureCount) */
4290 uint32 tkipmicfaill_mcst
; /**< TKIPLocalMICFailures */
4291 uint32 tkipcntrmsr_mcst
; /**< TKIPCounterMeasuresInvoked */
4292 uint32 tkipreplay_mcst
; /**< TKIPReplays */
4293 uint32 ccmpfmterr_mcst
; /**< CCMPFormatErrors */
4294 uint32 ccmpreplay_mcst
; /**< CCMPReplays */
4295 uint32 ccmpundec_mcst
; /**< CCMPDecryptErrors */
4296 uint32 fourwayfail_mcst
; /**< FourWayHandshakeFailures */
4297 uint32 wepundec_mcst
; /**< dot11WEPUndecryptableCount */
4298 uint32 wepicverr_mcst
; /**< dot11WEPICVErrorCount */
4299 uint32 decsuccess_mcst
; /**< DecryptSuccessCount */
4300 uint32 tkipicverr_mcst
; /**< TKIPICVErrorCount */
4301 uint32 wepexcluded_mcst
; /**< dot11WEPExcludedCount */
4303 uint32 dma_hang
; /**< count for dma hang */
4304 uint32 reinit
; /**< count for reinit */
4306 uint32 pstatxucast
; /**< count of ucast frames xmitted on all psta assoc */
4307 uint32 pstatxnoassoc
; /**< count of txnoassoc frames xmitted on all psta assoc */
4308 uint32 pstarxucast
; /**< count of ucast frames received on all psta assoc */
4309 uint32 pstarxbcmc
; /**< count of bcmc frames received on all psta */
4310 uint32 pstatxbcmc
; /**< count of bcmc frames transmitted on all psta */
4312 uint32 cso_passthrough
; /**< hw cso required but passthrough */
4313 uint32 cso_normal
; /**< hw cso hdr for normal process */
4314 uint32 chained
; /**< number of frames chained */
4315 uint32 chainedsz1
; /**< number of chain size 1 frames */
4316 uint32 unchained
; /**< number of frames not chained */
4317 uint32 maxchainsz
; /**< max chain size so far */
4318 uint32 currchainsz
; /**< current chain size */
4319 uint32 rxdrop20s
; /**< drop secondary cnt */
4320 uint32 pciereset
; /**< Secondary Bus Reset issued by driver */
4321 uint32 cfgrestore
; /**< configspace restore by driver */
4322 uint32 reinitreason
[NREINITREASONCOUNT
]; /**< reinitreason counters; 0: Unknown reason */
4323 uint32 rxrtry
; /**< num of received packets with retry bit on */
4324 uint32 txmpdu
; /**< macstat cnt only valid in ver 11. number of MPDUs txed. */
4325 uint32 rxnodelim
; /**< macstat cnt only valid in ver 11.
4326 * number of occasions that no valid delimiter is detected
4329 uint32 rxmpdu_mu
; /**< Number of MU MPDUs received */
4331 /* detailed control/management frames */
4332 uint32 txbar
; /**< Number of TX BAR */
4333 uint32 rxbar
; /**< Number of RX BAR */
4334 uint32 txpspoll
; /**< Number of TX PS-poll */
4335 uint32 rxpspoll
; /**< Number of RX PS-poll */
4336 uint32 txnull
; /**< Number of TX NULL_DATA */
4337 uint32 rxnull
; /**< Number of RX NULL_DATA */
4338 uint32 txqosnull
; /**< Number of TX NULL_QoSDATA */
4339 uint32 rxqosnull
; /**< Number of RX NULL_QoSDATA */
4340 uint32 txassocreq
; /**< Number of TX ASSOC request */
4341 uint32 rxassocreq
; /**< Number of RX ASSOC request */
4342 uint32 txreassocreq
; /**< Number of TX REASSOC request */
4343 uint32 rxreassocreq
; /**< Number of RX REASSOC request */
4344 uint32 txdisassoc
; /**< Number of TX DISASSOC */
4345 uint32 rxdisassoc
; /**< Number of RX DISASSOC */
4346 uint32 txassocrsp
; /**< Number of TX ASSOC response */
4347 uint32 rxassocrsp
; /**< Number of RX ASSOC response */
4348 uint32 txreassocrsp
; /**< Number of TX REASSOC response */
4349 uint32 rxreassocrsp
; /**< Number of RX REASSOC response */
4350 uint32 txauth
; /**< Number of TX AUTH */
4351 uint32 rxauth
; /**< Number of RX AUTH */
4352 uint32 txdeauth
; /**< Number of TX DEAUTH */
4353 uint32 rxdeauth
; /**< Number of RX DEAUTH */
4354 uint32 txprobereq
; /**< Number of TX probe request */
4355 uint32 rxprobereq
; /**< Number of RX probe request */
4356 uint32 txprobersp
; /**< Number of TX probe response */
4357 uint32 rxprobersp
; /**< Number of RX probe response */
4358 uint32 txaction
; /**< Number of TX action frame */
4359 uint32 rxaction
; /**< Number of RX action frame */
4360 uint32 ampdu_wds
; /**< Number of AMPDU watchdogs */
4361 uint32 txlost
; /**< Number of lost packets reported in txs */
4362 uint32 txdatamcast
; /**< Number of TX multicast data packets */
4363 uint32 txdatabcast
; /**< Number of TX broadcast data packets */
4364 uint32 txbcast
; /* Broadcast TransmittedFrameCount */
4365 uint32 txdropped
; /* tx dropped pkts */
4366 uint32 rxbcast
; /* BroadcastReceivedFrameCount */
4367 uint32 rxdropped
; /* rx dropped pkts (derived: sum of others) */
4372 uint16 version
; /* see definition of WL_CNT_T_VERSION */
4373 uint16 length
; /* length of entire structure */
4375 /* transmit stat counters */
4376 uint32 txframe
; /* tx data frames */
4377 uint32 txbyte
; /* tx data bytes */
4378 uint32 txretrans
; /* tx mac retransmits */
4379 uint32 txerror
; /* tx data errors (derived: sum of others) */
4380 uint32 txctl
; /* tx management frames */
4381 uint32 txprshort
; /* tx short preamble frames */
4382 uint32 txserr
; /* tx status errors */
4383 uint32 txnobuf
; /* tx out of buffers errors */
4384 uint32 txnoassoc
; /* tx discard because we're not associated */
4385 uint32 txrunt
; /* tx runt frames */
4386 uint32 txchit
; /* tx header cache hit (fastpath) */
4387 uint32 txcmiss
; /* tx header cache miss (slowpath) */
4389 /* transmit chip error counters */
4390 uint32 txuflo
; /* tx fifo underflows */
4391 uint32 txphyerr
; /* tx phy errors (indicated in tx status) */
4394 /* receive stat counters */
4395 uint32 rxframe
; /* rx data frames */
4396 uint32 rxbyte
; /* rx data bytes */
4397 uint32 rxerror
; /* rx data errors (derived: sum of others) */
4398 uint32 rxctl
; /* rx management frames */
4399 uint32 rxnobuf
; /* rx out of buffers errors */
4400 uint32 rxnondata
; /* rx non data frames in the data channel errors */
4401 uint32 rxbadds
; /* rx bad DS errors */
4402 uint32 rxbadcm
; /* rx bad control or management frames */
4403 uint32 rxfragerr
; /* rx fragmentation errors */
4404 uint32 rxrunt
; /* rx runt frames */
4405 uint32 rxgiant
; /* rx giant frames */
4406 uint32 rxnoscb
; /* rx no scb error */
4407 uint32 rxbadproto
; /* rx invalid frames */
4408 uint32 rxbadsrcmac
; /* rx frames with Invalid Src Mac */
4409 uint32 rxbadda
; /* rx frames tossed for invalid da */
4410 uint32 rxfilter
; /* rx frames filtered out */
4412 /* receive chip error counters */
4413 uint32 rxoflo
; /* rx fifo overflow errors */
4414 uint32 rxuflo
[NFIFO
]; /* rx dma descriptor underflow errors */
4416 uint32 d11cnt_txrts_off
; /* d11cnt txrts value when reset d11cnt */
4417 uint32 d11cnt_rxcrc_off
; /* d11cnt rxcrc value when reset d11cnt */
4418 uint32 d11cnt_txnocts_off
; /* d11cnt txnocts value when reset d11cnt */
4421 uint32 dmade
; /* tx/rx dma descriptor errors */
4422 uint32 dmada
; /* tx/rx dma data errors */
4423 uint32 dmape
; /* tx/rx dma descriptor protocol errors */
4424 uint32 reset
; /* reset count */
4425 uint32 tbtt
; /* cnts the TBTT int's */
4427 uint32 pkt_callback_reg_fail
; /* callbacks register failure */
4429 /* MAC counters: 32-bit version of d11.h's macstat_t */
4430 uint32 txallfrm
; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
4431 * Control Management (includes retransmissions)
4433 uint32 txrtsfrm
; /* number of RTS sent out by the MAC */
4434 uint32 txctsfrm
; /* number of CTS sent out by the MAC */
4435 uint32 txackfrm
; /* number of ACK frames sent out */
4436 uint32 txdnlfrm
; /* Not used */
4437 uint32 txbcnfrm
; /* beacons transmitted */
4438 uint32 txfunfl
[8]; /* per-fifo tx underflows */
4439 uint32 txtplunfl
; /* Template underflows (mac was too slow to transmit ACK/CTS
4442 uint32 txphyerror
; /* Transmit phy error, type of error is reported in tx-status for
4443 * driver enqueued frames
4445 uint32 rxfrmtoolong
; /* Received frame longer than legal limit (2346 bytes) */
4446 uint32 rxfrmtooshrt
; /* Received frame did not contain enough bytes for its frame type */
4447 uint32 rxinvmachdr
; /* Either the protocol version != 0 or frame type not
4448 * data/control/management
4450 uint32 rxbadfcs
; /* number of frames for which the CRC check failed in the MAC */
4451 uint32 rxbadplcp
; /* parity check of the PLCP header failed */
4452 uint32 rxcrsglitch
; /* PHY was able to correlate the preamble but not the header */
4453 uint32 rxstrt
; /* Number of received frames with a good PLCP
4454 * (i.e. passing parity check)
4456 uint32 rxdfrmucastmbss
; /* Number of received DATA frames with good FCS and matching RA */
4457 uint32 rxmfrmucastmbss
; /* number of received mgmt frames with good FCS and matching RA */
4458 uint32 rxcfrmucast
; /* number of received CNTRL frames with good FCS and matching RA */
4459 uint32 rxrtsucast
; /* number of unicast RTS addressed to the MAC (good FCS) */
4460 uint32 rxctsucast
; /* number of unicast CTS addressed to the MAC (good FCS) */
4461 uint32 rxackucast
; /* number of ucast ACKS received (good FCS) */
4462 uint32 rxdfrmocast
; /* number of received DATA frames (good FCS and not matching RA) */
4463 uint32 rxmfrmocast
; /* number of received MGMT frames (good FCS and not matching RA) */
4464 uint32 rxcfrmocast
; /* number of received CNTRL frame (good FCS and not matching RA) */
4465 uint32 rxrtsocast
; /* number of received RTS not addressed to the MAC */
4466 uint32 rxctsocast
; /* number of received CTS not addressed to the MAC */
4467 uint32 rxdfrmmcast
; /* number of RX Data multicast frames received by the MAC */
4468 uint32 rxmfrmmcast
; /* number of RX Management multicast frames received by the MAC */
4469 uint32 rxcfrmmcast
; /* number of RX Control multicast frames received by the MAC
4470 * (unlikely to see these)
4472 uint32 rxbeaconmbss
; /* beacons received from member of BSS */
4473 uint32 rxdfrmucastobss
; /* number of unicast frames addressed to the MAC from
4474 * other BSS (WDS FRAME)
4476 uint32 rxbeaconobss
; /* beacons received from other BSS */
4477 uint32 rxrsptmout
; /* Number of response timeouts for transmitted frames
4478 * expecting a response
4480 uint32 bcntxcancl
; /* transmit beacons canceled due to receipt of beacon (IBSS) */
4481 uint32 rxf0ovfl
; /* Number of receive fifo 0 overflows */
4482 uint32 rxf1ovfl
; /* Number of receive fifo 1 overflows (obsolete) */
4483 uint32 rxf2ovfl
; /* Number of receive fifo 2 overflows (obsolete) */
4484 uint32 txsfovfl
; /* Number of transmit status fifo overflows (obsolete) */
4485 uint32 pmqovfl
; /* Number of PMQ overflows */
4486 uint32 rxcgprqfrm
; /* Number of received Probe requests that made it into
4489 uint32 rxcgprsqovfl
; /* Rx Probe Request Que overflow in the AP */
4490 uint32 txcgprsfail
; /* Tx Probe Response Fail. AP sent probe response but did
4493 uint32 txcgprssuc
; /* Tx Probe Response Success (ACK was received) */
4494 uint32 prs_timeout
; /* Number of probe requests that were dropped from the PRQ
4495 * fifo because a probe response could not be sent out within
4496 * the time limit defined in M_PRS_MAXTIME
4498 uint32 rxnack
; /* obsolete */
4499 uint32 frmscons
; /* obsolete */
4500 uint32 txnack
; /* obsolete */
4501 uint32 txglitch_nack
; /* obsolete */
4502 uint32 txburst
; /* obsolete */
4504 /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
4505 uint32 txfrag
; /* dot11TransmittedFragmentCount */
4506 uint32 txmulti
; /* dot11MulticastTransmittedFrameCount */
4507 uint32 txfail
; /* dot11FailedCount */
4508 uint32 txretry
; /* dot11RetryCount */
4509 uint32 txretrie
; /* dot11MultipleRetryCount */
4510 uint32 rxdup
; /* dot11FrameduplicateCount */
4511 uint32 txrts
; /* dot11RTSSuccessCount */
4512 uint32 txnocts
; /* dot11RTSFailureCount */
4513 uint32 txnoack
; /* dot11ACKFailureCount */
4514 uint32 rxfrag
; /* dot11ReceivedFragmentCount */
4515 uint32 rxmulti
; /* dot11MulticastReceivedFrameCount */
4516 uint32 rxcrc
; /* dot11FCSErrorCount */
4517 uint32 txfrmsnt
; /* dot11TransmittedFrameCount (bogus MIB?) */
4518 uint32 rxundec
; /* dot11WEPUndecryptableCount */
4520 /* WPA2 counters (see rxundec for DecryptFailureCount) */
4521 uint32 tkipmicfaill
; /* TKIPLocalMICFailures */
4522 uint32 tkipcntrmsr
; /* TKIPCounterMeasuresInvoked */
4523 uint32 tkipreplay
; /* TKIPReplays */
4524 uint32 ccmpfmterr
; /* CCMPFormatErrors */
4525 uint32 ccmpreplay
; /* CCMPReplays */
4526 uint32 ccmpundec
; /* CCMPDecryptErrors */
4527 uint32 fourwayfail
; /* FourWayHandshakeFailures */
4528 uint32 wepundec
; /* dot11WEPUndecryptableCount */
4529 uint32 wepicverr
; /* dot11WEPICVErrorCount */
4530 uint32 decsuccess
; /* DecryptSuccessCount */
4531 uint32 tkipicverr
; /* TKIPICVErrorCount */
4532 uint32 wepexcluded
; /* dot11WEPExcludedCount */
4534 uint32 txchanrej
; /* Tx frames suppressed due to channel rejection */
4535 uint32 psmwds
; /* Count PSM watchdogs */
4536 uint32 phywatchdog
; /* Count Phy watchdogs (triggered by ucode) */
4538 /* MBSS counters, AP only */
4539 uint32 prq_entries_handled
; /* PRQ entries read in */
4540 uint32 prq_undirected_entries
; /* which were bcast bss & ssid */
4541 uint32 prq_bad_entries
; /* which could not be translated to info */
4542 uint32 atim_suppress_count
; /* TX suppressions on ATIM fifo */
4543 uint32 bcn_template_not_ready
; /* Template marked in use on send bcn ... */
4544 uint32 bcn_template_not_ready_done
; /* ...but "DMA done" interrupt rcvd */
4545 uint32 late_tbtt_dpc
; /* TBTT DPC did not happen in time */
4547 /* per-rate receive stat counters */
4548 uint32 rx1mbps
; /* packets rx at 1Mbps */
4549 uint32 rx2mbps
; /* packets rx at 2Mbps */
4550 uint32 rx5mbps5
; /* packets rx at 5.5Mbps */
4551 uint32 rx6mbps
; /* packets rx at 6Mbps */
4552 uint32 rx9mbps
; /* packets rx at 9Mbps */
4553 uint32 rx11mbps
; /* packets rx at 11Mbps */
4554 uint32 rx12mbps
; /* packets rx at 12Mbps */
4555 uint32 rx18mbps
; /* packets rx at 18Mbps */
4556 uint32 rx24mbps
; /* packets rx at 24Mbps */
4557 uint32 rx36mbps
; /* packets rx at 36Mbps */
4558 uint32 rx48mbps
; /* packets rx at 48Mbps */
4559 uint32 rx54mbps
; /* packets rx at 54Mbps */
4560 uint32 rx108mbps
; /* packets rx at 108mbps */
4561 uint32 rx162mbps
; /* packets rx at 162mbps */
4562 uint32 rx216mbps
; /* packets rx at 216 mbps */
4563 uint32 rx270mbps
; /* packets rx at 270 mbps */
4564 uint32 rx324mbps
; /* packets rx at 324 mbps */
4565 uint32 rx378mbps
; /* packets rx at 378 mbps */
4566 uint32 rx432mbps
; /* packets rx at 432 mbps */
4567 uint32 rx486mbps
; /* packets rx at 486 mbps */
4568 uint32 rx540mbps
; /* packets rx at 540 mbps */
4570 /* pkteng rx frame stats */
4571 uint32 pktengrxducast
; /* unicast frames rxed by the pkteng code */
4572 uint32 pktengrxdmcast
; /* multicast frames rxed by the pkteng code */
4574 uint32 rfdisable
; /* count of radio disables */
4575 uint32 bphy_rxcrsglitch
; /* PHY count of bphy glitches */
4577 uint32 txexptime
; /* Tx frames suppressed due to timer expiration */
4579 uint32 txmpdu_sgi
; /* count for sgi transmit */
4580 uint32 rxmpdu_sgi
; /* count for sgi received */
4581 uint32 txmpdu_stbc
; /* count for stbc transmit */
4582 uint32 rxmpdu_stbc
; /* count for stbc received */
4584 uint32 rxundec_mcst
; /* dot11WEPUndecryptableCount */
4586 /* WPA2 counters (see rxundec for DecryptFailureCount) */
4587 uint32 tkipmicfaill_mcst
; /* TKIPLocalMICFailures */
4588 uint32 tkipcntrmsr_mcst
; /* TKIPCounterMeasuresInvoked */
4589 uint32 tkipreplay_mcst
; /* TKIPReplays */
4590 uint32 ccmpfmterr_mcst
; /* CCMPFormatErrors */
4591 uint32 ccmpreplay_mcst
; /* CCMPReplays */
4592 uint32 ccmpundec_mcst
; /* CCMPDecryptErrors */
4593 uint32 fourwayfail_mcst
; /* FourWayHandshakeFailures */
4594 uint32 wepundec_mcst
; /* dot11WEPUndecryptableCount */
4595 uint32 wepicverr_mcst
; /* dot11WEPICVErrorCount */
4596 uint32 decsuccess_mcst
; /* DecryptSuccessCount */
4597 uint32 tkipicverr_mcst
; /* TKIPICVErrorCount */
4598 uint32 wepexcluded_mcst
; /* dot11WEPExcludedCount */
4600 uint32 dma_hang
; /* count for stbc received */
4601 uint32 rxrtry
; /* number of packets with retry bit set to 1 */
4605 uint16 version
; /**< see definition of WL_CNT_T_VERSION */
4606 uint16 length
; /**< length of entire structure */
4608 /* transmit stat counters */
4609 uint32 txframe
; /**< tx data frames */
4610 uint32 txbyte
; /**< tx data bytes */
4611 uint32 txretrans
; /**< tx mac retransmits */
4612 uint32 txerror
; /**< tx data errors (derived: sum of others) */
4613 uint32 txctl
; /**< tx management frames */
4614 uint32 txprshort
; /**< tx short preamble frames */
4615 uint32 txserr
; /**< tx status errors */
4616 uint32 txnobuf
; /**< tx out of buffers errors */
4617 uint32 txnoassoc
; /**< tx discard because we're not associated */
4618 uint32 txrunt
; /**< tx runt frames */
4619 uint32 txchit
; /**< tx header cache hit (fastpath) */
4620 uint32 txcmiss
; /**< tx header cache miss (slowpath) */
4622 /* transmit chip error counters */
4623 uint32 txuflo
; /**< tx fifo underflows */
4624 uint32 txphyerr
; /**< tx phy errors (indicated in tx status) */
4627 /* receive stat counters */
4628 uint32 rxframe
; /**< rx data frames */
4629 uint32 rxbyte
; /**< rx data bytes */
4630 uint32 rxerror
; /**< rx data errors (derived: sum of others) */
4631 uint32 rxctl
; /**< rx management frames */
4632 uint32 rxnobuf
; /**< rx out of buffers errors */
4633 uint32 rxnondata
; /**< rx non data frames in the data channel errors */
4634 uint32 rxbadds
; /**< rx bad DS errors */
4635 uint32 rxbadcm
; /**< rx bad control or management frames */
4636 uint32 rxfragerr
; /**< rx fragmentation errors */
4637 uint32 rxrunt
; /**< rx runt frames */
4638 uint32 rxgiant
; /**< rx giant frames */
4639 uint32 rxnoscb
; /**< rx no scb error */
4640 uint32 rxbadproto
; /**< rx invalid frames */
4641 uint32 rxbadsrcmac
; /**< rx frames with Invalid Src Mac */
4642 uint32 rxbadda
; /**< rx frames tossed for invalid da */
4643 uint32 rxfilter
; /**< rx frames filtered out */
4645 /* receive chip error counters */
4646 uint32 rxoflo
; /**< rx fifo overflow errors */
4647 uint32 rxuflo
[NFIFO
]; /**< rx dma descriptor underflow errors */
4649 uint32 d11cnt_txrts_off
; /**< d11cnt txrts value when reset d11cnt */
4650 uint32 d11cnt_rxcrc_off
; /**< d11cnt rxcrc value when reset d11cnt */
4651 uint32 d11cnt_txnocts_off
; /**< d11cnt txnocts value when reset d11cnt */
4654 uint32 dmade
; /**< tx/rx dma descriptor errors */
4655 uint32 dmada
; /**< tx/rx dma data errors */
4656 uint32 dmape
; /**< tx/rx dma descriptor protocol errors */
4657 uint32 reset
; /**< reset count */
4658 uint32 tbtt
; /**< cnts the TBTT int's */
4660 uint32 pkt_callback_reg_fail
; /**< callbacks register failure */
4662 /* MAC counters: 32-bit version of d11.h's macstat_t */
4663 uint32 txallfrm
; /**< total number of frames sent, incl. Data, ACK, RTS, CTS,
4664 * Control Management (includes retransmissions)
4666 uint32 txrtsfrm
; /**< number of RTS sent out by the MAC */
4667 uint32 txctsfrm
; /**< number of CTS sent out by the MAC */
4668 uint32 txackfrm
; /**< number of ACK frames sent out */
4669 uint32 txdnlfrm
; /**< Not used */
4670 uint32 txbcnfrm
; /**< beacons transmitted */
4671 uint32 txfunfl
[6]; /**< per-fifo tx underflows */
4672 uint32 rxtoolate
; /**< receive too late */
4673 uint32 txfbw
; /**< transmit at fallback bw (dynamic bw) */
4674 uint32 txtplunfl
; /**< Template underflows (mac was too slow to transmit ACK/CTS
4677 uint32 txphyerror
; /**< Transmit phy error, type of error is reported in tx-status for
4678 * driver enqueued frames
4680 uint32 rxfrmtoolong
; /**< Received frame longer than legal limit (2346 bytes) */
4681 uint32 rxfrmtooshrt
; /**< Received frame did not contain enough bytes for its frame type */
4682 uint32 rxinvmachdr
; /**< Either the protocol version != 0 or frame type not
4683 * data/control/management
4685 uint32 rxbadfcs
; /**< number of frames for which the CRC check failed in the MAC */
4686 uint32 rxbadplcp
; /**< parity check of the PLCP header failed */
4687 uint32 rxcrsglitch
; /**< PHY was able to correlate the preamble but not the header */
4688 uint32 rxstrt
; /**< Number of received frames with a good PLCP
4689 * (i.e. passing parity check)
4691 uint32 rxdfrmucastmbss
; /**< # of received DATA frames with good FCS and matching RA */
4692 uint32 rxmfrmucastmbss
; /**< # of received mgmt frames with good FCS and matching RA */
4693 uint32 rxcfrmucast
; /**< # of received CNTRL frames with good FCS and matching RA */
4694 uint32 rxrtsucast
; /**< number of unicast RTS addressed to the MAC (good FCS) */
4695 uint32 rxctsucast
; /**< number of unicast CTS addressed to the MAC (good FCS) */
4696 uint32 rxackucast
; /**< number of ucast ACKS received (good FCS) */
4697 uint32 rxdfrmocast
; /**< # of received DATA frames (good FCS and not matching RA) */
4698 uint32 rxmfrmocast
; /**< # of received MGMT frames (good FCS and not matching RA) */
4699 uint32 rxcfrmocast
; /**< # of received CNTRL frame (good FCS and not matching RA) */
4700 uint32 rxrtsocast
; /**< number of received RTS not addressed to the MAC */
4701 uint32 rxctsocast
; /**< number of received CTS not addressed to the MAC */
4702 uint32 rxdfrmmcast
; /**< number of RX Data multicast frames received by the MAC */
4703 uint32 rxmfrmmcast
; /**< number of RX Management multicast frames received by the MAC */
4704 uint32 rxcfrmmcast
; /**< number of RX Control multicast frames received by the MAC
4705 * (unlikely to see these)
4707 uint32 rxbeaconmbss
; /**< beacons received from member of BSS */
4708 uint32 rxdfrmucastobss
; /**< number of unicast frames addressed to the MAC from
4709 * other BSS (WDS FRAME)
4711 uint32 rxbeaconobss
; /**< beacons received from other BSS */
4712 uint32 rxrsptmout
; /**< Number of response timeouts for transmitted frames
4713 * expecting a response
4715 uint32 bcntxcancl
; /**< transmit beacons canceled due to receipt of beacon (IBSS) */
4716 uint32 rxf0ovfl
; /**< Number of receive fifo 0 overflows */
4717 uint32 rxf1ovfl
; /**< Number of receive fifo 1 overflows (obsolete) */
4718 uint32 rxf2ovfl
; /**< Number of receive fifo 2 overflows (obsolete) */
4719 uint32 txsfovfl
; /**< Number of transmit status fifo overflows (obsolete) */
4720 uint32 pmqovfl
; /**< Number of PMQ overflows */
4721 uint32 rxcgprqfrm
; /**< Number of received Probe requests that made it into
4724 uint32 rxcgprsqovfl
; /**< Rx Probe Request Que overflow in the AP */
4725 uint32 txcgprsfail
; /**< Tx Probe Response Fail. AP sent probe response but did
4728 uint32 txcgprssuc
; /**< Tx Probe Response Success (ACK was received) */
4729 uint32 prs_timeout
; /**< Number of probe requests that were dropped from the PRQ
4730 * fifo because a probe response could not be sent out within
4731 * the time limit defined in M_PRS_MAXTIME
4735 uint32 txnack
; /**< obsolete */
4736 uint32 rxback
; /**< blockack rxcnt */
4737 uint32 txback
; /**< blockack txcnt */
4739 /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
4740 uint32 txfrag
; /**< dot11TransmittedFragmentCount */
4741 uint32 txmulti
; /**< dot11MulticastTransmittedFrameCount */
4742 uint32 txfail
; /**< dot11FailedCount */
4743 uint32 txretry
; /**< dot11RetryCount */
4744 uint32 txretrie
; /**< dot11MultipleRetryCount */
4745 uint32 rxdup
; /**< dot11FrameduplicateCount */
4746 uint32 txrts
; /**< dot11RTSSuccessCount */
4747 uint32 txnocts
; /**< dot11RTSFailureCount */
4748 uint32 txnoack
; /**< dot11ACKFailureCount */
4749 uint32 rxfrag
; /**< dot11ReceivedFragmentCount */
4750 uint32 rxmulti
; /**< dot11MulticastReceivedFrameCount */
4751 uint32 rxcrc
; /**< dot11FCSErrorCount */
4752 uint32 txfrmsnt
; /**< dot11TransmittedFrameCount (bogus MIB?) */
4753 uint32 rxundec
; /**< dot11WEPUndecryptableCount */
4755 /* WPA2 counters (see rxundec for DecryptFailureCount) */
4756 uint32 tkipmicfaill
; /**< TKIPLocalMICFailures */
4757 uint32 tkipcntrmsr
; /**< TKIPCounterMeasuresInvoked */
4758 uint32 tkipreplay
; /**< TKIPReplays */
4759 uint32 ccmpfmterr
; /**< CCMPFormatErrors */
4760 uint32 ccmpreplay
; /**< CCMPReplays */
4761 uint32 ccmpundec
; /**< CCMPDecryptErrors */
4762 uint32 fourwayfail
; /**< FourWayHandshakeFailures */
4763 uint32 wepundec
; /**< dot11WEPUndecryptableCount */
4764 uint32 wepicverr
; /**< dot11WEPICVErrorCount */
4765 uint32 decsuccess
; /**< DecryptSuccessCount */
4766 uint32 tkipicverr
; /**< TKIPICVErrorCount */
4767 uint32 wepexcluded
; /**< dot11WEPExcludedCount */
4769 uint32 rxundec_mcst
; /**< dot11WEPUndecryptableCount */
4771 /* WPA2 counters (see rxundec for DecryptFailureCount) */
4772 uint32 tkipmicfaill_mcst
; /**< TKIPLocalMICFailures */
4773 uint32 tkipcntrmsr_mcst
; /**< TKIPCounterMeasuresInvoked */
4774 uint32 tkipreplay_mcst
; /**< TKIPReplays */
4775 uint32 ccmpfmterr_mcst
; /**< CCMPFormatErrors */
4776 uint32 ccmpreplay_mcst
; /**< CCMPReplays */
4777 uint32 ccmpundec_mcst
; /**< CCMPDecryptErrors */
4778 uint32 fourwayfail_mcst
; /**< FourWayHandshakeFailures */
4779 uint32 wepundec_mcst
; /**< dot11WEPUndecryptableCount */
4780 uint32 wepicverr_mcst
; /**< dot11WEPICVErrorCount */
4781 uint32 decsuccess_mcst
; /**< DecryptSuccessCount */
4782 uint32 tkipicverr_mcst
; /**< TKIPICVErrorCount */
4783 uint32 wepexcluded_mcst
; /**< dot11WEPExcludedCount */
4785 uint32 txchanrej
; /**< Tx frames suppressed due to channel rejection */
4786 uint32 txexptime
; /**< Tx frames suppressed due to timer expiration */
4787 uint32 psmwds
; /**< Count PSM watchdogs */
4788 uint32 phywatchdog
; /**< Count Phy watchdogs (triggered by ucode) */
4790 /* MBSS counters, AP only */
4791 uint32 prq_entries_handled
; /**< PRQ entries read in */
4792 uint32 prq_undirected_entries
; /**< which were bcast bss & ssid */
4793 uint32 prq_bad_entries
; /**< which could not be translated to info */
4794 uint32 atim_suppress_count
; /**< TX suppressions on ATIM fifo */
4795 uint32 bcn_template_not_ready
; /**< Template marked in use on send bcn ... */
4796 uint32 bcn_template_not_ready_done
; /**< ...but "DMA done" interrupt rcvd */
4797 uint32 late_tbtt_dpc
; /**< TBTT DPC did not happen in time */
4799 /* per-rate receive stat counters */
4800 uint32 rx1mbps
; /**< packets rx at 1Mbps */
4801 uint32 rx2mbps
; /**< packets rx at 2Mbps */
4802 uint32 rx5mbps5
; /**< packets rx at 5.5Mbps */
4803 uint32 rx6mbps
; /**< packets rx at 6Mbps */
4804 uint32 rx9mbps
; /**< packets rx at 9Mbps */
4805 uint32 rx11mbps
; /**< packets rx at 11Mbps */
4806 uint32 rx12mbps
; /**< packets rx at 12Mbps */
4807 uint32 rx18mbps
; /**< packets rx at 18Mbps */
4808 uint32 rx24mbps
; /**< packets rx at 24Mbps */
4809 uint32 rx36mbps
; /**< packets rx at 36Mbps */
4810 uint32 rx48mbps
; /**< packets rx at 48Mbps */
4811 uint32 rx54mbps
; /**< packets rx at 54Mbps */
4812 uint32 rx108mbps
; /**< packets rx at 108mbps */
4813 uint32 rx162mbps
; /**< packets rx at 162mbps */
4814 uint32 rx216mbps
; /**< packets rx at 216 mbps */
4815 uint32 rx270mbps
; /**< packets rx at 270 mbps */
4816 uint32 rx324mbps
; /**< packets rx at 324 mbps */
4817 uint32 rx378mbps
; /**< packets rx at 378 mbps */
4818 uint32 rx432mbps
; /**< packets rx at 432 mbps */
4819 uint32 rx486mbps
; /**< packets rx at 486 mbps */
4820 uint32 rx540mbps
; /**< packets rx at 540 mbps */
4822 /* pkteng rx frame stats */
4823 uint32 pktengrxducast
; /**< unicast frames rxed by the pkteng code */
4824 uint32 pktengrxdmcast
; /**< multicast frames rxed by the pkteng code */
4826 uint32 rfdisable
; /**< count of radio disables */
4827 uint32 bphy_rxcrsglitch
; /**< PHY count of bphy glitches */
4828 uint32 bphy_badplcp
;
4830 uint32 txmpdu_sgi
; /**< count for sgi transmit */
4831 uint32 rxmpdu_sgi
; /**< count for sgi received */
4832 uint32 txmpdu_stbc
; /**< count for stbc transmit */
4833 uint32 rxmpdu_stbc
; /**< count for stbc received */
4835 uint32 rxdrop20s
; /**< drop secondary cnt */
4838 #define WL_DELTA_STATS_T_VERSION 2 /**< current version of wl_delta_stats_t struct */
4841 uint16 version
; /**< see definition of WL_DELTA_STATS_T_VERSION */
4842 uint16 length
; /**< length of entire structure */
4844 /* transmit stat counters */
4845 uint32 txframe
; /**< tx data frames */
4846 uint32 txbyte
; /**< tx data bytes */
4847 uint32 txretrans
; /**< tx mac retransmits */
4848 uint32 txfail
; /**< tx failures */
4850 /* receive stat counters */
4851 uint32 rxframe
; /**< rx data frames */
4852 uint32 rxbyte
; /**< rx data bytes */
4854 /* per-rate receive stat counters */
4855 uint32 rx1mbps
; /**< packets rx at 1Mbps */
4856 uint32 rx2mbps
; /**< packets rx at 2Mbps */
4857 uint32 rx5mbps5
; /**< packets rx at 5.5Mbps */
4858 uint32 rx6mbps
; /**< packets rx at 6Mbps */
4859 uint32 rx9mbps
; /**< packets rx at 9Mbps */
4860 uint32 rx11mbps
; /**< packets rx at 11Mbps */
4861 uint32 rx12mbps
; /**< packets rx at 12Mbps */
4862 uint32 rx18mbps
; /**< packets rx at 18Mbps */
4863 uint32 rx24mbps
; /**< packets rx at 24Mbps */
4864 uint32 rx36mbps
; /**< packets rx at 36Mbps */
4865 uint32 rx48mbps
; /**< packets rx at 48Mbps */
4866 uint32 rx54mbps
; /**< packets rx at 54Mbps */
4867 uint32 rx108mbps
; /**< packets rx at 108mbps */
4868 uint32 rx162mbps
; /**< packets rx at 162mbps */
4869 uint32 rx216mbps
; /**< packets rx at 216 mbps */
4870 uint32 rx270mbps
; /**< packets rx at 270 mbps */
4871 uint32 rx324mbps
; /**< packets rx at 324 mbps */
4872 uint32 rx378mbps
; /**< packets rx at 378 mbps */
4873 uint32 rx432mbps
; /**< packets rx at 432 mbps */
4874 uint32 rx486mbps
; /**< packets rx at 486 mbps */
4875 uint32 rx540mbps
; /**< packets rx at 540 mbps */
4880 uint32 bphy_rxcrsglitch
;
4881 uint32 bphy_badplcp
;
4883 uint32 slice_index
; /**< Slice for which stats are reported */
4887 /* Partial statistics counter report */
4888 #define WL_CNT_CTL_MGT_FRAMES 0
4894 /* detailed control/management frames */
4901 uint32 txreassocreq
;
4902 uint32 rxreassocreq
;
4907 uint32 txreassocrsp
;
4908 uint32 rxreassocrsp
;
4936 } wl_traffic_stats_t
;
4939 uint16 version
; /**< see definition of WL_WME_CNT_VERSION */
4940 uint16 length
; /**< length of entire structure */
4942 wl_traffic_stats_t tx
[AC_COUNT
]; /**< Packets transmitted */
4943 wl_traffic_stats_t tx_failed
[AC_COUNT
]; /**< Packets dropped or failed to transmit */
4944 wl_traffic_stats_t rx
[AC_COUNT
]; /**< Packets received */
4945 wl_traffic_stats_t rx_failed
[AC_COUNT
]; /**< Packets failed to receive */
4947 wl_traffic_stats_t forward
[AC_COUNT
]; /**< Packets forwarded by AP */
4949 wl_traffic_stats_t tx_expired
[AC_COUNT
]; /**< packets dropped due to lifetime expiry */
4953 struct wl_msglevel2
{
4958 /* A versioned structure for setting and retrieving debug message levels. */
4959 #define WL_MSGLEVEL_STRUCT_VERSION_1 1
4961 typedef struct wl_msglevel_v1
{
4967 /* add another uint32 when full */
4970 #define WL_ICMP_IPV6_CFG_VERSION 1
4971 #define WL_ICMP_IPV6_CLEAR_ALL (1 << 0)
4973 typedef struct wl_icmp_ipv6_cfg
{
4976 uint16 fixed_length
;
4979 /* num_ipv6 to follow */
4980 struct ipv6_addr host_ipv6
[];
4981 } wl_icmp_ipv6_cfg_t
;
4983 #define WL_ICMP_CFG_IPV6_FIXED_LEN OFFSETOF(wl_icmp_ipv6_cfg_t, host_ipv6)
4984 #define WL_ICMP_CFG_IPV6_LEN(count) (WL_ICMP_CFG_IPV6_FIXED_LEN + \
4985 ((count) * sizeof(struct ipv6_addr)))
4987 typedef struct wl_mkeep_alive_pkt
{
4988 uint16 version
; /* Version for mkeep_alive */
4989 uint16 length
; /* length of fixed parameters in the structure */
4990 uint32 period_msec
; /* high bit on means immediate send */
4992 uint8 keep_alive_id
; /* 0 - 3 for N = 4 */
4994 } wl_mkeep_alive_pkt_t
;
4996 #define WL_MKEEP_ALIVE_VERSION 1
4997 #define WL_MKEEP_ALIVE_FIXED_LEN OFFSETOF(wl_mkeep_alive_pkt_t, data)
4998 #define WL_MKEEP_ALIVE_PRECISION 500
4999 #define WL_MKEEP_ALIVE_PERIOD_MASK 0x7FFFFFFF
5000 #define WL_MKEEP_ALIVE_IMMEDIATE 0x80000000
5002 /** TCP Keep-Alive conn struct */
5003 typedef struct wl_mtcpkeep_alive_conn_pkt
{
5004 struct ether_addr saddr
; /**< src mac address */
5005 struct ether_addr daddr
; /**< dst mac address */
5006 struct ipv4_addr sipaddr
; /**< source IP addr */
5007 struct ipv4_addr dipaddr
; /**< dest IP addr */
5008 uint16 sport
; /**< src port */
5009 uint16 dport
; /**< dest port */
5010 uint32 seq
; /**< seq number */
5011 uint32 ack
; /**< ACK number */
5012 uint16 tcpwin
; /**< TCP window */
5014 } wl_mtcpkeep_alive_conn_pkt_t
;
5016 /** TCP Keep-Alive interval struct */
5017 typedef struct wl_mtcpkeep_alive_timers_pkt
{
5018 uint16 interval
; /**< interval timer */
5019 uint16 retry_interval
; /**< retry_interval timer */
5020 uint16 retry_count
; /**< retry_count */
5021 } wl_mtcpkeep_alive_timers_pkt_t
;
5023 typedef struct wake_info
{
5025 uint32 wake_info_len
; /**< size of packet */
5029 typedef struct wake_pkt
{
5030 uint32 wake_pkt_len
; /**< size of packet */
5034 #define WL_MTCPKEEP_ALIVE_VERSION 1
5038 #define WLC_BA_CNT_VERSION 1 /**< current version of wlc_ba_cnt_t */
5040 /** block ack related stats */
5041 typedef struct wlc_ba_cnt
{
5042 uint16 version
; /**< WLC_BA_CNT_VERSION */
5043 uint16 length
; /**< length of entire structure */
5045 /* transmit stat counters */
5046 uint32 txpdu
; /**< pdus sent */
5047 uint32 txsdu
; /**< sdus sent */
5048 uint32 txfc
; /**< tx side flow controlled packets */
5049 uint32 txfci
; /**< tx side flow control initiated */
5050 uint32 txretrans
; /**< retransmitted pdus */
5051 uint32 txbatimer
; /**< ba resend due to timer */
5052 uint32 txdrop
; /**< dropped packets */
5053 uint32 txaddbareq
; /**< addba req sent */
5054 uint32 txaddbaresp
; /**< addba resp sent */
5055 uint32 txdelba
; /**< delba sent */
5056 uint32 txba
; /**< ba sent */
5057 uint32 txbar
; /**< bar sent */
5058 uint32 txpad
[4]; /**< future */
5060 /* receive side counters */
5061 uint32 rxpdu
; /**< pdus recd */
5062 uint32 rxqed
; /**< pdus buffered before sending up */
5063 uint32 rxdup
; /**< duplicate pdus */
5064 uint32 rxnobuf
; /**< pdus discarded due to no buf */
5065 uint32 rxaddbareq
; /**< addba req recd */
5066 uint32 rxaddbaresp
; /**< addba resp recd */
5067 uint32 rxdelba
; /**< delba recd */
5068 uint32 rxba
; /**< ba recd */
5069 uint32 rxbar
; /**< bar recd */
5070 uint32 rxinvba
; /**< invalid ba recd */
5071 uint32 rxbaholes
; /**< ba recd with holes */
5072 uint32 rxunexp
; /**< unexpected packets */
5073 uint32 rxpad
[4]; /**< future */
5077 /** structure for per-tid ampdu control */
5078 struct ampdu_tid_control
{
5079 uint8 tid
; /* tid */
5080 uint8 enable
; /* enable/disable */
5083 /** struct for ampdu tx/rx aggregation control */
5085 int8 aggr_override
; /**< aggr overrided by dongle. Not to be set by host. */
5086 uint16 conf_TID_bmap
; /**< bitmap of TIDs to configure */
5087 uint16 enab_TID_bmap
; /**< enable/disable per TID */
5090 /** structure for identifying ea/tid for sending addba/delba */
5091 struct ampdu_ea_tid
{
5092 struct ether_addr ea
; /**< Station address */
5093 uint8 tid
; /**< tid */
5094 uint8 initiator
; /**< 0 is recipient, 1 is originator */
5097 /** structure for identifying retry/tid for retry_limit_tid/rr_retry_limit_tid */
5098 struct ampdu_retry_tid
{
5099 uint8 tid
; /**< tid */
5100 uint8 retry
; /**< retry value */
5103 #define BDD_FNAME_LEN 32 /**< Max length of friendly name */
5104 typedef struct bdd_fname
{
5105 uint8 len
; /**< length of friendly name */
5106 uchar name
[BDD_FNAME_LEN
]; /**< friendly name */
5109 /* structure for addts arguments */
5110 /** For ioctls that take a list of TSPEC */
5112 int32 count
; /**< number of tspecs */
5113 struct tsinfo_arg tsinfo
[]; /**< variable length array of tsinfo */
5117 /**structure for tdls iovars */
5118 typedef struct tdls_iovar
{
5119 struct ether_addr ea
; /**< Station address */
5120 uint8 mode
; /**< mode: depends on iovar */
5122 chanspec_t chanspec
;
5126 #define TDLS_WFD_IE_SIZE 512
5127 /**structure for tdls wfd ie */
5128 typedef struct tdls_wfd_ie_iovar
{
5129 struct ether_addr ea
; /**< Station address */
5133 uint8 data
[TDLS_WFD_IE_SIZE
];
5134 } tdls_wfd_ie_iovar_t
;
5137 /** structure for addts/delts arguments */
5138 typedef struct tspec_arg
{
5139 uint16 version
; /**< see definition of TSPEC_ARG_VERSION */
5140 uint16 length
; /**< length of entire structure */
5141 uint32 flag
; /**< bit field */
5142 /* TSPEC Arguments */
5143 struct tsinfo_arg tsinfo
; /**< TS Info bit field */
5145 uint16 nom_msdu_size
; /**< (Nominal or fixed) MSDU Size (bytes) */
5146 uint16 max_msdu_size
; /**< Maximum MSDU Size (bytes) */
5147 uint32 min_srv_interval
; /**< Minimum Service Interval (us) */
5148 uint32 max_srv_interval
; /**< Maximum Service Interval (us) */
5149 uint32 inactivity_interval
; /**< Inactivity Interval (us) */
5150 uint32 suspension_interval
; /**< Suspension Interval (us) */
5151 uint32 srv_start_time
; /**< Service Start Time (us) */
5152 uint32 min_data_rate
; /**< Minimum Data Rate (bps) */
5153 uint32 mean_data_rate
; /**< Mean Data Rate (bps) */
5154 uint32 peak_data_rate
; /**< Peak Data Rate (bps) */
5155 uint32 max_burst_size
; /**< Maximum Burst Size (bytes) */
5156 uint32 delay_bound
; /**< Delay Bound (us) */
5157 uint32 min_phy_rate
; /**< Minimum PHY Rate (bps) */
5158 uint16 surplus_bw
; /**< Surplus Bandwidth Allowance (range 1.0 to 8.0) */
5159 uint16 medium_time
; /**< Medium Time (32 us/s periods) */
5160 uint8 dialog_token
; /**< dialog token */
5164 /** tspec arg for desired station */
5165 typedef struct tspec_per_sta_arg
{
5166 struct ether_addr ea
;
5168 struct tspec_arg ts
;
5169 } tspec_per_sta_arg_t
;
5171 /** structure for max bandwidth for each access category */
5172 typedef struct wme_max_bandwidth
{
5173 uint32 ac
[AC_COUNT
]; /**< max bandwidth for each access category */
5174 } wme_max_bandwidth_t
;
5176 #define WL_WME_MBW_PARAMS_IO_BYTES (sizeof(wme_max_bandwidth_t))
5178 /* current version of wl_tspec_arg_t struct */
5179 #define TSPEC_ARG_VERSION 2 /**< current version of wl_tspec_arg_t struct */
5180 #define TSPEC_ARG_LENGTH 55 /**< argument length from tsinfo to medium_time */
5181 #define TSPEC_DEFAULT_DIALOG_TOKEN 42 /**< default dialog token */
5182 #define TSPEC_DEFAULT_SBW_FACTOR 0x3000 /**< default surplus bw */
5184 #define WL_WOWL_KEEPALIVE_MAX_PACKET_SIZE 80
5185 #define WLC_WOWL_MAX_KEEPALIVE 2
5187 /** Packet lifetime configuration per ac */
5188 typedef struct wl_lifetime
{
5189 uint32 ac
; /**< access class */
5190 uint32 lifetime
; /**< Packet lifetime value in ms */
5193 /** Management time configuration */
5194 typedef struct wl_lifetime_mg
{
5195 uint32 mgmt_bitmap
; /**< Mgmt subtype */
5196 uint32 lifetime
; /**< Packet lifetime value in us */
5199 /* MAC Sample Capture related */
5200 #define WL_MACCAPTR_DEFSTART_PTR 0xA00
5201 #define WL_MACCAPTR_DEFSTOP_PTR 0xA3F
5202 #define WL_MACCAPTR_DEFSZ 0x3F
5204 #define WL_MACCAPTR_DEF_MASK 0xFFFFFFFF
5207 WL_MACCAPT_TRIG
= 0,
5208 WL_MACCAPT_STORE
= 1,
5209 WL_MACCAPT_TRANS
= 2,
5210 WL_MACCAPT_MATCH
= 3
5214 WL_MACCAPT_STRT
= 1,
5215 WL_MACCAPT_STOP
= 2,
5219 /* MAC Sample Capture Set-up Paramters */
5220 typedef struct wl_maccapture_params
{
5222 uint8 la_mode
; /* TRUE: GPIO Out Enabled */
5224 uint32 start_ptr
; /* Start address to store */
5225 uint32 stop_ptr
; /* Stop address to store */
5226 uint8 optn_bmp
; /* Options */
5228 uint32 tr_mask
; /* Trigger Mask */
5229 uint32 tr_val
; /* Trigger Value */
5230 uint32 s_mask
; /* Store Mode Mask */
5231 uint32 x_mask
; /* Trans. Mode Mask */
5232 uint32 m_mask
; /* Match Mode Mask */
5233 uint32 m_val
; /* Match Value */
5234 maccaptr_cmd_t cmd
; /* Start / Stop */
5235 } wl_maccapture_params_t
;
5237 /** Channel Switch Announcement param */
5238 typedef struct wl_chan_switch
{
5239 uint8 mode
; /**< value 0 or 1 */
5240 uint8 count
; /**< count # of beacons before switching */
5241 chanspec_t chspec
; /**< chanspec */
5242 uint8 reg
; /**< regulatory class */
5243 uint8 frame_type
; /**< csa frame type, unicast or broadcast */
5263 #define SORT_CRITERIA_BIT 0
5264 #define AUTO_NET_SWITCH_BIT 1
5265 #define ENABLE_BKGRD_SCAN_BIT 2
5266 #define IMMEDIATE_SCAN_BIT 3
5267 #define AUTO_CONNECT_BIT 4
5268 #define ENABLE_BD_SCAN_BIT 5
5269 #define ENABLE_ADAPTSCAN_BIT 6
5270 #define IMMEDIATE_EVENT_BIT 8
5271 #define SUPPRESS_SSID_BIT 9
5272 #define ENABLE_NET_OFFLOAD_BIT 10
5273 /** report found/lost events for SSID and BSSID networks seperately */
5274 #define REPORT_SEPERATELY_BIT 11
5276 #define SORT_CRITERIA_MASK 0x0001
5277 #define AUTO_NET_SWITCH_MASK 0x0002
5278 #define ENABLE_BKGRD_SCAN_MASK 0x0004
5279 #define IMMEDIATE_SCAN_MASK 0x0008
5280 #define AUTO_CONNECT_MASK 0x0010
5282 #define ENABLE_BD_SCAN_MASK 0x0020
5283 #define ENABLE_ADAPTSCAN_MASK 0x00c0
5284 #define IMMEDIATE_EVENT_MASK 0x0100
5285 #define SUPPRESS_SSID_MASK 0x0200
5286 #define ENABLE_NET_OFFLOAD_MASK 0x0400
5287 /** report found/lost events for SSID and BSSID networks seperately */
5288 #define REPORT_SEPERATELY_MASK 0x0800
5290 #define PFN_VERSION 2
5292 #define PFN_COMPLETE 1
5293 #define PFN_INCOMPLETE 0
5295 #define DEFAULT_BESTN 2
5296 #define DEFAULT_MSCAN 0
5297 #define DEFAULT_REPEAT 10
5298 #define DEFAULT_EXP 2
5300 #define PFN_PARTIAL_SCAN_BIT 0
5301 #define PFN_PARTIAL_SCAN_MASK 1
5303 #define PFN_SWC_RSSI_WINDOW_MAX 8
5304 #define PFN_SWC_MAX_NUM_APS 16
5305 #define PFN_HOTLIST_MAX_NUM_APS 64
5307 #define MAX_EPNO_HIDDEN_SSID 8
5308 #define MAX_WHITELIST_SSID 2
5310 /* Version 1 and 2 for various scan results structures defined below */
5311 #define PFN_SCANRESULTS_VERSION_V1 1
5312 #define PFN_SCANRESULTS_VERSION_V2 2
5314 /** PFN network info structure */
5315 typedef struct wl_pfn_subnet_info_v1
{
5316 struct ether_addr BSSID
;
5317 uint8 channel
; /**< channel number only */
5320 } wl_pfn_subnet_info_v1_t
;
5322 typedef struct wl_pfn_subnet_info_v2
{
5323 struct ether_addr BSSID
;
5324 uint8 channel
; /**< channel number only */
5330 } wl_pfn_subnet_info_v2_t
;
5332 typedef struct wl_pfn_net_info_v1
{
5333 wl_pfn_subnet_info_v1_t pfnsubnet
;
5334 int16 RSSI
; /**< receive signal strength (in dBm) */
5335 uint16 timestamp
; /**< age in seconds */
5336 } wl_pfn_net_info_v1_t
;
5338 typedef struct wl_pfn_net_info_v2
{
5339 wl_pfn_subnet_info_v2_t pfnsubnet
;
5340 int16 RSSI
; /**< receive signal strength (in dBm) */
5341 uint16 timestamp
; /**< age in seconds */
5342 } wl_pfn_net_info_v2_t
;
5344 /* Version 1 and 2 for various lbest scan results structures below */
5345 #define PFN_LBEST_SCAN_RESULT_VERSION_V1 1
5346 #define PFN_LBEST_SCAN_RESULT_VERSION_V2 2
5348 #define MAX_CHBKT_PER_RESULT 4
5350 typedef struct wl_pfn_lnet_info_v1
{
5351 wl_pfn_subnet_info_v1_t pfnsubnet
; /**< BSSID + channel + SSID len + SSID */
5352 uint16 flags
; /**< partial scan, etc */
5353 int16 RSSI
; /**< receive signal strength (in dBm) */
5354 uint32 timestamp
; /**< age in miliseconds */
5355 uint16 rtt0
; /**< estimated distance to this AP in centimeters */
5356 uint16 rtt1
; /**< standard deviation of the distance to this AP in centimeters */
5357 } wl_pfn_lnet_info_v1_t
;
5359 typedef struct wl_pfn_lnet_info_v2
{
5360 wl_pfn_subnet_info_v2_t pfnsubnet
; /**< BSSID + channel + SSID len + SSID */
5361 uint16 flags
; /**< partial scan, etc */
5362 int16 RSSI
; /**< receive signal strength (in dBm) */
5363 uint32 timestamp
; /**< age in miliseconds */
5364 uint16 rtt0
; /**< estimated distance to this AP in centimeters */
5365 uint16 rtt1
; /**< standard deviation of the distance to this AP in centimeters */
5366 } wl_pfn_lnet_info_v2_t
;
5368 typedef struct wl_pfn_lscanresults_v1
{
5372 wl_pfn_lnet_info_v1_t netinfo
[1];
5373 } wl_pfn_lscanresults_v1_t
;
5375 typedef struct wl_pfn_lscanresults_v2
{
5379 uint32 scan_ch_buckets
[MAX_CHBKT_PER_RESULT
];
5380 wl_pfn_lnet_info_v2_t netinfo
[1];
5381 } wl_pfn_lscanresults_v2_t
;
5383 /**this is used to report on 1-* pfn scan results */
5384 typedef struct wl_pfn_scanresults_v1
{
5388 wl_pfn_net_info_v1_t netinfo
[1];
5389 } wl_pfn_scanresults_v1_t
;
5391 typedef struct wl_pfn_scanresults_v2
{
5395 uint32 scan_ch_bucket
;
5396 wl_pfn_net_info_v2_t netinfo
[1];
5397 } wl_pfn_scanresults_v2_t
;
5399 typedef struct wl_pfn_significant_net
{
5402 struct ether_addr BSSID
;
5403 int8 rssi
[PFN_SWC_RSSI_WINDOW_MAX
];
5404 } wl_pfn_significant_net_t
;
5406 #define PFN_SWC_SCANRESULT_VERSION 1
5408 typedef struct wl_pfn_swc_results
{
5410 uint32 pkt_count
; /**< No. of results in current frame */
5411 uint32 total_count
; /**< Total expected results */
5412 wl_pfn_significant_net_t list
[];
5413 } wl_pfn_swc_results_t
;
5414 typedef struct wl_pfn_net_info_bssid
{
5415 struct ether_addr BSSID
;
5416 uint8 channel
; /**< channel number only */
5417 int8 RSSI
; /**< receive signal strength (in dBm) */
5418 uint16 flags
; /**< (e.g. partial scan, off channel) */
5419 uint16 timestamp
; /**< age in seconds */
5420 } wl_pfn_net_info_bssid_t
;
5422 typedef struct wl_pfn_scanhist_bssid
{
5426 wl_pfn_net_info_bssid_t netinfo
[1];
5427 } wl_pfn_scanhist_bssid_t
;
5429 /* Version 1 and 2 for various single scan result */
5430 #define PFN_SCANRESULT_VERSION_V1 1
5431 #define PFN_SCANRESULT_VERSION_V2 2
5433 /* used to report exactly one scan result */
5434 /* plus reports detailed scan info in bss_info */
5435 typedef struct wl_pfn_scanresult_v1
{
5439 wl_pfn_net_info_v1_t netinfo
;
5440 wl_bss_info_v109_t bss_info
;
5441 } wl_pfn_scanresult_v1_t
;
5443 typedef struct wl_pfn_scanresult_v2
{
5447 wl_pfn_net_info_v2_t netinfo
;
5448 wl_bss_info_v109_t bss_info
;
5449 } wl_pfn_scanresult_v2_t
;
5451 typedef struct wl_pfn_scanresult_v2_1
{
5455 wl_pfn_net_info_v2_t netinfo
;
5456 uint8 bss_info
[]; /* var length wl_bss_info_X structures */
5457 } wl_pfn_scanresult_v2_1_t
;
5459 /**PFN data structure */
5460 typedef struct wl_pfn_param
{
5461 int32 version
; /**< PNO parameters version */
5462 int32 scan_freq
; /**< Scan frequency */
5463 int32 lost_network_timeout
; /**< Timeout in sec. to declare
5464 * discovered network as lost
5466 int16 flags
; /**< Bit field to control features
5467 * of PFN such as sort criteria auto
5468 * enable switch and background scan
5470 int16 rssi_margin
; /**< Margin to avoid jitter for choosing a
5471 * PFN based on RSSI sort criteria
5473 uint8 bestn
; /**< number of best networks in each scan */
5474 uint8 mscan
; /**< number of scans recorded */
5475 uint8 repeat
; /**< Minimum number of scan intervals
5476 *before scan frequency changes in adaptive scan
5478 uint8 exp
; /**< Exponent of 2 for maximum scan interval */
5479 int32 slow_freq
; /**< slow scan period */
5482 typedef struct wl_pfn_bssid
{
5483 struct ether_addr macaddr
;
5484 /* Bit4: suppress_lost, Bit3: suppress_found */
5487 typedef struct wl_pfn_significant_bssid
{
5488 struct ether_addr macaddr
;
5489 int8 rssi_low_threshold
;
5490 int8 rssi_high_threshold
;
5491 } wl_pfn_significant_bssid_t
;
5492 #define WL_PFN_SUPPRESSFOUND_MASK 0x08
5493 #define WL_PFN_SUPPRESSLOST_MASK 0x10
5494 #define WL_PFN_SSID_IMPRECISE_MATCH 0x80
5495 #define WL_PFN_SSID_SAME_NETWORK 0x10000
5496 #define WL_PFN_SUPPRESS_AGING_MASK 0x20000
5497 #define WL_PFN_FLUSH_ALL_SSIDS 0x40000
5499 #define WL_PFN_IOVAR_FLAG_MASK 0xFFFF00FF
5500 #define WL_PFN_RSSI_MASK 0xff00
5501 #define WL_PFN_RSSI_SHIFT 8
5503 typedef struct wl_pfn_cfg
{
5506 uint16 channel_list
[WL_NUMCHANNELS
];
5510 #define WL_PFN_SSID_CFG_VERSION 1
5511 #define WL_PFN_SSID_CFG_CLEAR 0x1
5513 typedef struct wl_pfn_ssid_params
{
5514 int8 min5G_rssi
; /* minimum 5GHz RSSI for a BSSID to be considered */
5515 int8 min2G_rssi
; /* minimum 2.4GHz RSSI for a BSSID to be considered */
5516 int16 init_score_max
; /* The maximum score that a network can have before bonuses */
5518 int16 cur_bssid_bonus
; /* Add to current bssid */
5519 int16 same_ssid_bonus
; /* score bonus for all networks with the same network flag */
5520 int16 secure_bonus
; /* score bonus for networks that are not open */
5521 int16 band_5g_bonus
;
5522 } wl_pfn_ssid_params_t
;
5524 typedef struct wl_ssid_ext_params
{
5525 int8 min5G_rssi
; /* minimum 5GHz RSSI for a BSSID to be considered */
5526 int8 min2G_rssi
; /* minimum 2.4GHz RSSI for a BSSID to be considered */
5527 int16 init_score_max
; /* The maximum score that a network can have before bonuses */
5528 int16 cur_bssid_bonus
; /* Add to current bssid */
5529 int16 same_ssid_bonus
; /* score bonus for all networks with the same network flag */
5530 int16 secure_bonus
; /* score bonus for networks that are not open */
5531 int16 band_5g_bonus
;
5532 } wl_ssid_ext_params_t
;
5534 typedef struct wl_pfn_ssid_cfg
{
5537 wl_ssid_ext_params_t params
;
5538 } wl_pfn_ssid_cfg_t
;
5540 #define CH_BUCKET_REPORT_NONE 0
5541 #define CH_BUCKET_REPORT_SCAN_COMPLETE_ONLY 1
5542 #define CH_BUCKET_REPORT_FULL_RESULT 2
5543 #define CH_BUCKET_REPORT_SCAN_COMPLETE (CH_BUCKET_REPORT_SCAN_COMPLETE_ONLY | \
5544 CH_BUCKET_REPORT_FULL_RESULT)
5545 #define CH_BUCKET_REPORT_REGULAR 0
5546 #define CH_BUCKET_GSCAN 4
5548 typedef struct wl_pfn_gscan_ch_bucket_cfg
{
5549 uint8 bucket_end_index
;
5550 uint8 bucket_freq_multiple
;
5554 uint16 max_freq_multiple
;
5555 } wl_pfn_gscan_ch_bucket_cfg_t
;
5557 typedef struct wl_pfn_capabilities
{
5560 uint16 max_swc_bssid
;
5561 uint16 max_hotlist_bssid
;
5562 } wl_pfn_capabilities_t
;
5564 #define GSCAN_SEND_ALL_RESULTS_MASK (1 << 0)
5565 #define GSCAN_ALL_BUCKETS_IN_FIRST_SCAN_MASK (1 << 3)
5566 #define GSCAN_CFG_FLAGS_ONLY_MASK (1 << 7)
5567 #define WL_GSCAN_CFG_VERSION 1
5568 typedef struct wl_pfn_gscan_cfg
{
5571 * BIT0 1 = send probes/beacons to HOST
5574 * Add any future flags here
5575 * BIT7 1 = no other useful cfg sent
5578 /** Buffer filled threshold in % to generate an event */
5579 uint8 buffer_threshold
;
5581 * No. of BSSIDs with "change" to generate an evt
5582 * change - crosses rssi threshold/lost
5584 uint8 swc_nbssid_threshold
;
5585 /* Max=8 (for now) Size of rssi cache buffer */
5586 uint8 swc_rssi_window_size
;
5587 uint8 count_of_channel_buckets
;
5588 uint8 retry_threshold
;
5589 uint16 lost_ap_window
;
5590 wl_pfn_gscan_ch_bucket_cfg_t channel_bucket
[1];
5591 } wl_pfn_gscan_cfg_t
;
5593 #define WL_PFN_REPORT_ALLNET 0
5594 #define WL_PFN_REPORT_SSIDNET 1
5595 #define WL_PFN_REPORT_BSSIDNET 2
5597 #define WL_PFN_CFG_FLAGS_PROHIBITED 0x00000001 /* Accept and use prohibited channels */
5598 #define WL_PFN_CFG_FLAGS_RESERVED 0xfffffffe /**< Remaining reserved for future use */
5600 typedef struct wl_pfn
{
5601 wlc_ssid_t ssid
; /**< ssid name and its length */
5602 int32 flags
; /**< bit2: hidden */
5603 int32 infra
; /**< BSS Vs IBSS */
5604 int32 auth
; /**< Open Vs Closed */
5605 int32 wpa_auth
; /**< WPA type */
5606 int32 wsec
; /**< wsec value */
5609 typedef struct wl_pfn_list
{
5616 #define PFN_SSID_EXT_VERSION 1
5618 typedef struct wl_pfn_ext
{
5620 int8 rssi_thresh
; /* RSSI threshold, track only if RSSI > threshold */
5621 uint16 wpa_auth
; /* Match the wpa auth type defined in wlioctl_defs.h */
5622 uint8 ssid
[DOT11_MAX_SSID_LEN
];
5626 typedef struct wl_pfn_ext_list
{
5629 wl_pfn_ext_t pfn_ext
[1];
5630 } wl_pfn_ext_list_t
;
5632 #define WL_PFN_SSID_EXT_FOUND 0x1
5633 #define WL_PFN_SSID_EXT_LOST 0x2
5634 typedef struct wl_pfn_result_ssid
{
5637 /* channel number */
5639 /* Assume idx in order of cfg */
5641 } wl_pfn_result_ssid_crc32_t
;
5643 typedef struct wl_pfn_ssid_ext_result
{
5646 wl_pfn_result_ssid_crc32_t net
[1];
5647 } wl_pfn_ssid_ext_result_t
;
5649 #define PFN_EXT_AUTH_CODE_OPEN 1 /* open */
5650 #define PFN_EXT_AUTH_CODE_PSK 2 /* WPA_PSK or WPA2PSK */
5651 #define PFN_EXT_AUTH_CODE_EAPOL 4 /* any EAPOL */
5653 #define WL_PFN_HIDDEN_BIT 2
5654 #define WL_PFN_HIDDEN_MASK 0x4
5657 #define BESTN_MAX 10
5661 #define MSCAN_MAX 90
5664 /* Dynamic scan configuration for motion profiles */
5666 #define WL_PFN_MPF_VERSION 1
5668 /* Valid group IDs, may be expanded in the future */
5669 #define WL_PFN_MPF_GROUP_SSID 0
5670 #define WL_PFN_MPF_GROUP_BSSID 1
5671 #define WL_PFN_MPF_MAX_GROUPS 2
5673 /* Max number of MPF states supported in this time */
5674 #define WL_PFN_MPF_STATES_MAX 4
5676 /* Flags for the mpf-specific stuff */
5677 #define WL_PFN_MPF_ADAPT_ON_BIT 0
5678 #define WL_PFN_MPF_ADAPTSCAN_BIT 1
5680 #define WL_PFN_MPF_ADAPT_ON_MASK 0x0001
5681 #define WL_PFN_MPF_ADAPTSCAN_MASK 0x0006
5683 /* Per-state timing values */
5684 typedef struct wl_pfn_mpf_state_params
{
5685 int32 scan_freq
; /* Scan frequency (secs) */
5686 int32 lost_network_timeout
; /* Timeout to declare net lost (secs) */
5687 int16 flags
; /* Space for flags: ADAPT etc */
5688 uint8 exp
; /* Exponent of 2 for max interval for SMART/STRICT_ADAPT */
5689 uint8 repeat
; /* Number of scans before changing adaptation level */
5690 int32 slow_freq
; /* Slow scan period for SLOW_ADAPT */
5691 } wl_pfn_mpf_state_params_t
;
5693 typedef struct wl_pfn_mpf_param
{
5694 uint16 version
; /* Structure version */
5695 uint16 groupid
; /* Group ID: 0 (SSID), 1 (BSSID), other: reserved */
5696 wl_pfn_mpf_state_params_t state
[WL_PFN_MPF_STATES_MAX
];
5697 } wl_pfn_mpf_param_t
;
5699 /* Structure for setting pfn_override iovar */
5700 typedef struct wl_pfn_override_param
{
5701 uint16 version
; /* Structure version */
5702 uint16 start_offset
; /* Seconds from now to apply new params */
5703 uint16 duration
; /* Seconds to keep new params applied */
5705 wl_pfn_mpf_state_params_t override
;
5706 } wl_pfn_override_param_t
;
5707 #define WL_PFN_OVERRIDE_VERSION 1
5710 * Definitions for base MPF configuration
5713 #define WL_MPF_VERSION 1
5714 #define WL_MPF_MAX_BITS 3
5715 #define WL_MPF_MAX_STATES (1 << WL_MPF_MAX_BITS)
5717 #define WL_MPF_STATE_NAME_MAX 12
5719 typedef struct wl_mpf_val
{
5720 uint16 val
; /* Value of GPIO bits */
5721 uint16 state
; /* State identifier */
5722 char name
[WL_MPF_STATE_NAME_MAX
]; /* Optional name */
5725 typedef struct wl_mpf_map
{
5728 uint16 mask
; /* Which GPIO bits to use */
5729 uint8 count
; /* Count of state/value mappings */
5731 wl_mpf_val_t vals
[WL_MPF_MAX_STATES
];
5734 #define WL_MPF_STATE_AUTO (0xFFFF) /* (uint16)-1) */
5736 typedef struct wl_mpf_state
{
5739 uint16 state
; /* Get/Set */
5740 uint8 force
; /* 0 - auto (HW) state, 1 - forced state */
5741 char name
[WL_MPF_STATE_NAME_MAX
]; /* Get/Set: Optional/actual name */
5747 typedef struct wl_txstatus_additional_info
{
5755 } wl_txstatus_additional_info_t
;
5757 /** Service discovery */
5759 uint8 transaction_id
; /**< Transaction id */
5760 uint8 protocol
; /**< Service protocol type */
5761 uint16 query_len
; /**< Length of query */
5762 uint16 response_len
; /**< Length of response */
5767 uint16 period
; /**< extended listen period */
5768 uint16 interval
; /**< extended listen interval */
5769 uint16 count
; /* count to repeat */
5770 uint16 pad
; /* pad for 32bit align */
5773 /** GAS state machine tunable parameters. Structure field values of 0 means use the default. */
5774 typedef struct wl_gas_config
{
5775 uint16 max_retransmit
; /**< Max # of firmware/driver retransmits on no Ack
5776 * from peer (on top of the ucode retries).
5778 uint16 response_timeout
; /**< Max time to wait for a GAS-level response
5779 * after sending a packet.
5781 uint16 max_comeback_delay
; /**< Max GAS response comeback delay.
5782 * Exceeding this fails the GAS exchange.
5784 uint16 max_retries
; /**< Max # of GAS state machine retries on failure
5785 * of a GAS frame exchange.
5789 /** P2P Find Offload parameters */
5790 typedef struct wl_p2po_find_config
{
5791 uint16 version
; /**< Version of this struct */
5792 uint16 length
; /**< sizeof(wl_p2po_find_config_t) */
5793 int32 search_home_time
; /**< P2P search state home time when concurrent
5794 * connection exists. -1 for default.
5796 uint8 num_social_channels
;
5797 /**< Number of social channels up to WL_P2P_SOCIAL_CHANNELS_MAX.
5798 * 0 means use default social channels.
5801 uint16 social_channels
[1]; /**< Variable length array of social channels */
5802 } wl_p2po_find_config_t
;
5803 #define WL_P2PO_FIND_CONFIG_VERSION 2 /**< value for version field */
5805 /** wl_p2po_find_config_t flags */
5806 #define P2PO_FIND_FLAG_SCAN_ALL_APS 0x01 /**< Whether to scan for all APs in the p2po_find
5807 * periodic scans of all channels.
5808 * 0 means scan for only P2P devices.
5809 * 1 means scan for P2P devices plus non-P2P APs.
5812 /** For adding a WFDS service to seek */
5814 uint32 seek_hdl
; /**< unique id chosen by host */
5815 uint8 addr
[6]; /**< Seek service from a specific device with this
5816 * MAC address, all 1's for any device.
5818 uint8 service_hash
[P2P_WFDS_HASH_LEN
];
5819 uint8 service_name_len
;
5820 uint8 service_name
[MAX_WFDS_SEEK_SVC_NAME_LEN
];
5821 /**< Service name to seek, not null terminated */
5822 uint8 service_info_req_len
;
5823 uint8 service_info_req
[1]; /**< Service info request, not null terminated.
5824 * Variable length specified by service_info_req_len.
5825 * Maximum length is MAX_WFDS_SEEK_SVC_INFO_LEN.
5827 } wl_p2po_wfds_seek_add_t
;
5829 /** For deleting a WFDS service to seek */
5831 uint32 seek_hdl
; /**< delete service specified by id */
5832 } wl_p2po_wfds_seek_del_t
;
5834 /** For adding a WFDS service to advertise */
5835 #include <packed_section_start.h>
5836 typedef BWL_PRE_PACKED_STRUCT
struct {
5837 uint32 advertise_hdl
; /**< unique id chosen by host */
5838 uint8 service_hash
[P2P_WFDS_HASH_LEN
];
5839 uint32 advertisement_id
;
5840 uint16 service_config_method
;
5841 uint8 service_name_len
;
5842 uint8 service_name
[MAX_WFDS_SVC_NAME_LEN
];
5843 /**< Service name , not null terminated */
5844 uint8 service_status
;
5845 uint16 service_info_len
;
5846 uint8 service_info
[1]; /**< Service info, not null terminated.
5847 * Variable length specified by service_info_len.
5848 * Maximum length is MAX_WFDS_ADV_SVC_INFO_LEN.
5850 } BWL_POST_PACKED_STRUCT wl_p2po_wfds_advertise_add_t
;
5851 #include <packed_section_end.h>
5853 /** For deleting a WFDS service to advertise */
5855 uint32 advertise_hdl
; /**< delete service specified by hdl */
5856 } wl_p2po_wfds_advertise_del_t
;
5858 /** P2P Offload discovery mode for the p2po_state iovar */
5861 WL_P2PO_DISC_LISTEN
,
5862 WL_P2PO_DISC_DISCOVERY
5867 #define ANQPO_MAX_QUERY_SIZE 256
5869 uint16 max_retransmit
; /**< ~0 use default, max retransmit on no ACK from peer */
5870 uint16 response_timeout
; /**< ~0 use default, msec to wait for resp after tx packet */
5871 uint16 max_comeback_delay
; /**< ~0 use default, max comeback delay in resp else fail */
5872 uint16 max_retries
; /**< ~0 use default, max retries on failure */
5873 uint16 query_len
; /**< length of ANQP query */
5874 uint8 query_data
[1]; /**< ANQP encoded query (max ANQPO_MAX_QUERY_SIZE) */
5877 #define WL_ANQPO_FLAGS_BSSID_WILDCARD 0x0001
5878 #define WL_ANQPO_PEER_LIST_VERSION_2 2
5880 uint16 channel
; /**< channel of the peer */
5881 struct ether_addr addr
; /**< addr of the peer */
5882 } wl_anqpo_peer_v1_t
;
5884 uint16 channel
; /**< channel of the peer */
5885 struct ether_addr addr
; /**< addr of the peer */
5886 uint32 flags
; /**< 0x01-Peer is MBO Capable */
5887 } wl_anqpo_peer_v2_t
;
5889 #define ANQPO_MAX_PEER_LIST 64
5891 uint16 count
; /**< number of peers in list */
5892 wl_anqpo_peer_v1_t peer
[1]; /**< max ANQPO_MAX_PEER_LIST */
5893 } wl_anqpo_peer_list_v1_t
;
5896 uint16 version
; /**<VERSION */
5897 uint16 length
; /**< length of entire structure */
5898 uint16 count
; /**< number of peers in list */
5899 wl_anqpo_peer_v2_t peer
[1]; /**< max ANQPO_MAX_PEER_LIST */
5900 } wl_anqpo_peer_list_v2_t
;
5902 #ifndef WL_ANQPO_PEER_LIST_TYPEDEF_HAS_ALIAS
5903 typedef wl_anqpo_peer_list_v1_t wl_anqpo_peer_list_t
;
5904 typedef wl_anqpo_peer_v1_t wl_anqpo_peer_t
;
5905 #endif /* WL_ANQPO_PEER_LIST_TYPEDEF_HAS_ALIAS */
5907 #define ANQPO_MAX_IGNORE_SSID 64
5909 uint8 is_clear
; /**< set to clear list (not used on GET) */
5911 uint16 count
; /**< number of SSID in list */
5912 wlc_ssid_t ssid
[1]; /**< max ANQPO_MAX_IGNORE_SSID */
5913 } wl_anqpo_ignore_ssid_list_t
;
5915 #define ANQPO_MAX_IGNORE_BSSID 64
5917 uint8 is_clear
; /**< set to clear list (not used on GET) */
5919 uint16 count
; /**< number of addr in list */
5920 struct ether_addr bssid
[]; /**< max ANQPO_MAX_IGNORE_BSSID */
5921 } wl_anqpo_ignore_bssid_list_t
;
5923 struct toe_ol_stats_t
{
5924 /** Num of tx packets that don't need to be checksummed */
5927 /* Num of tx packets where checksum is filled by offload engine */
5931 uint32 tx_icmp_fill
;
5933 /* Num of rx packets where toe finds out if checksum is good or bad */
5940 uint32 rx_icmp_good
;
5943 /* Num of tx packets in which csum error is injected */
5944 uint32 tx_tcp_errinj
;
5945 uint32 tx_udp_errinj
;
5946 uint32 tx_icmp_errinj
;
5948 /* Num of rx packets in which csum error is injected */
5949 uint32 rx_tcp_errinj
;
5950 uint32 rx_udp_errinj
;
5951 uint32 rx_icmp_errinj
;
5954 /** Arp offload statistic counts */
5955 struct arp_ol_stats_t
{
5956 uint32 host_ip_entries
; /**< Host IP table addresses (more than one if multihomed) */
5957 uint32 host_ip_overflow
; /**< Host IP table additions skipped due to overflow */
5959 uint32 arp_table_entries
; /**< ARP table entries */
5960 uint32 arp_table_overflow
; /**< ARP table additions skipped due to overflow */
5962 uint32 host_request
; /**< ARP requests from host */
5963 uint32 host_reply
; /**< ARP replies from host */
5964 uint32 host_service
; /**< ARP requests from host serviced by ARP Agent */
5966 uint32 peer_request
; /**< ARP requests received from network */
5967 uint32 peer_request_drop
; /**< ARP requests from network that were dropped */
5968 uint32 peer_reply
; /**< ARP replies received from network */
5969 uint32 peer_reply_drop
; /**< ARP replies from network that were dropped */
5970 uint32 peer_service
; /**< ARP request from host serviced by ARP Agent */
5973 /** NS offload statistic counts */
5974 struct nd_ol_stats_t
{
5975 uint32 host_ip_entries
; /**< Host IP table addresses (more than one if multihomed) */
5976 uint32 host_ip_overflow
; /**< Host IP table additions skipped due to overflow */
5977 uint32 peer_request
; /**< NS requests received from network */
5978 uint32 peer_request_drop
; /**< NS requests from network that were dropped */
5979 uint32 peer_reply_drop
; /**< NA replies from network that were dropped */
5980 uint32 peer_service
; /**< NS request from host serviced by firmware */
5984 * Neighbor Discovery Offloading
5987 WL_ND_IPV6_ADDR_TYPE_UNICAST
= 0,
5988 WL_ND_IPV6_ADDR_TYPE_ANYCAST
5991 typedef struct wl_nd_host_ip_addr
{
5992 struct ipv6_addr ip_addr
; /* host ip address */
5993 uint8 type
; /* type of address */
5995 } wl_nd_host_ip_addr_t
;
5997 typedef struct wl_nd_host_ip_list
{
5999 wl_nd_host_ip_addr_t host_ip
[1];
6000 } wl_nd_host_ip_list_t
;
6002 #define WL_ND_HOSTIP_IOV_VER 1
6005 WL_ND_HOSTIP_OP_VER
= 0, /* get version */
6006 WL_ND_HOSTIP_OP_ADD
, /* add address */
6007 WL_ND_HOSTIP_OP_DEL
, /* delete specified address */
6008 WL_ND_HOSTIP_OP_DEL_UC
, /* delete all unicast address */
6009 WL_ND_HOSTIP_OP_DEL_AC
, /* delete all anycast address */
6010 WL_ND_HOSTIP_OP_DEL_ALL
, /* delete all addresses */
6011 WL_ND_HOSTIP_OP_LIST
, /* get list of host ip address */
6015 typedef struct wl_nd_hostip
{
6016 uint16 version
; /* version of iovar buf */
6017 uint16 op_type
; /* operation type */
6018 uint32 length
; /* length of entire structure */
6020 wl_nd_host_ip_addr_t host_ip
; /* set param for add */
6021 uint16 version
; /* get return for ver */
6025 #define WL_ND_HOSTIP_FIXED_LEN OFFSETOF(wl_nd_hostip_t, u)
6026 #define WL_ND_HOSTIP_WITH_ADDR_LEN (WL_ND_HOSTIP_FIXED_LEN + sizeof(wl_nd_host_ip_addr_t))
6029 * Keep-alive packet offloading.
6033 * NAT keep-alive packets format: specifies the re-transmission period, the packet
6034 * length, and packet contents.
6036 typedef struct wl_keep_alive_pkt
{
6037 uint32 period_msec
; /** Retransmission period (0 to disable packet re-transmits) */
6038 uint16 len_bytes
; /* Size of packet to transmit (0 to disable packet re-transmits) */
6039 uint8 data
[1]; /** Variable length packet to transmit. Contents should include
6040 * entire ethernet packet (enet header, IP header, UDP header,
6041 * and UDP payload) in network byte order.
6043 } wl_keep_alive_pkt_t
;
6045 #define WL_KEEP_ALIVE_FIXED_LEN OFFSETOF(wl_keep_alive_pkt_t, data)
6047 #define MAX_RSSI_COUNT 8
6048 typedef struct rssi_struct
{
6049 int8 val
[MAX_RSSI_COUNT
]; /**< rssi values in AFs */
6050 int16 sum
; /**< total rssi sum */
6051 uint8 cnt
; /**< number rssi samples */
6052 uint8 idx
; /**< next rssi location */
6056 #define DFSP_EVT_OFFSET OFFSETOF(dfsp_event_data_t, ie)
6057 #define DFSP_EVT_FLAGS_AP_ASSOC (1 << 0)
6058 #define DFSP_EVT_FLAGS_AP_BCNMON (1 << 1)
6059 #define DFSP_EVT_FLAGS_PROXY_BCSA (1 << 2)
6060 #define DFSP_EVT_FLAGS_PROXY_UCSA (1 << 3)
6061 #define DFSP_EVT_FLAGS_PROXY_PCSA (1 << 4)
6063 typedef struct dfsp_event_data
{
6064 uint16 flags
; /* indicate what triggers the event */
6066 uint8 ie
[]; /* variable length */
6067 } dfsp_event_data_t
;
6069 /* Proxy Channel Switch Announcement is a collection of IEs */
6070 typedef struct dfsp_pcsa
{
6071 dot11_ext_csa_ie_t ecsa
;
6072 dot11_mesh_csp_ie_t mcsp
;
6073 dot11_wide_bw_chan_switch_ie_t wbcs
;
6077 #define DFSP_CFG_VERSION 1
6078 #define DFSP_FLAGS_ENAB 0x1
6079 typedef struct dfsp_cfg
{
6082 uint16 flags
; /**< bit 1 to enable/disable the feature */
6083 uint16 max_bcn_miss_dur
; /**< maximum beacon miss duration before ceasing data tx */
6084 uint8 mcsp_ttl
; /**< remaining number of hops allowed for pcsa message */
6085 uint8 bcsa_cnt
; /**< repeat numbers of broadcast CSA */
6086 chanspec_t mon_chan
; /**< passive monitoring channel spec */
6087 struct ether_addr mon_bssid
; /**< broadcast means monitoring all */
6088 uint16 max_bcn_miss_dur_af
; /**< maximum beacon miss duration before ceasing AF tx */
6091 #define DFSP_UCSA_VERSION 1
6092 typedef struct dfsp_ucsa
{
6095 struct ether_addr address
;
6097 uint8 retry_cnt
; /**< just in case host needs to control the value */
6100 typedef struct dfsp_ucsa_tbl
{
6105 typedef struct dfsp_stats
{
6106 uint32 dfsp_csainfra
;
6107 uint32 dfsp_csabcnmon
;
6114 uint32 dfsp_ucsatxfail
;
6115 uint32 dfsp_evtnotif
;
6116 uint32 dfsp_evtsuspect
;
6117 uint32 dfsp_evtresume
;
6122 * ptk_start: iovar to start 4-way handshake for secured ranging
6125 /* ptk negotiation security type - determines negotiation parameters */
6127 WL_PTK_START_SEC_TYPE_PMK
= 1
6128 } wl_ptk_start_sec_type_t
;
6130 /* ptk negotiation role */
6136 ROLE_INVALID
= 0xff,
6137 WL_PTK_START_ROLE_NONE
= ROLE_NONE
,
6138 WL_PTK_START_ROLE_AUTH
= ROLE_AUTH
,
6139 WL_PTK_START_ROLE_SUP
= ROLE_SUP
,
6140 WL_PTK_START_ROLE_STATIC
= ROLE_STATIC
,
6141 WL_PTK_START_ROLE_INVALID
= ROLE_INVALID
6142 } wl_ptk_start_role_t
;
6144 typedef struct wl_ptk_start_tlv
{
6148 } wl_ptk_start_tlv_t
;
6151 WL_PTK_START_TLV_PMK
= 1 /* uint8[] */
6152 } wl_ptk_start_tlv_type
;
6155 WL_PTK_START_FLAG_NO_DATA_PROT
= 1, /* data frame protection disabled */
6156 WL_PTK_START_FLAG_GEN_FTM_TPK
= 2 /* Generate FTM Toast/Seq Protection Key */
6157 } wl_ptk_start_flags_t
;
6159 typedef struct wl_ptk_start_iov
{
6161 uint16 len
; /* length of entire iov from version */
6162 wl_ptk_start_flags_t flags
;
6163 wl_ptk_start_sec_type_t sec_type
;
6164 wl_ptk_start_role_t role
;
6165 struct ether_addr peer_addr
;
6166 uint16 pad
; /* reserved/32 bit alignment */
6167 wl_ptk_start_tlv_t tlvs
[1];
6168 } wl_ptk_start_iov_t
;
6171 * Dongle pattern matching filter.
6174 #define MAX_WAKE_PACKET_CACHE_BYTES 128 /**< Maximum cached wake packet */
6176 #define MAX_WAKE_PACKET_BYTES (DOT11_A3_HDR_LEN + \
6178 sizeof(struct dot11_llc_snap_header) + \
6181 typedef struct pm_wake_packet
{
6182 uint32 status
; /**< Is the wake reason a packet (if all the other field's valid) */
6183 uint32 pattern_id
; /**< Pattern ID that matched */
6184 uint32 original_packet_size
;
6185 uint32 saved_packet_size
;
6186 uint8 packet
[MAX_WAKE_PACKET_CACHE_BYTES
];
6189 /* Packet filter types. Currently, only pattern matching is supported. */
6190 typedef enum wl_pkt_filter_type
{
6191 WL_PKT_FILTER_TYPE_PATTERN_MATCH
=0, /**< Pattern matching filter */
6192 WL_PKT_FILTER_TYPE_MAGIC_PATTERN_MATCH
=1, /**< Magic packet match */
6193 WL_PKT_FILTER_TYPE_PATTERN_LIST_MATCH
=2, /**< A pattern list (match all to match filter) */
6194 WL_PKT_FILTER_TYPE_ENCRYPTED_PATTERN_MATCH
=3, /**< SECURE WOWL magic / net pattern match */
6195 WL_PKT_FILTER_TYPE_APF_MATCH
=4, /* Android packet filter match */
6196 WL_PKT_FILTER_TYPE_PATTERN_MATCH_TIMEOUT
=5, /* Pattern matching filter with timeout event */
6197 WL_PKT_FILTER_TYPE_IMMEDIATE_PATTERN_MATCH
=6, /* Immediately pattern matching filter */
6198 WL_PKT_FILTYER_TYPE_MAX
= 7, /* Pkt filter type MAX */
6199 } wl_pkt_filter_type_t
;
6201 #define WL_PKT_FILTER_TYPE wl_pkt_filter_type_t
6203 /* String mapping for types that may be used by applications or debug */
6204 #define WL_PKT_FILTER_TYPE_NAMES \
6205 { "PATTERN", WL_PKT_FILTER_TYPE_PATTERN_MATCH }, \
6206 { "MAGIC", WL_PKT_FILTER_TYPE_MAGIC_PATTERN_MATCH }, \
6207 { "PATLIST", WL_PKT_FILTER_TYPE_PATTERN_LIST_MATCH }, \
6208 { "SECURE WOWL", WL_PKT_FILTER_TYPE_ENCRYPTED_PATTERN_MATCH }, \
6209 { "APF", WL_PKT_FILTER_TYPE_APF_MATCH }, \
6210 { "PATTERN TIMEOUT", WL_PKT_FILTER_TYPE_PATTERN_MATCH_TIMEOUT }, \
6211 { "IMMEDIATE", WL_PKT_FILTER_TYPE_IMMEDIATE_PATTERN_MATCH }
6213 /** Secured WOWL packet was encrypted, need decrypted before check filter match */
6214 typedef struct wl_pkt_decrypter
{
6215 uint8
* (*dec_cb
)(void* dec_ctx
, const void *sdu
, int sending
);
6217 } wl_pkt_decrypter_t
;
6220 * Pattern matching filter. Specifies an offset within received packets to
6221 * start matching, the pattern to match, the size of the pattern, and a bitmask
6222 * that indicates which bits within the pattern should be matched.
6224 typedef struct wl_pkt_filter_pattern
{
6225 uint32 offset
; /**< Offset within received packet to start pattern matching.
6226 * Offset '0' is the first byte of the ethernet header.
6228 uint32 size_bytes
; /**< Size of the pattern. Bitmask must be the same size. */
6229 uint8 mask_and_pattern
[]; /**< Variable length mask and pattern data. mask starts
6230 * at offset 0. Pattern immediately follows mask. for
6231 * secured pattern, put the descrypter pointer to the
6232 * beginning, mask and pattern postponed correspondingly
6234 } wl_pkt_filter_pattern_t
;
6236 /** A pattern list is a numerically specified list of modified pattern structures. */
6237 typedef struct wl_pkt_filter_pattern_listel
{
6238 uint16 rel_offs
; /**< Offset to begin match (relative to 'base' below) */
6239 uint16 base_offs
; /**< Base for offset (defined below) */
6240 uint16 size_bytes
; /**< Size of mask/pattern */
6241 uint16 match_flags
; /**< Addition flags controlling the match */
6242 uint8 mask_and_data
[]; /**< Variable length mask followed by data, each size_bytes */
6243 } wl_pkt_filter_pattern_listel_t
;
6245 typedef struct wl_pkt_filter_pattern_list
{
6246 uint8 list_cnt
; /**< Number of elements in the list */
6247 uint8 PAD1
[1]; /**< Reserved (possible version: reserved) */
6248 uint16 totsize
; /**< Total size of this pattern list (includes this struct) */
6249 uint8 patterns
[]; /**< Variable number of wl_pkt_filter_pattern_listel_t elements */
6250 } wl_pkt_filter_pattern_list_t
;
6252 typedef struct wl_apf_program
{
6254 uint16 instr_len
; /* number of instruction blocks */
6255 uint32 inst_ts
; /* program installation timestamp */
6256 uint8 instrs
[]; /* variable length instructions */
6259 typedef struct wl_pkt_filter_pattern_timeout
{
6260 uint32 offset
; /* Offset within received packet to start pattern matching.
6261 * Offset '0' is the first byte of the ethernet header.
6263 uint32 size_bytes
; /* Size of the pattern. Bitmask must be the same size. */
6264 uint32 timeout
; /* Timeout(seconds) */
6265 uint8 mask_and_pattern
[]; /* Variable length mask and pattern data.
6266 * mask starts at offset 0. Pattern
6267 * immediately follows mask.
6269 } wl_pkt_filter_pattern_timeout_t
;
6271 /** IOVAR "pkt_filter_add" parameter. Used to install packet filters. */
6272 typedef struct wl_pkt_filter
{
6273 uint32 id
; /**< Unique filter id, specified by app. */
6274 uint32 type
; /**< Filter type (WL_PKT_FILTER_TYPE_xxx). */
6275 uint32 negate_match
; /**< Negate the result of filter matches */
6276 union { /* Filter definitions */
6277 wl_pkt_filter_pattern_t pattern
; /**< Pattern matching filter */
6278 wl_pkt_filter_pattern_list_t patlist
; /**< List of patterns to match */
6279 wl_apf_program_t apf_program
; /* apf program */
6280 wl_pkt_filter_pattern_timeout_t pattern_timeout
; /* Pattern timeout event filter */
6284 /** IOVAR "tcp_keep_set" parameter. Used to install tcp keep_alive stuff. */
6285 typedef struct wl_tcp_keep_set
{
6288 } wl_tcp_keep_set_t
;
6290 #define WL_PKT_FILTER_FIXED_LEN OFFSETOF(wl_pkt_filter_t, u)
6291 #define WL_PKT_FILTER_PATTERN_FIXED_LEN OFFSETOF(wl_pkt_filter_pattern_t, mask_and_pattern)
6292 #define WL_PKT_FILTER_PATTERN_LIST_FIXED_LEN OFFSETOF(wl_pkt_filter_pattern_list_t, patterns)
6293 #define WL_PKT_FILTER_PATTERN_LISTEL_FIXED_LEN \
6294 OFFSETOF(wl_pkt_filter_pattern_listel_t, mask_and_data)
6295 #define WL_PKT_FILTER_PATTERN_TIMEOUT_FIXED_LEN \
6296 OFFSETOF(wl_pkt_filter_pattern_timeout_t, mask_and_pattern)
6298 #define WL_APF_INTERNAL_VERSION 1
6299 #define WL_APF_PROGRAM_MAX_SIZE (2 * 1024)
6300 #define WL_APF_PROGRAM_FIXED_LEN OFFSETOF(wl_apf_program_t, instrs)
6301 #define WL_APF_PROGRAM_LEN(apf_program) \
6302 ((apf_program)->instr_len * sizeof((apf_program)->instrs[0]))
6303 #define WL_APF_PROGRAM_TOTAL_LEN(apf_program) \
6304 (WL_APF_PROGRAM_FIXED_LEN + WL_APF_PROGRAM_LEN(apf_program))
6306 /** IOVAR "pkt_filter_enable" parameter. */
6307 typedef struct wl_pkt_filter_enable
{
6308 uint32 id
; /**< Unique filter id */
6309 uint32 enable
; /**< Enable/disable bool */
6310 } wl_pkt_filter_enable_t
;
6312 /** IOVAR "pkt_filter_list" parameter. Used to retrieve a list of installed filters. */
6313 typedef struct wl_pkt_filter_list
{
6314 uint32 num
; /**< Number of installed packet filters */
6315 uint8 filter
[]; /**< Variable array of packet filters. */
6316 } wl_pkt_filter_list_t
;
6318 #define WL_PKT_FILTER_LIST_FIXED_LEN OFFSETOF(wl_pkt_filter_list_t, filter)
6320 /** IOVAR "pkt_filter_stats" parameter. Used to retrieve debug statistics. */
6321 typedef struct wl_pkt_filter_stats
{
6322 uint32 num_pkts_matched
; /**< # filter matches for specified filter id */
6323 uint32 num_pkts_forwarded
; /**< # packets fwded from dongle to host for all filters */
6324 uint32 num_pkts_discarded
; /**< # packets discarded by dongle for all filters */
6325 } wl_pkt_filter_stats_t
;
6327 /** IOVAR "pkt_filter_ports" parameter. Configure TCP/UDP port filters. */
6328 typedef struct wl_pkt_filter_ports
{
6329 uint8 version
; /**< Be proper */
6330 uint8 reserved
; /**< Be really proper */
6331 uint16 count
; /**< Number of ports following */
6332 /* End of fixed data */
6333 uint16 ports
[1]; /**< Placeholder for ports[<count>] */
6334 } wl_pkt_filter_ports_t
;
6336 #define WL_PKT_FILTER_PORTS_FIXED_LEN OFFSETOF(wl_pkt_filter_ports_t, ports)
6338 #define WL_PKT_FILTER_PORTS_VERSION 0
6339 #if defined(WL_PKT_FLTR_EXT) && !defined(WL_PKT_FLTR_EXT_DISABLED)
6340 #define WL_PKT_FILTER_PORTS_MAX 256
6342 #define WL_PKT_FILTER_PORTS_MAX 128
6343 #endif /* WL_PKT_FLTR_EXT && !WL_PKT_FLTR_EXT_DISABLED */
6345 #define RSN_REPLAY_LEN 8
6346 typedef struct _gtkrefresh
{
6347 uint8 KCK
[RSN_KCK_LENGTH
];
6348 uint8 KEK
[RSN_KEK_LENGTH
];
6349 uint8 ReplayCounter
[RSN_REPLAY_LEN
];
6350 } gtk_keyinfo_t
, *pgtk_keyinfo_t
;
6352 /** Sequential Commands ioctl */
6353 typedef struct wl_seq_cmd_ioctl
{
6354 uint32 cmd
; /**< common ioctl definition */
6355 uint32 len
; /**< length of user buffer */
6356 } wl_seq_cmd_ioctl_t
;
6358 #define WL_SEQ_CMD_ALIGN_BYTES 4
6361 * These are the set of get IOCTLs that should be allowed when using
6362 * IOCTL sequence commands. These are issued implicitly by wl.exe each time
6363 * it is invoked. We never want to buffer these, or else wl.exe will stop working.
6365 #define WL_SEQ_CMDS_GET_IOCTL_FILTER(cmd) \
6366 (((cmd) == WLC_GET_MAGIC) || \
6367 ((cmd) == WLC_GET_VERSION) || \
6368 ((cmd) == WLC_GET_AP) || \
6369 ((cmd) == WLC_GET_INSTANCE))
6371 #define MAX_PKTENG_SWEEP_STEPS 40
6372 typedef struct wl_pkteng
{
6374 uint32 delay
; /**< Inter-packet delay */
6375 uint32 nframes
; /**< Number of frames */
6376 uint32 length
; /**< Packet length */
6377 uint8 seqno
; /**< Enable/disable sequence no. */
6378 struct ether_addr dest
; /**< Destination address */
6379 struct ether_addr src
; /**< Source address */
6380 uint8 sweep_steps
; /**< Number of sweep power */
6384 /* IOVAR pkteng_sweep_counters response structure */
6385 #define WL_PKTENG_SWEEP_COUNTERS_VERSION 1
6386 typedef struct wl_pkteng_sweep_ctrs
{
6387 uint16 version
; /**< Version - 1 */
6388 uint16 size
; /**< Complete Size including sweep_counters */
6389 uint16 sweep_steps
; /**< Number of steps */
6391 uint16 sweep_counter
[]; /**< Array of frame counters */
6392 } wl_pkteng_sweep_ctrs_t
;
6394 #define WL_PKTENG_RU_FILL_VER_1 1
6395 // struct for ru packet engine
6396 typedef struct wl_pkteng_ru_v1
{
6397 uint16 version
; /* ver is 1 */
6398 uint16 length
; /* size of complete structure */
6399 uint8 bw
; /* bandwidth info */
6400 uint8 ru_alloc_val
; /* ru allocation index number */
6401 uint8 mcs_val
; /* mcs allocated value */
6402 uint8 nss_val
; /* num of spatial streams */
6403 uint32 num_bytes
; /* approx num of bytes to calculate other required params */
6404 uint8 cp_ltf_val
; /* GI and LTF symbol size */
6405 uint8 he_ltf_symb
; /* num of HE-LTF symbols */
6406 uint8 stbc
; /* STBC support */
6407 uint8 coding_val
; /* BCC/LDPC coding support */
6408 uint8 pe_category
; /* PE duration 0/8/16usecs */
6409 uint8 dcm
; /* dual carrier modulation */
6410 uint8 mumimo_ltfmode
; /* ltf mode */
6411 uint8 trig_tx
; /* form and transmit the trigger frame */
6412 uint8 trig_type
; /* type of trigger frame */
6413 uint8 trig_period
; /* trigger tx periodicity TBD */
6414 struct ether_addr dest
; /* destination address for un-associated mode */
6415 } wl_pkteng_ru_v1_t
;
6417 #ifndef WL_PKTENG_RU_VER
6418 /* App uses the latest version - source picks it up from wlc_types.h */
6419 typedef wl_pkteng_ru_v1_t wl_pkteng_ru_fill_t
;
6422 typedef struct wl_trig_frame_info
{
6423 /* Structure versioning and structure length params */
6426 /* Below params are the fields related to trigger frame contents */
6427 /* Common Info Params Figure 9-52d - 11ax Draft 1.1 */
6429 uint16 trigger_type
;
6430 uint16 cascade_indication
;
6434 uint16 mu_mimo_ltf_mode
;
6435 uint16 num_he_ltf_syms
;
6437 uint16 ldpc_extra_symb
;
6440 uint16 pe_disambiguity
;
6441 uint16 spatial_resuse
;
6443 uint16 he_siga_rsvd
;
6444 uint16 cmn_info_rsvd
;
6445 /* User Info Params Figure 9-52e - 11ax Draft 1.1 */
6453 uint16 usr_info_rsvd
;
6454 } wl_trig_frame_info_t
;
6456 /* wl pkteng_stats related definitions */
6457 #define WL_PKTENG_STATS_V1 (1)
6458 #define WL_PKTENG_STATS_V2 (2)
6460 typedef struct wl_pkteng_stats_v1
{
6461 uint32 lostfrmcnt
; /**< RX PER test: no of frames lost (skip seqno) */
6462 int32 rssi
; /**< RSSI */
6463 int32 snr
; /**< signal to noise ratio */
6464 uint16 rxpktcnt
[NUM_80211_RATES
+1];
6465 uint8 rssi_qdb
; /**< qdB portion of the computed rssi */
6467 } wl_pkteng_stats_v1_t
;
6469 typedef struct wl_pkteng_stats_v2
{
6470 uint32 lostfrmcnt
; /**< RX PER test: no of frames lost (skip seqno) */
6471 int32 rssi
; /**< RSSI */
6472 int32 snr
; /**< signal to noise ratio */
6473 uint16 rxpktcnt
[NUM_80211_RATES
+1];
6474 uint8 rssi_qdb
; /**< qdB portion of the computed rssi */
6478 int32 rssi_per_core
[WL_RSSI_ANT_MAX
];
6479 int32 rssi_per_core_qdb
[WL_RSSI_ANT_MAX
];
6480 } wl_pkteng_stats_v2_t
;
6482 #ifndef WL_PKTENG_STATS_TYPEDEF_HAS_ALIAS
6483 typedef wl_pkteng_stats_v1_t wl_pkteng_stats_t
;
6484 #endif /* WL_PKTENG_STATS_TYPEDEF_HAS_ALIAS */
6486 typedef struct wl_txcal_params
{
6492 } wl_txcal_params_t
;
6494 typedef struct wl_txcal_gainidx
{
6495 uint8 num_actv_cores
;
6496 uint8 gidx_start_percore
[WL_STA_ANT_MAX
];
6497 uint8 gidx_stop_percore
[WL_STA_ANT_MAX
];
6499 } wl_txcal_gainidx_t
;
6501 typedef struct wl_txcal_params_v2
{
6504 uint8 pwr_start
[WL_STA_ANT_MAX
];
6505 uint8 pwr_stop
[WL_STA_ANT_MAX
];
6506 uint8 init_start_idx
;
6507 uint8 gidx_start_percore
[WL_STA_ANT_MAX
];
6508 uint8 gidx_stop_percore
[WL_STA_ANT_MAX
];
6510 } wl_txcal_params_v2_t
;
6512 typedef wl_txcal_params_t wl_txcal_params_v1_t
;
6514 typedef struct wl_rssilog_params
{
6516 uint8 rssi_threshold
;
6517 uint8 time_threshold
;
6519 } wl_rssilog_params_t
;
6521 typedef struct wl_sslpnphy_papd_debug_data
{
6530 } wl_sslpnphy_papd_debug_data_t
;
6531 typedef struct wl_sslpnphy_debug_data
{
6532 int16 papdcompRe
[64];
6533 int16 papdcompIm
[64];
6534 } wl_sslpnphy_debug_data_t
;
6535 typedef struct wl_sslpnphy_spbdump_data
{
6539 } wl_sslpnphy_spbdump_data_t
;
6540 typedef struct wl_sslpnphy_percal_debug_data
{
6547 uint32 force_1idxcal
;
6548 uint32 onedxacl_req
;
6549 int32 last_cal_volt
;
6555 } wl_sslpnphy_percal_debug_data_t
;
6558 wowl_pattern_type_bitmap
= 0,
6559 wowl_pattern_type_arp
,
6560 wowl_pattern_type_na
6561 } wowl_pattern_type_t
;
6563 typedef struct wl_wowl_pattern
{
6564 uint32 masksize
; /**< Size of the mask in #of bytes */
6565 uint32 offset
; /**< Pattern byte offset in packet */
6566 uint32 patternoffset
; /**< Offset of start of pattern in the structure */
6567 uint32 patternsize
; /**< Size of the pattern itself in #of bytes */
6568 uint32 id
; /**< id */
6569 uint32 reasonsize
; /**< Size of the wakeup reason code */
6570 wowl_pattern_type_t type
; /**< Type of pattern */
6571 /* Mask follows the structure above */
6572 /* Pattern follows the mask is at 'patternoffset' from the start */
6573 } wl_wowl_pattern_t
;
6575 typedef struct wl_wowl_pattern_list
{
6577 wl_wowl_pattern_t pattern
[1];
6578 } wl_wowl_pattern_list_t
;
6580 typedef struct wl_wowl_wakeind
{
6581 uint8 pci_wakeind
; /**< Whether PCI PMECSR PMEStatus bit was set */
6582 uint32 ucode_wakeind
; /**< What wakeup-event indication was set by ucode */
6583 } wl_wowl_wakeind_t
;
6585 /** per AC rate control related data structure */
6586 typedef struct wl_txrate_class
{
6590 } wl_txrate_class_t
;
6592 /** structure for Overlap BSS scan arguments */
6593 typedef struct wl_obss_scan_arg
{
6594 int16 passive_dwell
;
6596 int16 bss_widthscan_interval
;
6597 int16 passive_total
;
6599 int16 chanwidth_transition_delay
;
6600 int16 activity_threshold
;
6601 } wl_obss_scan_arg_t
;
6603 #define WL_OBSS_SCAN_PARAM_LEN sizeof(wl_obss_scan_arg_t)
6605 /** RSSI event notification configuration. */
6606 typedef struct wl_rssi_event
{
6607 uint32 rate_limit_msec
; /**< # of events posted to application will be limited to
6608 * one per specified period (0 to disable rate limit).
6610 uint8 num_rssi_levels
; /**< Number of entries in rssi_levels[] below */
6611 int8 rssi_levels
[MAX_RSSI_LEVELS
]; /**< Variable number of RSSI levels. An event
6612 * will be posted each time the RSSI of received
6613 * beacons/packets crosses a level.
6618 #define RSSI_MONITOR_VERSION 1
6619 #define RSSI_MONITOR_STOP (1 << 0)
6620 typedef struct wl_rssi_monitor_cfg
{
6625 } wl_rssi_monitor_cfg_t
;
6627 typedef struct wl_rssi_monitor_evt
{
6631 } wl_rssi_monitor_evt_t
;
6633 /* CCA based channel quality event configuration (ID values for both config and report) */
6634 #define WL_CHAN_QUAL_CCA 0
6635 #define WL_CHAN_QUAL_NF 1
6636 #define WL_CHAN_QUAL_NF_LTE 2
6637 #define WL_CHAN_QUAL_TOTAL 3 /* The total IDs supported in both config and report */
6638 /* Additional channel quality event support in report only (>= 0x100)
6639 * Notice that uint8 is used in configuration struct wl_chan_qual_metric_t, but uint16 is
6640 * used for report in struct cca_chan_qual_event_t. So the ID values beyond 8-bit are used
6641 * for reporting purpose only.
6643 #define WL_CHAN_QUAL_FULL_CCA (0x100 | WL_CHAN_QUAL_CCA)
6645 #define MAX_CHAN_QUAL_LEVELS 8
6647 typedef struct wl_chan_qual_metric
{
6648 uint8 id
; /**< metric ID */
6649 uint8 num_levels
; /**< Number of entries in rssi_levels[] below */
6651 int16 htol
[MAX_CHAN_QUAL_LEVELS
]; /**< threshold level array: hi-to-lo */
6652 int16 ltoh
[MAX_CHAN_QUAL_LEVELS
]; /**< threshold level array: lo-to-hi */
6653 } wl_chan_qual_metric_t
;
6655 typedef struct wl_chan_qual_event
{
6656 uint32 rate_limit_msec
; /**< # of events posted to application will be limited to
6657 * one per specified period (0 to disable rate limit).
6661 wl_chan_qual_metric_t metric
[WL_CHAN_QUAL_TOTAL
]; /**< metric array */
6662 } wl_chan_qual_event_t
;
6663 typedef struct wl_action_obss_coex_req
{
6667 } wl_action_obss_coex_req_t
;
6669 /** IOVar parameter block for small MAC address array with type indicator */
6670 #define WL_IOV_MAC_PARAM_LEN 4
6672 #define WL_IOV_PKTQ_LOG_PRECS 16
6674 #include <packed_section_start.h>
6675 typedef BWL_PRE_PACKED_STRUCT
struct {
6677 uint8 addr_type
[WL_IOV_MAC_PARAM_LEN
];
6678 struct ether_addr ea
[WL_IOV_MAC_PARAM_LEN
];
6679 } BWL_POST_PACKED_STRUCT wl_iov_mac_params_t
;
6680 #include <packed_section_end.h>
6682 /** This is extra info that follows wl_iov_mac_params_t */
6684 uint32 addr_info
[WL_IOV_MAC_PARAM_LEN
];
6685 } wl_iov_mac_extra_params_t
;
6687 /** Combined structure */
6689 wl_iov_mac_params_t params
;
6690 wl_iov_mac_extra_params_t extra_params
;
6691 } wl_iov_mac_full_params_t
;
6693 /** Parameter block for PKTQ_LOG statistics */
6694 #define PKTQ_LOG_COUNTERS_V4 \
6695 /* packets requested to be stored */ \
6697 /* packets stored */ \
6699 /* packets saved, because a lowest priority queue has given away one packet */ \
6701 /* packets saved, because an older packet from the same queue has been dropped */ \
6703 /* packets dropped, because pktq is full with higher precedence packets */ \
6704 uint32 full_dropped; \
6705 /* packets dropped because pktq per that precedence is full */ \
6707 /* packets dropped, in order to save one from a queue of a highest priority */ \
6708 uint32 sacrificed; \
6709 /* packets droped because of hardware/transmission error */ \
6711 /* packets re-sent because they were not received */ \
6713 /* packets retried again (ps pretend) prior to moving power save mode */ \
6715 /* suppressed packet count */ \
6717 /* packets finally dropped after retry limit */ \
6718 uint32 retry_drop; \
6719 /* the high-water mark of the queue capacity for packets - goes to zero as queue fills */ \
6721 /* the high-water mark of the queue utilisation for packets - ('inverse' of max_avail) */ \
6723 /* the maximum capacity of the queue */ \
6724 uint32 queue_capacity; \
6725 /* count of rts attempts that failed to receive cts */ \
6727 /* count of packets sent (acked) successfully */ \
6729 /* running total of phy rate of packets sent successfully */ \
6730 uint32 txrate_succ; \
6731 /* running total of phy 'main' rate */ \
6732 uint32 txrate_main; \
6733 /* actual data transferred successfully */ \
6734 uint32 throughput; \
6735 /* time difference since last pktq_stats */ \
6739 PKTQ_LOG_COUNTERS_V4
6740 } pktq_log_counters_v04_t
;
6742 /** v5 is the same as V4 with extra parameter */
6744 PKTQ_LOG_COUNTERS_V4
6745 /** cumulative time to transmit */
6747 } pktq_log_counters_v05_t
;
6750 uint8 num_prec
[WL_IOV_MAC_PARAM_LEN
];
6751 pktq_log_counters_v04_t counters
[WL_IOV_MAC_PARAM_LEN
][WL_IOV_PKTQ_LOG_PRECS
];
6752 uint32 counter_info
[WL_IOV_MAC_PARAM_LEN
];
6753 uint32 pspretend_time_delta
[WL_IOV_MAC_PARAM_LEN
];
6755 } pktq_log_format_v04_t
;
6758 uint8 num_prec
[WL_IOV_MAC_PARAM_LEN
];
6759 pktq_log_counters_v05_t counters
[WL_IOV_MAC_PARAM_LEN
][WL_IOV_PKTQ_LOG_PRECS
];
6760 uint32 counter_info
[WL_IOV_MAC_PARAM_LEN
];
6761 uint32 pspretend_time_delta
[WL_IOV_MAC_PARAM_LEN
];
6763 } pktq_log_format_v05_t
;
6767 wl_iov_mac_params_t params
;
6769 pktq_log_format_v04_t v04
;
6770 pktq_log_format_v05_t v05
;
6772 } wl_iov_pktq_log_t
;
6774 /* PKTQ_LOG_AUTO, PKTQ_LOG_DEF_PREC flags introduced in v05, they are ignored by v04 */
6775 #define PKTQ_LOG_AUTO (1 << 31)
6776 #define PKTQ_LOG_DEF_PREC (1 << 30)
6778 typedef struct wl_pfn_macaddr_cfg_0
{
6781 struct ether_addr macaddr
;
6782 } wl_pfn_macaddr_cfg_0_t
;
6783 #define LEGACY1_WL_PFN_MACADDR_CFG_VER 0
6784 #define WL_PFN_MAC_OUI_ONLY_MASK 1
6785 #define WL_PFN_SET_MAC_UNASSOC_MASK 2
6786 #define WL_PFN_RESTRICT_LA_MAC_MASK 4
6787 #define WL_PFN_MACADDR_FLAG_MASK 0x7
6788 /** To configure pfn_macaddr */
6789 typedef struct wl_pfn_macaddr_cfg
{
6792 struct ether_addr macaddr
;
6793 } wl_pfn_macaddr_cfg_t
;
6794 #define WL_PFN_MACADDR_CFG_VER 1
6797 * SCB_BS_DATA iovar definitions start.
6799 #define SCB_BS_DATA_STRUCT_VERSION 1
6801 /** The actual counters maintained for each station */
6803 /* The following counters are a subset of what pktq_stats provides per precedence. */
6804 uint32 retry
; /**< packets re-sent because they were not received */
6805 uint32 retry_drop
; /**< packets finally dropped after retry limit */
6806 uint32 rtsfail
; /**< count of rts attempts that failed to receive cts */
6807 uint32 acked
; /**< count of packets sent (acked) successfully */
6808 uint32 txrate_succ
; /**< running total of phy rate of packets sent successfully */
6809 uint32 txrate_main
; /**< running total of phy 'main' rate */
6810 uint32 throughput
; /**< actual data transferred successfully */
6811 uint32 time_delta
; /**< time difference since last pktq_stats */
6812 uint32 airtime
; /**< cumulative total medium access delay in useconds */
6813 } iov_bs_data_counters_t
;
6815 /** The structure for individual station information. */
6816 #include <packed_section_start.h>
6817 typedef BWL_PRE_PACKED_STRUCT
struct {
6818 struct ether_addr station_address
; /**< The station MAC address */
6819 uint16 station_flags
; /**< Bit mask of flags, for future use. */
6820 iov_bs_data_counters_t station_counters
; /**< The actual counter values */
6821 } BWL_POST_PACKED_STRUCT iov_bs_data_record_t
;
6822 #include <packed_section_end.h>
6824 #include <packed_section_start.h>
6825 typedef BWL_PRE_PACKED_STRUCT
struct {
6826 uint16 structure_version
; /**< Structure version number (for wl/wlu matching) */
6827 uint16 structure_count
; /**< Number of iov_bs_data_record_t records following */
6828 iov_bs_data_record_t structure_record
[1]; /**< 0 - structure_count records */
6829 } BWL_POST_PACKED_STRUCT iov_bs_data_struct_t
;
6830 #include <packed_section_end.h>
6832 /* Bitmask of options that can be passed in to the iovar. */
6834 SCB_BS_DATA_FLAG_NO_RESET
= (1<<0) /**< Do not clear the counters after reading */
6837 * SCB_BS_DATA iovar definitions end.
6840 typedef struct wlc_extlog_cfg
{
6842 uint16 module
; /**< bitmap */
6849 typedef struct log_record
{
6858 char str
[MAX_ARGSTR_LEN
];
6859 char PAD
[4-MAX_ARGSTR_LEN
%4];
6862 typedef struct wlc_extlog_req
{
6867 typedef struct wlc_extlog_results
{
6871 log_record_t logs
[1];
6872 } wlc_extlog_results_t
;
6874 typedef struct log_idstr
{
6878 const char *fmt_str
;
6881 #define FMTSTRF_USER 1
6883 /* flat ID definitions
6884 * New definitions HAVE TO BE ADDED at the end of the table. Otherwise, it will
6885 * affect backward compatibility with pre-existing apps
6888 FMTSTR_DRIVER_UP_ID
= 0,
6889 FMTSTR_DRIVER_DOWN_ID
= 1,
6890 FMTSTR_SUSPEND_MAC_FAIL_ID
= 2,
6891 FMTSTR_NO_PROGRESS_ID
= 3,
6892 FMTSTR_RFDISABLE_ID
= 4,
6893 FMTSTR_REG_PRINT_ID
= 5,
6894 FMTSTR_EXPTIME_ID
= 6,
6895 FMTSTR_JOIN_START_ID
= 7,
6896 FMTSTR_JOIN_COMPLETE_ID
= 8,
6897 FMTSTR_NO_NETWORKS_ID
= 9,
6898 FMTSTR_SECURITY_MISMATCH_ID
= 10,
6899 FMTSTR_RATE_MISMATCH_ID
= 11,
6900 FMTSTR_AP_PRUNED_ID
= 12,
6901 FMTSTR_KEY_INSERTED_ID
= 13,
6902 FMTSTR_DEAUTH_ID
= 14,
6903 FMTSTR_DISASSOC_ID
= 15,
6904 FMTSTR_LINK_UP_ID
= 16,
6905 FMTSTR_LINK_DOWN_ID
= 17,
6906 FMTSTR_RADIO_HW_OFF_ID
= 18,
6907 FMTSTR_RADIO_HW_ON_ID
= 19,
6908 FMTSTR_EVENT_DESC_ID
= 20,
6909 FMTSTR_PNP_SET_POWER_ID
= 21,
6910 FMTSTR_RADIO_SW_OFF_ID
= 22,
6911 FMTSTR_RADIO_SW_ON_ID
= 23,
6912 FMTSTR_PWD_MISMATCH_ID
= 24,
6913 FMTSTR_FATAL_ERROR_ID
= 25,
6914 FMTSTR_AUTH_FAIL_ID
= 26,
6915 FMTSTR_ASSOC_FAIL_ID
= 27,
6916 FMTSTR_IBSS_FAIL_ID
= 28,
6917 FMTSTR_EXTAP_FAIL_ID
= 29,
6921 /** 11k Neighbor Report element (unversioned, deprecated) */
6922 typedef struct nbr_element
{
6925 struct ether_addr bssid
;
6932 #define NBR_ADD_STATIC 0
6933 #define NBR_ADD_DYNAMIC 1
6935 #define WL_RRM_NBR_RPT_VER 1
6936 /** 11k Neighbor Report element */
6937 typedef struct nbr_rpt_elem
{
6942 struct ether_addr bssid
;
6948 uint8 addtype
; /* static for manual add or dynamic if auto-learning of neighbors */
6950 chanspec_t chanspec
;
6951 uint8 bss_trans_preference
;
6955 typedef enum event_msgs_ext_command
{
6957 EVENTMSGS_SET_BIT
= 1,
6958 EVENTMSGS_RESET_BIT
= 2,
6959 EVENTMSGS_SET_MASK
= 3
6960 } event_msgs_ext_command_t
;
6962 #define EVENTMSGS_VER 1
6963 #define EVENTMSGS_EXT_STRUCT_SIZE OFFSETOF(eventmsgs_ext_t, mask[0])
6965 /* len- for SET it would be mask size from the application to the firmware */
6966 /* for GET it would be actual firmware mask size */
6967 /* maxgetsize - is only used for GET. indicate max mask size that the */
6968 /* application can read from the firmware */
6969 typedef struct eventmsgs_ext
6978 #include <packed_section_start.h>
6979 typedef BWL_PRE_PACKED_STRUCT
struct pcie_bus_tput_params
{
6980 /** no of host dma descriptors programmed by the firmware before a commit */
6981 uint16 max_dma_descriptors
;
6983 uint16 host_buf_len
; /**< length of host buffer */
6984 dmaaddr_t host_buf_addr
; /**< physical address for bus_throughput_buf */
6985 } BWL_POST_PACKED_STRUCT pcie_bus_tput_params_t
;
6986 #include <packed_section_end.h>
6988 typedef struct pcie_bus_tput_stats
{
6989 uint16 time_taken
; /**< no of secs the test is run */
6990 uint16 nbytes_per_descriptor
; /**< no of bytes of data dma ed per descriptor */
6992 /** no of desciptors for which dma is sucessfully completed within the test time */
6994 } pcie_bus_tput_stats_t
;
6996 #define HOST_WAKEUP_DATA_VER 1
6997 #include <packed_section_start.h>
6998 /* Bus interface host wakeup data */
6999 typedef BWL_PRE_PACKED_STRUCT
struct wl_host_wakeup_data
{
7002 uchar data
[1]; /* wakeup data */
7003 } BWL_POST_PACKED_STRUCT wl_host_wakeup_data_t
;
7004 #include <packed_section_end.h>
7006 #define HOST_WAKEUP_DATA_VER_2 2
7007 #include <packed_section_start.h>
7008 /* Bus interface host wakeup data */
7009 typedef BWL_PRE_PACKED_STRUCT
struct wl_host_wakeup_data_v2
{
7012 uint32 gpio_toggle_time
; /* gpio toggle time in ms */
7013 uchar data
[1]; /* wakeup data */
7014 } BWL_POST_PACKED_STRUCT wl_host_wakeup_data_v2_t
;
7015 #include <packed_section_end.h>
7017 typedef struct keepalives_max_idle
{
7018 uint16 keepalive_count
; /**< nmbr of keepalives per bss_max_idle period */
7019 uint8 mkeepalive_index
; /**< mkeepalive_index for keepalive frame to be used */
7020 uint8 PAD
; /**< to align next field */
7021 uint16 max_interval
; /**< seconds */
7022 } keepalives_max_idle_t
;
7024 #define PM_IGNORE_BCMC_PROXY_ARP (1 << 0)
7025 #define PM_IGNORE_BCMC_ALL_DMS_ACCEPTED (1 << 1)
7027 /* ##### HMAP section ##### */
7028 #define PCIE_MAX_HMAP_WINDOWS 8
7029 #define PCIE_HMAPTEST_VERSION 2
7030 #define HMAPTEST_INVALID_OFFSET 0xFFFFFFFFu
7031 #define HMAPTEST_DEFAULT_WRITE_PATTERN 0xBABECAFEu
7032 #define HMAPTEST_ACCESS_ARM 0
7033 #define HMAPTEST_ACCESS_M2M 1
7034 #define HMAPTEST_ACCESS_D11 2
7035 #define HMAPTEST_ACCESS_NONE 3
7037 typedef struct pcie_hmaptest
{
7038 uint16 version
; /* Version */
7039 uint16 length
; /* Length of entire structure */
7044 uint32 host_addr_hi
;
7045 uint32 host_addr_lo
;
7047 uint32 value
; /* 4 byte value to be filled in case of write access test */
7048 uint32 delay
; /* wait time in seconds before initiating access from dongle */
7051 /* HMAP window register set */
7052 typedef struct hmapwindow
{
7053 uint32 baseaddr_lo
; /* BaseAddrLower */
7054 uint32 baseaddr_hi
; /* BaseAddrUpper */
7055 uint32 windowlength
; /* Window Length */
7058 #define PCIE_HMAP_VERSION 1
7059 typedef struct pcie_hmap
{
7060 uint16 version
; /**< Version */
7061 uint16 length
; /**< Length of entire structure */
7062 uint32 enable
; /**< status of HMAP enabled/disabled */
7063 uint32 nwindows
; /* no. of HMAP windows enabled */
7064 uint32 window_config
; /* HMAP window_config register */
7065 uint32 hmap_violationaddr_lo
; /* violating address lo */
7066 uint32 hmap_violationaddr_hi
; /* violating addr hi */
7067 uint32 hmap_violation_info
; /* violation info */
7068 hmapwindow_t hwindows
[]; /* Multiple hwindows */
7071 /* ##### Power Stats section ##### */
7073 #define WL_PWRSTATS_VERSION 2
7075 /** Input structure for pwrstats IOVAR */
7076 typedef struct wl_pwrstats_query
{
7077 uint16 length
; /**< Number of entries in type array. */
7078 uint16 type
[1]; /**< Types (tags) to retrieve.
7079 * Length 0 (no types) means get all.
7081 } wl_pwrstats_query_t
;
7083 /** This structure is for version 2; version 1 will be deprecated in by FW */
7084 #include <packed_section_start.h>
7085 typedef BWL_PRE_PACKED_STRUCT
struct wl_pwrstats
{
7086 uint16 version
; /**< Version = 2 is TLV format */
7087 uint16 length
; /**< Length of entire structure */
7088 uint8 data
[1]; /**< TLV data, a series of structures,
7089 * each starting with type and length.
7091 * Padded as necessary so each section
7092 * starts on a 4-byte boundary.
7094 * Both type and len are uint16, but the
7095 * upper nibble of length is reserved so
7096 * valid len values are 0-4095.
7098 } BWL_POST_PACKED_STRUCT wl_pwrstats_t
;
7099 #include <packed_section_end.h>
7100 #define WL_PWR_STATS_HDRLEN OFFSETOF(wl_pwrstats_t, data)
7102 /* Bits for wake reasons */
7103 #define WLC_PMD_WAKE_SET 0x1
7104 #define WLC_PMD_PM_AWAKE_BCN 0x2
7105 /* BIT:3 is no longer being used */
7106 #define WLC_PMD_SCAN_IN_PROGRESS 0x8
7107 #define WLC_PMD_RM_IN_PROGRESS 0x10
7108 #define WLC_PMD_AS_IN_PROGRESS 0x20
7109 #define WLC_PMD_PM_PEND 0x40
7110 #define WLC_PMD_PS_POLL 0x80
7111 #define WLC_PMD_CHK_UNALIGN_TBTT 0x100
7112 #define WLC_PMD_APSD_STA_UP 0x200
7113 #define WLC_PMD_TX_PEND_WAR 0x400 /* obsolete, can be reused */
7114 #define WLC_PMD_GPTIMER_STAY_AWAKE 0x800
7115 #define WLC_PMD_PM2_RADIO_SOFF_PEND 0x2000
7116 #define WLC_PMD_NON_PRIM_STA_UP 0x4000
7117 #define WLC_PMD_AP_UP 0x8000
7119 typedef struct wlc_pm_debug
{
7120 uint32 timestamp
; /**< timestamp in millisecond */
7121 uint32 reason
; /**< reason(s) for staying awake */
7124 /** WL_PWRSTATS_TYPE_PM_AWAKE1 structures (for 6.25 firmware) */
7125 #define WLC_STA_AWAKE_STATES_MAX_V1 30
7126 #define WLC_PMD_EVENT_MAX_V1 32
7127 /** Data sent as part of pwrstats IOVAR (and EXCESS_PM_WAKE event) */
7128 #include <packed_section_start.h>
7129 typedef BWL_PRE_PACKED_STRUCT
struct pm_awake_data_v1
{
7130 uint32 curr_time
; /**< ms */
7131 uint32 hw_macc
; /**< HW maccontrol */
7132 uint32 sw_macc
; /**< SW maccontrol */
7133 uint32 pm_dur
; /**< Total sleep time in PM, msecs */
7134 uint32 mpc_dur
; /**< Total sleep time in MPC, msecs */
7136 /* int32 drifts = remote - local; +ve drift => local-clk slow */
7137 int32 last_drift
; /**< Most recent TSF drift from beacon */
7138 int32 min_drift
; /**< Min TSF drift from beacon in magnitude */
7139 int32 max_drift
; /**< Max TSF drift from beacon in magnitude */
7141 uint32 avg_drift
; /**< Avg TSF drift from beacon */
7143 /* Wake history tracking */
7144 uint8 pmwake_idx
; /**< for stepping through pm_state */
7145 wlc_pm_debug_t pm_state
[WLC_STA_AWAKE_STATES_MAX_V1
]; /**< timestamped wake bits */
7146 uint32 pmd_event_wake_dur
[WLC_PMD_EVENT_MAX_V1
]; /**< cumulative usecs per wake reason */
7147 uint32 drift_cnt
; /**< Count of drift readings over which avg_drift was computed */
7148 } BWL_POST_PACKED_STRUCT pm_awake_data_v1_t
;
7149 #include <packed_section_end.h>
7151 #include <packed_section_start.h>
7152 typedef BWL_PRE_PACKED_STRUCT
struct wl_pwr_pm_awake_stats_v1
{
7153 uint16 type
; /**< WL_PWRSTATS_TYPE_PM_AWAKE */
7154 uint16 len
; /**< Up to 4K-1, top 4 bits are reserved */
7156 pm_awake_data_v1_t awake_data
;
7157 uint32 frts_time
; /**< Cumulative ms spent in frts since driver load */
7158 uint32 frts_end_cnt
; /**< No of times frts ended since driver load */
7159 } BWL_POST_PACKED_STRUCT wl_pwr_pm_awake_stats_v1_t
;
7160 #include <packed_section_end.h>
7162 /** WL_PWRSTATS_TYPE_PM_AWAKE2 structures. Data sent as part of pwrstats IOVAR */
7163 typedef struct pm_awake_data_v2
{
7164 uint32 curr_time
; /**< ms */
7165 uint32 hw_macc
; /**< HW maccontrol */
7166 uint32 sw_macc
; /**< SW maccontrol */
7167 uint32 pm_dur
; /**< Total sleep time in PM, msecs */
7168 uint32 mpc_dur
; /**< Total sleep time in MPC, msecs */
7170 /* int32 drifts = remote - local; +ve drift => local-clk slow */
7171 int32 last_drift
; /**< Most recent TSF drift from beacon */
7172 int32 min_drift
; /**< Min TSF drift from beacon in magnitude */
7173 int32 max_drift
; /**< Max TSF drift from beacon in magnitude */
7175 uint32 avg_drift
; /**< Avg TSF drift from beacon */
7177 /* Wake history tracking */
7179 /* pmstate array (type wlc_pm_debug_t) start offset */
7180 uint16 pm_state_offset
;
7181 /** pmstate number of array entries */
7182 uint16 pm_state_len
;
7184 /** array (type uint32) start offset */
7185 uint16 pmd_event_wake_dur_offset
;
7186 /** pmd_event_wake_dur number of array entries */
7187 uint16 pmd_event_wake_dur_len
;
7189 uint32 drift_cnt
; /**< Count of drift readings over which avg_drift was computed */
7190 uint8 pmwake_idx
; /**< for stepping through pm_state */
7191 uint8 flags
; /**< bit0: 1-sleep, 0- wake. bit1: 0-bit0 invlid, 1-bit0 valid */
7193 uint32 frts_time
; /**< Cumulative ms spent in frts since driver load */
7194 uint32 frts_end_cnt
; /**< No of times frts ended since driver load */
7195 } pm_awake_data_v2_t
;
7197 typedef struct wl_pwr_pm_awake_stats_v2
{
7198 uint16 type
; /**< WL_PWRSTATS_TYPE_PM_AWAKE */
7199 uint16 len
; /**< Up to 4K-1, top 4 bits are reserved */
7201 pm_awake_data_v2_t awake_data
;
7202 } wl_pwr_pm_awake_stats_v2_t
;
7204 /* bit0: 1-sleep, 0- wake. bit1: 0-bit0 invlid, 1-bit0 valid */
7205 #define WL_PWR_PM_AWAKE_STATS_WAKE 0x02
7206 #define WL_PWR_PM_AWAKE_STATS_ASLEEP 0x03
7207 #define WL_PWR_PM_AWAKE_STATS_WAKE_MASK 0x03
7209 /* WL_PWRSTATS_TYPE_PM_AWAKE Version 2 structures taken from 4324/43342 */
7210 /* These structures are only to be used with 4324/43342 devices */
7212 #define WL_STA_AWAKE_STATES_MAX_V2 30
7213 #define WL_PMD_EVENT_MAX_V2 32
7214 #define MAX_P2P_BSS_DTIM_PRD 4
7216 #include <packed_section_start.h>
7217 typedef BWL_PRE_PACKED_STRUCT
struct ucode_dbg_v2
{
7220 uint16 m_p2p_bss_dtim_prd
[MAX_P2P_BSS_DTIM_PRD
];
7221 uint32 psmdebug
[20];
7222 uint32 phydebug
[20];
7225 } BWL_POST_PACKED_STRUCT ucode_dbg_v2_t
;
7226 #include <packed_section_end.h>
7228 #include <packed_section_start.h>
7229 typedef BWL_PRE_PACKED_STRUCT
struct pmalert_awake_data_v2
{
7230 uint32 curr_time
; /* ms */
7231 uint32 hw_macc
; /* HW maccontrol */
7232 uint32 sw_macc
; /* SW maccontrol */
7233 uint32 pm_dur
; /* Total sleep time in PM, msecs */
7234 uint32 mpc_dur
; /* Total sleep time in MPC, msecs */
7236 /* int32 drifts = remote - local; +ve drift => local-clk slow */
7237 int32 last_drift
; /* Most recent TSF drift from beacon */
7238 int32 min_drift
; /* Min TSF drift from beacon in magnitude */
7239 int32 max_drift
; /* Max TSF drift from beacon in magnitude */
7241 uint32 avg_drift
; /* Avg TSF drift from beacon */
7243 /* Wake history tracking */
7244 uint8 pmwake_idx
; /* for stepping through pm_state */
7245 wlc_pm_debug_t pm_state
[WL_STA_AWAKE_STATES_MAX_V2
]; /* timestamped wake bits */
7246 uint32 pmd_event_wake_dur
[WL_PMD_EVENT_MAX_V2
]; /* cumulative usecs per wake reason */
7247 uint32 drift_cnt
; /* Count of drift readings over which avg_drift was computed */
7248 uint32 start_event_dur
[WL_PMD_EVENT_MAX_V2
]; /* start event-duration */
7250 uint32 frts_time
; /* Cumulative ms spent in frts since driver load */
7251 uint32 frts_end_cnt
; /* No of times frts ended since driver load */
7252 } BWL_POST_PACKED_STRUCT pmalert_awake_data_v2_t
;
7253 #include <packed_section_end.h>
7255 #include <packed_section_start.h>
7256 typedef BWL_PRE_PACKED_STRUCT
struct pm_alert_data_v2
{
7258 uint32 length
; /* Length of entire structure */
7259 uint32 reasons
; /* reason(s) for pm_alert */
7260 /* Following fields are present only for reasons
7261 * PM_DUR_EXCEEDED, MPC_DUR_EXCEEDED & CONST_AWAKE_DUR_EXCEEDED
7263 uint32 prev_stats_time
; /* msecs */
7264 uint32 prev_pm_dur
; /* msecs */
7265 uint32 prev_mpc_dur
; /* msecs */
7266 pmalert_awake_data_v2_t awake_data
;
7267 } BWL_POST_PACKED_STRUCT pm_alert_data_v2_t
;
7268 #include <packed_section_end.h>
7270 #include <packed_section_start.h>
7271 typedef BWL_PRE_PACKED_STRUCT
struct wl_pwr_pm_awake_status_v2
{
7272 uint16 type
; /* WL_PWRSTATS_TYPE_PM_AWAKE */
7273 uint16 len
; /* Up to 4K-1, top 4 bits are reserved */
7275 pmalert_awake_data_v2_t awake_data
;
7276 uint32 frts_time
; /* Cumulative ms spent in frts since driver load */
7277 uint32 frts_end_cnt
; /* No of times frts ended since driver load */
7278 } BWL_POST_PACKED_STRUCT wl_pwr_pm_awake_status_v2_t
;
7279 #include <packed_section_end.h>
7281 /* Below are latest definitions from PHO25178RC100_BRANCH_6_50 */
7282 /* wl_pwr_pm_awake_stats_v1_t is used for WL_PWRSTATS_TYPE_PM_AWAKE */
7283 /* (at least) the chip independent registers */
7284 typedef struct ucode_dbg_ext
{
7345 uint16 shm_P2P_intr
[16];
7346 uint16 shm_P2P_perbss
[48];
7349 #include <packed_section_start.h>
7350 typedef BWL_PRE_PACKED_STRUCT
struct pm_alert_data_v1
{
7352 uint32 length
; /**< Length of entire structure */
7353 uint32 reasons
; /**< reason(s) for pm_alert */
7354 /* Following fields are present only for reasons
7355 * PM_DUR_EXCEEDED, MPC_DUR_EXCEEDED & CONST_AWAKE_DUR_EXCEEDED
7357 uint32 prev_stats_time
; /**< msecs */
7358 uint32 prev_pm_dur
; /**< msecs */
7359 uint32 prev_mpc_dur
; /**< msecs */
7360 pm_awake_data_v1_t awake_data
;
7361 uint32 start_event_dur
[WLC_PMD_EVENT_MAX_V1
]; /**< start event-duration */
7363 uint32 frts_time
; /**< Cumulative ms spent in frts since driver load */
7364 uint32 frts_end_cnt
; /**< No of times frts ended since driver load */
7365 ucode_dbg_ext_t ud_ext
;
7366 uint32 prev_frts_dur
; /**< ms */
7367 } BWL_POST_PACKED_STRUCT pm_alert_data_v1_t
;
7368 #include <packed_section_end.h>
7370 /* End of 43342/4324 v2 structure definitions */
7372 /* Original bus structure is for HSIC */
7374 typedef struct bus_metrics
{
7375 uint32 suspend_ct
; /**< suspend count */
7376 uint32 resume_ct
; /**< resume count */
7377 uint32 disconnect_ct
; /**< disconnect count */
7378 uint32 reconnect_ct
; /**< reconnect count */
7379 uint32 active_dur
; /**< msecs in bus, usecs for user */
7380 uint32 suspend_dur
; /**< msecs in bus, usecs for user */
7381 uint32 disconnect_dur
; /**< msecs in bus, usecs for user */
7384 /** Bus interface info for USB/HSIC */
7385 #include <packed_section_start.h>
7386 typedef BWL_PRE_PACKED_STRUCT
struct wl_pwr_usb_hsic_stats
{
7387 uint16 type
; /**< WL_PWRSTATS_TYPE_USB_HSIC */
7388 uint16 len
; /**< Up to 4K-1, top 4 bits are reserved */
7390 bus_metrics_t hsic
; /**< stats from hsic bus driver */
7391 } BWL_POST_PACKED_STRUCT wl_pwr_usb_hsic_stats_t
;
7392 #include <packed_section_end.h>
7394 /* PCIe Event counter tlv IDs */
7395 enum pcie_cnt_xtlv_id
{
7396 PCIE_CNT_XTLV_METRICS
= 0x1, /**< PCIe Bus Metrics */
7397 PCIE_CNT_XTLV_BUS_CNT
= 0x2 /**< PCIe Bus counters */
7400 typedef struct pcie_bus_metrics
{
7401 uint32 d3_suspend_ct
; /**< suspend count */
7402 uint32 d0_resume_ct
; /**< resume count */
7403 uint32 perst_assrt_ct
; /**< PERST# assert count */
7404 uint32 perst_deassrt_ct
; /**< PERST# de-assert count */
7405 uint32 active_dur
; /**< msecs */
7406 uint32 d3_suspend_dur
; /**< msecs */
7407 uint32 perst_dur
; /**< msecs */
7408 uint32 l0_cnt
; /**< L0 entry count */
7409 uint32 l0_usecs
; /**< L0 duration in usecs */
7410 uint32 l1_cnt
; /**< L1 entry count */
7411 uint32 l1_usecs
; /**< L1 duration in usecs */
7412 uint32 l1_1_cnt
; /**< L1_1ss entry count */
7413 uint32 l1_1_usecs
; /**< L1_1ss duration in usecs */
7414 uint32 l1_2_cnt
; /**< L1_2ss entry count */
7415 uint32 l1_2_usecs
; /**< L1_2ss duration in usecs */
7416 uint32 l2_cnt
; /**< L2 entry count */
7417 uint32 l2_usecs
; /**< L2 duration in usecs */
7418 uint32 timestamp
; /**< Timestamp on when stats are collected */
7419 uint32 num_h2d_doorbell
; /**< # of doorbell interrupts - h2d */
7420 uint32 num_d2h_doorbell
; /**< # of doorbell interrupts - d2h */
7421 uint32 num_submissions
; /**< # of submissions */
7422 uint32 num_completions
; /**< # of completions */
7423 uint32 num_rxcmplt
; /**< # of rx completions */
7424 uint32 num_rxcmplt_drbl
; /**< of drbl interrupts for rx complt. */
7425 uint32 num_txstatus
; /**< # of tx completions */
7426 uint32 num_txstatus_drbl
; /**< of drbl interrupts for tx complt. */
7427 uint32 deepsleep_count
; /**< # of times chip went to deepsleep */
7428 uint32 deepsleep_dur
; /**< # of msecs chip was in deepsleep */
7429 uint32 ltr_active_ct
; /**< # of times chip went to LTR ACTIVE */
7430 uint32 ltr_active_dur
; /**< # of msecs chip was in LTR ACTIVE */
7431 uint32 ltr_sleep_ct
; /**< # of times chip went to LTR SLEEP */
7432 uint32 ltr_sleep_dur
; /**< # of msecs chip was in LTR SLEEP */
7433 } pcie_bus_metrics_t
;
7435 typedef struct pcie_cnt
{
7436 uint32 ltr_state
; /**< Current LTR state */
7437 uint32 l0_sr_cnt
; /**< SR count during L0 */
7438 uint32 l2l3_sr_cnt
; /**< SR count during L2L3 */
7439 uint32 d3_ack_sr_cnt
; /**< srcount during last D3-ACK */
7440 uint32 d3_sr_cnt
; /**< SR count during D3 */
7441 uint32 d3_info_start
; /**< D3 INFORM received time */
7442 uint32 d3_info_enter_cnt
; /**< # of D3 INFORM received */
7443 uint32 d3_cnt
; /**< # of real D3 */
7444 uint32 d3_ack_sent_cnt
; /**< # of D3 ACK sent count */
7445 uint32 d3_drop_cnt_event
; /**< # of events dropped during D3 */
7446 uint32 d2h_req_q_len
; /**< # of Packet pending in D2H request queue */
7447 uint32 hw_reason
; /**< Last Host wake assert reason */
7448 uint32 hw_assert_cnt
; /**< # of times Host wake Asserted */
7449 uint32 host_ready_cnt
; /**< # of Host ready interrupts */
7450 uint32 hw_assert_reason_0
; /**< timestamp when hw_reason is TRAP */
7451 uint32 hw_assert_reason_1
; /**< timestamp when hw_reason is WL_EVENT */
7452 uint32 hw_assert_reason_2
; /**< timestamp when hw_reason is DATA */
7453 uint32 hw_assert_reason_3
; /**< timestamp when hw_reason is DELAYED_WAKE */
7454 uint32 last_host_ready
; /**< Timestamp of last Host ready */
7455 bool hw_asserted
; /**< Flag to indicate if Host wake is Asserted */
7456 bool event_delivery_pend
; /**< No resources to send event */
7457 uint16 pad
; /**< Word alignment for scripts */
7460 /** Bus interface info for PCIE */
7461 typedef struct wl_pwr_pcie_stats
{
7462 uint16 type
; /**< WL_PWRSTATS_TYPE_PCIE */
7463 uint16 len
; /**< Up to 4K-1, top 4 bits are reserved */
7464 pcie_bus_metrics_t pcie
; /**< stats from pcie bus driver */
7465 } wl_pwr_pcie_stats_t
;
7467 /** Scan information history per category */
7468 typedef struct scan_data
{
7469 uint32 count
; /**< Number of scans performed */
7470 uint32 dur
; /**< Total time (in us) used */
7473 typedef struct wl_pwr_scan_stats
{
7474 uint16 type
; /**< WL_PWRSTATS_TYPE_SCAN */
7475 uint16 len
; /**< Up to 4K-1, top 4 bits are reserved */
7478 scan_data_t user_scans
; /**< User-requested scans: (i/e/p)scan */
7479 scan_data_t assoc_scans
; /**< Scans initiated by association requests */
7480 scan_data_t roam_scans
; /**< Scans initiated by the roam engine */
7481 scan_data_t pno_scans
[8]; /**< For future PNO bucketing (BSSID, SSID, etc) */
7482 scan_data_t other_scans
; /**< Scan engine usage not assigned to the above */
7483 } wl_pwr_scan_stats_t
;
7485 typedef struct wl_pwr_connect_stats
{
7486 uint16 type
; /**< WL_PWRSTATS_TYPE_SCAN */
7487 uint16 len
; /**< Up to 4K-1, top 4 bits are reserved */
7489 /* Connection (Association + Key exchange) data */
7490 uint32 count
; /**< Number of connections performed */
7491 uint32 dur
; /**< Total time (in ms) used */
7492 } wl_pwr_connect_stats_t
;
7494 typedef struct wl_pwr_phy_stats
{
7495 uint16 type
; /**< WL_PWRSTATS_TYPE_PHY */
7496 uint16 len
; /**< Up to 4K-1, top 4 bits are reserved */
7497 uint32 tx_dur
; /**< TX Active duration in us */
7498 uint32 rx_dur
; /**< RX Active duration in us */
7499 } wl_pwr_phy_stats_t
;
7501 typedef struct wl_mimo_meas_metrics_v1
{
7504 /* Total time(us) idle in MIMO RX chain configuration */
7505 uint32 total_idle_time_mimo
;
7506 /* Total time(us) idle in SISO RX chain configuration */
7507 uint32 total_idle_time_siso
;
7508 /* Total receive time (us) in SISO RX chain configuration */
7509 uint32 total_rx_time_siso
;
7510 /* Total receive time (us) in MIMO RX chain configuration */
7511 uint32 total_rx_time_mimo
;
7512 /* Total 1-chain transmit time(us) */
7513 uint32 total_tx_time_1chain
;
7514 /* Total 2-chain transmit time(us) */
7515 uint32 total_tx_time_2chain
;
7516 /* Total 3-chain transmit time(us) */
7517 uint32 total_tx_time_3chain
;
7518 } wl_mimo_meas_metrics_v1_t
;
7520 typedef struct wl_mimo_meas_metrics
{
7523 /* Total time(us) idle in MIMO RX chain configuration */
7524 uint32 total_idle_time_mimo
;
7525 /* Total time(us) idle in SISO RX chain configuration */
7526 uint32 total_idle_time_siso
;
7527 /* Total receive time (us) in SISO RX chain configuration */
7528 uint32 total_rx_time_siso
;
7529 /* Total receive time (us) in MIMO RX chain configuration */
7530 uint32 total_rx_time_mimo
;
7531 /* Total 1-chain transmit time(us) */
7532 uint32 total_tx_time_1chain
;
7533 /* Total 2-chain transmit time(us) */
7534 uint32 total_tx_time_2chain
;
7535 /* Total 3-chain transmit time(us) */
7536 uint32 total_tx_time_3chain
;
7537 /* End of original, OCL fields start here */
7538 /* Total time(us) idle in ocl mode */
7539 uint32 total_idle_time_ocl
;
7540 /* Total receive time (us) in ocl mode */
7541 uint32 total_rx_time_ocl
;
7542 /* End of OCL fields, internal adjustment fields here */
7543 /* Total SIFS idle time in MIMO mode */
7544 uint32 total_sifs_time_mimo
;
7545 /* Total SIFS idle time in SISO mode */
7546 uint32 total_sifs_time_siso
;
7547 } wl_mimo_meas_metrics_t
;
7549 typedef struct wl_pwr_slice_index
{
7550 uint16 type
; /* WL_PWRSTATS_TYPE_SLICE_INDEX */
7553 uint32 slice_index
; /* Slice index for which stats are meant for */
7554 } wl_pwr_slice_index_t
;
7556 typedef struct wl_pwr_tsync_stats
{
7557 uint16 type
; /**< WL_PWRSTATS_TYPE_TSYNC */
7559 uint32 avb_uptime
; /**< AVB uptime in msec */
7560 } wl_pwr_tsync_stats_t
;
7562 typedef struct wl_pwr_ops_stats
{
7563 uint16 type
; /* WL_PWRSTATS_TYPE_OPS_STATS */
7564 uint16 len
; /* total length includes fixed fields */
7565 uint32 partial_ops_dur
; /* Total time(in usec) partial ops duration */
7566 uint32 full_ops_dur
; /* Total time(in usec) full ops duration */
7567 } wl_pwr_ops_stats_t
;
7569 typedef struct wl_pwr_bcntrim_stats
{
7570 uint16 type
; /* WL_PWRSTATS_TYPE_BCNTRIM_STATS */
7571 uint16 len
; /* total length includes fixed fields */
7572 uint8 associated
; /* STA is associated ? */
7573 uint8 slice_idx
; /* on which slice STA is associated */
7574 uint16 pad
; /* padding */
7575 uint32 slice_beacon_seen
; /* number of beacons seen on the Infra
7576 * interface on this slice
7578 uint32 slice_beacon_trimmed
; /* number beacons actually trimmed on this slice */
7579 uint32 total_beacon_seen
; /* total number of beacons seen on the Infra interface */
7580 uint32 total_beacon_trimmed
; /* total beacons actually trimmed */
7581 } wl_pwr_bcntrim_stats_t
;
7583 typedef struct wl_pwr_slice_index_band
{
7584 uint16 type
; /* WL_PWRSTATS_TYPE_SLICE_INDEX_BAND_INFO */
7585 uint16 len
; /* Total length includes fixed fields */
7586 uint16 index
; /* Slice Index */
7587 int16 bandtype
; /* Slice Bandtype */
7588 } wl_pwr_slice_index_band_t
;
7590 typedef struct wl_pwr_psbw_stats
{
7591 uint16 type
; /* WL_PWRSTATS_TYPE_PSBW_STATS */
7592 uint16 len
; /* total length includes fixed fields */
7593 uint8 slice_idx
; /* on which slice STA is associated */
7595 uint32 slice_enable_dur
; /* time(ms) psbw remains enabled on this slice */
7596 uint32 total_enable_dur
; /* time(ms) psbw remains enabled total */
7597 } wl_pwr_psbw_stats_t
;
7599 /* ##### End of Power Stats section ##### */
7601 /** IPV4 Arp offloads for ndis context */
7602 #include <packed_section_start.h>
7603 BWL_PRE_PACKED_STRUCT
struct hostip_id
{
7604 struct ipv4_addr ipa
;
7606 } BWL_POST_PACKED_STRUCT
;
7607 #include <packed_section_end.h>
7610 #define ND_REPLY_PEER 0x1 /**< Reply was sent to service NS request from peer */
7611 #define ND_REQ_SINK 0x2 /**< Input packet should be discarded */
7612 #define ND_FORCE_FORWARD 0X3 /**< For the dongle to forward req to HOST */
7614 /** Neighbor Solicitation Response Offload IOVAR param */
7615 #include <packed_section_start.h>
7616 typedef BWL_PRE_PACKED_STRUCT
struct nd_param
{
7617 struct ipv6_addr host_ip
[2];
7618 struct ipv6_addr solicit_ip
;
7619 struct ipv6_addr remote_ip
;
7620 uint8 host_mac
[ETHER_ADDR_LEN
];
7622 } BWL_POST_PACKED_STRUCT nd_param_t
;
7623 #include <packed_section_end.h>
7625 typedef struct wl_pfn_roam_thresh
{
7626 uint32 pfn_alert_thresh
; /**< time in ms */
7627 uint32 roam_alert_thresh
; /**< time in ms */
7628 } wl_pfn_roam_thresh_t
;
7630 /* Reasons for wl_pmalert_t */
7631 #define PM_DUR_EXCEEDED (1<<0)
7632 #define MPC_DUR_EXCEEDED (1<<1)
7633 #define ROAM_ALERT_THRESH_EXCEEDED (1<<2)
7634 #define PFN_ALERT_THRESH_EXCEEDED (1<<3)
7635 #define CONST_AWAKE_DUR_ALERT (1<<4)
7636 #define CONST_AWAKE_DUR_RECOVERY (1<<5)
7638 #define MIN_PM_ALERT_LEN 9
7640 /** Data sent in EXCESS_PM_WAKE event */
7641 #define WL_PM_ALERT_VERSION 3
7643 /** This structure is for version 3; version 2 will be deprecated in by FW */
7644 #include <packed_section_start.h>
7645 typedef BWL_PRE_PACKED_STRUCT
struct wl_pmalert
{
7646 uint16 version
; /**< Version = 3 is TLV format */
7647 uint16 length
; /**< Length of entire structure */
7648 uint32 reasons
; /**< reason(s) for pm_alert */
7649 uint8 data
[1]; /**< TLV data, a series of structures,
7650 * each starting with type and length.
7652 * Padded as necessary so each section
7653 * starts on a 4-byte boundary.
7655 * Both type and len are uint16, but the
7656 * upper nibble of length is reserved so
7657 * valid len values are 0-4095.
7659 } BWL_POST_PACKED_STRUCT wl_pmalert_t
;
7660 #include <packed_section_end.h>
7662 /* Type values for the data section */
7663 #define WL_PMALERT_FIXED 0 /**< struct wl_pmalert_fixed_t, fixed fields */
7664 #define WL_PMALERT_PMSTATE 1 /**< struct wl_pmalert_pmstate_t, variable */
7665 #define WL_PMALERT_EVENT_DUR 2 /**< struct wl_pmalert_event_dur_t, variable */
7666 #define WL_PMALERT_UCODE_DBG 3 /**< struct wl_pmalert_ucode_dbg_v1, variable */
7667 #define WL_PMALERT_PS_ALLOWED_HIST 4 /**< struct wl_pmalert_ps_allowed_history, variable */
7668 #define WL_PMALERT_EXT_UCODE_DBG 5 /**< struct wl_pmalert_ext_ucode_dbg_t, variable */
7669 #define WL_PMALERT_EPM_START_EVENT_DUR 6 /**< struct wl_pmalert_event_dur_t, variable */
7670 #define WL_PMALERT_UCODE_DBG_V2 7 /**< struct wl_pmalert_ucode_dbg_v2, variable */
7672 typedef struct wl_pmalert_fixed
{
7673 uint16 type
; /**< WL_PMALERT_FIXED */
7674 uint16 len
; /**< Up to 4K-1, top 4 bits are reserved */
7675 uint32 prev_stats_time
; /**< msecs */
7676 uint32 curr_time
; /**< ms */
7677 uint32 prev_pm_dur
; /**< msecs */
7678 uint32 pm_dur
; /**< Total sleep time in PM, msecs */
7679 uint32 prev_mpc_dur
; /**< msecs */
7680 uint32 mpc_dur
; /**< Total sleep time in MPC, msecs */
7681 uint32 hw_macc
; /**< HW maccontrol */
7682 uint32 sw_macc
; /**< SW maccontrol */
7684 /* int32 drifts = remote - local; +ve drift -> local-clk slow */
7685 int32 last_drift
; /**< Most recent TSF drift from beacon */
7686 int32 min_drift
; /**< Min TSF drift from beacon in magnitude */
7687 int32 max_drift
; /**< Max TSF drift from beacon in magnitude */
7689 uint32 avg_drift
; /**< Avg TSF drift from beacon */
7690 uint32 drift_cnt
; /**< Count of drift readings over which avg_drift was computed */
7691 uint32 frts_time
; /**< Cumulative ms spent in data frts since driver load */
7692 uint32 frts_end_cnt
; /**< No of times frts ended since driver load */
7693 uint32 prev_frts_dur
; /**< Data frts duration at start of pm-period */
7694 uint32 cal_dur
; /**< Cumulative ms spent in calibration */
7695 uint32 prev_cal_dur
; /**< cal duration at start of pm-period */
7696 } wl_pmalert_fixed_t
;
7698 typedef struct wl_pmalert_pmstate
{
7699 uint16 type
; /**< WL_PMALERT_PMSTATE */
7700 uint16 len
; /**< Up to 4K-1, top 4 bits are reserved */
7702 uint8 pmwake_idx
; /**< for stepping through pm_state */
7704 /* Array of pmstate; len of array is based on tlv len */
7705 wlc_pm_debug_t pmstate
[1];
7706 } wl_pmalert_pmstate_t
;
7708 typedef struct wl_pmalert_event_dur
{
7709 uint16 type
; /**< WL_PMALERT_EVENT_DUR */
7710 uint16 len
; /**< Up to 4K-1, top 4 bits are reserved */
7712 /* Array of event_dur, len of array is based on tlv len */
7713 uint32 event_dur
[1];
7714 } wl_pmalert_event_dur_t
;
7716 #include <packed_section_start.h>
7717 BWL_PRE_PACKED_STRUCT
struct wl_pmalert_ucode_dbg_v1
{
7718 uint16 type
; /* WL_PMALERT_UCODE_DBG */
7719 uint16 len
; /* Up to 4K-1, top 4 bits are reserved */
7724 uint16 m_p2p_bss_dtim_prd
[MAX_P2P_BSS_DTIM_PRD
];
7725 uint32 psmdebug
[20];
7726 uint32 phydebug
[20];
7727 uint16 M_P2P_BSS
[3][12];
7728 uint16 M_P2P_PRE_TBTT
[3];
7730 /* Following is valid only for corerevs<40 */
7733 /* Following 3 are valid only for 11ac corerevs (>=40) */
7734 uint16 psm_maccommand
;
7736 uint16 AQMFifoReady
;
7737 } BWL_POST_PACKED_STRUCT
;
7738 #include <packed_section_end.h>
7740 #include <packed_section_start.h>
7741 BWL_PRE_PACKED_STRUCT
struct wl_pmalert_ucode_dbg_v2
{
7742 uint16 type
; /**< WL_PMALERT_UCODE_DBG_V2 */
7743 uint16 len
; /**< Up to 4K-1, top 4 bits are reserved */
7748 uint16 m_p2p_bss_dtim_prd
[MAX_P2P_BSS_DTIM_PRD
];
7749 uint32 psmdebug
[20];
7750 uint32 phydebug
[20];
7751 uint16 M_P2P_BSS
[3][12];
7752 uint16 M_P2P_PRE_TBTT
[3];
7754 /* Following is valid only for corerevs<40 */
7757 /* Following 3 are valid only for 11ac corerevs (>=40) */
7758 uint16 psm_maccommand
;
7760 uint32 AQMFifoReady
;
7761 } BWL_POST_PACKED_STRUCT
;
7762 #include <packed_section_end.h>
7764 typedef struct wlc_ps_debug
{
7765 uint32 timestamp
; /**< timestamp in millisecond */
7766 uint32 ps_mask
; /**< reason(s) for disallowing ps */
7769 typedef struct wl_pmalert_ps_allowed_hist
{
7770 uint16 type
; /**< WL_PMALERT_PS_ALLOWED_HIST */
7771 uint16 len
; /**< Up to 4K-1, top 4 bits are reserved */
7772 uint32 ps_allowed_start_idx
;
7773 /* Array of ps_debug, len of array is based on tlv len */
7774 wlc_ps_debug_t ps_debug
[1];
7775 } wl_pmalert_ps_allowed_hist_t
;
7777 /* Structures and constants used for "vndr_ie" IOVar interface */
7778 #define VNDR_IE_CMD_LEN 4 /**< length of the set command string:
7779 * "add", "del" (+ NUL)
7782 #define VNDR_IE_INFO_HDR_LEN (sizeof(uint32))
7784 #include <packed_section_start.h>
7785 typedef BWL_PRE_PACKED_STRUCT
struct {
7786 uint32 pktflag
; /**< bitmask indicating which packet(s) contain this IE */
7787 vndr_ie_t vndr_ie_data
; /**< vendor IE data */
7788 } BWL_POST_PACKED_STRUCT vndr_ie_info_t
;
7789 #include <packed_section_end.h>
7791 #include <packed_section_start.h>
7792 typedef BWL_PRE_PACKED_STRUCT
struct {
7793 int32 iecount
; /**< number of entries in the vndr_ie_list[] array */
7794 vndr_ie_info_t vndr_ie_list
[1]; /**< variable size list of vndr_ie_info_t structs */
7795 } BWL_POST_PACKED_STRUCT vndr_ie_buf_t
;
7796 #include <packed_section_end.h>
7798 #include <packed_section_start.h>
7799 typedef BWL_PRE_PACKED_STRUCT
struct {
7800 char cmd
[VNDR_IE_CMD_LEN
]; /**< vndr_ie IOVar set command : "add", "del" + NUL */
7801 vndr_ie_buf_t vndr_ie_buffer
; /**< buffer containing Vendor IE list information */
7802 } BWL_POST_PACKED_STRUCT vndr_ie_setbuf_t
;
7803 #include <packed_section_end.h>
7805 /** tag_ID/length/value_buffer tuple */
7806 #include <packed_section_start.h>
7807 typedef BWL_PRE_PACKED_STRUCT
struct {
7811 } BWL_POST_PACKED_STRUCT tlv_t
;
7812 #include <packed_section_end.h>
7814 #include <packed_section_start.h>
7815 typedef BWL_PRE_PACKED_STRUCT
struct {
7816 uint32 pktflag
; /**< bitmask indicating which packet(s) contain this IE */
7817 tlv_t ie_data
; /**< IE data */
7818 } BWL_POST_PACKED_STRUCT ie_info_t
;
7819 #include <packed_section_end.h>
7821 #include <packed_section_start.h>
7822 typedef BWL_PRE_PACKED_STRUCT
struct {
7823 int32 iecount
; /**< number of entries in the ie_list[] array */
7824 ie_info_t ie_list
[1]; /**< variable size list of ie_info_t structs */
7825 } BWL_POST_PACKED_STRUCT ie_buf_t
;
7826 #include <packed_section_end.h>
7828 #include <packed_section_start.h>
7829 typedef BWL_PRE_PACKED_STRUCT
struct {
7830 char cmd
[VNDR_IE_CMD_LEN
]; /**< ie IOVar set command : "add" + NUL */
7831 ie_buf_t ie_buffer
; /**< buffer containing IE list information */
7832 } BWL_POST_PACKED_STRUCT ie_setbuf_t
;
7833 #include <packed_section_end.h>
7835 #include <packed_section_start.h>
7836 typedef BWL_PRE_PACKED_STRUCT
struct {
7837 uint32 pktflag
; /**< bitmask indicating which packet(s) contain this IE */
7838 uint8 id
; /**< IE type */
7839 } BWL_POST_PACKED_STRUCT ie_getbuf_t
;
7840 #include <packed_section_end.h>
7842 /* structures used to define format of wps ie data from probe requests */
7843 /* passed up to applications via iovar "prbreq_wpsie" */
7844 typedef struct sta_prbreq_wps_ie_hdr
{
7845 struct ether_addr staAddr
;
7847 } sta_prbreq_wps_ie_hdr_t
;
7849 #include <packed_section_start.h>
7850 typedef BWL_PRE_PACKED_STRUCT
struct sta_prbreq_wps_ie_data
{
7851 sta_prbreq_wps_ie_hdr_t hdr
;
7853 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_data_t
;
7854 #include <packed_section_end.h>
7856 #include <packed_section_start.h>
7857 typedef BWL_PRE_PACKED_STRUCT
struct sta_prbreq_wps_ie_list
{
7859 uint8 ieDataList
[1];
7860 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_list_t
;
7861 #include <packed_section_end.h>
7863 #include <packed_section_start.h>
7864 typedef BWL_PRE_PACKED_STRUCT
struct {
7866 chanspec_t chanspec
; /**< txpwr report for this channel */
7867 chanspec_t local_chanspec
; /**< channel on which we are associated */
7868 uint8 local_max
; /**< local max according to the AP */
7869 uint8 local_constraint
; /**< local constraint according to the AP */
7870 int8 antgain
[2]; /**< Ant gain for each band - from SROM */
7871 uint8 rf_cores
; /**< count of RF Cores being reported */
7872 uint8 est_Pout
[4]; /**< Latest tx power out estimate per RF chain */
7873 uint8 est_Pout_act
[4]; /**< Latest tx power out estimate per RF chain w/o adjustment */
7874 uint8 est_Pout_cck
; /**< Latest CCK tx power out estimate */
7875 uint8 tx_power_max
[4]; /**< Maximum target power among all rates */
7876 uint32 tx_power_max_rate_ind
[4]; /**< Index of the rate with the max target power */
7877 int8 sar
; /**< SAR limit for display by wl executable */
7878 int8 channel_bandwidth
; /**< 20, 40 or 80 MHz bandwidth? */
7879 uint8 version
; /**< Version of the data format wlu <--> driver */
7880 uint8 display_core
; /**< Displayed curpower core */
7881 int8 target_offsets
[4]; /**< Target power offsets for current rate per core */
7882 uint32 last_tx_ratespec
; /**< Ratespec for last transmition */
7883 uint32 user_target
; /**< user limit */
7884 uint32 ppr_len
; /**< length of each ppr serialization buffer */
7885 int8 SARLIMIT
[MAX_STREAMS_SUPPORTED
];
7886 uint8 pprdata
[1]; /**< ppr serialization buffer */
7887 } BWL_POST_PACKED_STRUCT tx_pwr_rpt_t
;
7888 #include <packed_section_end.h>
7890 #include <packed_section_start.h>
7891 typedef BWL_PRE_PACKED_STRUCT
struct {
7892 struct ipv4_addr ipv4_addr
;
7893 struct ether_addr nexthop
;
7894 } BWL_POST_PACKED_STRUCT ibss_route_entry_t
;
7895 #include <packed_section_end.h>
7897 #include <packed_section_start.h>
7898 typedef BWL_PRE_PACKED_STRUCT
struct {
7900 ibss_route_entry_t route_entry
[1];
7901 } BWL_POST_PACKED_STRUCT ibss_route_tbl_t
;
7902 #include <packed_section_end.h>
7904 #define MAX_IBSS_ROUTE_TBL_ENTRY 64
7906 #define TXPWR_TARGET_VERSION 0
7907 #include <packed_section_start.h>
7908 typedef BWL_PRE_PACKED_STRUCT
struct {
7909 int32 version
; /**< version number */
7910 chanspec_t chanspec
; /**< txpwr report for this channel */
7911 int8 txpwr
[WL_STA_ANT_MAX
]; /**< Max tx target power, in qdb */
7912 uint8 rf_cores
; /**< count of RF Cores being reported */
7913 } BWL_POST_PACKED_STRUCT txpwr_target_max_t
;
7914 #include <packed_section_end.h>
7916 #define BSS_PEER_INFO_PARAM_CUR_VER 0
7917 /** Input structure for IOV_BSS_PEER_INFO */
7918 #include <packed_section_start.h>
7919 typedef BWL_PRE_PACKED_STRUCT
struct {
7921 struct ether_addr ea
; /**< peer MAC address */
7922 } BWL_POST_PACKED_STRUCT bss_peer_info_param_t
;
7923 #include <packed_section_end.h>
7925 #define BSS_PEER_INFO_CUR_VER 0
7927 #include <packed_section_start.h>
7928 typedef BWL_PRE_PACKED_STRUCT
struct {
7930 struct ether_addr ea
;
7932 uint32 tx_rate
; /**< current tx rate */
7933 uint32 rx_rate
; /**< current rx rate */
7934 wl_rateset_t rateset
; /**< rateset in use */
7935 uint32 age
; /**< age in seconds */
7936 } BWL_POST_PACKED_STRUCT bss_peer_info_t
;
7937 #include <packed_section_end.h>
7939 #define BSS_PEER_LIST_INFO_CUR_VER 0
7941 #include <packed_section_start.h>
7942 typedef BWL_PRE_PACKED_STRUCT
struct {
7944 uint16 bss_peer_info_len
; /**< length of bss_peer_info_t */
7945 uint32 count
; /**< number of peer info */
7946 bss_peer_info_t peer_info
[1]; /**< peer info */
7947 } BWL_POST_PACKED_STRUCT bss_peer_list_info_t
;
7948 #include <packed_section_end.h>
7950 #define BSS_PEER_LIST_INFO_FIXED_LEN OFFSETOF(bss_peer_list_info_t, peer_info)
7952 #define AIBSS_BCN_FORCE_CONFIG_VER_0 0
7954 /** structure used to configure AIBSS beacon force xmit */
7955 #include <packed_section_start.h>
7956 typedef BWL_PRE_PACKED_STRUCT
struct {
7959 uint32 initial_min_bcn_dur
; /**< dur in ms to check a bcn in bcn_flood period */
7960 uint32 min_bcn_dur
; /**< dur in ms to check a bcn after bcn_flood period */
7961 uint32 bcn_flood_dur
; /**< Initial bcn xmit period in ms */
7962 } BWL_POST_PACKED_STRUCT aibss_bcn_force_config_t
;
7963 #include <packed_section_end.h>
7965 #define AIBSS_TXFAIL_CONFIG_VER_0 0
7966 #define AIBSS_TXFAIL_CONFIG_VER_1 1
7967 #define AIBSS_TXFAIL_CONFIG_CUR_VER AIBSS_TXFAIL_CONFIG_VER_1
7969 /** structure used to configure aibss tx fail event */
7970 #include <packed_section_start.h>
7971 typedef BWL_PRE_PACKED_STRUCT
struct {
7974 uint32 bcn_timeout
; /**< dur in seconds to receive 1 bcn */
7975 uint32 max_tx_retry
; /**< no of consecutive no acks to send txfail event */
7976 uint32 max_atim_failure
; /**< no of consecutive atim failure */
7977 } BWL_POST_PACKED_STRUCT aibss_txfail_config_t
;
7978 #include <packed_section_end.h>
7980 #include <packed_section_start.h>
7981 typedef BWL_PRE_PACKED_STRUCT
struct wl_aibss_if
{
7985 struct ether_addr addr
;
7987 } BWL_POST_PACKED_STRUCT wl_aibss_if_t
;
7988 #include <packed_section_end.h>
7990 #include <packed_section_start.h>
7991 typedef BWL_PRE_PACKED_STRUCT
struct wlc_ipfo_route_entry
{
7992 struct ipv4_addr ip_addr
;
7993 struct ether_addr nexthop
;
7994 } BWL_POST_PACKED_STRUCT wlc_ipfo_route_entry_t
;
7995 #include <packed_section_end.h>
7997 #include <packed_section_start.h>
7998 typedef BWL_PRE_PACKED_STRUCT
struct wlc_ipfo_route_tbl
{
8000 wlc_ipfo_route_entry_t route_entry
[1];
8001 } BWL_POST_PACKED_STRUCT wlc_ipfo_route_tbl_t
;
8002 #include <packed_section_end.h>
8004 /* Version of wlc_btc_stats_t structure.
8005 * Increment whenever a change is made to wlc_btc_stats_t
8007 #define BTCX_STATS_VER_4 4
8008 typedef struct wlc_btc_stats_v4
{
8009 uint16 version
; /* version number of struct */
8010 uint16 valid
; /* Size of this struct */
8011 uint32 stats_update_timestamp
; /* tStamp when data is updated. */
8012 uint32 btc_status
; /* Hybrid/TDM indicator: Bit2:Hybrid, Bit1:TDM,Bit0:CoexEnabled */
8013 uint32 bt_req_type_map
; /* BT Antenna Req types since last stats sample */
8014 uint32 bt_req_cnt
; /* #BT antenna requests since last stats sampl */
8015 uint32 bt_gnt_cnt
; /* #BT antenna grants since last stats sample */
8016 uint32 bt_gnt_dur
; /* usec BT owns antenna since last stats sample */
8017 uint16 bt_abort_cnt
; /* #Times WL was preempted due to BT since WL up */
8018 uint16 bt_rxf1ovfl_cnt
; /* #Time PSNULL retry count exceeded since WL up */
8019 uint16 bt_latency_cnt
; /* #Time ucode high latency detected since WL up */
8020 uint16 bt_succ_pm_protect_cnt
; /* successful PM protection */
8021 uint16 bt_succ_cts_cnt
; /* successful CTS2A protection */
8022 uint16 bt_wlan_tx_preempt_cnt
; /* WLAN TX Preemption */
8023 uint16 bt_wlan_rx_preempt_cnt
; /* WLAN RX Preemption */
8024 uint16 bt_ap_tx_after_pm_cnt
; /* AP TX even after PM protection */
8025 uint16 bt_peraud_cumu_gnt_cnt
; /* Grant cnt for periodic audio */
8026 uint16 bt_peraud_cumu_deny_cnt
; /* Deny cnt for periodic audio */
8027 uint16 bt_a2dp_cumu_gnt_cnt
; /* Grant cnt for A2DP */
8028 uint16 bt_a2dp_cumu_deny_cnt
; /* Deny cnt for A2DP */
8029 uint16 bt_sniff_cumu_gnt_cnt
; /* Grant cnt for Sniff */
8030 uint16 bt_sniff_cumu_deny_cnt
; /* Deny cnt for Sniff */
8031 uint16 bt_dcsn_map
; /* Accumulated decision bitmap once Ant grant */
8032 uint16 bt_dcsn_cnt
; /* Accumulated decision bitmap counters once Ant grant */
8033 uint16 bt_a2dp_hiwat_cnt
; /* Ant grant by a2dp high watermark */
8034 uint16 bt_datadelay_cnt
; /* Ant grant by acl/a2dp datadelay */
8035 uint16 bt_crtpri_cnt
; /* Ant grant by critical BT task */
8036 uint16 bt_pri_cnt
; /* Ant grant by high BT task */
8037 uint16 a2dpbuf1cnt
; /* Ant request with a2dp buffercnt 1 */
8038 uint16 a2dpbuf2cnt
; /* Ant request with a2dp buffercnt 2 */
8039 uint16 a2dpbuf3cnt
; /* Ant request with a2dp buffercnt 3 */
8040 uint16 a2dpbuf4cnt
; /* Ant request with a2dp buffercnt 4 */
8041 uint16 a2dpbuf5cnt
; /* Ant request with a2dp buffercnt 5 */
8042 uint16 a2dpbuf6cnt
; /* Ant request with a2dp buffercnt 6 */
8043 uint16 a2dpbuf7cnt
; /* Ant request with a2dp buffercnt 7 */
8044 uint16 a2dpbuf8cnt
; /* Ant request with a2dp buffercnt 8 */
8045 uint16 antgrant_lt10ms
; /* Ant grant duration cnt 0~10ms */
8046 uint16 antgrant_lt30ms
; /* Ant grant duration cnt 10~30ms */
8047 uint16 antgrant_lt60ms
; /* Ant grant duration cnt 30~60ms */
8048 uint16 antgrant_ge60ms
; /* Ant grant duration cnt 60~ms */
8049 } wlc_btc_stats_v4_t
;
8051 #define BTCX_STATS_VER_3 3
8053 typedef struct wlc_btc_stats_v3
{
8054 uint16 version
; /* version number of struct */
8055 uint16 valid
; /* Size of this struct */
8056 uint32 stats_update_timestamp
; /* tStamp when data is updated. */
8057 uint32 btc_status
; /* Hybrid/TDM indicator: Bit2:Hybrid, Bit1:TDM,Bit0:CoexEnabled */
8058 uint32 bt_req_type_map
; /* BT Antenna Req types since last stats sample */
8059 uint32 bt_req_cnt
; /* #BT antenna requests since last stats sampl */
8060 uint32 bt_gnt_cnt
; /* #BT antenna grants since last stats sample */
8061 uint32 bt_gnt_dur
; /* usec BT owns antenna since last stats sample */
8062 uint16 bt_abort_cnt
; /* #Times WL was preempted due to BT since WL up */
8063 uint16 bt_rxf1ovfl_cnt
; /* #Time PSNULL retry count exceeded since WL up */
8064 uint16 bt_latency_cnt
; /* #Time ucode high latency detected since WL up */
8065 uint16 rsvd
; /* pad to align struct to 32bit bndry */
8066 uint16 bt_succ_pm_protect_cnt
; /* successful PM protection */
8067 uint16 bt_succ_cts_cnt
; /* successful CTS2A protection */
8068 uint16 bt_wlan_tx_preempt_cnt
; /* WLAN TX Preemption */
8069 uint16 bt_wlan_rx_preempt_cnt
; /* WLAN RX Preemption */
8070 uint16 bt_ap_tx_after_pm_cnt
; /* AP TX even after PM protection */
8071 uint16 bt_peraud_cumu_gnt_cnt
; /* Grant cnt for periodic audio */
8072 uint16 bt_peraud_cumu_deny_cnt
; /* Deny cnt for periodic audio */
8073 uint16 bt_a2dp_cumu_gnt_cnt
; /* Grant cnt for A2DP */
8074 uint16 bt_a2dp_cumu_deny_cnt
; /* Deny cnt for A2DP */
8075 uint16 bt_sniff_cumu_gnt_cnt
; /* Grant cnt for Sniff */
8076 uint16 bt_sniff_cumu_deny_cnt
; /* Deny cnt for Sniff */
8077 uint8 pad
; /* Padding */
8078 uint8 slice_index
; /* Slice to report */
8079 } wlc_btc_stats_v3_t
;
8081 #define BTCX_STATS_VER_2 2
8083 typedef struct wlc_btc_stats_v2
{
8084 uint16 version
; /* version number of struct */
8085 uint16 valid
; /* Size of this struct */
8086 uint32 stats_update_timestamp
; /* tStamp when data is updated. */
8087 uint32 btc_status
; /* Hybrid/TDM indicator: Bit2:Hybrid, Bit1:TDM,Bit0:CoexEnabled */
8088 uint32 bt_req_type_map
; /* BT Antenna Req types since last stats sample */
8089 uint32 bt_req_cnt
; /* #BT antenna requests since last stats sampl */
8090 uint32 bt_gnt_cnt
; /* #BT antenna grants since last stats sample */
8091 uint32 bt_gnt_dur
; /* usec BT owns antenna since last stats sample */
8092 uint16 bt_abort_cnt
; /* #Times WL was preempted due to BT since WL up */
8093 uint16 bt_rxf1ovfl_cnt
; /* #Time PSNULL retry count exceeded since WL up */
8094 uint16 bt_latency_cnt
; /* #Time ucode high latency detected since WL up */
8095 uint16 rsvd
; /* pad to align struct to 32bit bndry */
8096 } wlc_btc_stats_v2_t
;
8098 #define WL_IPFO_ROUTE_TBL_FIXED_LEN 4
8099 #define WL_MAX_IPFO_ROUTE_TBL_ENTRY 64
8101 /* Global ASSERT Logging */
8102 #define ASSERTLOG_CUR_VER 0x0100
8103 #define MAX_ASSRTSTR_LEN 64
8105 typedef struct assert_record
{
8108 int8 str
[MAX_ASSRTSTR_LEN
];
8111 typedef struct assertlog_results
{
8115 assert_record_t logs
[1];
8116 } assertlog_results_t
;
8118 #define LOGRRC_FIX_LEN 8
8119 #define IOBUF_ALLOWED_NUM_OF_LOGREC(type, len) ((len - LOGRRC_FIX_LEN)/sizeof(type))
8122 struct wapi_sta_msg_t
8127 uint8 reserve_data1
[2];
8129 uint8 reserve_data2
[2];
8131 uint8 wie
[TLV_BODY_LEN_MAX
+ TLV_HDR_LEN
]; /* 257 */
8132 uint8 pad
[3]; /* padding for alignment */
8134 /* #endif BCMWAPI_WAI */
8135 /* chanim acs record */
8139 chanspec_t selected_chspc
;
8145 } chanim_acs_record_t
;
8148 chanim_acs_record_t acs_record
[CHANIM_ACS_RECORD
];
8153 #define WL_CHANIM_STATS_V2 2
8154 #define CCASTATS_V2_MAX 9
8155 typedef struct chanim_stats_v2
{
8156 uint32 glitchcnt
; /**< normalized as per second count */
8157 uint32 badplcp
; /**< normalized as per second count */
8158 uint8 ccastats
[CCASTATS_V2_MAX
]; /**< normalized as 0-255 */
8159 int8 bgnoise
; /**< background noise level (in dBm) */
8160 chanspec_t chanspec
; /**< ctrl chanspec of the interface */
8161 uint32 timestamp
; /**< time stamp at which the stats are collected */
8162 uint32 bphy_glitchcnt
; /**< normalized as per second count */
8163 uint32 bphy_badplcp
; /**< normalized as per second count */
8164 uint8 chan_idle
; /**< normalized as 0~255 */
8166 } chanim_stats_v2_t
;
8168 typedef struct chanim_stats
{
8169 uint32 glitchcnt
; /**< normalized as per second count */
8170 uint32 badplcp
; /**< normalized as per second count */
8171 uint8 ccastats
[CCASTATS_MAX
]; /**< normalized as 0-255 */
8172 int8 bgnoise
; /**< background noise level (in dBm) */
8173 uint8 pad_1
[11 - CCASTATS_MAX
];
8174 chanspec_t chanspec
; /**< ctrl chanspec of the interface */
8176 uint32 timestamp
; /**< time stamp at which the stats are collected */
8177 uint32 bphy_glitchcnt
; /**< normalized as per second count */
8178 uint32 bphy_badplcp
; /**< normalized as per second count */
8179 uint8 chan_idle
; /**< normalized as 0~255 */
8183 #define WL_CHANIM_STATS_VERSION 3
8188 chanim_stats_t stats
[1];
8189 } wl_chanim_stats_t
;
8191 #define WL_CHANIM_STATS_FIXED_LEN OFFSETOF(wl_chanim_stats_t, stats)
8193 /** Noise measurement metrics. */
8194 #define NOISE_MEASURE_KNOISE 0x1
8196 /** scb probe parameter */
8199 uint32 scb_activity_time
;
8200 uint32 scb_max_probe
;
8203 /* structure/defines for selective mgmt frame (smf) stats support */
8205 #define SMFS_VERSION 1
8206 /** selected mgmt frame (smf) stats element */
8207 typedef struct wl_smfs_elem
{
8209 uint16 code
; /**< SC or RC code */
8213 typedef struct wl_smf_stats
{
8215 uint16 length
; /**< reserved for future usage */
8219 uint32 malformed_cnt
;
8220 uint32 count_total
; /**< count included the interested group */
8221 wl_smfs_elem_t elem
[1];
8224 #define WL_SMFSTATS_FIXED_LEN OFFSETOF(wl_smf_stats_t, elem);
8231 typedef enum smfs_type
{
8235 SMFS_TYPE_DISASSOC_TX
,
8236 SMFS_TYPE_DISASSOC_RX
,
8237 SMFS_TYPE_DEAUTH_TX
,
8238 SMFS_TYPE_DEAUTH_RX
,
8244 #define PHYMON_VERSION 1
8246 typedef struct wl_phycal_core_state
{
8247 /* Tx IQ/LO calibration coeffs */
8259 /** Rx IQ calibration coeffs */
8263 uint8 tx_iqlocal_pwridx
; /**< Tx Power Index for Tx IQ/LO calibration */
8265 uint32 papd_epsilon_table
[64]; /**< PAPD epsilon table */
8266 int16 papd_epsilon_offset
; /**< PAPD epsilon offset */
8267 uint8 curr_tx_pwrindex
; /**< Tx power index */
8268 int8 idle_tssi
; /**< Idle TSSI */
8269 int8 est_tx_pwr
; /**< Estimated Tx Power (dB) */
8270 int8 est_rx_pwr
; /**< Estimated Rx Power (dB) from RSSI */
8271 uint16 rx_gaininfo
; /**< Rx gain applied on last Rx pkt */
8272 uint16 init_gaincode
; /**< initgain required for ACI */
8275 } wl_phycal_core_state_t
;
8277 typedef struct wl_phycal_state
{
8279 int8 num_phy_cores
; /**< number of cores */
8280 int8 curr_temperature
; /**< on-chip temperature sensor reading */
8281 chanspec_t chspec
; /**< channspec for this state */
8282 uint8 aci_state
; /**< ACI state: ON/OFF */
8284 uint16 crsminpower
; /**< crsminpower required for ACI */
8285 uint16 crsminpowerl
; /**< crsminpowerl required for ACI */
8286 uint16 crsminpoweru
; /**< crsminpoweru required for ACI */
8287 wl_phycal_core_state_t phycal_core
[1];
8288 } wl_phycal_state_t
;
8290 #define WL_PHYCAL_STAT_FIXED_LEN OFFSETOF(wl_phycal_state_t, phycal_core)
8293 /** discovery state */
8294 typedef struct wl_p2p_disc_st
{
8295 uint8 state
; /**< see state */
8297 chanspec_t chspec
; /**< valid in listen state */
8298 uint16 dwell
; /**< valid in listen state, in ms */
8302 typedef struct wl_p2p_scan
{
8303 uint8 type
; /**< 'S' for WLC_SCAN, 'E' for "escan" */
8305 /* scan or escan parms... */
8309 typedef struct wl_p2p_if
{
8310 struct ether_addr addr
;
8311 uint8 type
; /**< see i/f type */
8313 chanspec_t chspec
; /**< for p2p_ifadd GO */
8317 typedef struct wl_p2p_ifq
{
8319 char ifname
[BCM_MSG_IFNAME_MAX
];
8322 /** OppPS & CTWindow */
8323 typedef struct wl_p2p_ops
{
8324 uint8 ops
; /**< 0: disable 1: enable */
8325 uint8 ctw
; /**< >= 10 */
8328 /** absence and presence request */
8329 typedef struct wl_p2p_sched_desc
{
8333 uint32 count
; /**< see count */
8334 } wl_p2p_sched_desc_t
;
8336 typedef struct wl_p2p_sched
{
8337 uint8 type
; /**< see schedule type */
8338 uint8 action
; /**< see schedule action */
8339 uint8 option
; /**< see schedule option */
8341 wl_p2p_sched_desc_t desc
[1];
8344 typedef struct wl_p2p_wfds_hash
{
8346 uint16 nw_cfg_method
;
8349 uint8 service_name
[MAX_WFDS_SVC_NAME_LEN
];
8351 } wl_p2p_wfds_hash_t
;
8353 typedef struct wl_p2p_config_params
{
8354 uint16 enable
; /**< 0: disable 1: enable */
8355 uint16 chanspec
; /* GO chanspec */
8356 wlc_ssid_t ssid
; /* SSID */
8357 } wl_p2p_config_params_t
;
8359 typedef struct wl_bcmdcs_data
{
8366 * Format of IHV data passed to OID_DOT11_NIC_SPECIFIC_EXTENSION.
8368 typedef struct _IHV_NIC_SPECIFIC_EXTENSION
{
8369 uint8 oui
[4]; /**< vendor specific OUI value */
8370 uint32 event
; /**< event code */
8371 uint8 ihvData
[1]; /**< ihv data */
8372 } IHV_NIC_SPECIFIC_EXTENSION
, *PIHV_NIC_SPECIFIC_EXTENSION
;
8373 #define IHV_NIC_SPECIFIC_EXTENTION_HEADER OFFSETOF(IHV_NIC_SPECIFIC_EXTENSION, ihvData[0])
8375 /** NAT configuration */
8377 uint32 ipaddr
; /**< interface ip address */
8378 uint32 ipaddr_mask
; /**< interface ip address mask */
8379 uint32 ipaddr_gateway
; /**< gateway ip address */
8380 uint8 mac_gateway
[6]; /**< gateway mac address */
8382 uint32 ipaddr_dns
; /**< DNS server ip address, valid only for public if */
8383 uint8 mac_dns
[6]; /**< DNS server mac address, valid only for public if */
8384 uint8 GUID
[38]; /**< interface GUID */
8388 uint32 op
; /**< operation code */
8389 uint8 pub_if
; /**< set for public if, clear for private if */
8391 nat_if_info_t if_info
; /**< interface info */
8395 int32 state
; /**< NAT state returned */
8398 typedef struct flush_txfifo
{
8400 uint32 hwtxfifoflush
;
8401 struct ether_addr ea
;
8406 SPATIAL_MODE_2G_IDX
= 0,
8407 SPATIAL_MODE_5G_LOW_IDX
,
8408 SPATIAL_MODE_5G_MID_IDX
,
8409 SPATIAL_MODE_5G_HIGH_IDX
,
8410 SPATIAL_MODE_5G_UPPER_IDX
,
8411 SPATIAL_MODE_MAX_IDX
8414 #define WLC_TXCORE_MAX 4 /**< max number of txcore supports */
8415 #define WLC_TXCORE_MAX_OLD 2 /**< backward compatibilty for TXCAL */
8416 #define WLC_SUBBAND_MAX 4 /**< max number of sub-band supports */
8418 uint8 band2g
[WLC_TXCORE_MAX
];
8419 uint8 band5g
[WLC_SUBBAND_MAX
][WLC_TXCORE_MAX
];
8422 #define MAX_NUM_TXCAL_MEAS 128
8423 #define MAX_NUM_PWR_STEP 40
8424 #define TXCAL_IOVAR_VERSION 0x1
8426 #define TXCAL_GAINSWEEP_VER (TXCAL_GAINSWEEP_VERSION_V2)
8427 #define TXCAL_GAINSWEEP_VERSION_V2 2
8429 /* Below macro defines the latest txcal iovar version updated */
8430 /* This macro also reflects in the 'txcal_ver' iovar */
8431 #define TXCAL_IOVAR_LATEST TXCAL_GAINSWEEP_VER
8433 /* below are used for bphy/ofdm separated LSC */
8434 #define TXCAL_PWR_BPHY 0
8435 #define TXCAL_PWR_OFDM 1
8437 typedef struct wl_txcal_meas_percore
{
8438 uint16 tssi
[MAX_NUM_TXCAL_MEAS
];
8439 int16 pwr
[MAX_NUM_TXCAL_MEAS
];
8440 } wl_txcal_meas_percore_t
;
8442 typedef struct wl_txcal_meas_ncore
{
8446 wl_txcal_meas_percore_t txcal_percore
[1];
8447 } wl_txcal_meas_ncore_t
;
8449 typedef struct wl_txcal_power_tssi_percore
{
8452 uint8 pwr_start_idx
;
8455 uint8 tssi
[MAX_NUM_PWR_STEP
];
8456 } wl_txcal_power_tssi_percore_t
;
8458 typedef struct wl_txcal_power_tssi_ncore
{
8466 wl_txcal_power_tssi_percore_t tssi_percore
[4];
8467 } wl_txcal_power_tssi_ncore_t
;
8469 typedef struct wl_txcal_meas
{
8470 uint16 tssi
[WLC_TXCORE_MAX
][MAX_NUM_TXCAL_MEAS
];
8471 int16 pwr
[WLC_TXCORE_MAX
][MAX_NUM_TXCAL_MEAS
];
8476 typedef struct wl_txcal_meas_old
{
8477 uint16 tssi
[WLC_TXCORE_MAX_OLD
][MAX_NUM_TXCAL_MEAS
];
8478 int16 pwr
[WLC_TXCORE_MAX_OLD
][MAX_NUM_TXCAL_MEAS
];
8481 } wl_txcal_meas_old_t
;
8483 typedef struct wl_txcal_power_tssi
{
8486 int16 tempsense
[WLC_TXCORE_MAX
];
8487 int16 pwr_start
[WLC_TXCORE_MAX
];
8488 uint8 pwr_start_idx
[WLC_TXCORE_MAX
];
8489 uint8 num_entries
[WLC_TXCORE_MAX
];
8490 uint8 tssi
[WLC_TXCORE_MAX
][MAX_NUM_PWR_STEP
];
8493 } wl_txcal_power_tssi_t
;
8495 typedef struct wl_txcal_power_tssi_old
{
8498 int16 tempsense
[WLC_TXCORE_MAX_OLD
];
8499 int16 pwr_start
[WLC_TXCORE_MAX_OLD
];
8500 uint8 pwr_start_idx
[WLC_TXCORE_MAX_OLD
];
8501 uint8 num_entries
[WLC_TXCORE_MAX_OLD
];
8502 uint8 tssi
[WLC_TXCORE_MAX_OLD
][MAX_NUM_PWR_STEP
];
8505 } wl_txcal_power_tssi_old_t
;
8507 typedef struct wl_olpc_pwr
{
8516 typedef struct wl_rfem_temp_vdet_temp
{
8521 } wl_rfem_temp_vdet_temp_t
;
8523 typedef struct wl_rfem_temp_vin_tssi
{
8528 } wl_rfem_temp_vin_tssi_t
;
8530 typedef struct wl_txcal_tempsense
{
8534 int16 ref_temperature
;
8535 int16 meas_temperature
;
8536 wl_rfem_temp_vdet_temp_t vdet_temp
;
8537 wl_rfem_temp_vin_tssi_t vin_tssi
;
8538 } wl_txcal_tempsense_t
;
8540 /** IOVAR "mempool" parameter. Used to retrieve a list of memory pool statistics. */
8541 typedef struct wl_mempool_stats
{
8542 int32 num
; /**< Number of memory pools */
8543 bcm_mp_stats_t s
[1]; /**< Variable array of memory pool stats. */
8544 } wl_mempool_stats_t
;
8548 uint32 ipaddr_netmask
;
8549 uint32 ipaddr_gateway
;
8552 /* Both powersel_params and lpc_params are used by IOVAR lpc_params.
8553 * The powersel_params is replaced by lpc_params in later WLC versions.
8555 typedef struct powersel_params
{
8556 /* LPC Params exposed via IOVAR */
8557 int32 tp_ratio_thresh
; /**< Throughput ratio threshold */
8558 uint8 rate_stab_thresh
; /**< Thresh for rate stability based on nupd */
8559 uint8 pwr_stab_thresh
; /**< Number of successes before power step down */
8560 uint8 pwr_sel_exp_time
; /**< Time lapse for expiry of database */
8562 } powersel_params_t
;
8564 #define WL_LPC_PARAMS_VER_2 2
8565 #define WL_LPC_PARAMS_CURRENT_VERSION WL_LPC_PARAMS_VER_2
8567 typedef struct lpc_params
{
8570 /* LPC Params exposed via IOVAR */
8571 uint8 rate_stab_thresh
; /**< Thresh for rate stability based on nupd */
8572 uint8 pwr_stab_thresh
; /**< Number of successes before power step down */
8573 uint8 lpc_exp_time
; /**< Time lapse for expiry of database */
8574 uint8 pwrup_slow_step
; /**< Step size for slow step up */
8575 uint8 pwrup_fast_step
; /**< Step size for fast step up */
8576 uint8 pwrdn_slow_step
; /**< Step size for slow step down */
8579 /* tx pkt delay statistics */
8580 #define SCB_RETRY_SHORT_DEF 7 /**< Default Short retry Limit */
8581 #define WLPKTDLY_HIST_NBINS 16 /**< number of bins used in the Delay histogram */
8583 /** structure to store per-AC delay statistics */
8584 typedef struct scb_delay_stats
{
8585 uint32 txmpdu_lost
; /**< number of MPDUs lost */
8586 uint32 txmpdu_cnt
[SCB_RETRY_SHORT_DEF
]; /**< retry times histogram */
8587 uint32 delay_sum
[SCB_RETRY_SHORT_DEF
]; /**< cumulative packet latency */
8588 uint32 delay_min
; /**< minimum packet latency observed */
8589 uint32 delay_max
; /**< maximum packet latency observed */
8590 uint32 delay_avg
; /**< packet latency average */
8591 uint32 delay_hist
[WLPKTDLY_HIST_NBINS
]; /**< delay histogram */
8592 uint32 delay_count
; /**< minimum number of time period units before
8593 consequent packet delay events can be generated
8595 uint32 prev_txmpdu_cnt
; /**< Previous value of txmpdu_cnt[] during last iteration */
8596 uint32 prev_delay_sum
; /**< Previous value of delay_sum[] during last iteration */
8597 } scb_delay_stats_t
;
8599 /** structure for txdelay event */
8600 typedef struct txdelay_event
{
8604 chanim_stats_t chanim_stats
;
8605 scb_delay_stats_t delay_stats
[AC_COUNT
];
8608 /** structure for txdelay parameters */
8609 typedef struct txdelay_params
{
8610 uint16 ratio
; /**< Avg Txdelay Delta */
8611 uint8 cnt
; /**< Sample cnt */
8612 uint8 period
; /**< Sample period */
8613 uint8 tune
; /**< Debug */
8616 #define MAX_TXDELAY_STATS_SCBS 6
8617 #define TXDELAY_STATS_VERSION 1
8620 TXDELAY_STATS_PARTIAL_RESULT
= 0,
8621 TXDELAY_STATS_FULL_RESULT
= 1
8624 typedef struct scb_total_delay_stats
{
8625 struct ether_addr ea
;
8627 scb_delay_stats_t dlystats
[AC_COUNT
];
8628 } scb_total_delay_stats_t
;
8630 typedef struct txdelay_stats
{
8632 uint32 full_result
; /* 0:Partial, 1:full */
8633 uint32 scb_cnt
; /* in:requested, out:returned */
8634 scb_total_delay_stats_t scb_delay_stats
[1];
8637 #define WL_TXDELAY_STATS_FIXED_SIZE \
8638 (sizeof(txdelay_stats_t)+(MAX_TXDELAY_STATS_SCBS-1)*sizeof(scb_total_delay_stats_t))
8640 WNM_SERVICE_DMS
= 1,
8641 WNM_SERVICE_FMS
= 2,
8645 /** Definitions for WNM/NPS TCLAS */
8646 typedef struct wl_tclas
{
8647 uint8 user_priority
;
8649 dot11_tclas_fc_t fc
;
8652 #define WL_TCLAS_FIXED_SIZE OFFSETOF(wl_tclas_t, fc)
8654 typedef struct wl_tclas_list
{
8659 /** Definitions for WNM/NPS Traffic Filter Service */
8660 typedef struct wl_tfs_req
{
8663 uint8 tfs_subelem_id
;
8667 typedef struct wl_tfs_filter
{
8668 uint8 status
; /**< Status returned by the AP */
8669 uint8 tclas_proc
; /**< TCLAS processing value (0:and, 1:or) */
8670 uint8 tclas_cnt
; /**< count of all wl_tclas_t in tclas array */
8671 uint8 tclas
[1]; /**< VLA of wl_tclas_t */
8673 #define WL_TFS_FILTER_FIXED_SIZE OFFSETOF(wl_tfs_filter_t, tclas)
8675 typedef struct wl_tfs_fset
{
8676 struct ether_addr ea
; /**< Address of AP/STA involved with this filter set */
8677 uint8 tfs_id
; /**< TFS ID field chosen by STA host */
8678 uint8 status
; /**< Internal status TFS_STATUS_xxx */
8679 uint8 actcode
; /**< Action code DOT11_TFS_ACTCODE_xxx */
8680 uint8 token
; /**< Token used in last request frame */
8681 uint8 notify
; /**< Notify frame sent/received because of this set */
8682 uint8 filter_cnt
; /**< count of all wl_tfs_filter_t in filter array */
8683 uint8 filter
[1]; /**< VLA of wl_tfs_filter_t */
8685 #define WL_TFS_FSET_FIXED_SIZE OFFSETOF(wl_tfs_fset_t, filter)
8688 TFS_STATUS_DISABLED
= 0, /**< TFS filter set disabled by user */
8689 TFS_STATUS_DISABLING
= 1, /**< Empty request just sent to AP */
8690 TFS_STATUS_VALIDATED
= 2, /**< Filter set validated by AP (but maybe not enabled!) */
8691 TFS_STATUS_VALIDATING
= 3, /**< Filter set just sent to AP */
8692 TFS_STATUS_NOT_ASSOC
= 4, /**< STA not associated */
8693 TFS_STATUS_NOT_SUPPORT
= 5, /**< TFS not supported by AP */
8694 TFS_STATUS_DENIED
= 6, /**< Filter set refused by AP (=> all sets are disabled!) */
8697 typedef struct wl_tfs_status
{
8698 uint8 fset_cnt
; /**< count of all wl_tfs_fset_t in fset array */
8699 wl_tfs_fset_t fset
[1]; /**< VLA of wl_tfs_fset_t */
8702 typedef struct wl_tfs_set
{
8703 uint8 send
; /**< Immediatly register registered sets on AP side */
8704 uint8 tfs_id
; /**< ID of a specific set (existing or new), or nul for all */
8705 uint8 actcode
; /**< Action code for this filter set */
8706 uint8 tclas_proc
; /**< TCLAS processing operator for this filter set */
8709 typedef struct wl_tfs_term
{
8710 uint8 del
; /**< Delete internal set once confirmation received */
8711 uint8 tfs_id
; /**< ID of a specific set (existing), or nul for all */
8714 #define DMS_DEP_PROXY_ARP (1 << 0)
8716 /* Definitions for WNM/NPS Directed Multicast Service */
8718 DMS_STATUS_DISABLED
= 0, /**< DMS desc disabled by user */
8719 DMS_STATUS_ACCEPTED
= 1, /**< Request accepted by AP */
8720 DMS_STATUS_NOT_ASSOC
= 2, /**< STA not associated */
8721 DMS_STATUS_NOT_SUPPORT
= 3, /**< DMS not supported by AP */
8722 DMS_STATUS_DENIED
= 4, /**< Request denied by AP */
8723 DMS_STATUS_TERM
= 5, /**< Request terminated by AP */
8724 DMS_STATUS_REMOVING
= 6, /**< Remove request just sent */
8725 DMS_STATUS_ADDING
= 7, /**< Add request just sent */
8726 DMS_STATUS_ERROR
= 8, /**< Non compliant AP behvior */
8727 DMS_STATUS_IN_PROGRESS
= 9, /**< Request just sent */
8728 DMS_STATUS_REQ_MISMATCH
= 10 /**< Conditions for sending DMS req not met */
8731 typedef struct wl_dms_desc
{
8737 uint8 mac_len
; /**< length of all ether_addr in data array, 0 if STA */
8738 uint8 tclas_len
; /**< length of all wl_tclas_t in data array */
8739 uint8 data
[1]; /**< VLA of 'ether_addr' and 'wl_tclas_t' (in this order ) */
8742 #define WL_DMS_DESC_FIXED_SIZE OFFSETOF(wl_dms_desc_t, data)
8744 typedef struct wl_dms_status
{
8746 wl_dms_desc_t desc
[1];
8749 typedef struct wl_dms_set
{
8755 typedef struct wl_dms_term
{
8760 typedef struct wl_service_term
{
8765 } wl_service_term_t
;
8767 /** Definitions for WNM/NPS BSS Transistion */
8768 #define WL_BSSTRANS_QUERY_VERSION_1 1
8769 typedef struct wl_bsstrans_query
{
8770 uint16 version
; /* structure version */
8771 uint16 pad0
; /* padding for 4-byte allignment */
8772 wlc_ssid_t ssid
; /* SSID of NBR elem to be queried for */
8773 uint8 reason
; /* Reason code of the BTQ */
8774 uint8 pad1
[3]; /* padding for 4-byte allignment */
8775 } wl_bsstrans_query_t
;
8777 #define BTM_QUERY_NBR_COUNT_MAX 16
8779 #define WL_BTQ_NBR_LIST_VERSION_1 1
8780 typedef struct wl_btq_nbr_list
{
8781 uint16 version
; /* structure version */
8782 uint8 count
; /* No. of BTQ NBRs returned */
8783 uint8 pad
; /* padding for 4-byte allignment */
8784 nbr_rpt_elem_t btq_nbt_elem
[]; /* BTQ NBR elem in a BTQ NBR list */
8785 } wl_btq_nbr_list_t
;
8787 typedef struct wl_bsstrans_req
{
8788 uint16 tbtt
; /**< time of BSS to end of life, in unit of TBTT */
8789 uint16 dur
; /**< time of BSS to keep off, in unit of minute */
8790 uint8 reqmode
; /**< request mode of BSS transition request */
8791 uint8 unicast
; /**< request by unicast or by broadcast */
8792 } wl_bsstrans_req_t
;
8795 BSSTRANS_RESP_AUTO
= 0, /**< Currently equivalent to ENABLE */
8796 BSSTRANS_RESP_DISABLE
= 1, /**< Never answer BSS Trans Req frames */
8797 BSSTRANS_RESP_ENABLE
= 2, /**< Always answer Req frames with preset data */
8798 BSSTRANS_RESP_WAIT
= 3, /**< Send ind, wait and/or send preset data (NOT IMPL) */
8799 BSSTRANS_RESP_IMMEDIATE
= 4 /**< After an ind, set data and send resp (NOT IMPL) */
8802 typedef struct wl_bsstrans_resp
{
8806 struct ether_addr target
;
8807 } wl_bsstrans_resp_t
;
8809 /* "wnm_bsstrans_policy" argument programs behavior after BSSTRANS Req reception.
8810 * BSS-Transition feature is used by multiple programs such as NPS-PF, VE-PF,
8811 * Band-steering, Hotspot 2.0 and customer requirements. Each PF and its test plan
8812 * mandates different behavior on receiving BSS-transition request. To accomodate
8813 * such divergent behaviors these policies have been created.
8816 WL_BSSTRANS_POLICY_ROAM_ALWAYS
= 0, /**< Roam (or disassociate) in all cases */
8817 WL_BSSTRANS_POLICY_ROAM_IF_MODE
= 1, /**< Roam only if requested by Request Mode field */
8818 WL_BSSTRANS_POLICY_ROAM_IF_PREF
= 2, /**< Roam only if Preferred BSS provided */
8819 WL_BSSTRANS_POLICY_WAIT
= 3, /**< Wait for deauth and send Accepted status */
8820 WL_BSSTRANS_POLICY_PRODUCT
= 4, /**< Policy for real product use cases (Olympic) */
8821 WL_BSSTRANS_POLICY_PRODUCT_WBTEXT
= 5, /**< Policy for real product use cases (SS) */
8822 WL_BSSTRANS_POLICY_MBO
= 6, /**< Policy for MBO certification */
8823 WL_BSSTRANS_POLICY_MAX
= 7
8824 } wnm_bsstrans_policy_type_t
;
8826 /** Definitions for WNM/NPS TIM Broadcast */
8827 typedef struct wl_timbc_offset
{
8828 int16 offset
; /**< offset in us */
8829 uint16 fix_intv
; /**< override interval sent from STA */
8830 uint16 rate_override
; /**< use rate override to send high rate TIM broadcast frame */
8831 uint8 tsf_present
; /**< show timestamp in TIM broadcast frame */
8833 } wl_timbc_offset_t
;
8835 typedef struct wl_timbc_set
{
8836 uint8 interval
; /**< Interval in DTIM wished or required. */
8837 uint8 flags
; /**< Bitfield described below */
8838 uint16 rate_min
; /**< Minimum rate required for High/Low TIM frames. Optionnal */
8839 uint16 rate_max
; /**< Maximum rate required for High/Low TIM frames. Optionnal */
8843 WL_TIMBC_SET_TSF_REQUIRED
= 1, /**< Enable TIMBC only if TSF in TIM frames */
8844 WL_TIMBC_SET_NO_OVERRIDE
= 2, /**< ... if AP does not override interval */
8845 WL_TIMBC_SET_PROXY_ARP
= 4, /**< ... if AP support Proxy ARP */
8846 WL_TIMBC_SET_DMS_ACCEPTED
= 8 /**< ... if all DMS desc have been accepted */
8849 typedef struct wl_timbc_status
{
8850 uint8 status_sta
; /**< Status from internal state machine (check below) */
8851 uint8 status_ap
; /**< From AP response frame (check 8.4.2.86 from 802.11) */
8857 } wl_timbc_status_t
;
8860 WL_TIMBC_STATUS_DISABLE
= 0, /**< TIMBC disabled by user */
8861 WL_TIMBC_STATUS_REQ_MISMATCH
= 1, /**< AP settings do no match user requirements */
8862 WL_TIMBC_STATUS_NOT_ASSOC
= 2, /**< STA not associated */
8863 WL_TIMBC_STATUS_NOT_SUPPORT
= 3, /**< TIMBC not supported by AP */
8864 WL_TIMBC_STATUS_DENIED
= 4, /**< Req to disable TIMBC sent to AP */
8865 WL_TIMBC_STATUS_ENABLE
= 5 /**< TIMBC enabled */
8868 /** Definitions for PM2 Dynamic Fast Return To Sleep */
8869 typedef struct wl_pm2_sleep_ret_ext
{
8870 uint8 logic
; /**< DFRTS logic: see WL_DFRTS_LOGIC_* below */
8872 uint16 low_ms
; /**< Low FRTS timeout */
8873 uint16 high_ms
; /**< High FRTS timeout */
8874 uint16 rx_pkts_threshold
; /**< switching threshold: # rx pkts */
8875 uint16 tx_pkts_threshold
; /**< switching threshold: # tx pkts */
8876 uint16 txrx_pkts_threshold
; /**< switching threshold: # (tx+rx) pkts */
8877 uint32 rx_bytes_threshold
; /**< switching threshold: # rx bytes */
8878 uint32 tx_bytes_threshold
; /**< switching threshold: # tx bytes */
8879 uint32 txrx_bytes_threshold
; /**< switching threshold: # (tx+rx) bytes */
8880 } wl_pm2_sleep_ret_ext_t
;
8882 #define WL_DFRTS_LOGIC_OFF 0 /**< Feature is disabled */
8883 #define WL_DFRTS_LOGIC_OR 1 /**< OR all non-zero threshold conditions */
8884 #define WL_DFRTS_LOGIC_AND 2 /**< AND all non-zero threshold conditions */
8886 /* Values for the passive_on_restricted_mode iovar. When set to non-zero, this iovar
8887 * disables automatic conversions of a channel from passively scanned to
8888 * actively scanned. These values only have an effect for country codes such
8889 * as XZ where some 5 GHz channels are defined to be passively scanned.
8891 #define WL_PASSACTCONV_DISABLE_NONE 0 /**< Enable permanent and temporary conversions */
8892 #define WL_PASSACTCONV_DISABLE_ALL 1 /**< Disable permanent and temporary conversions */
8893 #define WL_PASSACTCONV_DISABLE_PERM 2 /**< Disable only permanent conversions */
8895 /* Definitions for Reliable Multicast */
8896 #define WL_RMC_CNT_VERSION 1
8897 #define WL_RMC_TR_VERSION 1
8898 #define WL_RMC_MAX_CLIENT 32
8899 #define WL_RMC_FLAG_INBLACKLIST 1
8900 #define WL_RMC_FLAG_ACTIVEACKER 2
8901 #define WL_RMC_FLAG_RELMCAST 4
8902 #define WL_RMC_MAX_TABLE_ENTRY 4
8904 #define WL_RMC_VER 1
8905 #define WL_RMC_INDEX_ACK_ALL 255
8906 #define WL_RMC_NUM_OF_MC_STREAMS 4
8907 #define WL_RMC_MAX_TRS_PER_GROUP 1
8908 #define WL_RMC_MAX_TRS_IN_ACKALL 1
8909 #define WL_RMC_ACK_MCAST0 0x02
8910 #define WL_RMC_ACK_MCAST_ALL 0x01
8911 #define WL_RMC_ACTF_TIME_MIN 300 /**< time in ms */
8912 #define WL_RMC_ACTF_TIME_MAX 20000 /**< time in ms */
8913 #define WL_RMC_MAX_NUM_TRS 32 /**< maximun transmitters allowed */
8914 #define WL_RMC_ARTMO_MIN 350 /**< time in ms */
8915 #define WL_RMC_ARTMO_MAX 40000 /**< time in ms */
8917 /* RMC events in action frames */
8919 RELMCAST_ENTRY_OP_DISABLE
= 0, /**< Disable multi-cast group */
8920 RELMCAST_ENTRY_OP_DELETE
= 1, /**< Delete multi-cast group */
8921 RELMCAST_ENTRY_OP_ENABLE
= 2, /**< Enable multi-cast group */
8922 RELMCAST_ENTRY_OP_ACK_ALL
= 3 /**< Enable ACK ALL bit in AMT */
8925 /* RMC operational modes */
8927 WL_RMC_MODE_RECEIVER
= 0, /**< Receiver mode by default */
8928 WL_RMC_MODE_TRANSMITTER
= 1, /**< Transmitter mode using wl ackreq */
8929 WL_RMC_MODE_INITIATOR
= 2 /**< Initiator mode using wl ackreq */
8932 /** Each RMC mcast client info */
8933 typedef struct wl_relmcast_client
{
8934 uint8 flag
; /**< status of client such as AR, R, or blacklisted */
8936 int16 rssi
; /**< rssi value of RMC client */
8937 struct ether_addr addr
; /**< mac address of RMC client */
8938 } wl_relmcast_client_t
;
8941 typedef struct wl_rmc_cnts
{
8942 uint16 version
; /**< see definition of WL_CNT_T_VERSION */
8943 uint16 length
; /**< length of entire structure */
8944 uint16 dupcnt
; /**< counter for duplicate rmc MPDU */
8945 uint16 ackreq_err
; /**< counter for wl ackreq error */
8946 uint16 af_tx_err
; /**< error count for action frame transmit */
8947 uint16 null_tx_err
; /**< error count for rmc null frame transmit */
8948 uint16 af_unicast_tx_err
; /**< error count for rmc unicast frame transmit */
8949 uint16 mc_no_amt_slot
; /**< No mcast AMT entry available */
8950 /* Unused. Keep for rom compatibility */
8951 uint16 mc_no_glb_slot
; /**< No mcast entry available in global table */
8952 uint16 mc_not_mirrored
; /**< mcast group is not mirrored */
8953 uint16 mc_existing_tr
; /**< mcast group is already taken by transmitter */
8954 uint16 mc_exist_in_amt
; /**< mcast group is already programmed in amt */
8955 /* Unused. Keep for rom compatibility */
8956 uint16 mc_not_exist_in_gbl
; /**< mcast group is not in global table */
8957 uint16 mc_not_exist_in_amt
; /**< mcast group is not in AMT table */
8958 uint16 mc_utilized
; /**< mcast addressed is already taken */
8959 uint16 mc_taken_other_tr
; /**< multi-cast addressed is already taken */
8960 uint32 rmc_rx_frames_mac
; /**< no of mc frames received from mac */
8961 uint32 rmc_tx_frames_mac
; /**< no of mc frames transmitted to mac */
8962 uint32 mc_null_ar_cnt
; /**< no. of times NULL AR is received */
8963 uint32 mc_ar_role_selected
; /**< no. of times took AR role */
8964 uint32 mc_ar_role_deleted
; /**< no. of times AR role cancelled */
8965 uint32 mc_noacktimer_expired
; /**< no. of times noack timer expired */
8966 uint16 mc_no_wl_clk
; /**< no wl clk detected when trying to access amt */
8967 uint16 mc_tr_cnt_exceeded
; /**< No of transmitters in the network exceeded */
8971 typedef struct wl_relmcast_st
{
8972 uint8 ver
; /**< version of RMC */
8973 uint8 num
; /**< number of clients detected by transmitter */
8974 wl_relmcast_client_t clients
[WL_RMC_MAX_CLIENT
];
8975 uint16 err
; /**< error status (used in infra) */
8976 uint16 actf_time
; /**< action frame time period */
8977 } wl_relmcast_status_t
;
8979 /** Entry for each STA/node */
8980 typedef struct wl_rmc_entry
{
8981 /* operation on multi-cast entry such add,
8985 struct ether_addr addr
; /**< multi-cast group mac address */
8989 typedef struct wl_rmc_entry_table
{
8990 uint8 index
; /**< index to a particular mac entry in table */
8991 uint8 opcode
; /**< opcodes or operation on entry */
8992 wl_rmc_entry_t entry
[WL_RMC_MAX_TABLE_ENTRY
];
8993 } wl_rmc_entry_table_t
;
8995 typedef struct wl_rmc_trans_elem
{
8996 struct ether_addr tr_mac
; /**< transmitter mac */
8997 struct ether_addr ar_mac
; /**< ar mac */
8998 uint16 artmo
; /**< AR timeout */
8999 uint8 amt_idx
; /**< amt table entry */
9001 uint16 flag
; /**< entry will be acked, not acked, programmed, full etc */
9002 } wl_rmc_trans_elem_t
;
9004 /** RMC transmitters */
9005 typedef struct wl_rmc_trans_in_network
{
9006 uint8 ver
; /**< version of RMC */
9007 uint8 num_tr
; /**< number of transmitters in the network */
9008 wl_rmc_trans_elem_t trs
[WL_RMC_MAX_NUM_TRS
];
9009 } wl_rmc_trans_in_network_t
;
9011 /** To update vendor specific ie for RMC */
9012 typedef struct wl_rmc_vsie
{
9013 uint8 oui
[DOT11_OUI_LEN
];
9015 uint16 payload
; /**< IE Data Payload */
9018 /* structures & defines for proximity detection */
9020 PROXD_UNDEFINED_METHOD
= 0,
9021 PROXD_RSSI_METHOD
= 1,
9022 PROXD_TOF_METHOD
= 2
9025 /* structures for proximity detection device role */
9026 #define WL_PROXD_MODE_DISABLE 0
9027 #define WL_PROXD_MODE_NEUTRAL 1
9028 #define WL_PROXD_MODE_INITIATOR 2
9029 #define WL_PROXD_MODE_TARGET 3
9031 #define WL_PROXD_ACTION_STOP 0
9032 #define WL_PROXD_ACTION_START 1
9034 #define WL_PROXD_FLAG_TARGET_REPORT 0x1
9035 #define WL_PROXD_FLAG_REPORT_FAILURE 0x2
9036 #define WL_PROXD_FLAG_INITIATOR_REPORT 0x4
9037 #define WL_PROXD_FLAG_NOCHANSWT 0x8
9038 #define WL_PROXD_FLAG_NETRUAL 0x10
9039 #define WL_PROXD_FLAG_INITIATOR_RPTRTT 0x20
9040 #define WL_PROXD_FLAG_ONEWAY 0x40
9041 #define WL_PROXD_FLAG_SEQ_EN 0x80
9043 #define WL_PROXD_SETFLAG_K 0x1
9044 #define WL_PROXD_SETFLAG_N 0x2
9045 #define WL_PROXD_SETFLAG_S 0x4
9047 #define WL_PROXD_SETFLAG_K 0x1
9048 #define WL_PROXD_SETFLAG_N 0x2
9049 #define WL_PROXD_SETFLAG_S 0x4
9051 #define WL_PROXD_RANDOM_WAKEUP 0x8000
9052 #define WL_PROXD_MAXREPORT 8
9054 typedef struct wl_proxd_iovar
{
9055 uint16 method
; /**< Proximity Detection method */
9056 uint16 mode
; /**< Mode (neutral, initiator, target) */
9060 * structures for proximity detection parameters
9061 * consists of two parts, common and method specific params
9062 * common params should be placed at the beginning
9065 typedef struct wl_proxd_params_common
{
9066 chanspec_t chanspec
; /**< channel spec */
9067 int16 tx_power
; /**< tx power of Proximity Detection(PD) frames (in dBm) */
9068 uint16 tx_rate
; /**< tx rate of PD rames (in 500kbps units) */
9069 uint16 timeout
; /**< timeout value */
9070 uint16 interval
; /**< interval between neighbor finding attempts (in TU) */
9071 uint16 duration
; /**< duration of neighbor finding attempts (in ms) */
9072 } wl_proxd_params_common_t
;
9074 typedef struct wl_proxd_params_rssi_method
{
9075 chanspec_t chanspec
; /**< chanspec for home channel */
9076 int16 tx_power
; /**< tx power of Proximity Detection frames (in dBm) */
9077 uint16 tx_rate
; /**< tx rate of PD frames, 500kbps units */
9078 uint16 timeout
; /**< state machine wait timeout of the frames (in ms) */
9079 uint16 interval
; /**< interval between neighbor finding attempts (in TU) */
9080 uint16 duration
; /**< duration of neighbor finding attempts (in ms) */
9081 /* method specific ones go after this line */
9082 int16 rssi_thresh
; /**< RSSI threshold (in dBm) */
9083 uint16 maxconvergtmo
; /**< max wait converge timeout (in ms) */
9084 } wl_proxd_params_rssi_method_t
;
9086 #define Q1_NS 25 /**< Q1 time units */
9088 #define TOF_BW_NUM 3 /**< number of bandwidth that the TOF can support */
9089 #define TOF_BW_SEQ_NUM (TOF_BW_NUM+2) /* number of total index */
9091 TOF_BW_20MHZ_INDEX
= 0,
9092 TOF_BW_40MHZ_INDEX
= 1,
9093 TOF_BW_80MHZ_INDEX
= 2,
9094 TOF_BW_SEQTX_INDEX
= 3,
9095 TOF_BW_SEQRX_INDEX
= 4
9098 #define BANDWIDTH_BASE 20 /**< base value of bandwidth */
9099 #define TOF_BW_20MHZ (BANDWIDTH_BASE << TOF_BW_20MHZ_INDEX)
9100 #define TOF_BW_40MHZ (BANDWIDTH_BASE << TOF_BW_40MHZ_INDEX)
9101 #define TOF_BW_80MHZ (BANDWIDTH_BASE << TOF_BW_80MHZ_INDEX)
9102 #define TOF_BW_10MHZ 10
9104 #define NFFT_BASE 64 /**< base size of fft */
9105 #define TOF_NFFT_20MHZ (NFFT_BASE << TOF_BW_20MHZ_INDEX)
9106 #define TOF_NFFT_40MHZ (NFFT_BASE << TOF_BW_40MHZ_INDEX)
9107 #define TOF_NFFT_80MHZ (NFFT_BASE << TOF_BW_80MHZ_INDEX)
9109 typedef struct wl_proxd_params_tof_method
{
9110 chanspec_t chanspec
; /**< chanspec for home channel */
9111 int16 tx_power
; /**< tx power of Proximity Detection(PD) frames (in dBm) */
9112 uint16 tx_rate
; /**< tx rate of PD rames (in 500kbps units) */
9113 uint16 timeout
; /**< state machine wait timeout of the frames (in ms) */
9114 uint16 interval
; /**< interval between neighbor finding attempts (in TU) */
9115 uint16 duration
; /**< duration of neighbor finding attempts (in ms) */
9116 /* specific for the method go after this line */
9117 struct ether_addr tgt_mac
; /**< target mac addr for TOF method */
9118 uint16 ftm_cnt
; /**< number of the frames txed by initiator */
9119 uint16 retry_cnt
; /**< number of retransmit attampts for ftm frames */
9120 int16 vht_rate
; /**< ht or vht rate */
9121 /* add more params required for other methods can be added here */
9122 } wl_proxd_params_tof_method_t
;
9124 typedef struct wl_proxd_seq_config
9132 } wl_proxd_seq_config_t
;
9134 #define WL_PROXD_TUNE_VERSION_1 1
9135 #define WL_PROXD_TUNE_VERSION_2 2
9136 #include <packed_section_start.h>
9137 /* For legacy ranging target (e.g. 43430, 43342) */
9138 typedef BWL_PRE_PACKED_STRUCT
struct wl_proxd_params_tof_tune_v1
{
9140 uint32 Ki
; /**< h/w delay K factor for initiator */
9141 uint32 Kt
; /**< h/w delay K factor for target */
9142 int16 vhtack
; /**< enable/disable VHT ACK */
9143 int16 N_log2
[TOF_BW_SEQ_NUM
]; /**< simple threshold crossing */
9144 int16 w_offset
[TOF_BW_NUM
]; /**< offset of threshold crossing window(per BW) */
9145 int16 w_len
[TOF_BW_NUM
]; /**< length of threshold crossing window(per BW) */
9146 int32 maxDT
; /**< max time difference of T4/T1 or T3/T2 */
9147 int32 minDT
; /**< min time difference of T4/T1 or T3/T2 */
9148 uint8 totalfrmcnt
; /**< total count of transfered measurement frames */
9149 uint16 rsv_media
; /**< reserve media value for TOF */
9150 uint32 flags
; /**< flags */
9151 uint8 core
; /**< core to use for tx */
9152 uint8 setflags
; /* set flags of K, N. S values */
9153 int16 N_scale
[TOF_BW_SEQ_NUM
]; /**< simple threshold crossing */
9154 uint8 sw_adj
; /**< enable sw assisted timestamp adjustment */
9155 uint8 hw_adj
; /**< enable hw assisted timestamp adjustment */
9156 uint8 seq_en
; /**< enable ranging sequence */
9157 uint8 ftm_cnt
[TOF_BW_SEQ_NUM
]; /**< number of ftm frames based on bandwidth */
9158 int16 N_log2_2g
; /**< simple threshold crossing for 2g channel */
9159 int16 N_scale_2g
; /**< simple threshold crossing for 2g channel */
9160 wl_proxd_seq_config_t seq_5g20
;
9161 wl_proxd_seq_config_t seq_2g20
; /* Thresh crossing params for 2G Sequence */
9162 uint16 bitflip_thresh
; /* bitflip threshold */
9163 uint16 snr_thresh
; /* SNR threshold */
9164 int8 recv_2g_thresh
; /* 2g recieve sensitivity threshold */
9165 uint32 acs_gdv_thresh
;
9166 int8 acs_rssi_thresh
;
9167 uint8 smooth_win_en
;
9169 } BWL_POST_PACKED_STRUCT wl_proxd_params_tof_tune_v1_t
;
9170 #include <packed_section_end.h>
9172 #include <packed_section_start.h>
9173 /* For legacy ranging initiator (including 4364) */
9174 typedef BWL_PRE_PACKED_STRUCT
struct wl_proxd_params_tof_tune_v2
{
9176 uint32 Ki
; /**< h/w delay K factor for initiator */
9177 uint32 Kt
; /**< h/w delay K factor for target */
9178 int16 vhtack
; /**< enable/disable VHT ACK */
9179 int16 N_log2
[TOF_BW_SEQ_NUM
]; /**< simple threshold crossing */
9180 int16 w_offset
[TOF_BW_NUM
]; /**< offset of threshold crossing window(per BW) */
9181 int16 w_len
[TOF_BW_NUM
]; /**< length of threshold crossing window(per BW) */
9182 int32 maxDT
; /**< max time difference of T4/T1 or T3/T2 */
9183 int32 minDT
; /**< min time difference of T4/T1 or T3/T2 */
9184 uint8 totalfrmcnt
; /**< total count of transfered measurement frames */
9185 uint16 rsv_media
; /**< reserve media value for TOF */
9186 uint32 flags
; /**< flags */
9187 uint8 core
; /**< core to use for tx */
9188 uint8 setflags
; /* set flags of K, N. S values */
9189 int16 N_scale
[TOF_BW_SEQ_NUM
]; /**< simple threshold crossing */
9190 uint8 sw_adj
; /**< enable sw assisted timestamp adjustment */
9191 uint8 hw_adj
; /**< enable hw assisted timestamp adjustment */
9192 uint8 seq_en
; /**< enable ranging sequence */
9193 uint8 ftm_cnt
[TOF_BW_SEQ_NUM
]; /**< number of ftm frames based on bandwidth */
9194 int16 N_log2_2g
; /**< simple threshold crossing for 2g channel */
9195 int16 N_scale_2g
; /**< simple threshold crossing for 2g channel */
9196 wl_proxd_seq_config_t seq_5g20
;
9197 wl_proxd_seq_config_t seq_2g20
; /* Thresh crossing params for 2G Sequence */
9198 uint16 bitflip_thresh
; /* bitflip threshold */
9199 uint16 snr_thresh
; /* SNR threshold */
9200 int8 recv_2g_thresh
; /* 2g recieve sensitivity threshold */
9201 uint32 acs_gdv_thresh
;
9202 int8 acs_rssi_thresh
;
9203 uint8 smooth_win_en
;
9204 int32 acs_gdmm_thresh
;
9205 int8 acs_delta_rssi_thresh
;
9207 uint8 core_mask
; /* core mask selection */
9208 } BWL_POST_PACKED_STRUCT wl_proxd_params_tof_tune_v2_t
;
9209 #include <packed_section_end.h>
9211 #define WL_PROXD_TUNE_VERSION_3 3
9212 /* Future ranging support */
9213 typedef struct wl_proxd_params_tof_tune_v3
{
9216 uint32 Ki
; /**< h/w delay K factor for initiator */
9217 uint32 Kt
; /**< h/w delay K factor for target */
9218 int16 vhtack
; /**< enable/disable VHT ACK */
9220 int16 N_log2
[TOF_BW_SEQ_NUM
]; /**< simple threshold crossing */
9222 int16 w_offset
[TOF_BW_NUM
]; /**< offset of threshold crossing window(per BW) */
9224 int16 w_len
[TOF_BW_NUM
]; /**< length of threshold crossing window(per BW) */
9226 int32 maxDT
; /**< max time difference of T4/T1 or T3/T2 */
9227 int32 minDT
; /**< min time difference of T4/T1 or T3/T2 */
9228 uint8 totalfrmcnt
; /**< total count of transfered measurement frames */
9230 uint16 rsv_media
; /**< reserve media value for TOF */
9232 uint32 flags
; /**< flags */
9233 uint8 core
; /**< core to use for tx */
9234 uint8 setflags
; /* set flags of K, N. S values */
9236 int16 N_scale
[TOF_BW_SEQ_NUM
]; /**< simple threshold crossing */
9237 uint8 sw_adj
; /**< enable sw assisted timestamp adjustment */
9238 uint8 hw_adj
; /**< enable hw assisted timestamp adjustment */
9239 uint8 seq_en
; /**< enable ranging sequence */
9241 uint8 ftm_cnt
[TOF_BW_SEQ_NUM
]; /**< number of ftm frames based on bandwidth */
9243 int16 N_log2_2g
; /**< simple threshold crossing for 2g channel */
9244 int16 N_scale_2g
; /**< simple threshold crossing for 2g channel */
9245 wl_proxd_seq_config_t seq_5g20
;
9246 wl_proxd_seq_config_t seq_2g20
; /* Thresh crossing params for 2G Sequence */
9247 uint16 bitflip_thresh
; /* bitflip threshold */
9248 uint16 snr_thresh
; /* SNR threshold */
9249 int8 recv_2g_thresh
; /* 2g recieve sensitivity threshold */
9251 uint32 acs_gdv_thresh
;
9252 int8 acs_rssi_thresh
;
9253 uint8 smooth_win_en
;
9255 int32 acs_gdmm_thresh
;
9256 int8 acs_delta_rssi_thresh
;
9259 uint8 core_mask
; /* core mask selection */
9261 } wl_proxd_params_tof_tune_v3_t
;
9263 typedef struct wl_proxd_params_iovar
{
9264 uint16 method
; /**< Proximity Detection method */
9267 /* common params for pdsvc */
9268 wl_proxd_params_common_t cmn_params
; /**< common parameters */
9269 /* method specific */
9270 wl_proxd_params_rssi_method_t rssi_params
; /**< RSSI method parameters */
9271 wl_proxd_params_tof_method_t tof_params
; /**< TOF method parameters */
9272 /* tune parameters */
9273 wl_proxd_params_tof_tune_v3_t tof_tune
; /**< TOF tune parameters */
9274 } u
; /**< Method specific optional parameters */
9275 } wl_proxd_params_iovar_t
;
9277 #define PROXD_COLLECT_GET_STATUS 0
9278 #define PROXD_COLLECT_SET_STATUS 1
9279 #define PROXD_COLLECT_QUERY_HEADER 2
9280 #define PROXD_COLLECT_QUERY_DATA 3
9281 #define PROXD_COLLECT_QUERY_DEBUG 4
9282 #define PROXD_COLLECT_REMOTE_REQUEST 5
9283 #define PROXD_COLLECT_DONE 6
9286 WL_PROXD_COLLECT_METHOD_TYPE_DISABLE
= 0x0,
9287 WL_PROXD_COLLECT_METHOD_TYPE_IOVAR
= 0x1,
9288 WL_PROXD_COLLECT_METHOD_TYPE_EVENT
= 0x2,
9289 WL_PROXD_COLLECT_METHOD_TYPE_EVENT_LOG
= 0x4
9290 } wl_proxd_collect_method_type_t
;
9292 typedef uint16 wl_proxd_collect_method_t
; /* query status: method to send proxd collect */
9294 #include <packed_section_start.h>
9295 typedef BWL_PRE_PACKED_STRUCT
struct wl_proxd_collect_query
{
9296 uint32 method
; /**< method */
9297 uint8 request
; /**< Query request. */
9298 uint8 status
; /**< bitmask 0 -- disable, 0x1 -- enable collection, */
9299 /* 0x2 -- Use generic event, 0x4 -- use event log */
9300 uint16 index
; /**< The current frame index [0 to total_frames - 1]. */
9301 uint16 mode
; /**< Initiator or Target */
9302 uint8 busy
; /**< tof sm is busy */
9303 uint8 remote
; /**< Remote collect data */
9304 } BWL_POST_PACKED_STRUCT wl_proxd_collect_query_t
;
9305 #include <packed_section_end.h>
9307 #include <packed_section_start.h>
9308 typedef BWL_PRE_PACKED_STRUCT
struct wl_proxd_collect_header
{
9309 uint16 total_frames
; /**< The total frames for this collect. */
9310 uint16 nfft
; /**< nfft value */
9311 uint16 bandwidth
; /**< bandwidth */
9312 uint16 channel
; /**< channel number */
9313 uint32 chanspec
; /**< channel spec */
9314 uint32 fpfactor
; /**< avb timer value factor */
9315 uint16 fpfactor_shift
; /**< avb timer value shift bits */
9316 int32 distance
; /**< distance calculated by fw */
9317 uint32 meanrtt
; /**< mean of RTTs */
9318 uint32 modertt
; /**< mode of RTTs */
9319 uint32 medianrtt
; /**< median of RTTs */
9320 uint32 sdrtt
; /**< standard deviation of RTTs */
9321 uint32 clkdivisor
; /**< clock divisor */
9322 uint16 chipnum
; /**< chip type */
9323 uint8 chiprev
; /**< chip revision */
9324 uint8 phyver
; /**< phy version */
9325 struct ether_addr localMacAddr
; /**< local mac address */
9326 struct ether_addr remoteMacAddr
; /**< remote mac address */
9327 wl_proxd_params_tof_tune_v3_t params
;
9328 } BWL_POST_PACKED_STRUCT wl_proxd_collect_header_t
;
9329 #include <packed_section_end.h>
9332 /* ********************** NAN wl interface struct types and defs ******************** */
9334 * Uses new common IOVAR batch processing mechanism
9338 * NAN config control
9339 * Bits 0 - 23 can be set by host
9340 * Bits 24 - 31 - Internal use for firmware, host cannot set it
9344 * Bit 0 : If set to 1, means event uses nan bsscfg,
9345 * otherwise uses infra bsscfg. Default is using infra bsscfg
9347 #define WL_NAN_CTRL_ROUTE_EVENT_VIA_NAN_BSSCFG 0x000001
9348 /* If set, discovery beacons are transmitted on 2G band */
9349 #define WL_NAN_CTRL_DISC_BEACON_TX_2G 0x000002
9350 /* If set, sync beacons are transmitted on 2G band */
9351 #define WL_NAN_CTRL_SYNC_BEACON_TX_2G 0x000004
9352 /* If set, discovery beacons are transmitted on 5G band */
9353 #define WL_NAN_CTRL_DISC_BEACON_TX_5G 0x000008
9354 /* If set, sync beacons are transmitted on 5G band */
9355 #define WL_NAN_CTRL_SYNC_BEACON_TX_5G 0x000010
9356 /* If set, auto datapath responses will be sent by FW */
9357 #define WL_NAN_CTRL_AUTO_DPRESP 0x000020
9358 /* If set, auto datapath confirms will be sent by FW */
9359 #define WL_NAN_CTRL_AUTO_DPCONF 0x000040
9360 /* If set, auto schedule responses will be sent by FW */
9361 #define WL_NAN_CTRL_AUTO_SCHEDRESP 0x000080
9362 /* If set, auto schedule confirms will be sent by FW */
9363 #define WL_NAN_CTRL_AUTO_SCHEDCONF 0x000100
9364 /* If set, proprietary rates are supported by FW */
9365 #define WL_NAN_CTRL_PROP_RATE 0x000200
9366 /* If set, service awake_dw overrides global dev awake_dw */
9367 #define WL_NAN_CTRL_SVC_OVERRIDE_DEV_AWAKE_DW 0x000400
9368 /* If set, merge scan will be disabled */
9369 #define WL_NAN_CTRL_SCAN_DISABLE 0x000800
9370 /* If set, power save will be disabled */
9371 #define WL_NAN_CTRL_POWER_SAVE_DISABLE 0x001000
9372 /* If set, device will merge to configured CID only */
9373 #define WL_NAN_CTRL_MERGE_CONF_CID_ONLY 0x002000
9374 /* If set, 5g core will be brought down in single band NAN */
9375 #define WL_NAN_CTRL_5G_SLICE_POWER_OPT 0x004000
9376 #define WL_NAN_CTRL_DUMP_HEAP 0x008000
9377 /* If set, host generates and assign ndp id for ndp sessions */
9378 #define WL_NAN_CTRL_HOST_GEN_NDPID 0x010000
9379 /* If set, nan ndp inactivity watchdog will be activated */
9380 #define WL_NAN_CTRL_DELETE_INACTIVE_PEERS 0x020000
9381 /* If set, nan assoc coex will be activated */
9382 #define WL_NAN_CTRL_INFRA_ASSOC_COEX 0x040000
9383 /* If set, dam will accept all NDP/RNG request from the peer including counter */
9384 #define WL_NAN_CTRL_DAM_ACCEPT_ALL 0x080000
9385 /* If set, nan mac ignores role for tx discovery beacon for periodic config */
9386 #define WL_NAN_CTRL_FASTDISC_IGNO_ROLE 0x100000
9387 /* If set, include NA in NAN beacons (disc beacons for now) */
9388 #define WL_NAN_CTRL_INCL_NA_IN_BCNS 0x200000
9389 /* If set, host assist will be enabled */
9390 #define WL_NAN_CTRL_HOST_ASSIST 0x400000
9391 /* If set, host configures NDI associated with the service */
9392 #define WL_NAN_CTRL_HOST_CFG_SVC_NDI 0x800000
9394 /* Value when all host-configurable bits set */
9395 #define WL_NAN_CTRL_MAX_MASK 0xFFFFFF
9396 #define WL_NAN_CFG_CTRL_FW_BITS 8
9398 /* Last 8-bits are firmware controlled bits.
9400 * If set - indicates that NAN initialization is successful
9402 * If set - indicates that NAN MAC cfg creation is successful
9404 * NOTE: These are only ready-only bits for host.
9405 * All sets to these bits from host are masked off
9407 #define WL_NAN_PROTO_INIT_DONE (1 << 31)
9408 #define WL_NAN_CFG_CREATE_DONE (1 << 30)
9410 #define WL_NAN_GET_PROTO_INIT_STATUS(x) \
9411 (((x) & WL_NAN_PROTO_INIT_DONE) ? TRUE:FALSE)
9412 #define WL_NAN_CLEAR_PROTO_INIT_STATUS(x) \
9413 ((x) &= ~WL_NAN_PROTO_INIT_DONE)
9414 #define WL_NAN_SET_PROTO_INIT_STATUS(x) \
9415 ((x) |= (WL_NAN_PROTO_INIT_DONE))
9417 #define WL_NAN_GET_CFG_CREATE_STATUS(x) \
9418 (((x) & WL_NAN_CFG_CREATE_DONE) ? TRUE:FALSE)
9419 #define WL_NAN_CLEAR_CFG_CREATE_STATUS(x) \
9420 ((x) &= ~WL_NAN_CFG_CREATE_DONE)
9421 #define WL_NAN_SET_CFG_CREATE_STATUS(x) \
9422 ((x) |= (WL_NAN_CFG_CREATE_DONE))
9424 #define WL_NAN_IOCTL_VERSION 0x2
9425 /* < some sufficient ioc buff size for our module */
9426 #define WL_NAN_IOC_BUFSZ 256
9427 /* some sufficient ioc buff size for dump commands */
9428 #define WL_NAN_IOC_BUFSZ_EXT 1024
9429 #define WL_NAN_MAX_SIDS_IN_BEACONS 127 /* Max allowed SIDs */
9430 #define WL_NAN_MASTER_RANK_LEN 8
9431 #define WL_NAN_RANGE_LIMITED 0x0040 /* Publish/Subscribe flags */
9433 /** The service hash (service id) is exactly this many bytes. */
9434 #define WL_NAN_SVC_HASH_LEN 6
9435 #define WL_NAN_HASHES_PER_BLOOM 4 /** Number of hash functions per bloom filter */
9437 /* no. of max last disc results */
9438 #define WL_NAN_MAX_DISC_RESULTS 3
9440 /* Max len of Rx and Tx filters */
9441 #define WL_NAN_MAX_SVC_MATCH_FILTER_LEN 255
9443 /* Max service name len */
9444 #define WL_NAN_MAX_SVC_NAME_LEN 32
9446 /* Type of Data path connection */
9447 #define WL_NAN_DP_TYPE_UNICAST 0
9448 #define WL_NAN_DP_TYPE_MULTICAST 1
9450 /* MAX security params length PMK field */
9451 #define WL_NAN_NCS_SK_PMK_LEN 32
9453 /* Post disc attr ID type */
9454 typedef uint8 wl_nan_post_disc_attr_id_t
;
9460 WL_NAN_COMPID_CONFIG
= 1,
9461 WL_NAN_COMPID_ELECTION
= 2,
9462 WL_NAN_COMPID_SD
= 3,
9463 WL_NAN_COMPID_TIMESYNC
= 4,
9464 WL_NAN_COMPID_DATA_PATH
= 5,
9465 WL_NAN_COMPID_DEBUG
= 15 /* Keep this at the end */
9468 #define WL_NAN_COMP_SHIFT 8
9469 #define WL_NAN_COMP_MASK(_c) (0x0F & ((uint8)(_c)))
9470 #define WL_NAN_COMP_ID(_c) (WL_NAN_COMP_MASK(_c) << WL_NAN_COMP_SHIFT)
9474 /** Instance ID type (unique identifier) */
9475 typedef uint8 wl_nan_instance_id_t
;
9477 /* Publish sent for a subscribe */
9478 /* WL_NAN_EVENT_REPLIED */
9480 typedef struct wl_nan_ev_replied
{
9481 struct ether_addr sub_mac
; /* Subscriber MAC */
9482 wl_nan_instance_id_t pub_id
; /* Publisher Instance ID */
9483 uint8 sub_id
; /* Subscriber ID */
9484 int8 sub_rssi
; /* Subscriber RSSI */
9486 } wl_nan_ev_replied_t
;
9488 typedef struct wl_nan_event_replied
{
9489 struct ether_addr sub_mac
; /* Subscriber MAC */
9490 wl_nan_instance_id_t pub_id
; /* Publisher Instance ID */
9491 uint8 sub_id
; /* Subscriber ID */
9492 int8 sub_rssi
; /* Subscriber RSSI */
9494 uint16 attr_list_len
; /* sizeof attributes attached to payload */
9495 uint8 attr_list
[0]; /* attributes payload */
9496 } wl_nan_event_replied_t
;
9498 /* NAN Tx status of transmitted frames */
9499 #define WL_NAN_TXS_FAILURE 0
9500 #define WL_NAN_TXS_SUCCESS 1
9502 /* NAN frame types */
9503 enum wl_nan_frame_type
{
9504 /* discovery frame types */
9505 WL_NAN_FRM_TYPE_PUBLISH
= 1,
9506 WL_NAN_FRM_TYPE_SUBSCRIBE
= 2,
9507 WL_NAN_FRM_TYPE_FOLLOWUP
= 3,
9509 /* datapath frame types */
9510 WL_NAN_FRM_TYPE_DP_REQ
= 4,
9511 WL_NAN_FRM_TYPE_DP_RESP
= 5,
9512 WL_NAN_FRM_TYPE_DP_CONF
= 6,
9513 WL_NAN_FRM_TYPE_DP_INSTALL
= 7,
9514 WL_NAN_FRM_TYPE_DP_END
= 8,
9516 /* schedule frame types */
9517 WL_NAN_FRM_TYPE_SCHED_REQ
= 9,
9518 WL_NAN_FRM_TYPE_SCHED_RESP
= 10,
9519 WL_NAN_FRM_TYPE_SCHED_CONF
= 11,
9520 WL_NAN_FRM_TYPE_SCHED_UPD
= 12,
9522 /* ranging frame types */
9523 WL_NAN_FRM_TYPE_RNG_REQ
= 13,
9524 WL_NAN_FRM_TYPE_RNG_RESP
= 14,
9525 WL_NAN_FRM_TYPE_RNG_TERM
= 15,
9526 WL_NAN_FRM_TYPE_RNG_REPORT
= 16,
9528 WL_NAN_FRM_TYPE_UNSOLICIT_SDF
= 17,
9529 WL_NAN_FRM_TYPE_INVALID
9531 typedef uint8 wl_nan_frame_type_t
;
9533 /* NAN Reason codes for tx status */
9534 enum wl_nan_txs_reason_codes
{
9535 WL_NAN_REASON_SUCCESS
= 1, /* NAN status success */
9536 WL_NAN_REASON_TIME_OUT
= 2, /* timeout reached */
9537 WL_NAN_REASON_DROPPED
= 3, /* pkt dropped due to internal failure */
9538 WL_NAN_REASON_MAX_RETRIES_DONE
= 4 /* Max retries exceeded */
9541 /* For NAN TX status */
9542 typedef struct wl_nan_event_txs
{
9543 uint8 status
; /* For TX status, success or failure */
9544 uint8 reason_code
; /* to identify reason when status is failure */
9545 uint16 host_seq
; /* seq num to keep track of pkts sent by host */
9546 uint8 type
; /* frame type */
9548 uint16 opt_tlvs_len
;
9550 } wl_nan_event_txs_t
;
9552 /* SD transmit pkt's event status is sent as optional tlv in wl_nan_event_txs_t */
9553 typedef struct wl_nan_event_sd_txs
{
9554 uint8 inst_id
; /* Publish or subscribe instance id */
9555 uint8 req_id
; /* Requestor instance id */
9556 } wl_nan_event_sd_txs_t
;
9558 /* Subscribe or Publish instance Terminated */
9560 /* WL_NAN_EVENT_TERMINATED */
9562 #define NAN_SD_TERM_REASON_TIMEOUT 1
9563 #define NAN_SD_TERM_REASON_HOSTREQ 2
9564 #define NAN_SD_TERM_REASON_FWTERM 3
9565 #define NAN_SD_TERM_REASON_FAIL 4
9567 typedef struct wl_nan_ev_terminated
{
9568 uint8 instance_id
; /* publish / subscribe instance id */
9569 uint8 reason
; /* 1=timeout, 2=Host/IOVAR, 3=FW Terminated 4=Failure */
9570 uint8 svctype
; /* 0 - Publish, 0x1 - Subscribe */
9571 uint8 pad
; /* Align */
9572 uint32 tx_cnt
; /* Number of SDFs sent */
9573 } wl_nan_ev_terminated_t
;
9575 /* Follow up received against a pub / subscr */
9576 /* WL_NAN_EVENT_RECEIVE */
9578 typedef struct wl_nan_ev_receive
{
9579 struct ether_addr remote_addr
; /* Peer NAN device MAC */
9580 uint8 local_id
; /* Local subscribe or publish ID */
9581 uint8 remote_id
; /* Remote subscribe or publish ID */
9584 uint16 attr_list_len
; /* sizeof attributes attached to payload */
9585 uint8 attr_list
[0]; /* attributes payload */
9586 } wl_nan_ev_receive_t
;
9588 /* For NAN event mask extention */
9589 #define WL_NAN_EVMASK_EXTN_VER 1
9590 #define WL_NAN_EVMASK_EXTN_LEN 16 /* 16*8 = 128 masks supported */
9592 typedef struct wl_nan_event_extn
{
9597 } wl_nan_evmask_extn_t
;
9599 /* WL_NAN_XTLV_DATA_DP_TXS */
9601 typedef struct wl_nan_data_dp_txs
{
9604 struct ether_addr indi
; /* initiator ndi */
9605 } wl_nan_data_dp_txs_t
;
9607 /* WL_NAN_XTLV_RNG_TXS */
9609 typedef struct wl_nan_range_txs
{
9612 } wl_nan_range_txs_t
;
9614 #define NAN_MAX_BANDS 2
9617 * TLVs - Below XTLV definitions will be deprecated
9618 * in due course (soon as all other branches update
9619 * to the comp ID based XTLVs listed below).
9621 enum wl_nan_cmd_xtlv_id
{
9622 WL_NAN_XTLV_MAC_ADDR
= 0x120,
9623 WL_NAN_XTLV_MATCH_RX
= 0x121,
9624 WL_NAN_XTLV_MATCH_TX
= 0x122,
9625 WL_NAN_XTLV_SVC_INFO
= 0x123,
9626 WL_NAN_XTLV_SVC_NAME
= 0x124,
9627 WL_NAN_XTLV_SR_FILTER
= 0x125,
9628 WL_NAN_XTLV_FOLLOWUP
= 0x126,
9629 WL_NAN_XTLV_SVC_LIFE_COUNT
= 0x127,
9630 WL_NAN_XTLV_AVAIL
= 0x128,
9631 WL_NAN_XTLV_SDF_RX
= 0x129,
9632 WL_NAN_XTLV_SDE_CONTROL
= 0x12a,
9633 WL_NAN_XTLV_SDE_RANGE_LIMIT
= 0x12b,
9634 WL_NAN_XTLV_NAN_AF
= 0x12c,
9635 WL_NAN_XTLV_SD_TERMINATE
= 0x12d,
9636 WL_NAN_XTLV_CLUSTER_ID
= 0x12e,
9637 WL_NAN_XTLV_PEER_RSSI
= 0x12f,
9638 WL_NAN_XTLV_BCN_RX
= 0x130,
9639 WL_NAN_XTLV_REPLIED
= 0x131, /* Publish sent for a subscribe */
9640 WL_NAN_XTLV_RECEIVED
= 0x132, /* FUP Received */
9641 WL_NAN_XTLV_DISC_RESULTS
= 0x133, /* Discovery results */
9642 WL_NAN_XTLV_TXS
= 0x134 /* TX status */
9645 #define WL_NAN_CMD_GLOBAL 0x00
9646 #define WL_NAN_CMD_CFG_COMP_ID 0x01
9647 #define WL_NAN_CMD_ELECTION_COMP_ID 0x02
9648 #define WL_NAN_CMD_SD_COMP_ID 0x03
9649 #define WL_NAN_CMD_SYNC_COMP_ID 0x04
9650 #define WL_NAN_CMD_DATA_COMP_ID 0x05
9651 #define WL_NAN_CMD_DAM_COMP_ID 0x06
9652 #define WL_NAN_CMD_RANGE_COMP_ID 0x07
9653 #define WL_NAN_CMD_GENERIC_COMP_ID 0x08
9654 #define WL_NAN_CMD_SCHED_COMP_ID 0x09
9655 #define WL_NAN_CMD_NSR_COMP_ID 0x0a /* NAN Save Restore */
9656 #define WL_NAN_CMD_NANHO_COMP_ID 0x0b /* NAN Host offload */
9657 #define WL_NAN_CMD_DBG_COMP_ID 0x0f
9659 #define WL_NAN_CMD_COMP_SHIFT 8
9660 #define NAN_CMD(x, y) (((x) << WL_NAN_CMD_COMP_SHIFT) | (y))
9663 * Module based NAN TLV IDs
9665 typedef enum wl_nan_tlv
{
9667 WL_NAN_XTLV_CFG_MATCH_RX
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x01),
9668 WL_NAN_XTLV_CFG_MATCH_TX
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x02),
9669 WL_NAN_XTLV_CFG_SR_FILTER
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x03),
9670 WL_NAN_XTLV_CFG_SVC_NAME
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x04),
9671 WL_NAN_XTLV_CFG_NAN_STATUS
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x05),
9672 WL_NAN_XTLV_CFG_SVC_LIFE_COUNT
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x06),
9673 WL_NAN_XTLV_CFG_SVC_HASH
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x07),
9674 WL_NAN_XTLV_CFG_SEC_CSID
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x08), /* Security CSID */
9675 WL_NAN_XTLV_CFG_SEC_PMK
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x09), /* Security PMK */
9676 WL_NAN_XTLV_CFG_SEC_PMKID
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x0A),
9677 WL_NAN_XTLV_CFG_SEC_SCID
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x0B),
9678 WL_NAN_XTLV_CFG_VNDR_PAYLOAD
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x0C),
9679 WL_NAN_XTLV_CFG_HOST_INDPID
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x0D),
9680 /* when host ndpid is used */
9681 WL_NAN_XTLV_CFG_MAC_ADDR
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x0E),
9682 /* fast disc time bitmap config */
9683 WL_NAN_XTLV_CFG_FDISC_TBMP
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x0F),
9685 WL_NAN_XTLV_SD_SVC_INFO
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x01),
9686 WL_NAN_XTLV_SD_FOLLOWUP
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x02),
9687 WL_NAN_XTLV_SD_SDF_RX
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x03),
9688 WL_NAN_XTLV_SD_SDE_CONTROL
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x04),
9689 WL_NAN_XTLV_SD_SDE_RANGE_LIMIT
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x05),
9690 WL_NAN_XTLV_SD_NAN_AF
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x06),
9691 WL_NAN_XTLV_SD_TERM
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x07),
9692 WL_NAN_XTLV_SD_REPLIED
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x08), /* Pub sent */
9693 WL_NAN_XTLV_SD_FUP_RECEIVED
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x09), /* FUP Received */
9694 WL_NAN_XTLV_SD_DISC_RESULTS
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x0A), /* Pub RX */
9695 WL_NAN_XTLV_SD_TXS
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x0B), /* Tx status */
9696 WL_NAN_XTLV_SD_SDE_SVC_INFO
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x0C),
9697 WL_NAN_XTLV_SD_SDE_SVC_UPD_IND
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x0D),
9698 WL_NAN_XTLV_SD_SVC_NDI
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x0E),
9699 WL_NAN_XTLV_SD_NDP_SPEC_INFO
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x0F),
9700 WL_NAN_XTLV_SD_NDPE_TLV_LIST
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x10),
9701 WL_NAN_XTLV_SD_NDL_QOS_UPD
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x11),
9703 WL_NAN_XTLV_SYNC_BCN_RX
= NAN_CMD(WL_NAN_CMD_SYNC_COMP_ID
, 0x01),
9704 WL_NAN_XTLV_EV_MR_CHANGED
= NAN_CMD(WL_NAN_CMD_SYNC_COMP_ID
, 0x02),
9706 WL_NAN_XTLV_DATA_DP_END
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x01),
9707 WL_NAN_XTLV_DATA_DP_INFO
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x02),
9708 WL_NAN_XTLV_DATA_DP_SEC_INST
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x03),
9709 WL_NAN_XTLV_DATA_DP_TXS
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x04), /* txs for dp */
9710 WL_NAN_XTLV_DATA_DP_OPAQUE_INFO
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x05),
9711 WL_NAN_XTLV_RANGE_INFO
= NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID
, 0x01),
9712 WL_NAN_XTLV_RNG_TXS
= NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID
, 0x02),
9714 WL_NAN_XTLV_EV_SLOT_INFO
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x01),
9715 WL_NAN_XTLV_EV_GEN_INFO
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x02),
9716 WL_NAN_XTLV_CCA_STATS
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x03),
9717 WL_NAN_XTLV_PER_STATS
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x04),
9718 WL_NAN_XTLV_CHBOUND_INFO
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x05),
9719 WL_NAN_XTLV_SLOT_STATS
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x06),
9721 WL_NAN_XTLV_DAM_NA_ATTR
= NAN_CMD(WL_NAN_CMD_DAM_COMP_ID
, 0x01), /* na attr */
9722 WL_NAN_XTLV_HOST_ASSIST_REQ
= NAN_CMD(WL_NAN_CMD_DAM_COMP_ID
, 0x02), /* host assist */
9724 WL_NAN_XTLV_GEN_FW_CAP
= NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID
, 0x01), /* fw cap */
9726 WL_NAN_XTLV_SCHED_INFO
= NAN_CMD(WL_NAN_CMD_SCHED_COMP_ID
, 0x01),
9728 /* Nan Save-Restore XTLVs */
9729 WL_NAN_XTLV_NSR2_PEER
= NAN_CMD(WL_NAN_CMD_NSR_COMP_ID
, 0x21),
9730 WL_NAN_XTLV_NSR2_NDP
= NAN_CMD(WL_NAN_CMD_NSR_COMP_ID
, 0x22),
9732 /* Host offload XTLVs */
9733 WL_NAN_XTLV_NANHO_PEER_ENTRY
= NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID
, 0x01),
9734 WL_NAN_XTLV_NANHO_DCAPLIST
= NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID
, 0x02),
9735 WL_NAN_XTLV_NANHO_DCSLIST
= NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID
, 0x03),
9736 WL_NAN_XTLV_NANHO_BLOB
= NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID
, 0x04),
9737 WL_NAN_XTLV_NANHO_NDP_STATE
= NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID
, 0x05),
9738 WL_NAN_XTLV_NANHO_FRM_TPLT
= NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID
, 0x06),
9739 WL_NAN_XTLV_NANHO_OOB_NAF
= NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID
, 0x07)
9742 /* Sub Module ID's for NAN */
9744 NAN_MAC
= 0, /* nan mac */
9745 NAN_DISC
= 1, /* nan discovery */
9746 NAN_DBG
= 2, /* nan debug */
9747 NAN_SCHED
= 3, /* nan sched */
9748 NAN_PEER_ENTRY
= 4, /* nan peer entry */
9749 NAN_AVAIL
= 5, /* nan avail */
9750 NAN_DAM
= 6, /* nan dam */
9751 NAN_FSM
= 7, /* nan fsm registry */
9752 NAN_NDP
= 8, /* nan ndp */
9753 NAN_NDL
= 9, /* nan ndl */
9754 NAN_DP
= 10, /* nan dp core */
9755 NAN_RNG
= 11, /* nan ranging */
9756 NAN_SEC
= 12, /* nan sec */
9760 enum wl_nan_sub_cmd_xtlv_id
{
9762 /* Special command - Tag zero */
9763 WL_NAN_CMD_GLB_NAN_VER
= NAN_CMD(WL_NAN_CMD_GLOBAL
, 0x00),
9765 /* nan cfg sub-commands */
9767 WL_NAN_CMD_CFG_NAN_INIT
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x01),
9768 WL_NAN_CMD_CFG_ROLE
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x02),
9769 WL_NAN_CMD_CFG_HOP_CNT
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x03),
9770 WL_NAN_CMD_CFG_HOP_LIMIT
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x04),
9771 WL_NAN_CMD_CFG_WARMUP_TIME
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x05),
9772 WL_NAN_CMD_CFG_STATUS
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x06),
9773 WL_NAN_CMD_CFG_OUI
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x07),
9774 WL_NAN_CMD_CFG_COUNT
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x08),
9775 WL_NAN_CMD_CFG_CLEARCOUNT
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x09),
9776 WL_NAN_CMD_CFG_CHANNEL
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x0A),
9777 WL_NAN_CMD_CFG_BAND
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x0B),
9778 WL_NAN_CMD_CFG_CID
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x0C),
9779 WL_NAN_CMD_CFG_IF_ADDR
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x0D),
9780 WL_NAN_CMD_CFG_BCN_INTERVAL
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x0E),
9781 WL_NAN_CMD_CFG_SDF_TXTIME
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x0F),
9782 WL_NAN_CMD_CFG_SID_BEACON
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x10),
9783 WL_NAN_CMD_CFG_DW_LEN
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x11),
9784 WL_NAN_CMD_CFG_AVAIL
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x12),
9785 WL_NAN_CMD_CFG_WFA_TM
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x13),
9786 WL_NAN_CMD_CFG_EVENT_MASK
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x14),
9787 WL_NAN_CMD_CFG_NAN_CONFIG
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x15), /* ctrl */
9788 WL_NAN_CMD_CFG_NAN_ENAB
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x16),
9789 WL_NAN_CMD_CFG_ULW
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x17),
9790 WL_NAN_CMD_CFG_NAN_CONFIG2
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x18), /* ctrl2 */
9791 WL_NAN_CMD_CFG_DEV_CAP
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x19),
9792 WL_NAN_CMD_CFG_SCAN_PARAMS
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x1A),
9793 WL_NAN_CMD_CFG_VNDR_PAYLOAD
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x1B),
9794 WL_NAN_CMD_CFG_FASTDISC
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x1C),
9795 WL_NAN_CMD_CFG_MIN_TX_RATE
= NAN_CMD(WL_NAN_CMD_CFG_COMP_ID
, 0x1D),
9796 WL_NAN_CMD_CFG_MAX
= WL_NAN_CMD_CFG_MIN_TX_RATE
,
9798 /* Add new commands before and update */
9800 /* nan election sub-commands */
9801 WL_NAN_CMD_ELECTION_HOST_ENABLE
= NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID
, 0x01),
9802 WL_NAN_CMD_ELECTION_METRICS_CONFIG
= NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID
, 0x02),
9803 WL_NAN_CMD_ELECTION_METRICS_STATE
= NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID
, 0x03),
9804 WL_NAN_CMD_ELECTION_LEAVE
= NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID
, 0x03),
9805 WL_NAN_CMD_ELECTION_MERGE
= NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID
, 0x04),
9806 WL_NAN_CMD_ELECTION_ADVERTISERS
= NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID
, 0x05),
9807 WL_NAN_CMD_ELECTION_RSSI_THRESHOLD
= NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID
, 0x06),
9808 WL_NAN_CMD_ELECTION_MAX
= WL_NAN_CMD_ELECTION_RSSI_THRESHOLD
,
9809 /* New commands go before and update */
9811 /* nan SD sub-commands */
9812 WL_NAN_CMD_SD_PARAMS
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x01),
9813 WL_NAN_CMD_SD_PUBLISH
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x02),
9814 WL_NAN_CMD_SD_PUBLISH_LIST
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x03),
9815 WL_NAN_CMD_SD_CANCEL_PUBLISH
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x04),
9816 WL_NAN_CMD_SD_SUBSCRIBE
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x05),
9817 WL_NAN_CMD_SD_SUBSCRIBE_LIST
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x06),
9818 WL_NAN_CMD_SD_CANCEL_SUBSCRIBE
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x07),
9819 WL_NAN_CMD_SD_VND_INFO
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x08),
9820 WL_NAN_CMD_SD_STATS
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x09),
9821 WL_NAN_CMD_SD_TRANSMIT
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x0A),
9822 WL_NAN_CMD_SD_FUP_TRANSMIT
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x0B),
9823 WL_NAN_CMD_SD_CONNECTION
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x0C),
9824 WL_NAN_CMD_SD_SHOW
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x0D),
9825 WL_NAN_CMD_SD_MAX
= WL_NAN_CMD_SD_SHOW
,
9827 /* nan time sync sub-commands */
9829 WL_NAN_CMD_SYNC_SOCIAL_CHAN
= NAN_CMD(WL_NAN_CMD_SYNC_COMP_ID
, 0x01),
9830 WL_NAN_CMD_SYNC_AWAKE_DWS
= NAN_CMD(WL_NAN_CMD_SYNC_COMP_ID
, 0x02),
9831 WL_NAN_CMD_SYNC_BCN_RSSI_NOTIF_THRESHOLD
= NAN_CMD(WL_NAN_CMD_SYNC_COMP_ID
, 0x03),
9832 WL_NAN_CMD_SYNC_MAX
= WL_NAN_CMD_SYNC_BCN_RSSI_NOTIF_THRESHOLD
,
9835 WL_NAN_CMD_DATA_CONFIG
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x01),
9836 WL_NAN_CMD_DATA_RSVD02
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x02),
9837 WL_NAN_CMD_DATA_RSVD03
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x03),
9838 WL_NAN_CMD_DATA_DATAREQ
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x04),
9839 WL_NAN_CMD_DATA_DATARESP
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x05),
9840 WL_NAN_CMD_DATA_DATAEND
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x06),
9841 WL_NAN_CMD_DATA_SCHEDUPD
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x07),
9842 WL_NAN_CMD_DATA_RSVD08
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x08),
9843 WL_NAN_CMD_DATA_CAP
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x9),
9844 WL_NAN_CMD_DATA_STATUS
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x0A),
9845 WL_NAN_CMD_DATA_STATS
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x0B),
9846 WL_NAN_CMD_DATA_RSVD0C
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x0C),
9847 WL_NAN_CMD_DATA_NDP_SHOW
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x0D),
9848 WL_NAN_CMD_DATA_DATACONF
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x0E),
9849 WL_NAN_CMD_DATA_MIN_TX_RATE
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x0F),
9850 WL_NAN_CMD_DATA_MAX_PEERS
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x10),
9851 WL_NAN_CMD_DATA_DP_IDLE_PERIOD
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x11),
9852 WL_NAN_CMD_DATA_DP_OPAQUE_INFO
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x12),
9853 WL_NAN_CMD_DATA_DP_HB_DURATION
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x13),
9854 WL_NAN_CMD_DATA_PATH_MAX
= WL_NAN_CMD_DATA_DP_HB_DURATION
, /* New ones before and update */
9856 /* nan dam sub-commands */
9857 WL_NAN_CMD_DAM_CFG
= NAN_CMD(WL_NAN_CMD_DAM_COMP_ID
, 0x01),
9858 WL_NAN_CMD_DAM_MAX
= WL_NAN_CMD_DAM_CFG
, /* New ones before and update */
9860 /* nan2.0 ranging commands */
9861 WL_NAN_CMD_RANGE_REQUEST
= NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID
, 0x01),
9862 WL_NAN_CMD_RANGE_AUTO
= NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID
, 0x02),
9863 WL_NAN_CMD_RANGE_RESPONSE
= NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID
, 0x03),
9864 WL_NAN_CMD_RANGE_CANCEL
= NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID
, 0x04),
9866 /* nan debug sub-commands */
9867 WL_NAN_CMD_DBG_SCAN_PARAMS
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x01),
9868 WL_NAN_CMD_DBG_SCAN
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x02),
9869 WL_NAN_CMD_DBG_SCAN_RESULTS
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x03),
9870 /* This is now moved under CFG */
9871 WL_NAN_CMD_DBG_EVENT_MASK
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x04),
9872 WL_NAN_CMD_DBG_EVENT_CHECK
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x05),
9873 WL_NAN_CMD_DBG_DUMP
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x06),
9874 WL_NAN_CMD_DBG_CLEAR
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x07),
9875 WL_NAN_CMD_DBG_RSSI
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x08),
9876 WL_NAN_CMD_DBG_DEBUG
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x09),
9877 WL_NAN_CMD_DBG_TEST1
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x0A),
9878 WL_NAN_CMD_DBG_TEST2
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x0B),
9879 WL_NAN_CMD_DBG_TEST3
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x0C),
9880 WL_NAN_CMD_DBG_DISC_RESULTS
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x0D),
9881 WL_NAN_CMD_DBG_STATS
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x0E),
9882 WL_NAN_CMD_DBG_LEVEL
= NAN_CMD(WL_NAN_CMD_DBG_COMP_ID
, 0x0F),
9883 WL_NAN_CMD_DBG_MAX
= WL_NAN_CMD_DBG_LEVEL
, /* New ones before and update */
9885 /* Generic componenet */
9886 WL_NAN_CMD_GEN_STATS
= NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID
, 0x01),
9887 WL_NAN_CMD_GEN_FW_CAP
= NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID
, 0x02),
9888 WL_NAN_CMD_GEN_MAX
= WL_NAN_CMD_GEN_FW_CAP
,
9890 /* NAN Save-Restore */
9891 WL_NAN_CMD_NSR2
= NAN_CMD(WL_NAN_CMD_NSR_COMP_ID
, 0x20),
9892 WL_NAN_CMD_NSR2_MAX
= WL_NAN_CMD_NSR2
,
9894 /* Host offload sub-commands */
9895 WL_NAN_CMD_NANHO_UPDATE
= NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID
, 0x01),
9896 WL_NAN_CMD_NANHO_FRM_TPLT
= NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID
, 0x02),
9897 WL_NAN_CMD_NANHO_OOB_NAF
= NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID
, 0x03),
9898 WL_NAN_CMD_NANHO_MAX
= WL_NAN_CMD_NANHO_OOB_NAF
9902 * Component/Module based NAN TLV IDs for NAN stats
9904 typedef enum wl_nan_stats_tlv
{
9905 WL_NAN_XTLV_SYNC_MAC_STATS
= NAN_CMD(WL_NAN_CMD_SYNC_COMP_ID
, 0x01),
9907 WL_NAN_XTLV_SD_DISC_STATS
= NAN_CMD(WL_NAN_CMD_SD_COMP_ID
, 0x01),
9909 WL_NAN_XTLV_DATA_NDP_STATS
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x01),
9910 WL_NAN_XTLV_DATA_NDL_STATS
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x02),
9911 WL_NAN_XTLV_DATA_SEC_STATS
= NAN_CMD(WL_NAN_CMD_DATA_COMP_ID
, 0x03),
9913 WL_NAN_XTLV_GEN_SCHED_STATS
= NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID
, 0x01),
9914 WL_NAN_XTLV_GEN_PEER_STATS
= NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID
, 0x02),
9915 WL_NAN_XTLV_GEN_PEER_STATS_DEVCAP
= NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID
, 0x03),
9916 WL_NAN_XTLV_GEN_PEER_STATS_NDP
= NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID
, 0x04),
9917 WL_NAN_XTLV_GEN_PEER_STATS_SCHED
= NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID
, 0x05),
9918 WL_NAN_XTLV_GEN_AVAIL_STATS_SCHED
= NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID
, 0x06),
9919 WL_NAN_XTLV_GEN_NDP_STATS
= NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID
, 0x07),
9921 WL_NAN_XTLV_DAM_STATS
= NAN_CMD(WL_NAN_CMD_DAM_COMP_ID
, 0x01),
9922 WL_NAN_XTLV_DAM_AVAIL_STATS
= NAN_CMD(WL_NAN_CMD_DAM_COMP_ID
, 0x02),
9924 WL_NAN_XTLV_RANGE_STATS
= NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID
, 0x01)
9925 } wl_nan_stats_tlv_t
;
9927 /* NAN stats WL_NAN_CMD_GEN_STATS command */
9929 typedef struct wl_nan_cmn_get_stat
{
9930 uint32 modules_btmap
; /* Bitmap to indicate module stats are needed:
9931 * See NAN Sub Module ID's above
9933 uint8 operation
; /* Get, Get and Clear */
9934 uint8 arg1
; /* Submodule control variable1 */
9935 uint8 arg2
; /* Submodule control variable2 */
9936 uint8 pad
; /* May not be needed as TLV's are aligned,add to pass compile chk */
9937 } wl_nan_cmn_get_stat_t
;
9939 /* Output for Stats container */
9940 typedef struct wl_nan_cmn_stat
{
9941 uint32 n_stats
; /* Number of different sub TLV stats present in the container */
9942 uint32 totlen
; /* Total Length of stats data in container */
9943 uint8 stats_tlvs
[]; /* Stat TLV's container */
9944 } wl_nan_cmn_stat_t
;
9946 /* Defines for operation */
9947 #define WLA_NAN_STATS_GET 0
9948 #define WLA_NAN_STATS_GET_CLEAR 1
9950 #define WL_NAN_STAT_ALL 0xFFFFFFFF
9954 typedef struct wl_nan_mac_band_stats
{
9955 uint32 bcn_tx
; /* 2g/5g disc/sync beacon tx count */
9956 uint32 bcn_rx
; /* 2g/5g disc/sync beacon rx count */
9957 uint32 dws
; /* Number of 2g/5g DW's */
9958 } wl_nan_mac_band_stats_t
;
9960 /* Note: if this struct is changing update wl_nan_slot_ecounters_vX_t version,
9961 * as this struct is sent as payload in wl_nan_slot_ecounter_vX_ts
9963 typedef struct wl_nan_mac_stats
{
9964 wl_nan_mac_band_stats_t band
[NAN_MAX_BANDS
]; /* MAC sync band specific stats */
9965 uint32 naf_tx
; /* NAN AF tx */
9966 uint32 naf_rx
; /* NAN AF rx */
9967 uint32 sdf_tx
; /* SDF tx */
9968 uint32 sdf_rx
; /* SDF rx */
9969 } wl_nan_mac_stats_t
;
9971 /* NAN Sched stats */
9972 /* Per core Sched stats */
9973 typedef struct nan_sched_stats_core
{
9974 uint32 slotstart
; /* slot_start */
9975 uint32 slotend
; /* slot_end */
9976 uint32 slotskip
; /* slot_skip */
9977 uint32 slotstart_partial
; /* slot resume */
9978 uint32 slotend_partial
; /* slot pre-empt */
9979 uint8 avail_upd_cnt
; /* count to track num of times avail has been updated */
9981 } nan_sched_stats_core_t
;
9982 /* Common Sched stats */
9983 typedef struct nan_sched_stats_cmn
{
9984 uint32 slot_adj_dw
; /* Slot adjusts due to DW changes */
9985 uint32 slot_dur
; /* Total slot duration in TU's */
9986 } nan_sched_stats_cmn_t
;
9988 /* Note: if this struct is changing update wl_nan_slot_ecounters_vX_t version,
9989 * as this struct is sent as payload in wl_nan_slot_ecounters_vX_t
9991 typedef struct nan_sched_stats
{
9992 nan_sched_stats_cmn_t cmn
;
9993 nan_sched_stats_core_t slice
[MAX_NUM_D11CORES
];
9994 } nan_sched_stats_t
;
9995 /* End NAN Sched stats */
9997 /* NAN Discovery stats */
9998 typedef struct nan_disc_stats
{
9999 uint32 pub_tx
; /* Publish tx */
10000 uint32 pub_rx
; /* Publish rx */
10001 uint32 sub_tx
; /* Subscribe tx */
10002 uint32 sub_rx
; /* Subscribe rx */
10003 uint32 fup_tx
; /* Followup tx */
10004 uint32 fup_rx
; /* Followup rx */
10005 uint32 pub_resp_ignored
; /* response to incoming publish ignored */
10006 uint32 sub_resp_ignored
; /* response to incoming subscribe ignored */
10007 } nan_disc_stats_t
;
10008 /* NAN Discovery stats end */
10010 /* statistics for nan sec */
10011 typedef struct nan_sec_stats_s
{
10012 uint32 mic_fail
; /* rx mic fail */
10013 uint32 replay_fail
; /* replay counter */
10014 uint32 tx_fail
; /* tx fail (from txstatus) */
10015 uint32 key_info_err
; /* key info field err */
10016 uint32 ok_sessions
; /* successful mx negotiations */
10017 uint32 fail_sessions
; /* failed sessions */
10018 uint32 keydesc_err
; /* key desc error */
10019 uint32 invalid_cipher
; /* cipher suite not valid */
10020 uint32 pmk_not_found
; /* no pmk found for given service or for any reason */
10021 uint32 no_pmk_for_pmkid
; /* no pmk found for give pmkid */
10022 uint32 key_install_err
; /* failed to install keys */
10023 uint32 no_keydesc_attr
; /* key desc attr missing */
10024 uint32 nonce_mismatch
; /* nonce mismatch */
10027 /* WL_NAN_XTLV_GEN_PEER_STATS */
10028 typedef struct wl_nan_peer_stats
{
10029 struct ether_addr nmi
;
10031 uint32 pkt_enq
; /* counter for queued pkt of peer */
10036 bool counter_proposed
;
10040 uint16 local_max_latency
;
10041 uint16 peer_max_latency
;
10042 uint8 local_min_slots
;
10043 uint8 peer_min_slots
;
10045 /* security association */
10046 struct ether_addr sec_laddr
; /* local mac addr */
10047 struct ether_addr sec_raddr
; /* remote mac addr */
10050 } wl_nan_peer_stats_t
;
10052 /* WL_NAN_XTLV_GEN_PEER_STATS_DEVCAP */
10053 typedef struct wl_nan_peer_stats_dev_cap
{
10057 uint8 bands_supported
;
10059 uint8 num_antennas
;
10060 uint16 chan_switch_time
;
10061 uint8 capabilities
;
10063 } wl_nan_peer_stats_dev_cap_t
;
10065 /* WL_NAN_XTLV_GEN_PEER_STATS_NDP */
10066 typedef struct wl_nan_peer_stats_ndp
{
10069 uint8 indp_id
; /* initiator ndp id */
10070 uint8 ndp_ctrl
; /* ndp control field */
10071 struct ether_addr peer_nmi
;
10072 struct ether_addr peer_ndi
;
10073 struct ether_addr local_ndi
;
10075 /* peer scb info */
10076 bool scb_allocated
;
10081 } wl_nan_peer_stats_ndp_t
;
10084 WL_NAN_SCHED_STAT_SLOT_COMM
= 0x01, /* Committed slot */
10085 WL_NAN_SCHED_STAT_SLOT_COND
= 0x02, /* Conditional slot(proposal/counter) */
10086 WL_NAN_SCHED_STAT_SLOT_NDC
= 0x04, /* NDC slot */
10087 WL_NAN_SCHED_STAT_SLOT_IMMUT
= 0x08, /* Immutable slot */
10088 WL_NAN_SCHED_STAT_SLOT_RANGE
= 0x10, /* Ranging slot */
10090 typedef uint16 wl_nan_stats_sched_slot_info_t
;
10092 typedef struct wl_nan_stats_sched_slot
{
10093 wl_nan_stats_sched_slot_info_t info
; /* capture slot type and more info */
10094 chanspec_t chanspec
;
10095 } wl_nan_stats_sched_slot_t
;
10097 /* WL_NAN_XTLV_GEN_PEER_STATS_SCHED, WL_NAN_XTLV_GEN_AVAIL_STATS_SCHED */
10098 typedef struct wl_nan_stats_sched
{
10100 uint8 seq_id
; /* seq id from NA attr */
10105 wl_nan_stats_sched_slot_t slot
[];
10106 } wl_nan_stats_sched_t
;
10108 /* WL_NAN_XTLV_GEN_PEER_STATS_SCHED */
10109 typedef struct wl_nan_peer_stats_sched
{
10111 uint8 seq_id
; /* seq id from NA attr */
10116 wl_nan_stats_sched_slot_t slot
[];
10117 } wl_nan_peer_stats_sched_t
;
10119 /* WL_NAN_XTLV_RANGE_STATS */
10120 typedef struct wl_nan_range_stats
{
10121 uint16 rng_ssn_estb
;
10122 uint16 rng_ssn_fail
;
10123 uint16 rng_sched_start
;
10124 uint16 rng_sched_end
;
10125 uint16 ftm_ssn_success
; /* number of succesfull ftm sessions */
10126 uint16 ftm_ssn_fail
;
10127 uint16 num_meas
; /* number of ftm frames */
10128 uint16 num_valid_meas
; /* number of ftm frames with valid timestamp */
10129 } wl_nan_range_stats_t
;
10131 /* defines for ndp stats flag */
10133 #define NAN_NDP_STATS_FLAG_ROLE_MASK 0x01
10134 #define NAN_NDP_STATS_FLAG_ROLE_INIT 0x00
10135 #define NAN_NDP_STATS_FLAG_ROLE_RESP 0x01
10137 #define NAN_NDP_STATS_STATE_BIT_SHIFT 1
10138 #define NAN_NDP_STATS_FLAG_STATE_MASK 0x07
10139 #define NAN_NDP_STATS_FLAG_STATE_IN_PROG 0x00
10140 #define NAN_NDP_STATS_FLAG_STATE_ESTB 0x01
10141 #define NAN_NDP_STATS_FLAG_STATE_TEARDOWN_WAIT 0x02
10142 /* More states can be added here, when needed */
10144 /* WL_NAN_XTLV_GEN_NDP_STATS */
10145 typedef struct wl_nan_ndp_stats_s
{
10149 uint8 nan_sec_csid
;
10150 struct ether_addr lndi_addr
;
10151 struct ether_addr pnmi_addr
;
10152 struct ether_addr pndi_addr
;
10154 } wl_nan_ndp_stats_t
;
10156 /* WL_NAN_XTLV_EV_SLOT_INFO */
10157 typedef struct wl_nan_slot_info_s
{
10158 /* dw slot start expected */
10161 /* dw slot start actual */
10164 uint16 cur_chan
[MAX_NUM_D11CORES
]; /* sdb channels */
10165 uint16 dw_chan
; /* dw channel */
10166 uint8 dw_no
; /* dw number */
10167 uint8 slot_seq_no
; /* slot seq no. */
10168 } wl_nan_slot_info_t
;
10170 /* WL_NAN_EVENT_MR_CHANGED */
10171 typedef uint8 wl_nan_mr_changed_t
;
10172 #define WL_NAN_AMR_CHANGED 1
10173 #define WL_NAN_IMR_CHANGED 2
10175 /** status - TBD BCME_ vs NAN status - range reserved for BCME_ */
10177 /* add new status here... */
10178 WL_NAN_E_PEER_NOTAVAIL
= -2131,
10179 WL_NAN_E_SCB_EXISTS
= -2130,
10180 WL_NAN_E_INVALID_PEER_NDI
= -2129,
10181 WL_NAN_E_INVALID_LOCAL_NDI
= -2128,
10182 WL_NAN_E_ALREADY_EXISTS
= -2127, /* generic NAN error for duplication */
10183 WL_NAN_E_EXCEED_MAX_NUM_MAPS
= -2126,
10184 WL_NAN_E_INVALID_DEV_CHAN_SCHED
= -2125,
10185 WL_NAN_E_INVALID_PEER_BLOB_TYPE
= -2124,
10186 WL_NAN_E_INVALID_LCL_BLOB_TYPE
= -2123,
10187 WL_NAN_E_BCMC_PDPA
= -2122, /* BCMC NAF PDPA */
10188 WL_NAN_E_TIMEOUT
= -2121,
10189 WL_NAN_E_HOST_CFG
= -2120,
10190 WL_NAN_E_NO_ACK
= -2119,
10191 WL_NAN_E_SECINST_FAIL
= -2118,
10192 WL_NAN_E_REJECT_NDL
= -2117, /* generic NDL rejection error */
10193 WL_NAN_E_INVALID_NDP_ATTR
= -2116,
10194 WL_NAN_E_HOST_REJECTED
= -2115,
10195 WL_NAN_E_PCB_NORESOURCE
= -2114,
10196 WL_NAN_E_NDC_EXISTS
= -2113,
10197 WL_NAN_E_NO_NDC_ENTRY_AVAIL
= -2112,
10198 WL_NAN_E_INVALID_NDC_ENTRY
= -2111,
10199 WL_NAN_E_SD_TX_LIST_FULL
= -2110,
10200 WL_NAN_E_SVC_SUB_LIST_FULL
= -2109,
10201 WL_NAN_E_SVC_PUB_LIST_FULL
= -2108,
10202 WL_NAN_E_SDF_MAX_LEN_EXCEEDED
= -2107,
10203 WL_NAN_E_ZERO_CRB
= -2106, /* no CRB between local and peer */
10204 WL_NAN_E_PEER_NDC_NOT_SELECTED
= -2105, /* peer ndc not selected */
10205 WL_NAN_E_DAM_CHAN_CONFLICT
= -2104, /* dam schedule channel conflict */
10206 WL_NAN_E_DAM_SCHED_PERIOD
= -2103, /* dam schedule period mismatch */
10207 WL_NAN_E_LCL_NDC_NOT_SELECTED
= -2102, /* local selected ndc not configured */
10208 WL_NAN_E_NDL_QOS_INVALID_NA
= -2101, /* na doesn't comply with ndl qos */
10209 WL_NAN_E_CLEAR_NAF_WITH_SA_AS_RNDI
= -2100, /* rx clear naf with peer rndi */
10210 WL_NAN_E_SEC_CLEAR_PKT
= -2099, /* rx clear pkt from a peer with sec_sa */
10211 WL_NAN_E_PROT_NON_PDPA_NAF
= -2098, /* rx protected non PDPA frame */
10212 WL_NAN_E_DAM_DOUBLE_REMOVE
= -2097, /* remove peer schedule already removed */
10213 WL_NAN_E_DAM_DOUBLE_MERGE
= -2096, /* merge peer schedule already merged */
10214 WL_NAN_E_DAM_REJECT_INVALID
= -2095, /* reject for invalid schedule */
10215 WL_NAN_E_DAM_REJECT_RANGE
= -2094,
10216 WL_NAN_E_DAM_REJECT_QOS
= -2093,
10217 WL_NAN_E_DAM_REJECT_NDC
= -2092,
10218 WL_NAN_E_DAM_REJECT_PEER_IMMUT
= -2091,
10219 WL_NAN_E_DAM_REJECT_LCL_IMMUT
= -2090,
10220 WL_NAN_E_DAM_EXCEED_NUM_SCHED
= -2089,
10221 WL_NAN_E_DAM_INVALID_SCHED_MAP
= -2088, /* invalid schedule map list */
10222 WL_NAN_E_DAM_INVALID_LCL_SCHED
= -2087,
10223 WL_NAN_E_INVALID_MAP_ID
= -2086,
10224 WL_NAN_E_CHAN_OVERLAP_ACROSS_MAP
= -2085,
10225 WL_NAN_E_INVALID_CHAN_LIST
= -2084,
10226 WL_NAN_E_INVALID_RANGE_TBMP
= -2083,
10227 WL_NAN_E_INVALID_IMMUT_SCHED
= -2082,
10228 WL_NAN_E_INVALID_NDC_ATTR
= -2081,
10229 WL_NAN_E_INVALID_TIME_BITMAP
= -2080,
10230 WL_NAN_E_INVALID_NA_ATTR
= -2079,
10231 WL_NAN_E_NO_NA_ATTR_IN_AVAIL_MAP
= -2078, /* no na attr saved in avail map */
10232 WL_NAN_E_INVALID_MAP_IDX
= -2077,
10233 WL_NAN_E_SEC_SA_NOTFOUND
= -2076,
10234 WL_NAN_E_BSSCFG_NOTFOUND
= -2075,
10235 WL_NAN_E_SCB_NOTFOUND
= -2074,
10236 WL_NAN_E_NCS_SK_KDESC_TYPE
= -2073,
10237 WL_NAN_E_NCS_SK_KEY_DESC_VER
= -2072, /* key descr ver */
10238 WL_NAN_E_NCS_SK_KEY_TYPE
= -2071, /* key descr type */
10239 WL_NAN_E_NCS_SK_KEYINFO_FAIL
= -2070, /* key info (generic) */
10240 WL_NAN_E_NCS_SK_KEY_LEN
= -2069, /* key len */
10241 WL_NAN_E_NCS_SK_KDESC_NOT_FOUND
= -2068, /* key desc not found */
10242 WL_NAN_E_NCS_SK_INVALID_PARAMS
= -2067, /* invalid args */
10243 WL_NAN_E_NCS_SK_KDESC_INVALID
= -2066, /* key descr is not valid */
10244 WL_NAN_E_NCS_SK_NONCE_MISMATCH
= -2065,
10245 WL_NAN_E_NCS_SK_KDATA_SAVE_FAIL
= -2064, /* not able to save key data */
10246 WL_NAN_E_NCS_SK_AUTH_TOKEN_CALC_FAIL
= -2063,
10247 WL_NAN_E_NCS_SK_PTK_CALC_FAIL
= -2062,
10248 WL_NAN_E_INVALID_STARTOFFSET
= -2061,
10249 WL_NAN_E_BAD_NA_ENTRY_TYPE
= -2060,
10250 WL_NAN_E_INVALID_CHANBMP
= -2059,
10251 WL_NAN_E_INVALID_OP_CLASS
= -2058,
10252 WL_NAN_E_NO_IES
= -2057,
10253 WL_NAN_E_NO_PEER_ENTRY_AVAIL
= -2056,
10254 WL_NAN_E_INVALID_PEER
= -2055,
10255 WL_NAN_E_PEER_EXISTS
= -2054,
10256 WL_NAN_E_PEER_NOTFOUND
= -2053,
10257 WL_NAN_E_NO_MEM
= -2052,
10258 WL_NAN_E_INVALID_OPTION
= -2051,
10259 WL_NAN_E_INVALID_BAND
= -2050,
10260 WL_NAN_E_INVALID_MAC
= -2049,
10261 WL_NAN_E_BAD_INSTANCE
= -2048,
10262 /* NAN status code reserved from -2048 to -3071 */
10263 WL_NAN_E_ERROR
= -1,
10267 /* Error codes used in vendor specific attribute in Data Path Termination frames */
10269 WL_NAN_DPEND_E_OK
= 0,
10270 WL_NAN_DPEND_E_ERROR
= 1,
10271 WL_NAN_DPEND_E_HOST_CMD
= 2,
10272 WL_NAN_DPEND_E_HOST_REJECTED
= 3, /* host rejected rx frame */
10273 WL_NAN_DPEND_E_RESOURCE_LIMIT
= 4,
10274 WL_NAN_DPEND_E_NO_ACK_RCV
= 5,
10275 WL_NAN_DPEND_E_TIMEOUT
= 6,
10276 WL_NAN_DPEND_E_NO_ELT
= 7, /* rx frame missing element container */
10277 WL_NAN_DPEND_E_NO_NDP_ATTR
= 8,
10278 WL_NAN_DPEND_E_NO_AVAIL_ATTR
= 9,
10279 WL_NAN_DPEND_E_NO_NDC_ATTR
= 10,
10280 WL_NAN_DPEND_E_NO_RANGE_BM
= 11,
10281 WL_NAN_DPEND_E_INVALID_NDP_ATTR
= 12,
10282 WL_NAN_DPEND_E_INVALID_NDC_ATTR
= 13,
10283 WL_NAN_DPEND_E_INVALID_IMMUT
= 14,
10284 WL_NAN_DPEND_E_INVALID_NDL_QOS
= 15,
10285 WL_NAN_DPEND_E_INVALID_SEC_PARAMS
= 16,
10286 WL_NAN_DPEND_E_REJECT_AVAIL
= 17,
10287 WL_NAN_DPEND_E_REJECT_NDL
= 18
10290 typedef int32 wl_nan_status_t
;
10292 /** nan cmd list entry */
10293 enum wl_nan_sub_cmd_input_flags
{
10294 WL_NAN_SUB_CMD_FLAG_NONE
= 0,
10295 WL_NAN_SUB_CMD_FLAG_SKIP
= 1, /* Skip to next sub-command on error */
10296 WL_NAN_SUB_CMD_FLAG_TERMINATE
= 2, /* Terminate processing and return */
10297 WL_NAN_SUB_CMD_FLAG_LAST
/* Keep this at the end */
10300 /** container for nan events */
10301 typedef struct wl_nan_ioc
{
10302 uint16 version
; /**< interface command or event version */
10303 uint16 id
; /**< nan ioctl cmd ID */
10304 uint16 len
; /**< total length of all tlv records in data[] */
10305 uint16 pad
; /**< pad to be 32 bit aligment */
10306 uint8 data
[]; /**< var len payload of bcm_xtlv_t type */
10310 * NAN sub-command data structures
10314 * Config component WL_NAN_CMD_CFG_XXXX sub-commands
10315 * WL_NAN_CMD_CFG_ENABLE
10317 enum wl_nan_config_state
{
10318 WL_NAN_CONFIG_STATE_DISABLE
= 0,
10319 WL_NAN_CONFIG_STATE_ENABLE
= 1
10322 typedef int8 wl_nan_config_state_t
;
10324 /* WL_NAN_CMD_CFG_NAN_INIT */
10326 typedef uint8 wl_nan_init_t
;
10328 /* WL_NAN_CMD_CFG_NAN_VERSION */
10329 typedef uint16 wl_nan_ver_t
;
10331 /* WL_NAN_CMD_CFG_NAN_CONFIG */
10332 typedef uint32 wl_nan_cfg_ctrl_t
;
10334 /* WL_NAN_CMD_CFG_NAN_CONFIG2 */
10335 typedef struct wl_nan_cfg_ctrl2
{
10336 uint32 flags1
; /* wl_nan_cfg_ctrl2_flags1 */
10337 uint32 flags2
; /* wl_nan_cfg_ctrl2_flags2 */
10338 } wl_nan_cfg_ctrl2_t
;
10340 enum wl_nan_cfg_ctrl2_flags1
{
10341 /* Allows unicast SDF TX while local device is under NDP/NDL negotiation,
10342 * but Not with the peer SDF destined to.
10344 WL_NAN_CTRL2_FLAG1_ALLOW_SDF_TX_UCAST_IN_PROG
= 0x00000001,
10345 /* Allows broadcast SDF TX while local device is under NDP/NDL negotiation */
10346 WL_NAN_CTRL2_FLAG1_ALLOW_SDF_TX_BCAST_IN_PROG
= 0x00000002,
10347 /* Allows the device to send schedule update automatically on local schedule change */
10348 WL_NAN_CTRL2_FLAG1_AUTO_SCHEDUPD
= 0x00000004,
10349 /* Allows the device to handle slot pre_close operations */
10350 WL_NAN_CTRL2_FLAG1_SLOT_PRE_CLOSE
= 0x00000008
10352 #define WL_NAN_CTRL_FLAGS1_MASK 0x0000000f
10354 #define WL_NAN_CTRL_FLAGS2_MASK 0x00000000
10357 * WL_NAN_CMD_CFG_BAND, WL_NAN_CMD_CFG_RSSI_THRESHOLD(Get only)
10359 typedef uint8 wl_nan_band_t
;
10362 * WL_NAN_CMD_CFG_ROLE
10365 WL_NAN_ROLE_AUTO
= 0,
10366 WL_NAN_ROLE_NON_MASTER_NON_SYNC
= 1,
10367 WL_NAN_ROLE_NON_MASTER_SYNC
= 2,
10368 WL_NAN_ROLE_MASTER
= 3,
10369 WL_NAN_ROLE_ANCHOR_MASTER
= 4
10372 typedef uint8 wl_nan_role_t
;
10374 typedef struct wl_nan_device_state
10376 wl_nan_role_t role
; /* Sync Master, Non-Sync Master */
10377 uint8 state
; /* TBD */
10378 uint8 hopcount
; /* Hops to the Anchor Master */
10379 struct ether_addr immediate_master
; /* Master MAC */
10380 struct ether_addr anchor_master
; /* Anchor Master MAC */
10381 struct ether_addr cluster_id
; /* Cluster ID to which this device belongs to */
10383 uint32 tsf_high
; /* NAN Cluster TSFs */
10385 } wl_nan_device_state_t
;
10388 * WL_NAN_CMD_CFG_HOP_CNT, WL_NAN_CMD_CFG_HOP_LIMIT
10390 typedef uint8 wl_nan_hop_count_t
;
10393 * WL_NAN_CMD_CFG_WARMUP_TIME
10395 typedef uint32 wl_nan_warmup_time_ticks_t
;
10398 * WL_NAN_CMD_CFG_RSSI_THRESHOLD
10399 * rssi_close and rssi_mid are used to transition master to non-master
10400 * role by NAN state machine. rssi thresholds corresponding to the band
10403 /* To be deprecated */
10404 typedef struct wl_nan_rssi_threshold
{
10405 wl_nan_band_t band
;
10409 } wl_nan_rssi_threshold_t
;
10411 /* WL_NAN_CMD_ELECTION_RSSI_THRESHOLD */
10413 typedef struct wl_nan_rssi_thld
{
10414 int8 rssi_close_2g
;
10416 int8 rssi_close_5g
;
10418 } wl_nan_rssi_thld_t
;
10420 /* WL_NAN_CMD_DATA_MAX_PEERS */
10422 typedef uint8 wl_nan_max_peers_t
;
10425 * WL_NAN_CMD_CFG_STATUS
10428 typedef enum wl_nan_election_mode
{
10429 WL_NAN_ELECTION_RUN_BY_HOST
= 1,
10430 WL_NAN_ELECTION_RUN_BY_FW
= 2
10431 } wl_nan_election_mode_t
;
10433 typedef struct wl_nan_conf_status
{
10434 struct ether_addr nmi
; /* NAN mgmt interface address */
10435 uint8 enabled
; /* NAN is enabled */
10436 uint8 role
; /* Current nan sync role */
10437 struct ether_addr cid
; /* Current Cluster id */
10438 uint8 social_chans
[2]; /* Social channels */
10439 uint8 mr
[8]; /* Self Master Rank */
10440 uint8 amr
[8]; /* Anchor Master Rank */
10441 uint32 ambtt
; /* Anchor master beacon target time */
10442 uint32 cluster_tsf_h
; /* Current Cluster TSF High */
10443 uint32 cluster_tsf_l
; /* Current Cluster TSF Low */
10444 uint8 election_mode
; /* Election mode, host or firmware */
10445 uint8 hop_count
; /* Current Hop count */
10446 uint8 imr
[8]; /* Immediate Master Rank */
10448 uint16 opt_tlvs_len
;
10450 } wl_nan_conf_status_t
;
10453 * WL_NAN_CMD_CFG_OUI
10455 typedef struct wl_nan_oui_type
{
10456 uint8 nan_oui
[DOT11_OUI_LEN
];
10458 } wl_nan_oui_type_t
;
10461 * WL_NAN_CMD_CFG_COUNT
10463 typedef struct wl_nan_count
{
10464 uint32 cnt_bcn_tx
; /**< TX disc/sync beacon count */
10465 uint32 cnt_bcn_rx
; /**< RX disc/sync beacon count */
10466 uint32 cnt_svc_disc_tx
; /**< TX svc disc frame count */
10467 uint32 cnt_svc_disc_rx
; /**< RX svc disc frame count */
10470 * Election component WL_NAN_CMD_ELECTION_XXXX sub-commands
10471 * WL_NAN_CMD_ELECTION_HOST_ENABLE
10473 enum wl_nan_enable_flags
{
10474 WL_NAN_DISABLE_FLAG_HOST_ELECTION
= 0,
10475 WL_NAN_ENABLE_FLAG_HOST_ELECTION
= 1
10479 * 0 - disable host based election
10480 * 1 - enable host based election
10482 typedef uint8 wl_nan_host_enable_t
;
10485 * WL_NAN_CMD_ELECTION_METRICS_CONFIG
10488 typedef struct wl_nan_election_metric_config
{
10489 uint8 random_factor
; /* Configured random factor */
10490 uint8 master_pref
; /* configured master preference */
10492 } wl_nan_election_metric_config_t
;
10495 * WL_NAN_CMD_ELECTION_METRICS_STATE
10498 typedef struct wl_nan_election_metric_state
{
10499 uint8 random_factor
; /* random factor used in MIs */
10500 uint8 master_pref
; /* Master advertised in MIs */
10502 } wl_nan_election_metric_state_t
;
10505 * WL_NAN_CMD_ELECTION_LEAVE
10506 * WL_NAN_CMD_ELECTION_STOP
10508 typedef struct ether_addr wl_nan_cluster_id_t
;
10511 * WL_NAN_CMD_ELECTION_MERGE
10512 * 0 - disable cluster merge
10513 * 1 - enable cluster merge
10515 typedef uint8 wl_nan_merge_enable_t
;
10518 * WL_NAN_CMD_CFG_ROLE
10519 * role = 0 means configuration by firmware(obsolete); otherwise by host
10520 * when host configures role, also need target master address to sync to
10522 #define NAN_SYNC_MASTER_SELF 1
10523 #define NAN_SYNC_MASTER_USE_TIMING 2 /* Use the tsf timing provided */
10524 #define NAN_SYNC_MASTER_AMREC_UPD 4 /* provide AM record update */
10527 struct ether_addr addr:
10528 when NAN_SYNC_MASTER_USE_TIMING is set, addr is the mac of Rx NAN beacon
10529 providing the timing info
10531 The local TSF timestamp filled in by FW in the WL_NAN_EVENT_BCN_RX event;
10533 The timestamp in the Rx beacon frame, filled in by host
10535 the amtt in the cluster ID attribute in the Rx beacon frame
10538 typedef struct nan_sync_master
{
10539 uint8 flag
; /* 1: self; 2: use TSF timing; 4: AMR update */
10541 struct ether_addr addr
;
10542 struct ether_addr cluster_id
;
10543 chanspec_t channel
; /* bcn reception channel */
10548 uint8 amr
[WL_NAN_MASTER_RANK_LEN
];
10550 } nan_sync_master_t
;
10553 * NAN Sync TLV(NSTLV):
10554 * To keep NAN/AWDL concurrency time sync.
10555 * It is generated at hybrid device, and propogated by AWDL only device.
10556 * It contains the information needed to run NAN election
10558 #include <packed_section_start.h>
10559 typedef BWL_PRE_PACKED_STRUCT
struct awdl_nan_sync_tlv
{
10560 uint16 hop_count
; /* total hop_count */
10561 struct ether_addr src_addr
; /* macaddr of the hybrid originator of nstlv */
10562 struct ether_addr cluster_id
; /* NAN cluster ID of hybrid originator of nstlv */
10563 uint32 nan_tsf_h
; /* NAN cluster TSF of the hybrid originator of nstlv */
10565 uint8 master_preference
;
10566 uint8 random_factor
;
10567 uint8 amr
[WL_NAN_MASTER_RANK_LEN
];
10568 uint8 orig_hop_count
; /* hop_count of the origin hybrid NAN device */
10569 uint32 ambtt
; /* Anchor Master Beacon Transmission Time */
10570 uint8 opt_xtlv_len
; /* xtlv len */
10571 } BWL_POST_PACKED_STRUCT awdl_nan_sync_tlv_t
;
10573 typedef BWL_PRE_PACKED_STRUCT
struct wl_awdl_nan_sync_tlv
{
10574 uint8 type
; /* 23 for NTLV */
10576 awdl_nan_sync_tlv_t ntlv
;
10577 } BWL_POST_PACKED_STRUCT wl_awdl_nan_sync_tlv_t
;
10578 #include <packed_section_end.h>
10580 /* NAN advertiser structure */
10581 /* TODO RSDB: add chspec to indicates core corresponds correct core */
10582 typedef struct nan_adv_entry
{
10583 uint8 age
; /* used to remove stale entries */
10584 uint8 hop_count
; /* for NTLV support, use bit7 for virtual NAN peer */
10585 struct ether_addr addr
;
10586 struct ether_addr cluster_id
;
10587 chanspec_t channel
; /* bcn reception channel */
10592 uint8 amr
[WL_NAN_MASTER_RANK_LEN
];
10594 int8 rssi
[NAN_MAX_BANDS
]; /* rssi last af was received at */
10595 int8 last_rssi
[NAN_MAX_BANDS
]; /* rssi in the last AF */
10597 #define NAN_VIRTUAL_PEER_BIT 0x80
10600 NAC_CNT_NTLV_AF_TX
= 0, /* count of AWDL AF containing NTLV tx */
10601 NAC_CNT_NTLV_AF_RX
, /* count of AWDL AF containing NTLV rx */
10602 NAC_CNT_NTLV_TMERR_TX
, /* count of NTLV tx timing error */
10603 NAC_CNT_NTLV_TMERR_RX
, /* count of NTLV rx timing error */
10604 NAC_CNT_NTLV_TM_MISMATCH
, /* count of TopMaster mismatch in Rx NTLV processing */
10605 NAC_CNT_NTLV_ADV_EXISTED
, /* count of NTLV ignored bc advertiser existed from bcn */
10606 NAC_CNT_NTLV_STALED_BCN
, /* count of staled bcn from NTLV info */
10607 NAC_CNT_NTLV_MERGE
, /* count of NTLV used for NAN cluster merge */
10608 NAC_CNT_NTLV_ELECTION_DROP
, /* count of NTLV dropped in NAN election */
10609 NAC_CNT_NTLV_TSF_ADOPT
, /* count of NTLV used for NAN TSF adoption */
10613 #define NAC_MAX_CNT (NAC_CNT_NTLV_LAST)
10615 typedef struct nac_stats
{
10616 uint32 nac_cnt
[NAC_MAX_CNT
];
10619 typedef struct nan_adv_table
{
10623 nan_adv_entry_t adv_nodes
[0];
10626 typedef struct wl_nan_role_cfg
{
10627 wl_nan_role_t cfg_role
;
10628 wl_nan_role_t cur_role
;
10630 nan_sync_master_t target_master
;
10631 } wl_nan_role_cfg_t
;
10633 typedef struct wl_nan_role_config
{
10634 wl_nan_role_t role
;
10635 struct ether_addr target_master
;
10637 } wl_nan_role_config_t
;
10639 typedef int8 wl_nan_sd_optional_field_types_t
;
10641 /* Flag bits for Publish and Subscribe (wl_nan_sd_params_t flags) */
10643 /* First 8 bits are blocked for mapping
10644 * against svc_control flag bits which goes out
10645 * as part of SDA attribute in air in SDF frames
10647 #define WL_NAN_RANGE_LIMITED 0x0040
10649 /* Event generation indicator (default is continuous) */
10651 #define WL_NAN_MATCH_ONCE 0x100000
10652 #define WL_NAN_MATCH_NEVER 0x200000
10654 /* Bits specific to Publish */
10656 #define WL_NAN_PUB_UNSOLICIT 0x1000 /* Unsolicited Tx */
10657 #define WL_NAN_PUB_SOLICIT 0x2000 /* Solicited Tx */
10658 #define WL_NAN_PUB_BOTH 0x3000 /* Both the above */
10660 #define WL_NAN_PUB_BCAST 0x4000 /* bcast solicited Tx only */
10661 #define WL_NAN_PUB_EVENT 0x8000 /* Event on each solicited Tx */
10662 #define WL_NAN_PUB_SOLICIT_PENDING 0x10000 /* Used for one-time solicited Publish */
10664 #define WL_NAN_FOLLOWUP 0x20000 /* Follow-up frames */
10665 #define WL_NAN_TX_FOLLOWUP 0x40000 /* host generated transmit Follow-up frames */
10667 /* Bits specific to Subscribe */
10669 #define WL_NAN_SUB_ACTIVE 0x1000 /* Active subscribe mode */
10670 #define WL_NAN_SUB_MATCH_IF_SVC_INFO 0x2000 /* Service info in publish */
10672 #define WL_NAN_TTL_UNTIL_CANCEL 0xFFFFFFFF /* Special values for time to live (ttl) parameter */
10675 * Publish - runs until first transmission
10676 * Subscribe - runs until first DiscoveryResult event
10678 #define WL_NAN_TTL_FIRST 0
10680 /* Nan Service Based control Flags */
10682 /* If set, dev will take care of dp_resp */
10683 #define WL_NAN_SVC_CTRL_AUTO_DPRESP 0x1000000
10685 /* If set, host wont rec event "receive" */
10686 #define WL_NAN_SVC_CTRL_SUPPRESS_EVT_RECEIVE 0x2000000
10688 /* If set, host wont rec event "replied" */
10689 #define WL_NAN_SVC_CTRL_SUPPRESS_EVT_REPLIED 0x4000000
10691 /* If set, host wont rec event "terminated" */
10692 #define WL_NAN_SVC_CTRL_SUPPRESS_EVT_TERMINATED 0x8000000
10695 * WL_NAN_CMD_SD_PARAMS
10697 typedef struct wl_nan_sd_params
10699 uint16 length
; /* length including options */
10700 uint8 period
; /* period of the unsolicited SDF xmission in DWs */
10701 uint8 awake_dw
; /* interval between two DWs where SDF tx/rx are done */
10702 uint8 svc_hash
[WL_NAN_SVC_HASH_LEN
]; /* Hash for the service name */
10703 uint8 instance_id
; /* Instance of the current service */
10704 int8 proximity_rssi
; /* RSSI limit to Rx subscribe or pub SDF 0 no effect */
10705 uint32 flags
; /* bitmap representing aforesaid optional flags */
10706 int32 ttl
; /* TTL for this instance id, -1 will run till cancelled */
10707 tlv_t optional
[1]; /* optional fields in the SDF as appropriate */
10708 } wl_nan_sd_params_t
;
10711 * WL_NAN_CMD_SD_PUBLISH_LIST
10712 * WL_NAN_CMD_SD_SUBSCRIBE_LIST
10714 typedef struct wl_nan_service_info
10716 uint8 instance_id
; /* Publish instance ID */
10717 uint8 service_hash
[WL_NAN_SVC_HASH_LEN
]; /* Hash for service name */
10718 } wl_nan_service_info_t
;
10720 typedef struct wl_nan_service_list
10722 uint16 id_count
; /* Number of registered publish/subscribe services */
10723 wl_nan_service_info_t list
[1]; /* service info defined by nan_service instance */
10724 } wl_nan_service_list_t
;
10727 * WL_NAN_CMD_CFG_BCN_INTERVAL
10729 typedef uint16 wl_nan_disc_bcn_interval_t
;
10732 * WL_NAN_CMD_CFG_SDF_TXTIME
10734 typedef uint16 wl_nan_svc_disc_txtime_t
;
10737 * WL_NAN_CMD_CFG_STOP_BCN_TX
10739 typedef uint16 wl_nan_stop_bcn_tx_t
;
10742 * WL_NAN_CMD_CFG_SID_BEACON
10744 typedef struct wl_nan_sid_beacon_control
{
10745 uint8 sid_enable
; /* Flag to indicate the inclusion of Service IDs in Beacons */
10746 uint8 sid_count
; /* Limit for number of publish SIDs to be included in Beacons */
10747 uint8 sub_sid_count
; /* Limit for number of subscribe SIDs to be included in Beacons */
10749 } wl_nan_sid_beacon_control_t
;
10752 * WL_NAN_CMD_CFG_DW_LEN
10754 typedef uint16 wl_nan_dw_len_t
;
10757 * WL_NAN_CMD_CFG_AWAKE_DW Will be deprecated.
10759 typedef struct wl_nan_awake_dw
{
10760 wl_nan_band_t band
; /* 0 - b mode 1- a mode */
10761 uint8 interval
; /* 1 or 2 or 4 or 8 or 16 */
10763 } wl_nan_awake_dw_t
;
10766 * WL_NAN_CMD_CFG_AWAKE_DWS
10768 typedef struct wl_nan_awake_dws
{
10769 uint8 dw_interval_2g
; /* 2G DW interval */
10770 uint8 dw_interval_5g
; /* 5G DW interval */
10772 } wl_nan_awake_dws_t
;
10774 /* WL_NAN_CMD_SYNC_BCN_RSSI_NOTIF_THRESHOLD */
10776 typedef struct wl_nan_rssi_notif_thld
{
10780 } wl_nan_rssi_notif_thld_t
;
10783 * WL_NAN_CMD_CFG_SOCIAL_CHAN
10785 typedef struct wl_nan_social_channels
{
10786 uint8 soc_chan_2g
; /* 2G social channel */
10787 uint8 soc_chan_5g
; /* 5G social channel */
10789 } wl_nan_social_channels_t
;
10792 * WL_NAN_CMD_SD_CANCEL_PUBLISH
10793 * WL_NAN_CMD_SD_CANCEL_SUBSCRIBE
10795 typedef uint8 wl_nan_instance_id
; /* Instance ID of an active publish instance */
10798 * WL_NAN_CMD_SD_VND_INFO
10800 typedef struct wl_nan_sd_vendor_info
10802 uint16 length
; /* Size in bytes of the payload following this field */
10803 uint8 data
[]; /* Vendor Information */
10804 } wl_nan_sd_vendor_info_t
;
10807 * WL_NAN_CMD_SD_STATS
10809 typedef struct wl_nan_sd_stats
{
10814 uint32 sdfollowuprx
;
10816 uint32 sdpubreplied
;
10821 } wl_nan_sd_stats_t
;
10823 /* Flag bits for sd transmit message (wl_nan_sd_transmit_t flags) */
10825 /* If set, host wont rec "tx status" event for tx-followup msg */
10826 #define WL_NAN_FUP_SUPR_EVT_TXS 0x01
10827 /* more flags can be added here */
10830 * WL_NAN_CMD_SD_TRANSMIT
10831 * WL_NAN_CMD_SD_FUP_TRANSMIT
10833 typedef struct wl_nan_sd_transmit
{
10834 uint8 local_service_id
; /* Sender Service ID */
10835 uint8 requestor_service_id
; /* Destination Service ID */
10836 struct ether_addr destination_addr
; /* Destination MAC */
10837 uint16 token
; /* follow_up_token when a follow-up
10838 * msg is queued successfully
10840 uint8 priority
; /* requested relative prio */
10841 uint8 flags
; /* Flags for tx follow-up msg */
10842 uint16 opt_len
; /* total length of optional tlvs */
10843 uint8 opt_tlv
[]; /* optional tlvs in bcm_xtlv_t type */
10844 } wl_nan_sd_transmit_t
;
10847 * WL_NAN_CMD_SYNC_TSRESERVE
10850 #define NAN_MAX_TIMESLOT 32
10851 typedef struct wl_nan_timeslot
{
10852 uint32 abitmap
; /**< available bitmap */
10853 uint32 chanlist
[NAN_MAX_TIMESLOT
];
10854 } wl_nan_timeslot_t
;
10859 * WL_NAN_CMD_SYNC_TSRELEASE
10861 typedef uint32 wl_nan_ts_bitmap_t
;
10863 /* nan passive scan params */
10864 #define NAN_SCAN_MAX_CHCNT 8
10865 /* nan merge scan params */
10866 typedef struct wl_nan_scan_params
{
10867 /* dwell time of discovery channel corresponds to band_idx.
10868 * If set to 0 then fw default will be used.
10871 /* scan period of discovery channel corresponds to band_idx.
10872 * If set to 0 then fw default will be used.
10874 uint16 scan_period
;
10875 /* band index of discovery channel */
10877 } wl_nan_scan_params_t
;
10880 * WL_NAN_CMD_DBG_SCAN
10882 typedef struct wl_nan_dbg_scan
{
10883 struct ether_addr cid
;
10885 } wl_nan_dbg_scan_t
;
10887 /* NAN_DBG_LEVEL */
10888 typedef struct wl_nan_dbg_level
{
10889 uint32 nan_err_level
; /* for Error levels */
10890 uint32 nan_dbg_level
; /* for bebug logs and trace */
10891 uint32 nan_info_level
; /* for dumps like prhex */
10892 } wl_nan_dbg_level_t
;
10895 * WL_NAN_CMD_DBG_EVENT_MASK
10897 typedef uint32 wl_nan_event_mask_t
;
10900 * WL_NAN_CMD_DBG_EVENT_CHECK
10902 typedef uint8 wl_nan_dbg_ifname
[BCM_MSG_IFNAME_MAX
];
10905 * WL_NAN_CMD_DBG_DUMP
10906 * WL_NAN_CMD_DBG_CLEAR
10908 enum wl_nan_dbg_dump_type
{
10909 WL_NAN_DBG_DT_RSSI_DATA
= 1,
10910 WL_NAN_DBG_DT_STATS_DATA
= 2,
10912 * Additional enums before this line
10914 WL_NAN_DBG_DT_INVALID
10916 typedef int8 wl_nan_dbg_dump_type_t
;
10918 /** various params and ctl swithce for nan_debug instance */
10920 * WL_NAN_CMD_DBG_DEBUG
10922 typedef struct wl_nan_debug_params
{
10923 uint16 cmd
; /**< debug cmd to perform a debug action */
10925 uint32 msglevel
; /**< msg level if enabled */
10926 uint8 enabled
; /**< runtime debuging enabled */
10929 } wl_nan_debug_params_t
;
10931 typedef struct wl_nan_sched_svc_timeslot_s
{
10932 uint32 abitmap
; /* availability bitmap */
10933 uint32 chanlist
[NAN_MAX_TIMESLOT
];
10934 uint8 res
; /* resolution: 0 = 16ms, 1 = 32ms, 2 = 64ms 3 = reserved. REfer NAN spec */
10935 uint8 mapid
; /* mapid from NAN spec. Used to differentiate 2G Vs 5G band */
10937 } wl_nan_sched_svc_timeslot_t
;
10940 * WL_NAN_CMD_DATA_DP_IDLE_PERIOD
10942 typedef uint16 wl_nan_ndp_idle_period_t
;
10945 * WL_NAN_CMD_DATA_DP_HB_DURATION
10947 typedef uint16 wl_nan_ndp_hb_duration_t
;
10951 /* nan cfg /disc & dbg ioctls */
10952 WL_NAN_CMD_ENABLE
= 1,
10953 WL_NAN_CMD_ATTR
= 2,
10954 WL_NAN_CMD_NAN_JOIN
= 3,
10955 WL_NAN_CMD_LEAVE
= 4,
10956 WL_NAN_CMD_MERGE
= 5,
10957 WL_NAN_CMD_STATUS
= 6,
10958 WL_NAN_CMD_TSRESERVE
= 7,
10959 WL_NAN_CMD_TSSCHEDULE
= 8,
10960 WL_NAN_CMD_TSRELEASE
= 9,
10961 WL_NAN_CMD_OUI
= 10,
10962 WL_NAN_CMD_OOB_AF
= 11,
10963 WL_NAN_CMD_SCAN_PARAMS
= 12,
10965 WL_NAN_CMD_COUNT
= 15,
10966 WL_NAN_CMD_CLEARCOUNT
= 16,
10968 /* discovery engine commands */
10969 WL_NAN_CMD_PUBLISH
= 20,
10970 WL_NAN_CMD_SUBSCRIBE
= 21,
10971 WL_NAN_CMD_CANCEL_PUBLISH
= 22,
10972 WL_NAN_CMD_CANCEL_SUBSCRIBE
= 23,
10973 WL_NAN_CMD_TRANSMIT
= 24,
10974 WL_NAN_CMD_CONNECTION
= 25,
10975 WL_NAN_CMD_SHOW
= 26,
10976 WL_NAN_CMD_STOP
= 27, /* stop nan for a given cluster ID */
10977 /* nan debug iovars & cmds */
10978 WL_NAN_CMD_SCAN
= 47,
10979 WL_NAN_CMD_SCAN_RESULTS
= 48,
10980 WL_NAN_CMD_EVENT_MASK
= 49,
10981 WL_NAN_CMD_EVENT_CHECK
= 50,
10982 WL_NAN_CMD_DUMP
= 51,
10983 WL_NAN_CMD_CLEAR
= 52,
10984 WL_NAN_CMD_RSSI
= 53,
10986 WL_NAN_CMD_DEBUG
= 60,
10987 WL_NAN_CMD_TEST1
= 61,
10988 WL_NAN_CMD_TEST2
= 62,
10989 WL_NAN_CMD_TEST3
= 63,
10990 WL_NAN_CMD_DISC_RESULTS
= 64,
10991 /* nan 2.0 data path commands */
10992 WL_NAN_CMD_DATAPATH
= 65
10995 /* NAN DP interface commands */
10996 enum wl_nan_dp_cmds
{
10997 /* nan 2.0 ioctls */
10998 WL_NAN_CMD_DP_CAP
= 1000,
10999 WL_NAN_CMD_DP_CONFIG
= 1001,
11000 WL_NAN_CMD_DP_CREATE
= 1002,
11001 WL_NAN_CMD_DP_AUTO_CONNECT
= 1003,
11002 WL_NAN_CMD_DP_DATA_REQ
= 1004,
11003 WL_NAN_CMD_DP_DATA_RESP
= 1005,
11004 WL_NAN_CMD_DP_SCHED_UPD
= 1006,
11005 WL_NAN_CMD_DP_END
= 1007,
11006 WL_NAN_CMD_DP_CONNECT
= 1008,
11007 WL_NAN_CMD_DP_STATUS
= 1009
11010 /* TODO Should remove this fixed length */
11011 #define WL_NAN_DATA_SVC_SPEC_INFO_LEN 32 /* arbitrary */
11012 #define WL_NAN_DP_MAX_SVC_INFO 0xFF
11013 #define WL_NAN_DATA_NDP_INST_SUPPORT 16
11015 /* Nan flags (16 bits) */
11016 #define WL_NAN_DP_FLAG_SVC_INFO 0x0001
11017 #define WL_NAN_DP_FLAG_CONFIRM 0x0002
11018 #define WL_NAN_DP_FLAG_EXPLICIT_CFM 0x0004
11019 #define WL_NAN_DP_FLAG_SECURITY 0x0008
11020 #define WL_NAN_DP_FLAG_HAST_NDL_COUNTER 0x0010 /* Host assisted NDL counter */
11022 /* NAN Datapath host status */
11023 #define WL_NAN_DP_STATUS_ACCEPTED 1
11024 #define WL_NAN_DP_STATUS_REJECTED 0
11027 typedef struct wl_nan_dp_cap
{
11031 /** The service hash (service id) is exactly this many bytes. */
11032 #define WL_NAN_SVC_HASH_LEN 6
11033 /** Number of hash functions per bloom filter */
11034 #define WL_NAN_HASHES_PER_BLOOM 4
11035 /* no. of max last disc results */
11036 #define WL_NAN_MAX_DISC_RESULTS 3
11038 /* NAN security related defines */
11039 /* NCS-SK related */
11040 #define WL_NAN_NCS_SK_PMK_LEN 32
11041 #define WL_NAN_NCS_SK_PMKID_LEN 16
11043 /* recent discovery results */
11044 typedef struct wl_nan_disc_result_s
11046 wl_nan_instance_id_t instance_id
; /* instance id of pub/sub req */
11047 wl_nan_instance_id_t peer_instance_id
; /* peer instance id of pub/sub req/resp */
11048 uint8 svc_hash
[WL_NAN_SVC_HASH_LEN
]; /* service descp string */
11049 struct ether_addr peer_mac
; /* peer mac address */
11050 } wl_nan_disc_result_t
;
11052 /* list of recent discovery results */
11053 typedef struct wl_nan_disc_results_s
11055 wl_nan_disc_result_t disc_result
[WL_NAN_MAX_DISC_RESULTS
];
11056 } wl_nan_disc_results_list_t
;
11058 /* nan 1.0 events */
11059 /* To be deprecated - will be replaced by event_disc_result */
11060 typedef struct wl_nan_ev_disc_result
{
11061 wl_nan_instance_id_t pub_id
;
11062 wl_nan_instance_id_t sub_id
;
11063 struct ether_addr pub_mac
;
11065 } wl_nan_ev_disc_result_t
;
11067 typedef struct wl_nan_event_disc_result
{
11068 wl_nan_instance_id_t pub_id
;
11069 wl_nan_instance_id_t sub_id
;
11070 struct ether_addr pub_mac
;
11071 int8 publish_rssi
; /* publisher RSSI */
11073 uint16 attr_list_len
; /* length of the all the attributes in the SDF */
11074 uint8 attr_list
[0]; /* list of NAN attributes */
11075 } wl_nan_event_disc_result_t
;
11077 typedef struct wl_nan_ev_p2p_avail
{
11078 struct ether_addr sender
;
11079 struct ether_addr p2p_dev_addr
;
11084 chanspec_t chanspec
;
11086 } wl_nan_ev_p2p_avail_t
;
11089 * discovery interface event structures *
11092 /* mandatory parameters for OOB action frame */
11093 /* single-shot when bitmap and offset are set to 0; periodic otherwise */
11094 typedef struct wl_nan_oob_af_params_s
11096 /* bitmap for the 32 timeslots in 512TU dw interval */
11098 /* offset from start of dw, in us */
11100 struct ether_addr bssid
;
11101 struct ether_addr dest
;
11102 uint32 pkt_lifetime
;
11103 uint16 payload_len
;
11105 } wl_nan_oob_af_params_t
;
11109 /* Bit defines for global flags */
11110 #define WL_NAN_RANGING_ENABLE 1 /**< enable RTT */
11111 #define WL_NAN_RANGING_RANGED 2 /**< Report to host if ranged as target */
11112 typedef struct nan_ranging_config
{
11113 uint32 chanspec
; /**< Ranging chanspec */
11114 uint16 timeslot
; /**< NAN RTT start time slot 1-511 */
11115 uint16 duration
; /**< NAN RTT duration in ms */
11116 struct ether_addr allow_mac
; /**< peer initiated ranging: the allowed peer mac
11117 * address, a unicast (for one peer) or
11118 * a broadcast for all. Setting it to all zeros
11119 * means responding to none,same as not setting
11120 * the flag bit NAN_RANGING_RESPOND
11123 } wl_nan_ranging_config_t
;
11125 /** list of peers for self initiated ranging */
11126 /** Bit defines for per peer flags */
11127 #define WL_NAN_RANGING_REPORT (1<<0) /**< Enable reporting range to target */
11128 typedef struct nan_ranging_peer
{
11129 uint32 chanspec
; /**< desired chanspec for this peer */
11130 uint32 abitmap
; /**< available bitmap */
11131 struct ether_addr ea
; /**< peer MAC address */
11132 uint8 frmcnt
; /**< frame count */
11133 uint8 retrycnt
; /**< retry count */
11134 uint16 flags
; /**< per peer flags, report or not */
11136 } wl_nan_ranging_peer_t
;
11137 typedef struct nan_ranging_list
{
11138 uint8 count
; /**< number of MAC addresses */
11139 uint8 num_peers_done
; /**< host set to 0, when read, shows number of peers
11140 * completed, success or fail
11142 uint8 num_dws
; /**< time period to do the ranging, specified in dws */
11143 uint8 reserve
; /**< reserved field */
11144 wl_nan_ranging_peer_t rp
[1]; /**< variable length array of peers */
11145 } wl_nan_ranging_list_t
;
11147 /* ranging results, a list for self initiated ranging and one for peer initiated ranging */
11148 /* There will be one structure for each peer */
11149 #define WL_NAN_RANGING_STATUS_SUCCESS 1
11150 #define WL_NAN_RANGING_STATUS_FAIL 2
11151 #define WL_NAN_RANGING_STATUS_TIMEOUT 3
11152 #define WL_NAN_RANGING_STATUS_ABORT 4 /**< with partial results if sounding count > 0 */
11153 typedef struct nan_ranging_result
{
11154 uint8 status
; /**< 1: Success, 2: Fail 3: Timeout 4: Aborted */
11155 uint8 sounding_count
; /**< number of measurements completed (0 = failure) */
11156 struct ether_addr ea
; /**< initiator MAC address */
11157 uint32 chanspec
; /**< Chanspec where the ranging was done */
11158 uint32 timestamp
; /**< 32bits of the TSF timestamp ranging was completed at */
11159 uint32 distance
; /**< mean distance in meters expressed as Q4 number.
11160 * Only valid when sounding_count > 0. Examples:
11164 * set to 0xffffffff to indicate invalid number
11166 int32 rtt_var
; /**< standard deviation in 10th of ns of RTTs measured.
11167 * Only valid when sounding_count > 0
11169 struct ether_addr tgtea
; /**< target MAC address */
11171 } wl_nan_ranging_result_t
;
11172 typedef struct nan_ranging_event_data
{
11173 uint8 mode
; /**< 1: Result of host initiated ranging */
11174 /* 2: Result of peer initiated ranging */
11176 uint8 success_count
; /**< number of peers completed successfully */
11177 uint8 count
; /**< number of peers in the list */
11178 wl_nan_ranging_result_t rr
[1]; /**< variable array of ranging peers */
11179 } wl_nan_ranging_event_data_t
;
11182 WL_NAN_STATS_RSSI
= 1,
11183 WL_NAN_STATS_DATA
= 2,
11184 WL_NAN_STATS_DP
= 3,
11186 * ***** ADD before this line ****
11188 WL_NAN_STATS_INVALID
11190 typedef struct wl_nan_dp_stats
{
11191 uint32 tbd
; /* TBD */
11192 } wl_nan_dp_stats_t
;
11194 typedef struct wl_nan_stats
{
11196 uint32 cnt_dw
; /* DW slots */
11197 uint32 cnt_disc_bcn_sch
; /* disc beacon slots */
11198 uint32 cnt_amr_exp
; /* count of ambtt expiries resetting roles */
11199 uint32 cnt_bcn_upd
; /* count of beacon template updates */
11200 uint32 cnt_bcn_tx
; /* count of sync & disc bcn tx */
11201 uint32 cnt_bcn_rx
; /* count of sync & disc bcn rx */
11202 uint32 cnt_sync_bcn_tx
; /* count of sync bcn tx within DW */
11203 uint32 cnt_disc_bcn_tx
; /* count of disc bcn tx */
11204 uint32 cnt_sdftx_bcmc
; /* count of bcast/mcast sdf tx */
11205 uint32 cnt_sdftx_uc
; /* count of unicast sdf tx */
11206 uint32 cnt_sdftx_fail
; /* count of unicast sdf tx fails */
11207 uint32 cnt_sdf_rx
; /* count of sdf rx */
11209 uint32 cnt_am
; /* anchor master */
11210 uint32 cnt_master
; /* master */
11211 uint32 cnt_nms
; /* non master sync */
11212 uint32 cnt_nmns
; /* non master non sync */
11214 uint32 cnt_err_txtime
; /* txtime in sync bcn frame not a multiple of dw intv */
11215 uint32 cnt_err_unsch_tx
; /* tx while not in DW/ disc bcn slot */
11216 uint32 cnt_err_bcn_tx
; /* beacon tx error */
11217 uint32 cnt_sync_bcn_tx_miss
; /* no. of times time delta between 2 cosequetive
11218 * sync beacons is more than expected
11221 uint32 cnt_err_msch_reg
; /* error is Dw/disc reg with msch */
11222 uint32 cnt_err_wrong_ch_cb
; /* count of msch calbacks in wrong channel */
11223 uint32 cnt_dw_skip
; /* count of DW rejected */
11224 uint32 cnt_disc_skip
; /* count of disc bcn rejected */
11225 uint32 cnt_dw_start_early
; /* msch cb not at registered time */
11226 uint32 cnt_dw_start_late
; /* no. of delays in slot start */
11228 uint32 cnt_mrg_scan
; /* count of merge scans completed */
11229 uint32 cnt_err_ms_rej
; /* number of merge scan failed */
11230 uint32 cnt_scan_results
; /* no. of nan beacons scanned */
11231 uint32 cnt_join_scan_rej
; /* no. of join scans rejected */
11232 uint32 cnt_nan_scan_abort
; /* no. of join scans rejected */
11233 /* enable/disable */
11234 uint32 cnt_nan_enab
; /* no. of times nan feature got enabled */
11235 uint32 cnt_nan_disab
; /* no. of times nan feature got disabled */
11236 uint32 cnt_sync_bcn_rx
; /* count of sync bcn rx within DW */
11237 uint32 cnt_sync_bcn_rx_tu
[3]; /* Delta bw the tsf in bcn & remote */
11238 uint32 cnt_bcn_tx_out_dw
; /* TX sync beacon outside dw */
11239 uint32 cnt_role_am_dw
; /* anchor master role due to dw */
11240 uint32 cnt_am_hop_err
; /* wrong hopcount set for AM */
11243 #define WL_NAN_MAC_MAX_NAN_PEERS 6
11244 #define WL_NAN_MAC_MAX_RSSI_DATA_PER_PEER 10
11246 typedef struct wl_nan_nbr_rssi
{
11247 uint8 rx_chan
; /* channel number on which bcn rcvd */
11249 int32 rssi_raw
; /* received rssi value */
11250 int32 rssi_avg
; /* normalized rssi value */
11251 } wl_nan_peer_rssi_t
;
11253 typedef struct wl_nan_peer_rssi_entry
{
11254 struct ether_addr mac
; /* peer mac address */
11255 uint8 flags
; /* TODO:rssi data order: latest first, oldest first etc */
11256 uint8 rssi_cnt
; /* rssi data sample present */
11257 wl_nan_peer_rssi_t rssi
[WL_NAN_MAC_MAX_RSSI_DATA_PER_PEER
]; /* RSSI data frm peer */
11258 } wl_nan_peer_rssi_entry_t
;
11260 #define WL_NAN_PEER_RSSI 0x1
11261 #define WL_NAN_PEER_RSSI_LIST 0x2
11263 typedef struct wl_nan_nbr_rssi_data
{
11264 uint8 flags
; /* this is a list or single rssi data */
11265 uint8 peer_cnt
; /* number of peers */
11266 uint16 pad
; /* padding */
11267 wl_nan_peer_rssi_entry_t peers
[1]; /* peers data list */
11268 } wl_nan_peer_rssi_data_t
;
11270 /* WL_NAN_CMD_DBG_DUMP, GET Resp */
11271 typedef struct wl_nan_dbg_dump_rsp
{
11272 wl_nan_dbg_dump_type_t dump_type
; /* dump data type */
11275 wl_nan_peer_rssi_data_t peer_rssi
;
11276 wl_nan_stats_t nan_stats
;
11278 } wl_nan_dbg_dump_rsp_t
;
11280 enum nan_termination_status
{
11281 NAN_TERM_REASON_INVALID
= 1,
11282 NAN_TERM_REASON_TIMEOUT
= 2,
11283 NAN_TERM_REASON_USER_REQ
= 3,
11284 NAN_TERM_REASON_FAILURE
= 4,
11285 NAN_TERM_REASON_COUNT_REACHED
= 5,
11286 NAN_TERM_REASON_DE_SHUTDOWN
= 6,
11287 NAN_TERM_REASON_DISABLE_IN_PROGRESS
= 7
11290 /* nan2 data iovar */
11292 typedef struct wl_nan_dp_qos
11298 uint16 svc_interval
;
11301 #define WL_NAN_NDL_QOS_MAX_LAT_NO_PREF 0xFFFF
11304 typedef struct wl_nan_ndl_qos
11306 uint8 min_slots
; /* min slots per dw interval */
11308 uint16 max_latency
; /* max latency */
11309 } wl_nan_ndl_qos_t
;
11312 typedef struct wl_nan_ndp_config
11316 struct ether_addr pub_addr
;
11317 struct ether_addr data_addr
; /* configure local data addr */
11318 struct ether_addr init_data_addr
; /* initiator data addr */
11319 uint8 svc_spec_info
[WL_NAN_DATA_SVC_SPEC_INFO_LEN
];
11320 wl_nan_dp_qos_t qos
;
11324 } wl_nan_ndp_config_t
;
11326 /* nan2 device capabilities */
11327 typedef struct wl_nan_ndp_oper_cfg
{
11330 uint8 bands_supported
;
11332 } wl_nan_ndp_oper_cfg_t
;
11334 typedef uint8 wl_nan_ndp_ndpid_t
;
11335 typedef uint8 wl_nan_ndp_conn_t
;
11337 #define WL_NAN_INVALID_NDPID 0 /* reserved ndp id */
11339 typedef struct wl_nan_dp_req
{
11340 uint8 type
; /* 0- unicast 1 - multicast */
11341 uint8 pub_id
; /* Publisher ID */
11343 struct ether_addr peer_mac
; /* Peer's NMI addr */
11344 struct ether_addr mcast_mac
; /* Multicast addr */
11345 struct ether_addr ndi
;
11346 wl_nan_dp_qos_t qos
;
11347 wl_nan_ndl_qos_t ndl_qos
; /* ndl qos */
11348 uint8 tlv_params
[]; /* xtlv parameters for command */
11351 /* TODO Need to replace ndp_id with lndp_id */
11352 /* Return structure to data req IOVAR */
11353 typedef struct wl_nan_dp_req_ret
{
11354 struct ether_addr indi
; /* Initiators data mac addr */
11355 uint8 ndp_id
; /* Initiators ndpid */
11357 } wl_nan_dp_req_ret_t
;
11359 typedef struct wl_nan_dp_resp
{
11360 uint8 type
; /* 0- unicast 1 - multicast */
11361 uint8 status
; /* Accepted or Rejected */
11363 /* Local NDP ID for unicast, mc_id for multicast, 0 for implicit NMSG */
11364 uint8 ndp_id
; /* can be host indp id also */
11365 wl_nan_dp_qos_t qos
;
11366 /* Initiator data address for unicast or multicast address for multicast */
11367 struct ether_addr mac_addr
;
11368 struct ether_addr ndi
;
11370 wl_nan_ndl_qos_t ndl_qos
; /* ndl qos */
11371 uint8 tlv_params
[]; /* xtlv parameters for command */
11372 } wl_nan_dp_resp_t
;
11374 /* Return structure to data resp IOVAR */
11375 typedef struct wl_nan_dp_resp_ret
{
11376 uint8 nmsgid
; /* NMSG ID or for multicast else 0 */
11378 } wl_nan_dp_resp_ret_t
;
11380 typedef struct wl_nan_dp_conf
{
11381 uint8 lndp_id
; /* can be host ndp id */
11382 uint8 status
; /* Accepted or Rejected */
11384 } wl_nan_dp_conf_t
;
11386 typedef struct wl_nan_dp_end
11388 uint8 lndp_id
; /* can be host ndp id */
11390 struct ether_addr mac_addr
; /* initiator's ndi */
11393 typedef struct wl_nan_dp_schedupd
{
11394 uint8 type
; /* 0: unicast, 1: multicast */
11396 struct ether_addr addr
; /* peer NMI or multicast addr */
11397 wl_nan_dp_qos_t qos
;
11398 wl_nan_ndl_qos_t ndl_qos
; /* ndl qos */
11402 } wl_nan_dp_schedupd_t
;
11404 /* set: update with notification, unset: NDL setup handshake */
11405 #define WL_NAN_DP_SCHEDUPD_NOTIF (1 << 0)
11408 typedef struct wl_nan_ndp_id_list
{
11411 } wl_nan_ndp_id_list_t
;
11414 typedef struct ndp_session
{
11421 typedef struct wl_nan_ndp_status
{
11422 struct ether_addr peer_nmi
;
11423 struct ether_addr peer_ndi
;
11424 ndp_session_t session
;
11425 struct ether_addr lndi
;
11427 } wl_nan_ndp_status_t
;
11429 #define NAN_DP_OPAQUE_INFO_DP_RESP 0x01
11430 #define NAN_DP_OPAQUE_INFO_DP_CONF 0x02
11432 typedef struct wl_nan_dp_opaque_info
{
11433 uint8 frm_mask
; /* dp_resp / dp_conf as defined above. */
11434 struct ether_addr initiator_ndi
; /* NDI to match in the dp_req. */
11435 uint8 pub_id
; /* publish id where the opaque data is included. */
11436 uint8 len
; /* len of opaque_info[]. */
11438 uint8 opaque_info
[0];
11439 } wl_nan_dp_opaque_info_t
;
11442 #define NAN_DP_SESSION_UNICAST 0
11443 #define NAN_DP_SESSION_MULTICAST 1
11444 #define NAN_DP_SECURITY_NONE 0
11445 #define NAN_DP_SECURITY_CSID 1
11446 #define NAN_DP_SECURITY_MK 2
11447 #define WL_NAN_DATA_NMSGID_LEN 8 /* 8 bytes as per nan spec */
11449 /* Common event structure for Nan Datapath
11450 * Used for sending NDP Indication, Response, Confirmation, Securty Install and Establish events
11452 typedef struct wl_nan_ev_datapath_cmn
{
11454 /* ndp_id is valid only if type is unicast */
11458 /* Following two fields are valid only if type is unicast */
11459 struct ether_addr initiator_ndi
;
11460 struct ether_addr responder_ndi
;
11461 struct ether_addr peer_nmi
;
11464 /* Following two fields are valid only if type is multicast */
11465 uint8 nmsg_id
[WL_NAN_DATA_NMSGID_LEN
];
11468 uint16 opt_tlv_len
;
11470 } wl_nan_ev_datapath_cmn_t
;
11472 /* this is obsolete - DON'T USE */
11473 typedef struct wl_nan_ev_datapath_end
{
11477 struct ether_addr peer_nmi
;
11478 struct ether_addr peer_ndi
;
11479 } wl_nan_ev_datapath_end_t
;
11481 typedef struct wl_tsf
{
11486 typedef struct wl_nan_ev_rx_bcn
{
11491 } wl_nan_ev_rx_bcn_t
;
11493 /* reason of host assist request */
11494 enum wl_nan_host_assist_reason
{
11495 WL_NAN_HAST_REASON_NONE
= 0,
11497 /* reason for host assist request */
11498 WL_NAN_HAST_REASON_NO_CRB
= 1, /* NDL: no common NA */
11499 WL_NAN_HAST_REASON_NDC
= 2, /* NDL: NDC not compliant */
11500 WL_NAN_HAST_REASON_IMMUT
= 3, /* NDL: peer immutable schedule */
11501 WL_NAN_HAST_REASON_RNG
= 4, /* NDL: ranging schedule */
11502 WL_NAN_HAST_REASON_QOS
= 5, /* NDL: QoS not satisfied */
11503 WL_NAN_HAST_REASON_SVC_NDI_MISSING
= 6 /* SD: NDI associated with svc is missing */
11505 typedef uint8 wl_nan_host_assist_reason_t
;
11507 /* WL_NAN_XTLV_HOST_ASSIST_REQ */
11508 typedef struct wl_nan_host_assist_req
{
11509 struct ether_addr peer_nmi
; /* peer nmi */
11510 struct ether_addr initiator_ndi
; /* initiator ndi */
11511 uint8 indp_id
; /* initiator NDP ID */
11512 wl_nan_frame_type_t frm_type
; /* received NAF type */
11513 wl_nan_host_assist_reason_t reason
; /* reason of host assist request */
11514 uint8 pub_id
; /* Publish ID (valid for WL_NAN_FRM_TYPE_DP_REQ) */
11516 } wl_nan_host_assist_req_t
;
11518 /* nan sub-features */
11519 enum wl_nan_fw_cap_flag1
{
11520 WL_NAN_FW_CAP_FLAG_NONE
= 0x00000000, /* dummy */
11521 WL_NAN_FW_CAP_FLAG1_AVAIL
= 0x00000001,
11522 WL_NAN_FW_CAP_FLAG1_DISC
= 0x00000002,
11523 WL_NAN_FW_CAP_FLAG1_DATA
= 0x00000004,
11524 WL_NAN_FW_CAP_FLAG1_SEC
= 0x00000008,
11525 WL_NAN_FW_CAP_FLAG1_RANGE
= 0x00000010,
11526 WL_NAN_FW_CAP_FLAG1_WFA_TB
= 0x00000020,
11527 WL_NAN_FW_CAP_FLAG1_DAM
= 0x00000040,
11528 WL_NAN_FW_CAP_FLAG1_DAM_STRICT
= 0x00000080,
11529 WL_NAN_FW_CAP_FLAG1_DAM_AUTO
= 0x00000100,
11530 WL_NAN_FW_CAP_FLAG1_DBG
= 0x00000200,
11531 WL_NAN_FW_CAP_FLAG1_BCMC_IN_NDC
= 0x00000400,
11532 WL_NAN_FW_CAP_FLAG1_CHSTATS
= 0x00000800,
11533 WL_NAN_FW_CAP_FLAG1_ASSOC_COEX
= 0x00001000,
11534 WL_NAN_FW_CAP_FLAG1_FASTDISC
= 0x00002000,
11535 WL_NAN_FW_CAP_FLAG1_NO_ID_GEN
= 0x00004000,
11536 WL_NAN_FW_CAP_FLAG1_DP_OPAQUE_DATA
= 0x00008000,
11537 WL_NAN_FW_CAP_FLAG1_NSR2
= 0x00010000,
11538 WL_NAN_FW_CAP_FLAG1_NSR2_SAVE
= 0x00020000,
11539 WL_NAN_FW_CAP_FLAG1_NANHO
= 0x00040000
11542 /* WL_NAN_XTLV_GEN_FW_CAP */
11543 typedef struct wl_nan_fw_cap
{
11544 uint32 flags1
; /* nan sub-features compiled in firmware */
11545 uint32 flags2
; /* for more sub-features in future */
11546 uint8 max_svc_publishes
; /* max num of service publish */
11547 uint8 max_svc_subscribes
; /* max num of service subscribe */
11548 uint8 max_lcl_sched_maps
; /* max num of local schedule map */
11549 uint8 max_lcl_ndc_entries
; /* max num of local NDC entry */
11550 uint8 max_lcl_ndi_interfaces
; /* max num of local NDI interface */
11551 uint8 max_peer_entries
; /* max num of peer entry */
11552 uint8 max_ndp_sessions
; /* max num of NDP session */
11556 /* NAN Save Restore */
11557 #define WL_NAN_NSR2_INFO_MAX_SIZE 2048 /* arbitrary */
11559 /* WL_NAN_XTLV_NSR2_PEER */
11560 typedef struct wl_nan_nsr_peer_info
{
11561 struct ether_addr nmi
;
11562 uint8 l_min_slots
; /* local QoS min slots */
11563 uint8 p_min_slots
; /* peer QoS min slots */
11564 uint16 l_max_latency
; /* local QoS max latency */
11565 uint16 p_max_latency
; /* peer QoS max latency */
11566 uint8 num_map
; /* num of NA map */
11568 uint16 attrs_len
; /* total len of following attrs */
11569 uint8 attrs
[]; /* peer attributes (NA/NDC/ULW/DevCap/Element container) */
11570 } wl_nan_nsr_peer_info_t
;
11572 enum wl_nan_nsr_ndp_flag
{
11573 WL_NAN_NSR_NDP_FLAG_LCL_INITATOR
= 0x0001,
11574 WL_NAN_NSR_NDP_FLAG_MCAST
= 0x0002
11576 typedef uint16 wl_nan_nsr_ndp_flag_t
;
11578 /* WL_NAN_XTLV_NSR2_NDP */
11579 typedef struct wl_nan_nsr_ndp_info
{
11580 struct ether_addr peer_nmi
;
11581 struct ether_addr peer_ndi
;
11582 struct ether_addr lcl_ndi
;
11583 uint16 flags
; /* wl_nan_nsr_ndp_flag_t */
11584 uint8 pub_id
; /* publish id */
11585 uint8 indp_id
; /* initiator's ndp id */
11586 uint8 last_token
; /* last NDP dialog token */
11588 } wl_nan_nsr_ndp_info_t
;
11590 /* NAN2.0 Ranging definitions */
11592 /* result indication bit map */
11593 #define NAN_RANGE_INDICATION_CONT (1<<0)
11594 #define NAN_RANGE_INDICATION_INGRESS (1<<1)
11595 #define NAN_RANGE_INDICATION_EGRESS (1<<2)
11597 /* responder flags */
11598 #define NAN_RANGE_FLAG_AUTO_ACCEPT (1 << 0)
11599 #define NAN_RANGE_FLAG_RESULT_REQUIRED (1 << 1)
11601 typedef struct wl_nan_range_req
{
11602 struct ether_addr peer
;
11603 uint8 publisher_id
;
11604 uint8 indication
; /* bit map for result event */
11605 uint32 resolution
; /* default millimeters */
11606 uint32 ingress
; /* ingress limit in mm */
11607 uint32 egress
; /* egress limit in mm */
11608 uint32 interval
; /* max interval(in TU) b/w two ranging measurements */
11609 } wl_nan_range_req_t
;
11611 #define NAN_RNG_REQ_IOV_LEN 24
11613 typedef uint8 wl_nan_range_id
;
11615 typedef struct wl_nan_range_resp
{
11616 wl_nan_range_id range_id
;
11617 uint8 flags
; /* auto response, range result required */
11618 uint8 status
; /* accept, reject */
11619 uint8 indication
; /* bit map for result event */
11620 uint32 resolution
; /* default millimeters */
11621 uint32 ingress
; /* ingress limit in mm */
11622 uint32 egress
; /* egress limit in mm */
11623 uint32 interval
; /* max interval(in TU) b/w two ranging measurements */
11624 } wl_nan_range_resp_t
;
11626 #define NAN_RNG_RESP_IOV_LEN 20
11628 #define NAN_RNG_MAX_IOV_LEN 255
11630 typedef struct wl_nan_ev_rng_req_ind
{
11631 struct ether_addr peer_m_addr
;
11633 /* ftm parameters */
11634 uint8 max_burst_dur
;
11635 uint8 min_ftm_delta
;
11637 uint8 ftm_format_bw
;
11638 /* location info availability bit map */
11639 uint8 lc_info_avail
;
11640 /* Last movement indication */
11641 uint16 last_movement
;
11643 } wl_nan_ev_rng_req_ind_t
;
11645 #define NAN_RNG_REQ_IND_SIZE 14
11647 typedef struct wl_nan_ev_rng_rpt_ind
{
11648 uint32 dist_mm
; /* in millimeter */
11649 struct ether_addr peer_m_addr
;
11650 uint8 indication
; /* indication definitions mentioned above */
11652 } wl_nan_ev_rng_rpt_ind_t
;
11654 #define NAN_RNG_RPT_IND_SIZE 12
11656 typedef struct wl_nan_ev_rng_term_ind
{
11657 struct ether_addr peer_m_addr
;
11660 } wl_nan_ev_rng_term_ind_t
;
11662 #define NAN_RNG_TERM_IND_SIZE 8
11664 typedef struct wl_nan_ev_rng_resp
{
11665 struct ether_addr peer_m_addr
;
11668 } wl_nan_ev_rng_resp_t
;
11670 /* Used by NDL schedule events -
11671 * WL_NAN_EVENT_PEER_SCHED_UPD_NOTIF, WL_NAN_EVENT_PEER_SCHED_REQ
11672 * WL_NAN_EVENT_PEER_SCHED_RESP, WL_NAN_EVENT_PEER_SCHED_CONF
11674 typedef struct wl_nan_ev_sched_info
{
11675 struct ether_addr peer_nmi
;
11676 uint8 ndl_status
; /* applies only to sched resp/conf */
11678 uint16 opt_tlv_len
;
11680 } wl_nan_ev_sched_info_t
;
11682 /* WL_NAN_EVENT_CHAN_BOUNDARY */
11683 typedef struct wl_nan_chbound_info
{
11684 uint32 cluster_tsf_h
; /* Current Cluster TSF High */
11685 uint32 cluster_tsf_l
; /* Current Cluster TSF Low */
11687 uint16 opt_tlvs_len
;
11689 } wl_nan_chbound_info_t
;
11691 /* channel stats (includes nan & non-nan) */
11693 /* WL_NAN_XTLV_CCA_STATS */
11694 typedef struct wl_nan_cca_stats
{
11699 uint32 congest_ibss
;
11700 uint32 congest_obss
;
11701 uint32 interference
;
11702 } wl_nan_cca_stats_t
;
11704 /* WL_NAN_XTLV_PER_STATS */
11705 typedef struct wl_nan_per_stats_s
{
11710 uint32 txframe
; /* tx data frames */
11711 uint32 txretrans
; /* tx mac retransmits */
11712 uint32 txerror
; /* tx data errors */
11713 uint32 txctl
; /* tx management frames */
11714 uint32 txserr
; /* tx status errors */
11716 uint32 rxframe
; /* rx data frames */
11717 uint32 rxerror
; /* rx data errors */
11718 uint32 rxctl
; /* rx management frames */
11720 uint32 txbar
; /* tx bar */
11721 uint32 rxbar
; /* rx bar */
11722 uint32 txaction
; /* tx action frame */
11723 uint32 rxaction
; /* rx action frame */
11724 uint32 txlost
; /* lost packets reported in txs */
11725 uint32 rxback
; /* rx block ack */
11726 uint32 txback
; /* tx bloak ack */
11727 } wl_nan_per_stats_t
;
11729 /* fast discovery beacon config
11730 * WL_NAN_XTLV_CFG_FDISC_TBMP
11732 typedef struct wl_nan_fastdisc_s
{
11737 } wl_nan_fastdisc_t
;
11739 #define WL_NAN_FASTDISC_CFG_SIZE 1024 /* arbitrary */
11742 /* ****************** NAN Host offload specific strucures ****************** */
11744 enum wl_nan_rx_mgmt_frm_type
{
11745 WL_NAN_RX_MGMT_FRM_BCN
= 0,
11746 WL_NAN_RX_MGMT_FRM_SDF
= 1,
11747 WL_NAN_RX_MGMT_FRM_NAF
= 2
11749 typedef uint8 wl_nan_rx_mgmt_frm_type_t
;
11751 /* WL_NAN_EVENT_RX_MGMT_FRM */
11752 typedef struct wl_nan_event_rx_mgmt_frm
{
11753 uint8 frm_type
; /* wl_nan_rx_mgmt_frm_type_t */
11757 } wl_nan_event_rx_mgmt_frm_t
;
11759 #define WL_NAN_NANHO_UPDATE_MAX_SIZE 2048 /* arbitrary */
11761 enum wl_nan_peer_entry_action
{
11762 WL_NAN_PEER_ENTRY_ACT_ADD
= 0, /* add peer entry */
11763 WL_NAN_PEER_ENTRY_ACT_REMOVE
= 1 /* remove peer entry */
11765 typedef uint8 wl_nan_peer_entry_action_t
;
11767 /* WL_NAN_XTLV_NANHO_PEER_ENTRY */
11768 typedef struct wl_nan_peer_entry
11770 struct ether_addr nmi
; /* nmi of peer device */
11771 uint8 action
; /* wl_nan_peer_entry_action_t */
11773 } wl_nan_peer_entry_t
;
11775 enum wl_nan_dcaplist_action
{
11776 WL_NAN_DCAPLIST_ACT_UPDATE
= 0, /* update or add */
11777 WL_NAN_DCAPLIST_ACT_REMOVE
= 1 /* remove (only for peer dcap cache entry) */
11779 typedef uint8 wl_nan_dcaplist_action_t
;
11781 /* WL_NAN_XTLV_NANHO_DCAPLIST */
11782 typedef struct wl_nan_dev_cap_list
11784 struct ether_addr nmi
; /* null for local device */
11785 uint8 action
; /* wl_nan_dcaplist_action_t */
11786 /* optional fields for WL_NAN_DCAPLIST_ACT_UPDATE */
11788 uint8 dcap
[]; /* list of nan_dev_cap_t */
11789 } wl_nan_dev_cap_list_t
;
11791 typedef struct wl_nan_dev_chan_sched
{
11792 uint16 num_slots
; /* number of slot in schedule */
11793 uint16 period
; /* period of channel schedule (TU) */
11794 uint8 slot_dur
; /* slot duration (TU) */
11795 uint8 map_id
; /* map id (TBD) */
11798 /* chanspec_t chan_sched[num_slot] */
11799 /* uint8 slot_info[num_slot] */
11800 } wl_nan_dev_chan_sched_t
;
11802 /* WL_NAN_XTLV_NANHO_DCSLIST */
11803 typedef struct wl_nan_dev_chan_sched_list
{
11804 struct ether_addr nmi
; /* null for local device */
11807 wl_nan_dev_chan_sched_t dcs
[];
11808 } wl_nan_dev_chan_sched_list_t
;
11810 /* WL_NAN_XTLV_NANHO_BLOB */
11811 typedef struct wl_nan_dev_blob
{
11812 struct ether_addr nmi
; /* null for local device */
11813 uint16 blob_len
; /* blob len in blob[] buffer */
11817 } wl_nan_dev_blob_t
;
11819 typedef struct wl_nan_peer_ndl_state
{
11820 struct ether_addr nmi
;
11821 uint8 ndl_state
; /* nan_peer_ndl_state_t */
11823 } wl_nan_peer_ndl_state_t
;
11825 enum wl_nan_ndp_state_action
{
11826 WL_NAN_NDP_STATE_ACT_ESTABLISHED
= 0,
11827 WL_NAN_NDP_STATE_ACT_TERMINATED
= 1
11829 typedef uint8 wl_nan_ndp_state_action_t
;
11831 /* WL_NAN_XTLV_NANHO_NDP_STATE */
11832 typedef struct wl_nan_ndp_state
{
11833 struct ether_addr peer_nmi
;
11834 struct ether_addr peer_ndi
;
11835 struct ether_addr lcl_ndi
;
11836 uint8 action
; /* wl_nan_ndp_state_action_t */
11838 /* TODO: secured NDP information */
11839 } wl_nan_ndp_state_t
;
11841 /* *************** end of NAN Host offload specific strucures ************** */
11842 #endif /* WL_NANHO */
11844 /* ********************* end of NAN section ******************************** */
11847 #define P2P_NAN_IOC_BUFSZ 512 /* some sufficient ioc buff size */
11848 #define WL_P2P_NAN_IOCTL_VERSION 0x1
11850 /* container for p2p nan iovtls & events */
11851 typedef struct wl_p2p_nan_ioc
{
11852 uint16 version
; /* interface command or event version */
11853 uint16 id
; /* p2p nan ioctl cmd ID */
11854 uint16 len
; /* total length of data[] */
11855 uint16 pad
; /* padding */
11856 uint8 data
[]; /* var len payload of bcm_xtlv_t type */
11857 } wl_p2p_nan_ioc_t
;
11859 /* p2p nan cmd IDs */
11860 enum wl_p2p_nan_cmds
{
11861 /* p2p nan cfg ioctls */
11862 WL_P2P_NAN_CMD_ENABLE
= 1,
11863 WL_P2P_NAN_CMD_CONFIG
= 2,
11864 WL_P2P_NAN_CMD_DEL_CONFIG
= 3,
11865 WL_P2P_NAN_CMD_GET_INSTS
= 4
11868 #define WL_P2P_NAN_CONFIG_VERSION 1
11870 #define WL_P2P_NAN_DEVICE_P2P 0x0
11871 #define WL_P2P_NAN_DEVICE_GO 0x1
11872 #define WL_P2P_NAN_DEVICE_GC 0x2
11873 #define WL_P2P_NAN_DEVICE_INVAL 0xFF
11875 /* NAN P2P operation */
11876 typedef struct p2p_nan_config
{
11877 uint16 version
; /* wl_p2p_nan_config_t structure version */
11878 uint16 len
; /* total length including version and variable IE */
11879 uint32 flags
; /* 0x1 to NEW, 0x2 to ADD, 0x4 to DEL */
11880 uint8 inst_id
; /* publisher/subscriber id */
11881 uint8 inst_type
; /* publisher/subscriber */
11882 uint8 dev_role
; /* P2P device role: 'P2P','GO' or 'GC' */
11883 uint8 pad1
; /* padding */
11884 uint8 resolution
; /* Availability bitmap resolution */
11885 uint8 repeat
; /* Whether Availabilty repeat across DW */
11886 uint16 ie_len
; /* variable ie len */
11887 struct ether_addr dev_mac
; /* P2P device addres */
11888 uint16 pad2
; /* Padding */
11889 uint32 avail_bmap
; /* availability interval bitmap */
11890 uint32 chanspec
; /* Chanspec */
11891 uint8 ie
[]; /* hex ie data */
11892 } wl_p2p_nan_config_t
;
11894 #define WL_P2P_NAN_SERVICE_LIST_VERSION 1
11895 typedef enum wl_nan_service_type
{
11896 WL_NAN_SVC_INST_PUBLISHER
= 1,
11897 WL_NAN_SVC_INST_SUBSCRIBER
= 2
11898 } wl_nan_service_type_t
;
11900 #define WL_P2P_NAN_CONFIG_NEW 0x1
11901 #define WL_P2P_NAN_CONFIG_ADD 0x2
11902 #define WL_P2P_NAN_CONFIG_DEL 0x4
11904 typedef struct wl_nan_svc_inst
{
11905 uint8 inst_id
; /* publisher/subscriber id */
11906 uint8 inst_type
; /* publisher/subscriber */
11907 } wl_nan_svc_inst_t
;
11909 typedef struct wl_nan_svc_inst_list
{
11910 uint16 version
; /* this structure version */
11911 uint16 len
; /* total length including version and variable svc list */
11912 uint16 count
; /* service instance count */
11913 uint16 pad
; /* padding */
11914 wl_nan_svc_inst_t svc
[1]; /* service instance list */
11915 } wl_nan_svc_inst_list_t
;
11917 #define NAN_POST_DISC_P2P_DATA_VER 1
11918 /* This structure will be used send peer p2p data with
11919 * NAN discovery result
11921 typedef struct nan_post_disc_p2p_data
{
11922 uint8 ver
; /* this structure version */
11923 uint8 dev_role
; /* P2P Device role */
11924 uint8 resolution
; /* Availability bitmap resolution */
11925 uint8 repeat
; /* Whether Availabilty repeat across DW */
11926 struct ether_addr dev_mac
; /* P2P device addres */
11927 uint16 pad1
; /* Padding */
11928 uint32 chanspec
; /* Chanspec */
11929 uint32 avl_bmp
; /* availability interval bitmap */
11930 } nan_post_disc_p2p_data_t
;
11933 WL_AVAIL_NONE
= 0x0000,
11934 WL_AVAIL_LOCAL
= 0x0001,
11935 WL_AVAIL_PEER
= 0x0002,
11936 WL_AVAIL_NDC
= 0x0003,
11937 WL_AVAIL_IMMUTABLE
= 0x0004,
11938 WL_AVAIL_RESPONSE
= 0x0005,
11939 WL_AVAIL_COUNTER
= 0x0006,
11940 WL_AVAIL_RANGING
= 0x0007,
11941 WL_AVAIL_UPD_POT
= 0x0008, /* modify potential, keep committed/conditional */
11942 WL_AVAIL_UPD_COM_COND
= 0x0009, /* modify committed/conditional, keep potential */
11943 WL_AVAIL_REMOVE_MAP
= 0x000A, /* remove map */
11944 WL_AVAIL_FRM_TYPE
= 0x000B, /* specify frame types containing NA */
11945 WL_AVAIL_TYPE_MAX
= WL_AVAIL_FRM_TYPE
/* New ones before and update */
11947 #define WL_AVAIL_TYPE_MASK 0x000F
11948 #define WL_AVAIL_FLAG_REMOVE 0x2000 /* remove schedule attr of given type & map id */
11949 #define WL_AVAIL_FLAG_SELECTED_NDC 0x4000
11950 #define WL_AVAIL_FLAG_RAW_MODE 0x8000
11951 #define WL_AVAIL_FLAGS_MASK 0xFF00
11952 #define WL_AVAIL_FLAGS_SHIFT 8
11954 typedef int16 wl_avail_flags_t
;
11956 /* availability entry flags */
11958 WL_AVAIL_ENTRY_NONE
= 0x0000,
11959 WL_AVAIL_ENTRY_COM
= 0x0001, /* committed */
11960 WL_AVAIL_ENTRY_POT
= 0x0002, /* potential */
11961 WL_AVAIL_ENTRY_COND
= 0x0004, /* conditional */
11962 WL_AVAIL_ENTRY_PAGED
= 0x0008, /* P-NDL */
11963 WL_AVAIL_ENTRY_USAGE
= 0x0030, /* usage preference */
11964 WL_AVAIL_ENTRY_BIT_DUR
= 0x00C0, /* bit duration */
11965 WL_AVAIL_ENTRY_BAND_PRESENT
= 0x0100, /* band present */
11966 WL_AVAIL_ENTRY_CHAN_PRESENT
= 0x0200, /* channel information present */
11967 WL_AVAIL_ENTRY_CHAN_ENTRY_PRESENT
= 0x0400, /* channel entry (opclass+bitmap) */
11968 /* free to use 0x0800 */
11969 WL_AVAIL_ENTRY_RXNSS
= 0xF000 /* max num of spatial stream RX */
11974 WL_AVAIL_BIT_DUR_16
= 0, /* 16TU */
11975 WL_AVAIL_BIT_DUR_32
= 1, /* 32TU */
11976 WL_AVAIL_BIT_DUR_64
= 2, /* 64TU */
11977 WL_AVAIL_BIT_DUR_128
= 3, /* 128TU */
11982 WL_AVAIL_PERIOD_0
= 0, /* 0TU */
11983 WL_AVAIL_PERIOD_128
= 1, /* 128TU */
11984 WL_AVAIL_PERIOD_256
= 2, /* 256TU */
11985 WL_AVAIL_PERIOD_512
= 3, /* 512TU */
11986 WL_AVAIL_PERIOD_1024
= 4, /* 1024TU */
11987 WL_AVAIL_PERIOD_2048
= 5, /* 2048TU */
11988 WL_AVAIL_PERIOD_4096
= 6, /* 4096TU */
11989 WL_AVAIL_PERIOD_8192
= 7, /* 8192TU */
11994 WL_AVAIL_BAND_NONE
= 0, /* reserved */
11995 WL_AVAIL_BAND_SUB1G
= 1, /* sub-1 GHz */
11996 WL_AVAIL_BAND_2G
= 2, /* 2.4 GHz */
11997 WL_AVAIL_BAND_3G
= 3, /* reserved (for 3.6 GHz) */
11998 WL_AVAIL_BAND_5G
= 4, /* 4.9 and 5 GHz */
11999 WL_AVAIL_BAND_60G
= 5, /* reserved (for 60 GHz) */
12002 #define WL_AVAIL_ENTRY_TYPE_MASK 0x000F
12003 #define WL_AVAIL_ENTRY_USAGE_MASK 0x0030 /* up to 4 usage preferences */
12004 #define WL_AVAIL_ENTRY_USAGE_SHIFT 4
12005 #define WL_AVAIL_ENTRY_USAGE_VAL(_flags) (((_flags) & WL_AVAIL_ENTRY_USAGE_MASK) \
12006 >> WL_AVAIL_ENTRY_USAGE_SHIFT)
12008 #define WL_AVAIL_ENTRY_BIT_DUR_MASK 0x00C0 /* 0:16TU, 1:32TU, 2:64TU, 3:128TU */
12009 #define WL_AVAIL_ENTRY_BIT_DUR_SHIFT 6
12010 #define WL_AVAIL_ENTRY_BIT_DUR_VAL(_flags) (((_flags) & WL_AVAIL_ENTRY_BIT_DUR_MASK) \
12011 >> WL_AVAIL_ENTRY_BIT_DUR_SHIFT)
12013 #define WL_AVAIL_ENTRY_BAND_MASK 0x0100 /* 0=band not present, 1=present */
12014 #define WL_AVAIL_ENTRY_BAND_SHIFT 8
12016 #define WL_AVAIL_ENTRY_CHAN_MASK 0x0200 /* 0=channel info not present, 1=present */
12017 #define WL_AVAIL_ENTRY_CHAN_SHIFT 9
12019 #define WL_AVAIL_ENTRY_CHAN_ENTRY_MASK 0x0400 /* 0=chanspec, 1=hex channel entry */
12020 #define WL_AVAIL_ENTRY_CHAN_ENTRY_SHIFT 10
12022 #define WL_AVAIL_ENTRY_RXNSS_MASK 0xF000
12023 #define WL_AVAIL_ENTRY_RXNSS_SHIFT 12
12024 #define WL_AVAIL_ENTRY_RXNSS_VAL(_flags) (((_flags) & WL_AVAIL_ENTRY_RXNSS_MASK) \
12025 >> WL_AVAIL_ENTRY_RXNSS_SHIFT)
12026 #define WL_AVAIL_ENTRY_RXNSS_MAX 15 /* 0-15 */
12028 /* mask for channel_entry (to be obsoleted) */
12029 #define WL_AVAIL_ENTRY_OPCLASS_MASK 0xFF
12030 #define WL_AVAIL_ENTRY_CHAN_BITMAP_MASK 0xFF00
12031 #define WL_AVAIL_ENTRY_CHAN_BITMAP_SHIFT 8
12032 #define WL_AVAIL_ENTRY_CHAN_BITMAP_VAL(_info) (((_info) & WL_AVAIL_ENTRY_CHAN_BITMAP_MASK) \
12033 >> WL_AVAIL_ENTRY_CHAN_BITMAP_SHIFT)
12035 /* Used for raw channel entry field input */
12036 #define MAX_CHAN_ENTRY_LEN 6
12038 typedef struct wl_avail_entry
{
12039 uint16 length
; /* total length */
12040 uint16 start_offset
; /* in TUs, multiply by 16 for total offset */
12042 uint32 channel_info
; /* either chanspec or hex channel entry (opclass +
12043 * bitmap per NAN spec), as indicated by setting
12044 * WL_AVAIL_ENTRY_HEX_CHAN_ENTRY flag
12046 uint32 band
; /* defined by WL_BAND enum, 2=2.4GHz, 4=5GHz */
12047 uint8 channel_entry
[MAX_CHAN_ENTRY_LEN
];
12048 uint8 align
[8]; /* aligned len of union in structure (not for use)
12049 * if member of union is changed,
12050 * update length of align[] accordingly.
12052 } u
; /* band or channel value, 0=all band/channels */
12053 uint8 sched_map_id
; /* avail map id associated with sched entry */
12055 uint8 period
; /* in TUs, defined by WL_AVAIL_PERIOD enum
12056 * 1:128, 2:256, 3:512, 4:1024, 5:2048, 6:4096,
12060 uint16 flags
; /* defined by avail entry flags enum:
12061 * type, usage pref, bit duration, rx nss,
12062 * and band, channel or channel entry
12064 uint8 bitmap
[]; /* time bitmap */
12065 } wl_avail_entry_t
;
12067 #define WL_AVAIL_VERSION 1 /* current wl_avail version */
12069 typedef struct wl_avail
{
12070 uint16 length
; /* total length */
12071 uint16 flags
; /* LSB - avail type (defined by WL_AVAIL enum)
12072 * MSB - avail flags
12074 uint8 id
; /* id used for multiple maps/avail */
12075 uint8 lndc_id
; /* ndc id used in multi-ndc case */
12078 struct ether_addr addr
; /* peer mac address or ndc id */
12081 /* add additional fields above this line */
12085 #define WL_AVAIL_MIN_LEN(n) ((n) ? OFFSETOF(wl_avail_t, entry) + \
12086 ((n) * OFFSETOF(wl_avail_entry_t, bitmap)) : 0)
12088 /* unaligned schedule (window) */
12089 typedef struct wl_avail_ulw
{
12090 uint8 id
; /* schedule ID */
12091 uint8 overwrite
; /* bit 0: overwrite all
12092 * 1-4: map ID if overwrite all is 0
12095 uint32 start
; /* start time of first ULW, in us */
12096 uint32 dur
; /* duration of ULW, in us */
12097 uint32 period
; /* time between consecutive ULWs, in us */
12101 uint8 chan_entry
[MAX_CHAN_ENTRY_LEN
];
12104 uint8 cntdwn
; /* remaining ULWs before schedule ends */
12108 /* unset: NAN is not available during ULW, set: NAN is avail depending on ctrl flags */
12109 #define WL_NAN_ULW_CTRL_PRESENT (1 << 0)
12110 /* unset: band, set: channel */
12111 #define WL_NAN_ULW_CTRL_TYPE (1 << 1)
12112 /* set: NAN is availabile on specified band/channel */
12113 #define WL_NAN_ULW_CTRL_AVAIL (1 << 2)
12114 /* channel is provided in raw attribute format */
12115 #define WL_NAN_ULW_CTRL_RAW_CHAN (1 << 3)
12117 /* nan wfa testmode operations */
12119 WL_NAN_WFA_TM_IGNORE_TERMINATE_NAF
= 0x00000001,
12120 WL_NAN_WFA_TM_IGNORE_RX_DATA_OUTSIDE_CRB
= 0x00000002,
12121 WL_NAN_WFA_TM_ALLOW_TX_DATA_OUTSIDE_CRB
= 0x00000004,
12122 WL_NAN_WFA_TM_ENFORCE_NDL_COUNTER
= 0x00000008,
12123 WL_NAN_WFA_TM_BYPASS_NDL_PROPOSAL_VALIDATION
= 0x00000010,
12124 /* allow data(pings) tx while ndp sec negotiation */
12125 WL_NAN_WFA_TM_SEC_SEND_PINGS_BYPASS_NDP_SM
= 0x00000020,
12126 /* generate and insert incorrect mic */
12127 WL_NAN_WFA_TM_SEC_INCORRECT_MIC
= 0x00000040,
12128 /* send m4 reject deliberately */
12129 WL_NAN_WFA_TM_SEC_REJECT_STATUS4M4
= 0x00000080,
12130 /* send mgmt frame (for eg. ndp terminate) in clear txt (bypass security) */
12131 WL_NAN_WFA_TM_SEC_SEND_MGMT_CLEAR
= 0x00000100,
12133 WL_NAN_WFA_TM_NDL_QOS_VALIDATE
= 0x00000200,
12134 /* firmware generated schedule update */
12135 WL_NAN_WFA_TM_GEN_SCHED_UPD
= 0x00000400,
12136 /* add lower 4-bytes of TSF to configured start time */
12137 WL_NAN_WFA_TM_ULW_START_TIME
= 0x00000800,
12138 /* enable schedule validation for SDF */
12139 WL_NAN_WFA_TM_SDF_SCHED_VALIDATE
= 0x00001000,
12140 /* by pass faw na iovar */
12141 WL_NAN_WFA_TM_SKIP_RAW_NA_BLOB
= 0x00002000,
12142 /* overwrite local NA with peer NA in received frame */
12143 WL_NAN_WFA_TM_LOCAL_NA_OVERWRITE
= 0x00004000,
12144 /* randomize and self configure ndl qos(needed at responder in auto mode) */
12145 WL_NAN_WFA_TM_SELF_CFG_NDL_QOS
= 0x00008000,
12146 /* send NAF frames only in DW */
12147 WL_NAN_WFA_TM_SEND_NAF_IN_DW
= 0x00010000,
12148 /* restrict channels used for countered slots to Ch 6/149 only */
12149 WL_NAN_WFA_TM_RESTRICT_COUNTER_SLOTS_CHAN
= 0x00020000,
12150 WL_NAN_WFA_TM_FLAG_MASK
= 0x0003ffff /* add above & update mask */
12152 typedef uint32 wl_nan_wfa_testmode_t
;
12154 /* To be removed; replaced by wl_nan_vndr_payload */
12155 typedef struct wl_nan_vndr_ie
{
12156 uint32 flags
; /* bitmask indicating which packet(s) contain this IE */
12157 uint16 body_len
; /* length of body (does not include oui field) */
12159 uint8 oui
[DOT11_OUI_LEN
];
12161 uint8 body
[]; /* vendor IE payload */
12162 } wl_nan_vndr_ie_t
;
12164 typedef struct wl_nan_vndr_payload
{
12165 uint32 flags
; /* bitmask indicating which packet(s) contain payload */
12166 uint16 payload_len
; /* length of payload */
12168 uint8 payload
[]; /* payload to be appended to NAN frame */
12169 } wl_nan_vndr_payload_t
;
12171 typedef struct wl_nan_dev_cap
{
12172 uint8 bands
[NAN_MAX_BANDS
];
12173 uint8 awake_dw
[NAN_MAX_BANDS
];
12174 uint8 overwrite_mapid
[NAN_MAX_BANDS
];
12175 uint8 mapid
; /* dev cap mapid */
12176 uint8 all_maps
; /* applies to device */
12179 } wl_nan_dev_cap_t
;
12181 /* arbitrary max len for frame template */
12182 #define WL_NAN_FRM_TPLT_MAX_LEN 1024
12184 typedef struct wl_nan_frm_tplt
{
12185 wl_nan_frame_type_t type
;
12187 uint16 len
; /* length of template */
12188 uint8 data
[]; /* template */
12189 } wl_nan_frm_tplt_t
;
12191 #define RSSI_THRESHOLD_SIZE 16
12192 #define MAX_IMP_RESP_SIZE 256
12194 typedef struct wl_proxd_rssi_bias
{
12195 int32 version
; /**< version */
12196 int32 threshold
[RSSI_THRESHOLD_SIZE
]; /**< threshold */
12197 int32 peak_offset
; /**< peak offset */
12198 int32 bias
; /**< rssi bias */
12199 int32 gd_delta
; /**< GD - GD_ADJ */
12200 int32 imp_resp
[MAX_IMP_RESP_SIZE
]; /**< (Hi*Hi)+(Hr*Hr) */
12201 } wl_proxd_rssi_bias_t
;
12203 typedef struct wl_proxd_rssi_bias_avg
{
12204 int32 avg_threshold
[RSSI_THRESHOLD_SIZE
]; /**< avg threshold */
12205 int32 avg_peak_offset
; /**< avg peak offset */
12206 int32 avg_rssi
; /**< avg rssi */
12207 int32 avg_bias
; /**< avg bias */
12208 } wl_proxd_rssi_bias_avg_t
;
12210 #include <packed_section_start.h>
12211 typedef BWL_PRE_PACKED_STRUCT
struct wl_proxd_collect_info
{
12212 uint16 type
; /**< type: 0 channel table, 1 channel smoothing table, 2 and 3 seq */
12213 uint16 index
; /**< The current frame index, from 1 to total_frames. */
12214 uint16 tof_cmd
; /**< M_TOF_CMD */
12215 uint16 tof_rsp
; /**< M_TOF_RSP */
12216 uint16 tof_avb_rxl
; /**< M_TOF_AVB_RX_L */
12217 uint16 tof_avb_rxh
; /**< M_TOF_AVB_RX_H */
12218 uint16 tof_avb_txl
; /**< M_TOF_AVB_TX_L */
12219 uint16 tof_avb_txh
; /**< M_TOF_AVB_TX_H */
12220 uint16 tof_id
; /**< M_TOF_ID */
12221 uint8 tof_frame_type
;
12222 uint8 tof_frame_bw
;
12225 int32 gd_adj_ns
; /**< gound delay */
12226 int32 gd_h_adj_ns
; /**< group delay + threshold crossing */
12227 int16 nfft
; /**< number of samples stored in H */
12228 uint8 num_max_cores
;
12230 } BWL_POST_PACKED_STRUCT wl_proxd_collect_info_t
;
12231 #include <packed_section_end.h>
12233 #define K_TOF_COLLECT_H_PAD 1
12234 #define K_TOF_COLLECT_SC_20MHZ (64)
12235 /* Maximum possible size of sample capture */
12236 #define K_TOF_COLLECT_SC_80MHZ (2*K_TOF_COLLECT_SC_20MHZ)
12237 /* Maximum possible size of channel dump */
12238 #define K_TOF_COLLECT_CHAN_SIZE (2*K_TOF_COLLECT_SC_80MHZ)
12241 A few extra samples are required to estimate frequency offset
12242 Right now 16 samples are being used. Can be changed in future.
12244 #define K_TOF_COLLECT_SAMP_SIZE_20MHZ (2*(K_TOF_COLLECT_SC_20MHZ)+16+K_TOF_COLLECT_H_PAD)
12245 #define K_TOF_COLLECT_RAW_SAMP_SIZE_20MHZ (2*K_TOF_COLLECT_SAMP_SIZE_20MHZ)
12246 #define K_TOF_COLLECT_H_SIZE_20MHZ (K_TOF_COLLECT_SAMP_SIZE_20MHZ)
12247 #define K_TOF_COLLECT_HRAW_SIZE_20MHZ (K_TOF_COLLECT_RAW_SAMP_SIZE_20MHZ)
12249 #define K_TOF_COLLECT_SAMP_SIZE_80MHZ (2*(K_TOF_COLLECT_SC_80MHZ)+16+K_TOF_COLLECT_H_PAD)
12250 #define K_TOF_COLLECT_RAW_SAMP_SIZE_80MHZ (2*K_TOF_COLLECT_SAMP_SIZE_80MHZ)
12251 #define K_TOF_COLLECT_H_SIZE_80MHZ (K_TOF_COLLECT_SAMP_SIZE_80MHZ)
12252 #define K_TOF_COLLECT_HRAW_SIZE_80MHZ (K_TOF_COLLECT_RAW_SAMP_SIZE_80MHZ)
12254 #define WL_PROXD_COLLECT_DATA_VERSION_1 1
12255 #include <packed_section_start.h>
12256 typedef BWL_PRE_PACKED_STRUCT
struct wl_proxd_collect_data_v1
{
12257 wl_proxd_collect_info_t info
;
12258 uint8 ri_rr
[FTM_TPK_RI_RR_LEN
];
12259 /**< raw data read from phy used to adjust timestamps */
12260 uint32 H
[K_TOF_COLLECT_H_SIZE_20MHZ
];
12261 } BWL_POST_PACKED_STRUCT wl_proxd_collect_data_t_v1
;
12262 #include <packed_section_end.h>
12264 #define WL_PROXD_COLLECT_DATA_VERSION_2 2
12265 #include <packed_section_start.h>
12266 typedef BWL_PRE_PACKED_STRUCT
struct wl_proxd_collect_data_v2
{
12267 wl_proxd_collect_info_t info
;
12268 uint8 ri_rr
[FTM_TPK_RI_RR_LEN_SECURE_2_0
];
12269 /**< raw data read from phy used to adjust timestamps */
12270 uint32 H
[K_TOF_COLLECT_H_SIZE_20MHZ
];
12271 } BWL_POST_PACKED_STRUCT wl_proxd_collect_data_t_v2
;
12272 #include <packed_section_end.h>
12274 #define WL_PROXD_COLLECT_DATA_VERSION_3 3
12275 typedef struct wl_proxd_collect_data_v3
{
12278 wl_proxd_collect_info_t info
;
12279 uint8 ri_rr
[FTM_TPK_RI_RR_LEN_SECURE_2_0
];
12280 /**< raw data read from phy used to adjust timestamps */
12281 uint32 H
[K_TOF_COLLECT_H_SIZE_20MHZ
];
12282 uint32 chan
[4 * K_TOF_COLLECT_CHAN_SIZE
];
12283 } wl_proxd_collect_data_t_v3
;
12284 #define WL_PROXD_COLLECT_DATA_VERSION_MAX WL_PROXD_COLLECT_DATA_VERSION_3
12286 typedef struct wl_proxd_debug_data
{
12287 uint8 count
; /**< number of packets */
12288 uint8 stage
; /**< state machone stage */
12289 uint8 received
; /**< received or txed */
12290 uint8 paket_type
; /**< packet type */
12291 uint8 category
; /**< category field */
12292 uint8 action
; /**< action field */
12293 uint8 token
; /**< token number */
12294 uint8 follow_token
; /**< following token number */
12295 uint16 index
; /**< index of the packet */
12296 uint16 tof_cmd
; /**< M_TOF_CMD */
12297 uint16 tof_rsp
; /**< M_TOF_RSP */
12298 uint16 tof_avb_rxl
; /**< M_TOF_AVB_RX_L */
12299 uint16 tof_avb_rxh
; /**< M_TOF_AVB_RX_H */
12300 uint16 tof_avb_txl
; /**< M_TOF_AVB_TX_L */
12301 uint16 tof_avb_txh
; /**< M_TOF_AVB_TX_H */
12302 uint16 tof_id
; /**< M_TOF_ID */
12303 uint16 tof_status0
; /**< M_TOF_STATUS_0 */
12304 uint16 tof_status2
; /**< M_TOF_STATUS_2 */
12305 uint16 tof_chsm0
; /**< M_TOF_CHNSM_0 */
12306 uint16 tof_phyctl0
; /**< M_TOF_PHYCTL0 */
12307 uint16 tof_phyctl1
; /**< M_TOF_PHYCTL1 */
12308 uint16 tof_phyctl2
; /**< M_TOF_PHYCTL2 */
12309 uint16 tof_lsig
; /**< M_TOF_LSIG */
12310 uint16 tof_vhta0
; /**< M_TOF_VHTA0 */
12311 uint16 tof_vhta1
; /**< M_TOF_VHTA1 */
12312 uint16 tof_vhta2
; /**< M_TOF_VHTA2 */
12313 uint16 tof_vhtb0
; /**< M_TOF_VHTB0 */
12314 uint16 tof_vhtb1
; /**< M_TOF_VHTB1 */
12315 uint16 tof_apmductl
; /**< M_TOF_AMPDU_CTL */
12316 uint16 tof_apmdudlim
; /**< M_TOF_AMPDU_DLIM */
12317 uint16 tof_apmdulen
; /**< M_TOF_AMPDU_LEN */
12318 } wl_proxd_debug_data_t
;
12320 /** version of the wl_wsec_info structure */
12321 #define WL_WSEC_INFO_VERSION 0x01
12323 /** start enum value for BSS properties */
12324 #define WL_WSEC_INFO_BSS_BASE 0x0100
12326 /** size of len and type fields of wl_wsec_info_tlv_t struct */
12327 #define WL_WSEC_INFO_TLV_HDR_LEN OFFSETOF(wl_wsec_info_tlv_t, data)
12329 /** Allowed wl_wsec_info properties; not all of them may be supported. */
12331 WL_WSEC_INFO_NONE
= 0,
12332 WL_WSEC_INFO_MAX_KEYS
= 1,
12333 WL_WSEC_INFO_NUM_KEYS
= 2,
12334 WL_WSEC_INFO_NUM_HW_KEYS
= 3,
12335 WL_WSEC_INFO_MAX_KEY_IDX
= 4,
12336 WL_WSEC_INFO_NUM_REPLAY_CNTRS
= 5,
12337 WL_WSEC_INFO_SUPPORTED_ALGOS
= 6,
12338 WL_WSEC_INFO_MAX_KEY_LEN
= 7,
12339 WL_WSEC_INFO_FLAGS
= 8,
12340 /* add global/per-wlc properties above */
12341 WL_WSEC_INFO_BSS_FLAGS
= (WL_WSEC_INFO_BSS_BASE
+ 1),
12342 WL_WSEC_INFO_BSS_WSEC
= (WL_WSEC_INFO_BSS_BASE
+ 2),
12343 WL_WSEC_INFO_BSS_TX_KEY_ID
= (WL_WSEC_INFO_BSS_BASE
+ 3),
12344 WL_WSEC_INFO_BSS_ALGO
= (WL_WSEC_INFO_BSS_BASE
+ 4),
12345 WL_WSEC_INFO_BSS_KEY_LEN
= (WL_WSEC_INFO_BSS_BASE
+ 5),
12346 WL_WSEC_INFO_BSS_ALGOS
= (WL_WSEC_INFO_BSS_BASE
+ 6),
12347 /* add per-BSS properties above */
12348 WL_WSEC_INFO_MAX
= 0xffff
12349 } wl_wsec_info_type_t
;
12352 uint32 algos
; /* set algos to be enabled/disabled */
12353 uint32 mask
; /* algos outside mask unaltered */
12354 } wl_wsec_info_algos_t
;
12356 /** tlv used to return wl_wsec_info properties */
12359 uint16 len
; /**< data length */
12360 uint8 data
[1]; /**< data follows */
12361 } wl_wsec_info_tlv_t
;
12363 /** input/output data type for wsec_info iovar */
12364 typedef struct wl_wsec_info
{
12365 uint8 version
; /**< structure version */
12368 wl_wsec_info_tlv_t tlvs
[1]; /**< tlv data follows */
12372 * randmac definitions
12374 #define WL_RANDMAC_MODULE "randmac"
12375 #define WL_RANDMAC_API_VERSION 0x0100 /**< version 1.0 */
12376 #define WL_RANDMAC_API_MIN_VERSION 0x0100 /**< version 1.0 */
12378 /** subcommands that can apply to randmac */
12380 WL_RANDMAC_SUBCMD_NONE
= 0,
12381 WL_RANDMAC_SUBCMD_GET_VERSION
= 1,
12382 WL_RANDMAC_SUBCMD_ENABLE
= 2,
12383 WL_RANDMAC_SUBCMD_DISABLE
= 3,
12384 WL_RANDMAC_SUBCMD_CONFIG
= 4,
12385 WL_RANDMAC_SUBCMD_STATS
= 5,
12386 WL_RANDMAC_SUBCMD_CLEAR_STATS
= 6,
12388 WL_RANDMAC_SUBCMD_MAX
12390 typedef int16 wl_randmac_subcmd_t
;
12392 /* Common IOVAR struct */
12393 typedef struct wl_randmac
{
12395 uint16 len
; /* total length */
12396 wl_randmac_subcmd_t subcmd_id
; /* subcommand id */
12397 uint8 data
[0]; /* subcommand data */
12400 #define WL_RANDMAC_IOV_HDR_SIZE OFFSETOF(wl_randmac_t, data)
12402 /* randmac version subcommand */
12403 typedef struct wl_randmac_version
{
12404 uint16 version
; /* Randmac method version info */
12405 uint8 pad
[2]; /* Align on 4 byte boundary */
12406 } wl_randmac_version_t
;
12409 * Bitmask for methods supporting MAC randomization feature
12411 #define WL_RANDMAC_USER_NONE 0x0000
12412 #define WL_RANDMAC_USER_FTM 0x0001
12413 #define WL_RANDMAC_USER_NAN 0x0002
12414 #define WL_RANDMAC_USER_SCAN 0x0004
12415 #define WL_RANDMAC_USER_ANQP 0x0008
12416 #define WL_RANDMAC_USER_ALL 0xFFFF
12417 typedef uint16 wl_randmac_method_t
;
12420 WL_RANDMAC_FLAGS_NONE
= 0x00,
12421 WL_RANDMAC_FLAGS_ADDR
= 0x01,
12422 WL_RANDMAC_FLAGS_MASK
= 0x02,
12423 WL_RANDMAC_FLAGS_METHOD
= 0x04,
12424 WL_RANDMAC_FLAGS_ALL
= 0xFF
12426 typedef uint8 wl_randmac_flags_t
;
12428 /* randmac statistics subcommand */
12429 typedef struct wl_randmac_stats
{
12430 uint32 set_ok
; /* Set random addr success count */
12431 uint32 set_fail
; /* Set random addr failed count */
12432 uint32 set_reqs
; /* Set random addr count */
12433 uint32 reset_reqs
; /* Restore random addr count */
12434 uint32 restore_ok
; /* Restore random addr succes count */
12435 uint32 restore_fail
; /* Restore random addr failed count */
12436 uint32 events_sent
; /* randmac module events count */
12437 uint32 events_rcvd
; /* randmac events received count */
12438 } wl_randmac_stats_t
;
12440 /* randmac config subcommand */
12441 typedef struct wl_randmac_config
{
12442 struct ether_addr addr
; /* Randomized MAC address */
12443 struct ether_addr addr_mask
; /* bitmask for randomization */
12444 wl_randmac_method_t method
; /* Enabled methods */
12445 wl_randmac_flags_t flags
; /* What config info changed */
12447 } wl_randmac_config_t
;
12450 WL_RANDMAC_EVENT_NONE
= 0, /**< not an event, reserved */
12451 WL_RANDMAC_EVENT_BSSCFG_ADDR_SET
= 1, /* bsscfg addr randomized */
12452 WL_RANDMAC_EVENT_BSSCFG_ADDR_RESTORE
= 2, /* bsscfg addr restored */
12453 WL_RANDMAC_EVENT_ENABLED
= 3, /* randmac module enabled */
12454 WL_RANDMAC_EVENT_DISABLE
= 4, /* randmac module disabled */
12455 WL_RANDMAC_EVENT_BSSCFG_STATUS
= 5, /* bsscfg enable/disable */
12457 WL_RANDMAC_EVENT_MAX
12459 typedef int16 wl_randmac_event_type_t
;
12460 typedef int32 wl_randmac_status_t
;
12461 typedef uint32 wl_randmac_event_mask_t
;
12463 #define WL_RANDMAC_EVENT_MASK_ALL 0xfffffffe
12464 #define WL_RANDMAC_EVENT_MASK_EVENT(_event_type) (1 << (_event_type))
12465 #define WL_RANDMAC_EVENT_ENABLED(_mask, _event_type) (\
12466 ((_mask) & WL_RANDMAC_EVENT_MASK_EVENT(_event_type)) != 0)
12468 /** tlv IDs - data length 4 bytes unless overridden by type, alignment 32 bits */
12470 WL_RANDMAC_TLV_NONE
= 0,
12471 WL_RANDMAC_TLV_METHOD
= 1,
12472 WL_RANDMAC_TLV_ADDR
= 2,
12473 WL_RANDMAC_TLV_MASK
= 3
12475 typedef uint16 wl_randmac_tlv_id_t
;
12477 typedef struct wl_randmac_tlv
{
12478 wl_randmac_tlv_id_t id
;
12479 uint16 len
; /* Length of variable */
12481 } wl_randmac_tlv_t
;
12483 /** randmac event */
12484 typedef struct wl_randmac_event
{
12486 uint16 len
; /* Length of all variables */
12487 wl_randmac_event_type_t type
;
12488 wl_randmac_method_t method
;
12490 wl_randmac_tlv_t tlvs
[1]; /**< variable */
12491 } wl_randmac_event_t
;
12494 * scan MAC definitions
12497 /** common iovar struct */
12498 typedef struct wl_scanmac
{
12499 uint16 subcmd_id
; /**< subcommand id */
12500 uint16 len
; /**< total length of data[] */
12501 uint8 data
[]; /**< subcommand data */
12504 /* subcommand ids */
12505 #define WL_SCANMAC_SUBCMD_ENABLE 0
12506 #define WL_SCANMAC_SUBCMD_BSSCFG 1 /**< only GET supported */
12507 #define WL_SCANMAC_SUBCMD_CONFIG 2
12509 /** scanmac enable data struct */
12510 typedef struct wl_scanmac_enable
{
12511 uint8 enable
; /**< 1 - enable, 0 - disable */
12512 uint8 pad
[3]; /**< 4-byte struct alignment */
12513 } wl_scanmac_enable_t
;
12515 /** scanmac bsscfg data struct */
12516 typedef struct wl_scanmac_bsscfg
{
12517 uint32 bsscfg
; /**< bsscfg index */
12518 } wl_scanmac_bsscfg_t
;
12520 /** scanmac config data struct */
12521 typedef struct wl_scanmac_config
{
12522 struct ether_addr mac
; /**< 6 bytes of MAC address or MAC prefix (i.e. OUI) */
12523 struct ether_addr random_mask
; /**< randomized bits on each scan */
12524 uint16 scan_bitmap
; /**< scans to use this MAC address */
12525 uint8 pad
[2]; /**< 4-byte struct alignment */
12526 } wl_scanmac_config_t
;
12529 #define WL_SCANMAC_SCAN_UNASSOC (0x01 << 0) /**< unassociated scans */
12530 #define WL_SCANMAC_SCAN_ASSOC_ROAM (0x01 << 1) /**< associated roam scans */
12531 #define WL_SCANMAC_SCAN_ASSOC_PNO (0x01 << 2) /**< associated PNO scans */
12532 #define WL_SCANMAC_SCAN_ASSOC_HOST (0x01 << 3) /**< associated host scans */
12534 #define WL_SCAN_EVENT_VERSION 1
12536 #define WL_SCAN_TYPE_ASSOC 0x1 /* Assoc scan */
12537 #define WL_SCAN_TYPE_ROAM 0x2 /* Roam scan */
12538 #define WL_SCAN_TYPE_FWSCAN 0x4 /* Other FW scan */
12539 #define WL_SCAN_TYPE_HOSTSCAN 0x8 /* Host scan */
12541 typedef struct scan_event_data
{
12544 uint16 num_chan_slice0
;
12545 uint16 num_chan_slice1
;
12546 /* Will contain num_chan_slice0 followed by num_chan_slice1 chanspecs */
12547 chanspec_t scan_chan_list
[];
12548 } scan_event_data_t
;
12551 * bonjour dongle offload definitions
12554 /* common iovar struct */
12555 typedef struct wl_bdo
{
12556 uint16 subcmd_id
; /* subcommand id */
12557 uint16 len
; /* total length of data[] */
12558 uint8 data
[]; /* subcommand data */
12561 /* subcommand ids */
12562 #define WL_BDO_SUBCMD_DOWNLOAD 0 /* Download flattened database */
12563 #define WL_BDO_SUBCMD_ENABLE 1 /* Start bonjour after download */
12564 #define WL_BDO_SUBCMD_MAX_DOWNLOAD 2 /* Get the max download size */
12566 /* maximum fragment size */
12567 #define BDO_MAX_FRAGMENT_SIZE 1024
12569 /* download flattened database
12571 * BDO must be disabled before database download else fail.
12573 * If database size is within BDO_MAX_FRAGMENT_SIZE then only a single fragment
12574 * is required (i.e. frag_num = 0, total_size = frag_size).
12575 * If database size exceeds BDO_MAX_FRAGMENT_SIZE then multiple fragments are required.
12577 typedef struct wl_bdo_download
{
12578 uint16 total_size
; /* total database size */
12579 uint16 frag_num
; /* fragment number, 0 for first fragment, N-1 for last fragment */
12580 uint16 frag_size
; /* size of fragment (max BDO_MAX_FRAGMENT_SIZE) */
12581 uint8 pad
[2]; /* 4-byte struct alignment */
12582 uint8 fragment
[BDO_MAX_FRAGMENT_SIZE
]; /* fragment data */
12583 } wl_bdo_download_t
;
12587 * Enable requires a downloaded database else fail.
12589 typedef struct wl_bdo_enable
{
12590 uint8 enable
; /* 1 - enable, 0 - disable */
12591 uint8 pad
[3]; /* 4-byte struct alignment */
12595 * Get the max download size for Bonjour Offload.
12597 typedef struct wl_bdo_max_download
{
12598 uint16 size
; /* Max download size in bytes */
12599 uint8 pad
[2]; /* 4-byte struct alignment */
12600 } wl_bdo_max_download_t
;
12603 * TCP keepalive offload definitions
12606 /* common iovar struct */
12607 typedef struct wl_tko
{
12608 uint16 subcmd_id
; /* subcommand id */
12609 uint16 len
; /* total length of data[] */
12610 uint8 data
[]; /* subcommand data */
12613 /* subcommand ids */
12614 #define WL_TKO_SUBCMD_MAX_TCP 0 /* max TCP connections supported */
12615 #define WL_TKO_SUBCMD_PARAM 1 /* configure offload common parameters */
12616 #define WL_TKO_SUBCMD_CONNECT 2 /* TCP connection info */
12617 #define WL_TKO_SUBCMD_ENABLE 3 /* enable/disable */
12618 #define WL_TKO_SUBCMD_STATUS 4 /* TCP connection status */
12620 /* WL_TKO_SUBCMD_MAX_CONNECT subcommand data */
12621 typedef struct wl_tko_max_tcp
{
12622 uint8 max
; /* max TCP connections supported */
12623 uint8 pad
[3]; /* 4-byte struct alignment */
12624 } wl_tko_max_tcp_t
;
12626 /* WL_TKO_SUBCMD_PARAM subcommand data */
12627 typedef struct wl_tko_param
{
12628 uint16 interval
; /* keepalive tx interval (secs) */
12629 uint16 retry_interval
; /* keepalive retry interval (secs) */
12630 uint16 retry_count
; /* retry_count */
12631 uint8 pad
[2]; /* 4-byte struct alignment */
12634 /* WL_TKO_SUBCMD_CONNECT subcommand data
12635 * invoke with unique 'index' for each TCP connection
12637 typedef struct wl_tko_connect
{
12638 uint8 index
; /* TCP connection index, 0 to max-1 */
12639 uint8 ip_addr_type
; /* 0 - IPv4, 1 - IPv6 */
12640 uint16 local_port
; /* local port */
12641 uint16 remote_port
; /* remote port */
12643 uint32 local_seq
; /* local sequence number */
12644 uint32 remote_seq
; /* remote sequence number */
12645 uint16 request_len
; /* TCP keepalive request packet length */
12646 uint16 response_len
; /* TCP keepalive response packet length */
12647 uint8 data
[]; /* variable length field containing local/remote IPv4/IPv6,
12648 * TCP keepalive request packet, TCP keepalive response packet
12649 * For IPv4, length is 4 * 2 + request_length + response_length
12650 * offset 0 - local IPv4
12651 * offset 4 - remote IPv4
12652 * offset 8 - TCP keepalive request packet
12653 * offset 8+request_length - TCP keepalive response packet
12654 * For IPv6, length is 16 * 2 + request_length + response_length
12655 * offset 0 - local IPv6
12656 * offset 16 - remote IPv6
12657 * offset 32 - TCP keepalive request packet
12658 * offset 32+request_length - TCP keepalive response packet
12660 } wl_tko_connect_t
;
12662 /* WL_TKO_SUBCMD_CONNECT subcommand data to GET configured info for specific index */
12663 typedef struct wl_tko_get_connect
{
12664 uint8 index
; /* TCP connection index, 0 to max-1 */
12665 uint8 pad
[3]; /* 4-byte struct alignment */
12666 } wl_tko_get_connect_t
;
12668 typedef struct wl_tko_enable
{
12669 uint8 enable
; /* 1 - enable, 0 - disable */
12670 uint8 pad
[3]; /* 4-byte struct alignment */
12673 /* WL_TKO_SUBCMD_STATUS subcommand data */
12674 /* must be invoked before tko is disabled else status is unavailable */
12675 typedef struct wl_tko_status
{
12676 uint8 count
; /* number of status entries (i.e. equals
12677 * max TCP connections supported)
12679 uint8 status
[1]; /* variable length field contain status for
12680 * each TCP connection index
12685 TKO_STATUS_NORMAL
= 0, /* TCP connection normal, no error */
12686 TKO_STATUS_NO_RESPONSE
= 1, /* no response to TCP keepalive */
12687 TKO_STATUS_NO_TCP_ACK_FLAG
= 2, /* TCP ACK flag not set */
12688 TKO_STATUS_UNEXPECT_TCP_FLAG
= 3, /* unexpect TCP flags set other than ACK */
12689 TKO_STATUS_SEQ_NUM_INVALID
= 4, /* ACK != sequence number */
12690 TKO_STATUS_REMOTE_SEQ_NUM_INVALID
= 5, /* SEQ > remote sequence number */
12691 TKO_STATUS_TCP_DATA
= 6, /* TCP data available */
12692 TKO_STATUS_UNAVAILABLE
= 255, /* not used/configured */
12696 RSSI_REASON_UNKNOW
= 0,
12697 RSSI_REASON_LOWRSSI
= 1,
12698 RSSI_REASON_NSYC
= 2,
12699 RSSI_REASON_TIMEOUT
= 3
12704 TOF_REASON_REQEND
= 1,
12705 TOF_REASON_TIMEOUT
= 2,
12706 TOF_REASON_NOACK
= 3,
12707 TOF_REASON_INVALIDAVB
= 4,
12708 TOF_REASON_INITIAL
= 5,
12709 TOF_REASON_ABORT
= 6
12713 RSSI_STATE_POLL
= 0,
12714 RSSI_STATE_TPAIRING
= 1,
12715 RSSI_STATE_IPAIRING
= 2,
12716 RSSI_STATE_THANDSHAKE
= 3,
12717 RSSI_STATE_IHANDSHAKE
= 4,
12718 RSSI_STATE_CONFIRMED
= 5,
12719 RSSI_STATE_PIPELINE
= 6,
12720 RSSI_STATE_NEGMODE
= 7,
12721 RSSI_STATE_MONITOR
= 8,
12722 RSSI_STATE_LAST
= 9
12726 TOF_STATE_IDLE
= 0,
12727 TOF_STATE_IWAITM
= 1,
12728 TOF_STATE_TWAITM
= 2,
12729 TOF_STATE_ILEGACY
= 3,
12730 TOF_STATE_IWAITCL
= 4,
12731 TOF_STATE_TWAITCL
= 5,
12732 TOF_STATE_ICONFIRM
= 6,
12733 TOF_STATE_IREPORT
= 7
12736 enum tof_mode_type
{
12737 TOF_LEGACY_UNKNOWN
= 0,
12739 TOF_NONLEGACY_AP
= 2
12742 enum tof_way_type
{
12743 TOF_TYPE_ONE_WAY
= 0,
12744 TOF_TYPE_TWO_WAY
= 1,
12745 TOF_TYPE_REPORT
= 2
12748 enum tof_rate_type
{
12749 TOF_FRAME_RATE_VHT
= 0,
12750 TOF_FRAME_RATE_LEGACY
= 1
12753 #define TOF_ADJ_TYPE_NUM 4 /**< number of assisted timestamp adjustment */
12754 enum tof_adj_mode
{
12755 TOF_ADJ_SOFTWARE
= 0,
12756 TOF_ADJ_HARDWARE
= 1,
12761 #define FRAME_TYPE_NUM 4 /**< number of frame type */
12763 FRAME_TYPE_CCK
= 0,
12764 FRAME_TYPE_OFDM
= 1,
12765 FRAME_TYPE_11N
= 2,
12766 FRAME_TYPE_11AC
= 3
12769 typedef struct wl_proxd_status_iovar
{
12770 uint16 method
; /**< method */
12771 uint8 mode
; /**< mode */
12772 uint8 peermode
; /**< peer mode */
12773 uint8 state
; /**< state */
12774 uint8 reason
; /**< reason code */
12776 uint32 distance
; /**< distance */
12777 uint32 txcnt
; /**< tx pkt counter */
12778 uint32 rxcnt
; /**< rx pkt counter */
12779 struct ether_addr peer
; /**< peer mac address */
12780 int8 avg_rssi
; /**< average rssi */
12781 int8 hi_rssi
; /**< highest rssi */
12782 int8 low_rssi
; /**< lowest rssi */
12784 uint32 dbgstatus
; /**< debug status */
12785 uint16 frame_type_cnt
[FRAME_TYPE_NUM
]; /**< frame types */
12786 uint8 adj_type_cnt
[TOF_ADJ_TYPE_NUM
]; /**< adj types HW/SW */
12787 } wl_proxd_status_iovar_t
;
12789 /* ifdef NET_DETECT */
12790 typedef struct net_detect_adapter_features
{
12791 uint8 wowl_enabled
;
12792 uint8 net_detect_enabled
;
12794 } net_detect_adapter_features_t
;
12796 typedef enum net_detect_bss_type
{
12800 } net_detect_bss_type_t
;
12802 typedef struct net_detect_profile
{
12804 net_detect_bss_type_t bss_type
; /**< Ignore for now since Phase 1 is only for ESS */
12805 uint32 cipher_type
; /**< DOT11_CIPHER_ALGORITHM enumeration values */
12806 uint32 auth_type
; /**< DOT11_AUTH_ALGORITHM enumeration values */
12807 } net_detect_profile_t
;
12809 typedef struct net_detect_profile_list
{
12810 uint32 num_nd_profiles
;
12811 net_detect_profile_t nd_profile
[];
12812 } net_detect_profile_list_t
;
12814 typedef struct net_detect_config
{
12817 uint32 scan_interval
;
12818 uint32 wait_period
;
12819 uint8 wake_if_connected
;
12820 uint8 wake_if_disconnected
;
12822 net_detect_profile_list_t nd_profile_list
;
12823 } net_detect_config_t
;
12825 typedef enum net_detect_wake_reason
{
12830 } net_detect_wake_reason_t
;
12832 typedef struct net_detect_wake_data
{
12833 net_detect_wake_reason_t nd_wake_reason
;
12834 uint32 nd_wake_date_length
;
12835 uint8 nd_wake_data
[0]; /**< Wake data (currently unused) */
12836 } net_detect_wake_data_t
;
12838 /* endif NET_DETECT */
12840 /* (unversioned, deprecated) */
12841 typedef struct bcnreq
{
12846 struct ether_addr da
;
12853 #define WL_RRM_BCN_REQ_VER 1
12854 typedef struct bcn_req
{
12860 struct ether_addr da
;
12864 uint8 req_elements
;
12866 chanspec_list_t chspec_list
;
12869 typedef struct rrmreq
{
12870 struct ether_addr da
;
12878 typedef struct framereq
{
12879 struct ether_addr da
;
12884 struct ether_addr ta
;
12888 typedef struct statreq
{
12889 struct ether_addr da
;
12890 struct ether_addr peer
;
12898 typedef struct txstrmreq
{
12899 struct ether_addr da
; /* Destination address */
12900 uint16 random_int
; /* Random interval for measurement start */
12901 uint16 dur
; /* Measurement duration */
12902 uint16 reps
; /* number of repetitions */
12903 struct ether_addr peer
; /* Peer MAC address */
12904 uint8 tid
; /* Traffic ID */
12905 uint8 bin0_range
; /* Delay range of the first bin */
12908 typedef struct lcireq
{
12909 struct ether_addr da
; /* Destination address */
12910 uint16 reps
; /* number of repetitions */
12911 uint8 subj
; /* Local/Remote/Thid party */
12912 uint8 lat_res
; /* Latitude requested Resolution */
12913 uint8 lon_res
; /* Longitude requested Resolution */
12914 uint8 alt_res
; /* Altitude requested Resolution */
12917 typedef struct civicreq
{
12918 struct ether_addr da
; /* Destination address */
12919 uint16 reps
; /* number of repetitions */
12920 uint8 subj
; /* Local/Remote/Thid party */
12921 uint8 civloc_type
; /* Format of location info */
12922 uint8 siu
; /* Unit of Location service interval */
12924 uint16 si
; /* Location service interval */
12927 typedef struct locidreq
{
12928 struct ether_addr da
; /* Destination address */
12929 uint16 reps
; /* number of repetitions */
12930 uint8 subj
; /* Local/Remote/Thid party */
12931 uint8 siu
; /* Unit of Location service interval */
12932 uint16 si
; /* Location service interval */
12935 typedef struct wl_rrm_config_ioc
{
12936 uint16 version
; /* command version */
12937 uint16 id
; /* subiovar cmd ID */
12938 uint16 len
; /* total length of all bytes in data[] */
12939 uint16 pad
; /* 4-byte boundary padding */
12940 uint8 data
[1]; /* payload */
12941 } wl_rrm_config_ioc_t
;
12944 WL_RRM_CONFIG_NONE
= 0, /* reserved */
12945 WL_RRM_CONFIG_GET_LCI
= 1, /* get LCI */
12946 WL_RRM_CONFIG_SET_LCI
= 2, /* set LCI */
12947 WL_RRM_CONFIG_GET_CIVIC
= 3, /* get civic location */
12948 WL_RRM_CONFIG_SET_CIVIC
= 4, /* set civic location */
12949 WL_RRM_CONFIG_GET_LOCID
= 5, /* get location identifier */
12950 WL_RRM_CONFIG_SET_LOCID
= 6, /* set location identifier */
12951 WL_RRM_CONFIG_MAX
= 7
12954 #define WL_RRM_CONFIG_NAME "rrm_config"
12955 #define WL_RRM_CONFIG_MIN_LENGTH OFFSETOF(wl_rrm_config_ioc_t, data)
12958 WL_RRM_EVENT_NONE
= 0, /* not an event, reserved */
12959 WL_RRM_EVENT_FRNG_REQ
= 1, /* Receipt of FRNG request frame */
12960 WL_RRM_EVENT_FRNG_REP
= 2, /* Receipt of FRNG report frame */
12964 typedef int16 wl_rrm_event_type_t
;
12966 typedef struct frngreq_target
{
12972 struct ether_addr bssid
;
12973 chanspec_t chanspec
;
12975 } frngreq_target_t
;
12977 typedef struct frngreq
{
12978 wl_rrm_event_type_t event
; /* RRM event type */
12979 struct ether_addr da
;
12980 uint16 max_init_delay
; /* Upper bound of random delay, in TUs */
12981 uint8 min_ap_count
; /* Min FTM ranges requested (1-15) */
12982 uint8 num_aps
; /* Number of APs to range, at least min_ap_count */
12983 uint16 max_age
; /* Max elapsed time before FTM request, 0xFFFF = any */
12984 uint16 reps
; /* Number of repetitions of this measurement type */
12985 frngreq_target_t targets
[1]; /* Target BSSIDs to range */
12988 typedef struct frngrep_range
{
12989 uint32 start_tsf
; /* 4 lsb of tsf */
12990 struct ether_addr bssid
;
12998 typedef struct frngrep_error
{
12999 uint32 start_tsf
; /* 4 lsb of tsf */
13000 struct ether_addr bssid
;
13005 typedef struct frngrep
{
13006 wl_rrm_event_type_t event
; /* RRM event type */
13007 struct ether_addr da
;
13008 uint8 range_entry_count
;
13009 uint8 error_entry_count
;
13010 uint16 dialog_token
; /* dialog token */
13011 frngrep_range_t range_entries
[DOT11_FTM_RANGE_ENTRY_MAX_COUNT
];
13012 frngrep_error_t error_entries
[DOT11_FTM_RANGE_ERROR_ENTRY_MAX_COUNT
];
13015 typedef struct wl_rrm_frng_ioc
{
13016 uint16 version
; /* command version */
13017 uint16 id
; /* subiovar cmd ID */
13018 uint16 len
; /* total length of all bytes in data[] */
13019 uint16 pad
; /* 4-byte boundary padding */
13020 uint8 data
[]; /* payload */
13021 } wl_rrm_frng_ioc_t
;
13024 WL_RRM_FRNG_NONE
= 0, /* reserved */
13025 WL_RRM_FRNG_SET_REQ
= 1, /* send ftm ranging request */
13026 WL_RRM_FRNG_MAX
= 2
13029 #define WL_RRM_FRNG_NAME "rrm_frng"
13030 #define WL_RRM_FRNG_MIN_LENGTH OFFSETOF(wl_rrm_frng_ioc_t, data)
13032 #define WL_RRM_RPT_VER 0
13033 #define WL_RRM_RPT_MAX_PAYLOAD 256
13034 #define WL_RRM_RPT_MIN_PAYLOAD 7
13035 #define WL_RRM_RPT_FALG_ERR 0
13036 #define WL_RRM_RPT_FALG_GRP_ID_PROPR (1 << 0)
13037 #define WL_RRM_RPT_FALG_GRP_ID_0 (1 << 1)
13039 uint16 ver
; /**< version */
13040 struct ether_addr addr
; /**< STA MAC addr */
13041 uint32 timestamp
; /**< timestamp of the report */
13042 uint16 flag
; /**< flag */
13043 uint16 len
; /**< length of payload data */
13044 uint8 data
[WL_RRM_RPT_MAX_PAYLOAD
];
13047 typedef struct wlc_dwds_config
{
13049 uint32 mode
; /**< STA/AP interface */
13050 struct ether_addr ea
;
13052 } wlc_dwds_config_t
;
13054 typedef struct wl_el_set_params_s
{
13055 uint8 set
; /**< Set number */
13057 uint32 size
; /**< Size to make/expand */
13058 } wl_el_set_params_t
;
13060 typedef struct wl_el_tag_params_s
{
13064 } wl_el_tag_params_t
;
13066 #define EVENT_LOG_SET_TYPE_CURRENT_VERSION 0
13067 typedef struct wl_el_set_type_s
{
13070 uint8 set
; /* Set number */
13071 uint8 type
; /* Type- EVENT_LOG_SET_TYPE_DEFAULT or EVENT_LOG_SET_TYPE_PRSRV */
13073 } wl_el_set_type_t
;
13075 typedef struct wl_staprio_cfg
{
13076 struct ether_addr ea
; /**< mac addr */
13077 uint8 prio
; /**< scb priority */
13078 } wl_staprio_cfg_t
;
13080 #define STAMON_STACONFIG_VER 1
13081 /* size of struct wlc_stamon_sta_config_t elements */
13082 #define STAMON_STACONFIG_LENGTH 20
13084 typedef enum wl_stamon_cfg_cmd_type
{
13085 STAMON_CFG_CMD_DEL
= 0,
13086 STAMON_CFG_CMD_ADD
= 1,
13087 STAMON_CFG_CMD_ENB
= 2,
13088 STAMON_CFG_CMD_DSB
= 3,
13089 STAMON_CFG_CMD_CNT
= 4,
13090 STAMON_CFG_CMD_RSTCNT
= 5,
13091 STAMON_CFG_CMD_GET_STATS
= 6,
13092 STAMON_CFG_CMD_SET_MONTIME
= 7
13093 } wl_stamon_cfg_cmd_type_t
;
13095 typedef struct wlc_stamon_sta_config
{
13096 wl_stamon_cfg_cmd_type_t cmd
; /**< 0 - delete, 1 - add */
13097 struct ether_addr ea
;
13098 uint16 version
; /* Command structure version */
13099 uint16 length
; /* Command structure length */
13101 /* Time (ms) for which STA's are monitored. Value ZERO indicates no time limit */
13102 uint32 monitor_time
;
13103 } wlc_stamon_sta_config_t
;
13105 /* ifdef SR_DEBUG */
13106 typedef struct /* pmu_reg */{
13107 uint32 pmu_control
;
13108 uint32 pmu_capabilities
;
13111 uint32 res_pending
;
13113 uint32 min_res_mask
;
13114 uint32 max_res_mask
;
13115 uint32 pmu_chipcontrol1
[4];
13116 uint32 pmu_regcontrol
[5];
13117 uint32 pmu_pllcontrol
[5];
13118 uint32 pmu_rsrc_up_down_timer
[31];
13119 uint32 rsrc_dep_mask
[31];
13121 /* endif SR_DEBUG */
13123 typedef struct wl_taf_define
{
13124 struct ether_addr ea
; /**< STA MAC or 0xFF... */
13125 uint16 version
; /**< version */
13126 uint32 sch
; /**< method index */
13127 uint32 prio
; /**< priority */
13128 uint32 misc
; /**< used for return value */
13129 uint8 text
[]; /**< used to pass and return ascii text */
13132 /** Received Beacons lengths information */
13133 #define WL_LAST_BCNS_INFO_FIXED_LEN OFFSETOF(wlc_bcn_len_hist_t, bcnlen_ring)
13134 typedef struct wlc_bcn_len_hist
{
13135 uint16 ver
; /**< version field */
13136 uint16 cur_index
; /**< current pointed index in ring buffer */
13137 uint32 max_bcnlen
; /**< Max beacon length received */
13138 uint32 min_bcnlen
; /**< Min beacon length received */
13139 uint32 ringbuff_len
; /**< Length of the ring buffer 'bcnlen_ring' */
13140 uint32 bcnlen_ring
[1]; /**< ring buffer storing received beacon lengths */
13141 } wlc_bcn_len_hist_t
;
13143 /* WDS net interface types */
13144 #define WL_WDSIFTYPE_NONE 0x0 /**< The interface type is neither WDS nor DWDS. */
13145 #define WL_WDSIFTYPE_WDS 0x1 /**< The interface is WDS type. */
13146 #define WL_WDSIFTYPE_DWDS 0x2 /**< The interface is DWDS type. */
13148 typedef struct wl_bssload_static
{
13155 } wl_bssload_static_t
;
13157 /* Buffer of size WLC_SAMPLECOLLECT_MAXLEN (=10240 for 4345a0 ACPHY)
13158 * gets copied to this, multiple times
13160 typedef enum wl_gpaio_option
{
13169 GPAIO_PMU_LOGENLDO
,
13172 GPAIO_PMU_LPFTXLDO
,
13175 GPAIO_IQDAC_BUF_DC_MEAS
,
13176 GPAIO_IQDAC_BUF_DC_CLEAR
,
13177 GPAIO_DAC_IQ_DC_RDBK
,
13178 GPAIO_DAC_IQ_DC_RDBK_CLEAR
,
13179 GPAIO_AFE_LDO_FOR_DAC_DC
13180 } wl_gpaio_option_t
;
13182 /** IO Var Operations - the Value of iov_op In wlc_ap_doiovar */
13183 typedef enum wlc_ap_iov_bss_operation
{
13184 WLC_AP_IOV_OP_DELETE
= -1,
13185 WLC_AP_IOV_OP_DISABLE
= 0,
13186 WLC_AP_IOV_OP_ENABLE
= 1,
13187 WLC_AP_IOV_OP_MANUAL_AP_BSSCFG_CREATE
= 2,
13188 WLC_AP_IOV_OP_MANUAL_STA_BSSCFG_CREATE
= 3,
13189 WLC_AP_IOV_OP_MOVE
= 4
13190 } wlc_ap_iov_bss_oper_t
;
13192 /* LTE coex info */
13193 /* Analogue of HCI Set MWS Signaling cmd */
13195 int16 mws_rx_assert_offset
;
13196 int16 mws_rx_assert_jitter
;
13197 int16 mws_rx_deassert_offset
;
13198 int16 mws_rx_deassert_jitter
;
13199 int16 mws_tx_assert_offset
;
13200 int16 mws_tx_assert_jitter
;
13201 int16 mws_tx_deassert_offset
;
13202 int16 mws_tx_deassert_jitter
;
13203 int16 mws_pattern_assert_offset
;
13204 int16 mws_pattern_assert_jitter
;
13205 int16 mws_inact_dur_assert_offset
;
13206 int16 mws_inact_dur_assert_jitter
;
13207 int16 mws_scan_freq_assert_offset
;
13208 int16 mws_scan_freq_assert_jitter
;
13209 int16 mws_prio_assert_offset_req
;
13212 /** Analogue of HCI MWS Channel Params */
13214 uint16 mws_rx_center_freq
; /**< MHz */
13215 uint16 mws_tx_center_freq
;
13216 uint16 mws_rx_channel_bw
; /**< KHz */
13217 uint16 mws_tx_channel_bw
;
13218 uint8 mws_channel_en
;
13219 uint8 mws_channel_type
; /**< Don't care for WLAN? */
13222 #define LTECX_MAX_NUM_PERIOD_TYPES 7
13224 /* LTE Frame params */
13226 uint16 mws_frame_dur
;
13227 int16 mws_framesync_assert_offset
;
13228 uint16 mws_framesync_assert_jitter
;
13229 uint16 mws_period_dur
[LTECX_MAX_NUM_PERIOD_TYPES
];
13230 uint8 mws_period_type
[LTECX_MAX_NUM_PERIOD_TYPES
];
13231 uint8 mws_num_periods
;
13232 } mws_frame_config_t
;
13234 /** MWS wci2 message */
13236 uint8 mws_wci2_data
; /**< BT-SIG msg */
13238 uint16 mws_wci2_interval
; /**< Interval in us */
13239 uint16 mws_wci2_repeat
; /**< No of msgs to send */
13243 uint16 combo1
; /* mws ant selection 1 */
13244 uint16 combo2
; /* mws ant selection 2 */
13245 uint16 combo3
; /* mws ant selection 3 */
13246 uint16 combo4
; /* mws ant selection 4 */
13249 /* MWS ANT map 2nd generation */
13251 uint16 combo
[16]; /* mws ant selection 2nd */
13252 } mws_ant_map_t_2nd
;
13254 /* MWS SCAN_REQ Bitmap */
13255 typedef struct mws_scanreq_params
{
13261 } mws_scanreq_params_t
;
13264 uint32 config
; /**< MODE: AUTO (-1), Disable (0), Enable (1) */
13265 uint32 status
; /**< Current state: Disabled (0), Enabled (1) */
13268 #define WLC_RSDB_MODE_AUTO_MASK 0x80
13269 #define WLC_RSDB_EXTRACT_MODE(val) ((int8)((val) & (~(WLC_RSDB_MODE_AUTO_MASK))))
13272 uint16 request
; /* type of sensor hub request */
13273 uint16 enable
; /* enable/disable response for specified request */
13274 uint16 interval
; /* interval between responses to the request */
13277 #define WL_IF_STATS_T_VERSION 1 /**< current version of wl_if_stats structure */
13279 /** per interface counters */
13280 typedef struct wl_if_stats
{
13281 uint16 version
; /**< version of the structure */
13282 uint16 length
; /**< length of the entire structure */
13283 uint32 PAD
; /**< padding */
13285 /* transmit stat counters */
13286 uint64 txframe
; /**< tx data frames */
13287 uint64 txbyte
; /**< tx data bytes */
13288 uint64 txerror
; /**< tx data errors (derived: sum of others) */
13289 uint64 txnobuf
; /**< tx out of buffer errors */
13290 uint64 txrunt
; /**< tx runt frames */
13291 uint64 txfail
; /**< tx failed frames */
13292 uint64 txretry
; /**< tx retry frames */
13293 uint64 txretrie
; /**< tx multiple retry frames */
13294 uint64 txfrmsnt
; /**< tx sent frames */
13295 uint64 txmulti
; /**< tx mulitcast sent frames */
13296 uint64 txfrag
; /**< tx fragments sent */
13298 /* receive stat counters */
13299 uint64 rxframe
; /**< rx data frames */
13300 uint64 rxbyte
; /**< rx data bytes */
13301 uint64 rxerror
; /**< rx data errors (derived: sum of others) */
13302 uint64 rxnobuf
; /**< rx out of buffer errors */
13303 uint64 rxrunt
; /**< rx runt frames */
13304 uint64 rxfragerr
; /**< rx fragment errors */
13305 uint64 rxmulti
; /**< rx multicast frames */
13307 uint64 txexptime
; /* DATA Tx frames suppressed due to timer expiration */
13308 uint64 txrts
; /* RTS/CTS succeeeded count */
13309 uint64 txnocts
; /* RTS/CTS faled count */
13311 uint64 txretrans
; /* Number of frame retransmissions */
13315 typedef struct wl_band
{
13316 uint16 bandtype
; /**< WL_BAND_2G, WL_BAND_5G */
13317 uint16 bandunit
; /**< bandstate[] index */
13318 uint16 phytype
; /**< phytype */
13323 #define WL_WLC_VERSION_T_VERSION 1 /**< current version of wlc_version structure */
13325 /** wlc interface version */
13326 typedef struct wl_wlc_version
{
13327 uint16 version
; /**< version of the structure */
13328 uint16 length
; /**< length of the entire structure */
13330 /* epi version numbers */
13331 uint16 epi_ver_major
; /**< epi major version number */
13332 uint16 epi_ver_minor
; /**< epi minor version number */
13333 uint16 epi_rc_num
; /**< epi RC number */
13334 uint16 epi_incr_num
; /**< epi increment number */
13336 /* wlc interface version numbers */
13337 uint16 wlc_ver_major
; /**< wlc interface major version number */
13338 uint16 wlc_ver_minor
; /**< wlc interface minor version number */
13342 /* Highest version of WLC_API_VERSION supported */
13343 #define WLC_API_VERSION_MAJOR_MAX 8
13344 #define WLC_API_VERSION_MINOR_MAX 0
13346 /* begin proxd definitions */
13347 #include <packed_section_start.h>
13349 #define WL_PROXD_API_VERSION 0x0300 /**< version 3.0 */
13351 /** Minimum supported API version */
13352 #define WL_PROXD_API_MIN_VERSION 0x0300
13354 /** proximity detection methods */
13356 WL_PROXD_METHOD_NONE
= 0,
13357 WL_PROXD_METHOD_RSVD1
= 1, /**< backward compatibility - RSSI, not supported */
13358 WL_PROXD_METHOD_TOF
= 2,
13359 WL_PROXD_METHOD_RSVD2
= 3, /**< 11v only - if needed */
13360 WL_PROXD_METHOD_FTM
= 4, /**< IEEE rev mc/2014 */
13361 WL_PROXD_METHOD_MAX
13363 typedef int16 wl_proxd_method_t
;
13365 /** global and method configuration flags */
13367 WL_PROXD_FLAG_NONE
= 0x00000000,
13368 WL_PROXD_FLAG_RX_ENABLED
= 0x00000001, /**< respond to requests, per bss */
13369 WL_PROXD_FLAG_RX_RANGE_REQ
= 0x00000002, /**< 11mc range requests enabled */
13370 WL_PROXD_FLAG_TX_LCI
= 0x00000004, /**< tx lci, if known */
13371 WL_PROXD_FLAG_TX_CIVIC
= 0x00000008, /**< tx civic, if known */
13372 WL_PROXD_FLAG_RX_AUTO_BURST
= 0x00000010, /**< auto respond w/o host action */
13373 WL_PROXD_FLAG_TX_AUTO_BURST
= 0x00000020, /**< continue tx w/o host action */
13374 WL_PROXD_FLAG_AVAIL_PUBLISH
= 0x00000040, /**< publish availability */
13375 WL_PROXD_FLAG_AVAIL_SCHEDULE
= 0x00000080, /**< schedule using availability */
13376 WL_PROXD_FLAG_ASAP_CAPABLE
= 0x00000100, /* ASAP capable */
13377 WL_PROXD_FLAG_MBURST_FOLLOWUP
= 0x00000200, /* new multi-burst algorithm */
13378 WL_PROXD_FLAG_SECURE
= 0x00000400, /* per bsscfg option */
13379 WL_PROXD_FLAG_NO_TSF_SYNC
= 0x00000800, /* disable tsf sync */
13380 WL_PROXD_FLAG_ALL
= 0xffffffff
13382 typedef uint32 wl_proxd_flags_t
;
13384 #define WL_PROXD_FLAGS_AVAIL (WL_PROXD_FLAG_AVAIL_PUBLISH | \
13385 WL_PROXD_FLAG_AVAIL_SCHEDULE)
13387 /** session flags */
13389 WL_PROXD_SESSION_FLAG_NONE
= 0x00000000, /**< no flags */
13390 WL_PROXD_SESSION_FLAG_INITIATOR
= 0x00000001, /**< local device is initiator */
13391 WL_PROXD_SESSION_FLAG_TARGET
= 0x00000002, /**< local device is target */
13392 WL_PROXD_SESSION_FLAG_ONE_WAY
= 0x00000004, /**< (initiated) 1-way rtt */
13393 WL_PROXD_SESSION_FLAG_AUTO_BURST
= 0x00000008, /**< created w/ rx_auto_burst */
13394 WL_PROXD_SESSION_FLAG_PERSIST
= 0x00000010, /**< good until cancelled */
13395 WL_PROXD_SESSION_FLAG_RTT_DETAIL
= 0x00000020, /**< rtt detail in results */
13396 WL_PROXD_SESSION_FLAG_SECURE
= 0x00000040, /**< sessionis secure */
13397 WL_PROXD_SESSION_FLAG_AOA
= 0x00000080, /**< AOA along w/ RTT */
13398 WL_PROXD_SESSION_FLAG_RX_AUTO_BURST
= 0x00000100, /**< Same as proxd flags above */
13399 WL_PROXD_SESSION_FLAG_TX_AUTO_BURST
= 0x00000200, /**< Same as proxd flags above */
13400 WL_PROXD_SESSION_FLAG_NAN_BSS
= 0x00000400, /**< Use NAN BSS, if applicable */
13401 WL_PROXD_SESSION_FLAG_TS1
= 0x00000800, /**< e.g. FTM1 - ASAP-capable */
13402 WL_PROXD_SESSION_FLAG_REPORT_FAILURE
= 0x00002000, /**< report failure to target */
13403 WL_PROXD_SESSION_FLAG_INITIATOR_RPT
= 0x00004000, /**< report distance to target */
13404 WL_PROXD_SESSION_FLAG_NOCHANSWT
= 0x00008000,
13405 WL_PROXD_SESSION_FLAG_NETRUAL
= 0x00010000, /**< netrual mode */
13406 WL_PROXD_SESSION_FLAG_SEQ_EN
= 0x00020000, /**< Toast */
13407 WL_PROXD_SESSION_FLAG_NO_PARAM_OVRD
= 0x00040000, /**< no param override from target */
13408 WL_PROXD_SESSION_FLAG_ASAP
= 0x00080000, /**< ASAP session */
13409 WL_PROXD_SESSION_FLAG_REQ_LCI
= 0x00100000, /**< transmit LCI req */
13410 WL_PROXD_SESSION_FLAG_REQ_CIV
= 0x00200000, /**< transmit civic loc req */
13411 WL_PROXD_SESSION_FLAG_PRE_SCAN
= 0x00400000, /* enable pre-scan for asap=1 */
13412 WL_PROXD_SESSION_FLAG_AUTO_VHTACK
= 0x00800000, /* use vhtack based on brcm ie */
13413 WL_PROXD_SESSION_FLAG_VHTACK
= 0x01000000, /* vht ack is in use - output only */
13414 WL_PROXD_SESSION_FLAG_BDUR_NOPREF
= 0x02000000, /* burst-duration: no preference */
13415 WL_PROXD_SESSION_FLAG_NUM_FTM_NOPREF
= 0x04000000, /* num of FTM frames: no preference */
13416 WL_PROXD_SESSION_FLAG_FTM_SEP_NOPREF
= 0x08000000, /* time btw FTM frams: no pref */
13417 WL_PROXD_SESSION_FLAG_NUM_BURST_NOPREF
= 0x10000000, /* num of bursts: no pref */
13418 WL_PROXD_SESSION_FLAG_BURST_PERIOD_NOPREF
= 0x20000000, /* burst period: no pref */
13419 WL_PROXD_SESSION_FLAG_MBURST_FOLLOWUP
= 0x40000000, /* new mburst algo - reserved */
13420 WL_PROXD_SESSION_FLAG_MBURST_NODELAY
= 0x80000000, /**< good until cancelled */
13421 WL_PROXD_SESSION_FLAG_ALL
= 0xffffffff
13424 typedef uint32 wl_proxd_session_flags_t
;
13426 /** time units - mc supports up to 0.1ns resolution */
13428 WL_PROXD_TMU_TU
= 0, /**< 1024us */
13429 WL_PROXD_TMU_SEC
= 1,
13430 WL_PROXD_TMU_MILLI_SEC
= 2,
13431 WL_PROXD_TMU_MICRO_SEC
= 3,
13432 WL_PROXD_TMU_NANO_SEC
= 4,
13433 WL_PROXD_TMU_PICO_SEC
= 5
13435 typedef int16 wl_proxd_tmu_t
;
13437 /** time interval e.g. 10ns */
13438 typedef struct wl_proxd_intvl
{
13440 wl_proxd_tmu_t tmu
;
13442 } wl_proxd_intvl_t
;
13444 /** commands that can apply to proxd, method or a session */
13446 WL_PROXD_CMD_NONE
= 0,
13447 WL_PROXD_CMD_GET_VERSION
= 1,
13448 WL_PROXD_CMD_ENABLE
= 2,
13449 WL_PROXD_CMD_DISABLE
= 3,
13450 WL_PROXD_CMD_CONFIG
= 4,
13451 WL_PROXD_CMD_START_SESSION
= 5,
13452 WL_PROXD_CMD_BURST_REQUEST
= 6,
13453 WL_PROXD_CMD_STOP_SESSION
= 7,
13454 WL_PROXD_CMD_DELETE_SESSION
= 8,
13455 WL_PROXD_CMD_GET_RESULT
= 9,
13456 WL_PROXD_CMD_GET_INFO
= 10,
13457 WL_PROXD_CMD_GET_STATUS
= 11,
13458 WL_PROXD_CMD_GET_SESSIONS
= 12,
13459 WL_PROXD_CMD_GET_COUNTERS
= 13,
13460 WL_PROXD_CMD_CLEAR_COUNTERS
= 14,
13461 WL_PROXD_CMD_COLLECT
= 15, /* not supported, see 'wl proxd_collect' */
13462 WL_PROXD_CMD_TUNE
= 16, /* not supported, see 'wl proxd_tune' */
13463 WL_PROXD_CMD_DUMP
= 17,
13464 WL_PROXD_CMD_START_RANGING
= 18,
13465 WL_PROXD_CMD_STOP_RANGING
= 19,
13466 WL_PROXD_CMD_GET_RANGING_INFO
= 20,
13467 WL_PROXD_CMD_IS_TLV_SUPPORTED
= 21,
13471 typedef int16 wl_proxd_cmd_t
;
13475 * ids 1..0x7fff - allocated by host/app
13476 * 0x8000-0xffff - allocated by firmware, used for auto/rx
13479 WL_PROXD_SESSION_ID_GLOBAL
= 0
13482 /* Externally allocated sids */
13483 #define WL_PROXD_SID_EXT_MAX 0x7fff
13484 #define WL_PROXD_SID_EXT_ALLOC(_sid) ((_sid) > 0 && (_sid) <= WL_PROXD_SID_EXT_MAX)
13486 /* block size for reserved sid blocks */
13487 #define WL_PROXD_SID_EXT_BLKSZ 256
13488 #define WL_PROXD_SID_EXT_BLK_START(_i) (WL_PROXD_SID_EXT_MAX - (_i) * WL_PROXD_SID_EXT_BLKSZ + 1)
13489 #define WL_PROXD_SID_EXT_BLK_END(_start) ((_start) + WL_PROXD_SID_EXT_BLKSZ - 1)
13492 #define WL_PROXD_SID_RRM_START WL_PROXD_SID_EXT_BLK_START(1)
13493 #define WL_PROXD_SID_RRM_END WL_PROXD_SID_EXT_BLK_END(WL_PROXD_SID_RRM_START)
13496 #define WL_PROXD_SID_NAN_START WL_PROXD_SID_EXT_BLK_START(2)
13497 #define WL_PROXD_SID_NAN_END WL_PROXD_SID_EXT_BLK_END(WL_PROXD_SID_NAN_START)
13499 /** maximum number sessions that can be allocated, may be less if tunable */
13500 #define WL_PROXD_MAX_SESSIONS 16
13502 typedef uint16 wl_proxd_session_id_t
;
13504 /** status - TBD BCME_ vs proxd status - range reserved for BCME_ */
13506 WL_PROXD_E_LAST
= -1056,
13507 WL_PROXD_E_NOAVAIL
= -1056,
13508 WL_PROXD_E_EXT_SCHED
= -1055,
13509 WL_PROXD_E_NOT_BCM
= -1054,
13510 WL_PROXD_E_FRAME_TYPE
= -1053,
13511 WL_PROXD_E_VERNOSUPPORT
= -1052,
13512 WL_PROXD_E_SEC_NOKEY
= -1051,
13513 WL_PROXD_E_SEC_POLICY
= -1050,
13514 WL_PROXD_E_SCAN_INPROCESS
= -1049,
13515 WL_PROXD_E_BAD_PARTIAL_TSF
= -1048,
13516 WL_PROXD_E_SCANFAIL
= -1047,
13517 WL_PROXD_E_NOTSF
= -1046,
13518 WL_PROXD_E_POLICY
= -1045,
13519 WL_PROXD_E_INCOMPLETE
= -1044,
13520 WL_PROXD_E_OVERRIDDEN
= -1043,
13521 WL_PROXD_E_ASAP_FAILED
= -1042,
13522 WL_PROXD_E_NOTSTARTED
= -1041,
13523 WL_PROXD_E_INVALIDMEAS
= -1040,
13524 WL_PROXD_E_INCAPABLE
= -1039,
13525 WL_PROXD_E_MISMATCH
= -1038,
13526 WL_PROXD_E_DUP_SESSION
= -1037,
13527 WL_PROXD_E_REMOTE_FAIL
= -1036,
13528 WL_PROXD_E_REMOTE_INCAPABLE
= -1035,
13529 WL_PROXD_E_SCHED_FAIL
= -1034,
13530 WL_PROXD_E_PROTO
= -1033,
13531 WL_PROXD_E_EXPIRED
= -1032,
13532 WL_PROXD_E_TIMEOUT
= -1031,
13533 WL_PROXD_E_NOACK
= -1030,
13534 WL_PROXD_E_DEFERRED
= -1029,
13535 WL_PROXD_E_INVALID_SID
= -1028,
13536 WL_PROXD_E_REMOTE_CANCEL
= -1027,
13537 WL_PROXD_E_CANCELED
= -1026, /**< local */
13538 WL_PROXD_E_INVALID_SESSION
= -1025,
13539 WL_PROXD_E_BAD_STATE
= -1024,
13540 WL_PROXD_E_START
= -1024,
13541 WL_PROXD_E_ERROR
= -1,
13544 typedef int32 wl_proxd_status_t
;
13546 /* proxd errors from phy */
13547 #define PROXD_TOF_INIT_ERR_BITS 16
13550 WL_PROXD_PHY_ERR_LB_CORR_THRESH
= (1 << 0), /* Loopback Correlation threshold */
13551 WL_PROXD_PHY_ERR_RX_CORR_THRESH
= (1 << 1), /* Received Correlation threshold */
13552 WL_PROXD_PHY_ERR_LB_PEAK_POWER
= (1 << 2), /* Loopback Peak power */
13553 WL_PROXD_PHY_ERR_RX_PEAK_POWER
= (1 << 3), /* Received Peak power */
13554 WL_PROXD_PHY_ERR_BITFLIP
= (1 << 4), /* Bitflips */
13555 WL_PROXD_PHY_ERR_SNR
= (1 << 5), /* SNR */
13556 WL_PROXD_PHY_RX_STRT_WIN_OFF
= (1 << 6), /* Receive start window is off */
13557 WL_PROXD_PHY_RX_END_WIN_OFF
= (1 << 7), /* Receive End window is off */
13558 WL_PROXD_PHY_ERR_LOW_CONFIDENCE
= (1 << 15), /* Low confidence on meas distance */
13560 typedef uint32 wl_proxd_phy_error_t
;
13562 /** session states */
13564 WL_PROXD_SESSION_STATE_NONE
= 0,
13565 WL_PROXD_SESSION_STATE_CREATED
= 1,
13566 WL_PROXD_SESSION_STATE_CONFIGURED
= 2,
13567 WL_PROXD_SESSION_STATE_STARTED
= 3,
13568 WL_PROXD_SESSION_STATE_DELAY
= 4,
13569 WL_PROXD_SESSION_STATE_USER_WAIT
= 5,
13570 WL_PROXD_SESSION_STATE_SCHED_WAIT
= 6,
13571 WL_PROXD_SESSION_STATE_BURST
= 7,
13572 WL_PROXD_SESSION_STATE_STOPPING
= 8,
13573 WL_PROXD_SESSION_STATE_ENDED
= 9,
13574 WL_PROXD_SESSION_STATE_START_WAIT
= 10,
13575 WL_PROXD_SESSION_STATE_DESTROYING
= -1
13577 typedef int16 wl_proxd_session_state_t
;
13579 /** RTT sample flags */
13581 WL_PROXD_RTT_SAMPLE_NONE
= 0x00,
13582 WL_PROXD_RTT_SAMPLE_DISCARD
= 0x01
13584 typedef uint8 wl_proxd_rtt_sample_flags_t
;
13585 typedef int16 wl_proxd_rssi_t
;
13586 typedef uint16 wl_proxd_snr_t
;
13587 typedef uint16 wl_proxd_bitflips_t
;
13589 /** result flags */
13591 WL_PRXOD_RESULT_FLAG_NONE
= 0x0000,
13592 WL_PROXD_RESULT_FLAG_NLOS
= 0x0001, /**< LOS - if available */
13593 WL_PROXD_RESULT_FLAG_LOS
= 0x0002, /**< NLOS - if available */
13594 WL_PROXD_RESULT_FLAG_FATAL
= 0x0004, /**< Fatal error during burst */
13595 WL_PROXD_RESULT_FLAG_VHTACK
= 0x0008, /* VHTACK or Legacy ACK used */
13596 WL_PROXD_REQUEST_SENT
= 0x0010, /* FTM request was sent */
13597 WL_PROXD_REQUEST_ACKED
= 0x0020, /* FTM request was acked */
13598 WL_PROXD_LTFSEQ_STARTED
= 0x0040, /* LTF sequence started */
13599 WL_PROXD_RESULT_FLAG_ALL
= 0xffff
13601 typedef int16 wl_proxd_result_flags_t
;
13603 #define WL_PROXD_RTT_SAMPLE_VERSION_1 1
13604 typedef struct wl_proxd_rtt_sample_v1
{
13605 uint8 id
; /**< id for the sample - non-zero */
13606 wl_proxd_rtt_sample_flags_t flags
;
13607 wl_proxd_rssi_t rssi
;
13608 wl_proxd_intvl_t rtt
; /**< round trip time */
13610 wl_proxd_snr_t snr
;
13611 wl_proxd_bitflips_t bitflips
;
13612 wl_proxd_status_t status
;
13614 wl_proxd_phy_error_t tof_phy_error
;
13615 wl_proxd_phy_error_t tof_tgt_phy_error
; /* target phy error bit map */
13616 wl_proxd_snr_t tof_tgt_snr
;
13617 wl_proxd_bitflips_t tof_tgt_bitflips
;
13620 } wl_proxd_rtt_sample_v1_t
;
13622 #define WL_PROXD_RTT_RESULT_VERSION_1 1
13623 /** rtt measurement result */
13624 typedef struct wl_proxd_rtt_result_v1
{
13625 wl_proxd_session_id_t sid
;
13626 wl_proxd_result_flags_t flags
;
13627 wl_proxd_status_t status
;
13628 struct ether_addr peer
;
13629 wl_proxd_session_state_t state
; /**< current state */
13631 wl_proxd_intvl_t retry_after
; /* hint for errors */
13632 wl_proxd_intvl_t burst_duration
; /* burst duration */
13634 wl_proxd_rtt_sample_v1_t avg_rtt
;
13635 uint32 avg_dist
; /* 1/256m units */
13636 uint16 sd_rtt
; /* RTT standard deviation */
13637 uint8 num_valid_rtt
; /* valid rtt cnt */
13638 uint8 num_ftm
; /* actual num of ftm cnt (Configured) */
13639 uint16 burst_num
; /* in a session */
13640 uint16 num_rtt
; /* 0 if no detail */
13641 uint16 num_meas
; /* number of ftm frames seen OTA */
13643 wl_proxd_rtt_sample_v1_t rtt
[1]; /* variable */
13644 } wl_proxd_rtt_result_v1_t
;
13646 #define WL_PROXD_RTT_SAMPLE_VERSION_2 2
13647 typedef struct wl_proxd_rtt_sample_v2
{
13650 uint8 id
; /**< id for the sample - non-zero */
13651 wl_proxd_rtt_sample_flags_t flags
;
13652 wl_proxd_rssi_t rssi
;
13653 wl_proxd_intvl_t rtt
; /**< round trip time */
13655 wl_proxd_snr_t snr
;
13656 wl_proxd_bitflips_t bitflips
;
13657 wl_proxd_status_t status
;
13659 wl_proxd_phy_error_t tof_phy_error
;
13660 wl_proxd_phy_error_t tof_tgt_phy_error
; /* target phy error bit map */
13661 wl_proxd_snr_t tof_tgt_snr
;
13662 wl_proxd_bitflips_t tof_tgt_bitflips
;
13666 } wl_proxd_rtt_sample_v2_t
;
13668 #define WL_PROXD_RTT_RESULT_VERSION_2 2
13669 /** rtt measurement result */
13670 typedef struct wl_proxd_rtt_result_v2
{
13672 uint16 length
; /* up to rtt[] */
13673 wl_proxd_session_id_t sid
;
13674 wl_proxd_result_flags_t flags
;
13675 wl_proxd_status_t status
;
13676 struct ether_addr peer
;
13677 wl_proxd_session_state_t state
; /**< current state */
13679 wl_proxd_intvl_t retry_after
; /* hint for errors */
13680 wl_proxd_intvl_t burst_duration
; /* burst duration */
13682 uint32 avg_dist
; /* 1/256m units */
13683 uint16 sd_rtt
; /* RTT standard deviation */
13684 uint8 num_valid_rtt
; /* valid rtt cnt */
13685 uint8 num_ftm
; /* actual num of ftm cnt (Configured) */
13686 uint16 burst_num
; /* in a session */
13687 uint16 num_rtt
; /* 0 if no detail */
13688 uint16 num_meas
; /* number of ftm frames seen OTA */
13690 wl_proxd_rtt_sample_v2_t rtt
[1]; /* variable, first element is avg_rtt */
13691 } wl_proxd_rtt_result_v2_t
;
13693 /** aoa measurement result */
13694 typedef struct wl_proxd_aoa_result
{
13695 wl_proxd_session_id_t sid
;
13696 wl_proxd_result_flags_t flags
;
13697 wl_proxd_status_t status
;
13698 struct ether_addr peer
;
13699 wl_proxd_session_state_t state
;
13702 /* wl_proxd_aoa_sample_t sample_avg; TBD */
13703 } BWL_POST_PACKED_STRUCT wl_proxd_aoa_result_t
;
13704 #include <packed_section_end.h>
13706 /** global stats */
13707 typedef struct wl_proxd_counters
{
13708 uint32 tx
; /* tx frame count */
13709 uint32 rx
; /* rx frame count */
13710 uint32 burst
; /* total number of burst */
13711 uint32 sessions
; /* total number of sessions */
13712 uint32 max_sessions
; /* max concurrency */
13713 uint32 sched_fail
; /* scheduling failures */
13714 uint32 timeouts
; /* timeouts */
13715 uint32 protoerr
; /* protocol errors */
13716 uint32 noack
; /* tx w/o ack */
13717 uint32 txfail
; /* any tx falure */
13718 uint32 lci_req_tx
; /* tx LCI requests */
13719 uint32 lci_req_rx
; /* rx LCI requests */
13720 uint32 lci_rep_tx
; /* tx LCI reports */
13721 uint32 lci_rep_rx
; /* rx LCI reports */
13722 uint32 civic_req_tx
; /* tx civic requests */
13723 uint32 civic_req_rx
; /* rx civic requests */
13724 uint32 civic_rep_tx
; /* tx civic reports */
13725 uint32 civic_rep_rx
; /* rx civic reports */
13726 uint32 rctx
; /* ranging contexts created */
13727 uint32 rctx_done
; /* count of ranging done */
13728 uint32 publish_err
; /* availability publishing errors */
13729 uint32 on_chan
; /* count of scheduler onchan */
13730 uint32 off_chan
; /* count of scheduler offchan */
13731 uint32 tsf_lo
; /* local tsf or session tsf */
13734 } wl_proxd_counters_t
;
13736 typedef struct wl_proxd_counters wl_proxd_session_counters_t
;
13739 WL_PROXD_CAP_NONE
= 0x0000,
13740 WL_PROXD_CAP_ALL
= 0xffff
13742 typedef int16 wl_proxd_caps_t
;
13744 /** method capabilities */
13746 WL_PROXD_FTM_CAP_NONE
= 0x0000,
13747 WL_PROXD_FTM_CAP_FTM1
= 0x0001
13749 typedef uint16 wl_proxd_ftm_caps_t
;
13751 typedef struct wl_proxd_tlv_id_list
{
13754 } wl_proxd_tlv_id_list_t
;
13756 typedef struct wl_proxd_session_id_list
{
13758 wl_proxd_session_id_t ids
[1];
13759 } wl_proxd_session_id_list_t
;
13761 typedef struct wl_proxd_tpk
{
13762 struct ether_addr peer
;
13763 uint8 tpk
[TPK_FTM_LEN
];
13766 /* tlvs returned for get_info on ftm method
13771 * session defaults (session tlvs)
13772 * status tlv - not supported for ftm method
13775 typedef struct wl_proxd_ftm_info
{
13776 wl_proxd_ftm_caps_t caps
;
13777 uint16 max_sessions
;
13778 uint16 num_sessions
;
13779 uint16 rx_max_burst
;
13780 } wl_proxd_ftm_info_t
;
13783 WL_PROXD_WAIT_NONE
= 0x0000,
13784 WL_PROXD_WAIT_KEY
= 0x0001,
13785 WL_PROXD_WAIT_SCHED
= 0x0002,
13786 WL_PROXD_WAIT_TSF
= 0x0004
13788 typedef int16 wl_proxd_wait_reason_t
;
13790 /* tlvs returned for get_info on session
13791 * session config (tlvs)
13794 typedef struct wl_proxd_ftm_session_info
{
13798 struct ether_addr bssid
;
13799 wl_proxd_session_state_t state
;
13800 wl_proxd_status_t status
;
13802 wl_proxd_wait_reason_t wait_reason
;
13803 uint32 meas_start_lo
; /* sn tsf of 1st meas for cur/prev burst */
13804 uint32 meas_start_hi
;
13805 } wl_proxd_ftm_session_info_t
;
13807 typedef struct wl_proxd_ftm_session_status
{
13809 wl_proxd_session_state_t state
;
13810 wl_proxd_status_t status
;
13813 } wl_proxd_ftm_session_status_t
;
13815 /** rrm range request */
13816 typedef struct wl_proxd_range_req
{
13818 uint16 init_delay_range
; /**< in TUs */
13820 uint8 num_nbr
; /**< number of (possible) neighbors */
13821 nbr_element_t nbr
[1];
13822 } wl_proxd_range_req_t
;
13824 #define WL_PROXD_LCI_LAT_OFF 0
13825 #define WL_PROXD_LCI_LONG_OFF 5
13826 #define WL_PROXD_LCI_ALT_OFF 10
13828 #define WL_PROXD_LCI_GET_LAT(_lci, _lat, _lat_err) { \
13829 unsigned _off = WL_PROXD_LCI_LAT_OFF; \
13830 _lat_err = (_lci)->data[(_off)] & 0x3f; \
13831 _lat = (_lci)->data[(_off)+1]; \
13832 _lat |= (_lci)->data[(_off)+2] << 8; \
13833 _lat |= (_lci)->data[_(_off)+3] << 16; \
13834 _lat |= (_lci)->data[(_off)+4] << 24; \
13836 _lat |= (_lci)->data[(_off)] >> 6; \
13839 #define WL_PROXD_LCI_GET_LONG(_lci, _lcilong, _long_err) { \
13840 unsigned _off = WL_PROXD_LCI_LONG_OFF; \
13841 _long_err = (_lci)->data[(_off)] & 0x3f; \
13842 _lcilong = (_lci)->data[(_off)+1]; \
13843 _lcilong |= (_lci)->data[(_off)+2] << 8; \
13844 _lcilong |= (_lci)->data[_(_off)+3] << 16; \
13845 _lcilong |= (_lci)->data[(_off)+4] << 24; \
13847 _lcilong |= (_lci)->data[(_off)] >> 6; \
13850 #define WL_PROXD_LCI_GET_ALT(_lci, _alt_type, _alt, _alt_err) { \
13851 unsigned _off = WL_PROXD_LCI_ALT_OFF; \
13852 _alt_type = (_lci)->data[_off] & 0x0f; \
13853 _alt_err = (_lci)->data[(_off)] >> 4; \
13854 _alt_err |= ((_lci)->data[(_off)+1] & 0x03) << 4; \
13855 _alt = (_lci)->data[(_off)+2]; \
13856 _alt |= (_lci)->data[(_off)+3] << 8; \
13857 _alt |= (_lci)->data[_(_off)+4] << 16; \
13859 _alt |= (_lci)->data[(_off) + 1] >> 2; \
13862 #define WL_PROXD_LCI_VERSION(_lci) ((_lci)->data[15] >> 6)
13864 /* availability. advertising mechanism bss specific */
13865 /** availablity flags */
13867 WL_PROXD_AVAIL_NONE
= 0,
13868 WL_PROXD_AVAIL_NAN_PUBLISHED
= 0x0001,
13869 WL_PROXD_AVAIL_SCHEDULED
= 0x0002 /**< scheduled by proxd */
13871 typedef int16 wl_proxd_avail_flags_t
;
13873 /** time reference */
13875 WL_PROXD_TREF_NONE
= 0,
13876 WL_PROXD_TREF_DEV_TSF
= 1,
13877 WL_PROXD_TREF_NAN_DW
= 2,
13878 WL_PROXD_TREF_TBTT
= 3,
13879 WL_PROXD_TREF_MAX
/* last entry */
13881 typedef int16 wl_proxd_time_ref_t
;
13883 /** proxd channel-time slot */
13885 wl_proxd_intvl_t start
; /**< from ref */
13886 wl_proxd_intvl_t duration
; /**< from start */
13888 } wl_proxd_time_slot_t
;
13890 typedef struct wl_proxd_avail24
{
13891 wl_proxd_avail_flags_t flags
; /**< for query only */
13892 wl_proxd_time_ref_t time_ref
;
13893 uint16 max_slots
; /**< for query only */
13895 wl_proxd_time_slot_t slots
[1]; /**< ROM compat - not used */
13896 wl_proxd_intvl_t repeat
;
13897 wl_proxd_time_slot_t ts0
[1];
13898 } wl_proxd_avail24_t
;
13899 #define WL_PROXD_AVAIL24_TIMESLOT(_avail24, _i) (&(_avail24)->ts0[(_i)])
13900 #define WL_PROXD_AVAIL24_TIMESLOT_OFFSET(_avail24) OFFSETOF(wl_proxd_avail24_t, ts0)
13901 #define WL_PROXD_AVAIL24_TIMESLOTS(_avail24) WL_PROXD_AVAIL24_TIMESLOT(_avail24, 0)
13902 #define WL_PROXD_AVAIL24_SIZE(_avail24, _num_slots) (\
13903 WL_PROXD_AVAIL24_TIMESLOT_OFFSET(_avail24) + \
13904 (_num_slots) * sizeof(*WL_PROXD_AVAIL24_TIMESLOT(_avail24, 0)))
13906 typedef struct wl_proxd_avail
{
13907 wl_proxd_avail_flags_t flags
; /**< for query only */
13908 wl_proxd_time_ref_t time_ref
;
13909 uint16 max_slots
; /**< for query only */
13911 wl_proxd_intvl_t repeat
;
13912 wl_proxd_time_slot_t slots
[1];
13913 } wl_proxd_avail_t
;
13914 #define WL_PROXD_AVAIL_TIMESLOT(_avail, _i) (&(_avail)->slots[(_i)])
13915 #define WL_PROXD_AVAIL_TIMESLOT_OFFSET(_avail) OFFSETOF(wl_proxd_avail_t, slots)
13917 #define WL_PROXD_AVAIL_TIMESLOTS(_avail) WL_PROXD_AVAIL_TIMESLOT(_avail, 0)
13918 #define WL_PROXD_AVAIL_SIZE(_avail, _num_slots) (\
13919 WL_PROXD_AVAIL_TIMESLOT_OFFSET(_avail) + \
13920 (_num_slots) * sizeof(*WL_PROXD_AVAIL_TIMESLOT(_avail, 0)))
13922 /* collect support TBD */
13926 WL_PROXD_DEBUG_NONE
= 0x00000000,
13927 WL_PROXD_DEBUG_LOG
= 0x00000001,
13928 WL_PROXD_DEBUG_IOV
= 0x00000002,
13929 WL_PROXD_DEBUG_EVENT
= 0x00000004,
13930 WL_PROXD_DEBUG_SESSION
= 0x00000008,
13931 WL_PROXD_DEBUG_PROTO
= 0x00000010,
13932 WL_PROXD_DEBUG_SCHED
= 0x00000020,
13933 WL_PROXD_DEBUG_RANGING
= 0x00000040,
13934 WL_PROXD_DEBUG_NAN
= 0x00000080,
13935 WL_PROXD_DEBUG_PKT
= 0x00000100,
13936 WL_PROXD_DEBUG_SEC
= 0x00000200,
13937 WL_PROXD_DEBUG_EVENTLOG
= 0x80000000, /* map/enable EVNET_LOG_TAG_PROXD_INFO */
13938 WL_PROXD_DEBUG_ALL
= 0xffffffff
13940 typedef uint32 wl_proxd_debug_mask_t
;
13942 /** tlv IDs - data length 4 bytes unless overridden by type, alignment 32 bits */
13944 WL_PROXD_TLV_ID_NONE
= 0,
13945 WL_PROXD_TLV_ID_METHOD
= 1,
13946 WL_PROXD_TLV_ID_FLAGS
= 2,
13947 WL_PROXD_TLV_ID_CHANSPEC
= 3, /**< note: uint32 */
13948 WL_PROXD_TLV_ID_TX_POWER
= 4,
13949 WL_PROXD_TLV_ID_RATESPEC
= 5,
13950 WL_PROXD_TLV_ID_BURST_DURATION
= 6, /**< intvl - length of burst */
13951 WL_PROXD_TLV_ID_BURST_PERIOD
= 7, /**< intvl - between bursts */
13952 WL_PROXD_TLV_ID_BURST_FTM_SEP
= 8, /**< intvl - between FTMs */
13953 WL_PROXD_TLV_ID_BURST_NUM_FTM
= 9, /**< uint16 - per burst */
13954 WL_PROXD_TLV_ID_NUM_BURST
= 10, /**< uint16 */
13955 WL_PROXD_TLV_ID_FTM_RETRIES
= 11, /**< uint16 at FTM level */
13956 WL_PROXD_TLV_ID_BSS_INDEX
= 12, /**< uint8 */
13957 WL_PROXD_TLV_ID_BSSID
= 13,
13958 WL_PROXD_TLV_ID_INIT_DELAY
= 14, /**< intvl - optional,non-standalone only */
13959 WL_PROXD_TLV_ID_BURST_TIMEOUT
= 15, /**< expect response within - intvl */
13960 WL_PROXD_TLV_ID_EVENT_MASK
= 16, /**< interested events - in/out */
13961 WL_PROXD_TLV_ID_FLAGS_MASK
= 17, /**< interested flags - in only */
13962 WL_PROXD_TLV_ID_PEER_MAC
= 18, /**< mac address of peer */
13963 WL_PROXD_TLV_ID_FTM_REQ
= 19, /**< dot11_ftm_req */
13964 WL_PROXD_TLV_ID_LCI_REQ
= 20,
13965 WL_PROXD_TLV_ID_LCI
= 21,
13966 WL_PROXD_TLV_ID_CIVIC_REQ
= 22,
13967 WL_PROXD_TLV_ID_CIVIC
= 23,
13968 WL_PROXD_TLV_ID_AVAIL24
= 24, /**< ROM compatibility */
13969 WL_PROXD_TLV_ID_SESSION_FLAGS
= 25,
13970 WL_PROXD_TLV_ID_SESSION_FLAGS_MASK
= 26, /**< in only */
13971 WL_PROXD_TLV_ID_RX_MAX_BURST
= 27, /**< uint16 - limit bursts per session */
13972 WL_PROXD_TLV_ID_RANGING_INFO
= 28, /**< ranging info */
13973 WL_PROXD_TLV_ID_RANGING_FLAGS
= 29, /**< uint16 */
13974 WL_PROXD_TLV_ID_RANGING_FLAGS_MASK
= 30, /**< uint16, in only */
13975 WL_PROXD_TLV_ID_NAN_MAP_ID
= 31,
13976 WL_PROXD_TLV_ID_DEV_ADDR
= 32,
13977 WL_PROXD_TLV_ID_AVAIL
= 33, /**< wl_proxd_avail_t */
13978 WL_PROXD_TLV_ID_TLV_ID
= 34, /* uint16 tlv-id */
13979 WL_PROXD_TLV_ID_FTM_REQ_RETRIES
= 35, /* uint16 FTM request retries */
13980 WL_PROXD_TLV_ID_TPK
= 36, /* 32byte TPK */
13981 WL_PROXD_TLV_ID_RI_RR
= 36, /* RI_RR */
13982 WL_PROXD_TLV_ID_TUNE
= 37, /* wl_proxd_pararms_tof_tune_t */
13983 WL_PROXD_TLV_ID_CUR_ETHER_ADDR
= 38, /* Source Address used for Tx */
13985 /* output - 512 + x */
13986 WL_PROXD_TLV_ID_STATUS
= 512,
13987 WL_PROXD_TLV_ID_COUNTERS
= 513,
13988 WL_PROXD_TLV_ID_INFO
= 514,
13989 WL_PROXD_TLV_ID_RTT_RESULT
= 515,
13990 WL_PROXD_TLV_ID_AOA_RESULT
= 516,
13991 WL_PROXD_TLV_ID_SESSION_INFO
= 517,
13992 WL_PROXD_TLV_ID_SESSION_STATUS
= 518,
13993 WL_PROXD_TLV_ID_SESSION_ID_LIST
= 519,
13994 WL_PROXD_TLV_ID_RTT_RESULT_V2
= 520,
13996 /* debug tlvs can be added starting 1024 */
13997 WL_PROXD_TLV_ID_DEBUG_MASK
= 1024,
13998 WL_PROXD_TLV_ID_COLLECT
= 1025, /**< output only */
13999 WL_PROXD_TLV_ID_STRBUF
= 1026,
14001 WL_PROXD_TLV_ID_COLLECT_HEADER
= 1025, /* wl_proxd_collect_header_t */
14002 WL_PROXD_TLV_ID_COLLECT_INFO
= 1028, /* wl_proxd_collect_info_t */
14003 WL_PROXD_TLV_ID_COLLECT_DATA
= 1029, /* wl_proxd_collect_data_t */
14004 WL_PROXD_TLV_ID_COLLECT_CHAN_DATA
= 1030, /* wl_proxd_collect_data_t */
14005 WL_PROXD_TLV_ID_MF_STATS_DATA
= 1031, /* mf_stats_buffer */
14007 WL_PROXD_TLV_ID_MAX
14010 typedef struct wl_proxd_tlv
{
14016 /** proxd iovar - applies to proxd, method or session */
14017 typedef struct wl_proxd_iov
{
14020 wl_proxd_cmd_t cmd
;
14021 wl_proxd_method_t method
;
14022 wl_proxd_session_id_t sid
;
14024 wl_proxd_tlv_t tlvs
[1]; /**< variable */
14027 #define WL_PROXD_IOV_HDR_SIZE OFFSETOF(wl_proxd_iov_t, tlvs)
14029 /* The following event definitions may move to bcmevent.h, but sharing proxd types
14030 * across needs more invasive changes unrelated to proxd
14033 WL_PROXD_EVENT_NONE
= 0, /**< not an event, reserved */
14034 WL_PROXD_EVENT_SESSION_CREATE
= 1,
14035 WL_PROXD_EVENT_SESSION_START
= 2,
14036 WL_PROXD_EVENT_FTM_REQ
= 3,
14037 WL_PROXD_EVENT_BURST_START
= 4,
14038 WL_PROXD_EVENT_BURST_END
= 5,
14039 WL_PROXD_EVENT_SESSION_END
= 6,
14040 WL_PROXD_EVENT_SESSION_RESTART
= 7,
14041 WL_PROXD_EVENT_BURST_RESCHED
= 8, /**< burst rescheduled-e.g. partial TSF */
14042 WL_PROXD_EVENT_SESSION_DESTROY
= 9,
14043 WL_PROXD_EVENT_RANGE_REQ
= 10,
14044 WL_PROXD_EVENT_FTM_FRAME
= 11,
14045 WL_PROXD_EVENT_DELAY
= 12,
14046 WL_PROXD_EVENT_VS_INITIATOR_RPT
= 13, /**< (target) rx initiator-report */
14047 WL_PROXD_EVENT_RANGING
= 14,
14048 WL_PROXD_EVENT_LCI_MEAS_REP
= 15, /* LCI measurement report */
14049 WL_PROXD_EVENT_CIVIC_MEAS_REP
= 16, /* civic measurement report */
14050 WL_PROXD_EVENT_COLLECT
= 17,
14051 WL_PROXD_EVENT_START_WAIT
= 18, /* waiting to start */
14052 WL_PROXD_EVENT_MF_STATS
= 19, /* mf stats event */
14056 typedef int16 wl_proxd_event_type_t
;
14058 /** proxd event mask - upto 32 events for now */
14059 typedef uint32 wl_proxd_event_mask_t
;
14061 #define WL_PROXD_EVENT_MASK_ALL 0xfffffffe
14062 #define WL_PROXD_EVENT_MASK_EVENT(_event_type) (1 << (_event_type))
14063 #define WL_PROXD_EVENT_ENABLED(_mask, _event_type) (\
14064 ((_mask) & WL_PROXD_EVENT_MASK_EVENT(_event_type)) != 0)
14066 /** proxd event - applies to proxd, method or session */
14067 typedef struct wl_proxd_event
{
14070 wl_proxd_event_type_t type
;
14071 wl_proxd_method_t method
;
14072 wl_proxd_session_id_t sid
;
14074 wl_proxd_tlv_t tlvs
[1]; /**< variable */
14075 } wl_proxd_event_t
;
14078 WL_PROXD_RANGING_STATE_NONE
= 0,
14079 WL_PROXD_RANGING_STATE_NOTSTARTED
= 1,
14080 WL_PROXD_RANGING_STATE_INPROGRESS
= 2,
14081 WL_PROXD_RANGING_STATE_DONE
= 3
14083 typedef int16 wl_proxd_ranging_state_t
;
14085 /** proxd ranging flags */
14087 WL_PROXD_RANGING_FLAG_NONE
= 0x0000, /**< no flags */
14088 WL_PROXD_RANGING_FLAG_DEL_SESSIONS_ON_STOP
= 0x0001,
14089 WL_PROXD_RANGING_FLAG_ALL
= 0xffff
14091 typedef uint16 wl_proxd_ranging_flags_t
;
14093 struct wl_proxd_ranging_info
{
14094 wl_proxd_status_t status
;
14095 wl_proxd_ranging_state_t state
;
14096 wl_proxd_ranging_flags_t flags
;
14100 typedef struct wl_proxd_ranging_info wl_proxd_ranging_info_t
;
14102 #include <packed_section_start.h>
14103 /* Legacy platform i.e. 43342/43430 */
14104 #define WL_PROXD_COLLECT_EVENT_DATA_VERSION_1 1
14105 typedef BWL_PRE_PACKED_STRUCT
struct wl_proxd_collect_event_data_v1
{
14106 uint32 H_LB
[K_TOF_COLLECT_H_SIZE_20MHZ
];
14107 uint32 H_RX
[K_TOF_COLLECT_H_SIZE_20MHZ
];
14108 uint8 ri_rr
[FTM_TPK_LEN
];
14109 wl_proxd_phy_error_t phy_err_mask
;
14110 } BWL_POST_PACKED_STRUCT wl_proxd_collect_event_data_v1_t
;
14112 /* Secured 2.0 supoorted devices i.e. 4364 */
14113 #define WL_PROXD_COLLECT_EVENT_DATA_VERSION_2 2
14114 typedef BWL_PRE_PACKED_STRUCT
struct wl_proxd_collect_event_data_v2
{
14115 uint32 H_LB
[K_TOF_COLLECT_H_SIZE_20MHZ
];
14116 uint32 H_RX
[K_TOF_COLLECT_H_SIZE_20MHZ
];
14117 uint8 ri_rr
[FTM_TPK_RI_RR_LEN_SECURE_2_0
];
14118 wl_proxd_phy_error_t phy_err_mask
;
14119 } BWL_POST_PACKED_STRUCT wl_proxd_collect_event_data_v2_t
;
14120 #include <packed_section_end.h>
14122 #define WL_PROXD_COLLECT_EVENT_DATA_VERSION_3 3
14123 typedef struct wl_proxd_collect_event_data_v3
{
14126 uint32 H_LB
[K_TOF_COLLECT_H_SIZE_20MHZ
];
14127 uint32 H_RX
[K_TOF_COLLECT_H_SIZE_20MHZ
];
14128 uint8 ri_rr
[FTM_TPK_RI_RR_LEN_SECURE_2_0
];
14129 wl_proxd_phy_error_t phy_err_mask
;
14130 } wl_proxd_collect_event_data_v3_t
;
14132 #define WL_PROXD_COLLECT_EVENT_DATA_VERSION_MAX WL_PROXD_COLLECT_EVENT_DATA_VERSION_3
14134 /** Data returned by the bssload_report iovar. This is also the WLC_E_BSS_LOAD event data */
14135 #include <packed_section_start.h>
14136 typedef BWL_PRE_PACKED_STRUCT
struct wl_bssload
{
14137 uint16 sta_count
; /**< station count */
14138 uint16 aac
; /**< available admission capacity */
14139 uint8 chan_util
; /**< channel utilization */
14140 } BWL_POST_PACKED_STRUCT wl_bssload_t
;
14141 #include <packed_section_end.h>
14144 * Maximum number of configurable BSS Load levels. The number of BSS Load
14145 * ranges is always 1 more than the number of configured levels. eg. if
14146 * 3 levels of 10, 20, 30 are configured then this defines 4 load ranges:
14147 * 0-10, 11-20, 21-30, 31-255. A WLC_E_BSS_LOAD event is generated each time
14148 * the utilization level crosses into another range, subject to the rate limit.
14150 #define MAX_BSSLOAD_LEVELS 8
14151 #define MAX_BSSLOAD_RANGES (MAX_BSSLOAD_LEVELS + 1)
14153 /** BSS Load event notification configuration. */
14154 typedef struct wl_bssload_cfg
{
14155 uint32 rate_limit_msec
; /**< # of events posted to application will be limited to
14156 * one per specified period (0 to disable rate limit).
14158 uint8 num_util_levels
; /**< Number of entries in util_levels[] below */
14159 uint8 util_levels
[MAX_BSSLOAD_LEVELS
];
14160 /**< Variable number of BSS Load utilization levels in
14161 * low to high order. An event will be posted each time
14162 * a received beacon's BSS Load IE channel utilization
14163 * value crosses a level.
14166 } wl_bssload_cfg_t
;
14168 /** Multiple roaming profile suport */
14169 #define WL_MAX_ROAM_PROF_BRACKETS 4
14171 #define WL_ROAM_PROF_VER_0 0
14172 #define WL_ROAM_PROF_VER_1 1
14173 #define WL_MAX_ROAM_PROF_VER WL_ROAM_PROF_VER_1
14175 #define WL_ROAM_PROF_NONE (0 << 0)
14176 #define WL_ROAM_PROF_LAZY (1 << 0)
14177 #define WL_ROAM_PROF_NO_CI (1 << 1)
14178 #define WL_ROAM_PROF_SUSPEND (1 << 2)
14179 #define WL_ROAM_PROF_SYNC_DTIM (1 << 6)
14180 #define WL_ROAM_PROF_DEFAULT (1 << 7) /**< backward compatible single default profile */
14182 #define WL_FACTOR_TABLE_MAX_LIMIT 5
14184 #define WL_CU_2G_ROAM_TRIGGER (-60)
14185 #define WL_CU_5G_ROAM_TRIGGER (-70)
14187 #define WL_CU_SCORE_DELTA_DEFAULT 20
14189 #define WL_MAX_CHANNEL_USAGE 0x0FF
14190 #define WL_CU_PERCENTAGE_DISABLE 0
14191 #define WL_CU_PERCENTAGE_DEFAULT 70
14192 #define WL_CU_PERCENTAGE_MAX 100
14193 #define WL_CU_CALC_DURATION_DEFAULT 10 /* seconds */
14194 #define WL_CU_CALC_DURATION_MAX 60 /* seconds */
14196 typedef struct wl_roam_prof_v2
{
14197 int8 roam_flags
; /**< bit flags */
14198 int8 roam_trigger
; /**< RSSI trigger level per profile/RSSI bracket */
14202 /* if channel_usage if zero, roam_delta is rssi delta required for new AP */
14203 /* if channel_usage if non-zero, roam_delta is score delta(%) required for new AP */
14204 int8 rssi_boost_thresh
; /**< Min RSSI to qualify for RSSI boost */
14205 int8 rssi_boost_delta
; /**< RSSI boost for AP in the other band */
14206 uint16 nfscan
; /**< number of full scan to start with */
14207 uint16 fullscan_period
;
14208 uint16 init_scan_period
;
14209 uint16 backoff_multiplier
;
14210 uint16 max_scan_period
;
14211 uint8 channel_usage
;
14212 uint8 cu_avg_calc_dur
;
14214 } wl_roam_prof_v2_t
;
14216 typedef struct wl_roam_prof_v1
{
14217 int8 roam_flags
; /**< bit flags */
14218 int8 roam_trigger
; /**< RSSI trigger level per profile/RSSI bracket */
14222 /* if channel_usage if zero, roam_delta is rssi delta required for new AP */
14223 /* if channel_usage if non-zero, roam_delta is score delta(%) required for new AP */
14224 int8 rssi_boost_thresh
; /**< Min RSSI to qualify for RSSI boost */
14225 int8 rssi_boost_delta
; /**< RSSI boost for AP in the other band */
14226 uint16 nfscan
; /**< number of full scan to start with */
14227 uint16 fullscan_period
;
14228 uint16 init_scan_period
;
14229 uint16 backoff_multiplier
;
14230 uint16 max_scan_period
;
14231 } wl_roam_prof_v1_t
;
14233 typedef struct wl_roam_prof_band_v2
{
14234 uint32 band
; /**< Must be just one band */
14235 uint16 ver
; /**< version of this struct */
14236 uint16 len
; /**< length in bytes of this structure */
14237 wl_roam_prof_v2_t roam_prof
[WL_MAX_ROAM_PROF_BRACKETS
];
14238 } wl_roam_prof_band_v2_t
;
14240 typedef struct wl_roam_prof_band_v1
{
14241 uint32 band
; /**< Must be just one band */
14242 uint16 ver
; /**< version of this struct */
14243 uint16 len
; /**< length in bytes of this structure */
14244 wl_roam_prof_v1_t roam_prof
[WL_MAX_ROAM_PROF_BRACKETS
];
14245 } wl_roam_prof_band_v1_t
;
14247 #define BSS_MAXTABLE_SIZE 10
14248 #define WNM_BSS_SELECT_FACTOR_VERSION 1
14249 typedef struct wnm_bss_select_factor_params
{
14254 } wnm_bss_select_factor_params_t
;
14256 #define WNM_BSS_SELECT_FIXED_SIZE OFFSETOF(wnm_bss_select_factor_cfg_t, params)
14257 typedef struct wnm_bss_select_factor_cfg
{
14263 wnm_bss_select_factor_params_t params
[1];
14264 } wnm_bss_select_factor_cfg_t
;
14266 #define WNM_BSS_SELECT_WEIGHT_VERSION 1
14267 typedef struct wnm_bss_select_weight_cfg
{
14271 uint16 weight
; /* weightage for each type between 0 to 100 */
14272 } wnm_bss_select_weight_cfg_t
;
14274 /* For branches before koala .. wbtext is part
14275 * of wnm need to use below type only
14277 typedef struct wnm_btm_default_score_cfg
{
14278 uint32 default_score
; /* default score */
14280 } wnm_btm_default_score_cfg_t
;
14282 /* For branches from koala and above .. wbtext is
14283 * seperate module..need to use below type only
14285 typedef struct wbtext_btm_default_score_cfg
{
14286 uint32 default_score
; /* default score */
14288 } wbtext_btm_default_score_cfg_t
;
14290 #define WNM_BSS_SELECT_TYPE_RSSI 0
14291 #define WNM_BSS_SELECT_TYPE_CU 1
14293 #define WNM_BSSLOAD_MONITOR_VERSION 1
14294 typedef struct wnm_bssload_monitor_cfg
{
14297 uint8 duration
; /* duration between 1 to 20sec */
14298 } wnm_bssload_monitor_cfg_t
;
14300 #define WNM_ROAM_TRIGGER_VERSION 1
14301 typedef struct wnm_roam_trigger_cfg
{
14305 int16 trigger
; /* trigger for each type in new roam algorithm */
14306 } wnm_roam_trigger_cfg_t
;
14308 /* Data structures for Interface Create/Remove */
14310 #define WL_INTERFACE_CREATE_VER_0 0
14311 #define WL_INTERFACE_CREATE_VER_1 1
14312 #define WL_INTERFACE_CREATE_VER_2 2
14313 #define WL_INTERFACE_CREATE_VER_3 3
14316 * The flags filed of the wl_interface_create is designed to be
14317 * a Bit Mask. As of now only Bit 0 and Bit 1 are used as mentioned below.
14318 * The rest of the bits can be used, incase we have to provide
14319 * more information to the dongle
14323 * Bit 0 of flags field is used to inform whether the interface requested to
14324 * be created is STA or AP.
14325 * 0 - Create a STA interface
14326 * 1 - Create an AP interface
14327 * NOTE: This Bit 0 is applicable for the WL_INTERFACE_CREATE_VER < 2
14329 #define WL_INTERFACE_CREATE_STA (0 << 0)
14330 #define WL_INTERFACE_CREATE_AP (1 << 0)
14333 * From revision >= 2 Bit 0 of flags field will not used be for STA or AP interface creation.
14334 * "iftype" field shall be used for identifying the interface type.
14336 typedef enum wl_interface_type
{
14337 WL_INTERFACE_TYPE_STA
= 0,
14338 WL_INTERFACE_TYPE_AP
= 1,
14339 WL_INTERFACE_TYPE_AWDL
= 2,
14340 WL_INTERFACE_TYPE_NAN
= 3,
14341 WL_INTERFACE_TYPE_P2P_GO
= 4,
14342 WL_INTERFACE_TYPE_P2P_GC
= 5,
14343 WL_INTERFACE_TYPE_P2P_DISC
= 6,
14344 WL_INTERFACE_TYPE_IBSS
= 7,
14345 WL_INTERFACE_TYPE_MAX
14346 } wl_interface_type_t
;
14349 * Bit 1 of flags field is used to inform whether MAC is present in the
14350 * data structure or not.
14351 * 0 - Ignore mac_addr field
14352 * 1 - Use the mac_addr field
14354 #define WL_INTERFACE_MAC_DONT_USE (0 << 1)
14355 #define WL_INTERFACE_MAC_USE (1 << 1)
14358 * Bit 2 of flags field is used to inform whether core or wlc index
14359 * is present in the data structure or not.
14360 * 0 - Ignore wlc_index field
14361 * 1 - Use the wlc_index field
14363 #define WL_INTERFACE_WLC_INDEX_DONT_USE (0 << 2)
14364 #define WL_INTERFACE_WLC_INDEX_USE (1 << 2)
14367 * Bit 3 of flags field is used to create interface on the host requested interface index
14368 * 0 - Ignore if_index field
14369 * 1 - Use the if_index field
14371 #define WL_INTERFACE_IF_INDEX_USE (1 << 3)
14374 * Bit 4 of flags field is used to assign BSSID
14375 * 0 - Ignore bssid field
14376 * 1 - Use the bssid field
14378 #define WL_INTERFACE_BSSID_INDEX_USE (1 << 4)
14380 typedef struct wl_interface_create_v0
{
14381 uint16 ver
; /**< version of this struct */
14382 uint32 flags
; /**< flags that defines the operation */
14383 struct ether_addr mac_addr
; /**< Optional Mac address */
14384 } wl_interface_create_v0_t
;
14386 typedef struct wl_interface_create
{
14387 uint16 ver
; /**< version of this struct */
14388 uint8 pad1
[2]; /**< Padding bytes */
14389 uint32 flags
; /**< flags that defines the operation */
14390 struct ether_addr mac_addr
; /**< Optional Mac address */
14391 uint8 pad2
[2]; /**< Padding bytes */
14392 uint32 wlc_index
; /**< Optional wlc index */
14393 } wl_interface_create_v1_t
;
14395 typedef struct wl_interface_create_v2
{
14396 uint16 ver
; /**< version of this struct */
14397 uint8 pad1
[2]; /**< Padding bytes */
14398 uint32 flags
; /**< flags that defines the operation */
14399 struct ether_addr mac_addr
; /**< Optional Mac address */
14400 uint8 iftype
; /**< Type of interface created */
14401 uint8 pad2
; /**< Padding bytes */
14402 uint32 wlc_index
; /**< Optional wlc index */
14403 } wl_interface_create_v2_t
;
14405 typedef struct wl_interface_create_v3
{
14406 uint16 ver
; /**< version of this struct */
14407 uint16 len
; /**< length of whole structure including variable length */
14408 uint16 fixed_len
; /**< Fixed length of this structure excluding data[] */
14409 uint8 iftype
; /**< Type of interface created */
14410 uint8 wlc_index
; /**< Optional wlc index */
14411 uint32 flags
; /**< flags that defines the operation */
14412 struct ether_addr mac_addr
; /**< Optional Mac address */
14413 struct ether_addr bssid
; /**< Optional BSSID */
14414 uint8 if_index
; /**< interface index requested by Host */
14415 uint8 pad
[3]; /**< Padding bytes to ensure data[] is at 32 bit aligned */
14416 uint8 data
[]; /**< Optional application/Module specific data */
14417 } wl_interface_create_v3_t
;
14419 #define WL_INTERFACE_INFO_VER_0 0
14420 #define WL_INTERFACE_INFO_VER_1 1
14421 #define WL_INTERFACE_INFO_VER_2 2
14423 typedef struct wl_interface_info_v0
{
14424 uint16 ver
; /**< version of this struct */
14425 struct ether_addr mac_addr
; /**< MAC address of the interface */
14426 char ifname
[BCM_MSG_IFNAME_MAX
]; /**< name of interface */
14427 uint8 bsscfgidx
; /**< source bsscfg index */
14428 } wl_interface_info_v0_t
;
14430 typedef struct wl_interface_info_v1
{
14431 uint16 ver
; /**< version of this struct */
14432 struct ether_addr mac_addr
; /**< MAC address of the interface */
14433 char ifname
[BCM_MSG_IFNAME_MAX
]; /**< name of interface */
14434 uint8 bsscfgidx
; /**< source bsscfg index */
14436 } wl_interface_info_v1_t
;
14438 typedef struct wl_interface_info_v2
{
14439 uint16 ver
; /**< version of this struct */
14440 uint16 length
; /**< length of the whole structure */
14441 struct ether_addr mac_addr
; /**< MAC address of the interface */
14442 uint8 bsscfgidx
; /**< source bsscfg index */
14443 uint8 if_index
; /**< Interface index allocated by FW */
14444 char ifname
[BCM_MSG_IFNAME_MAX
]; /**< name of interface */
14445 } wl_interface_info_v2_t
;
14447 #define PHY_RXIQEST_AVERAGING_DELAY 10
14449 typedef struct wl_iqest_params
{
14454 } wl_iqest_params_t
;
14456 typedef struct wl_iqest_sweep_params
{
14457 wl_iqest_params_t params
;
14459 uint8 channel
[3]; /** variable */
14460 } wl_iqest_sweep_params_t
;
14462 typedef struct wl_iqest_value
{
14466 } wl_iqest_value_t
;
14468 typedef struct wl_iqest_result
{
14471 wl_iqest_value_t value
[1];
14472 } wl_iqest_result_t
;
14474 #define WL_PRIO_ROAM_PROF_V1 (1u)
14476 typedef struct wl_prio_roam_prof_v1
{
14477 uint16 version
; /* Version info */
14478 uint16 length
; /* byte length of this structure */
14479 uint8 prio_roam_mode
; /* Roam mode RCC/RCC+Full Scan */
14481 } wl_prio_roam_prof_v1_t
;
14483 typedef enum wl_prio_roam_mode
{
14484 PRIO_ROAM_MODE_OFF
= 0, /* Prio_Roam feature disable */
14485 PRIO_ROAM_MODE_RCC_ONLY
= 1, /* Scan RCC list only */
14486 PRIO_ROAM_MODE_RCC_FULLSCAN
= 2, /* Scan RCC list + Full scan */
14487 PRIO_ROAM_MODE_FULLSCAN_ONLY
= 3 /* Full Scan only */
14488 } wl_prio_roam_mode_t
;
14490 /* BTCX AIBSS (Oxygen) Status */
14491 typedef struct wlc_btc_aibss_info
{
14492 uint32 prev_tsf_l
; // Lower 32 bits of last read of TSF
14493 uint32 prev_tsf_h
; // Higher 32 bits of last read of TSF
14494 uint32 last_btinfo
; // Last read of BT info
14495 uint32 local_btinfo
; // Local BT INFO BitMap
14496 uint8 bt_out_of_sync_cnt
; // BT not in sync with strobe
14497 uint8 esco_off_cnt
; // Count incremented when ESCO is off
14498 uint8 strobe_enabled
; // Set only in AIBSS mode
14499 uint8 strobe_on
; // strobe to BT is on for Oxygen
14500 uint8 local_bt_in_sync
; // Sync status of local BT when strobe is on
14501 uint8 other_bt_in_sync
; // Sync state of BT in other devices in AIBSS
14502 uint8 local_bt_is_master
; // Local BT is master
14503 uint8 sco_prot_on
; // eSCO Protection on in local device
14504 uint8 other_esco_present
; // eSCO status in other devices in AIBSS
14505 uint8 rx_agg_change
; // Indicates Rx Agg size needs to change
14506 uint8 rx_agg_modified
; // Rx Agg size modified
14507 uint8 acl_grant_set
; // ACL grants on for speeding up sync
14508 uint8 write_ie_err_cnt
; // BTCX Ie write error cnt
14509 uint8 parse_ie_err_cnt
; // BTCX IE parse error cnt
14510 uint8 wci2_fail_cnt
; // WCI2 init failure cnt
14511 uint8 strobe_enable_err_cnt
; // Strobe enable err cnt
14512 uint8 strobe_init_err_cnt
; // Strobe init err cnt
14513 uint8 tsf_jump_cnt
; // TSF jump cnt
14514 uint8 acl_grant_cnt
; // ALC grant cnt
14516 uint16 ibss_tsf_shm
; // SHM address of strobe TSF
14518 } wlc_btc_aibss_info_t
;
14520 #define WLC_BTC_AIBSS_STATUS_VER 1
14521 #define WLC_BTC_AIBSS_STATUS_LEN (sizeof(wlc_btc_aibss_status_t) - 2 * (sizeof(uint16)))
14523 typedef struct wlc_btc_aibss_status
{
14524 uint16 version
; // Version #
14525 uint16 len
; // Length of the structure(excluding len & version)
14526 int32 mode
; // Current value of btc_mode
14527 uint16 bth_period
; // bt coex period. read from shm.
14528 uint16 agg_off_bm
; // AGG OFF BM read from SHM
14529 uint8 bth_active
; // bt active session
14531 wlc_btc_aibss_info_t aibss_info
; // Structure definition above
14532 } wlc_btc_aibss_status_t
;
14540 W2B_DATA_CLEAR
= 23,
14541 B2W_ACK_CLEAR
= 24,
14546 B2W_DATA_CLEAR
= 33,
14548 } bwte_gci_intstate_t
;
14550 #define WL_BWTE_STATS_VERSION 1 /* version of bwte_stats_t */
14554 bwte_gci_intstate_t inttobt
;
14555 bwte_gci_intstate_t intfrombt
;
14557 uint32 bt2wl_intrcnt
; /* bt->wlan interrrupt count */
14558 uint32 wl2bt_intrcnt
; /* wlan->bt interrupt count */
14560 uint32 wl2bt_dset_cnt
;
14561 uint32 wl2bt_dclear_cnt
;
14562 uint32 wl2bt_aset_cnt
;
14563 uint32 wl2bt_aclear_cnt
;
14565 uint32 bt2wl_dset_cnt
;
14566 uint32 bt2wl_dclear_cnt
;
14567 uint32 bt2wl_aset_cnt
;
14568 uint32 bt2wl_aclear_cnt
;
14570 uint32 state_error_1
;
14571 uint32 state_error_2
;
14572 uint32 state_error_3
;
14573 uint32 state_error_4
;
14576 #define TBOW_MAX_SSID_LEN 32
14577 #define TBOW_MAX_PASSPHRASE_LEN 63
14579 #define WL_TBOW_SETUPINFO_T_VERSION 1 /* version of tbow_setup_netinfo_t */
14580 typedef struct tbow_setup_netinfo
{
14584 uint8 macaddr
[ETHER_ADDR_LEN
];
14586 uint8 ssid
[TBOW_MAX_SSID_LEN
];
14587 uint8 passphrase_len
;
14588 uint8 passphrase
[TBOW_MAX_PASSPHRASE_LEN
];
14589 chanspec_t chanspec
;
14592 } tbow_setup_netinfo_t
;
14594 typedef enum tbow_ho_opmode
{
14595 TBOW_HO_MODE_START_GO
= 0,
14596 TBOW_HO_MODE_START_STA
,
14597 TBOW_HO_MODE_START_GC
,
14598 TBOW_HO_MODE_TEST_GO
,
14599 TBOW_HO_MODE_STOP_GO
= 0x10,
14600 TBOW_HO_MODE_STOP_STA
,
14601 TBOW_HO_MODE_STOP_GC
,
14602 TBOW_HO_MODE_TEARDOWN
14603 } tbow_ho_opmode_t
;
14605 /* Beacon trim feature statistics */
14606 /* configuration */
14607 #define BCNTRIMST_PER 0 /* Number of beacons to trim (0: disable) */
14608 #define BCNTRIMST_TIMEND 1 /* Number of bytes till TIM IE */
14609 #define BCNTRIMST_TSFLMT 2 /* TSF tolerance value (usecs) */
14611 #define BCNTRIMST_CUR 3 /* PSM's local beacon trim counter */
14612 #define BCNTRIMST_PREVLEN 4 /* Beacon length excluding the TIM IE */
14613 #define BCNTRIMST_TIMLEN 5 /* TIM IE Length */
14614 #define BCNTRIMST_RSSI 6 /* Partial beacon RSSI */
14615 #define BCNTRIMST_CHAN 7 /* Partial beacon channel */
14616 /* debug stat (off by default) */
14617 #define BCNTRIMST_DUR 8 /* RX duration until beacon trimmed */
14618 #define BCNTRIMST_RXMBSS 9 /* MYBSSID beacon received */
14619 #define BCNTRIMST_CANTRIM 10 /* # beacons which were trimmed */
14620 #define BCNTRIMST_LENCHG 11 /* # beacons not trimmed due to length change */
14621 #define BCNTRIMST_TSFDRF 12 /* # beacons not trimmed due to large TSF delta */
14622 #define BCNTRIMST_NOTIM 13 /* # beacons not trimmed due to TIM missing */
14624 #define BCNTRIMST_NUM 14
14626 #define WL_BCNTRIM_STATUS_VERSION_1 1
14627 typedef struct wl_bcntrim_status_query_v1
{
14629 uint16 len
; /* Total length includes fixed fields */
14630 uint8 reset
; /* reset after reading the stats */
14631 uint8 pad
[3]; /* 4-byte alignment */
14632 } wl_bcntrim_status_query_v1_t
;
14634 typedef struct wl_bcntrim_status_v1
{
14636 uint16 len
; /* Total length includes fixed fields and variable data[] */
14637 uint8 curr_slice_id
; /* slice index of the interface */
14638 uint8 applied_cfg
; /* applied bcntrim N threshold */
14639 uint8 pad
[2]; /* 4-byte alignment */
14640 uint32 fw_status
; /* Bits representing bcntrim disable reason in FW */
14641 uint32 total_disable_dur
; /* total duration (msec) bcntrim remains
14642 disabled due to FW disable reasons
14644 uint32 data
[]; /* variable length data containing stats */
14645 } wl_bcntrim_status_v1_t
;
14647 #define BCNTRIM_STATS_MAX 10 /* Total stats part of the status data[] */
14649 /* Bits for FW status */
14650 #define WL_BCNTRIM_DISABLE_HOST 0x1 /* Host disabled bcntrim through bcntrim IOVar */
14651 #define WL_BCNTRIM_DISABLE_PHY_RATE 0x2 /* bcntrim disabled because beacon rx rate is
14652 * higher than phy_rate_thresh
14654 #define WL_BCNTRIM_DISABLE_QUIET_IE 0x4 /* bcntrim disable when Quiet IE present */
14655 #define WL_BCNTRIM_DISABLE_QBSSLOAD_IE 0x8 /* bcntrim disable when QBSS Load IE present */
14656 #define WL_BCNTRIM_DISABLE_OPERMODE_IE 0x10 /* bcntrim dsiable when opermode IE is present */
14657 #define WL_BCNTRIM_DISABLE_CSA_IE 0x20 /* bcntrim dsiable when CSA IE is present */
14659 #define BCNTRIM_DISABLE_THRESHOLD_TIME 1000 * 10 /* enable bcntrim after a threshold (10sec)
14660 * when disabled due to above mentioned IE's
14662 #define WL_BCNTRIM_CFG_VERSION_1 1
14663 /* Common IOVAR struct */
14664 typedef struct wl_bcntrim_cfg_v1
{
14666 uint16 len
; /* Total length includes fixed fields and variable data[] */
14667 uint16 subcmd_id
; /* subcommand id */
14668 uint16 pad
; /* pad/reserved */
14669 uint8 data
[]; /* subcommand data; could be empty */
14670 } wl_bcntrim_cfg_v1_t
;
14672 /* subcommands ids */
14674 WL_BCNTRIM_CFG_SUBCMD_PHY_RATE_THRESH
= 0, /* PHY rate threshold above
14675 which bcntrim is not applied
14677 WL_BCNTRIM_CFG_SUBCMD_OVERRIDE_DISABLE_MASK
= 1, /* Override bcntrim disable reasons */
14678 WL_BCNTRIM_CFG_SUBCMD_TSF_DRIFT_LIMIT
= 2 /* TSF drift limit to consider bcntrim */
14681 #define BCNTRIM_MAX_PHY_RATE 48 /* in 500Kbps */
14682 #define BCNTRIM_MAX_TSF_DRIFT 65535 /* in usec */
14683 #define WL_BCNTRIM_OVERRIDE_DISABLE_MASK \
14684 (WL_BCNTRIM_DISABLE_QUIET_IE | WL_BCNTRIM_DISABLE_QBSSLOAD_IE)
14686 /* WL_BCNTRIM_CFG_SUBCMD_PHY_RATE_TRESH */
14687 typedef struct wl_bcntrim_cfg_phy_rate_thresh
{
14688 uint32 rate
; /* beacon rate (in 500kbps units) */
14689 } wl_bcntrim_cfg_phy_rate_thresh_t
;
14691 /* WL_BCNTRIM_CFG_SUBCMD_OVERRIDE_DISABLE_MASK */
14692 typedef struct wl_bcntrim_cfg_override_disable_mask
{
14693 uint32 mask
; /* bits representing individual disable reason to override */
14694 } wl_bcntrim_cfg_override_disable_mask_t
;
14696 /* WL_BCNTRIM_CFG_SUBCMD_TSF_DRIFT_LIMIT */
14697 typedef struct wl_bcntrim_cfg_tsf_drift_limit
{
14698 uint16 drift
; /* tsf drift limit specified in usec */
14699 uint8 pad
[2]; /* 4-byte alignment */
14700 } wl_bcntrim_cfg_tsf_drift_limit_t
;
14702 /* -------------- TX Power Cap --------------- */
14703 #define TXPWRCAP_MAX_NUM_CORES 8
14704 #define TXPWRCAP_MAX_NUM_ANTENNAS (TXPWRCAP_MAX_NUM_CORES * 2)
14706 #define TXPWRCAP_MAX_NUM_CORES_V3 4
14707 #define TXPWRCAP_MAX_NUM_ANTENNAS_V3 (TXPWRCAP_MAX_NUM_CORES_V3 * 2)
14709 #define TXPWRCAP_NUM_SUBBANDS 5
14710 #define TXPWRCAP_MAX_NUM_SUBGRPS 10
14712 /* IOVAR txcapconfig enum's */
14713 #define TXPWRCAPCONFIG_WCI2 0u
14714 #define TXPWRCAPCONFIG_HOST 1u
14715 #define TXPWRCAPCONFIG_WCI2_AND_HOST 2u
14716 #define TXPWRCAPCONFIG_NONE 0xFFu
14718 /* IOVAR txcapstate enum's */
14719 #define TXPWRCAPSTATE_LOW_CAP 0
14720 #define TXPWRCAPSTATE_HIGH_CAP 1
14721 #define TXPWRCAPSTATE_HOST_LOW_WCI2_LOW_CAP 0
14722 #define TXPWRCAPSTATE_HOST_LOW_WCI2_HIGH_CAP 1
14723 #define TXPWRCAPSTATE_HOST_HIGH_WCI2_LOW_CAP 2
14724 #define TXPWRCAPSTATE_HOST_HIGH_WCI2_HIGH_CAP 3
14726 /* IOVAR txcapconfig and txcapstate structure is shared: SET and GET */
14727 #define TXPWRCAPCTL_VERSION 2
14728 #define TXPWRCAPCTL_VERSION_3 3
14730 typedef struct wl_txpwrcap_ctl
{
14732 uint8 ctl
[TXPWRCAP_NUM_SUBBANDS
];
14733 } wl_txpwrcap_ctl_t
;
14735 typedef struct wl_txpwrcap_ctl_v3
{
14737 uint8 ctl
[TXPWRCAP_MAX_NUM_SUBGRPS
];
14738 } wl_txpwrcap_ctl_v3_t
;
14740 /* IOVAR txcapdump structure: GET only */
14741 #define TXPWRCAP_DUMP_VERSION 2
14742 typedef struct wl_txpwrcap_dump
{
14745 uint8 current_country
[2];
14746 uint32 current_channel
;
14747 uint8 config
[TXPWRCAP_NUM_SUBBANDS
];
14748 uint8 state
[TXPWRCAP_NUM_SUBBANDS
];
14749 uint8 high_cap_state_enabled
;
14750 uint8 wci2_cell_status_last
;
14751 uint8 download_present
;
14752 uint8 num_subbands
;
14753 uint8 num_antennas
;
14754 uint8 num_antennas_per_core
[TXPWRCAP_MAX_NUM_CORES
];
14755 uint8 num_cc_groups
;
14756 uint8 current_country_cc_group_info_index
;
14757 int8 low_cap
[TXPWRCAP_MAX_NUM_ANTENNAS
*TXPWRCAP_NUM_SUBBANDS
];
14758 int8 high_cap
[TXPWRCAP_MAX_NUM_ANTENNAS
*TXPWRCAP_NUM_SUBBANDS
];
14760 } wl_txpwrcap_dump_t
;
14762 typedef struct wl_txpwrcap_dump_v3
{
14765 uint8 current_country
[2];
14766 uint32 current_channel
;
14767 uint8 config
[TXPWRCAP_NUM_SUBBANDS
];
14768 uint8 state
[TXPWRCAP_NUM_SUBBANDS
];
14769 uint8 high_cap_state_enabled
;
14770 uint8 wci2_cell_status_last
;
14771 uint8 download_present
;
14772 uint8 num_subbands
;
14773 uint8 num_antennas
;
14774 uint8 num_antennas_per_core
[TXPWRCAP_MAX_NUM_CORES
];
14775 uint8 num_cc_groups
;
14776 uint8 current_country_cc_group_info_index
;
14777 uint8 cap_states_per_cc_group
;
14778 int8 host_low_wci2_low_cap
[TXPWRCAP_MAX_NUM_ANTENNAS
*TXPWRCAP_NUM_SUBBANDS
];
14779 int8 host_low_wci2_high_cap
[TXPWRCAP_MAX_NUM_ANTENNAS
*TXPWRCAP_NUM_SUBBANDS
];
14780 int8 host_high_wci2_low_cap
[TXPWRCAP_MAX_NUM_ANTENNAS
*TXPWRCAP_NUM_SUBBANDS
];
14781 int8 host_high_wci2_high_cap
[TXPWRCAP_MAX_NUM_ANTENNAS
*TXPWRCAP_NUM_SUBBANDS
];
14783 } wl_txpwrcap_dump_v3_t
;
14786 * Capability flag for wl_txpwrcap_tbl_v2_t and wl_txpwrcap_t
14787 * The index into pwrs will be: 0: onbody-cck, 1: onbody-ofdm, 2:offbody-cck, 3:offbody-ofdm
14789 * For 5G power in SDB case as well as for non-SDB case, the value of flag will be: CAP_ONOFF_BODY
14790 * The index into pwrs will be: 0: onbody, 1: offbody-ofdm
14793 #define CAP_ONOFF_BODY (0x1) /* on/off body only */
14794 #define CAP_CCK_OFDM (0x2) /* cck/ofdm capability only */
14795 #define CAP_LTE_CELL (0x4) /* cell on/off capability; required for iOS builds */
14796 #define CAP_HEAD_BODY (0x8) /* head/body capability */
14797 #define CAP_2G_DEPON_5G (0x10) /* 2G pwr caps depend on other slice 5G subband */
14798 #define CAP_SISO_MIMO (0x20) /* Siso/Mimo Separate Power Caps */
14799 #define CAP_ANT_TX (0x40) /* Separate Power Caps based on cell ant tx value */
14800 #define CAP_ONOFF_BODY_CCK_OFDM (CAP_ONOFF_BODY | CAP_CCK_OFDM)
14801 #define CAP_TXPWR_ALL (CAP_ONOFF_BODY|CAP_CCK_OFDM|CAP_LTE_CELL|\
14802 CAP_SISO_MIMO|CAP_HEAD_BODY|CAP_ANT_TX)
14804 #define TXHDR_SEC_MAX 5u /* Deprecated. Kept till removed in all branches */
14805 #define TXPWRCAP_MAX_STATES 4u
14806 #define TXPWRCAP_MAX_STATES_V3 10u
14807 #define TXPWRCAP_CCKOFDM_ONOFFBODY_MAX_STATES 4u
14808 #define TXPWRCAP_ONOFFBODY_MAX_STATES 2u
14809 #define TXPWRCAP_ONOFFCELL_MAX_STATES 2u
14811 #define TXHDR_SEC_NONSDB_MAIN_2G 0
14812 #define TXHDR_SEC_NONSDB_MAIN_5G 1
14813 #define TXHDR_SEC_NONSDB_AUX_2G 2
14814 #define TXHDR_SEC_NONSDB_AUX_5G 3
14815 #define TXHDR_SEC_SDB_MAIN_2G 4
14816 #define TXHDR_SEC_SDB_MAIN_5G 5
14817 #define TXHDR_SEC_SDB_AUX_2G 6
14818 #define TXHDR_SEC_SDB_AUX_5G 7
14819 #define TXHDR_MAX_SECTION 8
14821 #define WL_TXPWRCAP_MAX_SLICES 2
14822 #define WL_TXPWRCAPDUMP_VER 4
14824 #define WL_TXPWRCAP_VERSION_2 2
14825 #define WL_TXPWRCAP_VERSION_3 3
14827 typedef struct wl_txpwrcap
{
14829 uint8 num_cap_states
;
14830 uint8 section
; /* Index from above,eg. TXHDR_SEC_NONSDB */
14831 int8 pwrs
[][TXPWRCAP_NUM_SUBBANDS
][TXPWRCAP_MAX_NUM_CORES
];
14836 uint8 num_cap_states
;
14838 uint8 section
; /* Index from above,eg. TXHDR_SEC_NONSDB */
14839 int8 pwrs
[][TXPWRCAP_MAX_NUM_SUBGRPS
][TXPWRCAP_MAX_NUM_ANTENNAS_V3
];
14840 } wl_txpwrcap_v2_t
;
14842 #define TXPWRCAP_DUMP_VERSION_4 4
14843 #define TXPWRCAP_DUMP_VERSION_5 5
14845 typedef struct wl_txpwrcap_dump_v4
{
14848 uint8 current_country
[2];
14849 uint32 current_channel
;
14850 uint8 download_present
;
14851 uint8 num_cores
; /* number cores on slice */
14852 uint8 num_cc_groups
; /* number cc groups */
14853 uint8 current_country_cc_group_info_index
;
14854 /* first power cap always exist
14855 * On main,-non-sdb follows by sdb2g and then sdb5g
14856 * On aux slice - aux2g then aux5g.
14858 wl_txpwrcap_t pwrcap
; /* first power cap */
14859 } wl_txpwrcap_dump_v4_t
;
14861 typedef struct wl_txpwrcap_dump_v5
{
14864 uint8 current_country
[2];
14865 uint32 current_channel
;
14866 uint8 download_present
;
14867 uint8 num_ants
; /* number antenna slice */
14868 uint8 num_cc_groups
; /* number cc groups */
14869 uint8 current_country_cc_group_info_index
;
14870 uint8 ant_tx
; /* current value of ant_tx */
14871 uint8 cell_status
; /* current value of cell status */
14872 int8 pwrcap
[]; /* variable size power caps (wl_txpwrcap_v2_t) */
14873 } wl_txpwrcap_dump_v5_t
;
14875 typedef struct wl_txpwrcap_tbl
{
14876 uint8 num_antennas_per_core
[TXPWRCAP_MAX_NUM_CORES
];
14877 /* Stores values for valid antennas */
14878 int8 pwrcap_cell_on
[TXPWRCAP_MAX_NUM_ANTENNAS
]; /* qdBm units */
14879 int8 pwrcap_cell_off
[TXPWRCAP_MAX_NUM_ANTENNAS
]; /* qdBm units */
14880 } wl_txpwrcap_tbl_t
;
14882 typedef struct wl_txpwrcap_tbl_v2
{
14884 uint8 length
; /* size of entire structure, including the pwrs */
14885 uint8 capability
; /* capability bitmap */
14886 uint8 num_cores
; /* number of cores i.e. entries in each cap state row */
14888 * pwrs array has TXPWRCAP_MAX_STATES rows - one for each cap state.
14889 * Each row has up to TXPWRCAP_MAX_NUM_CORES entries - one for each core.
14891 uint8 pwrs
[][TXPWRCAP_MAX_NUM_CORES
]; /* qdBm units */
14892 } wl_txpwrcap_tbl_v2_t
;
14894 typedef struct wl_txpwrcap_tbl_v3
{
14896 uint8 length
; /* size of entire structure, including the pwrs */
14897 uint8 capability
; /* capability bitmap */
14898 uint8 num_cores
; /* number of cores */
14899 uint8 num_antennas_per_core
[TXPWRCAP_MAX_NUM_CORES_V3
];
14901 * pwrs array has TXPWRCAP_MAX_STATES rows - one for each cap state.
14902 * Each row has up to TXPWRCAP_MAX_NUM_ANTENNAS entries - for each antenna.
14903 * Included in the rows of powers are rows for fail safe.
14905 int8 pwrs
[][TXPWRCAP_MAX_NUM_ANTENNAS_V3
]; /* qdBm units */
14906 } wl_txpwrcap_tbl_v3_t
;
14908 /* ##### Ecounters section ##### */
14909 #define ECOUNTERS_VERSION_1 1
14911 /* Input structure for ecounters IOVAR */
14912 typedef struct ecounters_config_request
{
14913 uint16 version
; /* config version */
14914 uint16 set
; /* Set where data will go. */
14915 uint16 size
; /* Size of the set. */
14916 uint16 timeout
; /* timeout in seconds. */
14917 uint16 num_events
; /* Number of events to report. */
14918 uint16 ntypes
; /* Number of entries in type array. */
14919 uint16 type
[1]; /* Statistics Types (tags) to retrieve. */
14920 } ecounters_config_request_t
;
14922 #define ECOUNTERS_EVENTMSGS_VERSION_1 1
14923 #define ECOUNTERS_TRIGGER_CONFIG_VERSION_1 1
14925 #define ECOUNTERS_EVENTMSGS_EXT_MASK_OFFSET \
14926 OFFSETOF(ecounters_eventmsgs_ext_t, mask[0])
14928 #define ECOUNTERS_TRIG_CONFIG_TYPE_OFFSET \
14929 OFFSETOF(ecounters_trigger_config_t, type[0])
14931 typedef struct ecounters_eventmsgs_ext
{
14935 } ecounters_eventmsgs_ext_t
;
14937 typedef struct ecounters_trigger_config
{
14938 uint16 version
; /* version */
14939 uint16 set
; /* set where data should go */
14940 uint16 rsvd
; /* reserved */
14941 uint16 pad
; /* pad/reserved */
14942 uint16 ntypes
; /* number of types/tags */
14943 uint16 type
[1]; /* list of types */
14944 } ecounters_trigger_config_t
;
14946 #define ECOUNTERS_TRIGGER_REASON_VERSION_1 1
14948 /* Triggered due to timer based ecounters */
14949 ECOUNTERS_TRIGGER_REASON_TIMER
= 0,
14950 /* Triggered due to event based configuration */
14951 ECOUNTERS_TRIGGER_REASON_EVENTS
= 1,
14952 ECOUNTERS_TRIGGER_REASON_D2H_EVENTS
= 2,
14953 ECOUNTERS_TRIGGER_REASON_H2D_EVENTS
= 3,
14954 ECOUNTERS_TRIGGER_REASON_USER_EVENTS
= 4,
14955 ECOUNTERS_TRIGGER_REASON_MAX
= 5
14956 } ecounters_trigger_reasons_list_t
;
14958 typedef struct ecounters_trigger_reason
{
14959 uint16 version
; /* version */
14960 uint16 trigger_reason
; /* trigger reason */
14961 uint32 sub_reason_code
; /* sub reason code */
14962 uint32 trigger_time_now
; /* time in ms at trigger */
14963 uint32 host_ref_time
; /* host ref time */
14964 } ecounters_trigger_reason_t
;
14966 #define WL_LQM_VERSION_1 1
14968 /* For wl_lqm_t flags field */
14969 #define WL_LQM_CURRENT_BSS_VALID 0x1
14970 #define WL_LQM_TARGET_BSS_VALID 0x2
14972 #define WL_PERIODIC_COMPACT_CNTRS_VER_1 (1)
14973 #define WL_PERIODIC_TXBF_CNTRS_VER_1 (1)
14977 /* taken from wl_wlc_cnt_t */
14979 /* taken from wl_cnt_ge40mcst_v1_t */
14980 uint32 txallfrm
; /**< total number of frames sent, incl. Data, ACK, RTS, CTS,
14981 * Control Management (includes retransmissions)
14983 uint32 txrtsfrm
; /**< number of RTS sent out by the MAC */
14984 uint32 txctsfrm
; /**< number of CTS sent out by the MAC */
14985 uint32 txback
; /**< blockack txcnt */
14986 uint32 txucast
; /**< number of unicast tx expecting response other than cts/cwcts */
14987 uint32 txnoack
; /**< dot11ACKFailureCount */
14988 uint32 txframe
; /**< tx data frames */
14989 uint32 txretrans
; /**< tx mac retransmits */
14990 uint32 txpspoll
; /**< Number of TX PS-poll */
14992 uint32 rxrsptmout
; /**< number of response timeouts for transmitted frames
14993 * expecting a response
14995 uint32 txrtsfail
; /**< number of rts transmission failure that reach retry limit */
14996 uint32 rxstrt
; /**< number of received frames with a good PLCP */
14997 uint32 rxbadplcp
; /**< number of parity check of the PLCP header failed */
14998 uint32 rxcrsglitch
; /**< PHY was able to correlate the preamble but not the header */
14999 uint32 rxnodelim
; /**< number of no valid delimiter detected by ampdu parser */
15000 uint32 bphy_badplcp
; /**< number of bad PLCP reception on BPHY rate */
15001 uint32 bphy_rxcrsglitch
; /**< PHY count of bphy glitches */
15002 uint32 rxbadfcs
; /**< number of frames for which the CRC check failed in the MAC */
15003 uint32 rxf0ovfl
; /**< number of receive fifo 0 overflows */
15004 uint32 rxf1ovfl
; /**< number of receive fifo 0 overflows */
15005 uint32 rxhlovfl
; /**< number of length / header fifo overflows */
15006 uint32 rxrtsucast
; /**< number of unicast RTS addressed to the MAC (good FCS) */
15007 uint32 rxctsucast
; /**< number of unicast CTS addressed to the MAC (good FCS) */
15008 uint32 rxackucast
; /**< number of ucast ACKS received (good FCS) */
15009 uint32 rxback
; /**< blockack rxcnt */
15010 uint32 rxbeaconmbss
; /**< beacons received from member of BSS */
15011 uint32 rxdtucastmbss
; /**< number of received DATA frames with good FCS and matching RA */
15012 uint32 rxbeaconobss
; /**< beacons received from other BSS */
15013 uint32 rxdtucastobss
; /**< number of unicast frames addressed to the MAC from
15014 * other BSS (WDS FRAME)
15016 uint32 rxdtocast
; /**< number of received DATA frames (good FCS and no matching RA) */
15017 uint32 rxrtsocast
; /**< number of received RTS not addressed to the MAC */
15018 uint32 rxctsocast
; /**< number of received CTS not addressed to the MAC */
15019 uint32 rxdtmcast
; /**< number of RX Data multicast frames received by the MAC */
15020 uint32 rxmpdu_mu
; /**< Number of MU MPDUs received */
15021 uint32 rxtoolate
; /**< receive too late */
15022 uint32 rxframe
; /**< rx data frames */
15023 uint32 lqcm_report
; /**< lqcm metric tx/rx idx */
15024 uint32 tx_toss_cnt
; /* number of tx packets tossed */
15025 uint32 rx_toss_cnt
; /* number of rx packets tossed */
15026 uint32 last_tx_toss_rsn
; /* reason because of which last tx pkt tossed */
15027 uint32 last_rx_toss_rsn
; /* reason because of which last rx pkt tossed */
15028 uint32 txbcnfrm
; /**< beacons transmitted */
15029 } wl_periodic_compact_cntrs_v1_t
;
15031 #define WL_PERIODIC_COMPACT_CNTRS_VER_2 (2)
15035 /* taken from wl_wlc_cnt_t */
15037 /* taken from wl_cnt_ge40mcst_v1_t */
15038 uint32 txallfrm
; /**< total number of frames sent, incl. Data, ACK, RTS, CTS,
15039 * Control Management (includes retransmissions)
15041 uint32 txrtsfrm
; /**< number of RTS sent out by the MAC */
15042 uint32 txctsfrm
; /**< number of CTS sent out by the MAC */
15043 uint32 txback
; /**< blockack txcnt */
15044 uint32 txucast
; /**< number of unicast tx expecting response other than cts/cwcts */
15045 uint32 txnoack
; /**< dot11ACKFailureCount */
15046 uint32 txframe
; /**< tx data frames */
15047 uint32 txretrans
; /**< tx mac retransmits */
15048 uint32 txpspoll
; /**< Number of TX PS-poll */
15050 uint32 rxrsptmout
; /**< number of response timeouts for transmitted frames
15051 * expecting a response
15053 uint32 txrtsfail
; /**< number of rts transmission failure that reach retry limit */
15054 uint32 rxstrt
; /**< number of received frames with a good PLCP */
15055 uint32 rxbadplcp
; /**< number of parity check of the PLCP header failed */
15056 uint32 rxcrsglitch
; /**< PHY was able to correlate the preamble but not the header */
15057 uint32 rxnodelim
; /**< number of no valid delimiter detected by ampdu parser */
15058 uint32 bphy_badplcp
; /**< number of bad PLCP reception on BPHY rate */
15059 uint32 bphy_rxcrsglitch
; /**< PHY count of bphy glitches */
15060 uint32 rxbadfcs
; /**< number of frames for which the CRC check failed in the MAC */
15061 uint32 rxf0ovfl
; /**< number of receive fifo 0 overflows */
15062 uint32 rxf1ovfl
; /**< number of receive fifo 0 overflows */
15063 uint32 rxhlovfl
; /**< number of length / header fifo overflows */
15064 uint32 rxrtsucast
; /**< number of unicast RTS addressed to the MAC (good FCS) */
15065 uint32 rxctsucast
; /**< number of unicast CTS addressed to the MAC (good FCS) */
15066 uint32 rxackucast
; /**< number of ucast ACKS received (good FCS) */
15067 uint32 rxback
; /**< blockack rxcnt */
15068 uint32 rxbeaconmbss
; /**< beacons received from member of BSS */
15069 uint32 rxdtucastmbss
; /**< number of received DATA frames with good FCS and matching RA */
15070 uint32 rxbeaconobss
; /**< beacons received from other BSS */
15071 uint32 rxdtucastobss
; /**< number of unicast frames addressed to the MAC from
15072 * other BSS (WDS FRAME)
15074 uint32 rxdtocast
; /**< number of received DATA frames (good FCS and no matching RA) */
15075 uint32 rxrtsocast
; /**< number of received RTS not addressed to the MAC */
15076 uint32 rxctsocast
; /**< number of received CTS not addressed to the MAC */
15077 uint32 rxdtmcast
; /**< number of RX Data multicast frames received by the MAC */
15078 uint32 rxmpdu_mu
; /**< Number of MU MPDUs received */
15079 uint32 rxtoolate
; /**< receive too late */
15080 uint32 rxframe
; /**< rx data frames */
15081 uint32 lqcm_report
; /**< lqcm metric tx/rx idx */
15082 uint32 tx_toss_cnt
; /* number of tx packets tossed */
15083 uint32 rx_toss_cnt
; /* number of rx packets tossed */
15084 uint32 last_tx_toss_rsn
; /* reason because of which last tx pkt tossed */
15085 uint32 last_rx_toss_rsn
; /* reason because of which last rx pkt tossed */
15086 uint32 txbcnfrm
; /**< beacons transmitted */
15087 uint32 rxretry
; /* Number of rx packets received after retry */
15088 uint32 rxdup
; /* Number of dump packet. Indicates whether peer is receiving ack */
15089 uint32 chswitch_cnt
; /* Number of channel switches */
15090 uint32 pm_dur
; /* Total sleep time in PM, msecs */
15091 } wl_periodic_compact_cntrs_v2_t
;
15093 #define WL_PERIODIC_COMPACT_HE_CNTRS_VER_1 (1)
15097 uint32 he_rxtrig_rand
;
15098 uint32 he_colormiss_cnt
;
15099 uint32 he_txmtid_back
;
15100 uint32 he_rxmtid_back
;
15101 uint32 he_rxmsta_back
;
15102 uint32 he_rxtrig_basic
;
15103 uint32 he_rxtrig_murts
;
15104 uint32 he_rxtrig_bsrp
;
15106 uint32 he_physu_rx
;
15107 uint32 he_txtbppdu
;
15108 } wl_compact_he_cnt_wlc_v1_t
;
15122 } wl_periodic_txbf_cntrs_v1_t
;
15125 struct ether_addr BSSID
;
15126 chanspec_t chanspec
;
15129 } wl_rx_signal_metric_t
;
15135 int32 noise_level
; /* current noise level */
15136 wl_rx_signal_metric_t current_bss
;
15137 wl_rx_signal_metric_t target_bss
;
15140 #define WL_PERIODIC_IF_STATE_VER_1 (1)
15141 typedef struct wl_if_state_compact
{
15144 uint8 antenna_count
; /**< number of valid antenna rssi */
15145 int8 noise_level
; /**< noise right after tx (in dBm) */
15146 int8 snr
; /* current noise level */
15147 int8 rssi_sum
; /**< summed rssi across all antennas */
15149 int8 rssi_ant
[WL_RSSI_ANT_MAX
]; /**< rssi per antenna */
15150 struct ether_addr BSSID
;
15151 chanspec_t chanspec
;
15152 } wl_if_state_compact_t
;
15154 #define WL_EVENT_STATISTICS_VER_1 (1)
15155 /* Event based statistics ecounters */
15159 struct ether_addr BSSID
; /* BSSID of the BSS */
15160 uint32 txdeauthivalclass
;
15161 } wl_event_based_statistics_v1_t
;
15163 /* ##### Ecounters v2 section ##### */
15165 #define ECOUNTERS_VERSION_2 2
15167 /* Enumeration of various ecounters request types. This namespace is different from
15168 * global reportable stats namespace.
15171 WL_ECOUNTERS_XTLV_REPORT_REQ
= 1
15174 /* Input structure for ecounters IOVAR */
15175 typedef struct ecounters_config_request_v2
{
15176 uint16 version
; /* config version */
15177 uint16 len
; /* Length of this struct including variable len */
15178 uint16 logset
; /* Set where data will go. */
15179 uint16 reporting_period
; /* reporting_period */
15180 uint16 num_reports
; /* Number of timer expirations to report on */
15181 uint8 pad
[2]; /* Reserved for future use */
15182 uint8 ecounters_xtlvs
[]; /* Statistics Types (tags) to retrieve. */
15183 } ecounters_config_request_v2_t
;
15185 #define ECOUNTERS_STATS_TYPES_FLAG_SLICE 0x1
15186 #define ECOUNTERS_STATS_TYPES_FLAG_IFACE 0x2
15187 #define ECOUNTERS_STATS_TYPES_FLAG_GLOBAL 0x4
15188 #define ECOUNTERS_STATS_TYPES_DEFAULT 0x8
15190 /* Slice mask bits */
15191 #define ECOUNTERS_STATS_TYPES_SLICE_MASK_SLICE0 0x1
15192 #define ECOUNTERS_STATS_TYPES_SLICE_MASK_SLICE1 0x2
15194 typedef struct ecounters_stats_types_report_req
{
15195 /* flags: bit0 = slice, bit1 = iface, bit2 = global,
15199 uint16 if_index
; /* host interface index */
15200 uint16 slice_mask
; /* bit0 = slice0, bit1=slice1, rest reserved */
15201 uint8 pad
[2]; /* padding */
15202 uint8 stats_types_req
[]; /* XTLVs of requested types */
15203 } ecounters_stats_types_report_req_t
;
15205 /* ##### Ecounters_Eventmsgs v2 section ##### */
15207 #define ECOUNTERS_EVENTMSGS_VERSION_2 2
15209 typedef struct event_ecounters_config_request_v2
{
15210 uint16 version
; /* config version */
15211 uint16 len
; /* Length of this struct including variable len */
15212 uint16 logset
; /* Set where data will go. */
15213 uint16 event_id
; /* Event id for which this config is meant for */
15214 uint8 flags
; /* Config flags */
15215 uint8 pad
[3]; /* Reserved for future use */
15216 uint8 ecounters_xtlvs
[]; /* Statistics Types (tags) to retrieve. */
15217 } event_ecounters_config_request_v2_t
;
15219 #define EVENT_ECOUNTERS_FLAGS_ADD (1 << 0) /* Add configuration for the event_id if set */
15220 #define EVENT_ECOUNTERS_FLAGS_DEL (1 << 1) /* Delete configuration for event_id if set */
15221 #define EVENT_ECOUNTERS_FLAGS_ANYIF (1 << 2) /* Interface filtering disable / off bit */
15222 #define EVENT_ECOUNTERS_FLAGS_BE (1 << 3) /* If cleared report stats of
15223 * one event log buffer
15225 #define EVENT_ECOUNTERS_FLAGS_DEL_ALL (1 << 4) /* Delete all the configurations of
15226 * event ecounters if set
15229 #define EVENT_ECOUNTERS_FLAGS_BUS (1 << 5) /* Add configuration for the bus events */
15230 #define EVENT_ECOUNTERS_FLAGS_BUS_H2D (1 << 6) /* Add configuration for the bus direction
15231 * 0 - D2H and 1 - H2D
15234 #define EVENT_ECOUNTERS_FLAGS_DELAYED_FLUSH (1 << 7) /* Flush only when half of the total size
15235 * of blocks gets filled. This is to avoid
15236 * many interrupts to host.
15238 #define EVENT_ECOUNTERS_FLAGS_USER (1 << 6) /* Add configuration for user defined events
15239 * Reuse the same flag as H2D
15242 /* Ecounters suspend resume */
15243 #define ECOUNTERS_SUSPEND_VERSION_V1 1
15244 /* To be used in populating suspend_mask and suspend_bitmap */
15245 #define ECOUNTERS_SUSPEND_TIMER (1 << ECOUNTERS_TRIGGER_REASON_TIMER)
15246 #define ECOUNTERS_SUSPEND_EVENTS (1 << ECOUNTERS_TRIGGER_REASON_EVENTS)
15248 typedef struct ecounters_suspend
{
15251 uint32 suspend_bitmap
; /* type of ecounter reporting to be suspended */
15252 uint32 suspend_mask
; /* type of ecounter reporting to be suspended */
15253 } ecounters_suspend_t
;
15255 /* -------------- dynamic BTCOEX --------------- */
15256 #define DCTL_TROWS 2 /**< currently practical number of rows */
15257 #define DCTL_TROWS_MAX 4 /**< 2 extra rows RFU */
15258 /* DYNCTL profile flags */
15259 #define DCTL_FLAGS_DISABLED 0 /**< default value: all features disabled */
15260 #define DCTL_FLAGS_DYNCTL (1 << 0) /**< 1 - enabled, 0 - legacy only */
15261 #define DCTL_FLAGS_DESENSE (1 << 1) /**< auto desense is enabled */
15262 #define DCTL_FLAGS_MSWITCH (1 << 2) /**< mode switching is enabled */
15263 #define DCTL_FLAGS_PWRCTRL (1 << 3) /**< Tx power control is enabled */
15264 /* for now AGG on/off is handled separately */
15265 #define DCTL_FLAGS_TX_AGG_OFF (1 << 4) /**< TBD: allow TX agg Off */
15266 #define DCTL_FLAGS_RX_AGG_OFF (1 << 5) /**< TBD: allow RX agg Off */
15267 /* used for dry run testing only */
15268 #define DCTL_FLAGS_DRYRUN (1 << 7) /**< Enables dynctl dry run mode */
15269 #define IS_DYNCTL_ON(prof) ((prof->flags & DCTL_FLAGS_DYNCTL) != 0)
15270 #define IS_DESENSE_ON(prof) ((prof->flags & DCTL_FLAGS_DESENSE) != 0)
15271 #define IS_MSWITCH_ON(prof) ((prof->flags & DCTL_FLAGS_MSWITCH) != 0)
15272 #define IS_PWRCTRL_ON(prof) ((prof->flags & DCTL_FLAGS_PWRCTRL) != 0)
15273 /* desense level currently in use */
15274 #define DESENSE_OFF 0
15275 #define DFLT_DESENSE_MID 12
15276 #define DFLT_DESENSE_HIGH 2
15279 * dynctl data points(a set of btpwr & wlrssi thresholds)
15280 * for mode & desense switching
15282 typedef struct btc_thr_data
{
15283 int8 mode
; /**< used by desense sw */
15284 int8 bt_pwr
; /**< BT tx power threshold */
15285 int8 bt_rssi
; /**< BT rssi threshold */
15286 /* wl rssi range when mode or desense change may be needed */
15291 /* dynctl. profile data structure */
15292 #define DCTL_PROFILE_VER 0x01
15293 #include <packed_section_start.h>
15294 typedef BWL_PRE_PACKED_STRUCT
struct dctl_prof
{
15295 uint8 version
; /**< dynctl profile version */
15296 /* dynctl profile flags bit:0 - dynctl On, bit:1 dsns On, bit:2 mode sw On, */
15297 uint8 flags
; /**< bit[6:3] reserved, bit7 - Dryrun (sim) - On */
15298 /** wl desense levels to apply */
15299 uint8 dflt_dsns_level
;
15300 uint8 low_dsns_level
;
15301 uint8 mid_dsns_level
;
15302 uint8 high_dsns_level
;
15303 /** mode switching hysteresis in dBm */
15304 int8 msw_btrssi_hyster
;
15305 /** default btcoex mode */
15306 uint8 default_btc_mode
;
15307 /** num of active rows in mode switching table */
15309 /** num of rows in desense table */
15311 /** dynctl mode switching data table */
15312 btc_thr_data_t msw_data
[DCTL_TROWS_MAX
];
15313 /** dynctl desense switching data table */
15314 btc_thr_data_t dsns_data
[DCTL_TROWS_MAX
];
15315 } BWL_POST_PACKED_STRUCT dctl_prof_t
;
15316 #include <packed_section_end.h>
15318 /** dynctl status info */
15319 #include <packed_section_start.h>
15320 typedef BWL_PRE_PACKED_STRUCT
struct dynctl_status
{
15321 uint8 sim_on
; /**< true if simulation is On */
15322 uint16 bt_pwr_shm
; /**< BT per/task power as read from ucode */
15323 int8 bt_pwr
; /**< BT pwr extracted & converted to dBm */
15324 int8 bt_rssi
; /**< BT rssi in dBm */
15325 int8 wl_rssi
; /**< last wl rssi reading used by btcoex */
15326 uint8 dsns_level
; /**< current desense level */
15327 uint8 btc_mode
; /**< current btcoex mode */
15328 /* add more status items if needed, pad to 4 BB if needed */
15329 } BWL_POST_PACKED_STRUCT dynctl_status_t
;
15330 #include <packed_section_end.h>
15332 /** dynctl simulation (dryrun data) */
15333 #include <packed_section_start.h>
15334 typedef BWL_PRE_PACKED_STRUCT
struct dynctl_sim
{
15335 uint8 sim_on
; /**< simulation mode on/off */
15336 int8 btpwr
; /**< simulated BT power in dBm */
15337 int8 btrssi
; /**< simulated BT rssi in dBm */
15338 int8 wlrssi
; /**< simulated WL rssi in dBm */
15339 } BWL_POST_PACKED_STRUCT dynctl_sim_t
;
15340 /* no default structure packing */
15341 #include <packed_section_end.h>
15343 /** PTK key maintained per SCB */
15344 #define RSN_TEMP_ENCR_KEY_LEN 16
15345 typedef struct wpa_ptk
{
15346 uint8 kck
[RSN_KCK_LENGTH
]; /**< EAPOL-Key Key Confirmation Key (KCK) */
15347 uint8 kek
[RSN_KEK_LENGTH
]; /**< EAPOL-Key Key Encryption Key (KEK) */
15348 uint8 tk1
[RSN_TEMP_ENCR_KEY_LEN
]; /**< Temporal Key 1 (TK1) */
15349 uint8 tk2
[RSN_TEMP_ENCR_KEY_LEN
]; /**< Temporal Key 2 (TK2) */
15352 /** GTK key maintained per SCB */
15353 typedef struct wpa_gtk
{
15356 uint8 key
[DOT11_MAX_KEY_SIZE
];
15359 /** FBT Auth Response Data structure */
15360 typedef struct wlc_fbt_auth_resp
{
15361 uint8 macaddr
[ETHER_ADDR_LEN
]; /**< station mac address */
15363 uint8 pmk_r1_name
[WPA2_PMKID_LEN
];
15364 wpa_ptk_t ptk
; /**< pairwise key */
15365 wpa_gtk_t gtk
; /**< group key */
15367 uint8 status
; /**< Status of parsing FBT authentication
15368 Request in application
15370 uint8 ies
[1]; /**< IEs contains MDIE, RSNIE,
15371 FBTIE (ANonce, SNonce,R0KH-ID, R1KH-ID)
15373 } wlc_fbt_auth_resp_t
;
15375 /** FBT Action Response frame */
15376 typedef struct wlc_fbt_action_resp
{
15377 uint16 version
; /**< structure version */
15378 uint16 length
; /**< length of structure */
15379 uint8 macaddr
[ETHER_ADDR_LEN
]; /**< station mac address */
15380 uint8 data_len
; /**< len of ie from Category */
15381 uint8 data
[1]; /**< data contains category, action, sta address, target ap,
15382 status code,fbt response frame body
15384 } wlc_fbt_action_resp_t
;
15386 #define MACDBG_PMAC_ADDR_INPUT_MAXNUM 16
15387 #define MACDBG_PMAC_OBJ_TYPE_LEN 8
15389 typedef struct _wl_macdbg_pmac_param_t
{
15390 char type
[MACDBG_PMAC_OBJ_TYPE_LEN
];
15397 uint16 addr
[MACDBG_PMAC_ADDR_INPUT_MAXNUM
];
15400 } wl_macdbg_pmac_param_t
;
15402 /** IOVAR 'svmp_sampcol' parameter. Used to set and read SVMP_SAMPLE_COLLECT's setting */
15403 typedef struct wl_svmp_sampcol_param
{
15404 uint32 version
; /* version */
15406 uint8 trigger_mode
; /* SVMP_SAMPCOL_TRIGGER */
15407 uint8 trigger_mode_s
[2]; /* SVMP_SAMPCOL_PKTPROC */
15408 uint8 data_samplerate
; /* SVMP_SAMPCOL_SAMPLERATE */
15409 uint8 data_sel_phy1
; /* SVMP_SAMPCOL_PHY1MUX */
15410 uint8 data_sel_rx1
; /* SVMP_SAMPCOL_RX1MUX without iqCompOut */
15411 uint8 data_sel_dualcap
; /* SVMP_SAMPCOL_RX1MUX */
15412 uint8 pack_mode
; /* SVMP_SAMPCOL_PACK */
15414 uint8 pack_cfix_fmt
;
15415 uint8 pack_1core_sel
;
15418 uint32 buff_addr_start
; /* in word-size (2-bytes) */
15419 uint32 buff_addr_end
; /* note: Tcl in byte-size, HW in vector-size (8-bytes) */
15423 } wl_svmp_sampcol_t
;
15425 #define WL_SVMP_SAMPCOL_PARAMS_VERSION 1
15428 SVMP_SAMPCOL_TRIGGER_PKTPROC_TRANSITION
= 0,
15429 SVMP_SAMPCOL_TRIGGER_FORCE_IMMEDIATE
,
15430 SVMP_SAMPCOL_TRIGGER_RADAR_DET
15434 SVMP_SAMPCOL_PHY1MUX_GPIOOUT
= 0,
15435 SVMP_SAMPCOL_PHY1MUX_FFT
,
15436 SVMP_SAMPCOL_PHY1MUX_DBGHX
,
15437 SVMP_SAMPCOL_PHY1MUX_RX1MUX
15441 SVMP_SAMPCOL_RX1MUX_FARROWOUT
= 4,
15442 SVMP_SAMPCOL_RX1MUX_IQCOMPOUT
,
15443 SVMP_SAMPCOL_RX1MUX_DCFILTEROUT
,
15444 SVMP_SAMPCOL_RX1MUX_RXFILTEROUT
,
15445 SVMP_SAMPCOL_RX1MUX_ACIFILTEROUT
15449 SVMP_SAMPCOL_SAMPLERATE_1XBW
= 0,
15450 SVMP_SAMPCOL_SAMPLERATE_2XBW
15454 SVMP_SAMPCOL_PACK_DUALCAP
= 0,
15455 SVMP_SAMPCOL_PACK_4CORE
,
15456 SVMP_SAMPCOL_PACK_2CORE
,
15457 SVMP_SAMPCOL_PACK_1CORE
15461 SVMP_SAMPCOL_PKTPROC_RESET
= 0,
15462 SVMP_SAMPCOL_PKTPROC_CARRIER_SEARCH
,
15463 SVMP_SAMPCOL_PKTPROC_WAIT_FOR_NB_PWR
,
15464 SVMP_SAMPCOL_PKTPROC_WAIT_FOR_W1_PWR
,
15465 SVMP_SAMPCOL_PKTPROC_WAIT_FOR_W2_PWR
,
15466 SVMP_SAMPCOL_PKTPROC_OFDM_PHY
,
15467 SVMP_SAMPCOL_PKTPROC_TIMING_SEARCH
,
15468 SVMP_SAMPCOL_PKTPROC_CHAN_EST_1
,
15469 SVMP_SAMPCOL_PKTPROC_LEG_SIG_DEC
,
15470 SVMP_SAMPCOL_PKTPROC_SIG_DECODE_1
,
15471 SVMP_SAMPCOL_PKTPROC_SIG_DECODE_2
,
15472 SVMP_SAMPCOL_PKTPROC_HT_AGC
,
15473 SVMP_SAMPCOL_PKTPROC_CHAN_EST_2
,
15474 SVMP_SAMPCOL_PKTPROC_PAY_DECODE
,
15475 SVMP_SAMPCOL_PKTPROC_DSSS_CCK_PHY
,
15476 SVMP_SAMPCOL_PKTPROC_WAIT_ENERGY_DROP
,
15477 SVMP_SAMPCOL_PKTPROC_WAIT_NCLKS
,
15478 SVMP_SAMPCOL_PKTPROC_PAY_DEC_EXT
,
15479 SVMP_SAMPCOL_PKTPROC_SIG_FAIL_DELAY
,
15480 SVMP_SAMPCOL_PKTPROC_RIFS_SEARCH
,
15481 SVMP_SAMPCOL_PKTPROC_BOARD_SWITCH_DIV_SEARCH
,
15482 SVMP_SAMPCOL_PKTPROC_DSSS_CCK_BOARD_SWITCH_DIV_SEARCH
,
15483 SVMP_SAMPCOL_PKTPROC_CHAN_EST_3
,
15484 SVMP_SAMPCOL_PKTPROC_CHAN_EST_4
,
15485 SVMP_SAMPCOL_PKTPROC_FINE_TIMING_SEARCH
,
15486 SVMP_SAMPCOL_PKTPROC_SET_CLIP_GAIN
,
15487 SVMP_SAMPCOL_PKTPROC_NAP
,
15488 SVMP_SAMPCOL_PKTPROC_VHT_SIGA_DEC
,
15489 SVMP_SAMPCOL_PKTPROC_VHT_SIGB_DEC
,
15490 SVMP_SAMPCOL_PKTPROC_PKT_ABORT
,
15491 SVMP_SAMPCOL_PKTPROC_DCCAL
15494 /** IOVAR 'svmp_mem' parameter. Used to read/clear svmp memory */
15495 typedef struct svmp_mem
{
15496 uint32 addr
; /**< offset to read svmp memory from vasip base address */
15497 uint16 len
; /**< length in count of uint16's */
15498 uint16 val
; /**< set the range of addr/len with a value */
15501 /** IOVAR 'mu_rate' parameter. read/set mu rate for upto four users */
15502 #define MU_RATE_CFG_VERSION 1
15503 typedef struct mu_rate
{
15504 uint16 version
; /**< version of the structure as defined by MU_RATE_CFG_VERSION */
15505 uint16 length
; /**< length of entire structure */
15506 uint8 auto_rate
; /**< enable/disable auto rate */
15508 uint16 rate_user
[4]; /**< rate per each of four users, set to -1 for no change */
15511 /** IOVAR 'mu_group' parameter. Used to set and read MU group recommendation setting */
15512 #define WL_MU_GROUP_AUTO_COMMAND -1
15513 #define WL_MU_GROUP_PARAMS_VERSION 3
15514 #define WL_MU_GROUP_METHOD_NAMELEN 64
15515 #define WL_MU_GROUP_NGROUP_MAX 15
15516 #define WL_MU_GROUP_NUSER_MAX 4
15517 #define WL_MU_GROUP_METHOD_MIN 0
15518 #define WL_MU_GROUP_NUMBER_AUTO_MIN 1
15519 #define WL_MU_GROUP_NUMBER_AUTO_MAX 15
15520 #define WL_MU_GROUP_NUMBER_FORCED_MAX 8
15521 #define WL_MU_GROUP_METHOD_OLD 0
15522 #define WL_MU_GROUP_MODE_AUTO 0
15523 #define WL_MU_GROUP_MODE_FORCED 1
15524 #define WL_MU_GROUP_FORCED_1GROUP 1
15525 #define WL_MU_GROUP_ENTRY_EMPTY -1
15526 typedef struct mu_group
{
15527 uint32 version
; /* version */
15528 int16 forced
; /* forced group recommendation */
15529 int16 forced_group_mcs
; /* forced group with mcs */
15530 int16 forced_group_num
; /* forced group number */
15531 int16 group_option
[WL_MU_GROUP_NGROUP_MAX
][WL_MU_GROUP_NUSER_MAX
];
15532 /* set mode for forced grouping and read mode for auto grouping */
15533 int16 group_GID
[WL_MU_GROUP_NGROUP_MAX
];
15534 int16 group_method
; /* methof for VASIP group recommendation */
15535 int16 group_number
; /* requested number for VASIP group recommendation */
15536 int16 auto_group_num
; /* exact number from VASIP group recommendation */
15537 int8 group_method_name
[WL_MU_GROUP_METHOD_NAMELEN
];
15541 typedef struct mupkteng_sta
{
15542 struct ether_addr ea
;
15548 typedef struct mupkteng_client
{
15553 } mupkteng_client_t
;
15555 typedef struct mupkteng_tx
{
15556 mupkteng_client_t client
[8];
15562 * MU Packet engine interface.
15563 * The following two definitions will go into
15565 * when wl utility changes are merged to EAGLE TOB & Trunk
15568 #define WL_MUPKTENG_PER_TX_START 0x10
15569 #define WL_MUPKTENG_PER_TX_STOP 0x20
15571 /** IOVAR 'mu_policy' parameter. Used to configure MU admission control policies */
15572 #define WL_MU_POLICY_PARAMS_VERSION 1
15573 #define WL_MU_POLICY_SCHED_DEFAULT 60
15574 #define WL_MU_POLICY_DISABLED 0
15575 #define WL_MU_POLICY_ENABLED 1
15576 #define WL_MU_POLICY_NRX_MIN 1
15577 #define WL_MU_POLICY_NRX_MAX 2
15578 typedef struct mu_policy
{
15581 uint32 sched_timer
;
15586 uint32 max_muclients
;
15589 #define WL_NAN_BAND_STR_SIZE 5 /* sizeof ("auto") */
15591 /** Definitions of different NAN Bands */
15592 /* do not change the order */
15597 NAN_BAND_INVALID
= 0xFF
15600 /* ifdef WL11ULB */
15601 /* ULB Mode configured via "ulb_mode" IOVAR */
15603 ULB_MODE_DISABLED
= 0,
15604 ULB_MODE_STD_ALONE_MODE
= 1, /* Standalone ULB Mode */
15605 ULB_MODE_DYN_MODE
= 2, /* Dynamic ULB Mode */
15606 /* Add all other enums before this */
15610 /* ULB BWs configured via "ulb_bw" IOVAR during Standalone Mode Only.
15611 * Values of this enumeration are also used to specify 'Current Operational Bandwidth'
15612 * and 'Primary Operational Bandwidth' sub-fields in 'ULB Operations' field (used in
15613 * 'ULB Operations' Attribute or 'ULB Mode Switch' Attribute)
15616 ULB_BW_DISABLED
= 0,
15617 ULB_BW_10MHZ
= 1, /* Standalone ULB BW in 10 MHz BW */
15618 ULB_BW_5MHZ
= 2, /* Standalone ULB BW in 5 MHz BW */
15619 ULB_BW_2P5MHZ
= 3, /* Standalone ULB BW in 2.5 MHz BW */
15620 /* Add all other enums before this */
15623 /* endif WL11ULB */
15625 #define WL_MESH_IOCTL_VERSION 1
15626 #define MESH_IOC_BUFSZ 512 /* sufficient ioc buff size for mesh */
15629 typedef struct mesh_peer_info_ext
{
15630 mesh_peer_info_t peer_info
;
15632 uint16 local_aid
; /* AID generated by *local* to peer */
15633 uint32 entry_state
; /* see MESH_PEER_ENTRY_STATE_ACTIVE etc; valid
15634 * ONLY for internal peering requests
15638 struct ether_addr ea
; /* peer ea */
15639 } mesh_peer_info_ext_t
;
15641 /* #ifdef WLMESH */
15642 typedef struct mesh_peer_info_dump
{
15645 uint16 count
; /* number of results */
15646 uint16 remaining
; /* remaining rsults */
15647 mesh_peer_info_ext_t mpi_ext
[1];
15648 } mesh_peer_info_dump_t
;
15649 #define WL_MESH_PEER_RES_FIXED_SIZE (sizeof(mesh_peer_info_dump_t) - sizeof(mesh_peer_info_ext_t))
15651 #endif /* WLMESH */
15652 /* container for mesh iovtls & events */
15653 typedef struct wl_mesh_ioc
{
15654 uint16 version
; /* interface command or event version */
15655 uint16 id
; /* mesh ioctl cmd ID */
15656 uint16 len
; /* total length of all tlv records in data[] */
15657 uint16 pad
; /* pad to be 32 bit aligment */
15658 uint8 data
[]; /* var len payload of bcm_xtlv_t type */
15661 enum wl_mesh_cmds
{
15662 WL_MESH_CMD_ENABLE
= 1,
15663 WL_MESH_CMD_JOIN
= 2,
15664 WL_MESH_CMD_PEER_STATUS
= 3,
15665 WL_MESH_CMD_ADD_ROUTE
= 4,
15666 WL_MESH_CMD_DEL_ROUTE
= 5,
15667 WL_MESH_CMD_ADD_FILTER
= 6,
15668 WL_MESH_CMD_ENAB_AL_METRIC
= 7
15671 enum wl_mesh_cmd_xtlv_id
{
15672 WL_MESH_XTLV_ENABLE
= 1,
15673 WL_MESH_XTLV_JOIN
= 2,
15674 WL_MESH_XTLV_STATUS
= 3,
15675 WL_MESH_XTLV_ADD_ROUTE
= 4,
15676 WL_MESH_XTLV_DEL_ROUTE
= 5,
15677 WL_MESH_XTLV_ADD_FILTER
= 6,
15678 WL_MESH_XTLV_ENAB_AIRLINK
= 7
15682 /* Fast BSS Transition parameter configuration */
15683 #define FBT_PARAM_CURRENT_VERSION 0
15685 typedef struct _wl_fbt_params
{
15686 uint16 version
; /* version of the structure
15687 * as defined by FBT_PARAM_CURRENT_VERSION
15689 uint16 length
; /* length of the entire structure */
15691 uint16 param_type
; /* type of parameter defined below */
15692 uint16 param_len
; /* length of the param_value */
15693 uint8 param_value
[1]; /* variable length */
15696 #define WL_FBT_PARAM_TYPE_RSNIE 0
15697 #define WL_FBT_PARAM_TYPE_FTIE 0x1
15698 #define WL_FBT_PARAM_TYPE_SNONCE 0x2
15699 #define WL_FBT_PARAM_TYPE_MDE 0x3
15700 #define WL_FBT_PARAM_TYPE_PMK_R0_NAME 0x4
15701 #define WL_FBT_PARAM_TYPE_R0_KHID 0x5
15702 #define WL_FBT_PARAM_TYPE_R1_KHID 0x6
15703 #define WL_FBT_PARAM_TYPE_FIRST_INVALID 0x7
15705 /* Assoc Mgr commands for fine control of assoc */
15706 #define WL_ASSOC_MGR_CURRENT_VERSION 0x0
15709 uint16 version
; /* version of the structure as
15710 * defined by WL_ASSOC_MGR_CURRENT_VERSION
15712 uint16 length
; /* length of the entire structure */
15716 } wl_assoc_mgr_cmd_t
;
15718 #define WL_ASSOC_MGR_CMD_PAUSE_ON_EVT 0 /* have assoc pause on certain events */
15719 #define WL_ASSOC_MGR_CMD_ABORT_ASSOC 1
15721 #define WL_ASSOC_MGR_PARAMS_EVENT_NONE 0 /* use this to resume as well as clear */
15722 #define WL_ASSOC_MGR_PARAMS_PAUSE_EVENT_AUTH_RESP 1
15724 #define WL_WINVER_STRUCT_VER_1 (1)
15726 typedef struct wl_winver
{
15728 /* Version and length of this structure. Length includes all fields in wl_winver_t */
15729 uint16 struct_version
;
15730 uint16 struct_length
;
15732 /* Windows operating system version info (Microsoft provided) */
15739 /* NDIS runtime version (Microsoft provided) */
15745 /* NDIS Driver version (Broadcom provided) */
15751 /* WDI Upper Edge (UE) Driver version (Microsoft provided) */
15758 /* WDI Lower Edge (LE) Driver version (Broadcom provided) */
15767 /* defined(WLRCC) || defined(ROAM_CHANNEL_CACHE) */
15768 #define MAX_ROAM_CHANNEL 20
15771 chanspec_t channels
[MAX_ROAM_CHANNEL
];
15772 } wl_roam_channel_list_t
;
15773 /* endif RCC || ROAM_CHANNEL_CACHE */
15775 /* values for IOV_MFP arg */
15783 CHANSW_UNKNOWN
= 0, /* channel switch due to unknown reason */
15784 CHANSW_SCAN
= 1, /* channel switch due to scan */
15785 CHANSW_PHYCAL
= 2, /* channel switch due to phy calibration */
15786 CHANSW_INIT
= 3, /* channel set at WLC up time */
15787 CHANSW_ASSOC
= 4, /* channel switch due to association */
15788 CHANSW_ROAM
= 5, /* channel switch due to roam */
15789 CHANSW_MCHAN
= 6, /* channel switch triggered by mchan module */
15790 CHANSW_IOVAR
= 7, /* channel switch due to IOVAR */
15791 CHANSW_CSA_DFS
= 8, /* channel switch due to chan switch announcement from AP */
15792 CHANSW_APCS
= 9, /* Channel switch from AP channel select module */
15793 CHANSW_AWDL
= 10, /* channel switch due to AWDL */
15794 CHANSW_FBT
= 11, /* Channel switch from FBT module for action frame response */
15795 CHANSW_UPDBW
= 12, /* channel switch at update bandwidth */
15796 CHANSW_ULB
= 13, /* channel switch at ULB */
15797 CHANSW_LAST
= 14 /* last channel switch reason */
15801 * WOWL unassociated mode power svae pattern.
15803 typedef struct wowl_radio_duty_cycle
{
15804 uint16 wake_interval
;
15805 uint16 sleep_interval
;
15806 } wowl_radio_duty_cycle_t
;
15808 typedef struct nd_ra_ol_limits
{
15809 uint16 version
; /* version of the iovar buffer */
15810 uint16 type
; /* type of data provided */
15811 uint16 length
; /* length of the entire structure */
15812 uint16 pad1
; /* pad union to 4 byte boundary */
15815 uint16 min_time
; /* seconds, min time for RA offload hold */
15816 uint16 lifetime_percent
;
15817 /* percent, lifetime percentage for offload hold time */
15818 } lifetime_relative
;
15820 uint16 hold_time
; /* seconds, RA offload hold time */
15821 uint16 pad2
; /* unused */
15824 } nd_ra_ol_limits_t
;
15826 #define ND_RA_OL_LIMITS_VER 1
15828 /* nd_ra_ol_limits sub-types */
15829 #define ND_RA_OL_LIMITS_REL_TYPE 0 /* relative, percent of RA lifetime */
15830 #define ND_RA_OL_LIMITS_FIXED_TYPE 1 /* fixed time */
15832 /* buffer lengths for the different nd_ra_ol_limits types */
15833 #define ND_RA_OL_LIMITS_REL_TYPE_LEN 12
15834 #define ND_RA_OL_LIMITS_FIXED_TYPE_LEN 10
15837 * Temperature Throttling control mode
15839 typedef struct wl_temp_control
{
15842 uint16 control_bit
;
15843 } wl_temp_control_t
;
15845 /* SensorHub Interworking mode */
15847 #define SHUB_CONTROL_VERSION 1
15848 #define SHUB_CONTROL_LEN 12
15859 /* WLC_MAJOR_VER <= 5 */
15860 /* Data structures for non-TLV format */
15862 /* Data structures for rsdb caps */
15864 * The flags field of the rsdb_caps_response is designed to be
15865 * a Bit Mask. As of now only Bit 0 is used as mentioned below.
15868 /* Bit-0 in flags is used to indicate if the cores can operate synchronously
15869 * i.e either as 2x2 MIMO or 2(1x1 SISO). This is true only for 4349 variants
15870 * 0 - device can operate only in rsdb mode (eg: 4364)
15871 * 1 - device can operate in both rsdb and mimo (eg : 4359 variants)
15874 #define WL_RSDB_CAPS_VER 2
15875 #define SYNCHRONOUS_OPERATION_TRUE (1 << 0)
15876 #define WL_RSDB_CAPS_FIXED_LEN OFFSETOF(rsdb_caps_response_t, num_chains)
15878 typedef struct rsdb_caps_response
{
15879 uint8 ver
; /* Version */
15880 uint8 len
; /* length of this structure excluding ver and len */
15881 uint8 rsdb
; /* TRUE for rsdb chip */
15882 uint8 num_of_cores
; /* no of d11 cores */
15883 uint16 flags
; /* Flags to indicate various capabilities */
15884 uint8 num_chains
[1]; /* Tx/Rx chains for each core */
15885 } rsdb_caps_response_t
;
15887 /* Data structures for rsdb bands */
15889 #define WL_RSDB_BANDS_VER 2
15890 #define WL_RSDB_BANDS_FIXED_LEN OFFSETOF(rsdb_bands_t, band)
15892 typedef struct rsdb_bands
15896 uint16 num_cores
; /* num of D11 cores */
15897 int16 band
[1]; /* The band operating on each of the d11 cores */
15902 #define WL_RSDB_CONFIG_VER 3
15903 #define ALLOW_SIB_PARALLEL_SCAN (1 << 0)
15904 #define MAX_BANDS 2
15906 #define WL_RSDB_CONFIG_LEN sizeof(rsdb_config_t)
15908 typedef uint8 rsdb_opmode_t
;
15909 typedef uint32 rsdb_flags_t
;
15911 typedef enum rsdb_modes
{
15912 WLC_SDB_MODE_NOSDB_MAIN
= 1, /* 2X2 or MIMO mode (applicable only for 4355) */
15913 WLC_SDB_MODE_NOSDB_AUX
= 2,
15914 WLC_SDB_MODE_SDB_MAIN
= 3, /* This is RSDB mode(default) applicable only for 4364 */
15915 WLC_SDB_MODE_SDB_AUX
= 4,
15916 WLC_SDB_MODE_SDB_AUTO
= 5, /* Same as WLC_RSDB_MODE_RSDB(1+1) mode above */
15919 typedef struct rsdb_config
{
15923 rsdb_opmode_t non_infra_mode
;
15924 rsdb_opmode_t infra_mode
[MAX_BANDS
];
15925 rsdb_flags_t flags
[MAX_BANDS
];
15926 rsdb_opmode_t current_mode
; /* Valid only in GET, returns the current mode */
15930 /* WLC_MAJOR_VER > =5 */
15931 /* TLV definitions and data structures for rsdb subcmds */
15933 enum wl_rsdb_cmd_ids
{
15935 WL_RSDB_CMD_VER
= 0,
15936 WL_RSDB_CMD_CAPS
= 1,
15937 WL_RSDB_CMD_BANDS
= 2,
15938 WL_RSDB_CMD_CONFIG
= 3,
15939 /* Add before this !! */
15942 #define WL_RSDB_IOV_VERSION 0x1
15944 typedef struct rsdb_caps_response_v1
{
15945 uint8 rsdb
; /* TRUE for rsdb chip */
15946 uint8 num_of_cores
; /* no of d11 cores */
15947 uint16 flags
; /* Flags to indicate various capabilities */
15948 uint8 num_chains
[MAX_NUM_D11CORES
]; /* Tx/Rx chains for each core */
15949 uint8 band_cap
[MAX_NUM_D11CORES
]; /* band cap bitmask per slice */
15950 } rsdb_caps_response_v1_t
;
15952 typedef struct rsdb_bands_v1
15954 uint8 num_cores
; /* num of D11 cores */
15955 uint8 pad
; /* padding bytes for 4 byte alignment */
15956 int8 band
[MAX_NUM_D11CORES
]; /* The band operating on each of the d11 cores */
15959 typedef struct rsdb_config_xtlv
{
15960 rsdb_opmode_t reserved1
; /* Non_infra mode is no more applicable */
15961 rsdb_opmode_t infra_mode
[MAX_BANDS
]; /* Target mode for Infra association */
15962 uint8 pad
; /* pad bytes for 4 byte alignment */
15963 rsdb_flags_t flags
[MAX_BANDS
];
15964 rsdb_opmode_t current_mode
; /* GET only; has current mode of operation */
15966 } rsdb_config_xtlv_t
;
15968 /* Definitions for slot_bss chanseq iovar */
15969 #define WL_SLOT_BSS_VERSION 1
15971 /* critical slots max size */
15972 #define WL_SLOTTED_BSS_CS_BMP_CFG_MAX_SZ 128 /* arbitrary */
15974 enum wl_slotted_bss_cmd_id
{
15975 WL_SLOTTED_BSS_CMD_VER
= 0,
15976 WL_SLOTTED_BSS_CMD_CHANSEQ
= 1,
15977 WL_SLOTTED_BSS_CMD_CS_BMP
= 2 /* critical slots bitmap */
15979 typedef uint16 chan_seq_type_t
;
15980 enum chan_seq_type
{
15981 CHAN_SEQ_TYPE_AWDL
= 1,
15982 CHAN_SEQ_TYPE_SLICE
= 2,
15983 CHAN_SEQ_TYPE_NAN
= 3
15985 typedef uint8 sched_flag_t
;
15987 NO_SDB_SCHED
= 0x1,
15988 SDB_TDM_SCHED
= 0x2,
15989 SDB_SPLIT_BAND_SCHED
= 0x4, /* default mode for 4357 */
15992 SDB_DUAL_TIME
= (MAIN_ONLY
| AUX_ONLY
),
15993 NO_SDB_MAIN_ONLY
= (NO_SDB_SCHED
| MAIN_ONLY
), /* default mode for 4364 */
15994 SDB_TDM_SCHED_MAIN
= (SDB_TDM_SCHED
| MAIN_ONLY
),
15995 SDB_TDM_SCHED_AUX
= (SDB_TDM_SCHED
| AUX_ONLY
),
15996 SDB_TDM_SCHED_DUAL_TIME
= (SDB_TDM_SCHED
| SDB_DUAL_TIME
),
15997 SDB_SPLIT_BAND_SCHED_DUAL_TIME
= (SDB_SPLIT_BAND_SCHED
| SDB_DUAL_TIME
)
16000 typedef struct chan_seq_tlv_data
{
16003 } chan_seq_tlv_data_t
;
16005 typedef struct chan_seq_tlv
{
16006 chan_seq_type_t type
;
16008 chan_seq_tlv_data_t chanseq_data
[1];
16011 typedef struct sb_channel_sequence
{
16012 sched_flag_t sched_flags
; /* (sdb-tdm or sdb-sb or Dual-Time) */
16013 uint8 num_seq
; /* number of chan_seq_tlv following */
16015 chan_seq_tlv_t seq
[1];
16016 } sb_channel_sequence_t
;
16018 typedef struct slice_chan_seq
{
16019 uint8 slice_index
; /* 0(Main) or 1 (Aux) */
16020 uint8 num_chanspecs
;
16023 chanspec_t chanspecs
[1];
16024 } slice_chan_seq_t
;
16026 #define SLOT_BSS_SLICE_TYPE_DUR_MAX_RANGE 2u
16027 #define SLOTTED_BSS_AGGR_EN (1 << 0) /* Bitmap of mode */
16028 #define SLOTTED_BSS_AGGR_LIMIT_DUR (1 << 1) /* Jira 49554 */
16030 #define WL_SLICE_CHAN_SEQ_FIXED_LEN OFFSETOF(slice_chan_seq_t, chanspecs)
16031 /* Definitions for slotted_bss stats */
16032 #define SBSS_STATS_VERSION 1
16033 #define SBSS_STATS_CURRENT_VERSION SBSS_STATS_VERSION
16035 #define SBSS_MAX_CHAN_STATS 4
16037 typedef struct sbss_core_stats
{
16038 uint32 sb_slot_start
;
16039 uint32 sb_slot_end
;
16040 uint32 sb_slot_skip
;
16041 uint32 mismatch_count
;
16042 } sbss_core_stats_t
;
16044 typedef struct sbss_chan_stats
{
16045 chanspec_t chanspec
;
16049 } sbss_chan_stats_t
;
16051 typedef struct sbss_stats_v1
{
16054 sbss_core_stats_t corestats
[MAX_NUM_D11CORES
];
16055 sbss_chan_stats_t sbss_chanstats
[MAX_NUM_D11CORES
][SBSS_MAX_CHAN_STATS
];
16058 /* slotted bss critical slots */
16059 typedef struct wl_sbss_cs_bmp_s
{
16063 } wl_sbss_cs_bmp_t
;
16065 typedef struct sim_pm_params
{
16071 /* Digital napping status */
16072 #define WL_NAP_STATUS_VERSION_1 1
16073 typedef struct wl_nap_status_v1
{
16074 uint16 version
; /* structure version */
16075 uint16 len
; /* length of returned data */
16076 uint16 fw_status
; /* bitmask of FW disable reasons */
16077 uint8 hw_status
; /* bitmask for actual HW state info */
16078 uint8 slice_index
; /* which slice this represents */
16079 uint32 total_disable_dur
; /* total time (ms) disabled for fw_status */
16080 } wl_nap_status_v1_t
;
16082 /* Bits for fw_status */
16083 #define NAP_DISABLED_HOST 0x0001 /* Host has disabled through nap_enable */
16084 #define NAP_DISABLED_RSSI 0x0002 /* Disabled because of nap_rssi_threshold */
16085 #define NAP_DISABLED_SCAN 0x0004 /* Disabled because of scan */
16086 #define NAP_DISABLED_ASSOC 0x0008 /* Disabled because of association */
16087 #define NAP_DISABLED_LTE 0x0010 /* Disabled because of LTE */
16088 #define NAP_DISABLED_ACI 0x0020 /* Disabled because of ACI mitigation */
16090 /* Bits for hw_status */
16091 #define NAP_HWCFG 0x01 /* State of NAP config bit in phy HW */
16092 #define NAP_NOCLK 0x80 /* No clock to read HW (e.g. core down) */
16094 /* ifdef WL_NATOE */
16095 #define WL_NATOE_IOCTL_VERSION 1
16096 #define WL_NATOE_IOC_BUFSZ 512 /* sufficient ioc buff size for natoe */
16097 #define WL_NATOE_DBG_STATS_BUFSZ 2048
16098 #define NATOE_FLAGS_ENAB_MASK 0x1
16099 #define NATOE_FLAGS_ACTIVE_MASK 0x2
16100 #define NATOE_FLAGS_PUBNW_MASK 0x4
16101 #define NATOE_FLAGS_PVTNW_MASK 0x8
16102 #define NATOE_FLAGS_ENAB_SHFT_MASK 0
16103 #define NATOE_FLAGS_ACTIVE_SHFT_MASK 1
16104 #define NATOE_FLAGS_PUBNW_SHFT_MASK 2
16105 #define NATOE_FLAGS_PVTNW_SHFT_MASK 3
16106 #define NATOE_FLAGS_PUB_NW_UP (1 << NATOE_FLAGS_PUBNW_SHFT_MASK)
16107 #define NATOE_FLAGS_PVT_NW_UP (1 << NATOE_FLAGS_PVTNW_SHFT_MASK)
16109 /* Module version is 1 for IGUANA
16111 #define WL_NATOE_MODULE_VER_1 1
16113 /* WL_NATOE_CMD_MOD_VER */
16114 typedef uint16 wl_natoe_ver_t
;
16115 /* config natoe STA and AP IP's structure */
16118 uint32 sta_netmask
;
16119 uint32 sta_router_ip
;
16123 } wl_natoe_config_ips_t
;
16125 /* natoe ports config structure */
16127 uint16 start_port_num
;
16128 uint16 no_of_ports
;
16129 } wl_natoe_ports_config_t
;
16131 /* natoe ports exception info */
16133 uint16 sta_port_num
;
16134 uint16 dst_port_num
; /* for SIP type protocol, dst_port_num info can be ignored by FW */
16135 uint32 ip
; /* for SIP ip is APcli_ip and for port clash it is dst_ip */
16136 uint8 entry_type
; /* Create/Destroy */
16138 } wl_natoe_exception_port_t
;
16140 /* container for natoe ioctls & events */
16141 typedef struct wl_natoe_ioc
{
16142 uint16 version
; /* interface command or event version */
16143 uint16 id
; /* natoe ioctl cmd ID */
16144 uint16 len
; /* total length of all tlv records in data[] */
16145 uint16 pad
; /* pad to be 32 bit aligment */
16146 uint8 data
[]; /* var len payload of bcm_xtlv_t type */
16149 typedef struct wl_natoe_pool_stats_v1
{
16150 /* For debug purposes */
16151 uint16 poolreorg_cnt
;
16152 uint16 poolrevert_cnt
;
16153 uint16 txfrag_state
;
16154 uint16 rxfrag_state
;
16155 uint16 txfrag_plen
;
16156 uint16 rxfrag_plen
;
16159 uint16 txmin_bkup_bufs
;
16160 uint16 rxmin_bkup_bufs
;
16161 uint16 pktpool_sbuf_alloc
;
16162 uint16 pktpool_plen
;
16163 uint16 pktpool_pavail
;
16164 /* Peak shared buffer count in all iterations */
16166 /* Peak shared buffer count in current D3 iteration */
16167 uint16 sbuf_peak_cur
;
16168 } wl_natoe_pool_stats_v1_t
;
16170 typedef struct wl_natoe_arp_entry_v1
{
16171 struct ipv4_addr ip
;
16172 struct ether_addr mac_addr
;
16175 } wl_natoe_arp_entry_v1_t
;
16177 typedef struct wl_natoe_dbg_arp_tbl_info_v1
{
16178 uint8 valid_arp_entries
;
16180 wl_natoe_arp_entry_v1_t arp_ent
[];
16181 } wl_natoe_dbg_arp_tbl_info_v1_t
;
16183 typedef struct wl_natoe_skip_port_entry_v1
{
16184 struct ipv4_addr srcip
;
16187 } wl_natoe_skip_port_entry_v1_t
;
16189 typedef struct wl_natoe_skip_port_info_v1
{
16190 uint8 valid_entries
;
16192 wl_natoe_skip_port_entry_v1_t skip_port_ent
[];
16193 } wl_natoe_skip_port_info_v1_t
;
16195 typedef struct wl_natoe_dbg_stats_v1
{
16196 uint16 active_nat_entries
;
16197 uint16 active_dns_entries
;
16198 uint16 active_icmp_entries
;
16199 uint16 valid_arp_entries
;
16200 uint16 prev_nat_entries
;
16201 uint16 prev_dns_entries
;
16202 uint16 tcp_fast_reclaim_cnt
;
16203 uint16 mcast_packets
;
16204 uint16 bcast_packets
;
16205 uint16 port_commands_rcvd
;
16206 uint16 unsupported_prot
;
16207 uint16 arp_req_sent
;
16208 uint16 arp_rsp_rcvd
;
16209 uint16 non_ether_frames
;
16210 uint16 port_alloc_fail
;
16211 uint16 srcip_tbl_full
;
16212 uint16 dstip_tbl_full
;
16213 uint16 nat_tbl_full
;
16214 uint16 icmp_error_cnt
;
16215 uint16 pkt_drops_resource
;
16216 uint32 frwd_nat_pkt_cnt
;
16217 uint32 reverse_nat_pkt_cnt
;
16218 uint16 pub_nw_chspec
;
16219 uint16 pvt_nw_chspec
;
16220 uint8 pubnw_cfg_idx
;
16221 uint8 pvtnw_cfg_idx
;
16222 uint8 pubnw_cfg_ID
;
16223 uint8 pvtnw_cfg_ID
;
16224 uint16 natoe_flags
;
16225 } wl_natoe_dbg_stats_v1_t
;
16227 typedef struct wl_natoe_exception_port_inf_v1
{
16228 uint16 except_bmap_size
;
16229 uint8 port_except_bmap
[];
16230 } wl_natoe_exception_port_inf_v1_t
;
16232 typedef struct wl_natoe_dstnat_entry_v1
{
16233 struct ipv4_addr clientip
;
16234 struct ether_addr client_mac_addr
;
16235 uint16 client_listenport
;
16237 } wl_natoe_dstnat_entry_v1_t
;
16239 enum wl_natoe_cmds
{
16240 WL_NATOE_CMD_MOD_VER
= 0,
16241 WL_NATOE_CMD_ENABLE
= 1,
16242 WL_NATOE_CMD_CONFIG_IPS
= 2,
16243 WL_NATOE_CMD_CONFIG_PORTS
= 3,
16244 WL_NATOE_CMD_DBG_STATS
= 4,
16245 WL_NATOE_CMD_EXCEPTION_PORT
= 5,
16246 WL_NATOE_CMD_SKIP_PORT
= 6,
16247 WL_NATOE_CMD_TBL_CNT
= 7,
16248 WL_NATOE_CMD_CONFIG_DSTNAT
= 8
16251 enum wl_natoe_cmd_xtlv_id
{
16252 WL_NATOE_XTLV_MOD_VER
= 0,
16253 WL_NATOE_XTLV_ENABLE
= 1,
16254 WL_NATOE_XTLV_CONFIG_IPS
= 2,
16255 WL_NATOE_XTLV_CONFIG_PORTS
= 3,
16256 WL_NATOE_XTLV_DBG_STATS
= 4,
16257 WL_NATOE_XTLV_EXCEPTION_PORT
= 5,
16258 WL_NATOE_XTLV_SKIP_PORT
= 6,
16259 WL_NATOE_XTLV_TBL_CNT
= 7,
16260 WL_NATOE_XTLV_ARP_TBL
= 8,
16261 WL_NATOE_XTLV_POOLREORG
= 9,
16262 WL_NATOE_XTLV_CONFIG_DSTNAT
= 10
16265 /* endif WL_NATOE */
16267 enum wl_idauth_cmd_ids
{
16268 WL_IDAUTH_CMD_CONFIG
= 1,
16269 WL_IDAUTH_CMD_PEER_INFO
= 2,
16270 WL_IDAUTH_CMD_COUNTERS
= 3,
16273 enum wl_idauth_xtlv_id
{
16274 WL_IDAUTH_XTLV_AUTH_ENAB
= 0x1,
16275 WL_IDAUTH_XTLV_GTK_ROTATION
= 0x2,
16276 WL_IDAUTH_XTLV_EAPOL_COUNT
= 0x3,
16277 WL_IDAUTH_XTLV_EAPOL_INTRVL
= 0x4,
16278 WL_IDAUTH_XTLV_BLKLIST_COUNT
= 0x5,
16279 WL_IDAUTH_XTLV_BLKLIST_AGE
= 0x6,
16280 WL_IDAUTH_XTLV_PEERS_INFO
= 0x7,
16281 WL_IDAUTH_XTLV_COUNTERS
= 0x8
16283 enum wl_idauth_stats
{
16284 WL_AUTH_PEER_STATE_AUTHORISED
= 0x01,
16285 WL_AUTH_PEER_STATE_BLACKLISTED
= 0x02,
16286 WL_AUTH_PEER_STATE_4WAY_HS_ONGOING
= 0x03,
16287 WL_AUTH_PEER_STATE_LAST
16290 uint16 state
; /* Peer State: Authorised or Blacklisted */
16291 struct ether_addr peer_addr
; /* peer Address */
16292 uint32 blklist_end_time
; /* Time of blacklist end */
16294 typedef struct wl_idauth_counters
{
16295 uint32 auth_reqs
; /* No of auth req recvd */
16296 uint32 mic_fail
; /* No of mic fails */
16297 uint32 four_way_hs_fail
; /* No of 4-way handshake fails */
16298 } wl_idauth_counters_t
;
16300 #define WLC_UTRACE_LEN 512
16301 #define WLC_UTRACE_READ_END 0
16302 #define WLC_UTRACE_MORE_DATA 1
16303 typedef struct wl_utrace_capture_args_v1
{
16306 } wl_utrace_capture_args_v1_t
;
16308 #define UTRACE_CAPTURE_VER_2 2
16309 typedef struct wl_utrace_capture_args_v2
{
16310 /* structure control */
16311 uint16 version
; /**< structure version */
16312 uint16 length
; /**< length of the response */
16313 uint32 flag
; /* Indicates if there is more data or not */
16314 } wl_utrace_capture_args_v2_t
;
16316 /* Signal read end. */
16317 #define WLC_REGVAL_READ_END 0
16318 /* Signal more data pending. */
16319 #define WLC_REGVAL_MORE_DATA 1
16320 /* Internal read state. */
16321 #define WLC_REGVAL_READ_CONTINUE 2
16323 #define WLC_REGVAL_DUMP_PHYREG 0
16324 #define WLC_REGVAL_DUMP_RADREG 1
16326 #define PHYREGVAL_CAPTURE_BUFFER_LEN 2048
16328 typedef struct wl_regval_capture_args
{
16329 uint32 control_flag
; /* Carries status information. */
16330 } wl_regval_capture_args_t
;
16332 /* XTLV IDs for the Health Check "hc" iovar top level container */
16334 WL_HC_XTLV_ID_CAT_HC
= 1, /* category for HC as a whole */
16335 WL_HC_XTLV_ID_CAT_DATAPATH_TX
= 2, /* Datapath Tx */
16336 WL_HC_XTLV_ID_CAT_DATAPATH_RX
= 3, /* Datapath Rx */
16337 WL_HC_XTLV_ID_CAT_SCAN
= 4, /* Scan */
16338 WL_HC_XTLV_ID_CAT_EVENTMASK
= 5, /* Health Check event mask. */
16341 /* Health Check: Common XTLV IDs for sub-elements in the top level container
16342 * Number starts at 0x8000 to be out of the way for category specific IDs.
16345 WL_HC_XTLV_ID_ERR
= 0x8000, /* for sub-command err return */
16346 WL_HC_XTLV_ID_IDLIST
= 0x8001, /* container for uint16 IDs */
16349 /* Health Check: Datapath TX IDs */
16351 WL_HC_TX_XTLV_ID_VAL_STALL_THRESHOLD
= 1, /* stall_threshold */
16352 WL_HC_TX_XTLV_ID_VAL_STALL_SAMPLE_SIZE
= 2, /* stall_sample_size */
16353 WL_HC_TX_XTLV_ID_VAL_STALL_TIMEOUT
= 3, /* stall_timeout */
16354 WL_HC_TX_XTLV_ID_VAL_STALL_FORCE
= 4, /* stall_force */
16355 WL_HC_TX_XTLV_ID_VAL_STALL_EXCLUDE
= 5, /* stall_exclude */
16356 WL_HC_TX_XTLV_ID_VAL_FC_TIMEOUT
= 6, /* flow ctl timeout */
16357 WL_HC_TX_XTLV_ID_VAL_FC_FORCE
= 7, /* flow ctl force failure */
16358 WL_HC_TX_XTLV_ID_VAL_DELAY_TO_TRAP
= 8, /* delay threshold for forced trap */
16359 WL_HC_TX_XTLV_ID_VAL_DELAY_TO_RPT
= 9, /* delay threshold for event log report */
16360 WL_HC_TX_XTLV_ID_VAL_FAILURE_TO_RPT
= 10, /* threshold for consecutive TX failures */
16363 /* Health Check: Datapath RX IDs */
16365 WL_HC_RX_XTLV_ID_VAL_DMA_STALL_TIMEOUT
= 1, /* dma_stall_timeout */
16366 WL_HC_RX_XTLV_ID_VAL_DMA_STALL_FORCE
= 2, /* dma_stall test trigger */
16367 WL_HC_RX_XTLV_ID_VAL_STALL_THRESHOLD
= 3, /* stall_threshold */
16368 WL_HC_RX_XTLV_ID_VAL_STALL_SAMPLE_SIZE
= 4, /* stall_sample_size */
16369 WL_HC_RX_XTLV_ID_VAL_STALL_FORCE
= 5, /* stall test trigger */
16372 /* Health Check: Datapath SCAN IDs */
16374 WL_HC_XTLV_ID_VAL_SCAN_STALL_THRESHOLD
= 1, /* scan stall threshold */
16377 /* Health check: PHY IDs */
16378 /* Needed for iguana 13.35 branch */
16381 PHY_HC_DD_TEMPSENSE
= 1,
16382 PHY_HC_DD_VCOCAL
= 2,
16385 PHY_HC_DD_LAST
/* This must be the last entry */
16386 } phy_hc_dd_type_t
;
16389 PHY_HC_DD_TEMP_FAIL
= 0,
16390 PHY_HC_DD_VCO_FAIL
= 1,
16391 PHY_HC_DD_RXDSN_FAIL
= 2,
16392 PHY_HC_DD_TXPOW_FAIL
= 3,
16393 PHY_HC_DD_END
/* This must be the last entry */
16394 } phy_hc_dd_type_v2_t
;
16396 /* IDs of Health Check report structures for sub types of health checks within WL */
16397 typedef enum wl_hc_dd_type
{
16398 WL_HC_DD_PCIE
= 0, /* PCIe */
16399 WL_HC_DD_RX_DMA_STALL
= 1, /* RX DMA stall check */
16400 WL_HC_DD_RX_STALL
= 2, /* RX stall check */
16401 WL_HC_DD_TX_STALL
= 3, /* TX stall check */
16402 WL_HC_DD_SCAN_STALL
= 4, /* SCAN stall check */
16403 WL_HC_DD_PHY
= 5, /* PHY health check */
16404 WL_HC_DD_REINIT
= 6, /* Reinit due to other reasons */
16405 WL_HC_DD_TXQ_STALL
= 7, /* TXQ stall */
16410 * Health Check report structures for sub types of health checks within WL
16413 /* Health Check report structure for Rx DMA Stall check */
16418 uint16 stalled_dma_bitmap
;
16419 } wl_rx_dma_hc_info_t
;
16421 /* Health Check report structure for Tx packet failure check */
16425 uint32 stall_bitmap
;
16426 uint32 stall_bitmap1
;
16430 uint32 tx_failure_all
;
16433 /* Health Check report structure for Rx dropped packet failure check */
16439 uint32 rx_hc_dropped_all
;
16440 uint32 rx_hc_alert_th
;
16443 /* HE top level command IDs */
16445 WL_HE_CMD_ENAB
= 0,
16446 WL_HE_CMD_FEATURES
= 1,
16447 WL_HE_CMD_TWT_SETUP
= 2,
16448 WL_HE_CMD_TWT_TEARDOWN
= 3,
16449 WL_HE_CMD_TWT_INFO
= 4,
16450 WL_HE_CMD_BSSCOLOR
= 5,
16451 WL_HE_CMD_PARTIAL_BSSCOLOR
= 6,
16453 WL_HE_CMD_STAID
= 8,
16454 WL_HE_CMD_RTSDURTHRESH
= 10,
16455 WL_HE_CMD_PEDURATION
= 11,
16459 /* TWT top level command IDs */
16461 WL_TWT_CMD_ENAB
= 0,
16462 WL_TWT_CMD_SETUP
= 1,
16463 WL_TWT_CMD_TEARDOWN
= 2,
16464 WL_TWT_CMD_INFO
= 3,
16468 /* TODO: Remove the follwoing after mering TWT changes to trunk */
16469 #define WL_TWT_CMD_DEF_IN_WLIOCTL 1
16471 #define WL_HEB_VER_1 1
16473 /* HEB top level command IDs */
16475 WL_HEB_CMD_ENAB
= 0,
16476 WL_HEB_CMD_NUM_HEB
= 1,
16477 WL_HEB_CMD_COUNTERS
= 2,
16478 WL_HEB_CMD_CLEAR_COUNTERS
= 3,
16479 WL_HEB_CMD_CONFIG
= 4,
16480 WL_HEB_CMD_STATUS
= 5,
16484 /* HEB counters structures */
16485 typedef struct wl_heb_int_cnt_v1
{
16487 uint16 start_event
;
16490 } wl_heb_int_cnt_v1_t
;
16492 typedef struct wl_heb_cnt_v1
{
16493 /* structure control */
16494 uint16 version
; /* structure version */
16495 uint16 length
; /* data length (starting after this field) */
16496 wl_heb_int_cnt_v1_t heb_int_cnt
[1];
16499 // struct for configuring HEB
16500 typedef struct wl_config_heb_fill_v1
{
16501 uint16 version
; /* structure version */
16502 uint16 length
; /* data length (starting after this field) */
16504 uint32 periodicity
;
16506 uint16 preeventtime
;
16509 } wl_config_heb_fill_v1_t
;
16511 typedef struct wl_heb_blk_params_v1
{
16512 /* Don't change the order of following elements. This is as per the HEB HW spec */
16513 uint32 event_int_val_l
;
16514 uint32 event_int_val_h
;
16517 uint32 pre_event_intmsk_bmp
;
16518 uint32 start_event_intmsk_bmp
;
16519 uint32 end_event_intmsk_bmp
;
16520 uint32 event_driver_info
;
16524 } wl_heb_blk_params_v1_t
;
16526 typedef struct wl_heb_int_status_v1
{
16528 wl_heb_blk_params_v1_t blk_params
;
16529 } wl_heb_reg_status_v1_t
;
16531 typedef struct wl_heb_status_v1
{
16532 uint16 version
; /* structure version */
16533 uint16 length
; /* data length (starting after this field) */
16534 wl_heb_reg_status_v1_t heb_status
[1];
16535 } wl_heb_status_v1_t
;
16537 /* TWT Setup descriptor */
16539 /* Setup Command. */
16540 uint8 setup_cmd
; /* See TWT_SETUP_CMD_XXXX in 802.11ah.h,
16541 * valid when bcast_twt is FALSE.
16543 /* Flow attributes */
16544 uint8 flow_flags
; /* See WL_TWT_FLOW_FLAG_XXXX below */
16545 uint8 flow_id
; /* must be between 0 and 7 */
16546 /* Target Wake Time */
16547 uint8 wake_type
; /* See WL_TWT_TIME_TYPE_XXXX below */
16548 uint32 wake_time_h
; /* target wake time - BSS TSF (us) */
16549 uint32 wake_time_l
;
16550 uint32 wake_dur
; /* target wake duration in unit of microseconds */
16551 uint32 wake_int
; /* target wake interval */
16553 uint16 bid
; /* must be between 0 and 255. Set 0xFFFF for auto assignment */
16554 uint16 li
; /* Listen interval: Units in number of beacon intervals */
16555 uint8 channel
; /* twt channel */
16560 #define WL_TWT_FLOW_FLAG_BROADCAST (1 << 0)
16561 #define WL_TWT_FLOW_FLAG_IMPLICIT (1 << 1)
16562 #define WL_TWT_FLOW_FLAG_UNANNOUNCED (1 << 2)
16563 #define WL_TWT_FLOW_FLAG_TRIGGER (1 << 3)
16564 #define WL_TWT_FLOW_FLAG_WAKE_TBTT_NEGO (1 << 4)
16565 #define WL_TWT_FLOW_FLAG_REQUEST (1 << 5)
16568 #define WL_TWT_FLOW_ID_FID 0x07 /* flow id */
16569 #define WL_TWT_FLOW_ID_GID_MASK 0x70 /* group id - broadcast TWT only */
16570 #define WL_TWT_FLOW_ID_GID_SHIFT 4
16572 #define WL_TWT_INV_BCAST_ID 0xFFFFu
16573 #define WL_TWT_INV_FLOW_ID 0xFFu
16576 /* TODO: not yet finalized */
16577 #define WL_TWT_TIME_TYPE_BSS 0 /* The time specified in wake_time_h/l is
16578 * the BSS TSF time.
16580 #define WL_TWT_TIME_TYPE_OFFSET 1 /* The time specified in wake_time_h/l is an offset
16581 * of the TSF time when the iovar is processed.
16584 #define WL_TWT_SETUP_VER 0
16586 /* HE TWT Setup command */
16588 /* structure control */
16589 uint16 version
; /* structure version */
16590 uint16 length
; /* data length (starting after this field) */
16592 struct ether_addr peer
; /* leave it all 0s' for AP */
16594 uint8 dialog
; /* an arbitrary number to identify the seesion */
16596 /* setup descriptor */
16597 wl_twt_sdesc_t desc
;
16600 #define WL_TWT_TEARDOWN_VER 0
16602 /* HE TWT Teardown command */
16604 /* structure control */
16605 uint16 version
; /* structure version */
16606 uint16 length
; /* data length (starting after this field) */
16608 struct ether_addr peer
; /* leave it all 0s' for AP */
16609 /* flow attributes */
16610 uint8 flow_flags
; /* See WL_TWT_FLOW_FLAG_XXXX above.
16611 * (only BROADCAST) is applicable)
16613 uint8 flow_id
; /* must be between 0 and 7 */
16614 uint16 bid
; /* must be between 0 and 255 */
16615 } wl_twt_teardown_t
;
16617 /* twt information descriptor */
16619 uint8 flow_flags
; /* See WL_TWT_INFO_FLAG_XXX below */
16621 uint8 wake_type
; /* See WL_TWT_TIME_TYPE_XXXX below */
16628 #define WL_TWT_INFO_FLAG_RESP_REQ (1 << 0) /* Response Requested */
16629 #define WL_TWT_INFO_FLAG_NEXT_TWT_REQ (1 << 1) /* Next TWT Request */
16630 #define WL_TWT_INFO_FLAG_BTWT_RESCHED (1 << 2) /* Broadcast Reschedule */
16632 #define WL_TWT_INFO_VER 0
16634 /* HE TWT Information command */
16636 /* structure control */
16637 uint16 version
; /* structure version */
16638 uint16 length
; /* data length (starting after this field) */
16640 struct ether_addr peer
; /* leave it all 0s' for AP */
16642 /* information descriptor */
16643 wl_twt_idesc_t desc
;
16646 /* Current version for wlc_clm_power_limits_req_t structure and flags */
16647 #define WLC_CLM_POWER_LIMITS_REQ_VERSION 1
16648 /* "clm_power_limits" iovar request structure */
16649 typedef struct wlc_clm_power_limits_req
{
16650 /* Input. Structure and flags version */
16652 /* Full length of buffer (includes this structure and space for TLV-encoded PPR) */
16654 /* Input. Flags (see WLC_CLM_POWER_LIMITS_INPUT_FLAG_... below) */
16655 uint32 input_flags
;
16656 /* Input. CC of region whose data is being requested */
16657 char cc
[WLC_CNTRY_BUF_SZ
];
16658 /* Input. Channel/subchannel in chanspec_t format */
16660 /* Subchannel encoded as clm_limits_type_t */
16661 uint32 clm_subchannel
;
16662 /* Input. 0-based antenna index */
16663 uint32 antenna_idx
;
16664 /* Output. General flags (see WLC_CLM_POWER_LIMITS_OUTPUT_FLAG_... below) */
16665 uint32 output_flags
;
16666 /* Output. 2.4G country flags, encoded as clm_flags_t enum */
16667 uint32 clm_country_flags_2g
;
16668 /* Output. 5G country flags, encoded as clm_flags_t enum */
16669 uint32 clm_country_flags_5g
;
16670 /* Output. Length of TLV-encoded PPR data that follows this structure */
16671 uint32 ppr_tlv_size
;
16672 /* Output. Beginning of buffer for TLV-encoded PPR data */
16674 } wlc_clm_power_limits_req_t
;
16676 /* Input. Do not apply SAR limits */
16677 #define WLC_CLM_POWER_LIMITS_INPUT_FLAG_NO_SAR 0x00000001
16678 /* Input. Do not apply board limits */
16679 #define WLC_CLM_POWER_LIMITS_INPUT_FLAG_NO_BOARD 0x00000002
16680 /* Output. Limits taken from product-specific country data */
16681 #define WLC_CLM_POWER_LIMITS_OUTPUT_FLAG_PRODUCT_LIMITS 0x00000001
16682 /* Output. Limits taken from product-specific worldwide data */
16683 #define WLC_CLM_POWER_LIMITS_OUTPUT_FLAG_WORLDWIDE_LIMITS 0x00000002
16684 /* Output. Limits taken from country-default (all-product) data */
16685 #define WLC_CLM_POWER_LIMITS_OUTPUT_FLAG_DEFAULT_COUNTRY_LIMITS 0x00000004
16687 enum wl_mbo_cmd_ids
{
16688 WL_MBO_CMD_ADD_CHAN_PREF
= 1,
16689 WL_MBO_CMD_DEL_CHAN_PREF
= 2,
16690 WL_MBO_CMD_LIST_CHAN_PREF
= 3,
16691 WL_MBO_CMD_CELLULAR_DATA_CAP
= 4,
16692 WL_MBO_CMD_DUMP_COUNTERS
= 5,
16693 WL_MBO_CMD_CLEAR_COUNTERS
= 6,
16694 WL_MBO_CMD_FORCE_ASSOC
= 7,
16695 WL_MBO_CMD_BSSTRANS_REJECT
= 8,
16696 WL_MBO_CMD_SEND_NOTIF
= 9,
16697 /* Unused command, This enum no can be use
16698 * for next new command
16700 WL_MBO_CMD_CLEAR_CHAN_PREF
= 10,
16701 WL_MBO_CMD_NBR_INFO_CACHE
= 11,
16702 WL_MBO_CMD_ANQPO_SUPPORT
= 12,
16703 WL_MBO_CMD_DBG_EVENT_CHECK
= 13,
16704 /* Add before this !! */
16708 enum wl_mbo_xtlv_id
{
16709 WL_MBO_XTLV_OPCLASS
= 0x1,
16710 WL_MBO_XTLV_CHAN
= 0x2,
16711 WL_MBO_XTLV_PREFERENCE
= 0x3,
16712 WL_MBO_XTLV_REASON_CODE
= 0x4,
16713 WL_MBO_XTLV_CELL_DATA_CAP
= 0x5,
16714 WL_MBO_XTLV_COUNTERS
= 0x6,
16715 WL_MBO_XTLV_ENABLE
= 0x7,
16716 WL_MBO_XTLV_SUB_ELEM_TYPE
= 0x8,
16717 WL_MBO_XTLV_BTQ_TRIG_START_OFFSET
= 0x9,
16718 WL_MBO_XTLV_BTQ_TRIG_RSSI_DELTA
= 0xa,
16719 WL_MBO_XTLV_ANQP_CELL_SUPP
= 0xb
16722 typedef struct wl_mbo_counters
{
16723 /* No of transition req recvd */
16724 uint16 trans_req_rcvd
;
16725 /* No of transition req with disassoc imminent */
16726 uint16 trans_req_disassoc
;
16727 /* No of transition req with BSS Termination */
16728 uint16 trans_req_bss_term
;
16729 /* No of trans req w/ unspecified reason */
16730 uint16 trans_resn_unspec
;
16731 /* No of trans req w/ reason frame loss */
16732 uint16 trans_resn_frm_loss
;
16733 /* No of trans req w/ reason traffic delay */
16734 uint16 trans_resn_traffic_delay
;
16735 /* No of trans req w/ reason insufficient buffer */
16736 uint16 trans_resn_insuff_bw
;
16737 /* No of trans req w/ reason load balance */
16738 uint16 trans_resn_load_bal
;
16739 /* No of trans req w/ reason low rssi */
16740 uint16 trans_resn_low_rssi
;
16741 /* No of trans req w/ reason excessive retransmission */
16742 uint16 trans_resn_xcess_retransmn
;
16743 /* No of trans req w/ reason gray zone */
16744 uint16 trans_resn_gray_zone
;
16745 /* No of trans req w/ reason switch to premium AP */
16746 uint16 trans_resn_prem_ap_sw
;
16747 /* No of transition rejection sent */
16748 uint16 trans_rejn_sent
;
16749 /* No of trans rejn reason excessive frame loss */
16750 uint16 trans_rejn_xcess_frm_loss
;
16751 /* No of trans rejn reason excessive traffic delay */
16752 uint16 trans_rejn_xcess_traffic_delay
;
16753 /* No of trans rejn reason insufficient QoS capability */
16754 uint16 trans_rejn_insuffic_qos_cap
;
16755 /* No of trans rejn reason low RSSI */
16756 uint16 trans_rejn_low_rssi
;
16757 /* No of trans rejn reason high interference */
16758 uint16 trans_rejn_high_interference
;
16759 /* No of trans rejn reason service unavilable */
16760 uint16 trans_rejn_service_unavail
;
16761 /* No of beacon request rcvd */
16762 uint16 bcn_req_rcvd
;
16763 /* No of beacon report sent */
16764 uint16 bcn_rep_sent
;
16765 /* No of null beacon report sent */
16766 uint16 null_bcn_rep_sent
;
16767 /* No of wifi to cell switch */
16768 uint16 wifi_to_cell
;
16769 } wl_mbo_counters_t
;
16771 #define WL_FILS_IOV_MAJOR_VER 1
16772 #define WL_FILS_IOV_MINOR_VER 1
16773 #define WL_FILS_IOV_MAJOR_VER_SHIFT 8
16774 #define WL_FILS_IOV_VERSION \
16775 ((WL_FILS_IOV_MAJOR_VER << WL_FILS_IOV_MAJOR_VER_SHIFT)| WL_FILS_IOV_MINOR_VER)
16777 enum wl_fils_cmd_ids
{
16778 WL_FILS_CMD_ADD_IND_IE
= 1,
16779 WL_FILS_CMD_ADD_AUTH_DATA
= 2, /* Deprecated, kept to prevent ROM invalidation */
16780 WL_FILS_CMD_ADD_HLP_IE
= 3,
16781 WL_FILS_CMD_ADD_CONNECT_PARAMS
= 4,
16782 WL_FILS_CMD_GET_CONNECT_PARAMS
= 5,
16783 /* Add before this !! */
16787 enum wl_fils_xtlv_id
{
16788 WL_FILS_XTLV_IND_IE
= 0x1,
16789 WL_FILS_XTLV_AUTH_DATA
= 0x2, /* Deprecated, kept to prevent ROM invalidation */
16790 WL_FILS_XTLV_HLP_IE
= 0x3,
16791 WL_FILS_XTLV_ERP_USERNAME
= 0x4,
16792 WL_FILS_XTLV_ERP_REALM
= 0x5,
16793 WL_FILS_XTLV_ERP_RRK
= 0x6,
16794 WL_FILS_XTLV_ERP_NEXT_SEQ_NUM
= 0x7,
16795 WL_FILS_XTLV_KEK
= 0x8,
16796 WL_FILS_XTLV_PMK
= 0x9,
16797 WL_FILS_XTLV_TK
= 0xa,
16798 WL_FILS_XTLV_PMKID
= 0xb
16801 #define WL_OCE_IOV_MAJOR_VER 1
16802 #define WL_OCE_IOV_MINOR_VER 1
16803 #define WL_OCE_IOV_MAJOR_VER_SHIFT 8
16804 #define WL_OCE_IOV_VERSION \
16805 ((WL_OCE_IOV_MAJOR_VER << WL_OCE_IOV_MAJOR_VER_SHIFT)| WL_OCE_IOV_MINOR_VER)
16807 enum wl_oce_cmd_ids
{
16808 WL_OCE_CMD_ENABLE
= 1,
16809 WL_OCE_CMD_PROBE_DEF_TIME
= 2,
16810 WL_OCE_CMD_FD_TX_PERIOD
= 3,
16811 WL_OCE_CMD_FD_TX_DURATION
= 4,
16812 WL_OCE_CMD_RSSI_TH
= 5,
16813 WL_OCE_CMD_RWAN_LINKS
= 6,
16814 WL_OCE_CMD_CU_TRIGGER
= 7,
16815 /* Add before this !! */
16819 enum wl_oce_xtlv_id
{
16820 WL_OCE_XTLV_ENABLE
= 0x1,
16821 WL_OCE_XTLV_PROBE_DEF_TIME
= 0x2,
16822 WL_OCE_XTLV_FD_TX_PERIOD
= 0x3,
16823 WL_OCE_XTLV_FD_TX_DURATION
= 0x4,
16824 WL_OCE_XTLV_RSSI_TH
= 0x5,
16825 WL_OCE_XTLV_RWAN_LINKS
= 0x6,
16826 WL_OCE_XTLV_CU_TRIGGER
= 0x7
16829 #define WL_ESP_IOV_MAJOR_VER 1
16830 #define WL_ESP_IOV_MINOR_VER 1
16831 #define WL_ESP_IOV_MAJOR_VER_SHIFT 8
16832 #define WL_ESP_IOV_VERSION \
16833 ((WL_ESP_IOV_MAJOR_VER << WL_ESP_IOV_MAJOR_VER_SHIFT)| WL_ESP_IOV_MINOR_VER)
16835 enum wl_esp_cmd_ids
{
16836 WL_ESP_CMD_ENABLE
= 1,
16837 WL_ESP_CMD_STATIC
= 2,
16838 /* Add before this !! */
16842 enum wl_esp_xtlv_id
{
16843 WL_ESP_XTLV_ENABLE
= 0x1,
16844 WL_ESP_XTLV_STATIC_AC
= 0x2, /* access category */
16845 WL_ESP_XTLV_STATIC_TYPE
= 0x3, /* data type */
16846 WL_ESP_XTLV_STATIC_VAL
= 0x4
16849 /* otpread command */
16850 #define WL_OTPREAD_VER 1
16853 uint16 version
; /* cmd structure version */
16854 uint16 cmd_len
; /* cmd struct len */
16855 uint32 rdmode
; /* otp read mode */
16856 uint32 rdoffset
; /* byte offset into otp to start read */
16857 uint32 rdsize
; /* number of bytes to read */
16858 } wl_otpread_cmd_t
;
16860 /* "otpecc_rows" command */
16862 uint16 version
; /* version of this structure */
16863 uint16 len
; /* len in bytes of this structure */
16864 uint32 cmdtype
; /* command type : 0 : read row data, 1 : ECC lock */
16865 uint32 rowoffset
; /* start row offset */
16866 uint32 numrows
; /* number of rows */
16867 uint8 rowdata
[]; /* read rows data */
16868 } wl_otpecc_rows_t
;
16870 #define WL_OTPECC_ROWS_VER 1
16872 #define WL_OTPECC_ROWS_CMD_READ 0
16873 #define WL_OTPECC_ROWS_CMD_LOCK 1
16875 #define WL_OTPECC_ARGIDX_CMDTYPE 0 /* command type */
16876 #define WL_OTPECC_ARGIDX_ROWOFFSET 1 /* start row offset */
16877 #define WL_OTPECC_ARGIDX_NUMROWS 2 /* number of rows */
16879 /* "otpeccrows" raw data size per row */
16880 #define WL_ECCDUMP_ROW_SIZE_BYTE 6 /* 4 bytes row data + 2 bytes ECC status */
16881 #define WL_ECCDUMP_ROW_SIZE_WORD 3
16884 #define OTP_ECC_ENAB_SHIFT 13
16885 #define OTP_ECC_ENAB_MASK 0x7
16886 #define OTP_ECC_CORR_ST_SHIFT 12
16887 #define OTP_ECC_CORR_ST_MASK 0x1
16888 #define OTP_ECC_DBL_ERR_SHIFT 11
16889 #define OTP_ECC_DBL_ERR_MASK 0x1
16890 #define OTP_ECC_DED_ST_SHIFT 10
16891 #define OTP_ECC_DED_ST_MASK 0x1
16892 #define OTP_ECC_SEC_ST_SHIFT 9
16893 #define OTP_ECC_SEC_ST_MASK 0x1
16894 #define OTP_ECC_DATA_SHIFT 0
16895 #define OTP_ECC_DATA_MASK 0x7f
16897 /* OTP_ECC_CORR_ST field */
16898 #define OTP_ECC_MODE 1
16899 #define OTP_NO_ECC_MODE 0
16901 /* OTP_ECC_ENAB field (bit15:13) :
16902 * When 2 or 3 bits are set,
16903 * it indicates that OTP ECC is enabled on the last row read.
16904 * Otherwise, ECC is disabled
16906 #define OTP_ECC_ENAB(val) \
16907 (bcm_bitcount((uint8 *)&(val), sizeof(uint8)) > 1)
16909 #define WL_LEAKY_AP_STATS_GT_TYPE 0
16910 #define WL_LEAKY_AP_STATS_PKT_TYPE 1
16911 typedef struct wlc_leaked_infra_guard_marker
{
16912 /* type field for this TLV: WL_LEAKY_AP_STATS_GT_TYPE */
16914 /* length field for this TLV */
16916 /* guard sample sequence number; Updated by 1 on every guard sample */
16918 /* Guard time start time (tsf; PS indicated and acked) */
16920 /* tsf timestamp for the GT end event */
16922 /* Guard time period in ms */
16923 uint16 guard_duration
;
16924 /* Number PPDUs in the notification */
16926 /* Flags to indicate some states see below */
16928 /* pad for 32-bit alignment */
16930 } wlc_leaked_infra_guard_marker_t
;
16932 /* Flag information */
16933 #define WL_LEAKED_GUARD_TIME_NONE 0 /* Not in any guard time */
16934 #define WL_LEAKED_GUARD_TIME_FRTS (0x01 << 0) /* Normal FRTS power save */
16935 #define WL_LEAKED_GUARD_TIME_SCAN (0x01 << 1) /* Channel switch due to scanning */
16936 #define WL_LEAKED_GUARD_TIME_AWDL_PSF (0x01 << 2) /* Channel switch due to AWDL PSF */
16937 #define WL_LEAKED_GUARD_TIME_AWDL_AW (0x01 << 3) /* Channel switch due to AWDL AW */
16938 #define WL_LEAKED_GUARD_TIME_INFRA_STA (0x01 << 4) /* generic type infra sta channel switch */
16939 #define WL_LEAKED_GUARD_TIME_TERMINATED (0x01 << 7) /* indicate a GT is terminated early */
16941 typedef struct wlc_leaked_infra_packet_stat
{
16942 uint16 type
; /* type field for this TLV: WL_LEAKY_AP_STATS_PKT_TYPE */
16943 uint16 len
; /* length field for this TLV */
16944 uint16 ppdu_len_bytes
; /* PPDU packet length in bytes */
16945 uint16 num_mpdus
; /* number of the MPDUs in the PPDU */
16946 uint32 ppdu_time
; /* PPDU arrival time at the begining of the guard time */
16947 uint32 rate
; /* PPDU packet rate; Received packet's data rate */
16948 uint16 seq_number
; /* sequence number */
16949 int8 rssi
; /* RSSI */
16950 uint8 tid
; /* tid */
16951 } wlc_leaked_infra_packet_stat_t
;
16953 /* Wake timer structure definition */
16954 #define WAKE_TIMER_VERSION 1
16955 #define WAKE_TIMER_NOLIMIT 0xFFFF
16957 typedef struct wake_timer
{
16960 uint16 limit
; /* number of events to deliver
16961 * 0-disable, 0xffff-indefinite, num_events otherwise
16963 uint16 count
; /* number of events delivered since enable (get only) */
16964 uint16 period
; /* timeout/period in milliseconds */
16967 typedef struct wl_desense_restage_gain
{
16972 uint8 desense_array
[WL_TX_CHAINS_MAX
];
16974 } wl_desense_restage_gain_t
;
16976 #define MAX_UCM_CHAINS 5
16977 #define MAX_UCM_PROFILES 10
16978 #define UCM_PROFILE_VERSION_1 1
16980 /* UCM per chain attribute struct */
16981 typedef struct wlc_btcx_chain_attr
{
16982 uint16 length
; /* chain attr length, version is same as profile version */
16983 int8 desense_level
; /* per chain desense level */
16984 int8 ack_pwr_strong_rssi
; /* per chain ack power at strong rssi */
16985 int8 ack_pwr_weak_rssi
; /* per chain ack power at weak rssi */
16986 int8 tx_pwr_strong_rssi
; /* per chain tx power at strong rssi */
16987 int8 tx_pwr_weak_rssi
; /* per chain tx power at weak rssi */
16988 uint8 PAD
[1]; /* additional bytes for alignment */
16989 } wlc_btcx_chain_attr_t
;
16991 typedef struct wlc_btcx_profile_v1
{
16992 uint16 version
; /* UCM profile version */
16993 uint16 length
; /* profile size */
16994 uint16 fixed_length
; /* size of the fixed portion of the profile */
16995 uint8 init
; /* profile initialized or not */
16996 uint8 chain_attr_count
; /* Number of elements in chain_attr array */
16997 uint8 profile_index
; /* profile index */
16998 uint8 mode_strong_wl_bt
; /* Mode under strong WLAN and BT RSSI */
16999 uint8 mode_weak_wl
; /* Mode under weak WLAN RSSI */
17000 uint8 mode_weak_bt
; /* Mode under weak BT RSSI */
17001 uint8 mode_weak_wl_bt
; /* Mode under weak BT and WLAN RSSI */
17002 int8 mode_wl_hi_lo_rssi_thresh
; /* Strong to weak WLAN RSSI threshold for mode selection */
17003 int8 mode_wl_lo_hi_rssi_thresh
; /* Weak to strong WLAN RSSI threshold for mode selection */
17004 int8 mode_bt_hi_lo_rssi_thresh
; /* Strong to weak BT RSSI threshold for mode selection */
17005 int8 mode_bt_lo_hi_rssi_thresh
; /* Weak to strong BT RSSI threshold for mode selection */
17006 int8 desense_wl_hi_lo_rssi_thresh
; /* Strong to weak RSSI threshold for desense */
17007 int8 desense_wl_lo_hi_rssi_thresh
; /* Weak to strong RSSI threshold for desense */
17008 int8 ack_pwr_wl_hi_lo_rssi_thresh
; /* Strong to weak RSSI threshold for ACK power */
17009 int8 ack_pwr_wl_lo_hi_rssi_thresh
; /* Weak to strong RSSI threshold for ACK power */
17010 int8 tx_pwr_wl_hi_lo_rssi_thresh
; /* Strong to weak RSSI threshold for Tx power */
17011 int8 tx_pwr_wl_lo_hi_rssi_thresh
; /* Weak to strong RSSI threshold for Tx power */
17012 uint8 PAD
[1]; /* additional bytes for 4 byte alignment */
17013 wlc_btcx_chain_attr_t chain_attr
[]; /* variable length array with chain attributes */
17014 } wlc_btcx_profile_v1_t
;
17016 #define SSSR_D11_RESET_SEQ_STEPS 5
17017 #define SSSR_REG_INFO_VER 0
17018 #define SSSR_REG_INFO_VER_1 1
17020 typedef struct sssr_reg_info_v0
{
17022 uint16 length
; /* length of the structure validated at host */
17025 uint32 pmuintmask0
;
17026 uint32 pmuintmask1
;
17027 uint32 resreqtimer
;
17028 uint32 macresreqtimer
;
17029 uint32 macresreqtimer1
;
17036 uint32 clockcontrolstatus
;
17037 uint32 powerctrl_mask
;
17042 uint32 clockcontrolstatus
;
17043 uint32 clockcontrolstatus_val
;
17053 uint32 clockcontrolstatus
;
17054 uint32 clockcontrolstatus_val
;
17064 uint32 vasip_sr_addr
;
17065 uint32 vasip_sr_size
;
17071 uint32 clockcontrolstatus
;
17072 uint32 clockcontrolstatus_val
;
17078 uint32 ioctrl_resetseq_val
[SSSR_D11_RESET_SEQ_STEPS
];
17081 } mac_regs
[MAX_NUM_D11CORES
];
17082 } sssr_reg_info_v0_t
;
17084 typedef struct sssr_reg_info_v1
{
17086 uint16 length
; /* length of the structure validated at host */
17089 uint32 pmuintmask0
;
17090 uint32 pmuintmask1
;
17091 uint32 resreqtimer
;
17092 uint32 macresreqtimer
;
17093 uint32 macresreqtimer1
;
17100 uint32 clockcontrolstatus
;
17101 uint32 powerctrl_mask
;
17106 uint32 clockcontrolstatus
;
17107 uint32 clockcontrolstatus_val
;
17117 uint32 clockcontrolstatus
;
17118 uint32 clockcontrolstatus_val
;
17128 uint32 vasip_sr_addr
;
17129 uint32 vasip_sr_size
;
17135 uint32 clockcontrolstatus
;
17136 uint32 clockcontrolstatus_val
;
17142 uint32 ioctrl_resetseq_val
[SSSR_D11_RESET_SEQ_STEPS
];
17145 } mac_regs
[MAX_NUM_D11CORES
];
17147 uint32 dig_sr_addr
;
17148 uint32 dig_sr_size
;
17150 } sssr_reg_info_v1_t
;
17152 #ifndef SSSR_REG_INFO_HAS_ALIAS
17153 typedef sssr_reg_info_v0_t sssr_reg_info_t
;
17156 /* ADaptive Power Save(ADPS) structure definition */
17157 #define WL_ADPS_IOV_MAJOR_VER 1
17158 #define WL_ADPS_IOV_MINOR_VER 0
17159 #define WL_ADPS_IOV_MAJOR_VER_SHIFT 8
17160 #define WL_ADPS_IOV_VER \
17161 ((WL_ADPS_IOV_MAJOR_VER << WL_ADPS_IOV_MAJOR_VER_SHIFT) | WL_ADPS_IOV_MINOR_VER)
17163 #define ADPS_NUM_DIR 2
17167 #define WL_ADPS_IOV_MODE 0x0001
17168 #define WL_ADPS_IOV_RSSI 0x0002
17169 #define WL_ADPS_IOV_DUMP 0x0003
17170 #define WL_ADPS_IOV_DUMP_CLEAR 0x0004
17171 #define WL_ADPS_IOV_SUSPEND 0x0005
17173 #define ADPS_SUMMARY_STEP_NUM 2
17174 #define ADPS_SUMMARY_STEP_LOW 0
17175 #define ADPS_SUMMARY_STEP_HIGH 1
17177 #define ADPS_SUB_IOV_VERSION_1 1
17178 #define ADPS_SUB_IOV_VERSION_2 2
17180 /* suspend/resume ADPS by wl/private command from host */
17181 #define ADPS_RESUME 0u
17182 #define ADPS_SUSPEND 1u
17184 typedef struct wl_adps_params_v1
{
17187 uint8 band
; /* band - 2G or 5G */
17188 uint8 mode
; /* operation mode, default = 0 (ADPS disable) */
17190 } wl_adps_params_v1_t
;
17192 typedef struct wl_adps_rssi
{
17193 int32 thresh_hi
; /* rssi threshold to resume ADPS operation */
17194 int32 thresh_lo
; /* rssi threshold to suspend ADPS operation */
17197 typedef struct wl_adps_rssi_params_v1
{
17202 wl_adps_rssi_t rssi
;
17203 } wl_adps_rssi_params_v1_t
;
17205 typedef struct adps_stat_elem
{
17206 uint32 duration
; /* each step duration time (mSec) */
17207 uint32 counts
; /* each step hit count number */
17208 } adps_stat_elem_t
;
17210 typedef struct wl_adps_dump_summary_v1
{
17213 uint8 mode
; /* operation mode: On/Off */
17214 uint8 flags
; /* restrict flags */
17215 uint8 current_step
; /* current step */
17217 adps_stat_elem_t stat
[ADPS_SUMMARY_STEP_NUM
]; /* statistics */
17218 } wl_adps_dump_summary_v1_t
;
17220 typedef struct wl_adps_dump_summary_v2
{
17223 uint8 mode
; /* operation mode: On/Off */
17224 uint8 current_step
; /* current step */
17226 uint32 flags
; /* restrict flags */
17227 adps_stat_elem_t stat
[ADPS_SUMMARY_STEP_NUM
]; /* statistics */
17228 } wl_adps_dump_summary_v2_t
;
17230 typedef struct wl_adps_suspend_v1
{
17233 uint8 suspend
; /* 1: suspend 0: resume */
17235 } wl_adps_suspend_v1_t
;
17237 typedef struct wlc_btc_2gchain_dis
{
17242 } wlc_btc_2gchain_dis_t
;
17244 #define WLC_BTC_2GCHAIN_DIS_REASSOC 0x1
17245 #define WLC_BTC_2GCHAIN_DIS_VER1 0x1
17246 #define WLC_BTC_2GCHAIN_DIS_VER1_LEN 6
17248 /* --- BTCX WiFi Protection (btc_wifi_prot iovar) --- */
17250 /* Current iovar structure version: 1 */
17251 #define WL_BTC_WIFI_PROT_VER_1 1
17253 typedef struct wl_btc_wifi_prot_v1
{
17254 uint16 ver
; /* version */
17255 uint16 len
; /* total length */
17256 uint8 data
[]; /* bcm_xtlv_t payload */
17257 } wl_btc_wifi_prot_v1_t
;
17259 /* Xtlv tags (protection type) and data */
17260 #define WL_BTC_WIFI_PROT_M1_M4 1
17261 typedef struct wl_btc_wifi_prot_m1_m4
{
17262 uint32 enable
; /* enable/disable m1-m4 protection */
17263 uint32 timeout
; /* maximum timeout in ms (0: default) */
17264 } wl_btc_wifi_prot_m1_m4_t
;
17266 #define WL_BTC_WIFI_PROT_ENABLE 1
17267 #define WL_BTC_WIFI_PROT__DISABLE 0
17269 /* --- End BTCX WiFi Protection --- */
17271 enum wl_rpsnoa_cmd_ids
{
17272 WL_RPSNOA_CMD_ENABLE
= 1,
17273 WL_RPSNOA_CMD_STATUS
,
17274 WL_RPSNOA_CMD_PARAMS
,
17278 typedef struct rpsnoa_cmnhdr
{
17279 uint16 ver
; /* cmd structure version */
17280 uint16 len
; /* cmd structure len */
17285 typedef struct rpsnoa_data
{
17290 typedef struct rpsnoa_stats
{
17294 uint32 sleep_avail_dur
;
17298 typedef struct rpsnoa_param
{
17301 uint8 stas_assoc_check
;
17306 typedef struct rpsnoa_iovar
{
17307 rpsnoa_cmnhdr_t hdr
;
17308 rpsnoa_data_t data
[1];
17311 typedef struct rpsnoa_iovar_status
{
17312 rpsnoa_cmnhdr_t hdr
;
17313 rpsnoa_stats_t stats
[1];
17314 } rpsnoa_iovar_status_t
;
17316 typedef struct rpsnoa_iovar_params
{
17317 rpsnoa_cmnhdr_t hdr
;
17318 rpsnoa_param_t param
[1];
17319 } rpsnoa_iovar_params_t
;
17321 /* Per-interface reportable stats types */
17322 enum wl_ifstats_xtlv_id
{
17324 WL_IFSTATS_XTLV_SLICE_INDEX
= 1,
17325 WL_IFSTATS_XTLV_IF_INDEX
= 2,
17326 WL_IFSTATS_XTLV_MAC_ADDR
= 3,
17327 WL_IFSTATS_XTLV_REPORT_CMD
= 4, /* Comes in an iovar */
17328 WL_IFSTATS_XTLV_BUS_PCIE
= 5,
17330 /* Report data across all SCBs using ecounters */
17331 /* STA_info ecounters */
17332 WL_IFSTATS_XTLV_WL_STA_INFO_ECOUNTERS
= 0x100,
17333 /* For AMPDU stat sub-types requested in a different format */
17334 /* these could be sum and report stats across slices. OR
17335 * report sub-types in pairs so host can sum and add.
17336 * Information sent here is across slices, therefore global
17338 WL_IFSTATS_XTLV_TX_AMPDU_STATS
= 0x101,
17339 WL_IFSTATS_XTLV_RX_AMPDU_STATS
= 0x102,
17340 /* scb ecounter statistics */
17341 WL_IFSTATS_XTLV_SCB_ECOUNTERS
= 0x103,
17342 /* Global NAN stats */
17343 WL_IFSTATS_XTLV_NAN_STATS
= 0x104,
17345 /* Per-slice information
17346 * Per-interface reporting could also include slice specific data
17348 /* xtlv container for reporting */
17349 WL_IFSTATS_XTLV_WL_SLICE
= 0x301,
17350 /* Per-slice AMPDU stats */
17351 WL_IFSTATS_XTLV_WL_SLICE_TX_AMPDU_DUMP
= 0x302,
17352 WL_IFSTATS_XTLV_WL_SLICE_RX_AMPDU_DUMP
= 0x303,
17353 /* Per-slice BTCOEX stats */
17354 WL_IFSTATS_XTLV_WL_SLICE_BTCOEX
= 0x304,
17355 /* V11_WLCNTRS used in ecounters */
17356 WL_IFSTATS_XTLV_WL_SLICE_V11_WLCNTRS
= 0x305,
17357 /* V30_WLCNTRS Used in ecounters */
17358 WL_IFSTATS_XTLV_WL_SLICE_V30_WLCNTRS
= 0x306,
17359 /* phy,ucode,scan pwrstats */
17360 WL_IFSTATS_XTLV_WL_SLICE_PWRSTATS_PHY
= 0x307,
17361 WL_IFSTATS_XTLV_WL_SLICE_PWRSTATS_SCAN
= 0x308,
17362 WL_IFSTATS_XTLV_WL_SLICE_PWRSTATS_WAKE_V2
= 0x309,
17363 /* Per-slice LTECOEX stats */
17364 WL_IFSTATS_XTLV_WL_SLICE_LTECOEX
= 0x30A,
17365 /* TVPM ecounters */
17366 WL_IFSTATS_XTLV_WL_SLICE_TVPM
= 0x30B,
17367 /* TDMTX ecounters */
17368 WL_IFSTATS_XTLV_WL_SLICE_TDMTX
= 0x30C,
17369 /* Slice specific state capture in periodic fasion */
17370 WL_SLICESTATS_XTLV_PERIODIC_STATE
= 0x30D,
17371 /* Per-interface */
17372 /* XTLV container for reporting */
17373 WL_IFSTATS_XTLV_IF
= 0x501,
17374 /* Generic stats applicable to all IFs */
17375 WL_IFSTATS_XTLV_GENERIC
= 0x502,
17376 /* Infra specific */
17377 WL_IFSTATS_XTLV_INFRA_SPECIFIC
= 0x503,
17378 /* MGT counters infra and softAP */
17379 WL_IFSTATS_XTLV_MGT_CNT
= 0x504,
17380 /* AMPDU stats on per-IF */
17381 WL_IFSTATS_XTLV_AMPDU_DUMP
= 0x505,
17382 WL_IFSTATS_XTLV_IF_SPECIFIC
= 0x506,
17383 WL_IFSTATS_XTLV_WL_PWRSTATS_AWDL
= 0x507,
17384 WL_IFSTATS_XTLV_IF_LQM
= 0x508,
17385 /* Interface specific state capture in periodic fashion */
17386 WL_IFSTATS_XTLV_IF_PERIODIC_STATE
= 0x509,
17387 /* Event statistics on per-IF */
17388 WL_IFSTATS_XTLV_IF_EVENT_STATS
= 0x50A,
17389 /* ecounters for nan */
17390 /* nan slot stats */
17391 WL_IFSTATS_XTLV_NAN_SLOT_STATS
= 0x601
17394 /* current version of wl_stats_report_t structure for request */
17395 #define WL_STATS_REPORT_REQUEST_VERSION_V2 2
17397 /* current version of wl_stats_report_t structure for response */
17398 #define WL_STATS_REPORT_RESPONSE_VERSION_V2 2
17400 /** Top structure of if_counters IOVar buffer */
17401 typedef struct wl_stats_report
{
17402 uint16 version
; /**< see version definitions above */
17403 uint16 length
; /**< length of data including all paddings. */
17404 uint8 data
[]; /**< variable length payload:
17405 * 1 or more bcm_xtlv_t type of tuples.
17406 * each tuple is padded to multiple of 4 bytes.
17407 * 'length' field of this structure includes all paddings.
17409 } wl_stats_report_t
;
17411 /* interface specific mgt count */
17412 #define WL_MGT_STATS_VERSION_V1 1
17413 /* Associated stats type: WL_IFSTATS_MGT_CNT */
17418 /* detailed control/management frames */
17425 uint32 txreassocreq
;
17426 uint32 rxreassocreq
;
17431 uint32 txreassocrsp
;
17432 uint32 rxreassocrsp
;
17445 } wl_if_mgt_stats_t
;
17447 #define WL_INFRA_STATS_VERSION_V1 1
17448 /* Associated stats type: WL_IFSTATS_INFRA_SPECIFIC */
17449 typedef struct wl_infra_stats
{
17450 uint16 version
; /**< version of the structure */
17452 uint32 rxbeaconmbss
;
17454 } wl_if_infra_stats_t
;
17456 #define LTECOEX_STATS_VER 1
17458 typedef struct wlc_ltecoex_stats
{
17459 uint16 version
; /**< WL_IFSTATS_XTLV_WL_SLICE_LTECOEX */
17460 uint16 len
; /* Length of wl_ltecx_stats structure */
17461 uint8 slice_index
; /* Slice unit of wl_ltecx_stats structure */
17462 uint8 pad
[3]; /* Padding */
17463 /* LTE noise based eCounters Bins
17464 cumulative the wl_cnt_wlc_t and wl_ctl_mgt_cnt_t
17465 counter information based on LTE Coex interference level
17467 uint32 txframe_no_LTE
; /* txframe counter in no LTE Coex case */
17468 uint32 rxframe_no_LTE
; /* rxframe counter in no LTE Coex case */
17469 uint32 rxrtry_no_LTE
; /* rxrtry counter in no LTE Coex case */
17470 uint32 txretrans_no_LTE
; /* txretrans counter in no LTE Coex case */
17471 uint32 txnocts_no_LTE
; /* txnocts counter in no LTE Coex case */
17472 uint32 txrts_no_LTE
; /* txrts counter in no LTE Coex case */
17473 uint32 txdeauth_no_LTE
; /* txdeauth counter in no LTE Coex case */
17474 uint32 txassocreq_no_LTE
; /* txassocreq counter in no LTE Coex case */
17475 uint32 txassocrsp_no_LTE
; /* txassocrsp counter in no LTE Coex case */
17476 uint32 txreassocreq_no_LTE
; /* txreassocreq counter in no LTE Coex case */
17477 uint32 txreassocrsp_no_LTE
; /* txreassocrsp counter in no LTE Coex case */
17478 uint32 txframe_light_LTE
; /* txframe counter in light LTE Coex case */
17479 uint32 txretrans_light_LTE
; /* txretrans counter in light LTE Coex case */
17480 uint32 rxframe_light_LTE
; /* rxframe counter in light LTE Coex case */
17481 uint32 rxrtry_light_LTE
; /* rxrtry counter in light LTE Coex case */
17482 uint32 txnocts_light_LTE
; /* txnocts counter in light LTE Coex case */
17483 uint32 txrts_light_LTE
; /* txrts counter in light LTE Coex case */
17484 uint32 txdeauth_light_LTE
; /* txdeauth counter in light LTE Coex case */
17485 uint32 txassocreq_light_LTE
; /* txassocreq counter in light LTE Coex case */
17486 uint32 txassocrsp_light_LTE
; /* txassocrsp counter in light LTE Coex case */
17487 uint32 txreassocreq_light_LTE
; /* txreassocreq counter in light LTE Coex case */
17488 uint32 txreassocrsp_light_LTE
; /* txreassocrsp counter in light LTE Coex case */
17489 uint32 txframe_heavy_LTE
; /* txframe counter in heavy LTE Coex case */
17490 uint32 txretrans_heavy_LTE
; /* txretrans counter in heavy LTE Coex case */
17491 uint32 rxframe_heavy_LTE
; /* rxframe counter in heavy LTE Coex case */
17492 uint32 rxrtry_heavy_LTE
; /* rxrtry counter in heavy LTE Coex case */
17493 uint32 txnocts_heavy_LTE
; /* txnocts counter in heavy LTE Coex case */
17494 uint32 txrts_heavy_LTE
; /* txrts counter in heavy LTE Coex case */
17495 uint32 txdeauth_heavy_LTE
; /* txdeauth counter in heavy LTE Coex case */
17496 uint32 txassocreq_heavy_LTE
; /* txassocreq counter in heavy LTE Coex case */
17497 uint32 txassocrsp_heavy_LTE
; /* txassocrsp counter in heavy LTE Coex case */
17498 uint32 txreassocreq_heavy_LTE
; /* txreassocreq counter in heavy LTE Coex case */
17499 uint32 txreassocrsp_heavy_LTE
; /* txreassocrsp counter in heavy LTE Coex case */
17501 /* LTE specific ecounters */
17502 uint16 type4_txinhi_dur
; /* Duration of tx inhibit(in ms) due to Type4 */
17503 uint16 type4_nonzero_cnt
; /* Counts of none zero Type4 msg */
17504 uint16 type4_timeout_cnt
; /* Counts of Type4 timeout */
17505 uint16 rx_pri_dur
; /* Duration of wlan_rx_pri assertions */
17506 uint16 rx_pri_cnt
; /* Count of wlan_rx_pri assertions */
17507 uint16 type6_dur
; /* duration of LTE Tx power limiting assertions */
17508 uint16 type6_cnt
; /* Count of LTE Tx power limiting assertions */
17509 uint16 ts_prot_frm_cnt
; /* count of WLAN protection frames triggered by LTE coex */
17510 uint16 ts_gr_cnt
; /* count of intervals granted to WLAN in timesharing */
17511 uint16 ts_gr_dur
; /* duration granted to WLAN in timesharing */
17512 } wlc_ltecoex_stats_t
;
17514 #define CSA_EVT_CSA_RXED (1 << 0)
17515 #define CSA_EVT_CSA_TIMEOUT (1 << 1)
17516 #define CSA_EVT_FROM_INFRA (1 << 2)
17517 typedef struct csa_event_data
{
17518 chanspec_t chan_old
;
17519 dot11_ext_csa_ie_t ecsa
;
17520 dot11_mesh_csp_ie_t mcsp
;
17521 dot11_wide_bw_chan_switch_ie_t wbcs
;
17524 } csa_event_data_t
;
17526 /* ifdef (WL_ASSOC_BCN_RPT) */
17527 enum wl_bcn_report_cmd_id
{
17528 WL_BCN_RPT_CMD_VER
= 0,
17529 WL_BCN_RPT_CMD_CONFIG
= 1,
17530 WL_BCN_RPT_CMD_VENDOR_IE
= 2,
17531 WL_BCN_RPT_CMD_LAST
17534 /* beacon report specific macros */
17535 #define WL_BCN_RPT_CCX_IE_OVERRIDE (1u << 0)
17537 /* beacon report specific macros */
17538 #define WL_BCN_RPT_ASSOC_SCAN_UNSOLICITED_MODE (1u << 1)
17539 #define WL_BCN_RPT_ASSOC_SCAN_SOLICITED_MODE (1u << 2)
17540 #define WL_BCN_RPT_ASSOC_SCAN_MODE_SHIFT (1)
17541 #define WL_BCN_RPT_ASSOC_SCAN_MODE_MASK (WL_BCN_RPT_ASSOC_SCAN_UNSOLICITED_MODE |\
17542 WL_BCN_RPT_ASSOC_SCAN_SOLICITED_MODE)
17543 #define WL_BCN_RPT_ASSOC_SCAN_MODE_MAX (WL_BCN_RPT_ASSOC_SCAN_MODE_MASK >> \
17544 WL_BCN_RPT_ASSOC_SCAN_MODE_SHIFT)
17545 /* beacon report mode specific macro */
17546 #define WL_BCN_RPT_ASSOC_SCAN_MODE_DEFAULT WL_BCN_RPT_ASSOC_SCAN_UNSOLICITED_MODE
17548 /* beacon report timeout config specific macros */
17549 #define WL_BCN_RPT_ASSOC_SCAN_CACHE_TIMEOUT_DEFAULT (120000)
17550 #define WL_BCN_RPT_ASSOC_SCAN_CACHE_TIMEOUT_MIN (60000)
17551 #define WL_BCN_RPT_ASSOC_SCAN_CACHE_TIMEOUT_MAX (0xFFFFFFFF)
17553 /* beacon report cache count specific macros */
17554 #define WL_BCN_RPT_ASSOC_SCAN_CACHE_COUNT_MIN (0)
17555 #define WL_BCN_RPT_ASSOC_SCAN_CACHE_COUNT_MAX (8)
17556 #define WL_BCN_RPT_ASSOC_SCAN_CACHE_COUNT_DEFAULT (WL_BCN_RPT_ASSOC_SCAN_CACHE_COUNT_MAX)
17558 #define WL_BCN_REPORT_CMD_VERSION 1
17559 struct wl_bcn_report_cfg
{
17560 uint32 flags
; /**< Flags that defines the operation/setting information */
17561 uint32 scan_cache_timeout
; /**< scan cache timeout value in millisec */
17562 uint32 scan_cache_timer_pend
; /**< Read only pending time for timer expiry in millisec */
17563 uint8 scan_cache_cnt
; /**< scan cache count */
17566 /* endif (WL_ASSOC_BCN_RPT) */
17568 /* Thermal, Voltage, and Power Mitigation */
17569 #define TVPM_REQ_VERSION_1 1
17570 #define TVPM_REQ_CURRENT_VERSION TVPM_REQ_VERSION_1
17572 /* tvpm iovar data */
17574 uint16 version
; /* TVPM request version */
17575 uint16 length
; /* Length of the entire structure */
17577 uint16 req_type
; /* Request type: wl_tvpm_req_type_t */
17578 uint16 req_len
; /* Length of the following value */
17579 uint8 value
[]; /* Variable length data depending on req_type */
17582 /* tvpm iovar request types */
17584 WL_TVPM_REQ_CLTM_INDEX
, /* req_value: uint32, range 1...100 */
17585 WL_TVPM_REQ_PPM_INDEX
, /* req_value: uint32, range 1...100 */
17586 WL_TVPM_REQ_ENABLE
, /* req_value: uint32, range 0...1 */
17587 WL_TVPM_REQ_STATUS
, /* req_value: none */
17588 WL_TVPM_REQ_PERIOD
, /* req_value: int32, range {-1,1-10} */
17590 } wl_tvpm_req_type_t
;
17592 /* structure for data returned by request type WL_TVPM_REQ_STATUS */
17593 typedef struct wl_tvpm_status
{
17594 uint16 enable
; /* whether TVPM is enabled */
17595 uint16 tx_dutycycle
; /* a percentage: 1-100 */
17596 int16 tx_power_backoff
; /* 0...-6 */
17597 uint16 num_active_chains
; /* 1...3 */
17598 int16 temp
; /* local temperature in degrees C */
17599 uint8 vbat
; /* local voltage in units of 0.1V */
17601 } wl_tvpm_status_t
;
17603 /* TVPM ecounters */
17604 typedef struct wl_tvpm_ecounters_t
{
17605 uint16 version
; /* version field */
17606 uint16 length
; /* byte length in wl_tvpm_ecounters_t starting at version */
17607 uint16 tx_dutycycle
; /* a percentage: 1-100 */
17608 int16 tx_power_backoff
; /* 0...-6 */
17609 uint16 num_active_chains
; /* 1...3 */
17610 int16 temp
; /* local temperature */
17611 uint8 vbat
; /* local voltage */
17612 uint8 cltm
; /* CLTM index */
17613 uint8 ppm
; /* PPM index */
17614 uint8 pad
; /* pad to align to uint16 */
17615 } wl_tvpm_ecounters_t
;
17617 #define TDMTX_ECOUNTERS_VERSION_V1 1
17618 #define TDMTX_ECOUNTERS_VERSION_V2 2
17620 /* TDMTX ecounters */
17621 typedef struct wl_tdmtx_ecounters_v1
{
17622 uint16 version
; /* version field */
17623 uint16 length
; /* byte length in wl_tdmtx_ecounters_t starting at version */
17624 uint32 txa_on
; /* TXA on requests */
17625 uint32 txa_tmcnt
; /* Total number of TXA timeout */
17626 uint32 por_on
; /* TXA POR requests */
17627 uint32 txpuen
; /* Path enable requests */
17628 uint32 txpudis
; /* Total number of times Tx path is muted on the slice */
17629 uint32 txpri_on
; /* Total number of times Tx priority was obtained by the slice */
17630 uint32 txdefer
; /* Total number of times Tx was deferred by the slice */
17631 uint32 txmute
; /* Total number of times active Tx muted on the slice */
17632 uint32 actpwrboff
; /* Total number of times TX power is backed off by the slice */
17633 uint32 txa_dur
; /* Total time txa on */
17634 uint32 txpri_dur
; /* Total time TXPri */
17635 uint32 txdefer_dur
; /* Total time txdefer */
17636 } wl_tdmtx_ecounters_v1_t
;
17638 /* TDMTX ecounters for version 2 */
17639 typedef struct wl_tdmtx_ecounters_v2
{
17640 uint16 version
; /* version field */
17641 uint16 length
; /* byte length in wl_tdmtx_ecounters_t starting at version */
17642 uint32 txa_on
; /* TXA on requests */
17643 uint32 txa_tmcnt
; /* Total number of TXA timeout */
17644 uint32 porhi_on
; /* TXA PORHI requests */
17645 uint32 porlo_on
; /* TXA PORLO requests */
17646 uint32 txpuen
; /* Path enable requests */
17647 uint32 txpudis
; /* Total number of times Tx path is muted on the slice */
17648 uint32 txpri_on
; /* Total number of times Tx priority was obtained by the slice */
17649 uint32 txdefer
; /* Total number of times Tx was deferred by the slice */
17650 uint32 txmute
; /* Total number of times active Tx muted on the slice */
17651 uint32 actpwrboff
; /* Total number of times TX power is backed off by the slice */
17652 uint32 txa_dur
; /* Total time txa on */
17653 uint32 txpri_dur
; /* Total time TXPri */
17654 uint32 txdefer_dur
; /* Total time txdefer */
17655 } wl_tdmtx_ecounters_v2_t
;
17657 /* Note: if this struct is changing update wl_scb_ecounters_vX_t version,
17658 * as this struct is sent as payload in wl_scb_ecounters_vX_t
17660 typedef struct wlc_scb_stats_v1
{
17661 uint32 tx_pkts
; /* num of packets transmitted (ucast) */
17662 uint32 tx_failures
; /* num of packets failed */
17663 uint32 rx_ucast_pkts
; /* num of unicast packets received */
17664 uint32 rx_mcast_pkts
; /* num of multicast packets received */
17665 uint32 tx_rate
; /* Rate of last successful tx frame */
17666 uint32 rx_rate
; /* Rate of last successful rx frame */
17667 uint32 rx_decrypt_succeeds
; /* num of packets decrypted successfully */
17668 uint32 rx_decrypt_failures
; /* num of packets decrypted unsuccessfully */
17669 uint32 tx_mcast_pkts
; /* num of mcast pkts txed */
17670 uint64 tx_ucast_bytes
; /* data bytes txed (ucast) */
17671 uint64 tx_mcast_bytes
; /* data bytes txed (mcast) */
17672 uint64 rx_ucast_bytes
; /* data bytes recvd ucast */
17673 uint64 rx_mcast_bytes
; /* data bytes recvd mcast */
17674 uint32 tx_pkts_retried
; /* num of packets where a retry was necessary */
17675 uint32 tx_pkts_retry_exhausted
; /* num of packets where a retry was exhausted */
17676 uint32 tx_rate_mgmt
; /* Rate of last transmitted management frame */
17677 uint32 tx_rate_fallback
; /* last used lowest fallback TX rate */
17678 uint32 rx_pkts_retried
; /* # rx with retry bit set */
17679 uint32 tx_pkts_total
; /* total num of tx pkts */
17680 uint32 tx_pkts_retries
; /* total num of tx retries */
17681 uint32 tx_pkts_fw_total
; /* total num of tx pkts generated from fw */
17682 uint32 tx_pkts_fw_retries
; /* num of fw generated tx pkts retried */
17683 uint32 tx_pkts_fw_retry_exhausted
; /* num of fw generated tx pkts where retry exhausted */
17684 } wlc_scb_stats_v1_t
;
17686 /* ecounters for scb stats
17687 * XTLV ID: WL_IFSTATS_XTLV_SCB_ECOUNTERS
17690 #define WL_SCB_ECOUNTERS_VERSION_1 1
17691 #define WL_SCB_ECOUNTERS_VERSION_2 2
17693 typedef struct wl_scb_ecounters_v1
{
17694 uint16 version
; /* version field */
17695 uint16 length
; /* struct length starting from version */
17696 uint32 chanspec
; /* current chanspec where scb is operating */
17697 struct ether_addr ea
; /* peer ndi or sta ea */
17698 uint8 peer_type
; /* peer type */
17701 /* scb tx and rx stats */
17702 wlc_scb_stats_v1_t stats
;
17703 } wl_scb_ecounters_v1_t
;
17705 typedef struct wl_scb_ecounters_v2
{
17706 uint16 version
; /* version field */
17707 uint16 length
; /* struct length starting from version */
17708 uint32 chanspec
; /* current chanspec where scb is operating */
17709 struct ether_addr ea
; /* peer ndi or sta ea */
17710 uint8 peer_type
; /* peer type */
17713 /* scb tx and rx stats */
17714 uint16 tx_rate
; /* Rate(in Mbps) of last successful tx frame */
17715 uint16 rx_rate
; /* Rate(in Mbps) of last successful rx frame */
17716 uint16 tx_rate_fallback
; /* last used lowest fallback TX rate(in Mbps) */
17718 uint32 rx_decrypt_succeeds
; /* num of packets decrypted successfully */
17719 uint32 rx_decrypt_failures
; /* num of packets decrypted unsuccessfully */
17720 uint32 rx_pkts_retried
; /* # rx with retry bit set */
17721 uint32 tx_pkts_retries
; /* total num of tx retries */
17722 uint32 tx_failures
; /* num of packets failed */
17723 uint32 tx_pkts_total
; /* total num of tx pkts */
17724 int8 rssi
[WL_STA_ANT_MAX
]; /* average rssi per antenna of data frames */
17725 } wl_scb_ecounters_v2_t
;
17727 /* ecounters for nan slot stats
17728 * XTLV ID: WL_IFSTATS_XTLV_NAN_SLOT_STATS
17731 #define WL_NAN_SLOT_ECOUNTERS_VERSION_1 1
17733 typedef struct wl_nan_slot_ecounters_v1
{
17734 uint16 version
; /* version field */
17735 uint16 length
; /* struct length starting from version */
17736 uint32 chan
[NAN_MAX_BANDS
]; /* cur nan slot chanspec of both bands */
17737 uint16 cur_slot_idx
; /* cur nan slot index */
17739 nan_sched_stats_t sched
; /* sched stats */
17740 wl_nan_mac_stats_t mac
; /* mac stats */
17741 } wl_nan_slot_ecounters_v1_t
;
17743 * BT log definitions
17746 /* common iovar struct */
17747 typedef struct wl_btl
{
17748 uint16 subcmd_id
; /* subcommand id */
17749 uint16 len
; /* total length of data[] */
17750 uint8 data
[2]; /* subcommand data, variable length */
17753 /* subcommand ids */
17754 #define WL_BTL_SUBCMD_ENABLE 0 /* enable/disable logging */
17755 #define WL_BTL_SUBCMD_STATS 1 /* statistics */
17757 /* WL_BTL_SUBCMD_ENABLE data */
17758 typedef struct wl_blt_enable
{
17759 uint8 enable
; /* 1 - enable, 0 - disable */
17760 uint8 pad
[3]; /* 4-byte struct alignment */
17763 /* WL_BTL_SUBCMD_STATS data */
17764 typedef struct wl_blt_stats
{
17765 uint32 bt_interrupt
; /* num BT interrupts */
17766 uint32 config_req
; /* num CONFIG_REQ */
17767 uint32 config_res_success
; /* num CONFIG_RES successful */
17768 uint32 config_res_fail
; /* num CONFIG_RES failed */
17769 uint32 log_req
; /* num LOG_REQ */
17770 uint32 log_res_success
; /* num LOG_RES successful */
17771 uint32 log_res_fail
; /* num LOG_RES failed */
17772 uint32 indirect_read_fail
; /* num indirect read fail */
17773 uint32 indirect_write_fail
; /* num indirect write fail */
17774 uint32 dma_fail
; /* num DMA failed */
17775 uint32 min_log_req_duration
; /* min log request duration in usec */
17776 uint32 max_log_req_duration
; /* max log request duration in usec */
17777 uint16 mem_dump_req
; /* num mem dump requests */
17778 uint16 mem_dump_success
; /* num mem dumps successful */
17779 uint16 mem_dump_fail
; /* num mem dumps failed */
17780 uint16 bt_wake_success
; /* num BT wakes successful */
17781 uint16 bt_wake_fail
; /* num BT wakes failed */
17782 uint16 mem_dump_req_interrupt
; /* num MEM_DUMP_REQ interrupt */
17783 uint16 mem_dump_res_interrupt
; /* num MEM_DUMP_RES interrupt */
17784 uint16 mem_dump_res_timeout
; /* num MEM_DUMP_RES timeout */
17785 uint16 mem_dump_proc_no_bt_ready
; /* num proceed if no BT ready */
17786 uint16 mem_dump_proc_no_bt_response
; /* num proceed if no BT response */
17787 uint16 mem_dump_proc_no_bt_clock
; /* num proceed if no BT clock */
17788 uint16 pad
; /* alignment */
17789 uint32 last_failed_region
; /* start addr of last failed region */
17790 uint32 min_mem_dump_duration
; /* min mem dump duration in usec */
17791 uint32 max_mem_dump_duration
; /* max mem dump duration in usec */
17796 /* AWD DATA structures */
17798 uint8 version
; /* Extended trap version info */
17799 uint8 reserved
; /* currently unused */
17800 uint16 length
; /* Length of data excluding this header */
17801 uint8 data
[]; /* this data is TLV of tags */
17804 /* AWD TAG structure */
17806 uint8 tagid
; /* one of AWD DATA TAGs numbers */
17807 uint8 length
; /* the data size represented by this field must be aligned to 32 bits */
17808 uint8 data
[]; /* variable size, defined by length field */
17809 } awd_tag_data_v1_t
;
17813 /* ETD DATA structures */
17815 uint8 version
; /* Extended trap version info */
17816 uint8 reserved
; /* currently unused */
17817 uint16 length
; /* Length of data excluding this header */
17818 uint8 data
[]; /* this data is TLV of tags */
17821 /* ETD TAG structure */
17823 uint8 tagid
; /* one of ETD DATA TAGs numbers */
17824 uint8 length
; /* the data size represented by this field must be aligned to 32 bits */
17825 uint8 data
[]; /* variable size, defined by length field */
17826 } etd_tag_data_v1_t
;
17828 /* ETD information structures associated with ETD_DATA_Tags */
17829 /* ETD_JOIN_CLASSIFICATION_INFO 10 */
17831 uint8 assoc_type
; /* assoc type */
17832 uint8 assoc_state
; /* current state of assoc state machine */
17833 uint8 wpa_state
; /* wpa->state */
17834 uint8 wsec_portopen
; /* shows if security port is open */
17835 uint8 total_attempts_num
; /* total number of join attempts (bss_retries) */
17836 uint8 num_of_targets
; /* up to 3, in current design */
17837 uint8 reserved
[2]; /* padding to get 32 bits alignment */
17838 uint32 wsec
; /* bsscfg->wsec */
17839 uint32 wpa_auth
; /* bsscfg->WPA_auth */
17840 uint32 time_to_join
; /* time duration to process WLC_SET_SSID request (ms) */
17841 } join_classification_info_v1_t
;
17843 /* ETD_JOIN_TARGET_CLASSIFICATION_INFO 11 */
17845 int8 rssi
; /* RSSI on current channel */
17846 uint8 cca
; /* CCA on current channel */
17847 uint8 channel
; /* current channel */
17848 uint8 num_of_attempts
; /* (bss_retries) up to 5 */
17849 uint8 oui
[3]; /* the first three octets of the AP's address */
17850 uint8 reserved
; /* padding to get 32 bits alignment */
17851 uint32 time_duration
; /* time duration of current attempt (ms) */
17852 } join_target_classification_info_v1_t
;
17854 /* ETD_ASSOC_STATE 12 */
17856 uint8 assoc_state
; /* assoc type */
17857 uint8 reserved
[3]; /* padding to get 32 bits alignment */
17858 } join_assoc_state_v1_t
;
17860 /* ETD_CHANNEL 13 tag */
17862 uint8 channel
; /* last attempt channel */
17863 uint8 reserved
[3]; /* padding to get 32 bits alignment */
17864 } join_channel_v1_t
;
17866 /* ETD_TOTAL_NUM_OF_JOIN_ATTEMPTS 14 */
17868 uint8 total_attempts_num
; /* total number of join attempts (bss_retries) */
17869 uint8 reserved
[3]; /* padding to get 32 bits alignment */
17870 } join_total_attempts_num_v1_t
;
17872 /* IOV_ROAM_CACHE structures */
17874 enum wl_rmc_report_cmd_id
{
17875 WL_RMC_RPT_CMD_VER
= 0,
17876 WL_RMC_RPT_CMD_DATA
= 1,
17877 WL_RMC_RPT_CMD_LAST
17880 enum wl_rmc_report_xtlv_id
{
17881 WL_RMC_RPT_XTLV_VER
= 0x0,
17882 WL_RMC_RPT_XTLV_BSS_INFO
= 0x1,
17883 WL_RMC_RPT_XTLV_CANDIDATE_INFO
= 0x2
17886 /* WL_RMC_RPT_XTLV_BSS_INFO */
17888 int16 rssi
; /* current BSS RSSI */
17889 uint8 reason
; /* reason code for last full scan */
17890 uint8 status
; /* last status code for not roaming */
17891 uint32 fullscan_count
; /* number of full scans performed on current BSS */
17892 uint32 time_full_scan
; /* delta time (in ms) between cur time and full scan timestamp */
17893 } rmc_bss_info_v1_t
;
17895 /* WL_RMC_RPT_XTLV_CANDIDATE_INFO */
17897 int16 rssi
; /* last seen rssi */
17898 uint16 ctl_channel
; /* channel */
17899 uint32 time_last_seen
; /* delta time (in ms) between cur time and last seen timestamp */
17900 uint16 bss_load
; /* BSS load */
17901 uint8 bssid
[6]; /* padding to get 32 bits alignment */
17902 } rmc_candidate_info_v1_t
;
17904 #define WL_FILTER_IE_VERSION 1
17905 enum wl_filter_ie_options
{
17906 WL_FILTER_IE_CLEAR
= 0, /* allow element id in packet.For suboption */
17907 WL_FILTER_IE_SET
= 1, /* filter element id in packet.For suboption */
17908 WL_FILTER_IE_LIST
= 2, /* list element ID's.Set as option */
17909 WL_FILTER_IE_CLEAR_ALL
= 3, /* clear all the element.Set as option */
17910 WL_FILTER_IE_CHECK_SUB_OPTION
= 4 /* check for suboptions.Set only as option */
17913 typedef struct wl_filter_ie_tlv
{
17915 uint16 len
; /* sub option length + pattern length */
17916 uint8 data
[]; /* sub option + pattern matching(OUI,type,sub-type) */
17917 } wl_filter_ie_tlv_t
;
17919 typedef struct wl_filter_ie_iov
{
17920 uint16 version
; /* Structure version */
17921 uint16 len
; /* Total length of the structure */
17922 uint16 fixed_length
; /* Total length of fixed fields */
17923 uint8 option
; /* Filter action - check for suboption */
17924 uint8 pad
[1]; /* Align to 4 bytes */
17925 uint32 pktflag
; /* frame type */
17926 uint8 tlvs
[]; /* variable data (zero in for list ,clearall) */
17927 } wl_filter_ie_iov_v1_t
;
17929 /* Event aggregation config */
17930 #define EVENT_AGGR_CFG_VERSION 1
17931 #define EVENT_AGGR_DISABLED 0x0
17932 #define EVENT_AGGR_ENABLED 0x1
17934 #define EVENT_AGGR_BUFSIZE_MAX 1512
17935 #define EVENT_AGGR_BUFSIZE_MIN 512
17937 #define EVENT_AGGR_FLUSH_TIMEOUT_DEFAULT 100
17938 #define EVENT_AGGR_FLUSH_TIMEOUT_MAX 2000
17939 #define EVENT_AGGR_NUM_EVENTS_FLUSH 5
17940 typedef struct event_aggr_config
{
17943 uint16 flags
; /* bit 0 to enable/disable the feature */
17944 uint16 bufsize
; /* Aggregate buffer size */
17945 uint16 flush_timeout
; /* Timeout for event flush */
17946 uint16 num_events_flush
; /* Number of events aggregated before flush */
17947 } event_aggr_config_t
;
17949 #ifndef WL_TDMTX_TYPEDEF_HAS_ALIAS
17950 typedef tdmtx_cnt_v1_t tdmtx_cnt_t
;
17951 typedef tdmtx_cnt_shm_v1_t tdmtx_cnt_shm_t
;
17952 typedef wl_tdmtx_ecounters_v1_t wl_tdmtx_ecounters_t
;
17953 #define WL_CNT_TDMTX_STRUCT_SZ (sizeof(tdmtx_cnt_t))
17954 #define WL_CNT_TDMTX_SHM_SZ (sizeof(tdmtx_cnt_shm_t))
17957 /** chanctxt related statistics */
17958 #define CHANCTXT_STATS_VERSION_1 1
17959 #define CHANCTXT_STATS_CURRENT_VERSION CHANCTXT_STATS_VERSION_1
17960 typedef struct wlc_chanctxt_stats
{
17961 uint32 excursionq_end_miss
;
17962 uint32 activeq_end_miss
;
17963 uint32 no_chanctxt_count
;
17964 uint32 txqueue_end_incomplete
;
17965 uint32 txqueue_start_incomplete
;
17966 } wlc_chanctxt_stats_core_t
;
17968 typedef struct chanctxt_stats
{
17971 wlc_chanctxt_stats_core_t corestats
[MAX_NUM_D11CORES
];
17972 } wlc_chanctxt_stats_t
;
17974 typedef struct wl_txdc_ioc
{
17976 uint8 id
; /* ID of the sub-command */
17977 uint16 len
; /* total length of all data[] */
17978 uint8 data
[]; /* var len payload */
17982 * iovar subcommand ids
17991 /* WL_NAN_XTLV_SLOT_STATS */
17992 /* WL_NAN_EVENT_SLOT_START, WL_NAN_EVENT_SLOT_END */
17993 typedef struct nan_slot_event_data
{
17994 uint32 cur_slot_idx
; /* current idx in channel schedule */
17995 uint32 fw_time
; /* target current time in microseconds */
17996 uint32 band
; /* current band (2G/5G) for which the event is received */
17997 } nan_slot_event_data_t
;
17999 /* SAE (Simultaneous Authentication of Equals) error codes.
18000 * These error codes are local.
18003 #define WL_SAE_E_BASE -3072
18005 /* SAE status codes are reserved from -3072 to -4095 (1K) */
18007 enum WL_SAE_E_STATUS_CODES
{
18008 WL_SAE_E_AUTH_FAILURE
= -3072,
18009 /* Discard silently */
18010 WL_SAE_E_AUTH_DISCARD
= -3073,
18011 /* Authentication in progress */
18012 WL_SAE_E_AUTH_CONTINUE
= -3074,
18013 /* Invalid scalar/elt */
18014 WL_SAE_E_AUTH_COMMIT_INVALID
= -3075,
18015 /* Invalid confirm token */
18016 WL_SAE_E_AUTH_CONFIRM_INVALID
= -3076,
18017 /* Peer scalar validation failure */
18018 WL_SAE_E_CRYPTO_SCALAR_VALIDATION
= -3077,
18019 /* Peer element prime validation failure */
18020 WL_SAE_E_CRYPTO_ELE_PRIME_VALIDATION
= -3078,
18021 /* Peer element is not on the curve */
18022 WL_SAE_E_CRYPTO_ELE_NOT_ON_CURVE
= -3079,
18023 /* Generic EC error (eliptic curve related) */
18024 WL_SAE_E_CRYPTO_EC_ERROR
= -3080,
18025 /* Both local and peer mac addrs are same */
18026 WL_SAE_E_CRYPTO_EQUAL_MACADDRS
= -3081,
18027 /* Loop exceeded in deriving the scalar */
18028 WL_SAE_E_CRYPTO_SCALAR_ITER_EXCEEDED
= -3082,
18029 /* ECC group is unsupported */
18030 WL_SAE_E_CRYPTO_UNSUPPORTED_GROUP
= -3083,
18031 /* Exceeded the hunting-and-pecking counter */
18032 WL_SAE_E_CRYPTO_PWE_COUNTER_EXCEEDED
= -3084,
18033 /* SAE crypto component is not initialized */
18034 WL_SAE_E_CRYPTO_NOT_INITED
= -3085,
18035 /* bn_get has failed */
18036 WL_SAE_E_CRYPTO_BN_GET_ERROR
= -3086,
18037 /* bn_set has failed */
18038 WL_SAE_E_CRYPTO_BN_SET_ERROR
= -3087,
18039 /* PMK is not computed yet */
18040 WL_SAE_E_CRYPTO_PMK_UNAVAILABLE
= -3088,
18041 /* Peer confirm did not match */
18042 WL_SAE_E_CRYPTO_CONFIRM_MISMATCH
= -3089,
18043 /* Element K is at infinity no the curve */
18044 WL_SAE_E_CRYPTO_KEY_AT_INFINITY
= -3090,
18045 /* SAE Crypto private data magic number mismatch */
18046 WL_SAE_E_CRYPTO_PRIV_MAGIC_MISMATCH
= -3091
18049 /* Block Channel */
18050 #define WL_BLOCK_CHANNEL_VER_1 1u
18052 typedef struct wl_block_ch_v1
{
18055 uint32 band
; /* Band select */
18056 uint8 channel_num
; /* The number of block channels in the selected band */
18058 uint8 channel
[]; /* Channel to block, Variable Length */
18059 } wl_block_ch_v1_t
;
18061 /* Max Host whitelist region supported */
18062 #define DMA_WL_ADDR_REGION_HOST_MAX 1u
18063 typedef struct dma_wl_addr_region
{
18066 } dma_wl_addr_region_t
;
18068 typedef struct dma_wl_addr_region_host
{
18069 dma_wl_addr_region_t hreg_start
;
18070 dma_wl_addr_region_t hreg_end
;
18071 } dma_wl_addr_region_host_t
;
18072 #define WL_ROAMSTATS_IOV_VERSION 1
18074 #define MAX_PREV_ROAM_EVENTS 16u
18076 #define ROAMSTATS_UNKNOWN_CNT 0xFFFFu
18078 /* roaming statistics counter structures */
18079 typedef struct wlc_assoc_roamstats_event_msg_v1
{
18080 uint32 event_type
; /* Message (see below) */
18081 uint32 status
; /* Status code (see below) */
18082 uint32 reason
; /* Reason code (if applicable) */
18083 uint32 timestamp
; /* Timestamp of event */
18084 } wlc_assoc_roamstats_event_msg_v1_t
;
18086 enum wl_roamstats_cmd_id
{
18087 WL_ROAMSTATS_XTLV_CMD_VER
= 0,
18088 WL_ROAMSTATS_XTLV_CMD_RESET
= 1,
18089 WL_ROAMSTATS_XTLV_CMD_STATUS
= 2,
18090 WL_ROAMSTATS_XTLV_CMD_LAST
/* Keep this at the end */
18093 enum wl_roamstats_xtlv_id
{
18094 WL_ROAMSTATS_XTLV_VER
= 0x0,
18095 WL_ROAMSTATS_XTLV_COUNTER_INFO
= 0x1,
18096 WL_ROAMSTATS_XTLV_PREV_ROAM_EVENTS
= 0x2,
18097 WL_ROAMSTATS_XTLV_REASON_INFO
= 0x3
18100 /* WL_ROAMSTATS_XTLV_COUNTER_INFO */
18102 uint32 initial_assoc_time
;
18103 uint32 prev_roam_time
;
18104 uint32 host_access_time
;
18105 uint16 roam_success_cnt
;
18106 uint16 roam_fail_cnt
;
18107 uint16 roam_attempt_cnt
;
18108 uint16 max_roam_target_cnt
;
18109 uint16 min_roam_target_cnt
;
18110 uint16 max_cached_ch_cnt
;
18111 uint16 min_cached_ch_cnt
;
18112 uint16 partial_roam_scan_cnt
;
18113 uint16 full_roam_scan_cnt
;
18114 } roamstats_counter_info_v1_t
;
18116 /* WL_ROAMSTATS_XTLV_PREV_ROAM_EVENTS */
18120 wlc_assoc_roamstats_event_msg_v1_t roam_event
[];
18121 } roamstats_prev_roam_events_v1_t
;
18123 /* WL_ROAMSTATS_XTLV_REASON_INFO */
18126 uint16 reason_cnt
[];
18127 } roamstats_reason_info_v1_t
;
18129 #ifdef HEALTH_CHECK_WLIOCTL
18130 /* Health check status format:
18131 * reporting status size = uint32
18132 * 8 LSB bits are reserved for: WARN (0), ERROR (1), and other levels
18133 * MSB 24 bits are reserved for client to fill in its specific status
18135 #define HEALTH_CHECK_STATUS_OK 0
18136 /* Bit positions. */
18137 #define HEALTH_CHECK_STATUS_WARN 0x1
18138 #define HEALTH_CHECK_STATUS_ERROR 0x2
18139 #define HEALTH_CHECK_STATUS_TRAP 0x4
18140 #define HEALTH_CHECK_STATUS_NOEVENT 0x8
18142 /* Indication that required information is populated in log buffers */
18143 #define HEALTH_CHECK_STATUS_INFO_LOG_BUF 0x80
18144 #define HEALTH_CHECK_STATUS_MASK (0xFF)
18146 #define HEALTH_CHECK_STATUS_MSB_SHIFT 8
18147 #endif /* HEALTH_CHECK_WLIOCTL */
18149 /** receive signal reporting module interface */
18151 #define WL_RXSIG_IOV_MAJOR_VER (1u)
18152 #define WL_RXSIG_IOV_MINOR_VER (1u)
18153 #define WL_RXSIG_IOV_MAJOR_VER_SHIFT (8u)
18154 #define WL_RXSIG_IOV_VERSION \
18155 ((WL_RXSIG_IOV_MAJOR_VER << WL_RXSIG_IOV_MAJOR_VER_SHIFT) | WL_RXSIG_IOV_MINOR_VER)
18156 #define WL_RXSIG_IOV_GET_MAJOR(x) (x >> WL_RXSIG_IOV_MAJOR_VER_SHIFT)
18157 #define WL_RXSIG_IOV_GET_MINOR(x) (x & 0xFF)
18159 enum wl_rxsig_cmd_ids
{
18160 WL_RXSIG_CMD_RSSI_ANT_V1
= 0x1,
18161 WL_RXSIG_CMD_DUMP_V1
= 0x2,
18165 enum wl_rxsig_cmd_rssi_mode
{
18166 WL_RXSIG_MODE_DB
= 0x0,
18167 WL_RXSIG_MODE_QDB
= 0x1,
18171 /* structure defs for 'wl rxsig [cmd]' iovars */
18172 enum wl_rxsig_iov_v1
{
18173 WL_RXSIG_CMD_RSSI
= 0x1, /**< combined rssi moving avg */
18174 WL_RXSIG_CMD_SNR
= 0x2, /**< combined snr moving avg */
18175 WL_RXSIG_CMD_RSSIANT
= 0x3, /**< rssi moving avg per-ant */
18176 WL_RXSIG_CMD_SNRANT
= 0x4, /**< snr moving avg per-snr */
18177 WL_RXSIG_CMD_SMPLWIN
= 0x5, /**< config for sampling window size */
18178 WL_RXSIG_CMD_SMPLGRP
= 0x7, /**< config for grouping of pkt type */
18179 WL_RXSIG_CMD_STA_MA
= 0x8,
18180 WL_RXSIG_CMD_MAMODE
= 0x9,
18181 WL_RXSIG_CMD_MADIV
= 0xa,
18182 WL_RXSIG_CMD_DUMP
= 0xb,
18183 WL_RXSIG_CMD_DUMPWIN
= 0xc,
18187 struct wl_rxsig_cfg_v1
{
18189 chanspec_t chan
; /**< chanspec info for querying stats */
18190 uint8 pmac
[ETHER_ADDR_LEN
]; /**< peer(link) mac address */
18193 struct wl_rxsig_iov_rssi_v1
{
18199 struct wl_rxsig_iov_snr_v1
{
18204 struct wl_rxsig_iov_rssi_ant_v1
{
18205 int8 deci
[WL_RSSI_ANT_MAX
];
18206 uint8 frac
[WL_RSSI_ANT_MAX
];
18207 uint8 rssi_mode
; /**< MODE_DB or MODE_QDB */
18208 uint8 pad
[3]; /**< padding for 32bit align */
18211 struct wl_rxsig_perchan_stat_v1
{
18213 uint16 len
; /**< sampling windows buffer length */
18214 chanspec_t chanspec
;
18215 int16 rssi_avg
; /**< moving average rssi */
18216 int16 snr_avg
; /**< moving average snr */
18217 int16 rssi_ants
[WL_RSSI_ANT_MAX
]; /**< moving average rssi per-ant */
18218 int16 snr_ants
[WL_RSSI_ANT_MAX
]; /**< moving average snr per-ant */
18219 uint8 smpl_win_sz
; /**< current sampling window size */
18220 uint8 win
[0]; /**< sampling window buffer. stat_smplwin * smpl_win_sz */
18223 struct wl_rxsig_stat_smplwin_v1
{
18225 int16 rssi_raw
[WL_RSSI_ANT_MAX
];
18226 int16 snr_raw
[WL_RSSI_ANT_MAX
];
18231 #endif /* _wlioctl_h_ */