.. | .. |
---|
1 | | -/* SPDX-License-Identifier: GPL-2.0 */ |
---|
2 | 1 | /* |
---|
3 | 2 | * Custom OID/ioctl definitions for |
---|
4 | 3 | * |
---|
.. | .. |
---|
7 | 6 | * |
---|
8 | 7 | * Definitions subject to change without notice. |
---|
9 | 8 | * |
---|
10 | | - * Copyright (C) 1999-2019, Broadcom Corporation |
---|
11 | | - * |
---|
| 9 | + * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation |
---|
| 10 | + * |
---|
| 11 | + * Copyright (C) 1999-2017, Broadcom Corporation |
---|
| 12 | + * |
---|
12 | 13 | * Unless you and Broadcom execute a separate written software license |
---|
13 | 14 | * agreement governing use of this software, this software is licensed to you |
---|
14 | 15 | * under the terms of the GNU General Public License version 2 (the "GPL"), |
---|
15 | 16 | * available at http://www.broadcom.com/licenses/GPLv2.php, with the |
---|
16 | 17 | * following added to such license: |
---|
17 | | - * |
---|
| 18 | + * |
---|
18 | 19 | * As a special exception, the copyright holders of this software give you |
---|
19 | 20 | * permission to link this software with independent modules, and to copy and |
---|
20 | 21 | * distribute the resulting executable under terms of your choice, provided that |
---|
.. | .. |
---|
22 | 23 | * the license of that module. An independent module is a module which is not |
---|
23 | 24 | * derived from this software. The special exception does not apply to any |
---|
24 | 25 | * modifications of the software. |
---|
25 | | - * |
---|
| 26 | + * |
---|
26 | 27 | * Notwithstanding the above, under no circumstances may you combine this |
---|
27 | 28 | * software in any way with any other Broadcom software provided under a license |
---|
28 | 29 | * other than the GPL, without Broadcom's express prior written consent. |
---|
| 30 | + * |
---|
| 31 | + * |
---|
29 | 32 | * <<Broadcom-WL-IPTag/Open:>> |
---|
30 | 33 | * |
---|
31 | | - * $Id: wlioctl.h 712434 2019-03-22 05:15:30Z $ |
---|
| 34 | + * $Id$ |
---|
32 | 35 | */ |
---|
33 | 36 | |
---|
34 | 37 | #ifndef _wlioctl_h_ |
---|
35 | 38 | #define _wlioctl_h_ |
---|
36 | 39 | |
---|
37 | 40 | #include <typedefs.h> |
---|
38 | | -#include <proto/ethernet.h> |
---|
39 | | -#include <proto/bcmip.h> |
---|
40 | | -#include <proto/bcmeth.h> |
---|
41 | | -#include <proto/bcmip.h> |
---|
42 | | -#include <proto/bcmevent.h> |
---|
43 | | -#include <proto/802.11.h> |
---|
44 | | -#include <proto/802.1d.h> |
---|
| 41 | +#include <ethernet.h> |
---|
| 42 | +#include <bcmip.h> |
---|
| 43 | +#include <bcmeth.h> |
---|
| 44 | +#include <bcmip.h> |
---|
| 45 | +#include <bcmipv6.h> |
---|
| 46 | +#include <bcmevent.h> |
---|
| 47 | +#include <802.11.h> |
---|
| 48 | +#include <802.11s.h> |
---|
| 49 | +#include <802.1d.h> |
---|
45 | 50 | #include <bcmwifi_channels.h> |
---|
| 51 | +#include <802.11ax.h> |
---|
46 | 52 | #include <bcmwifi_rates.h> |
---|
47 | | -#include <devctrl_if/wlioctl_defs.h> |
---|
48 | | -#include <proto/bcmipv6.h> |
---|
| 53 | +#include <wlioctl_defs.h> |
---|
| 54 | +#include <bcmipv6.h> |
---|
49 | 55 | |
---|
50 | 56 | #include <bcm_mpool_pub.h> |
---|
51 | 57 | #include <bcmcdc.h> |
---|
52 | 58 | |
---|
| 59 | +/* NOTE re: Module specific error codes. |
---|
| 60 | + * |
---|
| 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. |
---|
| 64 | + * |
---|
| 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. |
---|
| 67 | + * |
---|
| 68 | + * The error codes -4096 ... -5119 are reserved for firmware signing. |
---|
| 69 | + * |
---|
| 70 | + * Next available (inclusive) range: [-6*1024 + 1, -5*1024] |
---|
| 71 | + * |
---|
| 72 | + * End Note |
---|
| 73 | + */ |
---|
53 | 74 | |
---|
54 | | - |
---|
55 | | - |
---|
| 75 | +/* 11ax trigger frame format - versioning info */ |
---|
| 76 | +#define TRIG_FRAME_FORMAT_11AX_DRAFT_1P1 0 |
---|
56 | 77 | |
---|
57 | 78 | typedef struct { |
---|
58 | 79 | uint32 num; |
---|
.. | .. |
---|
61 | 82 | |
---|
62 | 83 | #define RSN_KCK_LENGTH 16 |
---|
63 | 84 | #define RSN_KEK_LENGTH 16 |
---|
64 | | - |
---|
65 | | - |
---|
| 85 | +#define TPK_FTM_LEN 16 |
---|
66 | 86 | #ifndef INTF_NAME_SIZ |
---|
67 | 87 | #define INTF_NAME_SIZ 16 |
---|
68 | | -#endif |
---|
| 88 | +#endif // endif |
---|
69 | 89 | |
---|
70 | | -/* Used to send ioctls over the transport pipe */ |
---|
| 90 | +#define WL_ASSOC_START_EVT_DATA_VERSION 1 |
---|
| 91 | +#define WSEC_MAX_SAE_PASSWORD_LEN 128 |
---|
| 92 | + |
---|
| 93 | +typedef struct assoc_event_data { |
---|
| 94 | + uint32 version; |
---|
| 95 | + uint32 flags; |
---|
| 96 | + chanspec_t join_chspec; |
---|
| 97 | +} assoc_event_data_t; |
---|
| 98 | + |
---|
| 99 | +/**Used to send ioctls over the transport pipe */ |
---|
71 | 100 | typedef struct remote_ioctl { |
---|
72 | 101 | cdc_ioctl_t msg; |
---|
73 | 102 | uint32 data_len; |
---|
.. | .. |
---|
75 | 104 | } rem_ioctl_t; |
---|
76 | 105 | #define REMOTE_SIZE sizeof(rem_ioctl_t) |
---|
77 | 106 | |
---|
| 107 | +#define BCM_IOV_XTLV_VERSION 0 |
---|
78 | 108 | |
---|
79 | | -/* DFS Forced param */ |
---|
| 109 | +#define MAX_NUM_D11CORES 2 |
---|
| 110 | + |
---|
| 111 | +/**DFS Forced param */ |
---|
80 | 112 | typedef struct wl_dfs_forced_params { |
---|
81 | 113 | chanspec_t chspec; |
---|
82 | 114 | uint16 version; |
---|
.. | .. |
---|
85 | 117 | |
---|
86 | 118 | #define DFS_PREFCHANLIST_VER 0x01 |
---|
87 | 119 | #define WL_CHSPEC_LIST_FIXED_SIZE OFFSETOF(chanspec_list_t, list) |
---|
| 120 | +/* size of dfs forced param size given n channels are in the list */ |
---|
| 121 | +#define WL_DFS_FORCED_PARAMS_SIZE(n) \ |
---|
| 122 | + (sizeof(wl_dfs_forced_t) + (((n) < 1) ? (0) : (((n) - 1)* sizeof(chanspec_t)))) |
---|
88 | 123 | #define WL_DFS_FORCED_PARAMS_FIXED_SIZE \ |
---|
89 | 124 | (WL_CHSPEC_LIST_FIXED_SIZE + OFFSETOF(wl_dfs_forced_t, chspec_list)) |
---|
90 | 125 | #define WL_DFS_FORCED_PARAMS_MAX_SIZE \ |
---|
91 | 126 | WL_DFS_FORCED_PARAMS_FIXED_SIZE + (WL_NUMCHANNELS * sizeof(chanspec_t)) |
---|
92 | 127 | |
---|
93 | | -/* association decision information */ |
---|
| 128 | +/**association decision information */ |
---|
94 | 129 | typedef struct { |
---|
95 | | - bool assoc_approved; /**< (re)association approved */ |
---|
| 130 | + uint8 assoc_approved; /**< (re)association approved */ |
---|
| 131 | + uint8 pad; |
---|
96 | 132 | uint16 reject_reason; /**< reason code for rejecting association */ |
---|
97 | 133 | struct ether_addr da; |
---|
| 134 | + uint8 pad1[6]; |
---|
98 | 135 | int64 sys_time; /**< current system time */ |
---|
99 | 136 | } assoc_decision_t; |
---|
100 | 137 | |
---|
.. | .. |
---|
105 | 142 | #define DFS_SCAN_S_SCAN_ABORTED 3 |
---|
106 | 143 | #define DFS_SCAN_S_SCAN_MODESW_INPROGRESS 4 |
---|
107 | 144 | #define DFS_SCAN_S_MAX 5 |
---|
108 | | - |
---|
109 | 145 | |
---|
110 | 146 | #define ACTION_FRAME_SIZE 1800 |
---|
111 | 147 | |
---|
.. | .. |
---|
125 | 161 | } ssid_info_t; |
---|
126 | 162 | |
---|
127 | 163 | typedef struct wl_af_params { |
---|
128 | | - uint32 channel; |
---|
129 | | - int32 dwell_time; |
---|
130 | | - struct ether_addr BSSID; |
---|
| 164 | + uint32 channel; |
---|
| 165 | + int32 dwell_time; |
---|
| 166 | + struct ether_addr BSSID; |
---|
| 167 | + uint8 PAD[2]; |
---|
131 | 168 | wl_action_frame_t action_frame; |
---|
132 | 169 | } wl_af_params_t; |
---|
133 | 170 | |
---|
134 | 171 | #define WL_WIFI_AF_PARAMS_SIZE sizeof(struct wl_af_params) |
---|
135 | 172 | |
---|
| 173 | +#define WL_EXTAUTH_START 1 |
---|
| 174 | +#define WL_EXTAUTH_ABORT 2 |
---|
| 175 | +#define WL_EXTAUTH_FAIL 3 |
---|
| 176 | +#define WL_EXTAUTH_SUCCESS 4 |
---|
| 177 | + |
---|
| 178 | +/** |
---|
| 179 | + * Used by both dongle and host |
---|
| 180 | + * dongle asks host to start auth(SAE) |
---|
| 181 | + * host updates auth status to dongle |
---|
| 182 | + */ |
---|
| 183 | +typedef struct wl_auth_req_status { |
---|
| 184 | + uint16 flags; |
---|
| 185 | + struct ether_addr peer_mac; /**< peer mac address */ |
---|
| 186 | + uint32 ssid_len; |
---|
| 187 | + uint8 ssid[DOT11_MAX_SSID_LEN]; |
---|
| 188 | + uint8 pmkid[WPA2_PMKID_LEN]; |
---|
| 189 | +} wl_auth_req_status_t; |
---|
| 190 | + |
---|
| 191 | +typedef struct wl_mf_params { |
---|
| 192 | + uint32 version; |
---|
| 193 | + uint32 dwell_time; |
---|
| 194 | + uint16 len; |
---|
| 195 | + uint16 fc; |
---|
| 196 | + uint16 channel; |
---|
| 197 | + struct ether_addr da; |
---|
| 198 | + struct ether_addr bssid; |
---|
| 199 | + uint32 packetId; |
---|
| 200 | + uint8 data[1]; |
---|
| 201 | +} wl_mf_params_t; |
---|
| 202 | + |
---|
136 | 203 | #define MFP_TEST_FLAG_NORMAL 0 |
---|
137 | 204 | #define MFP_TEST_FLAG_ANY_KEY 1 |
---|
138 | 205 | typedef struct wl_sa_query { |
---|
139 | | - uint32 flag; |
---|
140 | | - uint8 action; |
---|
141 | | - uint16 id; |
---|
142 | | - struct ether_addr da; |
---|
| 206 | + uint32 flag; |
---|
| 207 | + uint8 action; |
---|
| 208 | + uint8 PAD; |
---|
| 209 | + uint16 id; |
---|
| 210 | + struct ether_addr da; |
---|
| 211 | + uint16 PAD; |
---|
143 | 212 | } wl_sa_query_t; |
---|
144 | 213 | |
---|
145 | | -/* require default structure packing */ |
---|
146 | | -#define BWL_DEFAULT_PACKING |
---|
147 | | -#include <packed_section_start.h> |
---|
148 | | - |
---|
| 214 | +/* EXT_STA */ |
---|
| 215 | +/**association information */ |
---|
| 216 | +typedef struct { |
---|
| 217 | + uint32 assoc_req; /**< offset to association request frame */ |
---|
| 218 | + uint32 assoc_req_len; /**< association request frame length */ |
---|
| 219 | + uint32 assoc_rsp; /**< offset to association response frame */ |
---|
| 220 | + uint32 assoc_rsp_len; /**< association response frame length */ |
---|
| 221 | + uint32 bcn; /**< offset to AP beacon */ |
---|
| 222 | + uint32 bcn_len; /**< AP beacon length */ |
---|
| 223 | + uint32 wsec; /**< ucast security algo */ |
---|
| 224 | + uint32 wpaie; /**< offset to WPA ie */ |
---|
| 225 | + uint8 auth_alg; /**< 802.11 authentication mode */ |
---|
| 226 | + uint8 WPA_auth; /**< WPA: authenticated key management */ |
---|
| 227 | + uint8 ewc_cap; /**< EWC (MIMO) capable */ |
---|
| 228 | + uint8 ofdm; /**< OFDM */ |
---|
| 229 | +} assoc_info_t; |
---|
| 230 | +/* defined(EXT_STA) */ |
---|
149 | 231 | |
---|
150 | 232 | /* Flags for OBSS IOVAR Parameters */ |
---|
151 | 233 | #define WL_OBSS_DYN_BWSW_FLAG_ACTIVITY_PERIOD (0x01) |
---|
.. | .. |
---|
158 | 240 | |
---|
159 | 241 | /* OBSS IOVAR Version information */ |
---|
160 | 242 | #define WL_PROT_OBSS_CONFIG_PARAMS_VERSION 1 |
---|
| 243 | + |
---|
| 244 | +#include <packed_section_start.h> |
---|
161 | 245 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
162 | | - uint8 obss_bwsw_activity_cfm_count_cfg; /* configurable count in |
---|
| 246 | + uint8 obss_bwsw_activity_cfm_count_cfg; /**< configurable count in |
---|
163 | 247 | * seconds before we confirm that OBSS is present and |
---|
164 | 248 | * dynamically activate dynamic bwswitch. |
---|
165 | 249 | */ |
---|
166 | | - uint8 obss_bwsw_no_activity_cfm_count_cfg; /* configurable count in |
---|
| 250 | + uint8 obss_bwsw_no_activity_cfm_count_cfg; /**< configurable count in |
---|
167 | 251 | * seconds before we confirm that OBSS is GONE and |
---|
168 | 252 | * dynamically start pseudo upgrade. If in pseudo sense time, we |
---|
169 | 253 | * will see OBSS, [means that, we false detected that OBSS-is-gone |
---|
.. | .. |
---|
174 | 258 | */ |
---|
175 | 259 | uint8 obss_bwsw_no_activity_cfm_count_incr_cfg; /* see above |
---|
176 | 260 | */ |
---|
177 | | - uint16 obss_bwsw_pseudo_sense_count_cfg; /* number of msecs/cnt to be in |
---|
| 261 | + uint16 obss_bwsw_pseudo_sense_count_cfg; /**< number of msecs/cnt to be in |
---|
178 | 262 | * pseudo state. This is used to sense/measure the stats from lq. |
---|
179 | 263 | */ |
---|
180 | | - uint8 obss_bwsw_rx_crs_threshold_cfg; /* RX CRS default threshold */ |
---|
181 | | - uint8 obss_bwsw_dur_thres; /* OBSS dyn bwsw trigger/RX CRS Sec */ |
---|
182 | | - uint8 obss_bwsw_txop_threshold_cfg; /* TXOP default threshold */ |
---|
183 | | -} BWL_POST_PACKED_STRUCT wlc_prot_dynbwsw_config_t; |
---|
| 264 | + uint8 obss_bwsw_rx_crs_threshold_cfg; /**< RX CRS default threshold */ |
---|
| 265 | + uint8 obss_bwsw_dur_thres; /**< OBSS dyn bwsw trigger/RX CRS Sec */ |
---|
| 266 | + uint8 obss_bwsw_txop_threshold_cfg; /**< TXOP default threshold */ |
---|
| 267 | +} BWL_POST_PACKED_STRUCT wlc_obss_dynbwsw_config_t; |
---|
| 268 | +#include <packed_section_end.h> |
---|
184 | 269 | |
---|
| 270 | +#include <packed_section_start.h> |
---|
185 | 271 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
186 | 272 | uint32 version; /**< version field */ |
---|
187 | 273 | uint32 config_mask; |
---|
188 | 274 | uint32 reset_mask; |
---|
189 | | - wlc_prot_dynbwsw_config_t config_params; |
---|
| 275 | + wlc_obss_dynbwsw_config_t config_params; |
---|
190 | 276 | } BWL_POST_PACKED_STRUCT obss_config_params_t; |
---|
| 277 | +#include <packed_section_end.h> |
---|
191 | 278 | |
---|
192 | | - |
---|
193 | | -/* bsscfg type */ |
---|
194 | | -typedef enum bsscfg_type_t { |
---|
195 | | - BSSCFG_TYPE_GENERIC = 0, /**< default */ |
---|
196 | | - BSSCFG_TYPE_P2P = 1, /**< The BSS is for p2p link */ |
---|
197 | | - BSSCFG_TYPE_BTA = 2, |
---|
| 279 | +/**bsscfg type */ |
---|
| 280 | +typedef enum bsscfg_type { |
---|
| 281 | + BSSCFG_TYPE_GENERIC = 0, /**< Generic AP/STA/IBSS BSS */ |
---|
| 282 | + BSSCFG_TYPE_P2P = 1, /**< P2P BSS */ |
---|
| 283 | + /* index 2 earlier used for BTAMP */ |
---|
| 284 | + BSSCFG_TYPE_PSTA = 3, |
---|
198 | 285 | BSSCFG_TYPE_TDLS = 4, |
---|
199 | | - BSSCFG_TYPE_AWDL = 5, |
---|
| 286 | + BSSCFG_TYPE_SLOTTED_BSS = 5, |
---|
200 | 287 | BSSCFG_TYPE_PROXD = 6, |
---|
201 | 288 | BSSCFG_TYPE_NAN = 7, |
---|
202 | | - BSSCFG_TYPE_MAX |
---|
| 289 | + BSSCFG_TYPE_MESH = 8, |
---|
| 290 | + BSSCFG_TYPE_AIBSS = 9 |
---|
203 | 291 | } bsscfg_type_t; |
---|
204 | 292 | |
---|
205 | 293 | /* bsscfg subtype */ |
---|
206 | | -enum { |
---|
207 | | - BSSCFG_GENERIC_STA = 1, /* GENERIC */ |
---|
208 | | - BSSCFG_GENERIC_AP = 2, /* GENERIC */ |
---|
209 | | - BSSCFG_P2P_GC = 3, /* P2P */ |
---|
210 | | - BSSCFG_P2P_GO = 4, /* P2P */ |
---|
211 | | - BSSCFG_P2P_DISC = 5, /* P2P */ |
---|
212 | | -}; |
---|
| 294 | +typedef enum bsscfg_subtype { |
---|
| 295 | + BSSCFG_SUBTYPE_NONE = 0, |
---|
| 296 | + BSSCFG_GENERIC_STA = 1, /* GENERIC */ |
---|
| 297 | + BSSCFG_GENERIC_AP = 2, |
---|
| 298 | + BSSCFG_GENERIC_IBSS = 6, |
---|
| 299 | + BSSCFG_P2P_GC = 3, /* P2P */ |
---|
| 300 | + BSSCFG_P2P_GO = 4, |
---|
| 301 | + BSSCFG_P2P_DISC = 5, |
---|
| 302 | + /* Index 7 & 8 earlier used for BTAMP */ |
---|
| 303 | + BSSCFG_SUBTYPE_AWDL = 9, /* SLOTTED_BSS_TYPE */ |
---|
| 304 | + BSSCFG_SUBTYPE_NAN_MGMT = 10, |
---|
| 305 | + BSSCFG_SUBTYPE_NAN_DATA = 11, |
---|
| 306 | + BSSCFG_SUBTYPE_NAN_MGMT_DATA = 12 |
---|
| 307 | +} bsscfg_subtype_t; |
---|
213 | 308 | |
---|
214 | 309 | typedef struct wlc_bsscfg_info { |
---|
215 | 310 | uint32 type; |
---|
216 | 311 | uint32 subtype; |
---|
217 | 312 | } wlc_bsscfg_info_t; |
---|
218 | 313 | |
---|
219 | | - |
---|
| 314 | +/* ULP SHM Offsets info */ |
---|
| 315 | +typedef struct ulp_shm_info { |
---|
| 316 | + uint32 m_ulp_ctrl_sdio; |
---|
| 317 | + uint32 m_ulp_wakeevt_ind; |
---|
| 318 | + uint32 m_ulp_wakeind; |
---|
| 319 | +} ulp_shm_info_t; |
---|
220 | 320 | |
---|
221 | 321 | /* Legacy structure to help keep backward compatible wl tool and tray app */ |
---|
222 | 322 | |
---|
.. | .. |
---|
232 | 332 | uint16 capability; /**< Capability information */ |
---|
233 | 333 | uint8 SSID_len; |
---|
234 | 334 | uint8 SSID[32]; |
---|
| 335 | + uint8 PAD; |
---|
235 | 336 | struct { |
---|
236 | | - uint count; /**< # rates in this set */ |
---|
| 337 | + uint32 count; /**< # rates in this set */ |
---|
237 | 338 | uint8 rates[16]; /**< rates in 500kbps units w/hi bit set if basic */ |
---|
238 | 339 | } rateset; /**< supported rates */ |
---|
239 | 340 | uint8 channel; /**< Channel no. */ |
---|
| 341 | + uint8 PAD; |
---|
240 | 342 | uint16 atim_window; /**< units are Kusec */ |
---|
241 | 343 | uint8 dtim_period; /**< DTIM period */ |
---|
| 344 | + uint8 PAD; |
---|
242 | 345 | int16 RSSI; /**< receive signal strength (in dBm) */ |
---|
243 | 346 | int8 phy_noise; /**< noise (in dBm) */ |
---|
| 347 | + uint8 PAD[3]; |
---|
244 | 348 | uint32 ie_length; /**< byte length of Information Elements */ |
---|
245 | 349 | /* variable length Information Elements */ |
---|
246 | 350 | } wl_bss_info_107_t; |
---|
.. | .. |
---|
251 | 355 | |
---|
252 | 356 | #define LEGACY2_WL_BSS_INFO_VERSION 108 /**< old version of wl_bss_info struct */ |
---|
253 | 357 | |
---|
254 | | -/* BSS info structure |
---|
| 358 | +/** |
---|
| 359 | + * BSS info structure |
---|
255 | 360 | * Applications MUST CHECK ie_offset field and length field to access IEs and |
---|
256 | 361 | * next bss_info structure in a vector (in wl_scan_results_t) |
---|
257 | 362 | */ |
---|
.. | .. |
---|
265 | 370 | uint16 capability; /**< Capability information */ |
---|
266 | 371 | uint8 SSID_len; |
---|
267 | 372 | uint8 SSID[32]; |
---|
| 373 | + uint8 PAD[1]; |
---|
268 | 374 | struct { |
---|
269 | | - uint count; /**< # rates in this set */ |
---|
| 375 | + uint32 count; /**< # rates in this set */ |
---|
270 | 376 | uint8 rates[16]; /**< rates in 500kbps units w/hi bit set if basic */ |
---|
271 | 377 | } rateset; /**< supported rates */ |
---|
272 | 378 | chanspec_t chanspec; /**< chanspec for bss */ |
---|
273 | 379 | uint16 atim_window; /**< units are Kusec */ |
---|
274 | 380 | uint8 dtim_period; /**< DTIM period */ |
---|
| 381 | + uint8 PAD; |
---|
275 | 382 | int16 RSSI; /**< receive signal strength (in dBm) */ |
---|
276 | 383 | int8 phy_noise; /**< noise (in dBm) */ |
---|
277 | 384 | |
---|
278 | 385 | uint8 n_cap; /**< BSS is 802.11N Capable */ |
---|
| 386 | + uint8 PAD[2]; |
---|
279 | 387 | uint32 nbss_cap; /**< 802.11N BSS Capabilities (based on HT_CAP_*) */ |
---|
280 | 388 | uint8 ctl_ch; /**< 802.11N BSS control channel number */ |
---|
| 389 | + uint8 PAD[3]; |
---|
281 | 390 | uint32 reserved32[1]; /**< Reserved for expansion of BSS properties */ |
---|
282 | 391 | uint8 flags; /**< flags */ |
---|
283 | 392 | uint8 reserved[3]; /**< Reserved for expansion of BSS properties */ |
---|
284 | 393 | uint8 basic_mcs[MCSSET_LEN]; /**< 802.11N BSS required MCS set */ |
---|
285 | 394 | |
---|
286 | 395 | uint16 ie_offset; /**< offset at which IEs start, from beginning */ |
---|
| 396 | + uint8 PAD[2]; |
---|
287 | 397 | uint32 ie_length; /**< byte length of Information Elements */ |
---|
288 | 398 | /* Add new fields here */ |
---|
289 | 399 | /* variable length Information Elements */ |
---|
.. | .. |
---|
291 | 401 | |
---|
292 | 402 | #define WL_BSS_INFO_VERSION 109 /**< current version of wl_bss_info struct */ |
---|
293 | 403 | |
---|
294 | | -/* BSS info structure |
---|
| 404 | +/** |
---|
| 405 | + * BSS info structure |
---|
295 | 406 | * Applications MUST CHECK ie_offset field and length field to access IEs and |
---|
296 | 407 | * next bss_info structure in a vector (in wl_scan_results_t) |
---|
297 | 408 | */ |
---|
.. | .. |
---|
305 | 416 | uint16 capability; /**< Capability information */ |
---|
306 | 417 | uint8 SSID_len; |
---|
307 | 418 | uint8 SSID[32]; |
---|
| 419 | + uint8 bcnflags; /* additional flags w.r.t. beacon */ |
---|
308 | 420 | struct { |
---|
309 | | - uint count; /**< # rates in this set */ |
---|
| 421 | + uint32 count; /**< # rates in this set */ |
---|
310 | 422 | uint8 rates[16]; /**< rates in 500kbps units w/hi bit set if basic */ |
---|
311 | 423 | } rateset; /**< supported rates */ |
---|
312 | 424 | chanspec_t chanspec; /**< chanspec for bss */ |
---|
313 | 425 | uint16 atim_window; /**< units are Kusec */ |
---|
314 | 426 | uint8 dtim_period; /**< DTIM period */ |
---|
| 427 | + uint8 accessnet; /* from beacon interwork IE (if bcnflags) */ |
---|
315 | 428 | int16 RSSI; /**< receive signal strength (in dBm) */ |
---|
316 | 429 | int8 phy_noise; /**< noise (in dBm) */ |
---|
317 | | - |
---|
318 | 430 | uint8 n_cap; /**< BSS is 802.11N Capable */ |
---|
| 431 | + uint16 freespace1; /* make implicit padding explicit */ |
---|
319 | 432 | uint32 nbss_cap; /**< 802.11N+AC BSS Capabilities */ |
---|
320 | 433 | uint8 ctl_ch; /**< 802.11N BSS control channel number */ |
---|
321 | 434 | uint8 padding1[3]; /**< explicit struct alignment padding */ |
---|
.. | .. |
---|
327 | 440 | uint8 basic_mcs[MCSSET_LEN]; /**< 802.11N BSS required MCS set */ |
---|
328 | 441 | |
---|
329 | 442 | uint16 ie_offset; /**< offset at which IEs start, from beginning */ |
---|
| 443 | + uint16 freespace2; /* making implicit padding explicit */ |
---|
330 | 444 | uint32 ie_length; /**< byte length of Information Elements */ |
---|
331 | 445 | int16 SNR; /**< average SNR of during frame reception */ |
---|
332 | 446 | uint16 vht_mcsmap; /**< STA's Associated vhtmcsmap */ |
---|
333 | 447 | uint16 vht_mcsmap_prop; /**< STA's Associated prop vhtmcsmap */ |
---|
334 | 448 | uint16 vht_txmcsmap_prop; /**< prop VHT tx mcs prop */ |
---|
335 | | - /* Add new fields here */ |
---|
336 | | - /* variable length Information Elements */ |
---|
337 | | -} wl_bss_info_t; |
---|
| 449 | +} wl_bss_info_v109_t; |
---|
338 | 450 | |
---|
339 | | -#define WL_GSCAN_BSS_INFO_VERSION 1 /* current version of wl_gscan_bss_info struct */ |
---|
340 | | -#define WL_GSCAN_INFO_FIXED_FIELD_SIZE (sizeof(wl_gscan_bss_info_t) - sizeof(wl_bss_info_t)) |
---|
| 451 | +/** |
---|
| 452 | + * BSS info structure |
---|
| 453 | + * Applications MUST CHECK ie_offset field and length field to access IEs and |
---|
| 454 | + * next bss_info structure in a vector (in wl_scan_results_t) |
---|
| 455 | + */ |
---|
| 456 | +typedef struct wl_bss_info_v109_1 { |
---|
| 457 | + uint32 version; /**< version field */ |
---|
| 458 | + uint32 length; /**< byte length of data in this record, |
---|
| 459 | + * starting at version and including IEs |
---|
| 460 | + */ |
---|
| 461 | + struct ether_addr BSSID; |
---|
| 462 | + uint16 beacon_period; /**< units are Kusec */ |
---|
| 463 | + uint16 capability; /**< Capability information */ |
---|
| 464 | + uint8 SSID_len; |
---|
| 465 | + uint8 SSID[32]; |
---|
| 466 | + uint8 bcnflags; /* additional flags w.r.t. beacon */ |
---|
| 467 | + struct { |
---|
| 468 | + uint32 count; /**< # rates in this set */ |
---|
| 469 | + uint8 rates[16]; /**< rates in 500kbps units w/hi bit set if basic */ |
---|
| 470 | + } rateset; /**< supported rates */ |
---|
| 471 | + chanspec_t chanspec; /**< chanspec for bss */ |
---|
| 472 | + uint16 atim_window; /**< units are Kusec */ |
---|
| 473 | + uint8 dtim_period; /**< DTIM period */ |
---|
| 474 | + uint8 accessnet; /* from beacon interwork IE (if bcnflags) */ |
---|
| 475 | + int16 RSSI; /**< receive signal strength (in dBm) */ |
---|
| 476 | + int8 phy_noise; /**< noise (in dBm) */ |
---|
| 477 | + uint8 n_cap; /**< BSS is 802.11N Capable */ |
---|
| 478 | + uint8 he_cap; /**< BSS is he capable */ |
---|
| 479 | + uint8 freespace1; /* make implicit padding explicit */ |
---|
| 480 | + uint32 nbss_cap; /**< 802.11N+AC BSS Capabilities */ |
---|
| 481 | + uint8 ctl_ch; /**< 802.11N BSS control channel number */ |
---|
| 482 | + uint8 padding1[3]; /**< explicit struct alignment padding */ |
---|
| 483 | + uint16 vht_rxmcsmap; /**< VHT rx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */ |
---|
| 484 | + uint16 vht_txmcsmap; /**< VHT tx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */ |
---|
| 485 | + uint8 flags; /**< flags */ |
---|
| 486 | + uint8 vht_cap; /**< BSS is vht capable */ |
---|
| 487 | + uint8 reserved[2]; /**< Reserved for expansion of BSS properties */ |
---|
| 488 | + uint8 basic_mcs[MCSSET_LEN]; /**< 802.11N BSS required MCS set */ |
---|
| 489 | + |
---|
| 490 | + uint16 ie_offset; /**< offset at which IEs start, from beginning */ |
---|
| 491 | + uint16 freespace2; /* making implicit padding explicit */ |
---|
| 492 | + uint32 ie_length; /**< byte length of Information Elements */ |
---|
| 493 | + int16 SNR; /**< average SNR of during frame reception */ |
---|
| 494 | + uint16 vht_mcsmap; /**< STA's Associated vhtmcsmap */ |
---|
| 495 | + uint16 vht_mcsmap_prop; /**< STA's Associated prop vhtmcsmap */ |
---|
| 496 | + uint16 vht_txmcsmap_prop; /**< prop VHT tx mcs prop */ |
---|
| 497 | + uint32 he_mcsmap; /**< STA's Associated hemcsmap */ |
---|
| 498 | + uint32 he_rxmcsmap; /**< HE rx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */ |
---|
| 499 | + uint32 he_txmcsmap; /**< HE tx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */ |
---|
| 500 | +} wl_bss_info_v109_1_t; |
---|
| 501 | + |
---|
| 502 | +/** |
---|
| 503 | + * BSS info structure |
---|
| 504 | + * Applications MUST CHECK ie_offset field and length field to access IEs and |
---|
| 505 | + * next bss_info structure in a vector (in wl_scan_results_t) |
---|
| 506 | + */ |
---|
| 507 | +typedef struct wl_bss_info_v109_2 { |
---|
| 508 | + uint32 version; /**< version field */ |
---|
| 509 | + uint32 length; /**< byte length of data in this record, |
---|
| 510 | + * starting at version and including IEs |
---|
| 511 | + */ |
---|
| 512 | + struct ether_addr BSSID; |
---|
| 513 | + uint16 beacon_period; /**< units are Kusec */ |
---|
| 514 | + uint16 capability; /**< Capability information */ |
---|
| 515 | + uint8 SSID_len; |
---|
| 516 | + uint8 SSID[32]; |
---|
| 517 | + uint8 bcnflags; /* additional flags w.r.t. beacon */ |
---|
| 518 | + struct { |
---|
| 519 | + uint32 count; /**< # rates in this set */ |
---|
| 520 | + uint8 rates[16]; /**< rates in 500kbps units w/hi bit set if basic */ |
---|
| 521 | + } rateset; /**< supported rates */ |
---|
| 522 | + chanspec_t chanspec; /**< chanspec for bss */ |
---|
| 523 | + uint16 atim_window; /**< units are Kusec */ |
---|
| 524 | + uint8 dtim_period; /**< DTIM period */ |
---|
| 525 | + uint8 accessnet; /* from beacon interwork IE (if bcnflags) */ |
---|
| 526 | + int16 RSSI; /**< receive signal strength (in dBm) */ |
---|
| 527 | + int8 phy_noise; /**< noise (in dBm) */ |
---|
| 528 | + uint8 n_cap; /**< BSS is 802.11N Capable */ |
---|
| 529 | + uint8 he_cap; /**< BSS is he capable */ |
---|
| 530 | + uint8 freespace1; /* make implicit padding explicit */ |
---|
| 531 | + uint32 nbss_cap; /**< 802.11N+AC BSS Capabilities */ |
---|
| 532 | + uint8 ctl_ch; /**< 802.11N BSS control channel number */ |
---|
| 533 | + uint8 padding1[3]; /**< explicit struct alignment padding */ |
---|
| 534 | + uint16 vht_rxmcsmap; /**< VHT rx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */ |
---|
| 535 | + uint16 vht_txmcsmap; /**< VHT tx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */ |
---|
| 536 | + uint8 flags; /**< flags */ |
---|
| 537 | + uint8 vht_cap; /**< BSS is vht capable */ |
---|
| 538 | + uint8 reserved[2]; /**< Reserved for expansion of BSS properties */ |
---|
| 539 | + uint8 basic_mcs[MCSSET_LEN]; /**< 802.11N BSS required MCS set */ |
---|
| 540 | + |
---|
| 541 | + uint16 ie_offset; /**< offset at which IEs start, from beginning */ |
---|
| 542 | + uint16 freespace2; /* making implicit padding explicit */ |
---|
| 543 | + uint32 ie_length; /**< byte length of Information Elements */ |
---|
| 544 | + int16 SNR; /**< average SNR of during frame reception */ |
---|
| 545 | + uint16 vht_mcsmap; /**< STA's Associated vhtmcsmap */ |
---|
| 546 | + uint16 vht_mcsmap_prop; /**< STA's Associated prop vhtmcsmap */ |
---|
| 547 | + uint16 vht_txmcsmap_prop; /**< prop VHT tx mcs prop */ |
---|
| 548 | + uint32 he_mcsmap; /**< STA's Associated hemcsmap */ |
---|
| 549 | + uint32 he_rxmcsmap; /**< HE rx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */ |
---|
| 550 | + uint32 he_txmcsmap; /**< HE tx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */ |
---|
| 551 | + uint32 timestamp[2]; /* Beacon Timestamp for FAKEAP req */ |
---|
| 552 | +} wl_bss_info_v109_2_t; |
---|
| 553 | + |
---|
| 554 | +#ifndef WL_BSS_INFO_TYPEDEF_HAS_ALIAS |
---|
| 555 | +typedef wl_bss_info_v109_t wl_bss_info_t; |
---|
| 556 | +#endif // endif |
---|
| 557 | + |
---|
| 558 | +#define WL_GSCAN_FULL_RESULT_VERSION 2 /* current version of wl_gscan_result_t struct */ |
---|
341 | 559 | |
---|
342 | 560 | typedef struct wl_gscan_bss_info { |
---|
343 | 561 | uint32 timestamp[2]; |
---|
344 | | - wl_bss_info_t info; |
---|
| 562 | + wl_bss_info_v109_t info; |
---|
345 | 563 | /* Do not add any more members below, fixed */ |
---|
346 | 564 | /* and variable length Information Elements to follow */ |
---|
347 | | -} wl_gscan_bss_info_t; |
---|
| 565 | +} wl_gscan_bss_info_v2_t; |
---|
348 | 566 | |
---|
| 567 | +typedef struct wl_gscan_bss_info_v3 { |
---|
| 568 | + uint32 timestamp[2]; |
---|
| 569 | + uint8 info[]; /* var length wl_bss_info_X structures */ |
---|
| 570 | + /* Do not add any more members below, fixed */ |
---|
| 571 | + /* and variable length Information Elements to follow */ |
---|
| 572 | +} wl_gscan_bss_info_v3_t; |
---|
| 573 | + |
---|
| 574 | +#ifndef WL_BSS_INFO_TYPEDEF_HAS_ALIAS |
---|
| 575 | +typedef wl_gscan_bss_info_v2_t wl_gscan_bss_info_t; |
---|
| 576 | +#define WL_GSCAN_INFO_FIXED_FIELD_SIZE (sizeof(wl_gscan_bss_info_t) - sizeof(wl_bss_info_t)) |
---|
| 577 | +#endif // endif |
---|
349 | 578 | |
---|
350 | 579 | typedef struct wl_bsscfg { |
---|
351 | 580 | uint32 bsscfg_idx; |
---|
.. | .. |
---|
367 | 596 | uint32 if_flags; |
---|
368 | 597 | uint32 ap; |
---|
369 | 598 | struct ether_addr mac_addr; |
---|
| 599 | + uint16 PAD; |
---|
370 | 600 | uint32 wlc_index; |
---|
371 | 601 | } wl_if_add_t; |
---|
372 | 602 | |
---|
.. | .. |
---|
376 | 606 | uint32 chanspec; |
---|
377 | 607 | } wl_bss_config_t; |
---|
378 | 608 | |
---|
| 609 | +#define INVALID_HE_OMI_ARG 255 |
---|
| 610 | + |
---|
| 611 | +#define WL_HE_OMI_V1 1 |
---|
| 612 | +typedef struct wl_he_omi_v1 { |
---|
| 613 | + uint8 version; |
---|
| 614 | + uint8 length; |
---|
| 615 | + uint8 rx_nss; |
---|
| 616 | + uint8 chnl_wdth; |
---|
| 617 | + uint8 ul_mu_dis; |
---|
| 618 | + uint8 tx_nsts; |
---|
| 619 | + uint8 er_su_dis; |
---|
| 620 | + uint8 dl_mu_resound; |
---|
| 621 | + uint8 ul_mu_data_dis; |
---|
| 622 | +} wl_he_omi_v1_t; |
---|
| 623 | + |
---|
| 624 | +#ifndef HE_OMI_VER_ENABLED |
---|
| 625 | +#define WL_HE_OMI_VER (WL_HE_OMI_V1) |
---|
| 626 | +typedef wl_he_omi_v1_t wl_he_omi_t; |
---|
| 627 | +#endif // endif |
---|
| 628 | + |
---|
| 629 | +/* HE PPE Thresholds field description (variable length) support */ |
---|
| 630 | +typedef struct wl_he_ppe_ths_params { |
---|
| 631 | + uint8 ppe_ths_len; /* data length (starting after this field) */ |
---|
| 632 | + uint8 ppe_ths_field[1]; /* field data with variable length */ |
---|
| 633 | +} wl_he_ppe_ths_params_t; |
---|
| 634 | + |
---|
| 635 | +/* MU EDCA override support for testbed STA configuration */ |
---|
| 636 | +struct he_muedca_params { |
---|
| 637 | + bool override_enabled; |
---|
| 638 | + uint8 muedca_upd_cnt; |
---|
| 639 | + he_mu_ac_param_record_t param_ac[AC_COUNT]; |
---|
| 640 | +}; |
---|
| 641 | + |
---|
| 642 | +typedef struct he_muedca_params he_muedca_params_t; |
---|
| 643 | + |
---|
| 644 | +/* MUEDCA Timer range */ |
---|
| 645 | +#define HE_MUEDCA_TIMER_MIN 1u |
---|
| 646 | +#define HE_MUEDCA_TIMER_MAX 255u |
---|
| 647 | + |
---|
| 648 | +/* AIFSN=0 indicates that EDCA is disabled for the duration |
---|
| 649 | + * specified by the MUEDCATimer for the corresponding AC |
---|
| 650 | + */ |
---|
| 651 | +#define HE_MUEDCA_AIFSN_MIN 0 |
---|
| 652 | + |
---|
| 653 | +/* HE OFDMA TX DEMO support */ |
---|
| 654 | +typedef struct he_ofdmatx_demo_params { |
---|
| 655 | + bool demo_mode_enabled; |
---|
| 656 | + uint32 twt_wake_dur; /* target wake duration in unit of microseconds */ |
---|
| 657 | + uint32 twt_wake_int; /* target wake interval in unit of microseconds */ |
---|
| 658 | +} he_ofdmatx_demo_params_t; |
---|
| 659 | + |
---|
| 660 | +/* Number of Bsscolor supported per core */ |
---|
| 661 | +#ifndef HE_MAX_BSSCOLOR_RES |
---|
| 662 | +#define HE_MAX_BSSCOLOR_RES 2 |
---|
| 663 | +#endif // endif |
---|
| 664 | + |
---|
| 665 | +#ifndef HE_MAX_STAID_PER_BSSCOLOR |
---|
| 666 | +#define HE_MAX_STAID_PER_BSSCOLOR 4 |
---|
| 667 | +#endif // endif |
---|
| 668 | + |
---|
| 669 | +/* BSSColor indices */ |
---|
| 670 | +#define BSSCOLOR0_IDX 0 |
---|
| 671 | +#define BSSCOLOR1_IDX 1 |
---|
| 672 | +#define HE_BSSCOLOR0 0 |
---|
| 673 | +#define HE_BSSCOLOR_MAX_VAL 63 |
---|
| 674 | + |
---|
| 675 | +/* STAID indices */ |
---|
| 676 | +#define STAID0_IDX 0 |
---|
| 677 | +#define STAID1_IDX 1 |
---|
| 678 | +#define STAID2_IDX 2 |
---|
| 679 | +#define STAID3_IDX 3 |
---|
| 680 | +#define HE_STAID_MAX_VAL 0x07FF |
---|
| 681 | + |
---|
| 682 | +typedef struct wl_bsscolor_info { |
---|
| 683 | + uint16 version; /**< structure version */ |
---|
| 684 | + uint16 length; /**< length of the bsscolor info */ |
---|
| 685 | + uint8 bsscolor_index; /**< bsscolor index 0-1 */ |
---|
| 686 | + uint8 bsscolor; /**<bsscolor value from 0 to 63 */ |
---|
| 687 | + uint8 partial_bsscolor_ind; |
---|
| 688 | + uint8 disable_bsscolor_ind; /**< To disable particular bsscolor */ |
---|
| 689 | + uint16 staid_info[HE_MAX_STAID_PER_BSSCOLOR]; /**< 0-3 staid info of each bsscolor */ |
---|
| 690 | +} wl_bsscolor_info_t; |
---|
| 691 | + |
---|
379 | 692 | #define WL_BSS_USER_RADAR_CHAN_SELECT 0x1 /**< User application will randomly select |
---|
380 | 693 | * radar channel. |
---|
381 | 694 | */ |
---|
382 | 695 | |
---|
383 | | -#define DLOAD_HANDLER_VER 1 /**< Downloader version */ |
---|
| 696 | +#define DLOAD_HANDLER_VER 1 /**< Downloader version */ |
---|
384 | 697 | #define DLOAD_FLAG_VER_MASK 0xf000 /**< Downloader version mask */ |
---|
385 | | -#define DLOAD_FLAG_VER_SHIFT 12 /**< Downloader version shift */ |
---|
| 698 | +#define DLOAD_FLAG_VER_SHIFT 12 /**< Downloader version shift */ |
---|
386 | 699 | |
---|
387 | 700 | #define DL_CRC_NOT_INUSE 0x0001 |
---|
388 | 701 | #define DL_BEGIN 0x0002 |
---|
389 | 702 | #define DL_END 0x0004 |
---|
390 | 703 | |
---|
391 | | -/* Flags for Major number shift and mask */ |
---|
392 | | -#define EPI_MAJOR_NUM_SHIFT 16 |
---|
393 | | -#define EPI_MAJOR_NUM_MASK 0xFFFF |
---|
394 | | - |
---|
395 | | -/* generic download types & flags */ |
---|
| 704 | +/* Flags for Major/Minor/Date number shift and mask */ |
---|
| 705 | +#define EPI_VER_SHIFT 16 |
---|
| 706 | +#define EPI_VER_MASK 0xFFFF |
---|
| 707 | +/** generic download types & flags */ |
---|
396 | 708 | enum { |
---|
397 | 709 | DL_TYPE_UCODE = 1, |
---|
398 | 710 | DL_TYPE_CLM = 2 |
---|
399 | 711 | }; |
---|
400 | 712 | |
---|
401 | | -/* ucode type values */ |
---|
| 713 | +/** ucode type values */ |
---|
402 | 714 | enum { |
---|
403 | 715 | UCODE_FW, |
---|
404 | 716 | INIT_VALS, |
---|
.. | .. |
---|
435 | 747 | |
---|
436 | 748 | typedef struct wlc_ssid { |
---|
437 | 749 | uint32 SSID_len; |
---|
438 | | - uchar SSID[DOT11_MAX_SSID_LEN]; |
---|
| 750 | + uint8 SSID[DOT11_MAX_SSID_LEN]; |
---|
439 | 751 | } wlc_ssid_t; |
---|
440 | 752 | |
---|
441 | 753 | typedef struct wlc_ssid_ext { |
---|
442 | | - bool hidden; |
---|
| 754 | + uint8 hidden; |
---|
| 755 | + uint8 PAD; |
---|
443 | 756 | uint16 flags; |
---|
444 | | - uint8 SSID_len; |
---|
445 | | - int8 rssi_thresh; |
---|
446 | | - uchar SSID[DOT11_MAX_SSID_LEN]; |
---|
| 757 | + uint8 SSID_len; |
---|
| 758 | + int8 rssi_thresh; |
---|
| 759 | + uint8 SSID[DOT11_MAX_SSID_LEN]; |
---|
447 | 760 | } wlc_ssid_ext_t; |
---|
448 | | - |
---|
449 | 761 | |
---|
450 | 762 | #define MAX_PREFERRED_AP_NUM 5 |
---|
451 | 763 | typedef struct wlc_fastssidinfo { |
---|
452 | | - uint32 SSID_channel[MAX_PREFERRED_AP_NUM]; |
---|
| 764 | + uint32 SSID_channel[MAX_PREFERRED_AP_NUM]; |
---|
453 | 765 | wlc_ssid_t SSID_info[MAX_PREFERRED_AP_NUM]; |
---|
454 | 766 | } wlc_fastssidinfo_t; |
---|
455 | 767 | |
---|
456 | | -#ifdef CUSTOMER_HW_31_1 |
---|
457 | | - |
---|
458 | | -#define AP_NORM 0 |
---|
459 | | -#define AP_STEALTH 1 |
---|
460 | | -#define STREET_PASS_AP 2 |
---|
461 | | - |
---|
462 | | -#define NSC_MAX_TGT_SSID 20 |
---|
463 | | -typedef struct nsc_ssid_entry_list { |
---|
464 | | - wlc_ssid_t ssid_info; |
---|
465 | | - int ssid_type; |
---|
466 | | -} nsc_ssid_entry_list_t; |
---|
467 | | - |
---|
468 | | -typedef struct nsc_ssid_list { |
---|
469 | | - uint32 num_entries; /* N wants 150 */ |
---|
470 | | - nsc_ssid_entry_list_t ssid_entry[1]; |
---|
471 | | -} nsc_ssid_list_t; |
---|
472 | | - |
---|
473 | | -#define NSC_TGT_SSID_BUFSZ (sizeof(nsc_ssid_entry_list_t) * \ |
---|
474 | | - (NSC_MAX_TGT_SSID - 1) + sizeof(nsc_ssid_list_t)) |
---|
475 | | - |
---|
476 | | -/* Default values from N */ |
---|
477 | | -#define NSC_SCPATT_ARRSZ 32 |
---|
478 | | - |
---|
479 | | -/* scan types */ |
---|
480 | | -#define UNI_SCAN 0 |
---|
481 | | -#define SP_SCAN_ACTIVE 1 |
---|
482 | | -#define SP_SCAN_PASSIVE 2 |
---|
483 | | -#define DOZE 3 |
---|
484 | | - |
---|
485 | | -/* what we found */ |
---|
486 | | -typedef struct nsc_scan_results { |
---|
487 | | - wlc_ssid_t ssid; |
---|
488 | | - struct ether_addr mac; |
---|
489 | | - int scantype; |
---|
490 | | - uint16 channel; |
---|
491 | | -} nsc_scan_results_t; |
---|
492 | | - |
---|
493 | | -typedef BWL_PRE_PACKED_STRUCT struct nsc_af_body { |
---|
494 | | - uint8 type; /* should be 0x7f */ |
---|
495 | | - uint8 oui[DOT11_OUI_LEN]; /* just like it says */ |
---|
496 | | - uint8 subtype; |
---|
497 | | - uint8 ielen; /* */ |
---|
498 | | - uint8 data[1]; /* variable */ |
---|
499 | | -} BWL_POST_PACKED_STRUCT nsc_af_body_t; |
---|
500 | | - |
---|
501 | | -typedef BWL_PRE_PACKED_STRUCT struct nsc_sdlist { |
---|
502 | | - uint8 scantype; |
---|
503 | | - uint16 duration; |
---|
504 | | - uint16 channel; /* SP only */ |
---|
505 | | - uint8 ssid_index; /* SP only */ |
---|
506 | | - uint16 rate; /* SP only */ |
---|
507 | | -} BWL_POST_PACKED_STRUCT nsc_sdlist_t; |
---|
508 | | - |
---|
509 | | -typedef struct nsc_scandes { |
---|
510 | | - uint32 num_entries; /* number of list entries */ |
---|
511 | | - nsc_sdlist_t sdlist[1]; /* variable */ |
---|
512 | | -} nsc_scandes_t; |
---|
513 | | - |
---|
514 | | -#define NSC_SUBTYPES_MAX 8 |
---|
515 | | -#define NSC_SUBTYPES_EOL 0xff |
---|
516 | | - |
---|
517 | | -#define NSC_MAX_SDLIST_ENTRIES 8 |
---|
518 | | -#define NSC_SDDESC_BUFSZ (sizeof(nsc_sdlist_t) * \ |
---|
519 | | - (NSC_MAX_SDLIST_ENTRIES - 1) + sizeof(nsc_scandes_t)) |
---|
520 | | - |
---|
521 | | -#define SCAN_ARR_END (0xFF) |
---|
522 | | - |
---|
523 | | -/* action frame endless loop value */ |
---|
524 | | -#define NSC_AFSEND_FOREVER (~0) |
---|
525 | | - |
---|
526 | | -#endif /* CUSTOMER_HW_31_1 */ |
---|
527 | | - |
---|
528 | | -typedef BWL_PRE_PACKED_STRUCT struct wnm_url { |
---|
| 768 | +typedef struct wnm_url { |
---|
529 | 769 | uint8 len; |
---|
530 | 770 | uint8 data[1]; |
---|
531 | | -} BWL_POST_PACKED_STRUCT wnm_url_t; |
---|
532 | | - |
---|
533 | | -#define WNM_BSS_SELECT_TYPE_RSSI 0 |
---|
534 | | -#define WNM_BSS_SELECT_TYPE_CU 1 |
---|
535 | | - |
---|
536 | | -#define WNM_BSSLOAD_MONITOR_VERSION 1 |
---|
537 | | -typedef struct wnm_bssload_monitor_cfg { |
---|
538 | | - uint8 version; |
---|
539 | | - uint8 band; |
---|
540 | | - uint8 duration; /* duration between 1 to 20sec */ |
---|
541 | | -} wnm_bssload_monitor_cfg_t; |
---|
542 | | - |
---|
543 | | -#define BSS_MAXTABLE_SIZE 10 |
---|
544 | | -#define WNM_BSS_SELECT_FACTOR_VERSION 1 |
---|
545 | | -typedef struct wnm_bss_select_factor_params { |
---|
546 | | - uint8 low; |
---|
547 | | - uint8 high; |
---|
548 | | - uint8 factor; |
---|
549 | | - uint8 pad; |
---|
550 | | -} wnm_bss_select_factor_params_t; |
---|
551 | | - |
---|
552 | | -typedef struct wnm_bss_select_factor_cfg { |
---|
553 | | - uint8 version; |
---|
554 | | - uint8 band; |
---|
555 | | - uint16 type; |
---|
556 | | - uint16 pad; |
---|
557 | | - uint16 count; |
---|
558 | | - wnm_bss_select_factor_params_t params[1]; |
---|
559 | | -} wnm_bss_select_factor_cfg_t; |
---|
560 | | - |
---|
561 | | -#define WNM_BSS_SELECT_WEIGHT_VERSION 1 |
---|
562 | | -typedef struct wnm_bss_select_weight_cfg { |
---|
563 | | - uint8 version; |
---|
564 | | - uint8 band; |
---|
565 | | - uint16 type; |
---|
566 | | - uint16 weight; /* weightage for each type between 0 to 100 */ |
---|
567 | | -} wnm_bss_select_weight_cfg_t; |
---|
568 | | - |
---|
569 | | -#define WNM_ROAM_TRIGGER_VERSION 1 |
---|
570 | | -typedef struct wnm_roam_trigger_cfg { |
---|
571 | | - uint8 version; |
---|
572 | | - uint8 band; |
---|
573 | | - uint16 type; |
---|
574 | | - int16 trigger; /* trigger for each type in new roam algorithm */ |
---|
575 | | -} wnm_roam_trigger_cfg_t; |
---|
| 771 | +} wnm_url_t; |
---|
576 | 772 | |
---|
577 | 773 | typedef struct chan_scandata { |
---|
578 | 774 | uint8 txpower; |
---|
579 | 775 | uint8 pad; |
---|
580 | | - chanspec_t channel; /**< Channel num, bw, ctrl_sb and band */ |
---|
| 776 | + chanspec_t channel; /**< Channel num, bw, ctrl_sb and band */ |
---|
581 | 777 | uint32 channel_mintime; |
---|
582 | 778 | uint32 channel_maxtime; |
---|
583 | 779 | } chan_scandata_t; |
---|
.. | .. |
---|
595 | 791 | int8 split_scan; /**< split scan */ |
---|
596 | 792 | int8 band; /**< band */ |
---|
597 | 793 | int8 pad; |
---|
598 | | - wlc_ssid_t ssid[WLC_EXTDSCAN_MAX_SSID]; /* ssid list */ |
---|
| 794 | + wlc_ssid_t ssid[WLC_EXTDSCAN_MAX_SSID]; /**< ssid list */ |
---|
599 | 795 | uint32 tx_rate; /**< in 500ksec units */ |
---|
600 | 796 | wl_scan_type_t scan_type; /**< enum */ |
---|
601 | 797 | int32 channel_num; |
---|
.. | .. |
---|
640 | 836 | uint16 channel_list[1]; /**< list of chanspecs */ |
---|
641 | 837 | } wl_scan_params_t; |
---|
642 | 838 | |
---|
643 | | -/* size of wl_scan_params not including variable length array */ |
---|
| 839 | +/* changes in wl_scan_params_v2 as comapred to wl_scan_params (v1) |
---|
| 840 | + * * unit8 scantype to uint32 |
---|
| 841 | + */ |
---|
| 842 | +typedef struct wl_scan_params_v2 { |
---|
| 843 | + uint16 version; /* Version of wl_scan_params, change value of |
---|
| 844 | + * WL_SCAN_PARAM_VERSION on version update |
---|
| 845 | + */ |
---|
| 846 | + uint16 length; /* length of structure wl_scan_params_v1_t |
---|
| 847 | + * without implicit pad |
---|
| 848 | + */ |
---|
| 849 | + wlc_ssid_t ssid; /**< default: {0, ""} */ |
---|
| 850 | + struct ether_addr bssid; /**< default: bcast */ |
---|
| 851 | + int8 bss_type; /**< default: any, |
---|
| 852 | + * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT |
---|
| 853 | + */ |
---|
| 854 | + uint8 PAD; |
---|
| 855 | + uint32 scan_type; /**< flags, 0 use default, and flags specified in |
---|
| 856 | + * WL_SCANFLAGS_XXX |
---|
| 857 | + */ |
---|
| 858 | + int32 nprobes; /**< -1 use default, number of probes per channel */ |
---|
| 859 | + int32 active_time; /**< -1 use default, dwell time per channel for |
---|
| 860 | + * active scanning |
---|
| 861 | + */ |
---|
| 862 | + int32 passive_time; /**< -1 use default, dwell time per channel |
---|
| 863 | + * for passive scanning |
---|
| 864 | + */ |
---|
| 865 | + int32 home_time; /**< -1 use default, dwell time for the home channel |
---|
| 866 | + * between channel scans |
---|
| 867 | + */ |
---|
| 868 | + int32 channel_num; /**< count of channels and ssids that follow |
---|
| 869 | + * |
---|
| 870 | + * low half is count of channels in channel_list, 0 |
---|
| 871 | + * means default (use all available channels) |
---|
| 872 | + * |
---|
| 873 | + * high half is entries in wlc_ssid_t array that |
---|
| 874 | + * follows channel_list, aligned for int32 (4 bytes) |
---|
| 875 | + * meaning an odd channel count implies a 2-byte pad |
---|
| 876 | + * between end of channel_list and first ssid |
---|
| 877 | + * |
---|
| 878 | + * if ssid count is zero, single ssid in the fixed |
---|
| 879 | + * parameter portion is assumed, otherwise ssid in |
---|
| 880 | + * the fixed portion is ignored |
---|
| 881 | + */ |
---|
| 882 | + uint16 channel_list[1]; /**< list of chanspecs */ |
---|
| 883 | +} wl_scan_params_v2_t; |
---|
| 884 | + |
---|
| 885 | +#define WL_SCAN_PARAMS_VERSION_V2 2 |
---|
| 886 | + |
---|
| 887 | +/** size of wl_scan_params not including variable length array */ |
---|
644 | 888 | #define WL_SCAN_PARAMS_FIXED_SIZE 64 |
---|
645 | 889 | #define WL_MAX_ROAMSCAN_DATSZ (WL_SCAN_PARAMS_FIXED_SIZE + (WL_NUMCHANNELS * sizeof(uint16))) |
---|
| 890 | +#define WL_SCAN_PARAMS_V2_FIXED_SIZE (OFFSETOF(wl_scan_params_v2_t, channel_list)) |
---|
| 891 | +#define WL_MAX_ROAMSCAN_V2_DATSZ \ |
---|
| 892 | + (WL_SCAN_PARAMS_V2_FIXED_SIZE + (WL_NUMCHANNELS * sizeof(uint16))) |
---|
646 | 893 | |
---|
647 | 894 | #define ISCAN_REQ_VERSION 1 |
---|
648 | 895 | |
---|
649 | | -/* incremental scan struct */ |
---|
| 896 | +/** incremental scan struct */ |
---|
650 | 897 | typedef struct wl_iscan_params { |
---|
651 | 898 | uint32 version; |
---|
652 | 899 | uint16 action; |
---|
.. | .. |
---|
654 | 901 | wl_scan_params_t params; |
---|
655 | 902 | } wl_iscan_params_t; |
---|
656 | 903 | |
---|
657 | | -/* 3 fields + size of wl_scan_params, not including variable length array */ |
---|
| 904 | +/** 3 fields + size of wl_scan_params, not including variable length array */ |
---|
658 | 905 | #define WL_ISCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_iscan_params_t, params) + sizeof(wlc_ssid_t)) |
---|
659 | 906 | |
---|
660 | 907 | typedef struct wl_scan_results { |
---|
661 | 908 | uint32 buflen; |
---|
662 | 909 | uint32 version; |
---|
663 | 910 | uint32 count; |
---|
664 | | - wl_bss_info_t bss_info[1]; |
---|
665 | | -} wl_scan_results_t; |
---|
| 911 | + wl_bss_info_v109_t bss_info[1]; |
---|
| 912 | +} wl_scan_results_v109_t; |
---|
666 | 913 | |
---|
667 | | -/* size of wl_scan_results not including variable length array */ |
---|
| 914 | +typedef struct wl_scan_results_v2 { |
---|
| 915 | + uint32 buflen; |
---|
| 916 | + uint32 version; |
---|
| 917 | + uint32 count; |
---|
| 918 | + uint8 bss_info[]; /* var length wl_bss_info_X structures */ |
---|
| 919 | +} wl_scan_results_v2_t; |
---|
| 920 | + |
---|
| 921 | +#ifndef WL_BSS_INFO_TYPEDEF_HAS_ALIAS |
---|
| 922 | +typedef wl_scan_results_v109_t wl_scan_results_t; |
---|
| 923 | +/** size of wl_scan_results not including variable length array */ |
---|
668 | 924 | #define WL_SCAN_RESULTS_FIXED_SIZE (sizeof(wl_scan_results_t) - sizeof(wl_bss_info_t)) |
---|
| 925 | +#endif // endif |
---|
669 | 926 | |
---|
670 | | - |
---|
| 927 | +#if defined(SIMPLE_ISCAN) |
---|
| 928 | +/** the buf lengh can be WLC_IOCTL_MAXLEN (8K) to reduce iteration */ |
---|
| 929 | +#define WLC_IW_ISCAN_MAXLEN 2048 |
---|
| 930 | +typedef struct iscan_buf { |
---|
| 931 | + struct iscan_buf * next; |
---|
| 932 | + int8 iscan_buf[WLC_IW_ISCAN_MAXLEN]; |
---|
| 933 | +} iscan_buf_t; |
---|
| 934 | +#endif /* SIMPLE_ISCAN */ |
---|
671 | 935 | #define ESCAN_REQ_VERSION 1 |
---|
| 936 | +#define ESCAN_REQ_VERSION_V2 2 |
---|
672 | 937 | |
---|
673 | 938 | /** event scan reduces amount of SOC memory needed to store scan results */ |
---|
674 | 939 | typedef struct wl_escan_params { |
---|
.. | .. |
---|
678 | 943 | wl_scan_params_t params; |
---|
679 | 944 | } wl_escan_params_t; |
---|
680 | 945 | |
---|
| 946 | +typedef struct wl_escan_params_v2 { |
---|
| 947 | + uint32 version; |
---|
| 948 | + uint16 action; |
---|
| 949 | + uint16 sync_id; |
---|
| 950 | + wl_scan_params_v2_t params; |
---|
| 951 | +} wl_escan_params_v2_t; |
---|
| 952 | + |
---|
681 | 953 | #define WL_ESCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_escan_params_t, params) + sizeof(wlc_ssid_t)) |
---|
| 954 | +#define WL_ESCAN_PARAMS_V2_FIXED_SIZE (OFFSETOF(wl_escan_params_v2_t, params) + sizeof(wlc_ssid_t)) |
---|
682 | 955 | |
---|
683 | 956 | /** event scan reduces amount of SOC memory needed to store scan results */ |
---|
684 | 957 | typedef struct wl_escan_result { |
---|
.. | .. |
---|
686 | 959 | uint32 version; |
---|
687 | 960 | uint16 sync_id; |
---|
688 | 961 | uint16 bss_count; |
---|
689 | | - wl_bss_info_t bss_info[1]; |
---|
690 | | -} wl_escan_result_t; |
---|
| 962 | + wl_bss_info_v109_t bss_info[1]; |
---|
| 963 | +} wl_escan_result_v109_t; |
---|
691 | 964 | |
---|
| 965 | +/** event scan reduces amount of SOC memory needed to store scan results */ |
---|
| 966 | +typedef struct wl_escan_result_v2 { |
---|
| 967 | + uint32 buflen; |
---|
| 968 | + uint32 version; |
---|
| 969 | + uint16 sync_id; |
---|
| 970 | + uint16 bss_count; |
---|
| 971 | + uint8 bss_info[]; /* var length wl_bss_info_X structures */ |
---|
| 972 | +} wl_escan_result_v2_t; |
---|
| 973 | + |
---|
| 974 | +#ifndef WL_BSS_INFO_TYPEDEF_HAS_ALIAS |
---|
| 975 | +typedef wl_escan_result_v109_t wl_escan_result_t; |
---|
692 | 976 | #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(wl_escan_result_t) - sizeof(wl_bss_info_t)) |
---|
| 977 | +#endif // endif |
---|
693 | 978 | |
---|
694 | 979 | typedef struct wl_gscan_result { |
---|
695 | 980 | uint32 buflen; |
---|
696 | 981 | uint32 version; |
---|
697 | | - wl_gscan_bss_info_t bss_info[1]; |
---|
698 | | -} wl_gscan_result_t; |
---|
| 982 | + uint32 scan_ch_bucket; |
---|
| 983 | + wl_gscan_bss_info_v2_t bss_info[1]; |
---|
| 984 | +} wl_gscan_result_v2_t; |
---|
699 | 985 | |
---|
| 986 | +typedef struct wl_gscan_result_v2_1 { |
---|
| 987 | + uint32 buflen; |
---|
| 988 | + uint32 version; |
---|
| 989 | + uint32 scan_ch_bucket; |
---|
| 990 | + uint8 bss_info[]; /* var length wl_bss_info_X structures */ |
---|
| 991 | +} wl_gscan_result_v2_1_t; |
---|
| 992 | + |
---|
| 993 | +#ifndef WL_BSS_INFO_TYPEDEF_HAS_ALIAS |
---|
| 994 | +typedef wl_gscan_result_v2_t wl_gscan_result_t; |
---|
700 | 995 | #define WL_GSCAN_RESULTS_FIXED_SIZE (sizeof(wl_gscan_result_t) - sizeof(wl_gscan_bss_info_t)) |
---|
| 996 | +#endif // endif |
---|
701 | 997 | |
---|
702 | | -/* incremental scan results struct */ |
---|
| 998 | +/** incremental scan results struct */ |
---|
703 | 999 | typedef struct wl_iscan_results { |
---|
704 | 1000 | uint32 status; |
---|
705 | | - wl_scan_results_t results; |
---|
706 | | -} wl_iscan_results_t; |
---|
| 1001 | + wl_scan_results_v109_t results; |
---|
| 1002 | +} wl_iscan_results_v109_t; |
---|
707 | 1003 | |
---|
708 | | -/* size of wl_iscan_results not including variable length array */ |
---|
| 1004 | +/** incremental scan results struct */ |
---|
| 1005 | +typedef struct wl_iscan_results_v2 { |
---|
| 1006 | + uint32 status; |
---|
| 1007 | + wl_scan_results_v2_t results; |
---|
| 1008 | +} wl_iscan_results_v2_t; |
---|
| 1009 | + |
---|
| 1010 | +#ifndef WL_BSS_INFO_TYPEDEF_HAS_ALIAS |
---|
| 1011 | +typedef wl_iscan_results_v109_t wl_iscan_results_t; |
---|
| 1012 | +/** size of wl_iscan_results not including variable length array */ |
---|
709 | 1013 | #define WL_ISCAN_RESULTS_FIXED_SIZE \ |
---|
710 | 1014 | (WL_SCAN_RESULTS_FIXED_SIZE + OFFSETOF(wl_iscan_results_t, results)) |
---|
711 | | - |
---|
712 | | -#define SCANOL_PARAMS_VERSION 1 |
---|
713 | | - |
---|
714 | | -typedef struct scanol_params { |
---|
715 | | - uint32 version; |
---|
716 | | - uint32 flags; /**< offload scanning flags */ |
---|
717 | | - int32 active_time; /**< -1 use default, dwell time per channel for active scanning */ |
---|
718 | | - int32 passive_time; /**< -1 use default, dwell time per channel for passive scanning */ |
---|
719 | | - int32 idle_rest_time; /**< -1 use default, time idle between scan cycle */ |
---|
720 | | - int32 idle_rest_time_multiplier; |
---|
721 | | - int32 active_rest_time; |
---|
722 | | - int32 active_rest_time_multiplier; |
---|
723 | | - int32 scan_cycle_idle_rest_time; |
---|
724 | | - int32 scan_cycle_idle_rest_multiplier; |
---|
725 | | - int32 scan_cycle_active_rest_time; |
---|
726 | | - int32 scan_cycle_active_rest_multiplier; |
---|
727 | | - int32 max_rest_time; |
---|
728 | | - int32 max_scan_cycles; |
---|
729 | | - int32 nprobes; /**< -1 use default, number of probes per channel */ |
---|
730 | | - int32 scan_start_delay; |
---|
731 | | - uint32 nchannels; |
---|
732 | | - uint32 ssid_count; |
---|
733 | | - wlc_ssid_t ssidlist[1]; |
---|
734 | | -} scanol_params_t; |
---|
| 1015 | +#endif // endif |
---|
735 | 1016 | |
---|
736 | 1017 | typedef struct wl_probe_params { |
---|
737 | 1018 | wlc_ssid_t ssid; |
---|
.. | .. |
---|
740 | 1021 | } wl_probe_params_t; |
---|
741 | 1022 | |
---|
742 | 1023 | #define WL_MAXRATES_IN_SET 16 /**< max # of rates in a rateset */ |
---|
| 1024 | + |
---|
743 | 1025 | typedef struct wl_rateset { |
---|
744 | | - uint32 count; /**< # rates in this set */ |
---|
| 1026 | + uint32 count; /**< # rates in this set */ |
---|
745 | 1027 | uint8 rates[WL_MAXRATES_IN_SET]; /**< rates in 500kbps units w/hi bit set if basic */ |
---|
746 | 1028 | } wl_rateset_t; |
---|
747 | 1029 | |
---|
748 | | -typedef struct wl_rateset_args { |
---|
749 | | - uint32 count; /**< # rates in this set */ |
---|
| 1030 | +#define WL_VHT_CAP_MCS_MAP_NSS_MAX 8 |
---|
| 1031 | + |
---|
| 1032 | +typedef struct wl_rateset_args_v1 { |
---|
| 1033 | + uint32 count; /**< # rates in this set */ |
---|
750 | 1034 | uint8 rates[WL_MAXRATES_IN_SET]; /**< rates in 500kbps units w/hi bit set if basic */ |
---|
751 | | - uint8 mcs[MCSSET_LEN]; /* supported mcs index bit map */ |
---|
752 | | - uint16 vht_mcs[VHT_CAP_MCS_MAP_NSS_MAX]; /* supported mcs index bit map per nss */ |
---|
753 | | -} wl_rateset_args_t; |
---|
| 1035 | + uint8 mcs[MCSSET_LEN]; /**< supported mcs index bit map */ |
---|
| 1036 | + uint16 vht_mcs[WL_VHT_CAP_MCS_MAP_NSS_MAX]; /**< supported mcs index bit map per nss */ |
---|
| 1037 | +} wl_rateset_args_v1_t; |
---|
| 1038 | + |
---|
| 1039 | +#define RATESET_ARGS_V1 (1) |
---|
| 1040 | +#define RATESET_ARGS_V2 (2) |
---|
| 1041 | + |
---|
| 1042 | +#ifndef RATESET_VERSION_ENABLED |
---|
| 1043 | +/* rateset structure before versioning. legacy. DONOT update anymore here */ |
---|
| 1044 | +#define RATESET_ARGS_VERSION (RATESET_ARGS_V1) |
---|
| 1045 | +typedef wl_rateset_args_v1_t wl_rateset_args_t; |
---|
| 1046 | +#endif /* RATESET_VERSION_ENABLED */ |
---|
| 1047 | + |
---|
| 1048 | +/* Note: dependent structures: sta_info_vX_t. When any update to this structure happens, |
---|
| 1049 | + * update sta_info_vX_t also. |
---|
| 1050 | + */ |
---|
| 1051 | +#define WL_HE_CAP_MCS_MAP_NSS_MAX 8 |
---|
| 1052 | + |
---|
| 1053 | +typedef struct wl_rateset_args_v2 { |
---|
| 1054 | + uint16 version; /**< version. */ |
---|
| 1055 | + uint16 len; /**< length */ |
---|
| 1056 | + uint32 count; /**< # rates in this set */ |
---|
| 1057 | + uint8 rates[WL_MAXRATES_IN_SET]; /**< rates in 500kbps units w/hi bit set if basic */ |
---|
| 1058 | + uint8 mcs[MCSSET_LEN]; /**< supported mcs index bit map */ |
---|
| 1059 | + uint16 vht_mcs[WL_VHT_CAP_MCS_MAP_NSS_MAX]; /**< supported mcs index bit map per nss */ |
---|
| 1060 | + uint16 he_mcs[WL_HE_CAP_MCS_MAP_NSS_MAX]; /**< supported he mcs index bit map per nss */ |
---|
| 1061 | +} wl_rateset_args_v2_t; |
---|
| 1062 | + |
---|
| 1063 | +/* HE Rates BITMAP */ |
---|
| 1064 | +#define WL_HE_CAP_MCS_0_7_MAP 0x00ff |
---|
| 1065 | +#define WL_HE_CAP_MCS_0_8_MAP 0x01ff |
---|
| 1066 | +#define WL_HE_CAP_MCS_0_9_MAP 0x03ff |
---|
| 1067 | +#define WL_HE_CAP_MCS_0_10_MAP 0x07ff |
---|
| 1068 | +#define WL_HE_CAP_MCS_0_11_MAP 0x0fff |
---|
754 | 1069 | |
---|
755 | 1070 | #define TXBF_RATE_MCS_ALL 4 |
---|
756 | 1071 | #define TXBF_RATE_VHT_ALL 4 |
---|
.. | .. |
---|
767 | 1082 | uint8 txbf_rate_ofdm_cnt_bcm; |
---|
768 | 1083 | } wl_txbf_rateset_t; |
---|
769 | 1084 | |
---|
| 1085 | +#define NUM_BFGAIN_ARRAY_1RX 2 |
---|
| 1086 | +#define NUM_BFGAIN_ARRAY_2RX 3 |
---|
| 1087 | +#define NUM_BFGAIN_ARRAY_3RX 4 |
---|
| 1088 | +#define NUM_BFGAIN_ARRAY_4RX 5 |
---|
| 1089 | + |
---|
| 1090 | +typedef struct wl_txbf_expgainset { |
---|
| 1091 | + /* bitmap for each element: B[4:0]=>c0, B[9:5]=>c1, B[14:10]=>c2, B[19:15]=>c[3-7] |
---|
| 1092 | + * B[24:20]=>c[8-9], B[29:25]=>c[10-11] |
---|
| 1093 | + */ |
---|
| 1094 | + uint32 bfgain_2x1[NUM_BFGAIN_ARRAY_1RX]; /* exp 1ss, imp 1ss */ |
---|
| 1095 | + uint32 bfgain_2x2[NUM_BFGAIN_ARRAY_2RX]; /* exp [1-2]ss, imp 1ss */ |
---|
| 1096 | + uint32 bfgain_3x1[NUM_BFGAIN_ARRAY_1RX]; |
---|
| 1097 | + uint32 bfgain_3x2[NUM_BFGAIN_ARRAY_2RX]; |
---|
| 1098 | + uint32 bfgain_3x3[NUM_BFGAIN_ARRAY_3RX]; /* exp [1-3]ss, imp 1ss */ |
---|
| 1099 | + uint32 bfgain_4x1[NUM_BFGAIN_ARRAY_1RX]; |
---|
| 1100 | + uint32 bfgain_4x2[NUM_BFGAIN_ARRAY_2RX]; |
---|
| 1101 | + uint32 bfgain_4x3[NUM_BFGAIN_ARRAY_3RX]; |
---|
| 1102 | + uint32 bfgain_4x4[NUM_BFGAIN_ARRAY_4RX]; /* exp [1-4]ss, imp 1ss */ |
---|
| 1103 | +} wl_txbf_expgainset_t; |
---|
| 1104 | + |
---|
770 | 1105 | #define OFDM_RATE_MASK 0x0000007f |
---|
771 | 1106 | typedef uint8 ofdm_rates_t; |
---|
772 | 1107 | |
---|
.. | .. |
---|
779 | 1114 | uint8 mcsallow; |
---|
780 | 1115 | uint8 bw; |
---|
781 | 1116 | uint8 txstreams; |
---|
| 1117 | + uint8 PAD[3]; |
---|
782 | 1118 | } wl_rates_info_t; |
---|
783 | 1119 | |
---|
784 | | -/* uint32 list */ |
---|
| 1120 | +/**uint32 list */ |
---|
785 | 1121 | typedef struct wl_uint32_list { |
---|
786 | | - /* in - # of elements, out - # of entries */ |
---|
| 1122 | + /** in - # of elements, out - # of entries */ |
---|
787 | 1123 | uint32 count; |
---|
788 | | - /* variable length uint32 list */ |
---|
| 1124 | + /** variable length uint32 list */ |
---|
789 | 1125 | uint32 element[1]; |
---|
790 | 1126 | } wl_uint32_list_t; |
---|
791 | 1127 | |
---|
792 | | -/* used for association with a specific BSSID and chanspec list */ |
---|
| 1128 | +/* WLC_SET_ALLOW_MODE values */ |
---|
| 1129 | +#define ALLOW_MODE_ANY_BSSID 0 |
---|
| 1130 | +#define ALLOW_MODE_ONLY_DESIRED_BSSID 1 |
---|
| 1131 | +#define ALLOW_MODE_NO_BSSID 2 |
---|
| 1132 | + |
---|
| 1133 | +/** used for association with a specific BSSID and chanspec list */ |
---|
793 | 1134 | typedef struct wl_assoc_params { |
---|
794 | 1135 | struct ether_addr bssid; /**< 00:00:00:00:00:00: broadcast scan */ |
---|
795 | 1136 | uint16 bssid_cnt; /**< 0: use chanspec_num, and the single bssid, |
---|
.. | .. |
---|
806 | 1147 | |
---|
807 | 1148 | #define WL_ASSOC_PARAMS_FIXED_SIZE OFFSETOF(wl_assoc_params_t, chanspec_list) |
---|
808 | 1149 | |
---|
809 | | -/* used for reassociation/roam to a specific BSSID and channel */ |
---|
| 1150 | +/** used for reassociation/roam to a specific BSSID and channel */ |
---|
810 | 1151 | typedef wl_assoc_params_t wl_reassoc_params_t; |
---|
811 | 1152 | #define WL_REASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE |
---|
812 | 1153 | |
---|
813 | | -/* used for association to a specific BSSID and channel */ |
---|
| 1154 | +/** used for association to a specific BSSID and channel */ |
---|
814 | 1155 | typedef wl_assoc_params_t wl_join_assoc_params_t; |
---|
815 | 1156 | #define WL_JOIN_ASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE |
---|
816 | 1157 | |
---|
817 | | -/* used for join with or without a specific bssid and channel list */ |
---|
| 1158 | +/** used for join with or without a specific bssid and channel list */ |
---|
818 | 1159 | typedef struct wl_join_params { |
---|
819 | 1160 | wlc_ssid_t ssid; |
---|
820 | 1161 | wl_assoc_params_t params; /**< optional field, but it must include the fixed portion |
---|
821 | 1162 | * of the wl_assoc_params_t struct when it does present. |
---|
822 | 1163 | */ |
---|
823 | 1164 | } wl_join_params_t; |
---|
| 1165 | + |
---|
| 1166 | +#define WL_JOIN_PARAMS_FIXED_SIZE (OFFSETOF(wl_join_params_t, params) + \ |
---|
| 1167 | + WL_ASSOC_PARAMS_FIXED_SIZE) |
---|
824 | 1168 | |
---|
825 | 1169 | typedef struct wlc_roam_exp_params { |
---|
826 | 1170 | int8 a_band_boost_threshold; |
---|
.. | .. |
---|
839 | 1183 | #define ROAM_EXP_CFG_PRESENT (1 << 1) |
---|
840 | 1184 | |
---|
841 | 1185 | typedef struct wl_roam_exp_cfg { |
---|
842 | | - uint8 version; |
---|
843 | | - uint8 flags; |
---|
844 | | - uint16 reserved; |
---|
| 1186 | + uint16 version; |
---|
| 1187 | + uint16 flags; |
---|
845 | 1188 | wlc_roam_exp_params_t params; |
---|
846 | 1189 | } wl_roam_exp_cfg_t; |
---|
847 | 1190 | |
---|
.. | .. |
---|
856 | 1199 | #define ROAM_EXP_CLEAR_BSSID_PREF (1 << 0) |
---|
857 | 1200 | |
---|
858 | 1201 | typedef struct wl_bssid_pref_cfg { |
---|
859 | | - uint8 version; |
---|
860 | | - uint8 flags; |
---|
| 1202 | + uint16 version; |
---|
| 1203 | + uint16 flags; |
---|
861 | 1204 | uint16 count; |
---|
862 | | - wl_bssid_pref_list_t bssids[1]; |
---|
| 1205 | + uint16 reserved; |
---|
| 1206 | + wl_bssid_pref_list_t bssids[]; |
---|
863 | 1207 | } wl_bssid_pref_cfg_t; |
---|
864 | 1208 | |
---|
865 | 1209 | #define SSID_WHITELIST_VERSION 1 |
---|
.. | .. |
---|
871 | 1215 | |
---|
872 | 1216 | typedef struct wl_ssid_whitelist { |
---|
873 | 1217 | |
---|
874 | | - uint8 version; |
---|
875 | | - uint8 flags; |
---|
| 1218 | + uint16 version; |
---|
| 1219 | + uint16 flags; |
---|
876 | 1220 | |
---|
877 | 1221 | uint8 ssid_count; |
---|
878 | | - uint8 reserved; |
---|
879 | | - wlc_ssid_t ssids[1]; |
---|
| 1222 | + uint8 reserved[3]; |
---|
| 1223 | + wlc_ssid_t ssids[]; |
---|
880 | 1224 | } wl_ssid_whitelist_t; |
---|
881 | 1225 | |
---|
882 | 1226 | #define ROAM_EXP_EVENT_VERSION 1 |
---|
883 | 1227 | |
---|
884 | 1228 | typedef struct wl_roam_exp_event { |
---|
885 | 1229 | |
---|
886 | | - uint8 version; |
---|
887 | | - uint8 flags; |
---|
888 | | - uint16 reserved; |
---|
| 1230 | + uint16 version; |
---|
| 1231 | + uint16 flags; |
---|
889 | 1232 | wlc_ssid_t cur_ssid; |
---|
890 | 1233 | } wl_roam_exp_event_t; |
---|
891 | 1234 | |
---|
892 | | -#define WL_JOIN_PARAMS_FIXED_SIZE (OFFSETOF(wl_join_params_t, params) + \ |
---|
893 | | - WL_ASSOC_PARAMS_FIXED_SIZE) |
---|
894 | | -/* scan params for extended join */ |
---|
| 1235 | +/** scan params for extended join */ |
---|
895 | 1236 | typedef struct wl_join_scan_params { |
---|
896 | 1237 | uint8 scan_type; /**< 0 use default, active or passive scan */ |
---|
| 1238 | + uint8 PAD[3]; |
---|
897 | 1239 | int32 nprobes; /**< -1 use default, number of probes per channel */ |
---|
898 | 1240 | int32 active_time; /**< -1 use default, dwell time per channel for |
---|
899 | 1241 | * active scanning |
---|
.. | .. |
---|
906 | 1248 | */ |
---|
907 | 1249 | } wl_join_scan_params_t; |
---|
908 | 1250 | |
---|
909 | | -/* extended join params */ |
---|
| 1251 | +/** extended join params */ |
---|
910 | 1252 | typedef struct wl_extjoin_params { |
---|
911 | 1253 | wlc_ssid_t ssid; /**< {0, ""}: wildcard scan */ |
---|
912 | 1254 | wl_join_scan_params_t scan; |
---|
.. | .. |
---|
922 | 1264 | #define MAX_STREAMS_SUPPORTED 4 /**< max number of streams supported */ |
---|
923 | 1265 | typedef struct { |
---|
924 | 1266 | uint8 ant_config[ANT_SELCFG_MAX]; /**< antenna configuration */ |
---|
925 | | - uint8 num_antcfg; /**< number of available antenna configurations */ |
---|
| 1267 | + uint8 num_antcfg; /**< number of available antenna configurations */ |
---|
926 | 1268 | } wlc_antselcfg_t; |
---|
927 | 1269 | |
---|
928 | 1270 | typedef struct { |
---|
.. | .. |
---|
939 | 1281 | uint16 num_secs; /**< How many secs worth of data */ |
---|
940 | 1282 | cca_congest_t secs[1]; /**< Data */ |
---|
941 | 1283 | } cca_congest_channel_req_t; |
---|
942 | | - |
---|
943 | 1284 | typedef struct { |
---|
944 | 1285 | uint32 duration; /**< millisecs spent sampling this channel */ |
---|
945 | 1286 | uint32 congest; /**< millisecs detecting busy CCA */ |
---|
.. | .. |
---|
949 | 1290 | typedef struct { |
---|
950 | 1291 | uint16 status; |
---|
951 | 1292 | uint16 id; |
---|
952 | | - chanspec_t chanspec; /**< Which channel? */ |
---|
| 1293 | + chanspec_t chanspec; /**< Which channel? */ |
---|
953 | 1294 | uint16 len; |
---|
954 | 1295 | union { |
---|
955 | 1296 | cca_congest_simple_t cca_busy; /**< CCA busy */ |
---|
956 | | - int noise; /**< noise floor */ |
---|
| 1297 | + cca_congest_t cca_busy_ext; /**< Extended CCA report */ |
---|
| 1298 | + int32 noise; /**< noise floor */ |
---|
957 | 1299 | }; |
---|
958 | 1300 | } cca_chan_qual_event_t; |
---|
959 | 1301 | |
---|
| 1302 | +typedef struct { |
---|
| 1303 | + uint16 status; |
---|
| 1304 | + uint16 id; |
---|
| 1305 | + chanspec_t chanspec; /**< Which channel? */ |
---|
| 1306 | + uint16 len; |
---|
| 1307 | + union { |
---|
| 1308 | + cca_congest_simple_t cca_busy; /**< CCA busy */ |
---|
| 1309 | + struct { |
---|
| 1310 | + cca_congest_t cca_busy_ext; /**< Extended CCA report */ |
---|
| 1311 | + cca_congest_t cca_busy_nopm; /**< Extedned CCA report (PM awake time) */ |
---|
| 1312 | + cca_congest_t cca_busy_pm; /**< Extedned CCA report (PM sleep time) */ |
---|
| 1313 | + }; |
---|
| 1314 | + }; |
---|
| 1315 | +} cca_only_chan_qual_event_t; |
---|
| 1316 | + |
---|
| 1317 | +typedef struct { |
---|
| 1318 | + uint32 msrmnt_time; /**< Time for Measurement (msec) */ |
---|
| 1319 | + uint32 msrmnt_done; /**< flag set when measurement complete */ |
---|
| 1320 | + char buf[]; |
---|
| 1321 | +} cca_stats_n_flags; |
---|
| 1322 | + |
---|
| 1323 | +typedef struct { |
---|
| 1324 | + uint32 msrmnt_query; /* host to driver query for measurement done */ |
---|
| 1325 | + uint32 time_req; /* time required for measurement */ |
---|
| 1326 | + uint8 report_opt; /* option to print different stats in report */ |
---|
| 1327 | + uint8 PAD[3]; |
---|
| 1328 | +} cca_msrmnt_query; |
---|
960 | 1329 | |
---|
961 | 1330 | /* interference sources */ |
---|
962 | 1331 | enum interference_source { |
---|
963 | | - ITFR_NONE = 0, /**< interference */ |
---|
964 | | - ITFR_PHONE, /**< wireless phone */ |
---|
965 | | - ITFR_VIDEO_CAMERA, /**< wireless video camera */ |
---|
966 | | - ITFR_MICROWAVE_OVEN, /**< microwave oven */ |
---|
967 | | - ITFR_BABY_MONITOR, /**< wireless baby monitor */ |
---|
968 | | - ITFR_BLUETOOTH, /**< bluetooth */ |
---|
| 1332 | + ITFR_NONE = 0, /**< interference */ |
---|
| 1333 | + ITFR_PHONE, /**< wireless phone */ |
---|
| 1334 | + ITFR_VIDEO_CAMERA, /**< wireless video camera */ |
---|
| 1335 | + ITFR_MICROWAVE_OVEN, /**< microwave oven */ |
---|
| 1336 | + ITFR_BABY_MONITOR, /**< wireless baby monitor */ |
---|
| 1337 | + ITFR_BLUETOOTH, /**< bluetooth */ |
---|
969 | 1338 | ITFR_VIDEO_CAMERA_OR_BABY_MONITOR, /**< wireless camera or baby monitor */ |
---|
970 | 1339 | ITFR_BLUETOOTH_OR_BABY_MONITOR, /**< bluetooth or baby monitor */ |
---|
971 | 1340 | ITFR_VIDEO_CAMERA_OR_PHONE, /**< video camera or phone */ |
---|
972 | | - ITFR_UNIDENTIFIED /**< interference from unidentified source */ |
---|
| 1341 | + ITFR_UNIDENTIFIED /**< interference from unidentified source */ |
---|
973 | 1342 | }; |
---|
974 | 1343 | |
---|
975 | | -/* structure for interference source report */ |
---|
| 1344 | +/** structure for interference source report */ |
---|
976 | 1345 | typedef struct { |
---|
977 | | - uint32 flags; /**< flags. bit definitions below */ |
---|
978 | | - uint32 source; /**< last detected interference source */ |
---|
| 1346 | + uint32 flags; /**< flags. bit definitions below */ |
---|
| 1347 | + uint32 source; /**< last detected interference source */ |
---|
979 | 1348 | uint32 timestamp; /**< second timestamp on interferenced flag change */ |
---|
980 | 1349 | } interference_source_rep_t; |
---|
981 | 1350 | |
---|
982 | 1351 | #define WLC_CNTRY_BUF_SZ 4 /**< Country string is 3 bytes + NUL */ |
---|
983 | | - |
---|
984 | 1352 | |
---|
985 | 1353 | typedef struct wl_country { |
---|
986 | 1354 | char country_abbrev[WLC_CNTRY_BUF_SZ]; /**< nul-terminated country code used in |
---|
.. | .. |
---|
1005 | 1373 | WLC_CCODE_ROLE_80211D_ASSOC, |
---|
1006 | 1374 | WLC_CCODE_ROLE_80211D_SCAN, |
---|
1007 | 1375 | WLC_CCODE_ROLE_DEFAULT, |
---|
| 1376 | + WLC_CCODE_ROLE_DEFAULT_SROM_BKUP, |
---|
1008 | 1377 | WLC_CCODE_LAST |
---|
1009 | 1378 | } wl_ccode_role_t; |
---|
1010 | 1379 | #define WLC_NUM_CCODE_INFO WLC_CCODE_LAST |
---|
.. | .. |
---|
1018 | 1387 | |
---|
1019 | 1388 | typedef struct wl_ccode_info { |
---|
1020 | 1389 | uint16 version; |
---|
1021 | | - uint16 count; /* Number of ccodes entries in the set */ |
---|
| 1390 | + uint16 count; /**< Number of ccodes entries in the set */ |
---|
1022 | 1391 | wl_ccode_entry_t ccodelist[1]; |
---|
1023 | 1392 | } wl_ccode_info_t; |
---|
1024 | 1393 | #define WL_CCODE_INFO_FIXED_LEN OFFSETOF(wl_ccode_info_t, ccodelist) |
---|
1025 | | - |
---|
1026 | 1394 | typedef struct wl_channels_in_country { |
---|
1027 | 1395 | uint32 buflen; |
---|
1028 | 1396 | uint32 band; |
---|
.. | .. |
---|
1083 | 1451 | wl_rm_rep_elt_t rep[1]; /**< variable length block of reports */ |
---|
1084 | 1452 | } wl_rm_rep_t; |
---|
1085 | 1453 | #define WL_RM_REP_FIXED_LEN 8 |
---|
| 1454 | +#ifdef BCMCCX |
---|
1086 | 1455 | |
---|
| 1456 | +#define LEAP_USER_MAX 32 |
---|
| 1457 | +#define LEAP_DOMAIN_MAX 32 |
---|
| 1458 | +#define LEAP_PASSWORD_MAX 32 |
---|
1087 | 1459 | |
---|
| 1460 | +typedef struct wl_leap_info { |
---|
| 1461 | + wlc_ssid_t ssid; |
---|
| 1462 | + uint8 user_len; |
---|
| 1463 | + uint8 user[LEAP_USER_MAX]; |
---|
| 1464 | + uint8 password_len; |
---|
| 1465 | + uint8 password[LEAP_PASSWORD_MAX]; |
---|
| 1466 | + uint8 domain_len; |
---|
| 1467 | + uint8 domain[LEAP_DOMAIN_MAX]; |
---|
| 1468 | + uint8 PAD; |
---|
| 1469 | +} wl_leap_info_t; |
---|
| 1470 | + |
---|
| 1471 | +typedef struct wl_leap_list { |
---|
| 1472 | + uint32 buflen; |
---|
| 1473 | + uint32 version; |
---|
| 1474 | + uint32 count; |
---|
| 1475 | + wl_leap_info_t leap_info[1]; |
---|
| 1476 | +} wl_leap_list_t; |
---|
| 1477 | +#endif /* BCMCCX */ |
---|
1088 | 1478 | typedef enum sup_auth_status { |
---|
1089 | 1479 | /* Basic supplicant authentication states */ |
---|
1090 | 1480 | WLC_SUP_DISCONNECTED = 0, |
---|
.. | .. |
---|
1098 | 1488 | WLC_SUP_LAST_BASIC_STATE, |
---|
1099 | 1489 | |
---|
1100 | 1490 | /* Extended supplicant authentication states */ |
---|
1101 | | - /* Waiting to receive handshake msg M1 */ |
---|
| 1491 | + /** Waiting to receive handshake msg M1 */ |
---|
1102 | 1492 | WLC_SUP_KEYXCHANGE_WAIT_M1 = WLC_SUP_AUTHENTICATED, |
---|
1103 | | - /* Preparing to send handshake msg M2 */ |
---|
| 1493 | + /** Preparing to send handshake msg M2 */ |
---|
1104 | 1494 | WLC_SUP_KEYXCHANGE_PREP_M2 = WLC_SUP_KEYXCHANGE, |
---|
1105 | 1495 | /* Waiting to receive handshake msg M3 */ |
---|
1106 | 1496 | WLC_SUP_KEYXCHANGE_WAIT_M3 = WLC_SUP_LAST_BASIC_STATE, |
---|
.. | .. |
---|
1117 | 1507 | uint32 algo; /**< CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ |
---|
1118 | 1508 | uint32 flags; /**< misc flags */ |
---|
1119 | 1509 | uint32 pad_2[2]; |
---|
1120 | | - int pad_3; |
---|
1121 | | - int iv_initialized; /**< has IV been initialized already? */ |
---|
1122 | | - int pad_4; |
---|
| 1510 | + int32 pad_3; |
---|
| 1511 | + int32 iv_initialized; /**< has IV been initialized already? */ |
---|
| 1512 | + int32 pad_4; |
---|
1123 | 1513 | /* Rx IV */ |
---|
1124 | 1514 | struct { |
---|
1125 | 1515 | uint32 hi; /**< upper 32 bits of IV */ |
---|
1126 | 1516 | uint16 lo; /**< lower 16 bits of IV */ |
---|
| 1517 | + uint16 PAD; |
---|
1127 | 1518 | } rxiv; |
---|
1128 | 1519 | uint32 pad_5[2]; |
---|
1129 | 1520 | struct ether_addr ea; /**< per station */ |
---|
| 1521 | + uint16 PAD; |
---|
1130 | 1522 | } wl_wsec_key_t; |
---|
1131 | 1523 | |
---|
1132 | 1524 | #define WSEC_MIN_PSK_LEN 8 |
---|
1133 | 1525 | #define WSEC_MAX_PSK_LEN 64 |
---|
1134 | 1526 | |
---|
1135 | | -/* Flag for key material needing passhash'ing */ |
---|
| 1527 | +/** Flag for key material needing passhash'ing */ |
---|
1136 | 1528 | #define WSEC_PASSPHRASE (1<<0) |
---|
1137 | 1529 | |
---|
1138 | | -/* receptacle for WLC_SET_WSEC_PMK parameter */ |
---|
1139 | | -typedef struct { |
---|
| 1530 | +/**receptacle for WLC_SET_WSEC_PMK parameter */ |
---|
| 1531 | +typedef struct wsec_pmk { |
---|
1140 | 1532 | ushort key_len; /**< octets in key material */ |
---|
1141 | 1533 | ushort flags; /**< key handling qualification */ |
---|
1142 | 1534 | uint8 key[WSEC_MAX_PSK_LEN]; /**< PMK material */ |
---|
1143 | 1535 | } wsec_pmk_t; |
---|
1144 | 1536 | |
---|
1145 | | -typedef struct _pmkid { |
---|
1146 | | - struct ether_addr BSSID; |
---|
1147 | | - uint8 PMKID[WPA2_PMKID_LEN]; |
---|
1148 | | -} pmkid_t; |
---|
| 1537 | +#define WL_AUTH_EVENT_DATA_V1 0x1 |
---|
1149 | 1538 | |
---|
1150 | | -typedef struct _pmkid_list { |
---|
| 1539 | +/* tlv ids for auth event */ |
---|
| 1540 | +#define WL_AUTH_PMK_TLV_ID 1 |
---|
| 1541 | +#define WL_AUTH_PMKID_TLV_ID 2 |
---|
| 1542 | +/* AUTH event data |
---|
| 1543 | +* pmk and pmkid in case of SAE auth |
---|
| 1544 | +* xtlvs will be 32 bit alligned |
---|
| 1545 | +*/ |
---|
| 1546 | +typedef struct wl_auth_event { |
---|
| 1547 | + uint16 version; |
---|
| 1548 | + uint16 length; |
---|
| 1549 | + uint8 xtlvs[]; |
---|
| 1550 | +} wl_auth_event_t; |
---|
| 1551 | + |
---|
| 1552 | +#define WL_AUTH_EVENT_FIXED_LEN_V1 OFFSETOF(wl_auth_event_t, xtlvs) |
---|
| 1553 | + |
---|
| 1554 | +#define FILS_CACHE_ID_LEN 2 |
---|
| 1555 | +#define PMK_LEN_MAX 48 |
---|
| 1556 | + |
---|
| 1557 | +typedef struct _pmkid_v1 { |
---|
| 1558 | + struct ether_addr BSSID; |
---|
| 1559 | + uint8 PMKID[WPA2_PMKID_LEN]; |
---|
| 1560 | +} pmkid_v1_t; |
---|
| 1561 | + |
---|
| 1562 | +#define PMKID_ELEM_V2_LENGTH (sizeof(struct ether_addr) + WPA2_PMKID_LEN + PMK_LEN_MAX + \ |
---|
| 1563 | + sizeof(ssid_info_t) + FILS_CACHE_ID_LEN) |
---|
| 1564 | + |
---|
| 1565 | +typedef struct _pmkid_v2 { |
---|
| 1566 | + uint16 length; /* Should match PMKID_ELEM_VX_LENGTH */ |
---|
| 1567 | + struct ether_addr BSSID; |
---|
| 1568 | + uint8 PMKID[WPA2_PMKID_LEN]; |
---|
| 1569 | + uint8 pmk[PMK_LEN_MAX]; /* for FILS key deriviation */ |
---|
| 1570 | + uint16 pmk_len; |
---|
| 1571 | + ssid_info_t ssid; |
---|
| 1572 | + uint8 fils_cache_id[FILS_CACHE_ID_LEN]; |
---|
| 1573 | +} pmkid_v2_t; |
---|
| 1574 | + |
---|
| 1575 | +typedef struct _pmkid_v3 { |
---|
| 1576 | + struct ether_addr bssid; |
---|
| 1577 | + uint8 pmkid[WPA2_PMKID_LEN]; |
---|
| 1578 | + uint8 pmkid_len; |
---|
| 1579 | + uint8 pmk[PMK_LEN_MAX]; |
---|
| 1580 | + uint8 pmk_len; |
---|
| 1581 | + uint16 fils_cache_id; /* 2-byte length */ |
---|
| 1582 | + uint8 pad; |
---|
| 1583 | + uint8 ssid_len; |
---|
| 1584 | + uint8 ssid[DOT11_MAX_SSID_LEN]; /* For FILS, to save ESSID */ |
---|
| 1585 | + /* one pmkid used in whole ESS */ |
---|
| 1586 | + uint32 time_left; /* remaining time until expirary in sec. */ |
---|
| 1587 | + /* 0 means expired, all 0xFF means never expire */ |
---|
| 1588 | +} pmkid_v3_t; |
---|
| 1589 | + |
---|
| 1590 | +#define PMKID_LIST_VER_2 2 |
---|
| 1591 | +#define PMKID_LIST_VER_3 3 |
---|
| 1592 | + |
---|
| 1593 | +typedef struct _pmkid_list_v1 { |
---|
1151 | 1594 | uint32 npmkid; |
---|
1152 | | - pmkid_t pmkid[1]; |
---|
1153 | | -} pmkid_list_t; |
---|
| 1595 | + pmkid_v1_t pmkid[1]; |
---|
| 1596 | +} pmkid_list_v1_t; |
---|
| 1597 | + |
---|
| 1598 | +typedef struct _pmkid_list_v2 { |
---|
| 1599 | + uint16 version; |
---|
| 1600 | + uint16 length; |
---|
| 1601 | + pmkid_v2_t pmkid[1]; |
---|
| 1602 | +} pmkid_list_v2_t; |
---|
| 1603 | + |
---|
| 1604 | +typedef struct _pmkid_list_v3 { |
---|
| 1605 | + uint16 version; |
---|
| 1606 | + uint16 length; |
---|
| 1607 | + uint16 count; |
---|
| 1608 | + uint16 pad; |
---|
| 1609 | + pmkid_v3_t pmkid[]; |
---|
| 1610 | +} pmkid_list_v3_t; |
---|
| 1611 | + |
---|
| 1612 | +#ifndef PMKID_VERSION_ENABLED |
---|
| 1613 | +/* pmkid structure before versioning. legacy. DONOT update anymore here */ |
---|
| 1614 | +typedef pmkid_v1_t pmkid_t; |
---|
| 1615 | +typedef pmkid_list_v1_t pmkid_list_t; |
---|
| 1616 | +#endif /* PMKID_VERSION_ENABLED */ |
---|
1154 | 1617 | |
---|
1155 | 1618 | typedef struct _pmkid_cand { |
---|
1156 | 1619 | struct ether_addr BSSID; |
---|
.. | .. |
---|
1169 | 1632 | uint32 resp_len; |
---|
1170 | 1633 | uint32 flags; |
---|
1171 | 1634 | struct dot11_assoc_req req; |
---|
1172 | | - struct ether_addr reassoc_bssid; /* used in reassoc's */ |
---|
| 1635 | + struct ether_addr reassoc_bssid; /**< used in reassoc's */ |
---|
1173 | 1636 | struct dot11_assoc_resp resp; |
---|
| 1637 | + uint32 state; |
---|
1174 | 1638 | } wl_assoc_info_t; |
---|
1175 | 1639 | |
---|
1176 | 1640 | typedef struct wl_led_info { |
---|
1177 | | - uint32 index; /* led index */ |
---|
| 1641 | + uint32 index; /**< led index */ |
---|
1178 | 1642 | uint32 behavior; |
---|
1179 | 1643 | uint8 activehi; |
---|
| 1644 | + uint8 PAD[3]; |
---|
1180 | 1645 | } wl_led_info_t; |
---|
1181 | 1646 | |
---|
1182 | | - |
---|
1183 | | -/* srom read/write struct passed through ioctl */ |
---|
| 1647 | +/** srom read/write struct passed through ioctl */ |
---|
1184 | 1648 | typedef struct { |
---|
1185 | | - uint byteoff; /**< byte offset */ |
---|
1186 | | - uint nbytes; /**< number of bytes */ |
---|
1187 | | - uint16 buf[1]; |
---|
| 1649 | + uint32 byteoff; /**< byte offset */ |
---|
| 1650 | + uint32 nbytes; /**< number of bytes */ |
---|
| 1651 | + uint16 buf[]; |
---|
1188 | 1652 | } srom_rw_t; |
---|
1189 | 1653 | |
---|
1190 | | -#define CISH_FLAG_PCIECIS (1 << 15) /* write CIS format bit for PCIe CIS */ |
---|
1191 | | -/* similar cis (srom or otp) struct [iovar: may not be aligned] */ |
---|
| 1654 | +#define CISH_FLAG_PCIECIS (1 << 15) /**< write CIS format bit for PCIe CIS */ |
---|
| 1655 | + |
---|
| 1656 | +/** similar cis (srom or otp) struct [iovar: may not be aligned] */ |
---|
1192 | 1657 | typedef struct { |
---|
1193 | 1658 | uint16 source; /**< cis source */ |
---|
1194 | 1659 | uint16 flags; /**< flags */ |
---|
.. | .. |
---|
1197 | 1662 | /* data follows here */ |
---|
1198 | 1663 | } cis_rw_t; |
---|
1199 | 1664 | |
---|
1200 | | -/* R_REG and W_REG struct passed through ioctl */ |
---|
| 1665 | +/** R_REG and W_REG struct passed through ioctl */ |
---|
1201 | 1666 | typedef struct { |
---|
1202 | 1667 | uint32 byteoff; /**< byte offset of the field in d11regs_t */ |
---|
1203 | 1668 | uint32 val; /**< read/write value of the field */ |
---|
1204 | 1669 | uint32 size; /**< sizeof the field */ |
---|
1205 | | - uint band; /**< band (optional) */ |
---|
| 1670 | + uint32 band; /**< band (optional) */ |
---|
1206 | 1671 | } rw_reg_t; |
---|
1207 | 1672 | |
---|
1208 | | -/* Structure used by GET/SET_ATTEN ioctls - it controls power in b/g-band */ |
---|
1209 | | -/* PCL - Power Control Loop */ |
---|
| 1673 | +/** |
---|
| 1674 | + * Structure used by GET/SET_ATTEN ioctls - it controls power in b/g-band |
---|
| 1675 | + * PCL - Power Control Loop |
---|
| 1676 | + */ |
---|
1210 | 1677 | typedef struct { |
---|
1211 | 1678 | uint16 auto_ctrl; /**< WL_ATTEN_XX */ |
---|
1212 | 1679 | uint16 bb; /**< Baseband attenuation */ |
---|
.. | .. |
---|
1214 | 1681 | uint16 txctl1; /**< Radio TX_CTL1 value */ |
---|
1215 | 1682 | } atten_t; |
---|
1216 | 1683 | |
---|
1217 | | -/* Per-AC retry parameters */ |
---|
| 1684 | +/** Per-AC retry parameters */ |
---|
1218 | 1685 | struct wme_tx_params_s { |
---|
1219 | 1686 | uint8 short_retry; |
---|
1220 | 1687 | uint8 short_fallback; |
---|
1221 | 1688 | uint8 long_retry; |
---|
1222 | 1689 | uint8 long_fallback; |
---|
1223 | | - uint16 max_rate; /* In units of 512 Kbps */ |
---|
| 1690 | + uint16 max_rate; /**< In units of 512 Kbps */ |
---|
1224 | 1691 | }; |
---|
1225 | 1692 | |
---|
1226 | 1693 | typedef struct wme_tx_params_s wme_tx_params_t; |
---|
1227 | 1694 | |
---|
1228 | 1695 | #define WL_WME_TX_PARAMS_IO_BYTES (sizeof(wme_tx_params_t) * AC_COUNT) |
---|
1229 | 1696 | |
---|
1230 | | -/* Used to get specific link/ac parameters */ |
---|
| 1697 | +/**Used to get specific link/ac parameters */ |
---|
1231 | 1698 | typedef struct { |
---|
1232 | 1699 | int32 ac; |
---|
1233 | 1700 | uint8 val; |
---|
1234 | 1701 | struct ether_addr ea; |
---|
| 1702 | + uint8 PAD; |
---|
1235 | 1703 | } link_val_t; |
---|
1236 | | - |
---|
1237 | 1704 | |
---|
1238 | 1705 | #define WL_PM_MUTE_TX_VER 1 |
---|
1239 | 1706 | |
---|
.. | .. |
---|
1242 | 1709 | uint16 len; /**< length */ |
---|
1243 | 1710 | uint16 deadline; /**< deadline timer (in milliseconds) */ |
---|
1244 | 1711 | uint8 enable; /**< set to 1 to enable mode; set to 0 to disable it */ |
---|
| 1712 | + uint8 PAD; |
---|
1245 | 1713 | } wl_pm_mute_tx_t; |
---|
1246 | 1714 | |
---|
1247 | | - |
---|
| 1715 | +/* sta_info_t version 4 */ |
---|
1248 | 1716 | typedef struct { |
---|
1249 | 1717 | uint16 ver; /**< version of this struct */ |
---|
1250 | 1718 | uint16 len; /**< length in bytes of this structure */ |
---|
1251 | 1719 | uint16 cap; /**< sta's advertised capabilities */ |
---|
| 1720 | + uint16 PAD; |
---|
1252 | 1721 | uint32 flags; /**< flags defined below */ |
---|
1253 | 1722 | uint32 idle; /**< time since data pkt rx'd from sta */ |
---|
1254 | 1723 | struct ether_addr ea; /**< Station address */ |
---|
1255 | | - wl_rateset_t rateset; /**< rateset in use */ |
---|
| 1724 | + uint16 PAD; |
---|
| 1725 | + wl_rateset_t rateset; /**< rateset in use */ |
---|
1256 | 1726 | uint32 in; /**< seconds elapsed since associated */ |
---|
1257 | | - uint32 listen_interval_inms; /* Min Listen interval in ms for this STA */ |
---|
| 1727 | + uint32 listen_interval_inms; /**< Min Listen interval in ms for this STA */ |
---|
1258 | 1728 | uint32 tx_pkts; /**< # of user packets transmitted (unicast) */ |
---|
1259 | 1729 | uint32 tx_failures; /**< # of user packets failed */ |
---|
1260 | 1730 | uint32 rx_ucast_pkts; /**< # of unicast packets received */ |
---|
.. | .. |
---|
1272 | 1742 | uint64 tx_mcast_bytes; /**< # data bytes txed (mcast) */ |
---|
1273 | 1743 | uint64 rx_ucast_bytes; /**< data bytes recvd (ucast) */ |
---|
1274 | 1744 | uint64 rx_mcast_bytes; /**< data bytes recvd (mcast) */ |
---|
1275 | | - int8 rssi[WL_STA_ANT_MAX]; /* average rssi per antenna |
---|
1276 | | - * of data frames |
---|
1277 | | - */ |
---|
| 1745 | + int8 rssi[WL_STA_ANT_MAX]; /**< average rssi per antenna |
---|
| 1746 | + * of data frames |
---|
| 1747 | + */ |
---|
1278 | 1748 | int8 nf[WL_STA_ANT_MAX]; /**< per antenna noise floor */ |
---|
1279 | | - uint16 aid; /**< association ID */ |
---|
| 1749 | + uint16 aid; /**< association ID */ |
---|
1280 | 1750 | uint16 ht_capabilities; /**< advertised ht caps */ |
---|
1281 | 1751 | uint16 vht_flags; /**< converted vht flags */ |
---|
| 1752 | + uint16 PAD; |
---|
1282 | 1753 | uint32 tx_pkts_retried; /**< # of frames where a retry was |
---|
1283 | 1754 | * necessary |
---|
1284 | 1755 | */ |
---|
1285 | | - uint32 tx_pkts_retry_exhausted; /* # of user frames where a retry |
---|
| 1756 | + uint32 tx_pkts_retry_exhausted; /**< # of user frames where a retry |
---|
1286 | 1757 | * was exhausted |
---|
1287 | 1758 | */ |
---|
1288 | | - int8 rx_lastpkt_rssi[WL_STA_ANT_MAX]; /* Per antenna RSSI of last |
---|
| 1759 | + int8 rx_lastpkt_rssi[WL_STA_ANT_MAX]; /**< Per antenna RSSI of last |
---|
1289 | 1760 | * received data frame. |
---|
1290 | 1761 | */ |
---|
1291 | 1762 | /* TX WLAN retry/failure statistics: |
---|
.. | .. |
---|
1301 | 1772 | */ |
---|
1302 | 1773 | uint32 rx_pkts_retried; /**< # rx with retry bit set */ |
---|
1303 | 1774 | uint32 tx_rate_fallback; /**< lowest fallback TX rate */ |
---|
1304 | | -} sta_info_t; |
---|
| 1775 | + /* Fields above this line are common to sta_info_t versions 4 and 5 */ |
---|
| 1776 | + |
---|
| 1777 | + uint32 rx_dur_total; /* total user RX duration (estimated) */ |
---|
| 1778 | + |
---|
| 1779 | + chanspec_t chanspec; /** chanspec this sta is on */ |
---|
| 1780 | + uint16 PAD; |
---|
| 1781 | + wl_rateset_args_v1_t rateset_adv; /* rateset along with mcs index bitmap */ |
---|
| 1782 | + uint32 PAD; |
---|
| 1783 | +} sta_info_v4_t; |
---|
| 1784 | + |
---|
| 1785 | +/* Note: Version 4 is the latest version of sta_info_t. Version 5 is abandoned. |
---|
| 1786 | + * Please add new fields to version 4, not version 5. |
---|
| 1787 | + */ |
---|
| 1788 | +/* sta_info_t version 5 */ |
---|
| 1789 | +typedef struct { |
---|
| 1790 | + uint16 ver; /**< version of this struct */ |
---|
| 1791 | + uint16 len; /**< length in bytes of this structure */ |
---|
| 1792 | + uint16 cap; /**< sta's advertised capabilities */ |
---|
| 1793 | + uint16 PAD; |
---|
| 1794 | + uint32 flags; /**< flags defined below */ |
---|
| 1795 | + uint32 idle; /**< time since data pkt rx'd from sta */ |
---|
| 1796 | + struct ether_addr ea; /**< Station address */ |
---|
| 1797 | + uint16 PAD; |
---|
| 1798 | + wl_rateset_t rateset; /**< rateset in use */ |
---|
| 1799 | + uint32 in; /**< seconds elapsed since associated */ |
---|
| 1800 | + uint32 listen_interval_inms; /**< Min Listen interval in ms for this STA */ |
---|
| 1801 | + uint32 tx_pkts; /**< # of user packets transmitted (unicast) */ |
---|
| 1802 | + uint32 tx_failures; /**< # of user packets failed */ |
---|
| 1803 | + uint32 rx_ucast_pkts; /**< # of unicast packets received */ |
---|
| 1804 | + uint32 rx_mcast_pkts; /**< # of multicast packets received */ |
---|
| 1805 | + uint32 tx_rate; /**< Rate used by last tx frame */ |
---|
| 1806 | + uint32 rx_rate; /**< Rate of last successful rx frame */ |
---|
| 1807 | + uint32 rx_decrypt_succeeds; /**< # of packet decrypted successfully */ |
---|
| 1808 | + uint32 rx_decrypt_failures; /**< # of packet decrypted unsuccessfully */ |
---|
| 1809 | + uint32 tx_tot_pkts; /**< # of user tx pkts (ucast + mcast) */ |
---|
| 1810 | + uint32 rx_tot_pkts; /**< # of data packets recvd (uni + mcast) */ |
---|
| 1811 | + uint32 tx_mcast_pkts; /**< # of mcast pkts txed */ |
---|
| 1812 | + uint64 tx_tot_bytes; /**< data bytes txed (ucast + mcast) */ |
---|
| 1813 | + uint64 rx_tot_bytes; /**< data bytes recvd (ucast + mcast) */ |
---|
| 1814 | + uint64 tx_ucast_bytes; /**< data bytes txed (ucast) */ |
---|
| 1815 | + uint64 tx_mcast_bytes; /**< # data bytes txed (mcast) */ |
---|
| 1816 | + uint64 rx_ucast_bytes; /**< data bytes recvd (ucast) */ |
---|
| 1817 | + uint64 rx_mcast_bytes; /**< data bytes recvd (mcast) */ |
---|
| 1818 | + int8 rssi[WL_STA_ANT_MAX]; /**< average rssi per antenna |
---|
| 1819 | + * of data frames |
---|
| 1820 | + */ |
---|
| 1821 | + int8 nf[WL_STA_ANT_MAX]; /**< per antenna noise floor */ |
---|
| 1822 | + uint16 aid; /**< association ID */ |
---|
| 1823 | + uint16 ht_capabilities; /**< advertised ht caps */ |
---|
| 1824 | + uint16 vht_flags; /**< converted vht flags */ |
---|
| 1825 | + uint16 PAD; |
---|
| 1826 | + uint32 tx_pkts_retried; /**< # of frames where a retry was |
---|
| 1827 | + * necessary |
---|
| 1828 | + */ |
---|
| 1829 | + uint32 tx_pkts_retry_exhausted; /**< # of user frames where a retry |
---|
| 1830 | + * was exhausted |
---|
| 1831 | + */ |
---|
| 1832 | + int8 rx_lastpkt_rssi[WL_STA_ANT_MAX]; /**< Per antenna RSSI of last |
---|
| 1833 | + * received data frame. |
---|
| 1834 | + */ |
---|
| 1835 | + /* TX WLAN retry/failure statistics: |
---|
| 1836 | + * Separated for host requested frames and WLAN locally generated frames. |
---|
| 1837 | + * Include unicast frame only where the retries/failures can be counted. |
---|
| 1838 | + */ |
---|
| 1839 | + uint32 tx_pkts_total; /**< # user frames sent successfully */ |
---|
| 1840 | + uint32 tx_pkts_retries; /**< # user frames retries */ |
---|
| 1841 | + uint32 tx_pkts_fw_total; /**< # FW generated sent successfully */ |
---|
| 1842 | + uint32 tx_pkts_fw_retries; /**< # retries for FW generated frames */ |
---|
| 1843 | + uint32 tx_pkts_fw_retry_exhausted; /**< # FW generated where a retry |
---|
| 1844 | + * was exhausted |
---|
| 1845 | + */ |
---|
| 1846 | + uint32 rx_pkts_retried; /**< # rx with retry bit set */ |
---|
| 1847 | + uint32 tx_rate_fallback; /**< lowest fallback TX rate */ |
---|
| 1848 | + /* Fields above this line are common to sta_info_t versions 4 and 5 */ |
---|
| 1849 | + |
---|
| 1850 | + chanspec_t chanspec; /** chanspec this sta is on */ |
---|
| 1851 | + uint16 PAD; |
---|
| 1852 | + wl_rateset_args_v1_t rateset_adv; /* rateset along with mcs index bitmap */ |
---|
| 1853 | +} sta_info_v5_t; |
---|
| 1854 | + |
---|
| 1855 | +/* sta_info_t version 6 |
---|
| 1856 | + changes to wl_rateset_args_t is leading to update this struct version as well. |
---|
| 1857 | + */ |
---|
| 1858 | +typedef struct { |
---|
| 1859 | + uint16 ver; /**< version of this struct */ |
---|
| 1860 | + uint16 len; /**< length in bytes of this structure */ |
---|
| 1861 | + uint16 cap; /**< sta's advertised capabilities */ |
---|
| 1862 | + uint16 PAD; |
---|
| 1863 | + uint32 flags; /**< flags defined below */ |
---|
| 1864 | + uint32 idle; /**< time since data pkt rx'd from sta */ |
---|
| 1865 | + struct ether_addr ea; /**< Station address */ |
---|
| 1866 | + uint16 PAD; |
---|
| 1867 | + wl_rateset_t rateset; /**< rateset in use */ |
---|
| 1868 | + uint32 in; /**< seconds elapsed since associated */ |
---|
| 1869 | + uint32 listen_interval_inms; /**< Min Listen interval in ms for this STA */ |
---|
| 1870 | + uint32 tx_pkts; /**< # of user packets transmitted (unicast) */ |
---|
| 1871 | + uint32 tx_failures; /**< # of user packets failed */ |
---|
| 1872 | + uint32 rx_ucast_pkts; /**< # of unicast packets received */ |
---|
| 1873 | + uint32 rx_mcast_pkts; /**< # of multicast packets received */ |
---|
| 1874 | + uint32 tx_rate; /**< Rate used by last tx frame */ |
---|
| 1875 | + uint32 rx_rate; /**< Rate of last successful rx frame */ |
---|
| 1876 | + uint32 rx_decrypt_succeeds; /**< # of packet decrypted successfully */ |
---|
| 1877 | + uint32 rx_decrypt_failures; /**< # of packet decrypted unsuccessfully */ |
---|
| 1878 | + uint32 tx_tot_pkts; /**< # of user tx pkts (ucast + mcast) */ |
---|
| 1879 | + uint32 rx_tot_pkts; /**< # of data packets recvd (uni + mcast) */ |
---|
| 1880 | + uint32 tx_mcast_pkts; /**< # of mcast pkts txed */ |
---|
| 1881 | + uint64 tx_tot_bytes; /**< data bytes txed (ucast + mcast) */ |
---|
| 1882 | + uint64 rx_tot_bytes; /**< data bytes recvd (ucast + mcast) */ |
---|
| 1883 | + uint64 tx_ucast_bytes; /**< data bytes txed (ucast) */ |
---|
| 1884 | + uint64 tx_mcast_bytes; /**< # data bytes txed (mcast) */ |
---|
| 1885 | + uint64 rx_ucast_bytes; /**< data bytes recvd (ucast) */ |
---|
| 1886 | + uint64 rx_mcast_bytes; /**< data bytes recvd (mcast) */ |
---|
| 1887 | + int8 rssi[WL_STA_ANT_MAX]; /**< average rssi per antenna |
---|
| 1888 | + * of data frames |
---|
| 1889 | + */ |
---|
| 1890 | + int8 nf[WL_STA_ANT_MAX]; /**< per antenna noise floor */ |
---|
| 1891 | + uint16 aid; /**< association ID */ |
---|
| 1892 | + uint16 ht_capabilities; /**< advertised ht caps */ |
---|
| 1893 | + uint16 vht_flags; /**< converted vht flags */ |
---|
| 1894 | + uint16 PAD; |
---|
| 1895 | + uint32 tx_pkts_retried; /**< # of frames where a retry was |
---|
| 1896 | + * necessary |
---|
| 1897 | + */ |
---|
| 1898 | + uint32 tx_pkts_retry_exhausted; /**< # of user frames where a retry |
---|
| 1899 | + * was exhausted |
---|
| 1900 | + */ |
---|
| 1901 | + int8 rx_lastpkt_rssi[WL_STA_ANT_MAX]; /**< Per antenna RSSI of last |
---|
| 1902 | + * received data frame. |
---|
| 1903 | + */ |
---|
| 1904 | + /* TX WLAN retry/failure statistics: |
---|
| 1905 | + * Separated for host requested frames and WLAN locally generated frames. |
---|
| 1906 | + * Include unicast frame only where the retries/failures can be counted. |
---|
| 1907 | + */ |
---|
| 1908 | + uint32 tx_pkts_total; /**< # user frames sent successfully */ |
---|
| 1909 | + uint32 tx_pkts_retries; /**< # user frames retries */ |
---|
| 1910 | + uint32 tx_pkts_fw_total; /**< # FW generated sent successfully */ |
---|
| 1911 | + uint32 tx_pkts_fw_retries; /**< # retries for FW generated frames */ |
---|
| 1912 | + uint32 tx_pkts_fw_retry_exhausted; /**< # FW generated where a retry |
---|
| 1913 | + * was exhausted |
---|
| 1914 | + */ |
---|
| 1915 | + uint32 rx_pkts_retried; /**< # rx with retry bit set */ |
---|
| 1916 | + uint32 tx_rate_fallback; /**< lowest fallback TX rate */ |
---|
| 1917 | + /* Fields above this line are common to sta_info_t versions 4 and 5 */ |
---|
| 1918 | + |
---|
| 1919 | + uint32 rx_dur_total; /* total user RX duration (estimated) */ |
---|
| 1920 | + |
---|
| 1921 | + chanspec_t chanspec; /** chanspec this sta is on */ |
---|
| 1922 | + uint16 PAD; |
---|
| 1923 | + wl_rateset_args_v2_t rateset_adv; /* rateset along with mcs index bitmap */ |
---|
| 1924 | +} sta_info_v6_t; |
---|
1305 | 1925 | |
---|
1306 | 1926 | #define WL_OLD_STAINFO_SIZE OFFSETOF(sta_info_t, tx_tot_pkts) |
---|
1307 | 1927 | |
---|
1308 | | -#define WL_STA_VER 4 |
---|
| 1928 | +#define WL_STA_VER_4 4 |
---|
| 1929 | +#define WL_STA_VER_5 5 |
---|
| 1930 | +#define WL_STA_VER WL_STA_VER_4 |
---|
1309 | 1931 | |
---|
1310 | | -typedef struct { |
---|
| 1932 | +#define SWDIV_STATS_VERSION_2 2 |
---|
| 1933 | +#define SWDIV_STATS_CURRENT_VERSION SWDIV_STATS_VERSION_2 |
---|
| 1934 | + |
---|
| 1935 | +struct wlc_swdiv_stats_v1 { |
---|
1311 | 1936 | uint32 auto_en; |
---|
1312 | 1937 | uint32 active_ant; |
---|
1313 | 1938 | uint32 rxcount; |
---|
.. | .. |
---|
1334 | 1959 | uint32 rx_policy; |
---|
1335 | 1960 | uint32 tx_policy; |
---|
1336 | 1961 | uint32 cell_policy; |
---|
1337 | | -} wlc_swdiv_stats_t; |
---|
| 1962 | + uint32 swap_snrdrop0; |
---|
| 1963 | + uint32 swap_snrdrop1; |
---|
| 1964 | + uint32 mws_antsel_ovr_tx; |
---|
| 1965 | + uint32 mws_antsel_ovr_rx; |
---|
| 1966 | + uint8 swap_trig_event_id; |
---|
| 1967 | +}; |
---|
| 1968 | + |
---|
| 1969 | +struct wlc_swdiv_stats_v2 { |
---|
| 1970 | + uint16 version; /* version of the structure |
---|
| 1971 | + * as defined by SWDIV_STATS_CURRENT_VERSION |
---|
| 1972 | + */ |
---|
| 1973 | + uint16 length; /* length of the entire structure */ |
---|
| 1974 | + uint32 auto_en; |
---|
| 1975 | + uint32 active_ant; |
---|
| 1976 | + uint32 rxcount; |
---|
| 1977 | + int32 avg_snr_per_ant0; |
---|
| 1978 | + int32 avg_snr_per_ant1; |
---|
| 1979 | + int32 avg_snr_per_ant2; |
---|
| 1980 | + uint32 swap_ge_rxcount0; |
---|
| 1981 | + uint32 swap_ge_rxcount1; |
---|
| 1982 | + uint32 swap_ge_snrthresh0; |
---|
| 1983 | + uint32 swap_ge_snrthresh1; |
---|
| 1984 | + uint32 swap_txfail0; |
---|
| 1985 | + uint32 swap_txfail1; |
---|
| 1986 | + uint32 swap_timer0; |
---|
| 1987 | + uint32 swap_timer1; |
---|
| 1988 | + uint32 swap_alivecheck0; |
---|
| 1989 | + uint32 swap_alivecheck1; |
---|
| 1990 | + uint32 rxcount_per_ant0; |
---|
| 1991 | + uint32 rxcount_per_ant1; |
---|
| 1992 | + uint32 acc_rxcount; |
---|
| 1993 | + uint32 acc_rxcount_per_ant0; |
---|
| 1994 | + uint32 acc_rxcount_per_ant1; |
---|
| 1995 | + uint32 tx_auto_en; |
---|
| 1996 | + uint32 tx_active_ant; |
---|
| 1997 | + uint32 rx_policy; |
---|
| 1998 | + uint32 tx_policy; |
---|
| 1999 | + uint32 cell_policy; |
---|
| 2000 | + uint32 swap_snrdrop0; |
---|
| 2001 | + uint32 swap_snrdrop1; |
---|
| 2002 | + uint32 mws_antsel_ovr_tx; |
---|
| 2003 | + uint32 mws_antsel_ovr_rx; |
---|
| 2004 | + uint32 swap_trig_event_id; |
---|
| 2005 | +}; |
---|
1338 | 2006 | |
---|
1339 | 2007 | #define WLC_NUMRATES 16 /**< max # of rates in a rateset */ |
---|
1340 | 2008 | |
---|
1341 | | -typedef struct wlc_rateset { |
---|
1342 | | - uint32 count; /**< number of rates in rates[] */ |
---|
1343 | | - uint8 rates[WLC_NUMRATES]; /**< rates in 500kbps units w/hi bit set if basic */ |
---|
1344 | | - uint8 htphy_membership; /**< HT PHY Membership */ |
---|
1345 | | - uint8 mcs[MCSSET_LEN]; /**< supported mcs index bit map */ |
---|
1346 | | - uint16 vht_mcsmap; /**< supported vht mcs nss bit map */ |
---|
1347 | | - uint16 vht_mcsmap_prop; /**< supported prop vht mcs nss bit map */ |
---|
1348 | | -} wlc_rateset_t; |
---|
1349 | | - |
---|
1350 | | -/* Used to get specific STA parameters */ |
---|
| 2009 | +/**Used to get specific STA parameters */ |
---|
1351 | 2010 | typedef struct { |
---|
1352 | 2011 | uint32 val; |
---|
1353 | 2012 | struct ether_addr ea; |
---|
| 2013 | + uint16 PAD; |
---|
1354 | 2014 | } scb_val_t; |
---|
1355 | 2015 | |
---|
1356 | | -/* Used by iovar versions of some ioctls, i.e. WLC_SCB_AUTHORIZE et al */ |
---|
| 2016 | +/**Used by iovar versions of some ioctls, i.e. WLC_SCB_AUTHORIZE et al */ |
---|
1357 | 2017 | typedef struct { |
---|
1358 | 2018 | uint32 code; |
---|
1359 | 2019 | scb_val_t ioctl_args; |
---|
1360 | 2020 | } authops_t; |
---|
1361 | 2021 | |
---|
1362 | | -/* channel encoding */ |
---|
| 2022 | +/** channel encoding */ |
---|
1363 | 2023 | typedef struct channel_info { |
---|
1364 | | - int hw_channel; |
---|
1365 | | - int target_channel; |
---|
1366 | | - int scan_channel; |
---|
| 2024 | + int32 hw_channel; |
---|
| 2025 | + int32 target_channel; |
---|
| 2026 | + int32 scan_channel; |
---|
1367 | 2027 | } channel_info_t; |
---|
1368 | 2028 | |
---|
1369 | | -/* For ioctls that take a list of MAC addresses */ |
---|
| 2029 | +/** For ioctls that take a list of MAC addresses */ |
---|
1370 | 2030 | typedef struct maclist { |
---|
1371 | | - uint count; /**< number of MAC addresses */ |
---|
| 2031 | + uint32 count; /**< number of MAC addresses */ |
---|
1372 | 2032 | struct ether_addr ea[1]; /**< variable length array of MAC addresses */ |
---|
1373 | 2033 | } maclist_t; |
---|
1374 | 2034 | |
---|
1375 | | -struct peer_maclist { |
---|
1376 | | - uint16 count; /* number of MAC addresses */ |
---|
1377 | | - uint16 flag; /* to check if peering or cancellation has to be triggered in iovar */ |
---|
1378 | | - struct ether_addr ea[1]; /* variable length array of MAC addresses */ |
---|
1379 | | -}; |
---|
| 2035 | +typedef struct wds_client_info { |
---|
| 2036 | + char ifname[INTF_NAME_SIZ]; /* WDS ifname */ |
---|
| 2037 | + struct ether_addr ea; /* WDS client MAC address */ |
---|
| 2038 | +} wds_client_info_t; |
---|
1380 | 2039 | |
---|
1381 | | -/* get pkt count struct passed through ioctl */ |
---|
| 2040 | +#define WDS_MACLIST_MAGIC 0xFFFFFFFF |
---|
| 2041 | +#define WDS_MACLIST_VERSION 1 |
---|
| 2042 | + |
---|
| 2043 | +/* For wds MAC list ioctls */ |
---|
| 2044 | +typedef struct wds_maclist { |
---|
| 2045 | + uint32 count; /* Number of WDS clients */ |
---|
| 2046 | + uint32 magic; /* Magic number */ |
---|
| 2047 | + uint32 version; /* Version number */ |
---|
| 2048 | + struct wds_client_info client_list[1]; /* Variable length array of WDS clients */ |
---|
| 2049 | +} wds_maclist_t; |
---|
| 2050 | + |
---|
| 2051 | +/**get pkt count struct passed through ioctl */ |
---|
1382 | 2052 | typedef struct get_pktcnt { |
---|
1383 | | - uint rx_good_pkt; |
---|
1384 | | - uint rx_bad_pkt; |
---|
1385 | | - uint tx_good_pkt; |
---|
1386 | | - uint tx_bad_pkt; |
---|
1387 | | - uint rx_ocast_good_pkt; /* unicast packets destined for others */ |
---|
| 2053 | + uint32 rx_good_pkt; |
---|
| 2054 | + uint32 rx_bad_pkt; |
---|
| 2055 | + uint32 tx_good_pkt; |
---|
| 2056 | + uint32 tx_bad_pkt; |
---|
| 2057 | + uint32 rx_ocast_good_pkt; /**< unicast packets destined for others */ |
---|
1388 | 2058 | } get_pktcnt_t; |
---|
1389 | 2059 | |
---|
1390 | 2060 | /* NINTENDO2 */ |
---|
.. | .. |
---|
1396 | 2066 | #define LQ_STOP_MONITOR 0 |
---|
1397 | 2067 | #define LQ_START_MONITOR 1 |
---|
1398 | 2068 | |
---|
1399 | | -/* Get averages RSSI, Rx PHY rate and SNR values */ |
---|
| 2069 | +/** Get averages RSSI, Rx PHY rate and SNR values */ |
---|
| 2070 | +/* Link Quality */ |
---|
1400 | 2071 | typedef struct { |
---|
1401 | | - int rssi[LQ_IDX_LAST]; /* Array to keep min, max, avg rssi */ |
---|
1402 | | - int snr[LQ_IDX_LAST]; /* Array to keep min, max, avg snr */ |
---|
1403 | | - int isvalid; /* Flag indicating whether above data is valid */ |
---|
1404 | | -} wl_lq_t; /* Link Quality */ |
---|
| 2072 | + int32 rssi[LQ_IDX_LAST]; /**< Array to keep min, max, avg rssi */ |
---|
| 2073 | + int32 snr[LQ_IDX_LAST]; /**< Array to keep min, max, avg snr */ |
---|
| 2074 | + int32 isvalid; /**< Flag indicating whether above data is valid */ |
---|
| 2075 | +} wl_lq_t; |
---|
1405 | 2076 | |
---|
1406 | 2077 | typedef enum wl_wakeup_reason_type { |
---|
1407 | 2078 | LCD_ON = 1, |
---|
.. | .. |
---|
1412 | 2083 | } wl_wr_type_t; |
---|
1413 | 2084 | |
---|
1414 | 2085 | typedef struct { |
---|
1415 | | -/* Unique filter id */ |
---|
| 2086 | + /** Unique filter id */ |
---|
1416 | 2087 | uint32 id; |
---|
1417 | | - |
---|
1418 | | -/* stores the reason for the last wake up */ |
---|
| 2088 | + /** stores the reason for the last wake up */ |
---|
1419 | 2089 | uint8 reason; |
---|
| 2090 | + uint8 PAD[3]; |
---|
1420 | 2091 | } wl_wr_t; |
---|
1421 | 2092 | |
---|
1422 | | -/* Get MAC specific rate histogram command */ |
---|
| 2093 | +/** Get MAC specific rate histogram command */ |
---|
1423 | 2094 | typedef struct { |
---|
1424 | 2095 | struct ether_addr ea; /**< MAC Address */ |
---|
1425 | 2096 | uint8 ac_cat; /**< Access Category */ |
---|
1426 | 2097 | uint8 num_pkts; /**< Number of packet entries to be averaged */ |
---|
1427 | | -} wl_mac_ratehisto_cmd_t; /**< MAC Specific Rate Histogram command */ |
---|
1428 | | - |
---|
1429 | | -/* Get MAC rate histogram response */ |
---|
| 2098 | +} wl_mac_ratehisto_cmd_t; |
---|
| 2099 | +/** Get MAC rate histogram response */ |
---|
1430 | 2100 | typedef struct { |
---|
1431 | 2101 | uint32 rate[DOT11_RATE_MAX + 1]; /**< Rates */ |
---|
1432 | 2102 | uint32 mcs[WL_RATESET_SZ_HT_IOCTL * WL_TX_CHAINS_MAX]; /**< MCS counts */ |
---|
1433 | 2103 | uint32 vht[WL_RATESET_SZ_VHT_MCS][WL_TX_CHAINS_MAX]; /**< VHT counts */ |
---|
1434 | 2104 | uint32 tsf_timer[2][2]; /**< Start and End time for 8bytes value */ |
---|
1435 | | - uint32 prop11n_mcs[WLC_11N_LAST_PROP_MCS - WLC_11N_FIRST_PROP_MCS + 1]; /* MCS counts */ |
---|
1436 | | -} wl_mac_ratehisto_res_t; /**< MAC Specific Rate Histogram Response */ |
---|
| 2105 | + uint32 prop11n_mcs[WLC_11N_LAST_PROP_MCS - WLC_11N_FIRST_PROP_MCS + 1]; /** MCS counts */ |
---|
| 2106 | +} wl_mac_ratehisto_res_t; |
---|
1437 | 2107 | |
---|
1438 | | -/* Linux network driver ioctl encoding */ |
---|
| 2108 | +/* sta_info ecounters */ |
---|
| 2109 | +typedef struct { |
---|
| 2110 | + struct ether_addr ea; /* Station MAC addr */ |
---|
| 2111 | + struct ether_addr BSSID; /* BSSID of the BSS */ |
---|
| 2112 | + uint32 tx_pkts_fw_total; /* # FW generated sent successfully */ |
---|
| 2113 | + uint32 tx_pkts_fw_retries; /* # retries for FW generated frames */ |
---|
| 2114 | + uint32 tx_pkts_fw_retry_exhausted; /* # FW generated which |
---|
| 2115 | + * failed after retry |
---|
| 2116 | + */ |
---|
| 2117 | +} sta_info_ecounters_t; |
---|
| 2118 | + |
---|
| 2119 | +#define STAMON_MODULE_VER 1 |
---|
| 2120 | + |
---|
| 2121 | +/**Linux network driver ioctl encoding */ |
---|
1439 | 2122 | typedef struct wl_ioctl { |
---|
1440 | | - uint cmd; /**< common ioctl definition */ |
---|
| 2123 | + uint32 cmd; /**< common ioctl definition */ |
---|
1441 | 2124 | void *buf; /**< pointer to user buffer */ |
---|
1442 | | - uint len; /**< length of user buffer */ |
---|
| 2125 | + uint32 len; /**< length of user buffer */ |
---|
1443 | 2126 | uint8 set; /**< 1=set IOCTL; 0=query IOCTL */ |
---|
1444 | | - uint used; /**< bytes read or written (optional) */ |
---|
1445 | | - uint needed; /**< bytes needed (optional) */ |
---|
| 2127 | + uint32 used; /**< bytes read or written (optional) */ |
---|
| 2128 | + uint32 needed; /**< bytes needed (optional) */ |
---|
1446 | 2129 | } wl_ioctl_t; |
---|
1447 | 2130 | |
---|
1448 | | -#ifdef CONFIG_COMPAT |
---|
1449 | | -typedef struct compat_wl_ioctl { |
---|
1450 | | - uint cmd; /**< common ioctl definition */ |
---|
1451 | | - uint32 buf; /**< pointer to user buffer */ |
---|
1452 | | - uint len; /**< length of user buffer */ |
---|
1453 | | - uint8 set; /**< 1=set IOCTL; 0=query IOCTL */ |
---|
1454 | | - uint used; /**< bytes read or written (optional) */ |
---|
1455 | | - uint needed; /**< bytes needed (optional) */ |
---|
1456 | | -} compat_wl_ioctl_t; |
---|
1457 | | -#endif /* CONFIG_COMPAT */ |
---|
1458 | | - |
---|
1459 | | -#define WL_NUM_RATES_CCK 4 /* 1, 2, 5.5, 11 Mbps */ |
---|
1460 | | -#define WL_NUM_RATES_OFDM 8 /* 6, 9, 12, 18, 24, 36, 48, 54 Mbps SISO/CDD */ |
---|
1461 | | -#define WL_NUM_RATES_MCS_1STREAM 8 /* MCS 0-7 1-stream rates - SISO/CDD/STBC/MCS */ |
---|
1462 | | -#define WL_NUM_RATES_EXTRA_VHT 2 /* Additional VHT 11AC rates */ |
---|
1463 | | -#define WL_NUM_RATES_VHT 10 |
---|
1464 | | -#define WL_NUM_RATES_MCS32 1 |
---|
1465 | | - |
---|
| 2131 | +#define WL_NUM_RATES_CCK 4 /**< 1, 2, 5.5, 11 Mbps */ |
---|
| 2132 | +#define WL_NUM_RATES_OFDM 8 /**< 6, 9, 12, 18, 24, 36, 48, 54 Mbps SISO/CDD */ |
---|
| 2133 | +#define WL_NUM_RATES_MCS_1STREAM 8 /**< MCS 0-7 1-stream rates - SISO/CDD/STBC/MCS */ |
---|
| 2134 | +#define WL_NUM_RATES_EXTRA_VHT 2 /**< Additional VHT 11AC rates */ |
---|
| 2135 | +#define WL_NUM_RATES_VHT 10 |
---|
| 2136 | +#define WL_NUM_RATES_VHT_ALL (WL_NUM_RATES_VHT + WL_NUM_RATES_EXTRA_VHT) |
---|
| 2137 | +#define WL_NUM_RATES_HE 12 |
---|
| 2138 | +#define WL_NUM_RATES_MCS32 1 |
---|
| 2139 | +#define UC_URL_LEN 128u /**< uCode URL length */ |
---|
1466 | 2140 | |
---|
1467 | 2141 | /* |
---|
1468 | 2142 | * Structure for passing hardware and software |
---|
1469 | 2143 | * revision info up from the driver. |
---|
1470 | 2144 | */ |
---|
1471 | 2145 | typedef struct wlc_rev_info { |
---|
1472 | | - uint vendorid; /**< PCI vendor id */ |
---|
1473 | | - uint deviceid; /**< device id of chip */ |
---|
1474 | | - uint radiorev; /**< radio revision */ |
---|
1475 | | - uint chiprev; /**< chip revision */ |
---|
1476 | | - uint corerev; /**< core revision */ |
---|
1477 | | - uint boardid; /**< board identifier (usu. PCI sub-device id) */ |
---|
1478 | | - uint boardvendor; /**< board vendor (usu. PCI sub-vendor id) */ |
---|
1479 | | - uint boardrev; /**< board revision */ |
---|
1480 | | - uint driverrev; /**< driver version */ |
---|
1481 | | - uint ucoderev; /**< microcode version */ |
---|
1482 | | - uint bus; /**< bus type */ |
---|
1483 | | - uint chipnum; /**< chip number */ |
---|
1484 | | - uint phytype; /**< phy type */ |
---|
1485 | | - uint phyrev; /**< phy revision */ |
---|
1486 | | - uint anarev; /**< anacore rev */ |
---|
1487 | | - uint chippkg; /**< chip package info */ |
---|
1488 | | - uint nvramrev; /**< nvram revision number */ |
---|
| 2146 | + uint32 vendorid; /**< PCI vendor id */ |
---|
| 2147 | + uint32 deviceid; /**< device id of chip */ |
---|
| 2148 | + uint32 radiorev; /**< radio revision */ |
---|
| 2149 | + uint32 chiprev; /**< chip revision */ |
---|
| 2150 | + uint32 corerev; /**< core revision */ |
---|
| 2151 | + uint32 boardid; /**< board identifier (usu. PCI sub-device id) */ |
---|
| 2152 | + uint32 boardvendor; /**< board vendor (usu. PCI sub-vendor id) */ |
---|
| 2153 | + uint32 boardrev; /**< board revision */ |
---|
| 2154 | + uint32 driverrev; /**< driver version */ |
---|
| 2155 | + uint32 ucoderev; /**< uCode version */ |
---|
| 2156 | + uint32 bus; /**< bus type */ |
---|
| 2157 | + uint32 chipnum; /**< chip number */ |
---|
| 2158 | + uint32 phytype; /**< phy type */ |
---|
| 2159 | + uint32 phyrev; /**< phy revision */ |
---|
| 2160 | + uint32 anarev; /**< anacore rev */ |
---|
| 2161 | + uint32 chippkg; /**< chip package info */ |
---|
| 2162 | + uint32 nvramrev; /**< nvram revision number */ |
---|
| 2163 | + uint32 phyminorrev; /**< phy minor rev */ |
---|
| 2164 | + uint32 coreminorrev; /**< core minor rev */ |
---|
| 2165 | + uint32 drvrev_major; /**< driver version: major */ |
---|
| 2166 | + uint32 drvrev_minor; /**< driver version: minor */ |
---|
| 2167 | + uint32 drvrev_rc; /**< driver version: rc */ |
---|
| 2168 | + uint32 drvrev_rc_inc; /**< driver version: rc incremental */ |
---|
| 2169 | + uint16 ucodeprebuilt; /**< uCode prebuilt flag */ |
---|
| 2170 | + uint16 ucodediffct; /**< uCode diff count */ |
---|
| 2171 | + uchar ucodeurl[UC_URL_LEN]; /**< uCode repo URL@cmt_id */ |
---|
1489 | 2172 | } wlc_rev_info_t; |
---|
1490 | 2173 | |
---|
1491 | 2174 | #define WL_REV_INFO_LEGACY_LENGTH 48 |
---|
1492 | 2175 | |
---|
1493 | 2176 | #define WL_BRAND_MAX 10 |
---|
1494 | 2177 | typedef struct wl_instance_info { |
---|
1495 | | - uint instance; |
---|
1496 | | - char brand[WL_BRAND_MAX]; |
---|
| 2178 | + uint32 instance; |
---|
| 2179 | + int8 brand[WL_BRAND_MAX]; |
---|
| 2180 | + int8 PAD[4-(WL_BRAND_MAX%4)]; |
---|
1497 | 2181 | } wl_instance_info_t; |
---|
1498 | 2182 | |
---|
1499 | | -/* structure to change size of tx fifo */ |
---|
| 2183 | +/** structure to change size of tx fifo */ |
---|
1500 | 2184 | typedef struct wl_txfifo_sz { |
---|
1501 | 2185 | uint16 magic; |
---|
1502 | 2186 | uint16 fifo; |
---|
.. | .. |
---|
1504 | 2188 | } wl_txfifo_sz_t; |
---|
1505 | 2189 | |
---|
1506 | 2190 | /* Transfer info about an IOVar from the driver */ |
---|
1507 | | -/* Max supported IOV name size in bytes, + 1 for nul termination */ |
---|
1508 | | -#define WLC_IOV_NAME_LEN 30 |
---|
| 2191 | +/**Max supported IOV name size in bytes, + 1 for nul termination */ |
---|
| 2192 | +#define WLC_IOV_NAME_LEN (32 + 1) |
---|
| 2193 | + |
---|
1509 | 2194 | typedef struct wlc_iov_trx_s { |
---|
1510 | 2195 | uint8 module; |
---|
1511 | 2196 | uint8 type; |
---|
1512 | 2197 | char name[WLC_IOV_NAME_LEN]; |
---|
1513 | 2198 | } wlc_iov_trx_t; |
---|
1514 | 2199 | |
---|
1515 | | -/* bump this number if you change the ioctl interface */ |
---|
| 2200 | +/** bump this number if you change the ioctl interface */ |
---|
1516 | 2201 | #define WLC_IOCTL_VERSION 2 |
---|
1517 | 2202 | #define WLC_IOCTL_VERSION_LEGACY_IOTYPES 1 |
---|
1518 | | - |
---|
1519 | | -#ifdef CONFIG_USBRNDIS_RETAIL |
---|
1520 | | -/* struct passed in for WLC_NDCONFIG_ITEM */ |
---|
1521 | | -typedef struct { |
---|
1522 | | - char *name; |
---|
1523 | | - void *param; |
---|
1524 | | -} ndconfig_item_t; |
---|
1525 | | -#endif |
---|
1526 | | - |
---|
1527 | | - |
---|
| 2203 | +/* ifdef EXT_STA */ |
---|
| 2204 | +typedef struct _wl_assoc_result { |
---|
| 2205 | + ulong associated; |
---|
| 2206 | + ulong NDIS_auth; |
---|
| 2207 | + ulong NDIS_infra; |
---|
| 2208 | +} wl_assoc_result_t; |
---|
| 2209 | +/* EXT_STA */ |
---|
1528 | 2210 | |
---|
1529 | 2211 | #define WL_PHY_PAVARS_LEN 32 /**< Phytype, Bandrange, chain, a[0], b[0], c[0], d[0] .. */ |
---|
1530 | | - |
---|
1531 | 2212 | |
---|
1532 | 2213 | #define WL_PHY_PAVAR_VER 1 /**< pavars version */ |
---|
1533 | 2214 | #define WL_PHY_PAVARS2_NUM 3 /**< a1, b0, b1 */ |
---|
.. | .. |
---|
1545 | 2226 | uint16 phy_type; /**< Phy type */ |
---|
1546 | 2227 | uint16 band; |
---|
1547 | 2228 | uint16 cckpo; |
---|
| 2229 | + uint16 PAD; |
---|
1548 | 2230 | uint32 ofdmpo; |
---|
1549 | 2231 | uint16 mcspo[8]; |
---|
1550 | 2232 | } wl_po_t; |
---|
.. | .. |
---|
1556 | 2238 | uint16 update; |
---|
1557 | 2239 | } wl_rpcal_t; |
---|
1558 | 2240 | |
---|
| 2241 | +#define WL_NUM_RPCALPHASEVARS 5 /* number of rpcal phase vars */ |
---|
| 2242 | + |
---|
| 2243 | +typedef struct wl_rpcal_phase { |
---|
| 2244 | + uint16 value; |
---|
| 2245 | + uint16 update; |
---|
| 2246 | +} wl_rpcal_phase_t; |
---|
| 2247 | + |
---|
1559 | 2248 | typedef struct wl_aci_args { |
---|
1560 | | - int enter_aci_thresh; /* Trigger level to start detecting ACI */ |
---|
1561 | | - int exit_aci_thresh; /* Trigger level to exit ACI mode */ |
---|
1562 | | - int usec_spin; /* microsecs to delay between rssi samples */ |
---|
1563 | | - int glitch_delay; /* interval between ACI scans when glitch count is consistently high */ |
---|
| 2249 | + int32 enter_aci_thresh; /* Trigger level to start detecting ACI */ |
---|
| 2250 | + int32 exit_aci_thresh; /* Trigger level to exit ACI mode */ |
---|
| 2251 | + int32 usec_spin; /* microsecs to delay between rssi samples */ |
---|
| 2252 | + int32 glitch_delay; /* interval between ACI scans when glitch count is consistently high */ |
---|
1564 | 2253 | uint16 nphy_adcpwr_enter_thresh; /**< ADC power to enter ACI mitigation mode */ |
---|
1565 | 2254 | uint16 nphy_adcpwr_exit_thresh; /**< ADC power to exit ACI mitigation mode */ |
---|
1566 | 2255 | uint16 nphy_repeat_ctr; /**< Number of tries per channel to compute power */ |
---|
.. | .. |
---|
1569 | 2258 | uint16 nphy_b_energy_lo_aci; /**< low ACI power energy threshold for bphy */ |
---|
1570 | 2259 | uint16 nphy_b_energy_md_aci; /**< mid ACI power energy threshold for bphy */ |
---|
1571 | 2260 | uint16 nphy_b_energy_hi_aci; /**< high ACI power energy threshold for bphy */ |
---|
1572 | | - uint16 nphy_noise_noassoc_glitch_th_up; /* wl interference 4 */ |
---|
| 2261 | + uint16 nphy_noise_noassoc_glitch_th_up; /**< wl interference 4 */ |
---|
1573 | 2262 | uint16 nphy_noise_noassoc_glitch_th_dn; |
---|
1574 | 2263 | uint16 nphy_noise_assoc_glitch_th_up; |
---|
1575 | 2264 | uint16 nphy_noise_assoc_glitch_th_dn; |
---|
.. | .. |
---|
1588 | 2277 | typedef struct wl_samplecollect_args { |
---|
1589 | 2278 | /* version 0 fields */ |
---|
1590 | 2279 | uint8 coll_us; |
---|
1591 | | - int cores; |
---|
| 2280 | + uint8 PAD[3]; |
---|
| 2281 | + int32 cores; |
---|
1592 | 2282 | /* add'l version 1 fields */ |
---|
1593 | | - uint16 version; /* see definition of WL_SAMPLECOLLECT_T_VERSION */ |
---|
1594 | | - uint16 length; /* length of entire structure */ |
---|
| 2283 | + uint16 version; /**< see definition of WL_SAMPLECOLLECT_T_VERSION */ |
---|
| 2284 | + uint16 length; /**< length of entire structure */ |
---|
1595 | 2285 | int8 trigger; |
---|
| 2286 | + uint8 PAD; |
---|
1596 | 2287 | uint16 timeout; |
---|
1597 | 2288 | uint16 mode; |
---|
| 2289 | + uint16 PAD; |
---|
1598 | 2290 | uint32 pre_dur; |
---|
1599 | 2291 | uint32 post_dur; |
---|
1600 | 2292 | uint8 gpio_sel; |
---|
.. | .. |
---|
1607 | 2299 | uint8 module_sel1; |
---|
1608 | 2300 | uint8 module_sel2; |
---|
1609 | 2301 | uint16 nsamps; |
---|
1610 | | - int bitStart; |
---|
| 2302 | + uint16 PAD; |
---|
| 2303 | + int32 bitStart; |
---|
1611 | 2304 | uint32 gpioCapMask; |
---|
| 2305 | + uint8 gpio_collection; |
---|
| 2306 | + uint8 PAD[3]; |
---|
1612 | 2307 | } wl_samplecollect_args_t; |
---|
1613 | 2308 | |
---|
1614 | 2309 | #define WL_SAMPLEDATA_T_VERSION 1 /**< version of wl_samplecollect_args_t struct */ |
---|
.. | .. |
---|
1623 | 2318 | uint32 flag; /**< bit def */ |
---|
1624 | 2319 | } wl_sampledata_t; |
---|
1625 | 2320 | |
---|
1626 | | - |
---|
1627 | 2321 | /* WL_OTA START */ |
---|
1628 | 2322 | /* OTA Test Status */ |
---|
1629 | 2323 | enum { |
---|
1630 | | - WL_OTA_TEST_IDLE = 0, /**< Default Idle state */ |
---|
1631 | | - WL_OTA_TEST_ACTIVE = 1, /**< Test Running */ |
---|
| 2324 | + WL_OTA_TEST_IDLE = 0, /**< Default Idle state */ |
---|
| 2325 | + WL_OTA_TEST_ACTIVE = 1, /**< Test Running */ |
---|
1632 | 2326 | WL_OTA_TEST_SUCCESS = 2, /**< Successfully Finished Test */ |
---|
1633 | | - WL_OTA_TEST_FAIL = 3 /**< Test Failed in the Middle */ |
---|
| 2327 | + WL_OTA_TEST_FAIL = 3 /**< Test Failed in the Middle */ |
---|
1634 | 2328 | }; |
---|
| 2329 | + |
---|
1635 | 2330 | /* OTA SYNC Status */ |
---|
1636 | 2331 | enum { |
---|
1637 | 2332 | WL_OTA_SYNC_IDLE = 0, /**< Idle state */ |
---|
.. | .. |
---|
1642 | 2337 | /* Various error states dut can get stuck during test */ |
---|
1643 | 2338 | enum { |
---|
1644 | 2339 | WL_OTA_SKIP_TEST_CAL_FAIL = 1, /**< Phy calibration failed */ |
---|
1645 | | - WL_OTA_SKIP_TEST_SYNCH_FAIL = 2, /**< Sync Packet not recieved */ |
---|
| 2340 | + WL_OTA_SKIP_TEST_SYNCH_FAIL = 2, /**< Sync Packet not recieved */ |
---|
1646 | 2341 | WL_OTA_SKIP_TEST_FILE_DWNLD_FAIL = 3, /**< Cmd flow file download failed */ |
---|
1647 | 2342 | WL_OTA_SKIP_TEST_NO_TEST_FOUND = 4, /**< No test found in Flow file */ |
---|
1648 | 2343 | WL_OTA_SKIP_TEST_WL_NOT_UP = 5, /**< WL UP failed */ |
---|
.. | .. |
---|
1662 | 2357 | WL_OTA_TEST_BW_40MHZ = 2, /**< full 40Mhz operation */ |
---|
1663 | 2358 | WL_OTA_TEST_BW_80MHZ = 3 /* full 80Mhz operation */ |
---|
1664 | 2359 | }; |
---|
1665 | | - |
---|
1666 | 2360 | #define HT_MCS_INUSE 0x00000080 /* HT MCS in use,indicates b0-6 holds an mcs */ |
---|
1667 | 2361 | #define VHT_MCS_INUSE 0x00000100 /* VHT MCS in use,indicates b0-6 holds an mcs */ |
---|
1668 | 2362 | #define OTA_RATE_MASK 0x0000007f /* rate/mcs value */ |
---|
.. | .. |
---|
1673 | 2367 | |
---|
1674 | 2368 | typedef struct ota_rate_info { |
---|
1675 | 2369 | uint8 rate_cnt; /**< Total number of rates */ |
---|
| 2370 | + uint8 PAD; |
---|
1676 | 2371 | uint16 rate_val_mbps[WL_OTA_TEST_MAX_NUM_RATE]; /**< array of rates from 1mbps to 130mbps */ |
---|
1677 | 2372 | /**< for legacy rates : ratein mbps * 2 */ |
---|
1678 | 2373 | /**< for HT rates : mcs index */ |
---|
.. | .. |
---|
1686 | 2381 | } ota_power_info_t; |
---|
1687 | 2382 | |
---|
1688 | 2383 | typedef struct ota_packetengine { |
---|
1689 | | - uint16 delay; /* Inter-packet delay */ |
---|
| 2384 | + uint16 delay; /**< Inter-packet delay */ |
---|
1690 | 2385 | /**< for ota_tx, delay is tx ifs in micro seconds */ |
---|
1691 | 2386 | /* for ota_rx, delay is wait time in milliseconds */ |
---|
1692 | | - uint16 nframes; /* Number of frames */ |
---|
1693 | | - uint16 length; /* Packet length */ |
---|
| 2387 | + uint16 nframes; /**< Number of frames */ |
---|
| 2388 | + uint16 length; /**< Packet length */ |
---|
1694 | 2389 | } ota_packetengine_t; |
---|
1695 | 2390 | |
---|
1696 | | -/* Test info vector */ |
---|
| 2391 | +/* |
---|
| 2392 | + * OTA txant/rxant parameter |
---|
| 2393 | + * bit7-4: 4 bits swdiv_tx/rx_policy bitmask, specify antenna-policy for SW diversity |
---|
| 2394 | + * bit3-0: 4 bits TxCore bitmask, specify cores used for transmit frames |
---|
| 2395 | + * (maximum spatial expansion) |
---|
| 2396 | + */ |
---|
| 2397 | +#define WL_OTA_TEST_ANT_MASK 0xF0 |
---|
| 2398 | +#define WL_OTA_TEST_CORE_MASK 0x0F |
---|
| 2399 | + |
---|
| 2400 | +/* OTA txant/rxant 'ant_mask' field; map to Tx/Rx antenna policy for SW diversity */ |
---|
| 2401 | +enum { |
---|
| 2402 | + WL_OTA_TEST_FORCE_ANT0 = 0x10, /* force antenna to Ant 0 */ |
---|
| 2403 | + WL_OTA_TEST_FORCE_ANT1 = 0x20, /* force antenna to Ant 1 */ |
---|
| 2404 | +}; |
---|
| 2405 | + |
---|
| 2406 | +/* antenna/core fields access */ |
---|
| 2407 | +#define WL_OTA_TEST_GET_ANT(_txant) ((_txant) & WL_OTA_TEST_ANT_MASK) |
---|
| 2408 | +#define WL_OTA_TEST_GET_CORE(_txant) ((_txant) & WL_OTA_TEST_CORE_MASK) |
---|
| 2409 | + |
---|
| 2410 | +/** Test info vector */ |
---|
1697 | 2411 | typedef struct wl_ota_test_args { |
---|
1698 | 2412 | uint8 cur_test; /**< test phase */ |
---|
1699 | 2413 | uint8 chan; /**< channel */ |
---|
1700 | 2414 | uint8 bw; /**< bandwidth */ |
---|
1701 | 2415 | uint8 control_band; /**< control band */ |
---|
1702 | 2416 | uint8 stf_mode; /**< stf mode */ |
---|
| 2417 | + uint8 PAD; |
---|
1703 | 2418 | ota_rate_info_t rt_info; /**< Rate info */ |
---|
1704 | 2419 | ota_packetengine_t pkteng; /**< packeteng info */ |
---|
1705 | 2420 | uint8 txant; /**< tx antenna */ |
---|
.. | .. |
---|
1708 | 2423 | uint8 wait_for_sync; /**< wait for sync or not */ |
---|
1709 | 2424 | uint8 ldpc; |
---|
1710 | 2425 | uint8 sgi; |
---|
| 2426 | + uint8 PAD; |
---|
1711 | 2427 | /* Update WL_OTA_TESTVEC_T_VERSION for adding new members to this structure */ |
---|
1712 | 2428 | } wl_ota_test_args_t; |
---|
1713 | 2429 | |
---|
.. | .. |
---|
1727 | 2443 | /* Update WL_OTA_TESTVEC_T_VERSION for adding new members to this structure */ |
---|
1728 | 2444 | } wl_ota_test_vector_t; |
---|
1729 | 2445 | |
---|
1730 | | - |
---|
1731 | | -/* struct copied back form dongle to host to query the status */ |
---|
| 2446 | +/** struct copied back form dongle to host to query the status */ |
---|
1732 | 2447 | typedef struct wl_ota_test_status { |
---|
1733 | 2448 | int16 cur_test_cnt; /**< test phase */ |
---|
1734 | 2449 | int8 skip_test_reason; /**< skip test reasoin */ |
---|
| 2450 | + uint8 PAD; |
---|
1735 | 2451 | wl_ota_test_args_t test_arg; /**< cur test arg details */ |
---|
1736 | 2452 | uint16 test_cnt; /**< total no of test downloaded */ |
---|
1737 | 2453 | uint8 file_dwnld_valid; /**< file successfully downloaded ? */ |
---|
.. | .. |
---|
1741 | 2457 | struct ether_addr tx_mac; /**< tx mac address */ |
---|
1742 | 2458 | struct ether_addr rx_mac; /**< rx mac address */ |
---|
1743 | 2459 | uint8 test_stage; /**< check the test status */ |
---|
1744 | | - int8 loop_test; /**< Debug feature to puts test enfine in a loop */ |
---|
| 2460 | + int8 loop_test; /**< Debug feature to puts test enfine in a loop */ |
---|
1745 | 2461 | uint8 sync_status; /**< sync status */ |
---|
1746 | 2462 | } wl_ota_test_status_t; |
---|
| 2463 | + |
---|
| 2464 | +/* FOR ioctl that take the sta monitor information */ |
---|
| 2465 | +typedef struct stamon_data { |
---|
| 2466 | + struct ether_addr ea; |
---|
| 2467 | + uint8 PAD[2]; |
---|
| 2468 | + int32 rssi; |
---|
| 2469 | +} stamon_data_t; |
---|
| 2470 | + |
---|
| 2471 | +typedef struct stamon_info { |
---|
| 2472 | + int32 version; |
---|
| 2473 | + uint32 count; |
---|
| 2474 | + stamon_data_t sta_data[1]; |
---|
| 2475 | +} stamon_info_t; |
---|
| 2476 | + |
---|
1747 | 2477 | typedef struct wl_ota_rx_rssi { |
---|
1748 | 2478 | uint16 pktcnt; /* Pkt count used for this rx test */ |
---|
1749 | 2479 | chanspec_t chanspec; /* Channel info on which the packets are received */ |
---|
.. | .. |
---|
1761 | 2491 | |
---|
1762 | 2492 | /* WL_OTA END */ |
---|
1763 | 2493 | |
---|
1764 | | -/* wl_radar_args_t */ |
---|
| 2494 | +/**wl_radar_args_t */ |
---|
1765 | 2495 | typedef struct { |
---|
1766 | | - int npulses; /**< required number of pulses at n * t_int */ |
---|
1767 | | - int ncontig; /**< required number of pulses at t_int */ |
---|
1768 | | - int min_pw; /**< minimum pulse width (20 MHz clocks) */ |
---|
1769 | | - int max_pw; /**< maximum pulse width (20 MHz clocks) */ |
---|
| 2496 | + int32 npulses; /**< required number of pulses at n * t_int */ |
---|
| 2497 | + int32 ncontig; /**< required number of pulses at t_int */ |
---|
| 2498 | + int32 min_pw; /**< minimum pulse width (20 MHz clocks) */ |
---|
| 2499 | + int32 max_pw; /**< maximum pulse width (20 MHz clocks) */ |
---|
1770 | 2500 | uint16 thresh0; /**< Radar detection, thresh 0 */ |
---|
1771 | 2501 | uint16 thresh1; /**< Radar detection, thresh 1 */ |
---|
1772 | 2502 | uint16 blank; /**< Radar detection, blank control */ |
---|
1773 | 2503 | uint16 fmdemodcfg; /**< Radar detection, fmdemod config */ |
---|
1774 | | - int npulses_lp; /* Radar detection, minimum long pulses */ |
---|
1775 | | - int min_pw_lp; /* Minimum pulsewidth for long pulses */ |
---|
1776 | | - int max_pw_lp; /* Maximum pulsewidth for long pulses */ |
---|
1777 | | - int min_fm_lp; /* Minimum fm for long pulses */ |
---|
1778 | | - int max_span_lp; /* Maximum deltat for long pulses */ |
---|
1779 | | - int min_deltat; /* Minimum spacing between pulses */ |
---|
1780 | | - int max_deltat; /* Maximum spacing between pulses */ |
---|
| 2504 | + int32 npulses_lp; /**< Radar detection, minimum long pulses */ |
---|
| 2505 | + int32 min_pw_lp; /**< Minimum pulsewidth for long pulses */ |
---|
| 2506 | + int32 max_pw_lp; /**< Maximum pulsewidth for long pulses */ |
---|
| 2507 | + int32 min_fm_lp; /**< Minimum fm for long pulses */ |
---|
| 2508 | + int32 max_span_lp; /**< Maximum deltat for long pulses */ |
---|
| 2509 | + int32 min_deltat; /**< Minimum spacing between pulses */ |
---|
| 2510 | + int32 max_deltat; /**< Maximum spacing between pulses */ |
---|
1781 | 2511 | uint16 autocorr; /**< Radar detection, autocorr on or off */ |
---|
1782 | 2512 | uint16 st_level_time; /**< Radar detection, start_timing level */ |
---|
1783 | | - uint16 t2_min; /* minimum clocks needed to remain in state 2 */ |
---|
1784 | | - uint32 version; /* version */ |
---|
| 2513 | + uint16 t2_min; /**< minimum clocks needed to remain in state 2 */ |
---|
| 2514 | + uint8 PAD[2]; |
---|
| 2515 | + uint32 version; /**< version */ |
---|
1785 | 2516 | uint32 fra_pulse_err; /**< sample error margin for detecting French radar pulsed */ |
---|
1786 | | - int npulses_fra; /* Radar detection, minimum French pulses set */ |
---|
1787 | | - int npulses_stg2; /* Radar detection, minimum staggered-2 pulses set */ |
---|
1788 | | - int npulses_stg3; /* Radar detection, minimum staggered-3 pulses set */ |
---|
| 2517 | + int32 npulses_fra; /**< Radar detection, minimum French pulses set */ |
---|
| 2518 | + int32 npulses_stg2; /**< Radar detection, minimum staggered-2 pulses set */ |
---|
| 2519 | + int32 npulses_stg3; /**< Radar detection, minimum staggered-3 pulses set */ |
---|
1789 | 2520 | uint16 percal_mask; /**< defines which period cal is masked from radar detection */ |
---|
1790 | | - int quant; /**< quantization resolution to pulse positions */ |
---|
| 2521 | + uint8 PAD[2]; |
---|
| 2522 | + int32 quant; /**< quantization resolution to pulse positions */ |
---|
1791 | 2523 | uint32 min_burst_intv_lp; /**< minimum burst to burst interval for bin3 radar */ |
---|
1792 | 2524 | uint32 max_burst_intv_lp; /**< maximum burst to burst interval for bin3 radar */ |
---|
1793 | | - int nskip_rst_lp; /**< number of skipped pulses before resetting lp buffer */ |
---|
1794 | | - int max_pw_tol; /**< maximum tolerance allowd in detected pulse width for radar detection */ |
---|
1795 | | - uint16 feature_mask; /* 16-bit mask to specify enabled features */ |
---|
| 2525 | + int32 nskip_rst_lp; /**< number of skipped pulses before resetting lp buffer */ |
---|
| 2526 | + int32 max_pw_tol; /* maximum tolerance allowd in detected pulse width for radar detection */ |
---|
| 2527 | + uint16 feature_mask; /**< 16-bit mask to specify enabled features */ |
---|
| 2528 | + uint16 thresh0_sc; /**< Radar detection, thresh 0 */ |
---|
| 2529 | + uint16 thresh1_sc; /**< Radar detection, thresh 1 */ |
---|
| 2530 | + uint8 PAD[2]; |
---|
1796 | 2531 | } wl_radar_args_t; |
---|
1797 | 2532 | |
---|
1798 | 2533 | #define WL_RADAR_ARGS_VERSION 2 |
---|
1799 | 2534 | |
---|
1800 | 2535 | typedef struct { |
---|
1801 | | - uint32 version; /* version */ |
---|
1802 | | - uint16 thresh0_20_lo; /* Radar detection, thresh 0 (range 5250-5350MHz) for BW 20MHz */ |
---|
1803 | | - uint16 thresh1_20_lo; /* Radar detection, thresh 1 (range 5250-5350MHz) for BW 20MHz */ |
---|
1804 | | - uint16 thresh0_40_lo; /* Radar detection, thresh 0 (range 5250-5350MHz) for BW 40MHz */ |
---|
1805 | | - uint16 thresh1_40_lo; /* Radar detection, thresh 1 (range 5250-5350MHz) for BW 40MHz */ |
---|
1806 | | - uint16 thresh0_80_lo; /* Radar detection, thresh 0 (range 5250-5350MHz) for BW 80MHz */ |
---|
1807 | | - uint16 thresh1_80_lo; /* Radar detection, thresh 1 (range 5250-5350MHz) for BW 80MHz */ |
---|
1808 | | - uint16 thresh0_20_hi; /* Radar detection, thresh 0 (range 5470-5725MHz) for BW 20MHz */ |
---|
1809 | | - uint16 thresh1_20_hi; /* Radar detection, thresh 1 (range 5470-5725MHz) for BW 20MHz */ |
---|
1810 | | - uint16 thresh0_40_hi; /* Radar detection, thresh 0 (range 5470-5725MHz) for BW 40MHz */ |
---|
1811 | | - uint16 thresh1_40_hi; /* Radar detection, thresh 1 (range 5470-5725MHz) for BW 40MHz */ |
---|
1812 | | - uint16 thresh0_80_hi; /* Radar detection, thresh 0 (range 5470-5725MHz) for BW 80MHz */ |
---|
1813 | | - uint16 thresh1_80_hi; /* Radar detection, thresh 1 (range 5470-5725MHz) for BW 80MHz */ |
---|
1814 | | -#ifdef WL11AC160 |
---|
1815 | | - uint16 thresh0_160_lo; /* Radar detection, thresh 0 (range 5250-5350MHz) for BW 160MHz */ |
---|
1816 | | - uint16 thresh1_160_lo; /* Radar detection, thresh 1 (range 5250-5350MHz) for BW 160MHz */ |
---|
1817 | | - uint16 thresh0_160_hi; /* Radar detection, thresh 0 (range 5470-5725MHz) for BW 160MHz */ |
---|
1818 | | - uint16 thresh1_160_hi; /* Radar detection, thresh 1 (range 5470-5725MHz) for BW 160MHz */ |
---|
1819 | | -#endif /* WL11AC160 */ |
---|
| 2536 | + uint32 version; /**< version */ |
---|
| 2537 | + uint16 thresh0_20_lo; /**< Radar detection, thresh 0 (range 5250-5350MHz) for BW 20MHz */ |
---|
| 2538 | + uint16 thresh1_20_lo; /**< Radar detection, thresh 1 (range 5250-5350MHz) for BW 20MHz */ |
---|
| 2539 | + uint16 thresh0_40_lo; /**< Radar detection, thresh 0 (range 5250-5350MHz) for BW 40MHz */ |
---|
| 2540 | + uint16 thresh1_40_lo; /**< Radar detection, thresh 1 (range 5250-5350MHz) for BW 40MHz */ |
---|
| 2541 | + uint16 thresh0_80_lo; /**< Radar detection, thresh 0 (range 5250-5350MHz) for BW 80MHz */ |
---|
| 2542 | + uint16 thresh1_80_lo; /**< Radar detection, thresh 1 (range 5250-5350MHz) for BW 80MHz */ |
---|
| 2543 | + uint16 thresh0_20_hi; /**< Radar detection, thresh 0 (range 5470-5725MHz) for BW 20MHz */ |
---|
| 2544 | + uint16 thresh1_20_hi; /**< Radar detection, thresh 1 (range 5470-5725MHz) for BW 20MHz */ |
---|
| 2545 | + uint16 thresh0_40_hi; /**< Radar detection, thresh 0 (range 5470-5725MHz) for BW 40MHz */ |
---|
| 2546 | + uint16 thresh1_40_hi; /**< Radar detection, thresh 1 (range 5470-5725MHz) for BW 40MHz */ |
---|
| 2547 | + uint16 thresh0_80_hi; /**< Radar detection, thresh 0 (range 5470-5725MHz) for BW 80MHz */ |
---|
| 2548 | + uint16 thresh1_80_hi; /**< Radar detection, thresh 1 (range 5470-5725MHz) for BW 80MHz */ |
---|
| 2549 | + uint16 thresh0_160_lo; /**< Radar detection, thresh 0 (range 5250-5350MHz) for BW 160MHz */ |
---|
| 2550 | + uint16 thresh1_160_lo; /**< Radar detection, thresh 1 (range 5250-5350MHz) for BW 160MHz */ |
---|
| 2551 | + uint16 thresh0_160_hi; /**< Radar detection, thresh 0 (range 5470-5725MHz) for BW 160MHz */ |
---|
| 2552 | + uint16 thresh1_160_hi; /**< Radar detection, thresh 1 (range 5470-5725MHz) for BW 160MHz */ |
---|
1820 | 2553 | } wl_radar_thr_t; |
---|
| 2554 | + |
---|
| 2555 | +typedef struct { |
---|
| 2556 | + uint32 version; /* version */ |
---|
| 2557 | + uint16 thresh0_sc_20_lo; |
---|
| 2558 | + uint16 thresh1_sc_20_lo; |
---|
| 2559 | + uint16 thresh0_sc_40_lo; |
---|
| 2560 | + uint16 thresh1_sc_40_lo; |
---|
| 2561 | + uint16 thresh0_sc_80_lo; |
---|
| 2562 | + uint16 thresh1_sc_80_lo; |
---|
| 2563 | + uint16 thresh0_sc_20_hi; |
---|
| 2564 | + uint16 thresh1_sc_20_hi; |
---|
| 2565 | + uint16 thresh0_sc_40_hi; |
---|
| 2566 | + uint16 thresh1_sc_40_hi; |
---|
| 2567 | + uint16 thresh0_sc_80_hi; |
---|
| 2568 | + uint16 thresh1_sc_80_hi; |
---|
| 2569 | + uint16 fc_varth_sb; |
---|
| 2570 | + uint16 fc_varth_bin5_sb; |
---|
| 2571 | + uint16 notradar_enb; |
---|
| 2572 | + uint16 max_notradar_lp; |
---|
| 2573 | + uint16 max_notradar; |
---|
| 2574 | + uint16 max_notradar_lp_sc; |
---|
| 2575 | + uint16 max_notradar_sc; |
---|
| 2576 | + uint16 highpow_war_enb; |
---|
| 2577 | + uint16 highpow_sp_ratio; //unit is 0.5 |
---|
| 2578 | +} wl_radar_thr2_t; |
---|
1821 | 2579 | |
---|
1822 | 2580 | #define WL_RADAR_THR_VERSION 2 |
---|
1823 | 2581 | |
---|
1824 | | -/* RSSI per antenna */ |
---|
| 2582 | +typedef struct { |
---|
| 2583 | + uint32 ver; |
---|
| 2584 | + uint32 len; |
---|
| 2585 | + int32 rssi_th[3]; |
---|
| 2586 | + uint8 rssi_gain_80[4]; |
---|
| 2587 | + uint8 rssi_gain_160[4]; |
---|
| 2588 | +} wl_dyn_switch_th_t; |
---|
| 2589 | + |
---|
| 2590 | +#define WL_PHY_DYN_SWITCH_TH_VERSION 1 |
---|
| 2591 | + |
---|
| 2592 | +/** RSSI per antenna */ |
---|
1825 | 2593 | typedef struct { |
---|
1826 | 2594 | uint32 version; /**< version field */ |
---|
1827 | 2595 | uint32 count; /**< number of valid antenna rssi */ |
---|
1828 | 2596 | int8 rssi_ant[WL_RSSI_ANT_MAX]; /**< rssi per antenna */ |
---|
| 2597 | + int8 rssi_sum; /**< summed rssi across all antennas */ |
---|
| 2598 | + int8 PAD[3]; |
---|
1829 | 2599 | } wl_rssi_ant_t; |
---|
1830 | 2600 | |
---|
1831 | | -/* data structure used in 'dfs_status' wl interface, which is used to query dfs status */ |
---|
| 2601 | +/* SNR per antenna */ |
---|
1832 | 2602 | typedef struct { |
---|
1833 | | - uint state; /**< noted by WL_DFS_CACSTATE_XX. */ |
---|
1834 | | - uint duration; /**< time spent in ms in state. */ |
---|
1835 | | - /* as dfs enters ISM state, it removes the operational channel from quiet channel |
---|
| 2603 | + uint32 version; /* version field */ |
---|
| 2604 | + uint32 count; /* number of valid antenna snr */ |
---|
| 2605 | + int8 snr_ant[WL_RSSI_ANT_MAX]; /* snr per antenna */ |
---|
| 2606 | +} wl_snr_ant_t; |
---|
| 2607 | + |
---|
| 2608 | +/** data structure used in 'dfs_status' wl interface, which is used to query dfs status */ |
---|
| 2609 | +typedef struct { |
---|
| 2610 | + uint32 state; /**< noted by WL_DFS_CACSTATE_XX. */ |
---|
| 2611 | + uint32 duration; /**< time spent in ms in state. */ |
---|
| 2612 | + /** |
---|
| 2613 | + * as dfs enters ISM state, it removes the operational channel from quiet channel |
---|
1836 | 2614 | * list and notes the channel in channel_cleared. set to 0 if no channel is cleared |
---|
1837 | 2615 | */ |
---|
1838 | 2616 | chanspec_t chanspec_cleared; |
---|
1839 | | - /* chanspec cleared used to be a uint, add another to uint16 to maintain size */ |
---|
| 2617 | + /** chanspec cleared used to be a uint32, add another to uint16 to maintain size */ |
---|
1840 | 2618 | uint16 pad; |
---|
1841 | 2619 | } wl_dfs_status_t; |
---|
1842 | 2620 | |
---|
1843 | 2621 | typedef struct { |
---|
1844 | | - uint state; /* noted by WL_DFS_CACSTATE_XX */ |
---|
1845 | | - uint duration; /* time spent in ms in state */ |
---|
| 2622 | + uint32 state; /* noted by WL_DFS_CACSTATE_XX */ |
---|
| 2623 | + uint32 duration; /* time spent in ms in state */ |
---|
1846 | 2624 | chanspec_t chanspec; /* chanspec of this core */ |
---|
1847 | 2625 | chanspec_t chanspec_last_cleared; /* chanspec last cleared for operation by scanning */ |
---|
1848 | 2626 | uint16 sub_type; /* currently just the index of the core or the respective PLL */ |
---|
.. | .. |
---|
1857 | 2635 | } wl_dfs_status_all_t; |
---|
1858 | 2636 | |
---|
1859 | 2637 | #define WL_DFS_AP_MOVE_VERSION (1) |
---|
1860 | | -typedef struct wl_dfs_ap_move_status { |
---|
| 2638 | + |
---|
| 2639 | +struct wl_dfs_ap_move_status_v1 { |
---|
| 2640 | + int16 dfs_status; /* DFS scan status */ |
---|
| 2641 | + chanspec_t chanspec; /* New AP Chanspec */ |
---|
| 2642 | + wl_dfs_status_t cac_status; /* CAC status */ |
---|
| 2643 | +}; |
---|
| 2644 | + |
---|
| 2645 | +typedef struct wl_dfs_ap_move_status_v2 { |
---|
1861 | 2646 | int8 version; /* version field; current max version 1 */ |
---|
1862 | 2647 | int8 move_status; /* DFS move status */ |
---|
1863 | 2648 | chanspec_t chanspec; /* New AP Chanspec */ |
---|
1864 | 2649 | wl_dfs_status_all_t scan_status; /* status; see dfs_status_all for wl_dfs_status_all_t */ |
---|
1865 | | -} wl_dfs_ap_move_status_t; |
---|
| 2650 | +} wl_dfs_ap_move_status_v2_t; |
---|
1866 | 2651 | |
---|
| 2652 | +#define WL_DFS_AP_MOVE_ABORT -1 /* Abort any dfs_ap_move in progress immediately */ |
---|
| 2653 | +#define WL_DFS_AP_MOVE_STUNT -2 /* Stunt move but continue background CSA if in progress */ |
---|
1867 | 2654 | |
---|
1868 | | -/* data structure used in 'radar_status' wl interface, which is use to query radar det status */ |
---|
| 2655 | +/** data structure used in 'radar_status' wl interface, which is use to query radar det status */ |
---|
1869 | 2656 | typedef struct { |
---|
1870 | | - bool detected; |
---|
1871 | | - int count; |
---|
1872 | | - bool pretended; |
---|
| 2657 | + uint8 detected; |
---|
| 2658 | + uint8 PAD[3]; |
---|
| 2659 | + int32 count; |
---|
| 2660 | + uint8 pretended; |
---|
| 2661 | + uint8 PAD[3]; |
---|
1873 | 2662 | uint32 radartype; |
---|
1874 | 2663 | uint32 timenow; |
---|
1875 | 2664 | uint32 timefromL; |
---|
1876 | | - int lp_csect_single; |
---|
1877 | | - int detected_pulse_index; |
---|
1878 | | - int nconsecq_pulses; |
---|
| 2665 | + int32 lp_csect_single; |
---|
| 2666 | + int32 detected_pulse_index; |
---|
| 2667 | + int32 nconsecq_pulses; |
---|
1879 | 2668 | chanspec_t ch; |
---|
1880 | | - int pw[10]; |
---|
1881 | | - int intv[10]; |
---|
1882 | | - int fm[10]; |
---|
| 2669 | + uint8 PAD[2]; |
---|
| 2670 | + int32 pw[10]; |
---|
| 2671 | + int32 intv[10]; |
---|
| 2672 | + int32 fm[10]; |
---|
1883 | 2673 | } wl_radar_status_t; |
---|
1884 | 2674 | |
---|
1885 | 2675 | #define NUM_PWRCTRL_RATES 12 |
---|
.. | .. |
---|
1908 | 2698 | |
---|
1909 | 2699 | typedef struct { |
---|
1910 | 2700 | uint32 flags; |
---|
1911 | | - chanspec_t chanspec; /* txpwr report for this channel */ |
---|
1912 | | - chanspec_t local_chanspec; /* channel on which we are associated */ |
---|
1913 | | - uint8 local_max; /* local max according to the AP */ |
---|
1914 | | - uint8 local_constraint; /* local constraint according to the AP */ |
---|
1915 | | - int8 antgain[2]; /* Ant gain for each band - from SROM */ |
---|
1916 | | - uint8 rf_cores; /* count of RF Cores being reported */ |
---|
1917 | | - uint8 est_Pout[4]; /* Latest tx power out estimate per RF |
---|
| 2701 | + chanspec_t chanspec; /**< txpwr report for this channel */ |
---|
| 2702 | + chanspec_t local_chanspec; /**< channel on which we are associated */ |
---|
| 2703 | + uint8 local_max; /**< local max according to the AP */ |
---|
| 2704 | + uint8 local_constraint; /**< local constraint according to the AP */ |
---|
| 2705 | + int8 antgain[2]; /**< Ant gain for each band - from SROM */ |
---|
| 2706 | + uint8 rf_cores; /**< count of RF Cores being reported */ |
---|
| 2707 | + uint8 est_Pout[4]; /**< Latest tx power out estimate per RF |
---|
1918 | 2708 | * chain without adjustment |
---|
1919 | 2709 | */ |
---|
1920 | | - uint8 est_Pout_cck; /* Latest CCK tx power out estimate */ |
---|
1921 | | - uint8 user_limit[WL_TX_POWER_RATES_LEGACY]; /* User limit */ |
---|
1922 | | - uint8 reg_limit[WL_TX_POWER_RATES_LEGACY]; /* Regulatory power limit */ |
---|
1923 | | - uint8 board_limit[WL_TX_POWER_RATES_LEGACY]; /* Max power board can support (SROM) */ |
---|
1924 | | - uint8 target[WL_TX_POWER_RATES_LEGACY]; /* Latest target power */ |
---|
| 2710 | + uint8 est_Pout_cck; /**< Latest CCK tx power out estimate */ |
---|
| 2711 | + uint8 user_limit[WL_TX_POWER_RATES_LEGACY]; /**< User limit */ |
---|
| 2712 | + uint8 reg_limit[WL_TX_POWER_RATES_LEGACY]; /**< Regulatory power limit */ |
---|
| 2713 | + uint8 board_limit[WL_TX_POWER_RATES_LEGACY]; /**< Max power board can support (SROM) */ |
---|
| 2714 | + uint8 target[WL_TX_POWER_RATES_LEGACY]; /**< Latest target power */ |
---|
| 2715 | + uint8 PAD[2]; |
---|
1925 | 2716 | } tx_power_legacy2_t; |
---|
1926 | 2717 | |
---|
1927 | 2718 | #define WL_NUM_2x2_ELEMENTS 4 |
---|
.. | .. |
---|
1941 | 2732 | #define WL_TXPPR_VERSION 1 |
---|
1942 | 2733 | #define WL_TXPPR_LENGTH (sizeof(wl_txppr_t)) |
---|
1943 | 2734 | #define TX_POWER_T_VERSION 45 |
---|
1944 | | -/* number of ppr serialization buffers, it should be reg, board and target */ |
---|
| 2735 | +/** number of ppr serialization buffers, it should be reg, board and target */ |
---|
1945 | 2736 | #define WL_TXPPR_SER_BUF_NUM (3) |
---|
| 2737 | +/* curpower ppr types */ |
---|
| 2738 | +enum { |
---|
| 2739 | + PPRTYPE_TARGETPOWER = 1, |
---|
| 2740 | + PPRTYPE_BOARDLIMITS = 2, |
---|
| 2741 | + PPRTYPE_REGLIMITS = 3 |
---|
| 2742 | +}; |
---|
1946 | 2743 | |
---|
1947 | 2744 | typedef struct chanspec_txpwr_max { |
---|
1948 | | - chanspec_t chanspec; /* chanspec */ |
---|
1949 | | - uint8 txpwr_max; /* max txpwr in all the rates */ |
---|
| 2745 | + chanspec_t chanspec; /**< chanspec */ |
---|
| 2746 | + uint8 txpwr_max; /**< max txpwr in all the rates */ |
---|
1950 | 2747 | uint8 padding; |
---|
1951 | 2748 | } chanspec_txpwr_max_t; |
---|
1952 | 2749 | |
---|
.. | .. |
---|
1969 | 2766 | typedef struct wl_txchain_pwr_offsets { |
---|
1970 | 2767 | int8 offset[WL_NUM_TXCHAIN_MAX]; /**< quarter dBm signed offset for each chain */ |
---|
1971 | 2768 | } wl_txchain_pwr_offsets_t; |
---|
1972 | | -/* maximum channels returned by the get valid channels iovar */ |
---|
| 2769 | + |
---|
| 2770 | +/** maximum channels returned by the get valid channels iovar */ |
---|
1973 | 2771 | #define WL_NUMCHANNELS 64 |
---|
| 2772 | +#define WL_NUMCHANNELS_MANY_CHAN 10 |
---|
| 2773 | +#define WL_ITER_LIMIT_MANY_CHAN 5 |
---|
| 2774 | + |
---|
| 2775 | +#define WL_MIMO_PS_CFG_VERSION_1 1 |
---|
| 2776 | + |
---|
| 2777 | +typedef struct wl_mimops_cfg { |
---|
| 2778 | + uint8 version; |
---|
| 2779 | + /* active_chains: 0 for all, 1 for 1 chain. */ |
---|
| 2780 | + uint8 active_chains; |
---|
| 2781 | + /* static (0) or dynamic (1).or disabled (3) Mode applies only when active_chains = 0. */ |
---|
| 2782 | + uint8 mode; |
---|
| 2783 | + /* bandwidth = Full (0), 20M (1), 40M (2), 80M (3). */ |
---|
| 2784 | + uint8 bandwidth; |
---|
| 2785 | + uint8 applychangesafterlearning; |
---|
| 2786 | + uint8 pad[3]; |
---|
| 2787 | +} wl_mimops_cfg_t; |
---|
| 2788 | + |
---|
| 2789 | +/* This event is for tracing MIMO PS metrics snapshot calls. |
---|
| 2790 | + * It is helpful to debug out-of-sync issue between |
---|
| 2791 | + * ucode SHM values and FW snapshot calculation. |
---|
| 2792 | + * It is part of the EVENT_LOG_TAG_MIMO_PS_TRACE. |
---|
| 2793 | + */ |
---|
| 2794 | +#define WL_MIMO_PS_METRICS_SNAPSHOT_TRACE_TYPE 0 |
---|
| 2795 | +typedef struct wl_mimo_ps_metrics_snapshot_trace { |
---|
| 2796 | + /* type field for this TLV: */ |
---|
| 2797 | + uint16 type; |
---|
| 2798 | + /* length field for this TLV */ |
---|
| 2799 | + uint16 len; |
---|
| 2800 | + uint32 idle_slotcnt_mimo; /* MIMO idle slotcnt raw SHM value */ |
---|
| 2801 | + uint32 last_idle_slotcnt_mimo; /* stored value snapshot */ |
---|
| 2802 | + uint32 idle_slotcnt_siso; /* SISO idle slotcnt raw SHM value */ |
---|
| 2803 | + uint32 last_idle_slotcnt_siso; /* stored value snapshot */ |
---|
| 2804 | + uint32 rx_time_mimo; /* Rx MIMO raw SHM value */ |
---|
| 2805 | + uint32 last_rx_time_mimo; /* stored value snapshot */ |
---|
| 2806 | + uint32 rx_time_siso; /* RX SISO raw SHM value */ |
---|
| 2807 | + uint32 last_rx_time_siso; /* stored value snapshot */ |
---|
| 2808 | + uint32 tx_time_1chain; /* Tx 1-chain raw SHM value */ |
---|
| 2809 | + uint32 last_tx_time_1chain; /* stored value snapshot */ |
---|
| 2810 | + uint32 tx_time_2chain; /* Tx 2-chain raw SHM value */ |
---|
| 2811 | + uint32 last_tx_time_2chain; /* stored value snapshot */ |
---|
| 2812 | + uint32 tx_time_3chain; /* Tx 3-chain raw SHM value */ |
---|
| 2813 | + uint32 last_tx_time_3chain; /* stored value snapshot */ |
---|
| 2814 | + uint16 reason; /* reason for snapshot call, see below */ |
---|
| 2815 | + /* Does the call reset last values after delta calculation */ |
---|
| 2816 | + uint16 reset_last; |
---|
| 2817 | +} wl_mimo_ps_metrics_snapshot_trace_t; |
---|
| 2818 | +/* reason codes for mimo ps metrics snapshot function calls */ |
---|
| 2819 | +#define WL_MIMOPS_METRICS_SNAPSHOT_REPORT 1 |
---|
| 2820 | +#define WL_MIMOPS_METRICS_SNAPSHOT_RXCHAIN_SET 2 |
---|
| 2821 | +#define WL_MIMOPS_METRICS_SNAPSHOT_ARBI 3 |
---|
| 2822 | +#define WL_MIMOPS_METRICS_SNAPSHOT_SLOTUPD 4 |
---|
| 2823 | +#define WL_MIMOPS_METRICS_SNAPSHOT_PMBCNRX 5 |
---|
| 2824 | +#define WL_MIMOPS_METRICS_SNAPSHOT_BMACINIT 6 |
---|
| 2825 | +#define WL_MIMOPS_METRICS_SNAPSHOT_HT_COMPLETE 7 |
---|
| 2826 | +#define WL_MIMOPS_METRICS_SNAPSHOT_OCL 8 |
---|
| 2827 | + |
---|
| 2828 | +#define WL_MIMO_PS_STATUS_VERSION_2 2 |
---|
| 2829 | +typedef struct wl_mimo_ps_status { |
---|
| 2830 | + uint8 version; |
---|
| 2831 | + uint8 ap_cap; /* The associated AP's capability (BW, MIMO/SISO). */ |
---|
| 2832 | + uint8 association_status; /* How we are associated to the AP (MIMO/SISO). */ |
---|
| 2833 | + uint8 mimo_ps_state; /* mimo_ps_cfg states: [0-5]. See below for values */ |
---|
| 2834 | + uint8 mrc_state; /* MRC state: NONE (0), ACTIVE(1) */ |
---|
| 2835 | + uint8 bss_rxchain; /* bss rxchain bitmask */ |
---|
| 2836 | + uint8 bss_txchain; /* bss txchain bitmask */ |
---|
| 2837 | + uint8 bss_bw; /* bandwidth: Full (0), 20M (1), 40M (2), 80M (3), etc */ |
---|
| 2838 | + uint16 hw_state; /* bitmask of hw state. See below for values */ |
---|
| 2839 | + uint8 hw_rxchain; /* actual HW rxchain bitmask */ |
---|
| 2840 | + uint8 hw_txchain; /* actual HW txchain bitmask */ |
---|
| 2841 | + uint8 hw_bw; /* bandwidth: Full (0), 20M (1), 40M (2), 80M (3), etc */ |
---|
| 2842 | + uint8 pm_bcnrx_state; /* actual state of ucode flag */ |
---|
| 2843 | + uint8 basic_rates_present; /* internal flag to trigger siso bcmc rx */ |
---|
| 2844 | + uint8 siso_bcmc_rx_state; /* actual state of ucode flag */ |
---|
| 2845 | +} wl_mimo_ps_status_t; |
---|
| 2846 | + |
---|
| 2847 | +#define WL_MIMO_PS_STATUS_VERSION_1 1 |
---|
| 2848 | +typedef struct wl_mimo_ps_status_v1 { |
---|
| 2849 | + uint8 version; |
---|
| 2850 | + uint8 ap_cap; /* The associated AP's capability (BW, MIMO/SISO). */ |
---|
| 2851 | + uint8 association_status; /* How we are associated to the AP (MIMO/SISO). */ |
---|
| 2852 | + uint8 mimo_ps_state; /* mimo_ps_cfg states: [0-5]. See below for values */ |
---|
| 2853 | + uint8 mrc_state; /* MRC state: NONE (0), ACTIVE(1) */ |
---|
| 2854 | + uint8 bss_rxchain; /* bss rxchain bitmask */ |
---|
| 2855 | + uint8 bss_txchain; /* bss txchain bitmask */ |
---|
| 2856 | + uint8 bss_bw; /* bandwidth: Full (0), 20M (1), 40M (2), 80M (3), etc */ |
---|
| 2857 | + uint16 hw_state; /* bitmask of hw state. See below for values */ |
---|
| 2858 | + uint8 hw_rxchain; /* actual HW rxchain bitmask */ |
---|
| 2859 | + uint8 hw_txchain; /* actual HW txchain bitmask */ |
---|
| 2860 | + uint8 hw_bw; /* bandwidth: Full (0), 20M (1), 40M (2), 80M (3), etc */ |
---|
| 2861 | + uint8 pad[3]; |
---|
| 2862 | +} wl_mimo_ps_status_v1_t; |
---|
| 2863 | + |
---|
| 2864 | +#define WL_MIMO_PS_STATUS_AP_CAP(ap_cap) (ap_cap & 0x0F) |
---|
| 2865 | +#define WL_MIMO_PS_STATUS_AP_CAP_BW(ap_cap) (ap_cap >> 4) |
---|
| 2866 | +#define WL_MIMO_PS_STATUS_ASSOC_BW_SHIFT 4 |
---|
| 2867 | + |
---|
| 2868 | +/* version 3: assoc status: low nibble is status enum, high other flags */ |
---|
| 2869 | +#define WL_MIMO_PS_STATUS_VERSION_3 3 |
---|
| 2870 | +#define WL_MIMO_PS_STATUS_ASSOC_STATUS_MASK 0x0F |
---|
| 2871 | +#define WL_MIMO_PS_STATUS_ASSOC_STATUS_VHT_WITHOUT_OMN 0x80 |
---|
| 2872 | + |
---|
| 2873 | +/* mimo_ps_status: ap_cap/association status */ |
---|
| 2874 | +enum { |
---|
| 2875 | + WL_MIMO_PS_STATUS_ASSOC_NONE = 0, |
---|
| 2876 | + WL_MIMO_PS_STATUS_ASSOC_SISO = 1, |
---|
| 2877 | + WL_MIMO_PS_STATUS_ASSOC_MIMO = 2, |
---|
| 2878 | + WL_MIMO_PS_STATUS_ASSOC_LEGACY = 3 |
---|
| 2879 | +}; |
---|
| 2880 | + |
---|
| 2881 | +/* mimo_ps_status: mimo_ps_cfg states */ |
---|
| 2882 | +enum { |
---|
| 2883 | + WL_MIMO_PS_CFG_STATE_NONE = 0, |
---|
| 2884 | + WL_MIMO_PS_CFG_STATE_INFORM_AP_INPROGRESS = 1, |
---|
| 2885 | + WL_MIMO_PS_CFG_STATE_INFORM_AP_DONE = 2, |
---|
| 2886 | + WL_MIMO_PS_CFG_STATE_LEARNING = 3, |
---|
| 2887 | + WL_MIMO_PS_CFG_STATE_HW_CONFIGURE = 4, |
---|
| 2888 | + WL_MIMO_PS_CFG_STATE_INFORM_AP_PENDING = 5 |
---|
| 2889 | +}; |
---|
| 2890 | + |
---|
| 2891 | +/* mimo_ps_status: hw_state values */ |
---|
| 2892 | +#define WL_MIMO_PS_STATUS_HW_STATE_NONE 0 |
---|
| 2893 | +#define WL_MIMO_PS_STATUS_HW_STATE_LTECOEX (0x1 << 0) |
---|
| 2894 | +#define WL_MIMO_PS_STATUS_HW_STATE_MIMOPS_BSS (0x1 << 1) |
---|
| 2895 | +#define WL_MIMO_PS_STATUS_HW_STATE_AWDL_BSS (0x1 << 2) |
---|
| 2896 | +#define WL_MIMO_PS_STATUS_HW_STATE_SCAN (0x1 << 3) |
---|
| 2897 | +#define WL_MIMO_PS_STATUS_HW_STATE_TXPPR (0x1 << 4) |
---|
| 2898 | +#define WL_MIMO_PS_STATUS_HW_STATE_PWRTHOTTLE (0x1 << 5) |
---|
| 2899 | +#define WL_MIMO_PS_STATUS_HW_STATE_TMPSENSE (0x1 << 6) |
---|
| 2900 | +#define WL_MIMO_PS_STATUS_HW_STATE_IOVAR (0x1 << 7) |
---|
| 2901 | +#define WL_MIMO_PS_STATUS_HW_STATE_AP_BSS (0x1 << 8) |
---|
| 2902 | + |
---|
| 2903 | +/* mimo_ps_status: mrc states */ |
---|
| 2904 | +#define WL_MIMO_PS_STATUS_MRC_NONE 0 |
---|
| 2905 | +#define WL_MIMO_PS_STATUS_MRC_ACTIVE 1 |
---|
| 2906 | + |
---|
| 2907 | +/* mimo_ps_status: core flag states for single-core beacon and siso-bcmc rx */ |
---|
| 2908 | +#define WL_MIMO_PS_STATUS_MHF_FLAG_NONE 0 |
---|
| 2909 | +#define WL_MIMO_PS_STATUS_MHF_FLAG_ACTIVE 1 |
---|
| 2910 | +#define WL_MIMO_PS_STATUS_MHF_FLAG_COREDOWN 2 |
---|
| 2911 | +#define WL_MIMO_PS_STATUS_MHF_FLAG_INVALID 3 |
---|
| 2912 | + |
---|
| 2913 | +/* Type values for the REASON */ |
---|
| 2914 | +#define WL_MIMO_PS_PS_LEARNING_ABORTED (1 << 0) |
---|
| 2915 | +#define WL_MIMO_PS_PS_LEARNING_COMPLETED (1 << 1) |
---|
| 2916 | +#define WL_MIMO_PS_PS_LEARNING_ONGOING (1 << 2) |
---|
| 2917 | + |
---|
| 2918 | +typedef struct wl_mimo_ps_learning_event_data { |
---|
| 2919 | + uint32 startTimeStamp; |
---|
| 2920 | + uint32 endTimeStamp; |
---|
| 2921 | + uint16 reason; |
---|
| 2922 | + struct ether_addr BSSID; |
---|
| 2923 | + uint32 totalSISO_below_rssi_threshold; |
---|
| 2924 | + uint32 totalMIMO_below_rssi_threshold; |
---|
| 2925 | + uint32 totalSISO_above_rssi_threshold; |
---|
| 2926 | + uint32 totalMIMO_above_rssi_threshold; |
---|
| 2927 | +} wl_mimo_ps_learning_event_data_t; |
---|
| 2928 | + |
---|
| 2929 | +#define WL_MIMO_PS_PS_LEARNING_CFG_ABORT (1 << 0) |
---|
| 2930 | +#define WL_MIMO_PS_PS_LEARNING_CFG_STATUS (1 << 1) |
---|
| 2931 | +#define WL_MIMO_PS_PS_LEARNING_CFG_CONFIG (1 << 2) |
---|
| 2932 | +#define WL_MIMO_PS_PS_LEARNING_CFG_MASK (0x7) |
---|
| 2933 | + |
---|
| 2934 | +#define WL_MIMO_PS_PS_LEARNING_CFG_V1 1 |
---|
| 2935 | + |
---|
| 2936 | +typedef struct wl_mimops_learning_cfg { |
---|
| 2937 | + /* flag: bit 0 for abort */ |
---|
| 2938 | + /* flag: bit 1 for status */ |
---|
| 2939 | + /* flag: bit 2 for configuring no of packets and rssi */ |
---|
| 2940 | + uint8 flag; |
---|
| 2941 | + /* mimo ps learning version, compatible version is 0 */ |
---|
| 2942 | + uint8 version; |
---|
| 2943 | + /* if version is 0 or rssi is 0, ignored */ |
---|
| 2944 | + int8 learning_rssi_threshold; |
---|
| 2945 | + uint8 reserved; |
---|
| 2946 | + uint32 no_of_packets_for_learning; |
---|
| 2947 | + wl_mimo_ps_learning_event_data_t mimops_learning_data; |
---|
| 2948 | +} wl_mimops_learning_cfg_t; |
---|
| 2949 | + |
---|
| 2950 | +#define WL_OCL_STATUS_VERSION 1 |
---|
| 2951 | +typedef struct ocl_status_info { |
---|
| 2952 | + uint8 version; |
---|
| 2953 | + uint8 len; |
---|
| 2954 | + uint16 fw_status; /* Bits representing FW disable reasons */ |
---|
| 2955 | + uint8 hw_status; /* Bits for actual HW config and SISO/MIMO coremask */ |
---|
| 2956 | + uint8 coremask; /* The ocl core mask (indicating listening core) */ |
---|
| 2957 | +} ocl_status_info_t; |
---|
| 2958 | + |
---|
| 2959 | +/* MWS OCL map */ |
---|
| 2960 | +#define WL_MWS_OCL_OVERRIDE_VERSION 1 |
---|
| 2961 | +typedef struct wl_mws_ocl_override { |
---|
| 2962 | + uint16 version; /* Structure version */ |
---|
| 2963 | + uint16 bitmap_2g; /* bitmap for 2.4G channels bits 1-13 */ |
---|
| 2964 | + uint16 bitmap_5g_lo; /* bitmap for 5G low channels by 2: |
---|
| 2965 | + *34-48, 52-56, 60-64, 100-102 |
---|
| 2966 | + */ |
---|
| 2967 | + uint16 bitmap_5g_mid; /* bitmap for 5G mid channels by 2: |
---|
| 2968 | + * 104, 108-112, 116-120, 124-128, |
---|
| 2969 | + * 132-136, 140, 149-151 |
---|
| 2970 | + */ |
---|
| 2971 | + uint16 bitmap_5g_high; /* bitmap for 5G high channels by 2 |
---|
| 2972 | + * 153, 157-161, 165 |
---|
| 2973 | + */ |
---|
| 2974 | +} wl_mws_ocl_override_t; |
---|
| 2975 | + |
---|
| 2976 | +/* Bits for fw_status */ |
---|
| 2977 | +#define OCL_DISABLED_HOST 0x01 /* Host has disabled through ocl_enable */ |
---|
| 2978 | +#define OCL_DISABLED_RSSI 0x02 /* Disabled because of ocl_rssi_threshold */ |
---|
| 2979 | +#define OCL_DISABLED_LTEC 0x04 /* Disabled due to LTE Coex activity */ |
---|
| 2980 | +#define OCL_DISABLED_SISO 0x08 /* Disabled while in SISO mode */ |
---|
| 2981 | +#define OCL_DISABLED_CAL 0x10 /* Disabled during active calibration */ |
---|
| 2982 | +#define OCL_DISABLED_CHANSWITCH 0x20 /* Disabled during active channel switch */ |
---|
| 2983 | +#define OCL_DISABLED_ASPEND 0x40 /* Disabled due to assoc pending */ |
---|
| 2984 | + |
---|
| 2985 | +/* Bits for hw_status */ |
---|
| 2986 | +#define OCL_HWCFG 0x01 /* State of OCL config bit in phy HW */ |
---|
| 2987 | +#define OCL_HWMIMO 0x02 /* Set if current coremask is > 1 bit */ |
---|
| 2988 | +#define OCL_COREDOWN 0x80 /* Set if core is currently down */ |
---|
| 2989 | + |
---|
| 2990 | +#define WL_OPS_CFG_VERSION_1 1 |
---|
| 2991 | +/* Common IOVAR struct */ |
---|
| 2992 | +typedef struct wl_ops_cfg_v1 { |
---|
| 2993 | + uint16 version; |
---|
| 2994 | + uint16 len; /* total length includes fixed fields and variable data[] */ |
---|
| 2995 | + uint16 subcmd_id; /* subcommand id */ |
---|
| 2996 | + uint16 padding; /* reserved / padding for 4 byte align */ |
---|
| 2997 | + uint8 data[]; /* subcommand data; could be empty */ |
---|
| 2998 | +} wl_ops_cfg_v1_t; |
---|
| 2999 | + |
---|
| 3000 | +/* subcommands ids */ |
---|
| 3001 | +enum { |
---|
| 3002 | + WL_OPS_CFG_SUBCMD_ENABLE = 0, /* OPS enable/disable mybss and obss |
---|
| 3003 | + * for nav and plcp options |
---|
| 3004 | + */ |
---|
| 3005 | + WL_OPS_CFG_SUBCMD_MAX_SLEEP_DUR = 1, /* Max sleep duration used for OPS */ |
---|
| 3006 | + WL_OPS_CFG_SUBCMD_RESET_STATS = 2 /* Reset stats part of ops_status |
---|
| 3007 | + * on both slices |
---|
| 3008 | + */ |
---|
| 3009 | +}; |
---|
| 3010 | + |
---|
| 3011 | +#define WL_OPS_CFG_MASK 0xffff |
---|
| 3012 | +#define WL_OPS_CFG_CAP_MASK 0xffff0000 |
---|
| 3013 | +#define WL_OPS_CFG_CAP_SHIFT 16 /* Shift bits to locate the OPS CAP */ |
---|
| 3014 | +#define WL_OPS_MAX_SLEEP_DUR 12500 /* max ops duration in us */ |
---|
| 3015 | +#define WL_OPS_MINOF_MAX_SLEEP_DUR 512 /* minof max ops duration in us */ |
---|
| 3016 | +#define WL_OPS_SUPPORTED_CFG (WL_OPS_MYBSS_PLCP_DUR | WL_OPS_MYBSS_NAV_DUR \ |
---|
| 3017 | + | WL_OPS_OBSS_PLCP_DUR | WL_OPS_OBSS_NAV_DUR) |
---|
| 3018 | +#define WL_OPS_DEFAULT_CFG WL_OPS_SUPPORTED_CFG |
---|
| 3019 | + |
---|
| 3020 | +/* WL_OPS_CFG_SUBCMD_ENABLE */ |
---|
| 3021 | +typedef struct wl_ops_cfg_enable { |
---|
| 3022 | + uint32 bits; /* selectively enable ops for mybss and obss */ |
---|
| 3023 | +} wl_ops_cfg_enable_t; |
---|
| 3024 | +/* Bits for WL_OPS_CFG_SUBCMD_ENABLE Parameter */ |
---|
| 3025 | +#define WL_OPS_MYBSS_PLCP_DUR 0x1 /* OPS based on mybss 11b & 11n mixed HT frames |
---|
| 3026 | + * PLCP header duration |
---|
| 3027 | + */ |
---|
| 3028 | +#define WL_OPS_MYBSS_NAV_DUR 0x2 /* OPS based on mybss RTS-CTS duration */ |
---|
| 3029 | +#define WL_OPS_OBSS_PLCP_DUR 0x4 /* OPS based on obss 11b & 11n mixed HT frames |
---|
| 3030 | + * PLCP header duration |
---|
| 3031 | + */ |
---|
| 3032 | +#define WL_OPS_OBSS_NAV_DUR 0x8 /* OPS based on obss RTS-CTS duration */ |
---|
| 3033 | + |
---|
| 3034 | +/* WL_OPS_CFG_SUBCMD_MAX_SLEEP_DUR */ |
---|
| 3035 | +typedef struct wl_ops_cfg_max_sleep_dur { |
---|
| 3036 | + uint32 val; /* maximum sleep duration (us) used for OPS */ |
---|
| 3037 | +} wl_ops_cfg_max_sleep_dur_t; |
---|
| 3038 | + |
---|
| 3039 | +/* WL_OPS_CFG_SUBCMD_RESET_STATS */ |
---|
| 3040 | +typedef struct wl_ops_cfg_reset_stats { |
---|
| 3041 | + uint32 val; /* bitmap of slices, 0 means all slices */ |
---|
| 3042 | +} wl_ops_cfg_reset_stats_t; |
---|
| 3043 | + |
---|
| 3044 | +#define WL_OPS_STATUS_VERSION_1 1 |
---|
| 3045 | +#define OPS_DUR_HIST_BINS 5 /* number of bins used, 0-1, 1-2, 2-4, 4-8, >8 msec */ |
---|
| 3046 | +typedef struct wl_ops_status_v1 { |
---|
| 3047 | + uint16 version; |
---|
| 3048 | + uint16 len; /* Total length including all fixed fields */ |
---|
| 3049 | + uint8 slice_index; /* Slice for which status is reported */ |
---|
| 3050 | + uint8 disable_obss; /* indicate if obss cfg is disabled */ |
---|
| 3051 | + uint8 pad[2]; /* 4-byte alignment */ |
---|
| 3052 | + uint32 disable_reasons; /* FW disable reasons */ |
---|
| 3053 | + uint32 disable_duration; /* ops disable time(ms) due to disable reasons */ |
---|
| 3054 | + uint32 applied_ops_config; /* currently applied ops config */ |
---|
| 3055 | + uint32 partial_ops_dur; /* Total time (in usec) of partial ops duration */ |
---|
| 3056 | + uint32 full_ops_dur; /* Total time (in usec) of full ops duration */ |
---|
| 3057 | + uint32 count_dur_hist[OPS_DUR_HIST_BINS]; /* ops occurrence histogram */ |
---|
| 3058 | + uint32 nav_cnt; /* number of times ops triggered based NAV duration */ |
---|
| 3059 | + uint32 plcp_cnt; /* number of times ops triggered based PLCP duration */ |
---|
| 3060 | + uint32 mybss_cnt; /* number of times mybss ops trigger */ |
---|
| 3061 | + uint32 obss_cnt; /* number of times obss ops trigger */ |
---|
| 3062 | + uint32 miss_dur_cnt; /* number of times ops couldn't happen |
---|
| 3063 | + * due to insufficient duration |
---|
| 3064 | + */ |
---|
| 3065 | + uint32 miss_premt_cnt; /* number of times ops couldn't happen due |
---|
| 3066 | + * to not meeting Phy preemption thresh |
---|
| 3067 | + */ |
---|
| 3068 | + uint32 max_dur_cnt; /* number of times ops did not trigger due to |
---|
| 3069 | + * frames exceeding max sleep duration |
---|
| 3070 | + */ |
---|
| 3071 | + uint32 wake_cnt; /* number of ops miss due to wake reason */ |
---|
| 3072 | + uint32 bcn_wait_cnt; /* number of ops miss due to waiting for bcn */ |
---|
| 3073 | +} wl_ops_status_v1_t; |
---|
| 3074 | +/* Bits for disable_reasons */ |
---|
| 3075 | +#define OPS_DISABLED_HOST 0x01 /* Host has disabled through ops_cfg */ |
---|
| 3076 | +#define OPS_DISABLED_UNASSOC 0x02 /* Disabled because the slice is in unassociated state */ |
---|
| 3077 | +#define OPS_DISABLED_SCAN 0x04 /* Disabled because the slice is in scan state */ |
---|
| 3078 | +#define OPS_DISABLED_BCN_MISS 0x08 /* Disabled because beacon missed for a duration */ |
---|
| 3079 | + |
---|
| 3080 | +#define WL_PSBW_CFG_VERSION_1 1 |
---|
| 3081 | +/* Common IOVAR struct */ |
---|
| 3082 | +typedef struct wl_psbw_cfg_v1 { |
---|
| 3083 | + uint16 version; |
---|
| 3084 | + uint16 len; /* total length includes fixed fields and variable data[] */ |
---|
| 3085 | + uint16 subcmd_id; /* subcommand id */ |
---|
| 3086 | + uint16 pad; /* reserved / padding for 4 byte align */ |
---|
| 3087 | + uint8 data[]; /* subcommand data */ |
---|
| 3088 | +} wl_psbw_cfg_v1_t; |
---|
| 3089 | + |
---|
| 3090 | +/* subcommands ids */ |
---|
| 3091 | +enum { |
---|
| 3092 | + /* PSBW enable/disable */ |
---|
| 3093 | + WL_PSBW_CFG_SUBCMD_ENABLE = 0, |
---|
| 3094 | + /* override psbw disable requests */ |
---|
| 3095 | + WL_PSBW_CFG_SUBCMD_OVERRIDE_DISABLE_MASK = 1, |
---|
| 3096 | + /* Reset stats part of psbw status */ |
---|
| 3097 | + WL_PSBW_CFG_SUBCMD_RESET_STATS = 2 |
---|
| 3098 | +}; |
---|
| 3099 | + |
---|
| 3100 | +#define WL_PSBW_OVERRIDE_DISA_CFG_MASK 0x0000ffff |
---|
| 3101 | +#define WL_PSBW_OVERRIDE_DISA_CAP_MASK 0xffff0000 |
---|
| 3102 | +#define WL_PSBW_OVERRIDE_DISA_CAP_SHIFT 16 /* shift bits for cap */ |
---|
| 3103 | + |
---|
| 3104 | +/* WL_PSBW_CFG_SUBCMD_ENABLE */ |
---|
| 3105 | +typedef struct wl_psbw_cfg_enable { |
---|
| 3106 | + bool enable; /* enable or disable */ |
---|
| 3107 | +} wl_psbw_cfg_enable_t; |
---|
| 3108 | + |
---|
| 3109 | +/* WL_PSBW_CFG_SUBCMD_OVERRIDE_DISABLE_MASK */ |
---|
| 3110 | +typedef struct wl_psbw_cfg_override_disable_mask { |
---|
| 3111 | + uint32 mask; /* disable requests to override, cap and current cfg */ |
---|
| 3112 | +} wl_psbw_cfg_override_disable_mask_t; |
---|
| 3113 | + |
---|
| 3114 | +/* WL_PSBW_CFG_SUBCMD_RESET_STATS */ |
---|
| 3115 | +typedef struct wl_psbw_cfg_reset_stats { |
---|
| 3116 | + uint32 val; /* infra interface index, 0 */ |
---|
| 3117 | +} wl_psbw_cfg_reset_stats_t; |
---|
| 3118 | + |
---|
| 3119 | +#define WL_PSBW_STATUS_VERSION_1 1 |
---|
| 3120 | +typedef struct wl_psbw_status_v1 { |
---|
| 3121 | + uint16 version; |
---|
| 3122 | + uint16 len; /* total length including all fixed fields */ |
---|
| 3123 | + uint8 curr_slice_index; /* current slice index of the interface */ |
---|
| 3124 | + uint8 associated; /* interface associatd */ |
---|
| 3125 | + chanspec_t chspec; /* radio chspec */ |
---|
| 3126 | + uint32 state; /* psbw state */ |
---|
| 3127 | + uint32 disable_reasons; /* FW disable reasons */ |
---|
| 3128 | + uint32 slice_enable_dur; /* time(ms) psbw remains enabled on this slice */ |
---|
| 3129 | + uint32 total_enable_dur; /* time(ms) psbw remains enabled total */ |
---|
| 3130 | + uint32 enter_cnt; /* total cnt entering PSBW active */ |
---|
| 3131 | + uint32 exit_cnt; /* total cnt exiting PSBW active */ |
---|
| 3132 | + uint32 exit_imd_cnt; /* total cnt imd exit when waited N tbtts */ |
---|
| 3133 | + uint32 enter_skip_cnt; /* total cnt entering PSBW active skipped */ |
---|
| 3134 | +} wl_psbw_status_v1_t; |
---|
| 3135 | + |
---|
| 3136 | +/* Bit for state */ |
---|
| 3137 | +#define PSBW_ACTIVE 0x1 /* active 20MHz */ |
---|
| 3138 | +#define PSBW_TTTT_PEND 0x2 /* waiting for TTTT intr */ |
---|
| 3139 | +#define PSBW_WAIT_ENTER 0x4 /* in wait period before entering */ |
---|
| 3140 | +#define PSBW_CAL_DONE 0x8 /* 20M channel cal done */ |
---|
| 3141 | + |
---|
| 3142 | +/* Bits for disable_reasons */ |
---|
| 3143 | +#define WL_PSBW_DISA_HOST 0x00000001 /* Host has disabled through psbw_cfg */ |
---|
| 3144 | +#define WL_PSBW_DISA_AP20M 0x00000002 /* AP is operating on 20 MHz */ |
---|
| 3145 | +#define WL_PSBW_DISA_SLOTTED_BSS 0x00000004 /* AWDL or NAN active */ |
---|
| 3146 | +#define WL_PSBW_DISA_NOT_PMFAST 0x00000008 /* Not PM_FAST */ |
---|
| 3147 | +#define WL_PSBW_DISA_BASICRATESET 0x00000010 /* BasicRateSet is empty */ |
---|
| 3148 | +#define WL_PSBW_DISA_NOT_D3 0x00000020 /* PCIe not in D3 */ |
---|
| 3149 | +#define WL_PSBW_DISA_CSA 0x00000040 /* CSA IE is present */ |
---|
| 3150 | +#define WL_PSBW_DISA_ASSOC 0x00000080 /* assoc state is active/or unassoc */ |
---|
| 3151 | +#define WL_PSBW_DISA_SCAN 0x00000100 /* scan state is active */ |
---|
| 3152 | +#define WL_PSBW_DISA_CAL 0x00000200 /* cal pending or active */ |
---|
| 3153 | +/* following are not part of disable reasons */ |
---|
| 3154 | +#define WL_PSBW_EXIT_PM 0x00001000 /* Out of PM */ |
---|
| 3155 | +#define WL_PSBW_EXIT_TIM 0x00002000 /* unicast TIM bit present */ |
---|
| 3156 | +#define WL_PSBW_EXIT_DATA 0x00004000 /* Data for transmission */ |
---|
| 3157 | +#define WL_PSBW_EXIT_MGMTDATA 0x00008000 /* management frame for transmission */ |
---|
| 3158 | +#define WL_PSBW_EXIT_BW_UPD 0x00010000 /* BW being updated */ |
---|
| 3159 | +#define WL_PSBW_DISA_NONE 0x80000000 /* reserved for internal use only */ |
---|
1974 | 3160 | |
---|
1975 | 3161 | /* |
---|
1976 | 3162 | * Join preference iovar value is an array of tuples. Each tuple has a one-byte type, |
---|
.. | .. |
---|
2032 | 3218 | #define RATE_LEGACY_OFDM_54MBPS 7 |
---|
2033 | 3219 | |
---|
2034 | 3220 | #define WL_BSSTRANS_RSSI_RATE_MAP_VERSION 1 |
---|
| 3221 | +#define WL_BSSTRANS_RSSI_RATE_MAP_VERSION_V1 1 |
---|
| 3222 | +#define WL_BSSTRANS_RSSI_RATE_MAP_VERSION_V2 2 |
---|
2035 | 3223 | |
---|
2036 | 3224 | typedef struct wl_bsstrans_rssi { |
---|
2037 | 3225 | int8 rssi_2g; /**< RSSI in dbm for 2.4 G */ |
---|
.. | .. |
---|
2040 | 3228 | |
---|
2041 | 3229 | #define RSSI_RATE_MAP_MAX_STREAMS 4 /**< max streams supported */ |
---|
2042 | 3230 | |
---|
2043 | | -/* RSSI to rate mapping, all 20Mhz, no SGI */ |
---|
| 3231 | +/** RSSI to rate mapping, all 20Mhz, no SGI */ |
---|
| 3232 | +typedef struct wl_bsstrans_rssi_rate_map_v2 { |
---|
| 3233 | + uint16 ver; |
---|
| 3234 | + uint16 len; /**< length of entire structure */ |
---|
| 3235 | + wl_bsstrans_rssi_t cck[WL_NUM_RATES_CCK]; /**< 2.4G only */ |
---|
| 3236 | + wl_bsstrans_rssi_t ofdm[WL_NUM_RATES_OFDM]; /**< 6 to 54mbps */ |
---|
| 3237 | + wl_bsstrans_rssi_t phy_n[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_MCS_1STREAM]; /* MCS0-7 */ |
---|
| 3238 | + wl_bsstrans_rssi_t phy_ac[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_VHT_ALL]; /**< MCS0-11 */ |
---|
| 3239 | + wl_bsstrans_rssi_t phy_ax[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_HE]; /**< MCS0-11 */ |
---|
| 3240 | +} wl_bsstrans_rssi_rate_map_v2_t; |
---|
| 3241 | + |
---|
| 3242 | +/** RSSI to rate mapping, all 20Mhz, no SGI */ |
---|
| 3243 | +typedef struct wl_bsstrans_rssi_rate_map_v1 { |
---|
| 3244 | + uint16 ver; |
---|
| 3245 | + uint16 len; /**< length of entire structure */ |
---|
| 3246 | + wl_bsstrans_rssi_t cck[WL_NUM_RATES_CCK]; /**< 2.4G only */ |
---|
| 3247 | + wl_bsstrans_rssi_t ofdm[WL_NUM_RATES_OFDM]; /**< 6 to 54mbps */ |
---|
| 3248 | + wl_bsstrans_rssi_t phy_n[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_MCS_1STREAM]; /* MCS0-7 */ |
---|
| 3249 | + wl_bsstrans_rssi_t phy_ac[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_VHT]; /**< MCS0-9 */ |
---|
| 3250 | +} wl_bsstrans_rssi_rate_map_v1_t; |
---|
| 3251 | + |
---|
| 3252 | +/** RSSI to rate mapping, all 20Mhz, no SGI */ |
---|
2044 | 3253 | typedef struct wl_bsstrans_rssi_rate_map { |
---|
2045 | 3254 | uint16 ver; |
---|
2046 | | - uint16 len; /* length of entire structure */ |
---|
2047 | | - wl_bsstrans_rssi_t cck[WL_NUM_RATES_CCK]; /* 2.4G only */ |
---|
2048 | | - wl_bsstrans_rssi_t ofdm[WL_NUM_RATES_OFDM]; /* 6 to 54mbps */ |
---|
| 3255 | + uint16 len; /**< length of entire structure */ |
---|
| 3256 | + wl_bsstrans_rssi_t cck[WL_NUM_RATES_CCK]; /**< 2.4G only */ |
---|
| 3257 | + wl_bsstrans_rssi_t ofdm[WL_NUM_RATES_OFDM]; /**< 6 to 54mbps */ |
---|
2049 | 3258 | wl_bsstrans_rssi_t phy_n[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_MCS_1STREAM]; /* MCS0-7 */ |
---|
2050 | | - wl_bsstrans_rssi_t phy_ac[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_VHT]; /* MCS0-9 */ |
---|
| 3259 | + wl_bsstrans_rssi_t phy_ac[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_VHT]; /**< MCS0-9 */ |
---|
2051 | 3260 | } wl_bsstrans_rssi_rate_map_t; |
---|
2052 | 3261 | |
---|
2053 | 3262 | #define WL_BSSTRANS_ROAMTHROTTLE_VERSION 1 |
---|
2054 | 3263 | |
---|
2055 | | -/* Configure number of scans allowed per throttle period */ |
---|
| 3264 | +/** Configure number of scans allowed per throttle period */ |
---|
2056 | 3265 | typedef struct wl_bsstrans_roamthrottle { |
---|
2057 | 3266 | uint16 ver; |
---|
2058 | 3267 | uint16 period; |
---|
.. | .. |
---|
2060 | 3269 | } wl_bsstrans_roamthrottle_t; |
---|
2061 | 3270 | |
---|
2062 | 3271 | #define NFIFO 6 /**< # tx/rx fifopairs */ |
---|
| 3272 | + |
---|
| 3273 | +#if defined(BCM_AQM_DMA_DESC) && !defined(BCM_AQM_DMA_DESC_DISABLED) |
---|
| 3274 | +#if defined(WL_MU_TX) && !defined(WL_MU_TX_DISABLED) |
---|
| 3275 | +#define NFIFO_EXT 32 /* 6 traditional FIFOs + 2 rsvd + 24 MU FIFOs */ |
---|
| 3276 | +#else |
---|
| 3277 | +#define NFIFO_EXT 10 /* 4EDCA + 4 TWT + 1 Mcast/Bcast + 1 Spare */ |
---|
| 3278 | +#endif // endif |
---|
| 3279 | +#elif defined(WL11AX_TRIGGERQ) && !defined(WL11AX_TRIGGERQ_DISABLED) |
---|
| 3280 | +#define NFIFO_EXT 10 |
---|
| 3281 | +#else |
---|
| 3282 | +#define NFIFO_EXT NFIFO |
---|
| 3283 | +#endif /* BCM_AQM_DMA_DESC && !BCM_AQM_DMA_DESC_DISABLED */ |
---|
| 3284 | + |
---|
| 3285 | +/* Reinit reason codes */ |
---|
| 3286 | +enum { |
---|
| 3287 | + WL_REINIT_RC_NONE = 0, |
---|
| 3288 | + WL_REINIT_RC_PS_SYNC = 1, |
---|
| 3289 | + WL_REINIT_RC_PSM_WD = 2, |
---|
| 3290 | + WL_REINIT_RC_MAC_WAKE = 3, |
---|
| 3291 | + WL_REINIT_RC_MAC_SUSPEND = 4, |
---|
| 3292 | + WL_REINIT_RC_MAC_SPIN_WAIT = 5, |
---|
| 3293 | + WL_REINIT_RC_AXI_BUS_ERROR = 6, |
---|
| 3294 | + WL_REINIT_RC_DEVICE_REMOVED = 7, |
---|
| 3295 | + WL_REINIT_RC_PCIE_FATAL_ERROR = 8, |
---|
| 3296 | + WL_REINIT_RC_OL_FW_TRAP = 9, |
---|
| 3297 | + WL_REINIT_RC_FIFO_ERR = 10, |
---|
| 3298 | + WL_REINIT_RC_INV_TX_STATUS = 11, |
---|
| 3299 | + WL_REINIT_RC_MQ_ERROR = 12, |
---|
| 3300 | + WL_REINIT_RC_PHYTXERR_THRESH = 13, |
---|
| 3301 | + WL_REINIT_RC_USER_FORCED = 14, |
---|
| 3302 | + WL_REINIT_RC_FULL_RESET = 15, |
---|
| 3303 | + WL_REINIT_RC_AP_BEACON = 16, |
---|
| 3304 | + WL_REINIT_RC_PM_EXCESSED = 17, |
---|
| 3305 | + WL_REINIT_RC_NO_CLK = 18, |
---|
| 3306 | + WL_REINIT_RC_SW_ASSERT = 19, |
---|
| 3307 | + WL_REINIT_RC_PSM_JMP0 = 20, |
---|
| 3308 | + WL_REINIT_RC_PSM_RUN = 21, |
---|
| 3309 | + WL_REINIT_RC_ENABLE_MAC = 22, |
---|
| 3310 | + WL_REINIT_RC_SCAN_TIMEOUT = 23, |
---|
| 3311 | + WL_REINIT_RC_JOIN_TIMEOUT = 24, |
---|
| 3312 | + /* Below error codes are generated during D3 exit validation */ |
---|
| 3313 | + WL_REINIT_RC_LINK_NOT_ACTIVE = 25, |
---|
| 3314 | + WL_REINIT_RC_PCI_CFG_RD_FAIL = 26, |
---|
| 3315 | + WL_REINIT_RC_INV_VEN_ID = 27, |
---|
| 3316 | + WL_REINIT_RC_INV_DEV_ID = 28, |
---|
| 3317 | + WL_REINIT_RC_INV_BAR0 = 29, |
---|
| 3318 | + WL_REINIT_RC_INV_BAR2 = 30, |
---|
| 3319 | + WL_REINIT_RC_AER_UC_FATAL = 31, |
---|
| 3320 | + WL_REINIT_RC_AER_UC_NON_FATAL = 32, |
---|
| 3321 | + WL_REINIT_RC_AER_CORR = 33, |
---|
| 3322 | + WL_REINIT_RC_AER_DEV_STS = 34, |
---|
| 3323 | + WL_REINIT_RC_PCIe_STS = 35, |
---|
| 3324 | + WL_REINIT_RC_MMIO_RD_FAIL = 36, |
---|
| 3325 | + WL_REINIT_RC_MMIO_RD_INVAL = 37, |
---|
| 3326 | + WL_REINIT_RC_MMIO_ARM_MEM_RD_FAIL = 38, |
---|
| 3327 | + WL_REINIT_RC_MMIO_ARM_MEM_INVAL = 39, |
---|
| 3328 | + WL_REINIT_RC_SROM_LOAD_FAILED = 40, |
---|
| 3329 | + WL_REINIT_RC_PHY_CRASH = 41, |
---|
| 3330 | + WL_REINIT_TX_STALL = 42, |
---|
| 3331 | + WL_REINIT_RC_TX_FLOW_CONTROL_BLOCKED = 43, |
---|
| 3332 | + WL_REINIT_RC_RX_HC_FAIL = 44, |
---|
| 3333 | + WL_REINIT_RC_RX_DMA_STALL = 45, |
---|
| 3334 | + WL_REINIT_UTRACE_BUF_OVERLAP_SR = 46, |
---|
| 3335 | + WL_REINIT_UTRACE_TPL_OUT_BOUNDS = 47, |
---|
| 3336 | + WL_REINIT_UTRACE_TPL_OSET_STRT0 = 48, |
---|
| 3337 | + WL_REINIT_RC_PHYTXERR = 49, |
---|
| 3338 | + WL_REINIT_RC_PSM_FATAL_SUSP = 50, |
---|
| 3339 | + WL_REINIT_RC_TX_FIFO_SUSP = 51, |
---|
| 3340 | + WL_REINIT_RC_MAC_ENABLE = 52, |
---|
| 3341 | + WL_REINIT_RC_SCAN_STALLED = 53, |
---|
| 3342 | + WL_REINIT_RC_PHY_HC = 54, |
---|
| 3343 | + WL_REINIT_RC_LAST /* This must be the last entry */ |
---|
| 3344 | +}; |
---|
| 3345 | + |
---|
2063 | 3346 | #define NREINITREASONCOUNT 8 |
---|
2064 | | -#define REINITREASONIDX(_x) (((_x) < NREINITREASONCOUNT) ? (_x) : 0) |
---|
| 3347 | + |
---|
| 3348 | +#define REINITRSNIDX(_x) (((_x) < WL_REINIT_RC_LAST) ? (_x) : 0) |
---|
2065 | 3349 | |
---|
2066 | 3350 | #define WL_CNT_T_VERSION 30 /**< current version of wl_cnt_t struct */ |
---|
2067 | 3351 | #define WL_CNT_VERSION_6 6 |
---|
| 3352 | +#define WL_CNT_VERSION_7 7 |
---|
2068 | 3353 | #define WL_CNT_VERSION_11 11 |
---|
2069 | 3354 | #define WL_CNT_VERSION_XTLV 30 |
---|
2070 | 3355 | |
---|
| 3356 | +#define WL_COUNTERS_IOV_VERSION_1 1 |
---|
| 3357 | +#define WL_SUBCNTR_IOV_VER WL_COUNTERS_IOV_VERSION_1 |
---|
| 3358 | +/* First two uint16 are version and lenght fields. So offset of the first counter will be 4 */ |
---|
| 3359 | +#define FIRST_COUNTER_OFFSET 0x04 |
---|
| 3360 | + |
---|
2071 | 3361 | #define WLC_WITH_XTLV_CNT |
---|
2072 | 3362 | |
---|
2073 | | -/* |
---|
| 3363 | +/* Number of xtlv info as required to calculate subcounter offsets */ |
---|
| 3364 | +#define WL_CNT_XTLV_ID_NUM 10 |
---|
| 3365 | +#define WL_TLV_IOV_VER 1 |
---|
| 3366 | + |
---|
| 3367 | +/** |
---|
2074 | 3368 | * tlv IDs uniquely identifies counter component |
---|
2075 | 3369 | * packed into wl_cmd_t container |
---|
2076 | 3370 | */ |
---|
2077 | 3371 | enum wl_cnt_xtlv_id { |
---|
| 3372 | + WL_CNT_XTLV_SLICE_IDX = 0x1, /**< Slice index */ |
---|
2078 | 3373 | WL_CNT_XTLV_WLC = 0x100, /**< WLC layer counters */ |
---|
| 3374 | + WL_CNT_XTLV_WLC_RINIT_RSN = 0x101, /**< WLC layer reinitreason extension */ |
---|
| 3375 | + WL_CNT_XTLV_WLC_HE = 0x102, /* he counters */ |
---|
| 3376 | + WL_CNT_XTLV_WLC_SECVLN = 0x103, /* security vulnerabilities counters */ |
---|
2079 | 3377 | WL_CNT_XTLV_CNTV_LE10_UCODE = 0x200, /**< wl counter ver < 11 UCODE MACSTAT */ |
---|
2080 | 3378 | WL_CNT_XTLV_LT40_UCODE_V1 = 0x300, /**< corerev < 40 UCODE MACSTAT */ |
---|
2081 | 3379 | WL_CNT_XTLV_GE40_UCODE_V1 = 0x400, /**< corerev >= 40 UCODE MACSTAT */ |
---|
2082 | | - WL_CNT_XTLV_GE64_UCODEX_V1 = 0x800 /* corerev >= 64 UCODEX MACSTAT */ |
---|
| 3380 | + WL_CNT_XTLV_GE64_UCODEX_V1 = 0x800, /* corerev >= 64 UCODEX MACSTAT */ |
---|
| 3381 | + WL_CNT_XTLV_GE80_UCODE_V1 = 0x900, /* corerev >= 80 UCODEX MACSTAT */ |
---|
| 3382 | + WL_CNT_XTLV_GE80_TXFUNFL_UCODE_V1 = 0x1000 /* corerev >= 80 UCODEX MACSTAT */ |
---|
2083 | 3383 | }; |
---|
2084 | 3384 | |
---|
2085 | | -/* The number of variables in wl macstat cnt struct. |
---|
| 3385 | +/* tlv IDs uniquely identifies periodic state component */ |
---|
| 3386 | +enum wl_periodic_slice_state_xtlv_id { |
---|
| 3387 | + WL_STATE_COMPACT_COUNTERS = 0x1, |
---|
| 3388 | + WL_STATE_TXBF_COUNTERS = 0x2, |
---|
| 3389 | + WL_STATE_COMPACT_HE_COUNTERS = 0x3 |
---|
| 3390 | +}; |
---|
| 3391 | + |
---|
| 3392 | +/* tlv IDs uniquely identifies periodic state component */ |
---|
| 3393 | +enum wl_periodic_if_state_xtlv_id { |
---|
| 3394 | + WL_STATE_IF_COMPACT_STATE = 0x1, |
---|
| 3395 | + WL_STATE_IF_ADPS_STATE = 0x02 |
---|
| 3396 | +}; |
---|
| 3397 | + |
---|
| 3398 | +#define TDMTX_CNT_VERSION_V1 1 |
---|
| 3399 | +#define TDMTX_CNT_VERSION_V2 2 |
---|
| 3400 | + |
---|
| 3401 | +/* structure holding tdm counters that interface to iovar */ |
---|
| 3402 | +typedef struct tdmtx_cnt_v1 { |
---|
| 3403 | + uint16 ver; |
---|
| 3404 | + uint16 length; /* length of this structure */ |
---|
| 3405 | + uint16 wlc_idx; /* index for wlc */ |
---|
| 3406 | + uint16 enabled; /* tdmtx is enabled on slice */ |
---|
| 3407 | + uint32 tdmtx_txa_on; /* TXA on requests */ |
---|
| 3408 | + uint32 tdmtx_txa_tmcnt; /* Total number of TXA timeout */ |
---|
| 3409 | + uint32 tdmtx_por_on; /* TXA POR requests */ |
---|
| 3410 | + uint32 tdmtx_txpuen; /* Path enable requests */ |
---|
| 3411 | + uint32 tdmtx_txpudis; /* Total number of times Tx path is muted on the slice */ |
---|
| 3412 | + uint32 tdmtx_txpri_on; /* Total number of times Tx priority was obtained by the slice */ |
---|
| 3413 | + uint32 tdmtx_txdefer; /* Total number of times Tx was deferred on the slice */ |
---|
| 3414 | + uint32 tdmtx_txmute; /* Total number of times active Tx muted on the slice */ |
---|
| 3415 | + uint32 tdmtx_actpwrboff; /* Total number of times TX power is backed off by the slice */ |
---|
| 3416 | + uint32 tdmtx_txa_dur; /* Total time txa on */ |
---|
| 3417 | + uint32 tdmtx_txpri_dur; /* Total time TXPri */ |
---|
| 3418 | + uint32 tdmtx_txdefer_dur; /* Total time txdefer */ |
---|
| 3419 | + /* TDMTX input fields */ |
---|
| 3420 | + uint32 tdmtx_txpri; |
---|
| 3421 | + uint32 tdmtx_defer; |
---|
| 3422 | + uint32 tdmtx_threshold; |
---|
| 3423 | + uint32 tdmtx_rssi_threshold; |
---|
| 3424 | + uint32 tdmtx_txpwrboff; |
---|
| 3425 | + uint32 tdmtx_txpwrboff_dt; |
---|
| 3426 | +} tdmtx_cnt_v1_t; |
---|
| 3427 | + |
---|
| 3428 | +typedef struct { |
---|
| 3429 | + uint16 ver; |
---|
| 3430 | + uint16 length; /* length of the data portion */ |
---|
| 3431 | + uint16 cnt; |
---|
| 3432 | + uint16 pad; /* pad to align to 32 bit */ |
---|
| 3433 | + uint8 data[]; /* array of tdmtx_cnt_v1_t */ |
---|
| 3434 | +} tdmtx_status_t; |
---|
| 3435 | + |
---|
| 3436 | +/* structure holding counters that match exactly shm field sizes */ |
---|
| 3437 | +typedef struct tdmtx_cnt_shm_v1 { |
---|
| 3438 | + uint16 tdmtx_txa_on; /* TXA on requests */ |
---|
| 3439 | + uint16 tdmtx_tmcnt; /* TXA on requests */ |
---|
| 3440 | + uint16 tdmtx_por_on; /* TXA POR requests */ |
---|
| 3441 | + uint16 tdmtx_txpuen; /* Path enable requests */ |
---|
| 3442 | + uint16 tdmtx_txpudis; /* Total number of times Tx path is muted on the slice */ |
---|
| 3443 | + uint16 tdmtx_txpri_on; /* Total number of times Tx priority was obtained by the slice */ |
---|
| 3444 | + uint16 tdmtx_txdefer; /* Total number of times Tx was defered by the slice */ |
---|
| 3445 | + uint16 tdmtx_txmute; /* Total number of times active Tx muted on the slice */ |
---|
| 3446 | + uint16 tdmtx_actpwrboff; /* Total number of times TX power is backed off by the slice */ |
---|
| 3447 | + uint16 tdmtx_txa_dur_l; /* Total time (low 16 bits) txa on */ |
---|
| 3448 | + uint16 tdmtx_txa_dur_h; /* Total time (low 16 bits) txa on */ |
---|
| 3449 | + uint16 tdmtx_txpri_dur_l; /* Total time (low 16 bits) TXPri */ |
---|
| 3450 | + uint16 tdmtx_txpri_dur_h; /* Total time (high 16 bits) TXPri */ |
---|
| 3451 | + uint16 tdmtx_txdefer_dur_l; /* Total time (low 16 bits) txdefer */ |
---|
| 3452 | + uint16 tdmtx_txdefer_dur_h; /* Total time (high 16 bits) txdefer */ |
---|
| 3453 | +} tdmtx_cnt_shm_v1_t; |
---|
| 3454 | + |
---|
| 3455 | +/* structure holding tdm counters that interface to iovar for version 2 */ |
---|
| 3456 | +typedef struct tdmtx_cnt_v2 { |
---|
| 3457 | + uint16 ver; |
---|
| 3458 | + uint16 length; /* length of this structure */ |
---|
| 3459 | + uint16 wlc_idx; /* index for wlc */ |
---|
| 3460 | + uint16 enabled; /* tdmtx is enabled on slice */ |
---|
| 3461 | + uint32 tdmtx_txa_on; /* TXA on requests */ |
---|
| 3462 | + uint32 tdmtx_txa_tmcnt; /* Total number of TXA timeout */ |
---|
| 3463 | + uint32 tdmtx_porhi_on; /* TXA PORHI requests */ |
---|
| 3464 | + uint32 tdmtx_porlo_on; /* TXA PORLO requests */ |
---|
| 3465 | + uint32 tdmtx_txpuen; /* Path enable requests */ |
---|
| 3466 | + uint32 tdmtx_txpudis; /* Total number of times Tx path is muted on the slice */ |
---|
| 3467 | + uint32 tdmtx_txpri_on; /* Total number of times Tx priority was obtained by the slice */ |
---|
| 3468 | + uint32 tdmtx_txdefer; /* Total number of times Tx was deferred on the slice */ |
---|
| 3469 | + uint32 tdmtx_txmute; /* Total number of times active Tx muted on the slice */ |
---|
| 3470 | + uint32 tdmtx_actpwrboff; /* Total number of times TX power is backed off by the slice */ |
---|
| 3471 | + uint32 tdmtx_txa_dur; /* Total time txa on */ |
---|
| 3472 | + uint32 tdmtx_txpri_dur; /* Total time TXPri */ |
---|
| 3473 | + uint32 tdmtx_txdefer_dur; /* Total time txdefer */ |
---|
| 3474 | + /* TDMTX input fields */ |
---|
| 3475 | + uint32 tdmtx_txpri; |
---|
| 3476 | + uint32 tdmtx_defer; |
---|
| 3477 | + uint32 tdmtx_threshold; |
---|
| 3478 | + uint32 tdmtx_rssi_threshold; |
---|
| 3479 | + uint32 tdmtx_txpwrboff; |
---|
| 3480 | + uint32 tdmtx_txpwrboff_dt; |
---|
| 3481 | +} tdmtx_cnt_v2_t; |
---|
| 3482 | + |
---|
| 3483 | +/* structure holding counters that match exactly shm field sizes */ |
---|
| 3484 | +typedef struct tdmtx_cnt_shm_v2 { |
---|
| 3485 | + uint16 tdmtx_txa_on; /* TXA on requests */ |
---|
| 3486 | + uint16 tdmtx_tmcnt; /* TXA on requests */ |
---|
| 3487 | + uint16 tdmtx_porhi_on; /* TXA PORHI requests */ |
---|
| 3488 | + uint16 tdmtx_porlo_on; /* TXA PORLO requests */ |
---|
| 3489 | + uint16 tdmtx_txpuen; /* Path enable requests */ |
---|
| 3490 | + uint16 tdmtx_txpudis; /* Total number of times Tx path is muted on the slice */ |
---|
| 3491 | + uint16 tdmtx_txpri_on; /* Total number of times Tx priority was obtained by the slice */ |
---|
| 3492 | + uint16 tdmtx_txdefer; /* Total number of times Tx was defered by the slice */ |
---|
| 3493 | + uint16 tdmtx_txmute; /* Total number of times active Tx muted on the slice */ |
---|
| 3494 | + uint16 tdmtx_actpwrboff; /* Total number of times TX power is backed off by the slice */ |
---|
| 3495 | + uint16 tdmtx_txa_dur_l; /* Total time (low 16 bits) txa on */ |
---|
| 3496 | + uint16 tdmtx_txa_dur_h; /* Total time (low 16 bits) txa on */ |
---|
| 3497 | + uint16 tdmtx_txpri_dur_l; /* Total time (low 16 bits) TXPri */ |
---|
| 3498 | + uint16 tdmtx_txpri_dur_h; /* Total time (high 16 bits) TXPri */ |
---|
| 3499 | + uint16 tdmtx_txdefer_dur_l; /* Total time (low 16 bits) txdefer */ |
---|
| 3500 | + uint16 tdmtx_txdefer_dur_h; /* Total time (high 16 bits) txdefer */ |
---|
| 3501 | +} tdmtx_cnt_shm_v2_t; |
---|
| 3502 | + |
---|
| 3503 | +typedef struct wl_tdmtx_ioc { |
---|
| 3504 | + uint16 id; /* ID of the sub-command */ |
---|
| 3505 | + uint16 len; /* total length of all data[] */ |
---|
| 3506 | + uint8 data[]; /* var len payload */ |
---|
| 3507 | +} wl_tdmtx_ioc_t; |
---|
| 3508 | + |
---|
| 3509 | +/* |
---|
| 3510 | + * iovar subcommand ids |
---|
| 3511 | + */ |
---|
| 3512 | +enum { |
---|
| 3513 | + IOV_TDMTX_ENB = 1, |
---|
| 3514 | + IOV_TDMTX_STATUS = 2, |
---|
| 3515 | + IOV_TDMTX_TXPRI = 3, |
---|
| 3516 | + IOV_TDMTX_DEFER = 4, |
---|
| 3517 | + IOV_TDMTX_TXA = 5, |
---|
| 3518 | + IOV_TDMTX_CFG = 6, |
---|
| 3519 | + IOV_TDMTX_LAST |
---|
| 3520 | +}; |
---|
| 3521 | + |
---|
| 3522 | +/** |
---|
| 3523 | + * The number of variables in wl macstat cnt struct. |
---|
2086 | 3524 | * (wl_cnt_ge40mcst_v1_t, wl_cnt_lt40mcst_v1_t, wl_cnt_v_le10_mcst_t) |
---|
2087 | 3525 | */ |
---|
2088 | 3526 | #define WL_CNT_MCST_VAR_NUM 64 |
---|
2089 | 3527 | /* sizeof(wl_cnt_ge40mcst_v1_t), sizeof(wl_cnt_lt40mcst_v1_t), and sizeof(wl_cnt_v_le10_mcst_t) */ |
---|
2090 | | -#define WL_CNT_MCST_STRUCT_SZ ((uint)sizeof(uint32) * WL_CNT_MCST_VAR_NUM) |
---|
| 3528 | +#define WL_CNT_MCST_STRUCT_SZ ((uint32)sizeof(uint32) * WL_CNT_MCST_VAR_NUM) |
---|
| 3529 | +#define WL_CNT_REV80_MCST_STRUCT_SZ ((uint32)sizeof(wl_cnt_ge80mcst_v1_t)) |
---|
| 3530 | +#define WL_CNT_REV80_MCST_TXFUNFlW_STRUCT_FIXED_SZ \ |
---|
| 3531 | + ((uint32)OFFSETOF(wl_cnt_ge80_txfunfl_v1_t, txfunfl)) |
---|
| 3532 | +#define WL_CNT_REV80_MCST_TXFUNFl_STRUCT_SZ(fcnt) \ |
---|
| 3533 | + (WL_CNT_REV80_MCST_TXFUNFlW_STRUCT_FIXED_SZ + (fcnt * sizeof(uint32))) |
---|
| 3534 | +#define WL_CNT_REV80_MCST_TXFUNFlW_STRUCT_SZ (WL_CNT_REV80_MCST_TXFUNFl_STRUCT_SZ(NFIFO_EXT)) |
---|
| 3535 | + |
---|
| 3536 | +#define WL_CNT_MCXST_STRUCT_SZ ((uint32)sizeof(wl_cnt_ge64mcxst_v1_t)) |
---|
| 3537 | + |
---|
| 3538 | +#define WL_CNT_HE_STRUCT_SZ ((uint32)sizeof(wl_he_cnt_wlc_t)) |
---|
| 3539 | + |
---|
| 3540 | +#define WL_CNT_SECVLN_STRUCT_SZ ((uint32)sizeof(wl_secvln_cnt_t)) |
---|
2091 | 3541 | |
---|
2092 | 3542 | #define INVALID_CNT_VAL (uint32)(-1) |
---|
2093 | | -#define WL_CNT_MCXST_STRUCT_SZ ((uint)sizeof(wl_cnt_ge64mcxst_v1_t)) |
---|
2094 | 3543 | |
---|
2095 | | -#define WL_XTLV_CNTBUF_MAX_SIZE ((uint)(OFFSETOF(wl_cnt_info_t, data)) + \ |
---|
2096 | | - (uint)BCM_XTLV_HDR_SIZE + (uint)sizeof(wl_cnt_wlc_t) + \ |
---|
2097 | | - (uint)BCM_XTLV_HDR_SIZE + WL_CNT_MCST_STRUCT_SZ + \ |
---|
2098 | | - (uint)BCM_XTLV_HDR_SIZE + WL_CNT_MCXST_STRUCT_SZ) |
---|
| 3544 | +#define WL_XTLV_CNTBUF_MAX_SIZE ((uint32)(OFFSETOF(wl_cnt_info_t, data)) + \ |
---|
| 3545 | + (uint32)BCM_XTLV_HDR_SIZE + (uint32)sizeof(wl_cnt_wlc_t) + \ |
---|
| 3546 | + (uint32)BCM_XTLV_HDR_SIZE + WL_CNT_MCST_STRUCT_SZ + \ |
---|
| 3547 | + (uint32)BCM_XTLV_HDR_SIZE + WL_CNT_MCXST_STRUCT_SZ) |
---|
2099 | 3548 | |
---|
2100 | | -#define WL_CNTBUF_MAX_SIZE MAX(WL_XTLV_CNTBUF_MAX_SIZE, (uint)sizeof(wl_cnt_ver_11_t)) |
---|
| 3549 | +#define WL_CNTBUF_MAX_SIZE MAX(WL_XTLV_CNTBUF_MAX_SIZE, (uint32)sizeof(wl_cnt_ver_11_t)) |
---|
2101 | 3550 | |
---|
2102 | | -/* Top structure of counters IOVar buffer */ |
---|
| 3551 | +/** Top structure of counters IOVar buffer */ |
---|
2103 | 3552 | typedef struct { |
---|
2104 | 3553 | uint16 version; /**< see definition of WL_CNT_T_VERSION */ |
---|
2105 | 3554 | uint16 datalen; /**< length of data including all paddings. */ |
---|
2106 | | - uint8 data [1]; /**< variable length payload: |
---|
| 3555 | + uint8 data []; /**< variable length payload: |
---|
2107 | 3556 | * 1 or more bcm_xtlv_t type of tuples. |
---|
2108 | 3557 | * each tuple is padded to multiple of 4 bytes. |
---|
2109 | 3558 | * 'datalen' field of this structure includes all paddings. |
---|
2110 | 3559 | */ |
---|
2111 | 3560 | } wl_cnt_info_t; |
---|
2112 | 3561 | |
---|
2113 | | -/* wlc layer counters */ |
---|
| 3562 | +/* Top structure of subcounters IOVar buffer |
---|
| 3563 | + * Whenever we make any change in this structure |
---|
| 3564 | + * WL_SUBCNTR_IOV_VER should be updated accordingly |
---|
| 3565 | + * The structure definition should remain consistant b/w |
---|
| 3566 | + * FW and wl/WLM app. |
---|
| 3567 | + */ |
---|
| 3568 | +typedef struct { |
---|
| 3569 | + uint16 version; /* Version of IOVAR structure. Used for backward |
---|
| 3570 | + * compatibility in future. Whenever we make any |
---|
| 3571 | + * changes to this structure then value of WL_SUBCNTR_IOV_VER |
---|
| 3572 | + * needs to be updated properly. |
---|
| 3573 | + */ |
---|
| 3574 | + uint16 length; /* length in bytes of this structure */ |
---|
| 3575 | + uint16 counters_version; /* see definition of WL_CNT_T_VERSION |
---|
| 3576 | + * wl app will send the version of counters |
---|
| 3577 | + * which is used to calculate the offset of counters. |
---|
| 3578 | + * It must match the version of counters FW is using |
---|
| 3579 | + * else FW will return error with his version of counters |
---|
| 3580 | + * set in this field. |
---|
| 3581 | + */ |
---|
| 3582 | + uint16 num_subcounters; /* Number of counter offset passed by wl app to FW. */ |
---|
| 3583 | + uint32 data[1]; /* variable length payload: |
---|
| 3584 | + * Offsets to the counters will be passed to FW |
---|
| 3585 | + * throught this data field. FW will return the value of counters |
---|
| 3586 | + * at the offsets passed by wl app in this fiels itself. |
---|
| 3587 | + */ |
---|
| 3588 | +} wl_subcnt_info_t; |
---|
| 3589 | + |
---|
| 3590 | +/* Top structure of counters TLV version IOVar buffer |
---|
| 3591 | + * The structure definition should remain consistant b/w |
---|
| 3592 | + * FW and wl/WLM app. |
---|
| 3593 | + */ |
---|
| 3594 | +typedef struct { |
---|
| 3595 | + uint16 version; /* Version of IOVAR structure. Added for backward |
---|
| 3596 | + * compatibility feature. If any changes are done, |
---|
| 3597 | + * WL_TLV_IOV_VER need to be updated. |
---|
| 3598 | + */ |
---|
| 3599 | + uint16 length; /* total len in bytes of this structure + payload */ |
---|
| 3600 | + uint16 counters_version; /* See definition of WL_CNT_VERSION_XTLV |
---|
| 3601 | + * wl app will update counter tlv version to be used |
---|
| 3602 | + * so to calculate offset of supported TLVs. |
---|
| 3603 | + * If there is a mismatch in the version, FW will update an error |
---|
| 3604 | + */ |
---|
| 3605 | + uint16 num_tlv; /* Max number of TLV info passed by FW to WL app. |
---|
| 3606 | + * and vice-versa |
---|
| 3607 | + */ |
---|
| 3608 | + uint32 data[]; /* variable length payload: |
---|
| 3609 | + * This stores the tlv as supported by F/W to the wl app. |
---|
| 3610 | + * This table is required to compute subcounter offsets at WLapp end. |
---|
| 3611 | + */ |
---|
| 3612 | +} wl_cntr_tlv_info_t; |
---|
| 3613 | + |
---|
| 3614 | +/** wlc layer counters */ |
---|
2114 | 3615 | typedef struct { |
---|
2115 | 3616 | /* transmit stat counters */ |
---|
2116 | 3617 | uint32 txframe; /**< tx data frames */ |
---|
.. | .. |
---|
2206 | 3707 | uint32 prq_bad_entries; /**< which could not be translated to info */ |
---|
2207 | 3708 | uint32 atim_suppress_count; /**< TX suppressions on ATIM fifo */ |
---|
2208 | 3709 | uint32 bcn_template_not_ready; /**< Template marked in use on send bcn ... */ |
---|
2209 | | - uint32 bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */ |
---|
| 3710 | + uint32 bcn_template_not_ready_done; /**< ...but "DMA done" interrupt rcvd */ |
---|
2210 | 3711 | uint32 late_tbtt_dpc; /**< TBTT DPC did not happen in time */ |
---|
2211 | 3712 | |
---|
2212 | 3713 | /* per-rate receive stat counters */ |
---|
2213 | | - uint32 rx1mbps; /* packets rx at 1Mbps */ |
---|
2214 | | - uint32 rx2mbps; /* packets rx at 2Mbps */ |
---|
2215 | | - uint32 rx5mbps5; /* packets rx at 5.5Mbps */ |
---|
2216 | | - uint32 rx6mbps; /* packets rx at 6Mbps */ |
---|
2217 | | - uint32 rx9mbps; /* packets rx at 9Mbps */ |
---|
2218 | | - uint32 rx11mbps; /* packets rx at 11Mbps */ |
---|
2219 | | - uint32 rx12mbps; /* packets rx at 12Mbps */ |
---|
2220 | | - uint32 rx18mbps; /* packets rx at 18Mbps */ |
---|
2221 | | - uint32 rx24mbps; /* packets rx at 24Mbps */ |
---|
2222 | | - uint32 rx36mbps; /* packets rx at 36Mbps */ |
---|
2223 | | - uint32 rx48mbps; /* packets rx at 48Mbps */ |
---|
2224 | | - uint32 rx54mbps; /* packets rx at 54Mbps */ |
---|
2225 | | - uint32 rx108mbps; /* packets rx at 108mbps */ |
---|
2226 | | - uint32 rx162mbps; /* packets rx at 162mbps */ |
---|
2227 | | - uint32 rx216mbps; /* packets rx at 216 mbps */ |
---|
2228 | | - uint32 rx270mbps; /* packets rx at 270 mbps */ |
---|
2229 | | - uint32 rx324mbps; /* packets rx at 324 mbps */ |
---|
2230 | | - uint32 rx378mbps; /* packets rx at 378 mbps */ |
---|
2231 | | - uint32 rx432mbps; /* packets rx at 432 mbps */ |
---|
2232 | | - uint32 rx486mbps; /* packets rx at 486 mbps */ |
---|
2233 | | - uint32 rx540mbps; /* packets rx at 540 mbps */ |
---|
| 3714 | + uint32 rx1mbps; /**< packets rx at 1Mbps */ |
---|
| 3715 | + uint32 rx2mbps; /**< packets rx at 2Mbps */ |
---|
| 3716 | + uint32 rx5mbps5; /**< packets rx at 5.5Mbps */ |
---|
| 3717 | + uint32 rx6mbps; /**< packets rx at 6Mbps */ |
---|
| 3718 | + uint32 rx9mbps; /**< packets rx at 9Mbps */ |
---|
| 3719 | + uint32 rx11mbps; /**< packets rx at 11Mbps */ |
---|
| 3720 | + uint32 rx12mbps; /**< packets rx at 12Mbps */ |
---|
| 3721 | + uint32 rx18mbps; /**< packets rx at 18Mbps */ |
---|
| 3722 | + uint32 rx24mbps; /**< packets rx at 24Mbps */ |
---|
| 3723 | + uint32 rx36mbps; /**< packets rx at 36Mbps */ |
---|
| 3724 | + uint32 rx48mbps; /**< packets rx at 48Mbps */ |
---|
| 3725 | + uint32 rx54mbps; /**< packets rx at 54Mbps */ |
---|
| 3726 | + uint32 rx108mbps; /**< packets rx at 108mbps */ |
---|
| 3727 | + uint32 rx162mbps; /**< packets rx at 162mbps */ |
---|
| 3728 | + uint32 rx216mbps; /**< packets rx at 216 mbps */ |
---|
| 3729 | + uint32 rx270mbps; /**< packets rx at 270 mbps */ |
---|
| 3730 | + uint32 rx324mbps; /**< packets rx at 324 mbps */ |
---|
| 3731 | + uint32 rx378mbps; /**< packets rx at 378 mbps */ |
---|
| 3732 | + uint32 rx432mbps; /**< packets rx at 432 mbps */ |
---|
| 3733 | + uint32 rx486mbps; /**< packets rx at 486 mbps */ |
---|
| 3734 | + uint32 rx540mbps; /**< packets rx at 540 mbps */ |
---|
2234 | 3735 | |
---|
2235 | 3736 | uint32 rfdisable; /**< count of radio disables */ |
---|
2236 | 3737 | |
---|
.. | .. |
---|
2266 | 3767 | uint32 pstarxbcmc; /**< count of bcmc frames received on all psta */ |
---|
2267 | 3768 | uint32 pstatxbcmc; /**< count of bcmc frames transmitted on all psta */ |
---|
2268 | 3769 | |
---|
2269 | | - uint32 cso_passthrough; /* hw cso required but passthrough */ |
---|
| 3770 | + uint32 cso_passthrough; /**< hw cso required but passthrough */ |
---|
2270 | 3771 | uint32 cso_normal; /**< hw cso hdr for normal process */ |
---|
2271 | 3772 | uint32 chained; /**< number of frames chained */ |
---|
2272 | 3773 | uint32 chainedsz1; /**< number of chain size 1 frames */ |
---|
.. | .. |
---|
2275 | 3776 | uint32 currchainsz; /**< current chain size */ |
---|
2276 | 3777 | uint32 pciereset; /**< Secondary Bus Reset issued by driver */ |
---|
2277 | 3778 | uint32 cfgrestore; /**< configspace restore by driver */ |
---|
2278 | | - uint32 reinitreason[NREINITREASONCOUNT]; /* reinitreason counters; 0: Unknown reason */ |
---|
| 3779 | + uint32 reinitreason[NREINITREASONCOUNT]; /**< reinitreason counters; 0: Unknown reason */ |
---|
2279 | 3780 | uint32 rxrtry; |
---|
2280 | | - |
---|
2281 | | - uint32 rxmpdu_mu; /* Number of MU MPDUs received */ |
---|
| 3781 | + uint32 rxmpdu_mu; /**< Number of MU MPDUs received */ |
---|
2282 | 3782 | |
---|
2283 | 3783 | /* detailed control/management frames */ |
---|
2284 | | - uint32 txbar; /**< Number of TX BAR */ |
---|
2285 | | - uint32 rxbar; /**< Number of RX BAR */ |
---|
2286 | | - uint32 txpspoll; /**< Number of TX PS-poll */ |
---|
2287 | | - uint32 rxpspoll; /**< Number of RX PS-poll */ |
---|
2288 | | - uint32 txnull; /**< Number of TX NULL_DATA */ |
---|
2289 | | - uint32 rxnull; /**< Number of RX NULL_DATA */ |
---|
2290 | | - uint32 txqosnull; /**< Number of TX NULL_QoSDATA */ |
---|
2291 | | - uint32 rxqosnull; /**< Number of RX NULL_QoSDATA */ |
---|
2292 | | - uint32 txassocreq; /**< Number of TX ASSOC request */ |
---|
2293 | | - uint32 rxassocreq; /**< Number of RX ASSOC request */ |
---|
2294 | | - uint32 txreassocreq; /**< Number of TX REASSOC request */ |
---|
2295 | | - uint32 rxreassocreq; /**< Number of RX REASSOC request */ |
---|
2296 | | - uint32 txdisassoc; /**< Number of TX DISASSOC */ |
---|
2297 | | - uint32 rxdisassoc; /**< Number of RX DISASSOC */ |
---|
2298 | | - uint32 txassocrsp; /**< Number of TX ASSOC response */ |
---|
2299 | | - uint32 rxassocrsp; /**< Number of RX ASSOC response */ |
---|
2300 | | - uint32 txreassocrsp; /**< Number of TX REASSOC response */ |
---|
2301 | | - uint32 rxreassocrsp; /**< Number of RX REASSOC response */ |
---|
2302 | | - uint32 txauth; /**< Number of TX AUTH */ |
---|
2303 | | - uint32 rxauth; /**< Number of RX AUTH */ |
---|
2304 | | - uint32 txdeauth; /**< Number of TX DEAUTH */ |
---|
2305 | | - uint32 rxdeauth; /**< Number of RX DEAUTH */ |
---|
2306 | | - uint32 txprobereq; /**< Number of TX probe request */ |
---|
2307 | | - uint32 rxprobereq; /**< Number of RX probe request */ |
---|
2308 | | - uint32 txprobersp; /**< Number of TX probe response */ |
---|
2309 | | - uint32 rxprobersp; /**< Number of RX probe response */ |
---|
2310 | | - uint32 txaction; /**< Number of TX action frame */ |
---|
2311 | | - uint32 rxaction; /**< Number of RX action frame */ |
---|
2312 | | - uint32 ampdu_wds; /**< Number of AMPDU watchdogs */ |
---|
2313 | | - uint32 txlost; /**< Number of lost packets reported in txs */ |
---|
| 3784 | + uint32 txbar; /**< Number of TX BAR */ |
---|
| 3785 | + uint32 rxbar; /**< Number of RX BAR */ |
---|
| 3786 | + uint32 txpspoll; /**< Number of TX PS-poll */ |
---|
| 3787 | + uint32 rxpspoll; /**< Number of RX PS-poll */ |
---|
| 3788 | + uint32 txnull; /**< Number of TX NULL_DATA */ |
---|
| 3789 | + uint32 rxnull; /**< Number of RX NULL_DATA */ |
---|
| 3790 | + uint32 txqosnull; /**< Number of TX NULL_QoSDATA */ |
---|
| 3791 | + uint32 rxqosnull; /**< Number of RX NULL_QoSDATA */ |
---|
| 3792 | + uint32 txassocreq; /**< Number of TX ASSOC request */ |
---|
| 3793 | + uint32 rxassocreq; /**< Number of RX ASSOC request */ |
---|
| 3794 | + uint32 txreassocreq; /**< Number of TX REASSOC request */ |
---|
| 3795 | + uint32 rxreassocreq; /**< Number of RX REASSOC request */ |
---|
| 3796 | + uint32 txdisassoc; /**< Number of TX DISASSOC */ |
---|
| 3797 | + uint32 rxdisassoc; /**< Number of RX DISASSOC */ |
---|
| 3798 | + uint32 txassocrsp; /**< Number of TX ASSOC response */ |
---|
| 3799 | + uint32 rxassocrsp; /**< Number of RX ASSOC response */ |
---|
| 3800 | + uint32 txreassocrsp; /**< Number of TX REASSOC response */ |
---|
| 3801 | + uint32 rxreassocrsp; /**< Number of RX REASSOC response */ |
---|
| 3802 | + uint32 txauth; /**< Number of TX AUTH */ |
---|
| 3803 | + uint32 rxauth; /**< Number of RX AUTH */ |
---|
| 3804 | + uint32 txdeauth; /**< Number of TX DEAUTH */ |
---|
| 3805 | + uint32 rxdeauth; /**< Number of RX DEAUTH */ |
---|
| 3806 | + uint32 txprobereq; /**< Number of TX probe request */ |
---|
| 3807 | + uint32 rxprobereq; /**< Number of RX probe request */ |
---|
| 3808 | + uint32 txprobersp; /**< Number of TX probe response */ |
---|
| 3809 | + uint32 rxprobersp; /**< Number of RX probe response */ |
---|
| 3810 | + uint32 txaction; /**< Number of TX action frame */ |
---|
| 3811 | + uint32 rxaction; /**< Number of RX action frame */ |
---|
| 3812 | + uint32 ampdu_wds; /**< Number of AMPDU watchdogs */ |
---|
| 3813 | + uint32 txlost; /**< Number of lost packets reported in txs */ |
---|
2314 | 3814 | uint32 txdatamcast; /**< Number of TX multicast data packets */ |
---|
2315 | 3815 | uint32 txdatabcast; /**< Number of TX broadcast data packets */ |
---|
2316 | | - uint32 psmxwds; /**< Number of PSMx watchdogs */ |
---|
| 3816 | + uint32 psmxwds; /**< Number of PSMx watchdogs */ |
---|
| 3817 | + uint32 rxback; |
---|
| 3818 | + uint32 txback; |
---|
| 3819 | + uint32 p2p_tbtt; /**< Number of P2P TBTT Events */ |
---|
| 3820 | + uint32 p2p_tbtt_miss; /**< Number of P2P TBTT Events Miss */ |
---|
| 3821 | + uint32 txqueue_start; |
---|
| 3822 | + uint32 txqueue_end; |
---|
| 3823 | + uint32 txbcast; /* Broadcast TransmittedFrameCount */ |
---|
| 3824 | + uint32 txdropped; /* tx dropped pkts */ |
---|
| 3825 | + uint32 rxbcast; /* BroadcastReceivedFrameCount */ |
---|
| 3826 | + uint32 rxdropped; /* rx dropped pkts (derived: sum of others) */ |
---|
| 3827 | + uint32 txq_end_assoccb; /* forced txqueue_end callback fired in assoc */ |
---|
| 3828 | + uint32 tx_toss_cnt; /* number of tx packets tossed */ |
---|
| 3829 | + uint32 rx_toss_cnt; /* number of rx packets tossed */ |
---|
| 3830 | + uint32 last_tx_toss_rsn; /* reason because of which last tx pkt tossed */ |
---|
| 3831 | + uint32 last_rx_toss_rsn; /* reason because of which last rx pkt tossed */ |
---|
| 3832 | + uint32 pmk_badlen_cnt; /* number of invalid pmk len */ |
---|
| 3833 | + |
---|
2317 | 3834 | } wl_cnt_wlc_t; |
---|
| 3835 | + |
---|
| 3836 | +/* he counters Version 1 */ |
---|
| 3837 | +#define HE_COUNTERS_V1 (1) |
---|
| 3838 | +typedef struct wl_he_cnt_wlc_v1 { |
---|
| 3839 | + uint32 he_rxtrig_myaid; |
---|
| 3840 | + uint32 he_rxtrig_rand; |
---|
| 3841 | + uint32 he_colormiss_cnt; |
---|
| 3842 | + uint32 he_txmampdu; |
---|
| 3843 | + uint32 he_txmtid_back; |
---|
| 3844 | + uint32 he_rxmtid_back; |
---|
| 3845 | + uint32 he_rxmsta_back; |
---|
| 3846 | + uint32 he_txfrag; |
---|
| 3847 | + uint32 he_rxdefrag; |
---|
| 3848 | + uint32 he_txtrig; |
---|
| 3849 | + uint32 he_rxtrig_basic; |
---|
| 3850 | + uint32 he_rxtrig_murts; |
---|
| 3851 | + uint32 he_rxtrig_bsrp; |
---|
| 3852 | + uint32 he_rxdlmu; |
---|
| 3853 | + uint32 he_physu_rx; |
---|
| 3854 | + uint32 he_phyru_rx; |
---|
| 3855 | + uint32 he_txtbppdu; |
---|
| 3856 | +} wl_he_cnt_wlc_v1_t; |
---|
| 3857 | + |
---|
| 3858 | +/* he counters Version 2 */ |
---|
| 3859 | +#define HE_COUNTERS_V2 (2) |
---|
| 3860 | +typedef struct wl_he_cnt_wlc_v2 { |
---|
| 3861 | + uint16 version; |
---|
| 3862 | + uint16 len; |
---|
| 3863 | + uint32 he_rxtrig_myaid; /**< rxed valid trigger frame with myaid */ |
---|
| 3864 | + uint32 he_rxtrig_rand; /**< rxed valid trigger frame with random aid */ |
---|
| 3865 | + uint32 he_colormiss_cnt; /**< for bss color mismatch cases */ |
---|
| 3866 | + uint32 he_txmampdu; /**< for multi-TID AMPDU transmission */ |
---|
| 3867 | + uint32 he_txmtid_back; /**< for multi-TID BACK transmission */ |
---|
| 3868 | + uint32 he_rxmtid_back; /**< reception of multi-TID BACK */ |
---|
| 3869 | + uint32 he_rxmsta_back; /**< reception of multi-STA BACK */ |
---|
| 3870 | + uint32 he_txfrag; /**< transmission of Dynamic fragmented packets */ |
---|
| 3871 | + uint32 he_rxdefrag; /**< reception of dynamic fragmented packets */ |
---|
| 3872 | + uint32 he_txtrig; /**< transmission of trigger frames */ |
---|
| 3873 | + uint32 he_rxtrig_basic; /**< reception of basic trigger frame */ |
---|
| 3874 | + uint32 he_rxtrig_murts; /**< reception of MU-RTS trigger frame */ |
---|
| 3875 | + uint32 he_rxtrig_bsrp; /**< reception of BSR poll trigger frame */ |
---|
| 3876 | + uint32 he_rxdlmu; /**< reception of DL MU PPDU */ |
---|
| 3877 | + uint32 he_physu_rx; /**< reception of SU frame */ |
---|
| 3878 | + uint32 he_phyru_rx; /**< reception of RU frame */ |
---|
| 3879 | + uint32 he_txtbppdu; /**< increments on transmission of every TB PPDU */ |
---|
| 3880 | + uint32 he_null_tbppdu; /**< null TB PPDU's sent as a response to basic trigger frame */ |
---|
| 3881 | + uint32 he_rxtrig_bfrp; /**< reception of BFRP frame */ |
---|
| 3882 | + uint32 he_rxtrig_mubar; /**< reception of MU BAR frame */ |
---|
| 3883 | +} wl_he_cnt_wlc_v2_t; |
---|
| 3884 | + |
---|
| 3885 | +#ifndef HE_COUNTERS_VERSION_ENABLED |
---|
| 3886 | +#define HE_COUNTERS_VERSION (HE_COUNTERS_V1) |
---|
| 3887 | +typedef wl_he_cnt_wlc_v1_t wl_he_cnt_wlc_t; |
---|
| 3888 | +#endif /* HE_COUNTERS_VERSION_ENABLED */ |
---|
| 3889 | + |
---|
| 3890 | +/* security vulnerabilities counters */ |
---|
| 3891 | +typedef struct { |
---|
| 3892 | + uint32 ie_unknown; /* number of unknown IEs */ |
---|
| 3893 | + uint32 ie_invalid_length; /* number of IEs with invalid length */ |
---|
| 3894 | + uint32 ie_invalid_data; /* number of IEs with invalid data */ |
---|
| 3895 | + uint32 ipv6_invalid_length; /* number of IPv6 packets with invalid payload length */ |
---|
| 3896 | +} wl_secvln_cnt_t; |
---|
| 3897 | + |
---|
| 3898 | +/* Reinit reasons - do not put anything else other than reinit reasons here */ |
---|
| 3899 | +typedef struct { |
---|
| 3900 | + uint32 rsn[WL_REINIT_RC_LAST]; |
---|
| 3901 | +} reinit_rsns_t; |
---|
2318 | 3902 | |
---|
2319 | 3903 | /* MACXSTAT counters for ucodex (corerev >= 64) */ |
---|
2320 | 3904 | typedef struct { |
---|
.. | .. |
---|
2326 | 3910 | uint32 sfb2v; |
---|
2327 | 3911 | } wl_cnt_ge64mcxst_v1_t; |
---|
2328 | 3912 | |
---|
2329 | | -/* MACSTAT counters for ucode (corerev >= 40) */ |
---|
| 3913 | +/** MACSTAT counters for ucode (corerev >= 40) */ |
---|
2330 | 3914 | typedef struct { |
---|
2331 | 3915 | /* MAC counters: 32-bit version of d11.h's macstat_t */ |
---|
2332 | 3916 | uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, |
---|
.. | .. |
---|
2346 | 3930 | uint32 txphyerror; /**< Transmit phy error, type of error is reported in tx-status for |
---|
2347 | 3931 | * driver enqueued frames |
---|
2348 | 3932 | */ |
---|
2349 | | - uint32 pktengrxducast; /* unicast frames rxed by the pkteng code */ |
---|
2350 | | - uint32 pktengrxdmcast; /* multicast frames rxed by the pkteng code */ |
---|
| 3933 | + uint32 pktengrxducast; /**< unicast frames rxed by the pkteng code */ |
---|
| 3934 | + uint32 pktengrxdmcast; /**< multicast frames rxed by the pkteng code */ |
---|
2351 | 3935 | uint32 rxfrmtoolong; /**< Received frame longer than legal limit (2346 bytes) */ |
---|
2352 | 3936 | uint32 rxfrmtooshrt; /**< Received frame did not contain enough bytes for its frame type */ |
---|
2353 | 3937 | uint32 rxanyerr; /**< Any RX error that is not counted by other counters. */ |
---|
.. | .. |
---|
2374 | 3958 | * (unlikely to see these) |
---|
2375 | 3959 | */ |
---|
2376 | 3960 | uint32 rxbeaconmbss; /**< beacons received from member of BSS */ |
---|
2377 | | - uint32 rxdtucastobss; /* number of unicast frames addressed to the MAC from |
---|
| 3961 | + uint32 rxdtucastobss; /**< number of unicast frames addressed to the MAC from |
---|
2378 | 3962 | * other BSS (WDS FRAME) |
---|
2379 | 3963 | */ |
---|
2380 | 3964 | uint32 rxbeaconobss; /**< beacons received from other BSS */ |
---|
.. | .. |
---|
2411 | 3995 | uint32 bphy_badplcp; /**< number of bad PLCP reception on BPHY rate */ |
---|
2412 | 3996 | } wl_cnt_ge40mcst_v1_t; |
---|
2413 | 3997 | |
---|
2414 | | -/* MACSTAT counters for ucode (corerev < 40) */ |
---|
| 3998 | +/** MACSTAT counters for ucode (corerev < 40) */ |
---|
2415 | 3999 | typedef struct { |
---|
2416 | 4000 | /* MAC counters: 32-bit version of d11.h's macstat_t */ |
---|
2417 | 4001 | uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, |
---|
.. | .. |
---|
2459 | 4043 | * (unlikely to see these) |
---|
2460 | 4044 | */ |
---|
2461 | 4045 | uint32 rxbeaconmbss; /**< beacons received from member of BSS */ |
---|
2462 | | - uint32 rxdtucastobss; /* number of unicast frames addressed to the MAC from |
---|
| 4046 | + uint32 rxdtucastobss; /**< number of unicast frames addressed to the MAC from |
---|
2463 | 4047 | * other BSS (WDS FRAME) |
---|
2464 | 4048 | */ |
---|
2465 | 4049 | uint32 rxbeaconobss; /**< beacons received from other BSS */ |
---|
.. | .. |
---|
2496 | 4080 | uint32 bphy_badplcp; /**< number of bad PLCP reception on BPHY rate */ |
---|
2497 | 4081 | } wl_cnt_lt40mcst_v1_t; |
---|
2498 | 4082 | |
---|
2499 | | -/* MACSTAT counters for "wl counter" version <= 10 */ |
---|
| 4083 | +/** MACSTAT counters for ucode (corerev >= 80) */ |
---|
| 4084 | +typedef struct { |
---|
| 4085 | + /* MAC counters: 32-bit version of d11.h's macstat_t */ |
---|
| 4086 | + /* Start of PSM2HOST stats(72) block */ |
---|
| 4087 | + uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, |
---|
| 4088 | + * Control Management (includes retransmissions) |
---|
| 4089 | + */ |
---|
| 4090 | + uint32 txrtsfrm; /**< number of RTS sent out by the MAC */ |
---|
| 4091 | + uint32 txctsfrm; /**< number of CTS sent out by the MAC */ |
---|
| 4092 | + uint32 txackfrm; /**< number of ACK frames sent out */ |
---|
| 4093 | + uint32 txdnlfrm; /**< number of Null-Data transmission generated from template */ |
---|
| 4094 | + uint32 txbcnfrm; /**< beacons transmitted */ |
---|
| 4095 | + uint32 txampdu; /**< number of AMPDUs transmitted */ |
---|
| 4096 | + uint32 txmpdu; /**< number of MPDUs transmitted */ |
---|
| 4097 | + uint32 txtplunfl; /**< Template underflows (mac was too slow to transmit ACK/CTS |
---|
| 4098 | + * or BCN) |
---|
| 4099 | + */ |
---|
| 4100 | + uint32 txphyerror; /**< Transmit phy error, type of error is reported in tx-status for |
---|
| 4101 | + * driver enqueued frames |
---|
| 4102 | + */ |
---|
| 4103 | + uint32 pktengrxducast; /**< unicast frames rxed by the pkteng code */ |
---|
| 4104 | + uint32 pktengrxdmcast; /**< multicast frames rxed by the pkteng code */ |
---|
| 4105 | + uint32 rxfrmtoolong; /**< Received frame longer than legal limit (2346 bytes) */ |
---|
| 4106 | + uint32 rxfrmtooshrt; /**< Received frame did not contain enough bytes for its frame type */ |
---|
| 4107 | + uint32 rxanyerr; /**< Any RX error that is not counted by other counters. */ |
---|
| 4108 | + uint32 rxbadfcs; /**< number of frames for which the CRC check failed in the MAC */ |
---|
| 4109 | + uint32 rxbadplcp; /**< parity check of the PLCP header failed */ |
---|
| 4110 | + uint32 rxcrsglitch; /**< PHY was able to correlate the preamble but not the header */ |
---|
| 4111 | + uint32 rxstrt; /**< Number of received frames with a good PLCP |
---|
| 4112 | + * (i.e. passing parity check) |
---|
| 4113 | + */ |
---|
| 4114 | + uint32 rxdtucastmbss; /**< number of received DATA frames with good FCS and matching RA */ |
---|
| 4115 | + uint32 rxmgucastmbss; /**< number of received mgmt frames with good FCS and matching RA */ |
---|
| 4116 | + uint32 rxctlucast; /**< number of received CNTRL frames with good FCS and matching RA */ |
---|
| 4117 | + uint32 rxrtsucast; /**< number of unicast RTS addressed to the MAC (good FCS) */ |
---|
| 4118 | + uint32 rxctsucast; /**< number of unicast CTS addressed to the MAC (good FCS) */ |
---|
| 4119 | + uint32 rxackucast; /**< number of ucast ACKS received (good FCS) */ |
---|
| 4120 | + uint32 rxdtocast; /**< number of received DATA frames (good FCS and not matching RA) */ |
---|
| 4121 | + uint32 rxmgocast; /**< number of received MGMT frames (good FCS and not matching RA) */ |
---|
| 4122 | + uint32 rxctlocast; /**< number of received CNTRL frame (good FCS and not matching RA) */ |
---|
| 4123 | + uint32 rxrtsocast; /**< number of received RTS not addressed to the MAC */ |
---|
| 4124 | + uint32 rxctsocast; /**< number of received CTS not addressed to the MAC */ |
---|
| 4125 | + uint32 rxdtmcast; /**< number of RX Data multicast frames received by the MAC */ |
---|
| 4126 | + uint32 rxmgmcast; /**< number of RX Management multicast frames received by the MAC */ |
---|
| 4127 | + uint32 rxctlmcast; /**< number of RX Control multicast frames received by the MAC |
---|
| 4128 | + * (unlikely to see these) |
---|
| 4129 | + */ |
---|
| 4130 | + uint32 rxbeaconmbss; /**< beacons received from member of BSS */ |
---|
| 4131 | + uint32 rxdtucastobss; /**< number of unicast frames addressed to the MAC from |
---|
| 4132 | + * other BSS (WDS FRAME) |
---|
| 4133 | + */ |
---|
| 4134 | + uint32 rxbeaconobss; /**< beacons received from other BSS */ |
---|
| 4135 | + uint32 rxrsptmout; /**< number of response timeouts for transmitted frames |
---|
| 4136 | + * expecting a response |
---|
| 4137 | + */ |
---|
| 4138 | + uint32 bcntxcancl; /**< transmit beacons canceled due to receipt of beacon (IBSS) */ |
---|
| 4139 | + uint32 rxnodelim; /**< number of no valid delimiter detected by ampdu parser */ |
---|
| 4140 | + uint32 missbcn_dbg; /**< number of beacon missed to receive */ |
---|
| 4141 | + uint32 pmqovfl; /**< number of PMQ overflows */ |
---|
| 4142 | + uint32 rxcgprqfrm; /**< number of received Probe requests that made it into |
---|
| 4143 | + * the PRQ fifo |
---|
| 4144 | + */ |
---|
| 4145 | + uint32 rxcgprsqovfl; /**< Rx Probe Request Que overflow in the AP */ |
---|
| 4146 | + uint32 txcgprsfail; /**< Tx Probe Response Fail. AP sent probe response but did |
---|
| 4147 | + * not get ACK |
---|
| 4148 | + */ |
---|
| 4149 | + uint32 txcgprssuc; /**< Tx Probe Response Success (ACK was received) */ |
---|
| 4150 | + uint32 prs_timeout; /**< number of probe requests that were dropped from the PRQ |
---|
| 4151 | + * fifo because a probe response could not be sent out within |
---|
| 4152 | + * the time limit defined in M_PRS_MAXTIME |
---|
| 4153 | + */ |
---|
| 4154 | + uint32 txrtsfail; /**< number of rts transmission failure that reach retry limit */ |
---|
| 4155 | + uint32 txucast; /**< number of unicast tx expecting response other than cts/cwcts */ |
---|
| 4156 | + uint32 txinrtstxop; /**< number of data frame transmissions during rts txop */ |
---|
| 4157 | + uint32 rxback; /**< blockack rxcnt */ |
---|
| 4158 | + uint32 txback; /**< blockack txcnt */ |
---|
| 4159 | + uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ |
---|
| 4160 | + uint32 rxdrop20s; /**< drop secondary cnt */ |
---|
| 4161 | + uint32 rxtoolate; /**< receive too late */ |
---|
| 4162 | + uint32 bphy_badplcp; /**< number of bad PLCP reception on BPHY rate */ |
---|
| 4163 | + uint32 rxtrig_myaid; /* New counters added in corerev 80 */ |
---|
| 4164 | + uint32 rxtrig_rand; |
---|
| 4165 | + uint32 goodfcs; |
---|
| 4166 | + uint32 colormiss; |
---|
| 4167 | + uint32 txmampdu; |
---|
| 4168 | + uint32 rxmtidback; |
---|
| 4169 | + uint32 rxmstaback; |
---|
| 4170 | + uint32 txfrag; |
---|
| 4171 | + /* End of PSM2HOST stats block */ |
---|
| 4172 | + /* start of rxerror overflow counter(24) block which are modified/added in corerev 80 */ |
---|
| 4173 | + uint32 phyovfl; |
---|
| 4174 | + uint32 rxf0ovfl; /**< number of receive fifo 0 overflows */ |
---|
| 4175 | + uint32 rxf1ovfl; /**< number of receive fifo 1 overflows */ |
---|
| 4176 | + uint32 lenfovfl; |
---|
| 4177 | + uint32 weppeof; |
---|
| 4178 | + uint32 badplcp; |
---|
| 4179 | + uint32 msduthresh; |
---|
| 4180 | + uint32 strmeof; |
---|
| 4181 | + uint32 stsfifofull; |
---|
| 4182 | + uint32 stsfifoerr; |
---|
| 4183 | + uint32 PAD[6]; |
---|
| 4184 | + uint32 rxerr_stat; |
---|
| 4185 | + uint32 ctx_fifo_full; |
---|
| 4186 | + uint32 txdatamcast; /**< Number of TX multicast data packets */ |
---|
| 4187 | + uint32 txdatabcast; /**< Number of TX broadcast data packets */ |
---|
| 4188 | + uint32 PAD[36]; /* PAD added for counter elements to be added soon */ |
---|
| 4189 | +} wl_cnt_ge80mcst_v1_t; |
---|
| 4190 | + |
---|
| 4191 | +typedef struct { |
---|
| 4192 | + uint32 fifocount; |
---|
| 4193 | + uint32 txfunfl[]; |
---|
| 4194 | +} wl_cnt_ge80_txfunfl_v1_t; |
---|
| 4195 | + |
---|
| 4196 | +/** MACSTAT counters for "wl counter" version <= 10 */ |
---|
2500 | 4197 | typedef struct { |
---|
2501 | 4198 | /* MAC counters: 32-bit version of d11.h's macstat_t */ |
---|
2502 | 4199 | uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, |
---|
.. | .. |
---|
2516 | 4213 | uint32 txphyerror; /**< Transmit phy error, type of error is reported in tx-status for |
---|
2517 | 4214 | * driver enqueued frames |
---|
2518 | 4215 | */ |
---|
2519 | | - uint32 pktengrxducast; /* unicast frames rxed by the pkteng code */ |
---|
2520 | | - uint32 pktengrxdmcast; /* multicast frames rxed by the pkteng code */ |
---|
| 4216 | + uint32 pktengrxducast; /**< unicast frames rxed by the pkteng code */ |
---|
| 4217 | + uint32 pktengrxdmcast; /**< multicast frames rxed by the pkteng code */ |
---|
2521 | 4218 | uint32 rxfrmtoolong; /**< Received frame longer than legal limit (2346 bytes) */ |
---|
2522 | 4219 | uint32 rxfrmtooshrt; /**< Received frame did not contain enough bytes for its frame type */ |
---|
2523 | 4220 | uint32 rxinvmachdr; /**< Either the protocol version != 0 or frame type not |
---|
.. | .. |
---|
2582 | 4279 | uint32 rxtoolate; /**< receive too late */ |
---|
2583 | 4280 | uint32 bphy_badplcp; /**< number of bad PLCP reception on BPHY rate */ |
---|
2584 | 4281 | } wl_cnt_v_le10_mcst_t; |
---|
| 4282 | + |
---|
| 4283 | +#define MAX_RX_FIFO 3 |
---|
| 4284 | +#define WL_RXFIFO_CNT_VERSION 1 /* current version of wl_rxfifo_cnt_t */ |
---|
| 4285 | +typedef struct { |
---|
| 4286 | + /* Counters for frames received from rx fifos */ |
---|
| 4287 | + uint16 version; |
---|
| 4288 | + uint16 length; /* length of entire structure */ |
---|
| 4289 | + uint32 rxf_data[MAX_RX_FIFO]; /* data frames from rx fifo */ |
---|
| 4290 | + uint32 rxf_mgmtctl[MAX_RX_FIFO]; /* mgmt/ctl frames from rx fifo */ |
---|
| 4291 | +} wl_rxfifo_cnt_t; |
---|
2585 | 4292 | |
---|
2586 | 4293 | typedef struct { |
---|
2587 | 4294 | uint16 version; /**< see definition of WL_CNT_T_VERSION */ |
---|
.. | .. |
---|
2687 | 4394 | * (unlikely to see these) |
---|
2688 | 4395 | */ |
---|
2689 | 4396 | uint32 rxbeaconmbss; /**< beacons received from member of BSS */ |
---|
2690 | | - uint32 rxdfrmucastobss; /* number of unicast frames addressed to the MAC from |
---|
| 4397 | + uint32 rxdfrmucastobss; /**< number of unicast frames addressed to the MAC from |
---|
2691 | 4398 | * other BSS (WDS FRAME) |
---|
2692 | 4399 | */ |
---|
2693 | 4400 | uint32 rxbeaconobss; /**< beacons received from other BSS */ |
---|
.. | .. |
---|
2758 | 4465 | uint32 prq_bad_entries; /**< which could not be translated to info */ |
---|
2759 | 4466 | uint32 atim_suppress_count; /**< TX suppressions on ATIM fifo */ |
---|
2760 | 4467 | uint32 bcn_template_not_ready; /**< Template marked in use on send bcn ... */ |
---|
2761 | | - uint32 bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */ |
---|
| 4468 | + uint32 bcn_template_not_ready_done; /**< ...but "DMA done" interrupt rcvd */ |
---|
2762 | 4469 | uint32 late_tbtt_dpc; /**< TBTT DPC did not happen in time */ |
---|
2763 | 4470 | |
---|
2764 | 4471 | /* per-rate receive stat counters */ |
---|
2765 | | - uint32 rx1mbps; /* packets rx at 1Mbps */ |
---|
2766 | | - uint32 rx2mbps; /* packets rx at 2Mbps */ |
---|
2767 | | - uint32 rx5mbps5; /* packets rx at 5.5Mbps */ |
---|
2768 | | - uint32 rx6mbps; /* packets rx at 6Mbps */ |
---|
2769 | | - uint32 rx9mbps; /* packets rx at 9Mbps */ |
---|
2770 | | - uint32 rx11mbps; /* packets rx at 11Mbps */ |
---|
2771 | | - uint32 rx12mbps; /* packets rx at 12Mbps */ |
---|
2772 | | - uint32 rx18mbps; /* packets rx at 18Mbps */ |
---|
2773 | | - uint32 rx24mbps; /* packets rx at 24Mbps */ |
---|
2774 | | - uint32 rx36mbps; /* packets rx at 36Mbps */ |
---|
2775 | | - uint32 rx48mbps; /* packets rx at 48Mbps */ |
---|
2776 | | - uint32 rx54mbps; /* packets rx at 54Mbps */ |
---|
2777 | | - uint32 rx108mbps; /* packets rx at 108mbps */ |
---|
2778 | | - uint32 rx162mbps; /* packets rx at 162mbps */ |
---|
2779 | | - uint32 rx216mbps; /* packets rx at 216 mbps */ |
---|
2780 | | - uint32 rx270mbps; /* packets rx at 270 mbps */ |
---|
2781 | | - uint32 rx324mbps; /* packets rx at 324 mbps */ |
---|
2782 | | - uint32 rx378mbps; /* packets rx at 378 mbps */ |
---|
2783 | | - uint32 rx432mbps; /* packets rx at 432 mbps */ |
---|
2784 | | - uint32 rx486mbps; /* packets rx at 486 mbps */ |
---|
2785 | | - uint32 rx540mbps; /* packets rx at 540 mbps */ |
---|
| 4472 | + uint32 rx1mbps; /**< packets rx at 1Mbps */ |
---|
| 4473 | + uint32 rx2mbps; /**< packets rx at 2Mbps */ |
---|
| 4474 | + uint32 rx5mbps5; /**< packets rx at 5.5Mbps */ |
---|
| 4475 | + uint32 rx6mbps; /**< packets rx at 6Mbps */ |
---|
| 4476 | + uint32 rx9mbps; /**< packets rx at 9Mbps */ |
---|
| 4477 | + uint32 rx11mbps; /**< packets rx at 11Mbps */ |
---|
| 4478 | + uint32 rx12mbps; /**< packets rx at 12Mbps */ |
---|
| 4479 | + uint32 rx18mbps; /**< packets rx at 18Mbps */ |
---|
| 4480 | + uint32 rx24mbps; /**< packets rx at 24Mbps */ |
---|
| 4481 | + uint32 rx36mbps; /**< packets rx at 36Mbps */ |
---|
| 4482 | + uint32 rx48mbps; /**< packets rx at 48Mbps */ |
---|
| 4483 | + uint32 rx54mbps; /**< packets rx at 54Mbps */ |
---|
| 4484 | + uint32 rx108mbps; /**< packets rx at 108mbps */ |
---|
| 4485 | + uint32 rx162mbps; /**< packets rx at 162mbps */ |
---|
| 4486 | + uint32 rx216mbps; /**< packets rx at 216 mbps */ |
---|
| 4487 | + uint32 rx270mbps; /**< packets rx at 270 mbps */ |
---|
| 4488 | + uint32 rx324mbps; /**< packets rx at 324 mbps */ |
---|
| 4489 | + uint32 rx378mbps; /**< packets rx at 378 mbps */ |
---|
| 4490 | + uint32 rx432mbps; /**< packets rx at 432 mbps */ |
---|
| 4491 | + uint32 rx486mbps; /**< packets rx at 486 mbps */ |
---|
| 4492 | + uint32 rx540mbps; /**< packets rx at 540 mbps */ |
---|
2786 | 4493 | |
---|
2787 | 4494 | /* pkteng rx frame stats */ |
---|
2788 | | - uint32 pktengrxducast; /* unicast frames rxed by the pkteng code */ |
---|
2789 | | - uint32 pktengrxdmcast; /* multicast frames rxed by the pkteng code */ |
---|
| 4495 | + uint32 pktengrxducast; /**< unicast frames rxed by the pkteng code */ |
---|
| 4496 | + uint32 pktengrxdmcast; /**< multicast frames rxed by the pkteng code */ |
---|
2790 | 4497 | |
---|
2791 | 4498 | uint32 rfdisable; /**< count of radio disables */ |
---|
2792 | 4499 | uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ |
---|
.. | .. |
---|
2824 | 4531 | uint32 pstarxbcmc; /**< count of bcmc frames received on all psta */ |
---|
2825 | 4532 | uint32 pstatxbcmc; /**< count of bcmc frames transmitted on all psta */ |
---|
2826 | 4533 | |
---|
2827 | | - uint32 cso_passthrough; /* hw cso required but passthrough */ |
---|
| 4534 | + uint32 cso_passthrough; /**< hw cso required but passthrough */ |
---|
2828 | 4535 | uint32 cso_normal; /**< hw cso hdr for normal process */ |
---|
2829 | 4536 | uint32 chained; /**< number of frames chained */ |
---|
2830 | 4537 | uint32 chainedsz1; /**< number of chain size 1 frames */ |
---|
.. | .. |
---|
2834 | 4541 | uint32 rxdrop20s; /**< drop secondary cnt */ |
---|
2835 | 4542 | uint32 pciereset; /**< Secondary Bus Reset issued by driver */ |
---|
2836 | 4543 | uint32 cfgrestore; /**< configspace restore by driver */ |
---|
2837 | | - uint32 reinitreason[NREINITREASONCOUNT]; /* reinitreason counters; 0: Unknown reason */ |
---|
| 4544 | + uint32 reinitreason[NREINITREASONCOUNT]; /**< reinitreason counters; 0: Unknown reason */ |
---|
2838 | 4545 | uint32 rxrtry; /**< num of received packets with retry bit on */ |
---|
2839 | 4546 | uint32 txmpdu; /**< macstat cnt only valid in ver 11. number of MPDUs txed. */ |
---|
2840 | 4547 | uint32 rxnodelim; /**< macstat cnt only valid in ver 11. |
---|
2841 | 4548 | * number of occasions that no valid delimiter is detected |
---|
2842 | 4549 | * by ampdu parser. |
---|
2843 | 4550 | */ |
---|
2844 | | - uint32 rxmpdu_mu; /* Number of MU MPDUs received */ |
---|
| 4551 | + uint32 rxmpdu_mu; /**< Number of MU MPDUs received */ |
---|
2845 | 4552 | |
---|
2846 | 4553 | /* detailed control/management frames */ |
---|
2847 | | - uint32 txbar; /**< Number of TX BAR */ |
---|
2848 | | - uint32 rxbar; /**< Number of RX BAR */ |
---|
2849 | | - uint32 txpspoll; /**< Number of TX PS-poll */ |
---|
2850 | | - uint32 rxpspoll; /**< Number of RX PS-poll */ |
---|
2851 | | - uint32 txnull; /**< Number of TX NULL_DATA */ |
---|
2852 | | - uint32 rxnull; /**< Number of RX NULL_DATA */ |
---|
2853 | | - uint32 txqosnull; /**< Number of TX NULL_QoSDATA */ |
---|
2854 | | - uint32 rxqosnull; /**< Number of RX NULL_QoSDATA */ |
---|
2855 | | - uint32 txassocreq; /**< Number of TX ASSOC request */ |
---|
2856 | | - uint32 rxassocreq; /**< Number of RX ASSOC request */ |
---|
2857 | | - uint32 txreassocreq; /**< Number of TX REASSOC request */ |
---|
2858 | | - uint32 rxreassocreq; /**< Number of RX REASSOC request */ |
---|
2859 | | - uint32 txdisassoc; /**< Number of TX DISASSOC */ |
---|
2860 | | - uint32 rxdisassoc; /**< Number of RX DISASSOC */ |
---|
2861 | | - uint32 txassocrsp; /**< Number of TX ASSOC response */ |
---|
2862 | | - uint32 rxassocrsp; /**< Number of RX ASSOC response */ |
---|
2863 | | - uint32 txreassocrsp; /**< Number of TX REASSOC response */ |
---|
2864 | | - uint32 rxreassocrsp; /**< Number of RX REASSOC response */ |
---|
2865 | | - uint32 txauth; /**< Number of TX AUTH */ |
---|
2866 | | - uint32 rxauth; /**< Number of RX AUTH */ |
---|
2867 | | - uint32 txdeauth; /**< Number of TX DEAUTH */ |
---|
2868 | | - uint32 rxdeauth; /**< Number of RX DEAUTH */ |
---|
2869 | | - uint32 txprobereq; /**< Number of TX probe request */ |
---|
2870 | | - uint32 rxprobereq; /**< Number of RX probe request */ |
---|
2871 | | - uint32 txprobersp; /**< Number of TX probe response */ |
---|
2872 | | - uint32 rxprobersp; /**< Number of RX probe response */ |
---|
2873 | | - uint32 txaction; /**< Number of TX action frame */ |
---|
2874 | | - uint32 rxaction; /**< Number of RX action frame */ |
---|
| 4554 | + uint32 txbar; /**< Number of TX BAR */ |
---|
| 4555 | + uint32 rxbar; /**< Number of RX BAR */ |
---|
| 4556 | + uint32 txpspoll; /**< Number of TX PS-poll */ |
---|
| 4557 | + uint32 rxpspoll; /**< Number of RX PS-poll */ |
---|
| 4558 | + uint32 txnull; /**< Number of TX NULL_DATA */ |
---|
| 4559 | + uint32 rxnull; /**< Number of RX NULL_DATA */ |
---|
| 4560 | + uint32 txqosnull; /**< Number of TX NULL_QoSDATA */ |
---|
| 4561 | + uint32 rxqosnull; /**< Number of RX NULL_QoSDATA */ |
---|
| 4562 | + uint32 txassocreq; /**< Number of TX ASSOC request */ |
---|
| 4563 | + uint32 rxassocreq; /**< Number of RX ASSOC request */ |
---|
| 4564 | + uint32 txreassocreq; /**< Number of TX REASSOC request */ |
---|
| 4565 | + uint32 rxreassocreq; /**< Number of RX REASSOC request */ |
---|
| 4566 | + uint32 txdisassoc; /**< Number of TX DISASSOC */ |
---|
| 4567 | + uint32 rxdisassoc; /**< Number of RX DISASSOC */ |
---|
| 4568 | + uint32 txassocrsp; /**< Number of TX ASSOC response */ |
---|
| 4569 | + uint32 rxassocrsp; /**< Number of RX ASSOC response */ |
---|
| 4570 | + uint32 txreassocrsp; /**< Number of TX REASSOC response */ |
---|
| 4571 | + uint32 rxreassocrsp; /**< Number of RX REASSOC response */ |
---|
| 4572 | + uint32 txauth; /**< Number of TX AUTH */ |
---|
| 4573 | + uint32 rxauth; /**< Number of RX AUTH */ |
---|
| 4574 | + uint32 txdeauth; /**< Number of TX DEAUTH */ |
---|
| 4575 | + uint32 rxdeauth; /**< Number of RX DEAUTH */ |
---|
| 4576 | + uint32 txprobereq; /**< Number of TX probe request */ |
---|
| 4577 | + uint32 rxprobereq; /**< Number of RX probe request */ |
---|
| 4578 | + uint32 txprobersp; /**< Number of TX probe response */ |
---|
| 4579 | + uint32 rxprobersp; /**< Number of RX probe response */ |
---|
| 4580 | + uint32 txaction; /**< Number of TX action frame */ |
---|
| 4581 | + uint32 rxaction; /**< Number of RX action frame */ |
---|
2875 | 4582 | uint32 ampdu_wds; /**< Number of AMPDU watchdogs */ |
---|
2876 | 4583 | uint32 txlost; /**< Number of lost packets reported in txs */ |
---|
2877 | 4584 | uint32 txdatamcast; /**< Number of TX multicast data packets */ |
---|
2878 | 4585 | uint32 txdatabcast; /**< Number of TX broadcast data packets */ |
---|
| 4586 | + uint32 txbcast; /* Broadcast TransmittedFrameCount */ |
---|
| 4587 | + uint32 txdropped; /* tx dropped pkts */ |
---|
| 4588 | + uint32 rxbcast; /* BroadcastReceivedFrameCount */ |
---|
| 4589 | + uint32 rxdropped; /* rx dropped pkts (derived: sum of others) */ |
---|
2879 | 4590 | |
---|
2880 | 4591 | } wl_cnt_ver_11_t; |
---|
2881 | 4592 | |
---|
2882 | 4593 | typedef struct { |
---|
2883 | | - uint16 version; /* see definition of WL_CNT_T_VERSION */ |
---|
2884 | | - uint16 length; /* length of entire structure */ |
---|
| 4594 | + uint16 version; /* see definition of WL_CNT_T_VERSION */ |
---|
| 4595 | + uint16 length; /* length of entire structure */ |
---|
2885 | 4596 | |
---|
2886 | 4597 | /* transmit stat counters */ |
---|
2887 | | - uint32 txframe; /* tx data frames */ |
---|
2888 | | - uint32 txbyte; /* tx data bytes */ |
---|
2889 | | - uint32 txretrans; /* tx mac retransmits */ |
---|
2890 | | - uint32 txerror; /* tx data errors (derived: sum of others) */ |
---|
2891 | | - uint32 txctl; /* tx management frames */ |
---|
2892 | | - uint32 txprshort; /* tx short preamble frames */ |
---|
2893 | | - uint32 txserr; /* tx status errors */ |
---|
2894 | | - uint32 txnobuf; /* tx out of buffers errors */ |
---|
2895 | | - uint32 txnoassoc; /* tx discard because we're not associated */ |
---|
2896 | | - uint32 txrunt; /* tx runt frames */ |
---|
2897 | | - uint32 txchit; /* tx header cache hit (fastpath) */ |
---|
2898 | | - uint32 txcmiss; /* tx header cache miss (slowpath) */ |
---|
| 4598 | + uint32 txframe; /* tx data frames */ |
---|
| 4599 | + uint32 txbyte; /* tx data bytes */ |
---|
| 4600 | + uint32 txretrans; /* tx mac retransmits */ |
---|
| 4601 | + uint32 txerror; /* tx data errors (derived: sum of others) */ |
---|
| 4602 | + uint32 txctl; /* tx management frames */ |
---|
| 4603 | + uint32 txprshort; /* tx short preamble frames */ |
---|
| 4604 | + uint32 txserr; /* tx status errors */ |
---|
| 4605 | + uint32 txnobuf; /* tx out of buffers errors */ |
---|
| 4606 | + uint32 txnoassoc; /* tx discard because we're not associated */ |
---|
| 4607 | + uint32 txrunt; /* tx runt frames */ |
---|
| 4608 | + uint32 txchit; /* tx header cache hit (fastpath) */ |
---|
| 4609 | + uint32 txcmiss; /* tx header cache miss (slowpath) */ |
---|
2899 | 4610 | |
---|
2900 | 4611 | /* transmit chip error counters */ |
---|
2901 | | - uint32 txuflo; /* tx fifo underflows */ |
---|
2902 | | - uint32 txphyerr; /* tx phy errors (indicated in tx status) */ |
---|
2903 | | - uint32 txphycrs; |
---|
| 4612 | + uint32 txuflo; /* tx fifo underflows */ |
---|
| 4613 | + uint32 txphyerr; /* tx phy errors (indicated in tx status) */ |
---|
| 4614 | + uint32 txphycrs; |
---|
2904 | 4615 | |
---|
2905 | 4616 | /* receive stat counters */ |
---|
2906 | | - uint32 rxframe; /* rx data frames */ |
---|
2907 | | - uint32 rxbyte; /* rx data bytes */ |
---|
2908 | | - uint32 rxerror; /* rx data errors (derived: sum of others) */ |
---|
2909 | | - uint32 rxctl; /* rx management frames */ |
---|
2910 | | - uint32 rxnobuf; /* rx out of buffers errors */ |
---|
2911 | | - uint32 rxnondata; /* rx non data frames in the data channel errors */ |
---|
2912 | | - uint32 rxbadds; /* rx bad DS errors */ |
---|
2913 | | - uint32 rxbadcm; /* rx bad control or management frames */ |
---|
2914 | | - uint32 rxfragerr; /* rx fragmentation errors */ |
---|
2915 | | - uint32 rxrunt; /* rx runt frames */ |
---|
2916 | | - uint32 rxgiant; /* rx giant frames */ |
---|
2917 | | - uint32 rxnoscb; /* rx no scb error */ |
---|
2918 | | - uint32 rxbadproto; /* rx invalid frames */ |
---|
2919 | | - uint32 rxbadsrcmac; /* rx frames with Invalid Src Mac */ |
---|
2920 | | - uint32 rxbadda; /* rx frames tossed for invalid da */ |
---|
2921 | | - uint32 rxfilter; /* rx frames filtered out */ |
---|
| 4617 | + uint32 rxframe; /* rx data frames */ |
---|
| 4618 | + uint32 rxbyte; /* rx data bytes */ |
---|
| 4619 | + uint32 rxerror; /* rx data errors (derived: sum of others) */ |
---|
| 4620 | + uint32 rxctl; /* rx management frames */ |
---|
| 4621 | + uint32 rxnobuf; /* rx out of buffers errors */ |
---|
| 4622 | + uint32 rxnondata; /* rx non data frames in the data channel errors */ |
---|
| 4623 | + uint32 rxbadds; /* rx bad DS errors */ |
---|
| 4624 | + uint32 rxbadcm; /* rx bad control or management frames */ |
---|
| 4625 | + uint32 rxfragerr; /* rx fragmentation errors */ |
---|
| 4626 | + uint32 rxrunt; /* rx runt frames */ |
---|
| 4627 | + uint32 rxgiant; /* rx giant frames */ |
---|
| 4628 | + uint32 rxnoscb; /* rx no scb error */ |
---|
| 4629 | + uint32 rxbadproto; /* rx invalid frames */ |
---|
| 4630 | + uint32 rxbadsrcmac; /* rx frames with Invalid Src Mac */ |
---|
| 4631 | + uint32 rxbadda; /* rx frames tossed for invalid da */ |
---|
| 4632 | + uint32 rxfilter; /* rx frames filtered out */ |
---|
2922 | 4633 | |
---|
2923 | 4634 | /* receive chip error counters */ |
---|
2924 | | - uint32 rxoflo; /* rx fifo overflow errors */ |
---|
2925 | | - uint32 rxuflo[NFIFO]; /* rx dma descriptor underflow errors */ |
---|
| 4635 | + uint32 rxoflo; /* rx fifo overflow errors */ |
---|
| 4636 | + uint32 rxuflo[NFIFO]; /* rx dma descriptor underflow errors */ |
---|
2926 | 4637 | |
---|
2927 | | - uint32 d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */ |
---|
2928 | | - uint32 d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */ |
---|
2929 | | - uint32 d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */ |
---|
| 4638 | + uint32 d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */ |
---|
| 4639 | + uint32 d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */ |
---|
| 4640 | + uint32 d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */ |
---|
2930 | 4641 | |
---|
2931 | 4642 | /* misc counters */ |
---|
2932 | | - uint32 dmade; /* tx/rx dma descriptor errors */ |
---|
2933 | | - uint32 dmada; /* tx/rx dma data errors */ |
---|
2934 | | - uint32 dmape; /* tx/rx dma descriptor protocol errors */ |
---|
2935 | | - uint32 reset; /* reset count */ |
---|
2936 | | - uint32 tbtt; /* cnts the TBTT int's */ |
---|
2937 | | - uint32 txdmawar; |
---|
2938 | | - uint32 pkt_callback_reg_fail; /* callbacks register failure */ |
---|
| 4643 | + uint32 dmade; /* tx/rx dma descriptor errors */ |
---|
| 4644 | + uint32 dmada; /* tx/rx dma data errors */ |
---|
| 4645 | + uint32 dmape; /* tx/rx dma descriptor protocol errors */ |
---|
| 4646 | + uint32 reset; /* reset count */ |
---|
| 4647 | + uint32 tbtt; /* cnts the TBTT int's */ |
---|
| 4648 | + uint32 txdmawar; |
---|
| 4649 | + uint32 pkt_callback_reg_fail; /* callbacks register failure */ |
---|
2939 | 4650 | |
---|
2940 | 4651 | /* MAC counters: 32-bit version of d11.h's macstat_t */ |
---|
2941 | | - uint32 txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS, |
---|
2942 | | - * Control Management (includes retransmissions) |
---|
2943 | | - */ |
---|
2944 | | - uint32 txrtsfrm; /* number of RTS sent out by the MAC */ |
---|
2945 | | - uint32 txctsfrm; /* number of CTS sent out by the MAC */ |
---|
2946 | | - uint32 txackfrm; /* number of ACK frames sent out */ |
---|
2947 | | - uint32 txdnlfrm; /* Not used */ |
---|
2948 | | - uint32 txbcnfrm; /* beacons transmitted */ |
---|
2949 | | - uint32 txfunfl[6]; /* per-fifo tx underflows */ |
---|
2950 | | - uint32 rxtoolate; /* receive too late */ |
---|
2951 | | - uint32 txfbw; /* transmit at fallback bw (dynamic bw) */ |
---|
2952 | | - uint32 txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS |
---|
2953 | | - * or BCN) |
---|
2954 | | - */ |
---|
2955 | | - uint32 txphyerror; /* Transmit phy error, type of error is reported in tx-status for |
---|
2956 | | - * driver enqueued frames |
---|
2957 | | - */ |
---|
2958 | | - uint32 rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */ |
---|
2959 | | - uint32 rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */ |
---|
2960 | | - uint32 rxinvmachdr; /* Either the protocol version != 0 or frame type not |
---|
| 4652 | + uint32 txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS, |
---|
| 4653 | + * Control Management (includes retransmissions) |
---|
| 4654 | + */ |
---|
| 4655 | + uint32 txrtsfrm; /* number of RTS sent out by the MAC */ |
---|
| 4656 | + uint32 txctsfrm; /* number of CTS sent out by the MAC */ |
---|
| 4657 | + uint32 txackfrm; /* number of ACK frames sent out */ |
---|
| 4658 | + uint32 txdnlfrm; /* Not used */ |
---|
| 4659 | + uint32 txbcnfrm; /* beacons transmitted */ |
---|
| 4660 | + uint32 txfunfl[8]; /* per-fifo tx underflows */ |
---|
| 4661 | + uint32 txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS |
---|
| 4662 | + * or BCN) |
---|
| 4663 | + */ |
---|
| 4664 | + uint32 txphyerror; /* Transmit phy error, type of error is reported in tx-status for |
---|
| 4665 | + * driver enqueued frames |
---|
| 4666 | + */ |
---|
| 4667 | + uint32 rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */ |
---|
| 4668 | + uint32 rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */ |
---|
| 4669 | + uint32 rxinvmachdr; /* Either the protocol version != 0 or frame type not |
---|
2961 | 4670 | * data/control/management |
---|
2962 | | - */ |
---|
2963 | | - uint32 rxbadfcs; /* number of frames for which the CRC check failed in the MAC */ |
---|
2964 | | - uint32 rxbadplcp; /* parity check of the PLCP header failed */ |
---|
2965 | | - uint32 rxcrsglitch; /* PHY was able to correlate the preamble but not the header */ |
---|
2966 | | - uint32 rxstrt; /* Number of received frames with a good PLCP |
---|
2967 | | - * (i.e. passing parity check) |
---|
2968 | | - */ |
---|
2969 | | - uint32 rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */ |
---|
2970 | | - uint32 rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */ |
---|
2971 | | - uint32 rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */ |
---|
2972 | | - uint32 rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */ |
---|
2973 | | - uint32 rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */ |
---|
2974 | | - uint32 rxackucast; /* number of ucast ACKS received (good FCS) */ |
---|
2975 | | - uint32 rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */ |
---|
2976 | | - uint32 rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */ |
---|
2977 | | - uint32 rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */ |
---|
2978 | | - uint32 rxrtsocast; /* number of received RTS not addressed to the MAC */ |
---|
2979 | | - uint32 rxctsocast; /* number of received CTS not addressed to the MAC */ |
---|
2980 | | - uint32 rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */ |
---|
2981 | | - uint32 rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */ |
---|
2982 | | - uint32 rxcfrmmcast; /* number of RX Control multicast frames received by the MAC |
---|
| 4671 | + */ |
---|
| 4672 | + uint32 rxbadfcs; /* number of frames for which the CRC check failed in the MAC */ |
---|
| 4673 | + uint32 rxbadplcp; /* parity check of the PLCP header failed */ |
---|
| 4674 | + uint32 rxcrsglitch; /* PHY was able to correlate the preamble but not the header */ |
---|
| 4675 | + uint32 rxstrt; /* Number of received frames with a good PLCP |
---|
| 4676 | + * (i.e. passing parity check) |
---|
| 4677 | + */ |
---|
| 4678 | + uint32 rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */ |
---|
| 4679 | + uint32 rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */ |
---|
| 4680 | + uint32 rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */ |
---|
| 4681 | + uint32 rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */ |
---|
| 4682 | + uint32 rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */ |
---|
| 4683 | + uint32 rxackucast; /* number of ucast ACKS received (good FCS) */ |
---|
| 4684 | + uint32 rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */ |
---|
| 4685 | + uint32 rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */ |
---|
| 4686 | + uint32 rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */ |
---|
| 4687 | + uint32 rxrtsocast; /* number of received RTS not addressed to the MAC */ |
---|
| 4688 | + uint32 rxctsocast; /* number of received CTS not addressed to the MAC */ |
---|
| 4689 | + uint32 rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */ |
---|
| 4690 | + uint32 rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */ |
---|
| 4691 | + uint32 rxcfrmmcast; /* number of RX Control multicast frames received by the MAC |
---|
2983 | 4692 | * (unlikely to see these) |
---|
2984 | 4693 | */ |
---|
2985 | | - uint32 rxbeaconmbss; /* beacons received from member of BSS */ |
---|
2986 | | - uint32 rxdfrmucastobss; /* number of unicast frames addressed to the MAC from |
---|
| 4694 | + uint32 rxbeaconmbss; /* beacons received from member of BSS */ |
---|
| 4695 | + uint32 rxdfrmucastobss; /* number of unicast frames addressed to the MAC from |
---|
2987 | 4696 | * other BSS (WDS FRAME) |
---|
2988 | 4697 | */ |
---|
2989 | | - uint32 rxbeaconobss; /* beacons received from other BSS */ |
---|
2990 | | - uint32 rxrsptmout; /* Number of response timeouts for transmitted frames |
---|
2991 | | - * expecting a response |
---|
2992 | | - */ |
---|
2993 | | - uint32 bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */ |
---|
2994 | | - uint32 rxf0ovfl; /* Number of receive fifo 0 overflows */ |
---|
2995 | | - uint32 rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */ |
---|
2996 | | - uint32 rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */ |
---|
2997 | | - uint32 txsfovfl; /* Number of transmit status fifo overflows (obsolete) */ |
---|
2998 | | - uint32 pmqovfl; /* Number of PMQ overflows */ |
---|
2999 | | - uint32 rxcgprqfrm; /* Number of received Probe requests that made it into |
---|
3000 | | - * the PRQ fifo |
---|
3001 | | - */ |
---|
3002 | | - uint32 rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */ |
---|
3003 | | - uint32 txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did |
---|
| 4698 | + uint32 rxbeaconobss; /* beacons received from other BSS */ |
---|
| 4699 | + uint32 rxrsptmout; /* Number of response timeouts for transmitted frames |
---|
| 4700 | + * expecting a response |
---|
| 4701 | + */ |
---|
| 4702 | + uint32 bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */ |
---|
| 4703 | + uint32 rxf0ovfl; /* Number of receive fifo 0 overflows */ |
---|
| 4704 | + uint32 rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */ |
---|
| 4705 | + uint32 rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */ |
---|
| 4706 | + uint32 txsfovfl; /* Number of transmit status fifo overflows (obsolete) */ |
---|
| 4707 | + uint32 pmqovfl; /* Number of PMQ overflows */ |
---|
| 4708 | + uint32 rxcgprqfrm; /* Number of received Probe requests that made it into |
---|
| 4709 | + * the PRQ fifo |
---|
| 4710 | + */ |
---|
| 4711 | + uint32 rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */ |
---|
| 4712 | + uint32 txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did |
---|
3004 | 4713 | * not get ACK |
---|
3005 | 4714 | */ |
---|
3006 | | - uint32 txcgprssuc; /* Tx Probe Response Success (ACK was received) */ |
---|
3007 | | - uint32 prs_timeout; /* Number of probe requests that were dropped from the PRQ |
---|
| 4715 | + uint32 txcgprssuc; /* Tx Probe Response Success (ACK was received) */ |
---|
| 4716 | + uint32 prs_timeout; /* Number of probe requests that were dropped from the PRQ |
---|
3008 | 4717 | * fifo because a probe response could not be sent out within |
---|
3009 | 4718 | * the time limit defined in M_PRS_MAXTIME |
---|
3010 | 4719 | */ |
---|
3011 | | - uint32 rxnack; |
---|
3012 | | - uint32 frmscons; |
---|
3013 | | - uint32 txnack; /* obsolete */ |
---|
3014 | | - uint32 rxback; /* blockack rxcnt */ |
---|
3015 | | - uint32 txback; /* blockack txcnt */ |
---|
| 4720 | + uint32 rxnack; /* obsolete */ |
---|
| 4721 | + uint32 frmscons; /* obsolete */ |
---|
| 4722 | + uint32 txnack; /* obsolete */ |
---|
| 4723 | + uint32 txglitch_nack; /* obsolete */ |
---|
| 4724 | + uint32 txburst; /* obsolete */ |
---|
3016 | 4725 | |
---|
3017 | 4726 | /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ |
---|
3018 | | - uint32 txfrag; /* dot11TransmittedFragmentCount */ |
---|
3019 | | - uint32 txmulti; /* dot11MulticastTransmittedFrameCount */ |
---|
3020 | | - uint32 txfail; /* dot11FailedCount */ |
---|
3021 | | - uint32 txretry; /* dot11RetryCount */ |
---|
3022 | | - uint32 txretrie; /* dot11MultipleRetryCount */ |
---|
3023 | | - uint32 rxdup; /* dot11FrameduplicateCount */ |
---|
3024 | | - uint32 txrts; /* dot11RTSSuccessCount */ |
---|
3025 | | - uint32 txnocts; /* dot11RTSFailureCount */ |
---|
3026 | | - uint32 txnoack; /* dot11ACKFailureCount */ |
---|
3027 | | - uint32 rxfrag; /* dot11ReceivedFragmentCount */ |
---|
3028 | | - uint32 rxmulti; /* dot11MulticastReceivedFrameCount */ |
---|
3029 | | - uint32 rxcrc; /* dot11FCSErrorCount */ |
---|
3030 | | - uint32 txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */ |
---|
3031 | | - uint32 rxundec; /* dot11WEPUndecryptableCount */ |
---|
| 4727 | + uint32 txfrag; /* dot11TransmittedFragmentCount */ |
---|
| 4728 | + uint32 txmulti; /* dot11MulticastTransmittedFrameCount */ |
---|
| 4729 | + uint32 txfail; /* dot11FailedCount */ |
---|
| 4730 | + uint32 txretry; /* dot11RetryCount */ |
---|
| 4731 | + uint32 txretrie; /* dot11MultipleRetryCount */ |
---|
| 4732 | + uint32 rxdup; /* dot11FrameduplicateCount */ |
---|
| 4733 | + uint32 txrts; /* dot11RTSSuccessCount */ |
---|
| 4734 | + uint32 txnocts; /* dot11RTSFailureCount */ |
---|
| 4735 | + uint32 txnoack; /* dot11ACKFailureCount */ |
---|
| 4736 | + uint32 rxfrag; /* dot11ReceivedFragmentCount */ |
---|
| 4737 | + uint32 rxmulti; /* dot11MulticastReceivedFrameCount */ |
---|
| 4738 | + uint32 rxcrc; /* dot11FCSErrorCount */ |
---|
| 4739 | + uint32 txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */ |
---|
| 4740 | + uint32 rxundec; /* dot11WEPUndecryptableCount */ |
---|
3032 | 4741 | |
---|
3033 | 4742 | /* WPA2 counters (see rxundec for DecryptFailureCount) */ |
---|
3034 | | - uint32 tkipmicfaill; /* TKIPLocalMICFailures */ |
---|
3035 | | - uint32 tkipcntrmsr; /* TKIPCounterMeasuresInvoked */ |
---|
3036 | | - uint32 tkipreplay; /* TKIPReplays */ |
---|
3037 | | - uint32 ccmpfmterr; /* CCMPFormatErrors */ |
---|
3038 | | - uint32 ccmpreplay; /* CCMPReplays */ |
---|
3039 | | - uint32 ccmpundec; /* CCMPDecryptErrors */ |
---|
3040 | | - uint32 fourwayfail; /* FourWayHandshakeFailures */ |
---|
3041 | | - uint32 wepundec; /* dot11WEPUndecryptableCount */ |
---|
3042 | | - uint32 wepicverr; /* dot11WEPICVErrorCount */ |
---|
3043 | | - uint32 decsuccess; /* DecryptSuccessCount */ |
---|
3044 | | - uint32 tkipicverr; /* TKIPICVErrorCount */ |
---|
3045 | | - uint32 wepexcluded; /* dot11WEPExcludedCount */ |
---|
| 4743 | + uint32 tkipmicfaill; /* TKIPLocalMICFailures */ |
---|
| 4744 | + uint32 tkipcntrmsr; /* TKIPCounterMeasuresInvoked */ |
---|
| 4745 | + uint32 tkipreplay; /* TKIPReplays */ |
---|
| 4746 | + uint32 ccmpfmterr; /* CCMPFormatErrors */ |
---|
| 4747 | + uint32 ccmpreplay; /* CCMPReplays */ |
---|
| 4748 | + uint32 ccmpundec; /* CCMPDecryptErrors */ |
---|
| 4749 | + uint32 fourwayfail; /* FourWayHandshakeFailures */ |
---|
| 4750 | + uint32 wepundec; /* dot11WEPUndecryptableCount */ |
---|
| 4751 | + uint32 wepicverr; /* dot11WEPICVErrorCount */ |
---|
| 4752 | + uint32 decsuccess; /* DecryptSuccessCount */ |
---|
| 4753 | + uint32 tkipicverr; /* TKIPICVErrorCount */ |
---|
| 4754 | + uint32 wepexcluded; /* dot11WEPExcludedCount */ |
---|
3046 | 4755 | |
---|
3047 | | - uint32 rxundec_mcst; /* dot11WEPUndecryptableCount */ |
---|
3048 | | - |
---|
3049 | | - /* WPA2 counters (see rxundec for DecryptFailureCount) */ |
---|
3050 | | - uint32 tkipmicfaill_mcst; /* TKIPLocalMICFailures */ |
---|
3051 | | - uint32 tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */ |
---|
3052 | | - uint32 tkipreplay_mcst; /* TKIPReplays */ |
---|
3053 | | - uint32 ccmpfmterr_mcst; /* CCMPFormatErrors */ |
---|
3054 | | - uint32 ccmpreplay_mcst; /* CCMPReplays */ |
---|
3055 | | - uint32 ccmpundec_mcst; /* CCMPDecryptErrors */ |
---|
3056 | | - uint32 fourwayfail_mcst; /* FourWayHandshakeFailures */ |
---|
3057 | | - uint32 wepundec_mcst; /* dot11WEPUndecryptableCount */ |
---|
3058 | | - uint32 wepicverr_mcst; /* dot11WEPICVErrorCount */ |
---|
3059 | | - uint32 decsuccess_mcst; /* DecryptSuccessCount */ |
---|
3060 | | - uint32 tkipicverr_mcst; /* TKIPICVErrorCount */ |
---|
3061 | | - uint32 wepexcluded_mcst; /* dot11WEPExcludedCount */ |
---|
3062 | | - |
---|
3063 | | - uint32 txchanrej; /* Tx frames suppressed due to channel rejection */ |
---|
3064 | | - uint32 txexptime; /* Tx frames suppressed due to timer expiration */ |
---|
3065 | | - uint32 psmwds; /* Count PSM watchdogs */ |
---|
3066 | | - uint32 phywatchdog; /* Count Phy watchdogs (triggered by ucode) */ |
---|
| 4756 | + uint32 txchanrej; /* Tx frames suppressed due to channel rejection */ |
---|
| 4757 | + uint32 psmwds; /* Count PSM watchdogs */ |
---|
| 4758 | + uint32 phywatchdog; /* Count Phy watchdogs (triggered by ucode) */ |
---|
3067 | 4759 | |
---|
3068 | 4760 | /* MBSS counters, AP only */ |
---|
3069 | | - uint32 prq_entries_handled; /* PRQ entries read in */ |
---|
3070 | | - uint32 prq_undirected_entries; /* which were bcast bss & ssid */ |
---|
3071 | | - uint32 prq_bad_entries; /* which could not be translated to info */ |
---|
3072 | | - uint32 atim_suppress_count; /* TX suppressions on ATIM fifo */ |
---|
3073 | | - uint32 bcn_template_not_ready; /* Template marked in use on send bcn ... */ |
---|
3074 | | - uint32 bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */ |
---|
3075 | | - uint32 late_tbtt_dpc; /* TBTT DPC did not happen in time */ |
---|
3076 | | - |
---|
3077 | | - /* per-rate receive stat counters */ |
---|
3078 | | - uint32 rx1mbps; /* packets rx at 1Mbps */ |
---|
3079 | | - uint32 rx2mbps; /* packets rx at 2Mbps */ |
---|
3080 | | - uint32 rx5mbps5; /* packets rx at 5.5Mbps */ |
---|
3081 | | - uint32 rx6mbps; /* packets rx at 6Mbps */ |
---|
3082 | | - uint32 rx9mbps; /* packets rx at 9Mbps */ |
---|
3083 | | - uint32 rx11mbps; /* packets rx at 11Mbps */ |
---|
3084 | | - uint32 rx12mbps; /* packets rx at 12Mbps */ |
---|
3085 | | - uint32 rx18mbps; /* packets rx at 18Mbps */ |
---|
3086 | | - uint32 rx24mbps; /* packets rx at 24Mbps */ |
---|
3087 | | - uint32 rx36mbps; /* packets rx at 36Mbps */ |
---|
3088 | | - uint32 rx48mbps; /* packets rx at 48Mbps */ |
---|
3089 | | - uint32 rx54mbps; /* packets rx at 54Mbps */ |
---|
3090 | | - uint32 rx108mbps; /* packets rx at 108mbps */ |
---|
3091 | | - uint32 rx162mbps; /* packets rx at 162mbps */ |
---|
3092 | | - uint32 rx216mbps; /* packets rx at 216 mbps */ |
---|
3093 | | - uint32 rx270mbps; /* packets rx at 270 mbps */ |
---|
3094 | | - uint32 rx324mbps; /* packets rx at 324 mbps */ |
---|
3095 | | - uint32 rx378mbps; /* packets rx at 378 mbps */ |
---|
3096 | | - uint32 rx432mbps; /* packets rx at 432 mbps */ |
---|
3097 | | - uint32 rx486mbps; /* packets rx at 486 mbps */ |
---|
3098 | | - uint32 rx540mbps; /* packets rx at 540 mbps */ |
---|
3099 | | - |
---|
3100 | | - /* pkteng rx frame stats */ |
---|
3101 | | - uint32 pktengrxducast; /* unicast frames rxed by the pkteng code */ |
---|
3102 | | - uint32 pktengrxdmcast; /* multicast frames rxed by the pkteng code */ |
---|
3103 | | - |
---|
3104 | | - uint32 rfdisable; /* count of radio disables */ |
---|
3105 | | - uint32 bphy_rxcrsglitch; /* PHY count of bphy glitches */ |
---|
3106 | | - uint32 bphy_badplcp; |
---|
3107 | | - |
---|
3108 | | - uint32 txmpdu_sgi; /* count for sgi transmit */ |
---|
3109 | | - uint32 rxmpdu_sgi; /* count for sgi received */ |
---|
3110 | | - uint32 txmpdu_stbc; /* count for stbc transmit */ |
---|
3111 | | - uint32 rxmpdu_stbc; /* count for stbc received */ |
---|
3112 | | - |
---|
3113 | | - uint32 rxdrop20s; /* drop secondary cnt */ |
---|
3114 | | -} wl_cnt_ver_6_t; |
---|
3115 | | - |
---|
3116 | | -#define WL_DELTA_STATS_T_VERSION 2 /* current version of wl_delta_stats_t struct */ |
---|
3117 | | - |
---|
3118 | | -typedef struct { |
---|
3119 | | - uint16 version; /* see definition of WL_DELTA_STATS_T_VERSION */ |
---|
3120 | | - uint16 length; /* length of entire structure */ |
---|
3121 | | - |
---|
3122 | | - /* transmit stat counters */ |
---|
3123 | | - uint32 txframe; /* tx data frames */ |
---|
3124 | | - uint32 txbyte; /* tx data bytes */ |
---|
3125 | | - uint32 txretrans; /* tx mac retransmits */ |
---|
3126 | | - uint32 txfail; /* tx failures */ |
---|
3127 | | - |
---|
3128 | | - /* receive stat counters */ |
---|
3129 | | - uint32 rxframe; /* rx data frames */ |
---|
3130 | | - uint32 rxbyte; /* rx data bytes */ |
---|
| 4761 | + uint32 prq_entries_handled; /* PRQ entries read in */ |
---|
| 4762 | + uint32 prq_undirected_entries; /* which were bcast bss & ssid */ |
---|
| 4763 | + uint32 prq_bad_entries; /* which could not be translated to info */ |
---|
| 4764 | + uint32 atim_suppress_count; /* TX suppressions on ATIM fifo */ |
---|
| 4765 | + uint32 bcn_template_not_ready; /* Template marked in use on send bcn ... */ |
---|
| 4766 | + uint32 bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */ |
---|
| 4767 | + uint32 late_tbtt_dpc; /* TBTT DPC did not happen in time */ |
---|
3131 | 4768 | |
---|
3132 | 4769 | /* per-rate receive stat counters */ |
---|
3133 | 4770 | uint32 rx1mbps; /* packets rx at 1Mbps */ |
---|
.. | .. |
---|
3152 | 4789 | uint32 rx486mbps; /* packets rx at 486 mbps */ |
---|
3153 | 4790 | uint32 rx540mbps; /* packets rx at 540 mbps */ |
---|
3154 | 4791 | |
---|
| 4792 | + /* pkteng rx frame stats */ |
---|
| 4793 | + uint32 pktengrxducast; /* unicast frames rxed by the pkteng code */ |
---|
| 4794 | + uint32 pktengrxdmcast; /* multicast frames rxed by the pkteng code */ |
---|
| 4795 | + |
---|
| 4796 | + uint32 rfdisable; /* count of radio disables */ |
---|
| 4797 | + uint32 bphy_rxcrsglitch; /* PHY count of bphy glitches */ |
---|
| 4798 | + |
---|
| 4799 | + uint32 txexptime; /* Tx frames suppressed due to timer expiration */ |
---|
| 4800 | + |
---|
| 4801 | + uint32 txmpdu_sgi; /* count for sgi transmit */ |
---|
| 4802 | + uint32 rxmpdu_sgi; /* count for sgi received */ |
---|
| 4803 | + uint32 txmpdu_stbc; /* count for stbc transmit */ |
---|
| 4804 | + uint32 rxmpdu_stbc; /* count for stbc received */ |
---|
| 4805 | + |
---|
| 4806 | + uint32 rxundec_mcst; /* dot11WEPUndecryptableCount */ |
---|
| 4807 | + |
---|
| 4808 | + /* WPA2 counters (see rxundec for DecryptFailureCount) */ |
---|
| 4809 | + uint32 tkipmicfaill_mcst; /* TKIPLocalMICFailures */ |
---|
| 4810 | + uint32 tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */ |
---|
| 4811 | + uint32 tkipreplay_mcst; /* TKIPReplays */ |
---|
| 4812 | + uint32 ccmpfmterr_mcst; /* CCMPFormatErrors */ |
---|
| 4813 | + uint32 ccmpreplay_mcst; /* CCMPReplays */ |
---|
| 4814 | + uint32 ccmpundec_mcst; /* CCMPDecryptErrors */ |
---|
| 4815 | + uint32 fourwayfail_mcst; /* FourWayHandshakeFailures */ |
---|
| 4816 | + uint32 wepundec_mcst; /* dot11WEPUndecryptableCount */ |
---|
| 4817 | + uint32 wepicverr_mcst; /* dot11WEPICVErrorCount */ |
---|
| 4818 | + uint32 decsuccess_mcst; /* DecryptSuccessCount */ |
---|
| 4819 | + uint32 tkipicverr_mcst; /* TKIPICVErrorCount */ |
---|
| 4820 | + uint32 wepexcluded_mcst; /* dot11WEPExcludedCount */ |
---|
| 4821 | + |
---|
| 4822 | + uint32 dma_hang; /* count for stbc received */ |
---|
| 4823 | + uint32 rxrtry; /* number of packets with retry bit set to 1 */ |
---|
| 4824 | +} wl_cnt_ver_7_t; |
---|
| 4825 | + |
---|
| 4826 | +typedef struct { |
---|
| 4827 | + uint16 version; /**< see definition of WL_CNT_T_VERSION */ |
---|
| 4828 | + uint16 length; /**< length of entire structure */ |
---|
| 4829 | + |
---|
| 4830 | + /* transmit stat counters */ |
---|
| 4831 | + uint32 txframe; /**< tx data frames */ |
---|
| 4832 | + uint32 txbyte; /**< tx data bytes */ |
---|
| 4833 | + uint32 txretrans; /**< tx mac retransmits */ |
---|
| 4834 | + uint32 txerror; /**< tx data errors (derived: sum of others) */ |
---|
| 4835 | + uint32 txctl; /**< tx management frames */ |
---|
| 4836 | + uint32 txprshort; /**< tx short preamble frames */ |
---|
| 4837 | + uint32 txserr; /**< tx status errors */ |
---|
| 4838 | + uint32 txnobuf; /**< tx out of buffers errors */ |
---|
| 4839 | + uint32 txnoassoc; /**< tx discard because we're not associated */ |
---|
| 4840 | + uint32 txrunt; /**< tx runt frames */ |
---|
| 4841 | + uint32 txchit; /**< tx header cache hit (fastpath) */ |
---|
| 4842 | + uint32 txcmiss; /**< tx header cache miss (slowpath) */ |
---|
| 4843 | + |
---|
| 4844 | + /* transmit chip error counters */ |
---|
| 4845 | + uint32 txuflo; /**< tx fifo underflows */ |
---|
| 4846 | + uint32 txphyerr; /**< tx phy errors (indicated in tx status) */ |
---|
| 4847 | + uint32 txphycrs; |
---|
| 4848 | + |
---|
| 4849 | + /* receive stat counters */ |
---|
| 4850 | + uint32 rxframe; /**< rx data frames */ |
---|
| 4851 | + uint32 rxbyte; /**< rx data bytes */ |
---|
| 4852 | + uint32 rxerror; /**< rx data errors (derived: sum of others) */ |
---|
| 4853 | + uint32 rxctl; /**< rx management frames */ |
---|
| 4854 | + uint32 rxnobuf; /**< rx out of buffers errors */ |
---|
| 4855 | + uint32 rxnondata; /**< rx non data frames in the data channel errors */ |
---|
| 4856 | + uint32 rxbadds; /**< rx bad DS errors */ |
---|
| 4857 | + uint32 rxbadcm; /**< rx bad control or management frames */ |
---|
| 4858 | + uint32 rxfragerr; /**< rx fragmentation errors */ |
---|
| 4859 | + uint32 rxrunt; /**< rx runt frames */ |
---|
| 4860 | + uint32 rxgiant; /**< rx giant frames */ |
---|
| 4861 | + uint32 rxnoscb; /**< rx no scb error */ |
---|
| 4862 | + uint32 rxbadproto; /**< rx invalid frames */ |
---|
| 4863 | + uint32 rxbadsrcmac; /**< rx frames with Invalid Src Mac */ |
---|
| 4864 | + uint32 rxbadda; /**< rx frames tossed for invalid da */ |
---|
| 4865 | + uint32 rxfilter; /**< rx frames filtered out */ |
---|
| 4866 | + |
---|
| 4867 | + /* receive chip error counters */ |
---|
| 4868 | + uint32 rxoflo; /**< rx fifo overflow errors */ |
---|
| 4869 | + uint32 rxuflo[NFIFO]; /**< rx dma descriptor underflow errors */ |
---|
| 4870 | + |
---|
| 4871 | + uint32 d11cnt_txrts_off; /**< d11cnt txrts value when reset d11cnt */ |
---|
| 4872 | + uint32 d11cnt_rxcrc_off; /**< d11cnt rxcrc value when reset d11cnt */ |
---|
| 4873 | + uint32 d11cnt_txnocts_off; /**< d11cnt txnocts value when reset d11cnt */ |
---|
| 4874 | + |
---|
| 4875 | + /* misc counters */ |
---|
| 4876 | + uint32 dmade; /**< tx/rx dma descriptor errors */ |
---|
| 4877 | + uint32 dmada; /**< tx/rx dma data errors */ |
---|
| 4878 | + uint32 dmape; /**< tx/rx dma descriptor protocol errors */ |
---|
| 4879 | + uint32 reset; /**< reset count */ |
---|
| 4880 | + uint32 tbtt; /**< cnts the TBTT int's */ |
---|
| 4881 | + uint32 txdmawar; |
---|
| 4882 | + uint32 pkt_callback_reg_fail; /**< callbacks register failure */ |
---|
| 4883 | + |
---|
| 4884 | + /* MAC counters: 32-bit version of d11.h's macstat_t */ |
---|
| 4885 | + uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, |
---|
| 4886 | + * Control Management (includes retransmissions) |
---|
| 4887 | + */ |
---|
| 4888 | + uint32 txrtsfrm; /**< number of RTS sent out by the MAC */ |
---|
| 4889 | + uint32 txctsfrm; /**< number of CTS sent out by the MAC */ |
---|
| 4890 | + uint32 txackfrm; /**< number of ACK frames sent out */ |
---|
| 4891 | + uint32 txdnlfrm; /**< Not used */ |
---|
| 4892 | + uint32 txbcnfrm; /**< beacons transmitted */ |
---|
| 4893 | + uint32 txfunfl[6]; /**< per-fifo tx underflows */ |
---|
| 4894 | + uint32 rxtoolate; /**< receive too late */ |
---|
| 4895 | + uint32 txfbw; /**< transmit at fallback bw (dynamic bw) */ |
---|
| 4896 | + uint32 txtplunfl; /**< Template underflows (mac was too slow to transmit ACK/CTS |
---|
| 4897 | + * or BCN) |
---|
| 4898 | + */ |
---|
| 4899 | + uint32 txphyerror; /**< Transmit phy error, type of error is reported in tx-status for |
---|
| 4900 | + * driver enqueued frames |
---|
| 4901 | + */ |
---|
| 4902 | + uint32 rxfrmtoolong; /**< Received frame longer than legal limit (2346 bytes) */ |
---|
| 4903 | + uint32 rxfrmtooshrt; /**< Received frame did not contain enough bytes for its frame type */ |
---|
| 4904 | + uint32 rxinvmachdr; /**< Either the protocol version != 0 or frame type not |
---|
| 4905 | + * data/control/management |
---|
| 4906 | + */ |
---|
| 4907 | + uint32 rxbadfcs; /**< number of frames for which the CRC check failed in the MAC */ |
---|
| 4908 | + uint32 rxbadplcp; /**< parity check of the PLCP header failed */ |
---|
| 4909 | + uint32 rxcrsglitch; /**< PHY was able to correlate the preamble but not the header */ |
---|
| 4910 | + uint32 rxstrt; /**< Number of received frames with a good PLCP |
---|
| 4911 | + * (i.e. passing parity check) |
---|
| 4912 | + */ |
---|
| 4913 | + uint32 rxdfrmucastmbss; /**< # of received DATA frames with good FCS and matching RA */ |
---|
| 4914 | + uint32 rxmfrmucastmbss; /**< # of received mgmt frames with good FCS and matching RA */ |
---|
| 4915 | + uint32 rxcfrmucast; /**< # of received CNTRL frames with good FCS and matching RA */ |
---|
| 4916 | + uint32 rxrtsucast; /**< number of unicast RTS addressed to the MAC (good FCS) */ |
---|
| 4917 | + uint32 rxctsucast; /**< number of unicast CTS addressed to the MAC (good FCS) */ |
---|
| 4918 | + uint32 rxackucast; /**< number of ucast ACKS received (good FCS) */ |
---|
| 4919 | + uint32 rxdfrmocast; /**< # of received DATA frames (good FCS and not matching RA) */ |
---|
| 4920 | + uint32 rxmfrmocast; /**< # of received MGMT frames (good FCS and not matching RA) */ |
---|
| 4921 | + uint32 rxcfrmocast; /**< # of received CNTRL frame (good FCS and not matching RA) */ |
---|
| 4922 | + uint32 rxrtsocast; /**< number of received RTS not addressed to the MAC */ |
---|
| 4923 | + uint32 rxctsocast; /**< number of received CTS not addressed to the MAC */ |
---|
| 4924 | + uint32 rxdfrmmcast; /**< number of RX Data multicast frames received by the MAC */ |
---|
| 4925 | + uint32 rxmfrmmcast; /**< number of RX Management multicast frames received by the MAC */ |
---|
| 4926 | + uint32 rxcfrmmcast; /**< number of RX Control multicast frames received by the MAC |
---|
| 4927 | + * (unlikely to see these) |
---|
| 4928 | + */ |
---|
| 4929 | + uint32 rxbeaconmbss; /**< beacons received from member of BSS */ |
---|
| 4930 | + uint32 rxdfrmucastobss; /**< number of unicast frames addressed to the MAC from |
---|
| 4931 | + * other BSS (WDS FRAME) |
---|
| 4932 | + */ |
---|
| 4933 | + uint32 rxbeaconobss; /**< beacons received from other BSS */ |
---|
| 4934 | + uint32 rxrsptmout; /**< Number of response timeouts for transmitted frames |
---|
| 4935 | + * expecting a response |
---|
| 4936 | + */ |
---|
| 4937 | + uint32 bcntxcancl; /**< transmit beacons canceled due to receipt of beacon (IBSS) */ |
---|
| 4938 | + uint32 rxf0ovfl; /**< Number of receive fifo 0 overflows */ |
---|
| 4939 | + uint32 rxf1ovfl; /**< Number of receive fifo 1 overflows (obsolete) */ |
---|
| 4940 | + uint32 rxf2ovfl; /**< Number of receive fifo 2 overflows (obsolete) */ |
---|
| 4941 | + uint32 txsfovfl; /**< Number of transmit status fifo overflows (obsolete) */ |
---|
| 4942 | + uint32 pmqovfl; /**< Number of PMQ overflows */ |
---|
| 4943 | + uint32 rxcgprqfrm; /**< Number of received Probe requests that made it into |
---|
| 4944 | + * the PRQ fifo |
---|
| 4945 | + */ |
---|
| 4946 | + uint32 rxcgprsqovfl; /**< Rx Probe Request Que overflow in the AP */ |
---|
| 4947 | + uint32 txcgprsfail; /**< Tx Probe Response Fail. AP sent probe response but did |
---|
| 4948 | + * not get ACK |
---|
| 4949 | + */ |
---|
| 4950 | + uint32 txcgprssuc; /**< Tx Probe Response Success (ACK was received) */ |
---|
| 4951 | + uint32 prs_timeout; /**< Number of probe requests that were dropped from the PRQ |
---|
| 4952 | + * fifo because a probe response could not be sent out within |
---|
| 4953 | + * the time limit defined in M_PRS_MAXTIME |
---|
| 4954 | + */ |
---|
| 4955 | + uint32 rxnack; |
---|
| 4956 | + uint32 frmscons; |
---|
| 4957 | + uint32 txnack; /**< obsolete */ |
---|
| 4958 | + uint32 rxback; /**< blockack rxcnt */ |
---|
| 4959 | + uint32 txback; /**< blockack txcnt */ |
---|
| 4960 | + |
---|
| 4961 | + /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ |
---|
| 4962 | + uint32 txfrag; /**< dot11TransmittedFragmentCount */ |
---|
| 4963 | + uint32 txmulti; /**< dot11MulticastTransmittedFrameCount */ |
---|
| 4964 | + uint32 txfail; /**< dot11FailedCount */ |
---|
| 4965 | + uint32 txretry; /**< dot11RetryCount */ |
---|
| 4966 | + uint32 txretrie; /**< dot11MultipleRetryCount */ |
---|
| 4967 | + uint32 rxdup; /**< dot11FrameduplicateCount */ |
---|
| 4968 | + uint32 txrts; /**< dot11RTSSuccessCount */ |
---|
| 4969 | + uint32 txnocts; /**< dot11RTSFailureCount */ |
---|
| 4970 | + uint32 txnoack; /**< dot11ACKFailureCount */ |
---|
| 4971 | + uint32 rxfrag; /**< dot11ReceivedFragmentCount */ |
---|
| 4972 | + uint32 rxmulti; /**< dot11MulticastReceivedFrameCount */ |
---|
| 4973 | + uint32 rxcrc; /**< dot11FCSErrorCount */ |
---|
| 4974 | + uint32 txfrmsnt; /**< dot11TransmittedFrameCount (bogus MIB?) */ |
---|
| 4975 | + uint32 rxundec; /**< dot11WEPUndecryptableCount */ |
---|
| 4976 | + |
---|
| 4977 | + /* WPA2 counters (see rxundec for DecryptFailureCount) */ |
---|
| 4978 | + uint32 tkipmicfaill; /**< TKIPLocalMICFailures */ |
---|
| 4979 | + uint32 tkipcntrmsr; /**< TKIPCounterMeasuresInvoked */ |
---|
| 4980 | + uint32 tkipreplay; /**< TKIPReplays */ |
---|
| 4981 | + uint32 ccmpfmterr; /**< CCMPFormatErrors */ |
---|
| 4982 | + uint32 ccmpreplay; /**< CCMPReplays */ |
---|
| 4983 | + uint32 ccmpundec; /**< CCMPDecryptErrors */ |
---|
| 4984 | + uint32 fourwayfail; /**< FourWayHandshakeFailures */ |
---|
| 4985 | + uint32 wepundec; /**< dot11WEPUndecryptableCount */ |
---|
| 4986 | + uint32 wepicverr; /**< dot11WEPICVErrorCount */ |
---|
| 4987 | + uint32 decsuccess; /**< DecryptSuccessCount */ |
---|
| 4988 | + uint32 tkipicverr; /**< TKIPICVErrorCount */ |
---|
| 4989 | + uint32 wepexcluded; /**< dot11WEPExcludedCount */ |
---|
| 4990 | + |
---|
| 4991 | + uint32 rxundec_mcst; /**< dot11WEPUndecryptableCount */ |
---|
| 4992 | + |
---|
| 4993 | + /* WPA2 counters (see rxundec for DecryptFailureCount) */ |
---|
| 4994 | + uint32 tkipmicfaill_mcst; /**< TKIPLocalMICFailures */ |
---|
| 4995 | + uint32 tkipcntrmsr_mcst; /**< TKIPCounterMeasuresInvoked */ |
---|
| 4996 | + uint32 tkipreplay_mcst; /**< TKIPReplays */ |
---|
| 4997 | + uint32 ccmpfmterr_mcst; /**< CCMPFormatErrors */ |
---|
| 4998 | + uint32 ccmpreplay_mcst; /**< CCMPReplays */ |
---|
| 4999 | + uint32 ccmpundec_mcst; /**< CCMPDecryptErrors */ |
---|
| 5000 | + uint32 fourwayfail_mcst; /**< FourWayHandshakeFailures */ |
---|
| 5001 | + uint32 wepundec_mcst; /**< dot11WEPUndecryptableCount */ |
---|
| 5002 | + uint32 wepicverr_mcst; /**< dot11WEPICVErrorCount */ |
---|
| 5003 | + uint32 decsuccess_mcst; /**< DecryptSuccessCount */ |
---|
| 5004 | + uint32 tkipicverr_mcst; /**< TKIPICVErrorCount */ |
---|
| 5005 | + uint32 wepexcluded_mcst; /**< dot11WEPExcludedCount */ |
---|
| 5006 | + |
---|
| 5007 | + uint32 txchanrej; /**< Tx frames suppressed due to channel rejection */ |
---|
| 5008 | + uint32 txexptime; /**< Tx frames suppressed due to timer expiration */ |
---|
| 5009 | + uint32 psmwds; /**< Count PSM watchdogs */ |
---|
| 5010 | + uint32 phywatchdog; /**< Count Phy watchdogs (triggered by ucode) */ |
---|
| 5011 | + |
---|
| 5012 | + /* MBSS counters, AP only */ |
---|
| 5013 | + uint32 prq_entries_handled; /**< PRQ entries read in */ |
---|
| 5014 | + uint32 prq_undirected_entries; /**< which were bcast bss & ssid */ |
---|
| 5015 | + uint32 prq_bad_entries; /**< which could not be translated to info */ |
---|
| 5016 | + uint32 atim_suppress_count; /**< TX suppressions on ATIM fifo */ |
---|
| 5017 | + uint32 bcn_template_not_ready; /**< Template marked in use on send bcn ... */ |
---|
| 5018 | + uint32 bcn_template_not_ready_done; /**< ...but "DMA done" interrupt rcvd */ |
---|
| 5019 | + uint32 late_tbtt_dpc; /**< TBTT DPC did not happen in time */ |
---|
| 5020 | + |
---|
| 5021 | + /* per-rate receive stat counters */ |
---|
| 5022 | + uint32 rx1mbps; /**< packets rx at 1Mbps */ |
---|
| 5023 | + uint32 rx2mbps; /**< packets rx at 2Mbps */ |
---|
| 5024 | + uint32 rx5mbps5; /**< packets rx at 5.5Mbps */ |
---|
| 5025 | + uint32 rx6mbps; /**< packets rx at 6Mbps */ |
---|
| 5026 | + uint32 rx9mbps; /**< packets rx at 9Mbps */ |
---|
| 5027 | + uint32 rx11mbps; /**< packets rx at 11Mbps */ |
---|
| 5028 | + uint32 rx12mbps; /**< packets rx at 12Mbps */ |
---|
| 5029 | + uint32 rx18mbps; /**< packets rx at 18Mbps */ |
---|
| 5030 | + uint32 rx24mbps; /**< packets rx at 24Mbps */ |
---|
| 5031 | + uint32 rx36mbps; /**< packets rx at 36Mbps */ |
---|
| 5032 | + uint32 rx48mbps; /**< packets rx at 48Mbps */ |
---|
| 5033 | + uint32 rx54mbps; /**< packets rx at 54Mbps */ |
---|
| 5034 | + uint32 rx108mbps; /**< packets rx at 108mbps */ |
---|
| 5035 | + uint32 rx162mbps; /**< packets rx at 162mbps */ |
---|
| 5036 | + uint32 rx216mbps; /**< packets rx at 216 mbps */ |
---|
| 5037 | + uint32 rx270mbps; /**< packets rx at 270 mbps */ |
---|
| 5038 | + uint32 rx324mbps; /**< packets rx at 324 mbps */ |
---|
| 5039 | + uint32 rx378mbps; /**< packets rx at 378 mbps */ |
---|
| 5040 | + uint32 rx432mbps; /**< packets rx at 432 mbps */ |
---|
| 5041 | + uint32 rx486mbps; /**< packets rx at 486 mbps */ |
---|
| 5042 | + uint32 rx540mbps; /**< packets rx at 540 mbps */ |
---|
| 5043 | + |
---|
| 5044 | + /* pkteng rx frame stats */ |
---|
| 5045 | + uint32 pktengrxducast; /**< unicast frames rxed by the pkteng code */ |
---|
| 5046 | + uint32 pktengrxdmcast; /**< multicast frames rxed by the pkteng code */ |
---|
| 5047 | + |
---|
| 5048 | + uint32 rfdisable; /**< count of radio disables */ |
---|
| 5049 | + uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ |
---|
| 5050 | + uint32 bphy_badplcp; |
---|
| 5051 | + |
---|
| 5052 | + uint32 txmpdu_sgi; /**< count for sgi transmit */ |
---|
| 5053 | + uint32 rxmpdu_sgi; /**< count for sgi received */ |
---|
| 5054 | + uint32 txmpdu_stbc; /**< count for stbc transmit */ |
---|
| 5055 | + uint32 rxmpdu_stbc; /**< count for stbc received */ |
---|
| 5056 | + |
---|
| 5057 | + uint32 rxdrop20s; /**< drop secondary cnt */ |
---|
| 5058 | +} wl_cnt_ver_6_t; |
---|
| 5059 | + |
---|
| 5060 | +#define WL_DELTA_STATS_T_VERSION 2 /**< current version of wl_delta_stats_t struct */ |
---|
| 5061 | + |
---|
| 5062 | +typedef struct { |
---|
| 5063 | + uint16 version; /**< see definition of WL_DELTA_STATS_T_VERSION */ |
---|
| 5064 | + uint16 length; /**< length of entire structure */ |
---|
| 5065 | + |
---|
| 5066 | + /* transmit stat counters */ |
---|
| 5067 | + uint32 txframe; /**< tx data frames */ |
---|
| 5068 | + uint32 txbyte; /**< tx data bytes */ |
---|
| 5069 | + uint32 txretrans; /**< tx mac retransmits */ |
---|
| 5070 | + uint32 txfail; /**< tx failures */ |
---|
| 5071 | + |
---|
| 5072 | + /* receive stat counters */ |
---|
| 5073 | + uint32 rxframe; /**< rx data frames */ |
---|
| 5074 | + uint32 rxbyte; /**< rx data bytes */ |
---|
| 5075 | + |
---|
| 5076 | + /* per-rate receive stat counters */ |
---|
| 5077 | + uint32 rx1mbps; /**< packets rx at 1Mbps */ |
---|
| 5078 | + uint32 rx2mbps; /**< packets rx at 2Mbps */ |
---|
| 5079 | + uint32 rx5mbps5; /**< packets rx at 5.5Mbps */ |
---|
| 5080 | + uint32 rx6mbps; /**< packets rx at 6Mbps */ |
---|
| 5081 | + uint32 rx9mbps; /**< packets rx at 9Mbps */ |
---|
| 5082 | + uint32 rx11mbps; /**< packets rx at 11Mbps */ |
---|
| 5083 | + uint32 rx12mbps; /**< packets rx at 12Mbps */ |
---|
| 5084 | + uint32 rx18mbps; /**< packets rx at 18Mbps */ |
---|
| 5085 | + uint32 rx24mbps; /**< packets rx at 24Mbps */ |
---|
| 5086 | + uint32 rx36mbps; /**< packets rx at 36Mbps */ |
---|
| 5087 | + uint32 rx48mbps; /**< packets rx at 48Mbps */ |
---|
| 5088 | + uint32 rx54mbps; /**< packets rx at 54Mbps */ |
---|
| 5089 | + uint32 rx108mbps; /**< packets rx at 108mbps */ |
---|
| 5090 | + uint32 rx162mbps; /**< packets rx at 162mbps */ |
---|
| 5091 | + uint32 rx216mbps; /**< packets rx at 216 mbps */ |
---|
| 5092 | + uint32 rx270mbps; /**< packets rx at 270 mbps */ |
---|
| 5093 | + uint32 rx324mbps; /**< packets rx at 324 mbps */ |
---|
| 5094 | + uint32 rx378mbps; /**< packets rx at 378 mbps */ |
---|
| 5095 | + uint32 rx432mbps; /**< packets rx at 432 mbps */ |
---|
| 5096 | + uint32 rx486mbps; /**< packets rx at 486 mbps */ |
---|
| 5097 | + uint32 rx540mbps; /**< packets rx at 540 mbps */ |
---|
| 5098 | + |
---|
3155 | 5099 | /* phy stats */ |
---|
3156 | 5100 | uint32 rxbadplcp; |
---|
3157 | 5101 | uint32 rxcrsglitch; |
---|
3158 | 5102 | uint32 bphy_rxcrsglitch; |
---|
3159 | 5103 | uint32 bphy_badplcp; |
---|
3160 | 5104 | |
---|
| 5105 | + uint32 slice_index; /**< Slice for which stats are reported */ |
---|
| 5106 | + |
---|
3161 | 5107 | } wl_delta_stats_t; |
---|
| 5108 | + |
---|
| 5109 | +/* Partial statistics counter report */ |
---|
| 5110 | +#define WL_CNT_CTL_MGT_FRAMES 0 |
---|
| 5111 | + |
---|
| 5112 | +typedef struct { |
---|
| 5113 | + uint16 type; |
---|
| 5114 | + uint16 len; |
---|
| 5115 | + |
---|
| 5116 | + /* detailed control/management frames */ |
---|
| 5117 | + uint32 txnull; |
---|
| 5118 | + uint32 rxnull; |
---|
| 5119 | + uint32 txqosnull; |
---|
| 5120 | + uint32 rxqosnull; |
---|
| 5121 | + uint32 txassocreq; |
---|
| 5122 | + uint32 rxassocreq; |
---|
| 5123 | + uint32 txreassocreq; |
---|
| 5124 | + uint32 rxreassocreq; |
---|
| 5125 | + uint32 txdisassoc; |
---|
| 5126 | + uint32 rxdisassoc; |
---|
| 5127 | + uint32 txassocrsp; |
---|
| 5128 | + uint32 rxassocrsp; |
---|
| 5129 | + uint32 txreassocrsp; |
---|
| 5130 | + uint32 rxreassocrsp; |
---|
| 5131 | + uint32 txauth; |
---|
| 5132 | + uint32 rxauth; |
---|
| 5133 | + uint32 txdeauth; |
---|
| 5134 | + uint32 rxdeauth; |
---|
| 5135 | + uint32 txprobereq; |
---|
| 5136 | + uint32 rxprobereq; |
---|
| 5137 | + uint32 txprobersp; |
---|
| 5138 | + uint32 rxprobersp; |
---|
| 5139 | + uint32 txaction; |
---|
| 5140 | + uint32 rxaction; |
---|
| 5141 | + uint32 txrts; |
---|
| 5142 | + uint32 rxrts; |
---|
| 5143 | + uint32 txcts; |
---|
| 5144 | + uint32 rxcts; |
---|
| 5145 | + uint32 txack; |
---|
| 5146 | + uint32 rxack; |
---|
| 5147 | + uint32 txbar; |
---|
| 5148 | + uint32 rxbar; |
---|
| 5149 | + uint32 txback; |
---|
| 5150 | + uint32 rxback; |
---|
| 5151 | + uint32 txpspoll; |
---|
| 5152 | + uint32 rxpspoll; |
---|
| 5153 | +} wl_ctl_mgt_cnt_t; |
---|
3162 | 5154 | |
---|
3163 | 5155 | typedef struct { |
---|
3164 | 5156 | uint32 packets; |
---|
.. | .. |
---|
3166 | 5158 | } wl_traffic_stats_t; |
---|
3167 | 5159 | |
---|
3168 | 5160 | typedef struct { |
---|
3169 | | - uint16 version; /* see definition of WL_WME_CNT_VERSION */ |
---|
3170 | | - uint16 length; /* length of entire structure */ |
---|
| 5161 | + uint16 version; /**< see definition of WL_WME_CNT_VERSION */ |
---|
| 5162 | + uint16 length; /**< length of entire structure */ |
---|
3171 | 5163 | |
---|
3172 | | - wl_traffic_stats_t tx[AC_COUNT]; /* Packets transmitted */ |
---|
3173 | | - wl_traffic_stats_t tx_failed[AC_COUNT]; /* Packets dropped or failed to transmit */ |
---|
3174 | | - wl_traffic_stats_t rx[AC_COUNT]; /* Packets received */ |
---|
3175 | | - wl_traffic_stats_t rx_failed[AC_COUNT]; /* Packets failed to receive */ |
---|
| 5164 | + wl_traffic_stats_t tx[AC_COUNT]; /**< Packets transmitted */ |
---|
| 5165 | + wl_traffic_stats_t tx_failed[AC_COUNT]; /**< Packets dropped or failed to transmit */ |
---|
| 5166 | + wl_traffic_stats_t rx[AC_COUNT]; /**< Packets received */ |
---|
| 5167 | + wl_traffic_stats_t rx_failed[AC_COUNT]; /**< Packets failed to receive */ |
---|
3176 | 5168 | |
---|
3177 | | - wl_traffic_stats_t forward[AC_COUNT]; /* Packets forwarded by AP */ |
---|
| 5169 | + wl_traffic_stats_t forward[AC_COUNT]; /**< Packets forwarded by AP */ |
---|
3178 | 5170 | |
---|
3179 | | - wl_traffic_stats_t tx_expired[AC_COUNT]; /* packets dropped due to lifetime expiry */ |
---|
| 5171 | + wl_traffic_stats_t tx_expired[AC_COUNT]; /**< packets dropped due to lifetime expiry */ |
---|
3180 | 5172 | |
---|
3181 | 5173 | } wl_wme_cnt_t; |
---|
3182 | 5174 | |
---|
.. | .. |
---|
3185 | 5177 | uint32 high; |
---|
3186 | 5178 | }; |
---|
3187 | 5179 | |
---|
| 5180 | +/* A versioned structure for setting and retrieving debug message levels. */ |
---|
| 5181 | +#define WL_MSGLEVEL_STRUCT_VERSION_1 1 |
---|
| 5182 | + |
---|
| 5183 | +typedef struct wl_msglevel_v1 { |
---|
| 5184 | + uint16 version; |
---|
| 5185 | + uint16 length; |
---|
| 5186 | + uint32 msglevel1; |
---|
| 5187 | + uint32 msglevel2; |
---|
| 5188 | + uint32 msglevel3; |
---|
| 5189 | + /* add another uint32 when full */ |
---|
| 5190 | +} wl_msglevel_v1_t; |
---|
| 5191 | + |
---|
| 5192 | +#define WL_ICMP_IPV6_CFG_VERSION 1 |
---|
| 5193 | +#define WL_ICMP_IPV6_CLEAR_ALL (1 << 0) |
---|
| 5194 | + |
---|
| 5195 | +typedef struct wl_icmp_ipv6_cfg { |
---|
| 5196 | + uint16 version; |
---|
| 5197 | + uint16 length; |
---|
| 5198 | + uint16 fixed_length; |
---|
| 5199 | + uint16 flags; |
---|
| 5200 | + uint32 num_ipv6; |
---|
| 5201 | + /* num_ipv6 to follow */ |
---|
| 5202 | + struct ipv6_addr host_ipv6[]; |
---|
| 5203 | +} wl_icmp_ipv6_cfg_t; |
---|
| 5204 | + |
---|
| 5205 | +#define WL_ICMP_CFG_IPV6_FIXED_LEN OFFSETOF(wl_icmp_ipv6_cfg_t, host_ipv6) |
---|
| 5206 | +#define WL_ICMP_CFG_IPV6_LEN(count) (WL_ICMP_CFG_IPV6_FIXED_LEN + \ |
---|
| 5207 | + ((count) * sizeof(struct ipv6_addr))) |
---|
| 5208 | + |
---|
3188 | 5209 | typedef struct wl_mkeep_alive_pkt { |
---|
3189 | 5210 | uint16 version; /* Version for mkeep_alive */ |
---|
3190 | 5211 | uint16 length; /* length of fixed parameters in the structure */ |
---|
3191 | | - uint32 period_msec; |
---|
| 5212 | + uint32 period_msec; /* high bit on means immediate send */ |
---|
3192 | 5213 | uint16 len_bytes; |
---|
3193 | 5214 | uint8 keep_alive_id; /* 0 - 3 for N = 4 */ |
---|
3194 | 5215 | uint8 data[1]; |
---|
.. | .. |
---|
3197 | 5218 | #define WL_MKEEP_ALIVE_VERSION 1 |
---|
3198 | 5219 | #define WL_MKEEP_ALIVE_FIXED_LEN OFFSETOF(wl_mkeep_alive_pkt_t, data) |
---|
3199 | 5220 | #define WL_MKEEP_ALIVE_PRECISION 500 |
---|
| 5221 | +#define WL_MKEEP_ALIVE_PERIOD_MASK 0x7FFFFFFF |
---|
| 5222 | +#define WL_MKEEP_ALIVE_IMMEDIATE 0x80000000 |
---|
3200 | 5223 | |
---|
3201 | | -/* TCP Keep-Alive conn struct */ |
---|
| 5224 | +/** TCP Keep-Alive conn struct */ |
---|
3202 | 5225 | typedef struct wl_mtcpkeep_alive_conn_pkt { |
---|
3203 | | - struct ether_addr saddr; /* src mac address */ |
---|
3204 | | - struct ether_addr daddr; /* dst mac address */ |
---|
3205 | | - struct ipv4_addr sipaddr; /* source IP addr */ |
---|
3206 | | - struct ipv4_addr dipaddr; /* dest IP addr */ |
---|
3207 | | - uint16 sport; /* src port */ |
---|
3208 | | - uint16 dport; /* dest port */ |
---|
3209 | | - uint32 seq; /* seq number */ |
---|
3210 | | - uint32 ack; /* ACK number */ |
---|
3211 | | - uint16 tcpwin; /* TCP window */ |
---|
| 5226 | + struct ether_addr saddr; /**< src mac address */ |
---|
| 5227 | + struct ether_addr daddr; /**< dst mac address */ |
---|
| 5228 | + struct ipv4_addr sipaddr; /**< source IP addr */ |
---|
| 5229 | + struct ipv4_addr dipaddr; /**< dest IP addr */ |
---|
| 5230 | + uint16 sport; /**< src port */ |
---|
| 5231 | + uint16 dport; /**< dest port */ |
---|
| 5232 | + uint32 seq; /**< seq number */ |
---|
| 5233 | + uint32 ack; /**< ACK number */ |
---|
| 5234 | + uint16 tcpwin; /**< TCP window */ |
---|
| 5235 | + uint16 PAD; |
---|
3212 | 5236 | } wl_mtcpkeep_alive_conn_pkt_t; |
---|
3213 | 5237 | |
---|
3214 | | -/* TCP Keep-Alive interval struct */ |
---|
| 5238 | +/** TCP Keep-Alive interval struct */ |
---|
3215 | 5239 | typedef struct wl_mtcpkeep_alive_timers_pkt { |
---|
3216 | | - uint16 interval; /* interval timer */ |
---|
3217 | | - uint16 retry_interval; /* retry_interval timer */ |
---|
3218 | | - uint16 retry_count; /* retry_count */ |
---|
| 5240 | + uint16 interval; /**< interval timer */ |
---|
| 5241 | + uint16 retry_interval; /**< retry_interval timer */ |
---|
| 5242 | + uint16 retry_count; /**< retry_count */ |
---|
3219 | 5243 | } wl_mtcpkeep_alive_timers_pkt_t; |
---|
3220 | 5244 | |
---|
3221 | 5245 | typedef struct wake_info { |
---|
3222 | 5246 | uint32 wake_reason; |
---|
3223 | | - uint32 wake_info_len; /* size of packet */ |
---|
3224 | | - uchar packet[1]; |
---|
| 5247 | + uint32 wake_info_len; /**< size of packet */ |
---|
| 5248 | + uint8 packet[]; |
---|
3225 | 5249 | } wake_info_t; |
---|
3226 | 5250 | |
---|
3227 | 5251 | typedef struct wake_pkt { |
---|
3228 | | - uint32 wake_pkt_len; /* size of packet */ |
---|
3229 | | - uchar packet[1]; |
---|
| 5252 | + uint32 wake_pkt_len; /**< size of packet */ |
---|
| 5253 | + uint8 packet[]; |
---|
3230 | 5254 | } wake_pkt_t; |
---|
3231 | | - |
---|
3232 | 5255 | |
---|
3233 | 5256 | #define WL_MTCPKEEP_ALIVE_VERSION 1 |
---|
3234 | 5257 | |
---|
3235 | | -#ifdef WLBA |
---|
| 5258 | +/* #ifdef WLBA */ |
---|
3236 | 5259 | |
---|
3237 | | -#define WLC_BA_CNT_VERSION 1 /* current version of wlc_ba_cnt_t */ |
---|
| 5260 | +#define WLC_BA_CNT_VERSION 1 /**< current version of wlc_ba_cnt_t */ |
---|
3238 | 5261 | |
---|
3239 | | -/* block ack related stats */ |
---|
| 5262 | +/** block ack related stats */ |
---|
3240 | 5263 | typedef struct wlc_ba_cnt { |
---|
3241 | | - uint16 version; /* WLC_BA_CNT_VERSION */ |
---|
3242 | | - uint16 length; /* length of entire structure */ |
---|
| 5264 | + uint16 version; /**< WLC_BA_CNT_VERSION */ |
---|
| 5265 | + uint16 length; /**< length of entire structure */ |
---|
3243 | 5266 | |
---|
3244 | 5267 | /* transmit stat counters */ |
---|
3245 | | - uint32 txpdu; /* pdus sent */ |
---|
3246 | | - uint32 txsdu; /* sdus sent */ |
---|
3247 | | - uint32 txfc; /* tx side flow controlled packets */ |
---|
3248 | | - uint32 txfci; /* tx side flow control initiated */ |
---|
3249 | | - uint32 txretrans; /* retransmitted pdus */ |
---|
3250 | | - uint32 txbatimer; /* ba resend due to timer */ |
---|
3251 | | - uint32 txdrop; /* dropped packets */ |
---|
3252 | | - uint32 txaddbareq; /* addba req sent */ |
---|
3253 | | - uint32 txaddbaresp; /* addba resp sent */ |
---|
3254 | | - uint32 txdelba; /* delba sent */ |
---|
3255 | | - uint32 txba; /* ba sent */ |
---|
3256 | | - uint32 txbar; /* bar sent */ |
---|
3257 | | - uint32 txpad[4]; /* future */ |
---|
| 5268 | + uint32 txpdu; /**< pdus sent */ |
---|
| 5269 | + uint32 txsdu; /**< sdus sent */ |
---|
| 5270 | + uint32 txfc; /**< tx side flow controlled packets */ |
---|
| 5271 | + uint32 txfci; /**< tx side flow control initiated */ |
---|
| 5272 | + uint32 txretrans; /**< retransmitted pdus */ |
---|
| 5273 | + uint32 txbatimer; /**< ba resend due to timer */ |
---|
| 5274 | + uint32 txdrop; /**< dropped packets */ |
---|
| 5275 | + uint32 txaddbareq; /**< addba req sent */ |
---|
| 5276 | + uint32 txaddbaresp; /**< addba resp sent */ |
---|
| 5277 | + uint32 txdelba; /**< delba sent */ |
---|
| 5278 | + uint32 txba; /**< ba sent */ |
---|
| 5279 | + uint32 txbar; /**< bar sent */ |
---|
| 5280 | + uint32 txpad[4]; /**< future */ |
---|
3258 | 5281 | |
---|
3259 | 5282 | /* receive side counters */ |
---|
3260 | | - uint32 rxpdu; /* pdus recd */ |
---|
3261 | | - uint32 rxqed; /* pdus buffered before sending up */ |
---|
3262 | | - uint32 rxdup; /* duplicate pdus */ |
---|
3263 | | - uint32 rxnobuf; /* pdus discarded due to no buf */ |
---|
3264 | | - uint32 rxaddbareq; /* addba req recd */ |
---|
3265 | | - uint32 rxaddbaresp; /* addba resp recd */ |
---|
3266 | | - uint32 rxdelba; /* delba recd */ |
---|
3267 | | - uint32 rxba; /* ba recd */ |
---|
3268 | | - uint32 rxbar; /* bar recd */ |
---|
3269 | | - uint32 rxinvba; /* invalid ba recd */ |
---|
3270 | | - uint32 rxbaholes; /* ba recd with holes */ |
---|
3271 | | - uint32 rxunexp; /* unexpected packets */ |
---|
3272 | | - uint32 rxpad[4]; /* future */ |
---|
| 5283 | + uint32 rxpdu; /**< pdus recd */ |
---|
| 5284 | + uint32 rxqed; /**< pdus buffered before sending up */ |
---|
| 5285 | + uint32 rxdup; /**< duplicate pdus */ |
---|
| 5286 | + uint32 rxnobuf; /**< pdus discarded due to no buf */ |
---|
| 5287 | + uint32 rxaddbareq; /**< addba req recd */ |
---|
| 5288 | + uint32 rxaddbaresp; /**< addba resp recd */ |
---|
| 5289 | + uint32 rxdelba; /**< delba recd */ |
---|
| 5290 | + uint32 rxba; /**< ba recd */ |
---|
| 5291 | + uint32 rxbar; /**< bar recd */ |
---|
| 5292 | + uint32 rxinvba; /**< invalid ba recd */ |
---|
| 5293 | + uint32 rxbaholes; /**< ba recd with holes */ |
---|
| 5294 | + uint32 rxunexp; /**< unexpected packets */ |
---|
| 5295 | + uint32 rxpad[4]; /**< future */ |
---|
3273 | 5296 | } wlc_ba_cnt_t; |
---|
3274 | | -#endif /* WLBA */ |
---|
| 5297 | +/* #endif WLBA */ |
---|
3275 | 5298 | |
---|
3276 | | -/* structure for per-tid ampdu control */ |
---|
| 5299 | +/** structure for per-tid ampdu control */ |
---|
3277 | 5300 | struct ampdu_tid_control { |
---|
3278 | 5301 | uint8 tid; /* tid */ |
---|
3279 | 5302 | uint8 enable; /* enable/disable */ |
---|
3280 | 5303 | }; |
---|
3281 | 5304 | |
---|
3282 | | -/* struct for ampdu tx/rx aggregation control */ |
---|
| 5305 | +/** struct for ampdu tx/rx aggregation control */ |
---|
3283 | 5306 | struct ampdu_aggr { |
---|
3284 | | - int8 aggr_override; /* aggr overrided by dongle. Not to be set by host. */ |
---|
3285 | | - uint16 conf_TID_bmap; /* bitmap of TIDs to configure */ |
---|
3286 | | - uint16 enab_TID_bmap; /* enable/disable per TID */ |
---|
| 5307 | + int8 aggr_override; /**< aggr overrided by dongle. Not to be set by host. */ |
---|
| 5308 | + uint16 conf_TID_bmap; /**< bitmap of TIDs to configure */ |
---|
| 5309 | + uint16 enab_TID_bmap; /**< enable/disable per TID */ |
---|
3287 | 5310 | }; |
---|
3288 | 5311 | |
---|
3289 | | -/* structure for identifying ea/tid for sending addba/delba */ |
---|
| 5312 | +/** structure for identifying ea/tid for sending addba/delba */ |
---|
3290 | 5313 | struct ampdu_ea_tid { |
---|
3291 | | - struct ether_addr ea; /* Station address */ |
---|
3292 | | - uint8 tid; /* tid */ |
---|
3293 | | - uint8 initiator; /* 0 is recipient, 1 is originator */ |
---|
3294 | | -}; |
---|
3295 | | -/* structure for identifying retry/tid for retry_limit_tid/rr_retry_limit_tid */ |
---|
3296 | | -struct ampdu_retry_tid { |
---|
3297 | | - uint8 tid; /* tid */ |
---|
3298 | | - uint8 retry; /* retry value */ |
---|
| 5314 | + struct ether_addr ea; /**< Station address */ |
---|
| 5315 | + uint8 tid; /**< tid */ |
---|
| 5316 | + uint8 initiator; /**< 0 is recipient, 1 is originator */ |
---|
3299 | 5317 | }; |
---|
3300 | 5318 | |
---|
3301 | | -#define BDD_FNAME_LEN 32 /* Max length of friendly name */ |
---|
| 5319 | +/** structure for identifying retry/tid for retry_limit_tid/rr_retry_limit_tid */ |
---|
| 5320 | +struct ampdu_retry_tid { |
---|
| 5321 | + uint8 tid; /**< tid */ |
---|
| 5322 | + uint8 retry; /**< retry value */ |
---|
| 5323 | +}; |
---|
| 5324 | + |
---|
| 5325 | +#define BDD_FNAME_LEN 32 /**< Max length of friendly name */ |
---|
3302 | 5326 | typedef struct bdd_fname { |
---|
3303 | | - uint8 len; /* length of friendly name */ |
---|
3304 | | - uchar name[BDD_FNAME_LEN]; /* friendly name */ |
---|
| 5327 | + uint8 len; /**< length of friendly name */ |
---|
| 5328 | + uchar name[BDD_FNAME_LEN]; /**< friendly name */ |
---|
3305 | 5329 | } bdd_fname_t; |
---|
3306 | 5330 | |
---|
3307 | 5331 | /* structure for addts arguments */ |
---|
3308 | | -/* For ioctls that take a list of TSPEC */ |
---|
| 5332 | +/** For ioctls that take a list of TSPEC */ |
---|
3309 | 5333 | struct tslist { |
---|
3310 | | - int count; /* number of tspecs */ |
---|
3311 | | - struct tsinfo_arg tsinfo[1]; /* variable length array of tsinfo */ |
---|
| 5334 | + int32 count; /**< number of tspecs */ |
---|
| 5335 | + struct tsinfo_arg tsinfo[]; /**< variable length array of tsinfo */ |
---|
3312 | 5336 | }; |
---|
3313 | 5337 | |
---|
3314 | | -#ifdef WLTDLS |
---|
3315 | | -/* structure for tdls iovars */ |
---|
| 5338 | +/* WLTDLS */ |
---|
| 5339 | +/**structure for tdls iovars */ |
---|
3316 | 5340 | typedef struct tdls_iovar { |
---|
3317 | | - struct ether_addr ea; /* Station address */ |
---|
3318 | | - uint8 mode; /* mode: depends on iovar */ |
---|
| 5341 | + struct ether_addr ea; /**< Station address */ |
---|
| 5342 | + uint8 mode; /**< mode: depends on iovar */ |
---|
| 5343 | + uint8 PAD; |
---|
3319 | 5344 | chanspec_t chanspec; |
---|
3320 | | - uint32 pad; /* future */ |
---|
| 5345 | + uint8 PAD[6]; |
---|
3321 | 5346 | } tdls_iovar_t; |
---|
3322 | 5347 | |
---|
3323 | 5348 | #define TDLS_WFD_IE_SIZE 512 |
---|
3324 | | -/* structure for tdls wfd ie */ |
---|
| 5349 | +/**structure for tdls wfd ie */ |
---|
3325 | 5350 | typedef struct tdls_wfd_ie_iovar { |
---|
3326 | | - struct ether_addr ea; /* Station address */ |
---|
| 5351 | + struct ether_addr ea; /**< Station address */ |
---|
3327 | 5352 | uint8 mode; |
---|
| 5353 | + uint8 PAD; |
---|
3328 | 5354 | uint16 length; |
---|
3329 | 5355 | uint8 data[TDLS_WFD_IE_SIZE]; |
---|
3330 | 5356 | } tdls_wfd_ie_iovar_t; |
---|
3331 | | -#endif /* WLTDLS */ |
---|
| 5357 | +/* #endif WLTDLS */ |
---|
3332 | 5358 | |
---|
3333 | | -/* structure for addts/delts arguments */ |
---|
| 5359 | +/** structure for addts/delts arguments */ |
---|
3334 | 5360 | typedef struct tspec_arg { |
---|
3335 | | - uint16 version; /* see definition of TSPEC_ARG_VERSION */ |
---|
3336 | | - uint16 length; /* length of entire structure */ |
---|
3337 | | - uint flag; /* bit field */ |
---|
| 5361 | + uint16 version; /**< see definition of TSPEC_ARG_VERSION */ |
---|
| 5362 | + uint16 length; /**< length of entire structure */ |
---|
| 5363 | + uint32 flag; /**< bit field */ |
---|
3338 | 5364 | /* TSPEC Arguments */ |
---|
3339 | | - struct tsinfo_arg tsinfo; /* TS Info bit field */ |
---|
3340 | | - uint16 nom_msdu_size; /* (Nominal or fixed) MSDU Size (bytes) */ |
---|
3341 | | - uint16 max_msdu_size; /* Maximum MSDU Size (bytes) */ |
---|
3342 | | - uint min_srv_interval; /* Minimum Service Interval (us) */ |
---|
3343 | | - uint max_srv_interval; /* Maximum Service Interval (us) */ |
---|
3344 | | - uint inactivity_interval; /* Inactivity Interval (us) */ |
---|
3345 | | - uint suspension_interval; /* Suspension Interval (us) */ |
---|
3346 | | - uint srv_start_time; /* Service Start Time (us) */ |
---|
3347 | | - uint min_data_rate; /* Minimum Data Rate (bps) */ |
---|
3348 | | - uint mean_data_rate; /* Mean Data Rate (bps) */ |
---|
3349 | | - uint peak_data_rate; /* Peak Data Rate (bps) */ |
---|
3350 | | - uint max_burst_size; /* Maximum Burst Size (bytes) */ |
---|
3351 | | - uint delay_bound; /* Delay Bound (us) */ |
---|
3352 | | - uint min_phy_rate; /* Minimum PHY Rate (bps) */ |
---|
3353 | | - uint16 surplus_bw; /* Surplus Bandwidth Allowance (range 1.0 to 8.0) */ |
---|
3354 | | - uint16 medium_time; /* Medium Time (32 us/s periods) */ |
---|
3355 | | - uint8 dialog_token; /* dialog token */ |
---|
| 5365 | + struct tsinfo_arg tsinfo; /**< TS Info bit field */ |
---|
| 5366 | + uint8 PAD; |
---|
| 5367 | + uint16 nom_msdu_size; /**< (Nominal or fixed) MSDU Size (bytes) */ |
---|
| 5368 | + uint16 max_msdu_size; /**< Maximum MSDU Size (bytes) */ |
---|
| 5369 | + uint32 min_srv_interval; /**< Minimum Service Interval (us) */ |
---|
| 5370 | + uint32 max_srv_interval; /**< Maximum Service Interval (us) */ |
---|
| 5371 | + uint32 inactivity_interval; /**< Inactivity Interval (us) */ |
---|
| 5372 | + uint32 suspension_interval; /**< Suspension Interval (us) */ |
---|
| 5373 | + uint32 srv_start_time; /**< Service Start Time (us) */ |
---|
| 5374 | + uint32 min_data_rate; /**< Minimum Data Rate (bps) */ |
---|
| 5375 | + uint32 mean_data_rate; /**< Mean Data Rate (bps) */ |
---|
| 5376 | + uint32 peak_data_rate; /**< Peak Data Rate (bps) */ |
---|
| 5377 | + uint32 max_burst_size; /**< Maximum Burst Size (bytes) */ |
---|
| 5378 | + uint32 delay_bound; /**< Delay Bound (us) */ |
---|
| 5379 | + uint32 min_phy_rate; /**< Minimum PHY Rate (bps) */ |
---|
| 5380 | + uint16 surplus_bw; /**< Surplus Bandwidth Allowance (range 1.0 to 8.0) */ |
---|
| 5381 | + uint16 medium_time; /**< Medium Time (32 us/s periods) */ |
---|
| 5382 | + uint8 dialog_token; /**< dialog token */ |
---|
| 5383 | + uint8 PAD[3]; |
---|
3356 | 5384 | } tspec_arg_t; |
---|
3357 | 5385 | |
---|
3358 | | -/* tspec arg for desired station */ |
---|
| 5386 | +/** tspec arg for desired station */ |
---|
3359 | 5387 | typedef struct tspec_per_sta_arg { |
---|
3360 | 5388 | struct ether_addr ea; |
---|
| 5389 | + uint8 PAD[2]; |
---|
3361 | 5390 | struct tspec_arg ts; |
---|
3362 | 5391 | } tspec_per_sta_arg_t; |
---|
3363 | 5392 | |
---|
3364 | | -/* structure for max bandwidth for each access category */ |
---|
| 5393 | +/** structure for max bandwidth for each access category */ |
---|
3365 | 5394 | typedef struct wme_max_bandwidth { |
---|
3366 | | - uint32 ac[AC_COUNT]; /* max bandwidth for each access category */ |
---|
| 5395 | + uint32 ac[AC_COUNT]; /**< max bandwidth for each access category */ |
---|
3367 | 5396 | } wme_max_bandwidth_t; |
---|
3368 | 5397 | |
---|
3369 | 5398 | #define WL_WME_MBW_PARAMS_IO_BYTES (sizeof(wme_max_bandwidth_t)) |
---|
3370 | 5399 | |
---|
3371 | 5400 | /* current version of wl_tspec_arg_t struct */ |
---|
3372 | | -#define TSPEC_ARG_VERSION 2 /* current version of wl_tspec_arg_t struct */ |
---|
3373 | | -#define TSPEC_ARG_LENGTH 55 /* argument length from tsinfo to medium_time */ |
---|
3374 | | -#define TSPEC_DEFAULT_DIALOG_TOKEN 42 /* default dialog token */ |
---|
3375 | | -#define TSPEC_DEFAULT_SBW_FACTOR 0x3000 /* default surplus bw */ |
---|
3376 | | - |
---|
| 5401 | +#define TSPEC_ARG_VERSION 2 /**< current version of wl_tspec_arg_t struct */ |
---|
| 5402 | +#define TSPEC_ARG_LENGTH 55 /**< argument length from tsinfo to medium_time */ |
---|
| 5403 | +#define TSPEC_DEFAULT_DIALOG_TOKEN 42 /**< default dialog token */ |
---|
| 5404 | +#define TSPEC_DEFAULT_SBW_FACTOR 0x3000 /**< default surplus bw */ |
---|
3377 | 5405 | |
---|
3378 | 5406 | #define WL_WOWL_KEEPALIVE_MAX_PACKET_SIZE 80 |
---|
3379 | 5407 | #define WLC_WOWL_MAX_KEEPALIVE 2 |
---|
3380 | 5408 | |
---|
3381 | | -/* Packet lifetime configuration per ac */ |
---|
| 5409 | +/** Packet lifetime configuration per ac */ |
---|
3382 | 5410 | typedef struct wl_lifetime { |
---|
3383 | | - uint32 ac; /* access class */ |
---|
3384 | | - uint32 lifetime; /* Packet lifetime value in ms */ |
---|
| 5411 | + uint32 ac; /**< access class */ |
---|
| 5412 | + uint32 lifetime; /**< Packet lifetime value in ms */ |
---|
3385 | 5413 | } wl_lifetime_t; |
---|
3386 | 5414 | |
---|
| 5415 | +/** Management time configuration */ |
---|
| 5416 | +typedef struct wl_lifetime_mg { |
---|
| 5417 | + uint32 mgmt_bitmap; /**< Mgmt subtype */ |
---|
| 5418 | + uint32 lifetime; /**< Packet lifetime value in us */ |
---|
| 5419 | +} wl_lifetime_mg_t; |
---|
3387 | 5420 | |
---|
3388 | | -/* Channel Switch Announcement param */ |
---|
| 5421 | +/* MAC Sample Capture related */ |
---|
| 5422 | +#define WL_MACCAPTR_DEFSTART_PTR 0xA00 |
---|
| 5423 | +#define WL_MACCAPTR_DEFSTOP_PTR 0xA3F |
---|
| 5424 | +#define WL_MACCAPTR_DEFSZ 0x3F |
---|
| 5425 | + |
---|
| 5426 | +#define WL_MACCAPTR_DEF_MASK 0xFFFFFFFF |
---|
| 5427 | + |
---|
| 5428 | +typedef enum { |
---|
| 5429 | + WL_MACCAPT_TRIG = 0, |
---|
| 5430 | + WL_MACCAPT_STORE = 1, |
---|
| 5431 | + WL_MACCAPT_TRANS = 2, |
---|
| 5432 | + WL_MACCAPT_MATCH = 3 |
---|
| 5433 | +} maccaptr_optn; |
---|
| 5434 | + |
---|
| 5435 | +typedef enum { |
---|
| 5436 | + WL_MACCAPT_STRT = 1, |
---|
| 5437 | + WL_MACCAPT_STOP = 2, |
---|
| 5438 | + WL_MACCAPT_RST = 3 |
---|
| 5439 | +} maccaptr_cmd_t; |
---|
| 5440 | + |
---|
| 5441 | +/* MAC Sample Capture Set-up Paramters */ |
---|
| 5442 | +typedef struct wl_maccapture_params { |
---|
| 5443 | + uint8 gpio_sel; |
---|
| 5444 | + uint8 la_mode; /* TRUE: GPIO Out Enabled */ |
---|
| 5445 | + uint8 PAD[2]; |
---|
| 5446 | + uint32 start_ptr; /* Start address to store */ |
---|
| 5447 | + uint32 stop_ptr; /* Stop address to store */ |
---|
| 5448 | + uint8 optn_bmp; /* Options */ |
---|
| 5449 | + uint8 PAD[3]; |
---|
| 5450 | + uint32 tr_mask; /* Trigger Mask */ |
---|
| 5451 | + uint32 tr_val; /* Trigger Value */ |
---|
| 5452 | + uint32 s_mask; /* Store Mode Mask */ |
---|
| 5453 | + uint32 x_mask; /* Trans. Mode Mask */ |
---|
| 5454 | + uint32 m_mask; /* Match Mode Mask */ |
---|
| 5455 | + uint32 m_val; /* Match Value */ |
---|
| 5456 | + maccaptr_cmd_t cmd; /* Start / Stop */ |
---|
| 5457 | +} wl_maccapture_params_t; |
---|
| 5458 | + |
---|
| 5459 | +/** Channel Switch Announcement param */ |
---|
3389 | 5460 | typedef struct wl_chan_switch { |
---|
3390 | | - uint8 mode; /* value 0 or 1 */ |
---|
3391 | | - uint8 count; /* count # of beacons before switching */ |
---|
3392 | | - chanspec_t chspec; /* chanspec */ |
---|
3393 | | - uint8 reg; /* regulatory class */ |
---|
3394 | | - uint8 frame_type; /* csa frame type, unicast or broadcast */ |
---|
| 5461 | + uint8 mode; /**< value 0 or 1 */ |
---|
| 5462 | + uint8 count; /**< count # of beacons before switching */ |
---|
| 5463 | + chanspec_t chspec; /**< chanspec */ |
---|
| 5464 | + uint8 reg; /**< regulatory class */ |
---|
| 5465 | + uint8 frame_type; /**< csa frame type, unicast or broadcast */ |
---|
3395 | 5466 | } wl_chan_switch_t; |
---|
3396 | 5467 | |
---|
3397 | 5468 | enum { |
---|
.. | .. |
---|
3421 | 5492 | #define IMMEDIATE_EVENT_BIT 8 |
---|
3422 | 5493 | #define SUPPRESS_SSID_BIT 9 |
---|
3423 | 5494 | #define ENABLE_NET_OFFLOAD_BIT 10 |
---|
3424 | | -/* report found/lost events for SSID and BSSID networks seperately */ |
---|
| 5495 | +/** report found/lost events for SSID and BSSID networks seperately */ |
---|
3425 | 5496 | #define REPORT_SEPERATELY_BIT 11 |
---|
3426 | 5497 | |
---|
3427 | 5498 | #define SORT_CRITERIA_MASK 0x0001 |
---|
.. | .. |
---|
3435 | 5506 | #define IMMEDIATE_EVENT_MASK 0x0100 |
---|
3436 | 5507 | #define SUPPRESS_SSID_MASK 0x0200 |
---|
3437 | 5508 | #define ENABLE_NET_OFFLOAD_MASK 0x0400 |
---|
3438 | | -/* report found/lost events for SSID and BSSID networks seperately */ |
---|
| 5509 | +/** report found/lost events for SSID and BSSID networks seperately */ |
---|
3439 | 5510 | #define REPORT_SEPERATELY_MASK 0x0800 |
---|
3440 | 5511 | |
---|
3441 | 5512 | #define PFN_VERSION 2 |
---|
3442 | | -#define PFN_SCANRESULT_VERSION 1 |
---|
3443 | | -#define MAX_PFN_LIST_COUNT 16 |
---|
3444 | 5513 | |
---|
3445 | 5514 | #define PFN_COMPLETE 1 |
---|
3446 | 5515 | #define PFN_INCOMPLETE 0 |
---|
.. | .. |
---|
3452 | 5521 | |
---|
3453 | 5522 | #define PFN_PARTIAL_SCAN_BIT 0 |
---|
3454 | 5523 | #define PFN_PARTIAL_SCAN_MASK 1 |
---|
| 5524 | + |
---|
3455 | 5525 | #define PFN_SWC_RSSI_WINDOW_MAX 8 |
---|
3456 | 5526 | #define PFN_SWC_MAX_NUM_APS 16 |
---|
3457 | 5527 | #define PFN_HOTLIST_MAX_NUM_APS 64 |
---|
3458 | 5528 | |
---|
3459 | | -#define MAX_EPNO_HIDDEN_SSID 8 |
---|
3460 | | -#define MAX_WHITELIST_SSID 2 |
---|
| 5529 | +#define MAX_EPNO_HIDDEN_SSID 8 |
---|
| 5530 | +#define MAX_WHITELIST_SSID 2 |
---|
3461 | 5531 | |
---|
3462 | | -/* PFN network info structure */ |
---|
3463 | | -typedef struct wl_pfn_subnet_info { |
---|
| 5532 | +/* Version 1 and 2 for various scan results structures defined below */ |
---|
| 5533 | +#define PFN_SCANRESULTS_VERSION_V1 1 |
---|
| 5534 | +#define PFN_SCANRESULTS_VERSION_V2 2 |
---|
| 5535 | + |
---|
| 5536 | +/** PFN network info structure */ |
---|
| 5537 | +typedef struct wl_pfn_subnet_info_v1 { |
---|
3464 | 5538 | struct ether_addr BSSID; |
---|
3465 | | - uint8 channel; /* channel number only */ |
---|
| 5539 | + uint8 channel; /**< channel number only */ |
---|
3466 | 5540 | uint8 SSID_len; |
---|
3467 | 5541 | uint8 SSID[32]; |
---|
3468 | | -} wl_pfn_subnet_info_t; |
---|
| 5542 | +} wl_pfn_subnet_info_v1_t; |
---|
3469 | 5543 | |
---|
3470 | | -typedef struct wl_pfn_net_info { |
---|
3471 | | - wl_pfn_subnet_info_t pfnsubnet; |
---|
3472 | | - int16 RSSI; /* receive signal strength (in dBm) */ |
---|
3473 | | - uint16 timestamp; /* age in seconds */ |
---|
3474 | | -} wl_pfn_net_info_t; |
---|
| 5544 | +typedef struct wl_pfn_subnet_info_v2 { |
---|
| 5545 | + struct ether_addr BSSID; |
---|
| 5546 | + uint8 channel; /**< channel number only */ |
---|
| 5547 | + uint8 SSID_len; |
---|
| 5548 | + union { |
---|
| 5549 | + uint8 SSID[32]; |
---|
| 5550 | + uint16 index; |
---|
| 5551 | + } u; |
---|
| 5552 | +} wl_pfn_subnet_info_v2_t; |
---|
3475 | 5553 | |
---|
3476 | | -typedef struct wl_pfn_lnet_info { |
---|
3477 | | - wl_pfn_subnet_info_t pfnsubnet; /* BSSID + channel + SSID len + SSID */ |
---|
3478 | | - uint16 flags; /* partial scan, etc */ |
---|
3479 | | - int16 RSSI; /* receive signal strength (in dBm) */ |
---|
3480 | | - uint32 timestamp; /* age in miliseconds */ |
---|
3481 | | - uint16 rtt0; /* estimated distance to this AP in centimeters */ |
---|
3482 | | - uint16 rtt1; /* standard deviation of the distance to this AP in centimeters */ |
---|
3483 | | -} wl_pfn_lnet_info_t; |
---|
| 5554 | +typedef struct wl_pfn_net_info_v1 { |
---|
| 5555 | + wl_pfn_subnet_info_v1_t pfnsubnet; |
---|
| 5556 | + int16 RSSI; /**< receive signal strength (in dBm) */ |
---|
| 5557 | + uint16 timestamp; /**< age in seconds */ |
---|
| 5558 | +} wl_pfn_net_info_v1_t; |
---|
3484 | 5559 | |
---|
3485 | | -typedef struct wl_pfn_lscanresults { |
---|
| 5560 | +typedef struct wl_pfn_net_info_v2 { |
---|
| 5561 | + wl_pfn_subnet_info_v2_t pfnsubnet; |
---|
| 5562 | + int16 RSSI; /**< receive signal strength (in dBm) */ |
---|
| 5563 | + uint16 timestamp; /**< age in seconds */ |
---|
| 5564 | +} wl_pfn_net_info_v2_t; |
---|
| 5565 | + |
---|
| 5566 | +/* Version 1 and 2 for various lbest scan results structures below */ |
---|
| 5567 | +#define PFN_LBEST_SCAN_RESULT_VERSION_V1 1 |
---|
| 5568 | +#define PFN_LBEST_SCAN_RESULT_VERSION_V2 2 |
---|
| 5569 | + |
---|
| 5570 | +#define MAX_CHBKT_PER_RESULT 4 |
---|
| 5571 | + |
---|
| 5572 | +typedef struct wl_pfn_lnet_info_v1 { |
---|
| 5573 | + wl_pfn_subnet_info_v1_t pfnsubnet; /**< BSSID + channel + SSID len + SSID */ |
---|
| 5574 | + uint16 flags; /**< partial scan, etc */ |
---|
| 5575 | + int16 RSSI; /**< receive signal strength (in dBm) */ |
---|
| 5576 | + uint32 timestamp; /**< age in miliseconds */ |
---|
| 5577 | + uint16 rtt0; /**< estimated distance to this AP in centimeters */ |
---|
| 5578 | + uint16 rtt1; /**< standard deviation of the distance to this AP in centimeters */ |
---|
| 5579 | +} wl_pfn_lnet_info_v1_t; |
---|
| 5580 | + |
---|
| 5581 | +typedef struct wl_pfn_lnet_info_v2 { |
---|
| 5582 | + wl_pfn_subnet_info_v2_t pfnsubnet; /**< BSSID + channel + SSID len + SSID */ |
---|
| 5583 | + uint16 flags; /**< partial scan, etc */ |
---|
| 5584 | + int16 RSSI; /**< receive signal strength (in dBm) */ |
---|
| 5585 | + uint32 timestamp; /**< age in miliseconds */ |
---|
| 5586 | + uint16 rtt0; /**< estimated distance to this AP in centimeters */ |
---|
| 5587 | + uint16 rtt1; /**< standard deviation of the distance to this AP in centimeters */ |
---|
| 5588 | +} wl_pfn_lnet_info_v2_t; |
---|
| 5589 | + |
---|
| 5590 | +typedef struct wl_pfn_lscanresults_v1 { |
---|
3486 | 5591 | uint32 version; |
---|
3487 | 5592 | uint32 status; |
---|
3488 | 5593 | uint32 count; |
---|
3489 | | - wl_pfn_lnet_info_t netinfo[1]; |
---|
3490 | | -} wl_pfn_lscanresults_t; |
---|
| 5594 | + wl_pfn_lnet_info_v1_t netinfo[1]; |
---|
| 5595 | +} wl_pfn_lscanresults_v1_t; |
---|
3491 | 5596 | |
---|
3492 | | -/* this is used to report on 1-* pfn scan results */ |
---|
3493 | | -typedef struct wl_pfn_scanresults { |
---|
| 5597 | +typedef struct wl_pfn_lscanresults_v2 { |
---|
| 5598 | + uint32 version; |
---|
| 5599 | + uint16 status; |
---|
| 5600 | + uint16 count; |
---|
| 5601 | + uint32 scan_ch_buckets[MAX_CHBKT_PER_RESULT]; |
---|
| 5602 | + wl_pfn_lnet_info_v2_t netinfo[1]; |
---|
| 5603 | +} wl_pfn_lscanresults_v2_t; |
---|
| 5604 | + |
---|
| 5605 | +/**this is used to report on 1-* pfn scan results */ |
---|
| 5606 | +typedef struct wl_pfn_scanresults_v1 { |
---|
3494 | 5607 | uint32 version; |
---|
3495 | 5608 | uint32 status; |
---|
3496 | 5609 | uint32 count; |
---|
3497 | | - wl_pfn_net_info_t netinfo[1]; |
---|
3498 | | -} wl_pfn_scanresults_t; |
---|
| 5610 | + wl_pfn_net_info_v1_t netinfo[1]; |
---|
| 5611 | +} wl_pfn_scanresults_v1_t; |
---|
| 5612 | + |
---|
| 5613 | +typedef struct wl_pfn_scanresults_v2 { |
---|
| 5614 | + uint32 version; |
---|
| 5615 | + uint32 status; |
---|
| 5616 | + uint32 count; |
---|
| 5617 | + uint32 scan_ch_bucket; |
---|
| 5618 | + wl_pfn_net_info_v2_t netinfo[1]; |
---|
| 5619 | +} wl_pfn_scanresults_v2_t; |
---|
3499 | 5620 | |
---|
3500 | 5621 | typedef struct wl_pfn_significant_net { |
---|
3501 | 5622 | uint16 flags; |
---|
.. | .. |
---|
3504 | 5625 | int8 rssi[PFN_SWC_RSSI_WINDOW_MAX]; |
---|
3505 | 5626 | } wl_pfn_significant_net_t; |
---|
3506 | 5627 | |
---|
| 5628 | +#define PFN_SWC_SCANRESULT_VERSION 1 |
---|
3507 | 5629 | |
---|
3508 | 5630 | typedef struct wl_pfn_swc_results { |
---|
3509 | 5631 | uint32 version; |
---|
3510 | | - uint32 pkt_count; |
---|
3511 | | - uint32 total_count; |
---|
3512 | | - wl_pfn_significant_net_t list[1]; |
---|
| 5632 | + uint32 pkt_count; /**< No. of results in current frame */ |
---|
| 5633 | + uint32 total_count; /**< Total expected results */ |
---|
| 5634 | + wl_pfn_significant_net_t list[]; |
---|
3513 | 5635 | } wl_pfn_swc_results_t; |
---|
| 5636 | +typedef struct wl_pfn_net_info_bssid { |
---|
| 5637 | + struct ether_addr BSSID; |
---|
| 5638 | + uint8 channel; /**< channel number only */ |
---|
| 5639 | + int8 RSSI; /**< receive signal strength (in dBm) */ |
---|
| 5640 | + uint16 flags; /**< (e.g. partial scan, off channel) */ |
---|
| 5641 | + uint16 timestamp; /**< age in seconds */ |
---|
| 5642 | +} wl_pfn_net_info_bssid_t; |
---|
3514 | 5643 | |
---|
3515 | | -/* used to report exactly one scan result */ |
---|
3516 | | -/* plus reports detailed scan info in bss_info */ |
---|
3517 | | -typedef struct wl_pfn_scanresult { |
---|
| 5644 | +typedef struct wl_pfn_scanhist_bssid { |
---|
3518 | 5645 | uint32 version; |
---|
3519 | 5646 | uint32 status; |
---|
3520 | 5647 | uint32 count; |
---|
3521 | | - wl_pfn_net_info_t netinfo; |
---|
3522 | | - wl_bss_info_t bss_info; |
---|
3523 | | -} wl_pfn_scanresult_t; |
---|
| 5648 | + wl_pfn_net_info_bssid_t netinfo[1]; |
---|
| 5649 | +} wl_pfn_scanhist_bssid_t; |
---|
3524 | 5650 | |
---|
3525 | | -/* PFN data structure */ |
---|
| 5651 | +/* Version 1 and 2 for various single scan result */ |
---|
| 5652 | +#define PFN_SCANRESULT_VERSION_V1 1 |
---|
| 5653 | +#define PFN_SCANRESULT_VERSION_V2 2 |
---|
| 5654 | + |
---|
| 5655 | +/* used to report exactly one scan result */ |
---|
| 5656 | +/* plus reports detailed scan info in bss_info */ |
---|
| 5657 | +typedef struct wl_pfn_scanresult_v1 { |
---|
| 5658 | + uint32 version; |
---|
| 5659 | + uint32 status; |
---|
| 5660 | + uint32 count; |
---|
| 5661 | + wl_pfn_net_info_v1_t netinfo; |
---|
| 5662 | + wl_bss_info_v109_t bss_info; |
---|
| 5663 | +} wl_pfn_scanresult_v1_t; |
---|
| 5664 | + |
---|
| 5665 | +typedef struct wl_pfn_scanresult_v2 { |
---|
| 5666 | + uint32 version; |
---|
| 5667 | + uint32 status; |
---|
| 5668 | + uint32 count; |
---|
| 5669 | + wl_pfn_net_info_v2_t netinfo; |
---|
| 5670 | + wl_bss_info_v109_t bss_info; |
---|
| 5671 | +} wl_pfn_scanresult_v2_t; |
---|
| 5672 | + |
---|
| 5673 | +typedef struct wl_pfn_scanresult_v2_1 { |
---|
| 5674 | + uint32 version; |
---|
| 5675 | + uint32 status; |
---|
| 5676 | + uint32 count; |
---|
| 5677 | + wl_pfn_net_info_v2_t netinfo; |
---|
| 5678 | + uint8 bss_info[]; /* var length wl_bss_info_X structures */ |
---|
| 5679 | +} wl_pfn_scanresult_v2_1_t; |
---|
| 5680 | + |
---|
| 5681 | +/**PFN data structure */ |
---|
3526 | 5682 | typedef struct wl_pfn_param { |
---|
3527 | | - int32 version; /* PNO parameters version */ |
---|
3528 | | - int32 scan_freq; /* Scan frequency */ |
---|
3529 | | - int32 lost_network_timeout; /* Timeout in sec. to declare |
---|
| 5683 | + int32 version; /**< PNO parameters version */ |
---|
| 5684 | + int32 scan_freq; /**< Scan frequency */ |
---|
| 5685 | + int32 lost_network_timeout; /**< Timeout in sec. to declare |
---|
3530 | 5686 | * discovered network as lost |
---|
3531 | 5687 | */ |
---|
3532 | | - int16 flags; /* Bit field to control features |
---|
| 5688 | + int16 flags; /**< Bit field to control features |
---|
3533 | 5689 | * of PFN such as sort criteria auto |
---|
3534 | 5690 | * enable switch and background scan |
---|
3535 | 5691 | */ |
---|
3536 | | - int16 rssi_margin; /* Margin to avoid jitter for choosing a |
---|
| 5692 | + int16 rssi_margin; /**< Margin to avoid jitter for choosing a |
---|
3537 | 5693 | * PFN based on RSSI sort criteria |
---|
3538 | 5694 | */ |
---|
3539 | | - uint8 bestn; /* number of best networks in each scan */ |
---|
3540 | | - uint8 mscan; /* number of scans recorded */ |
---|
3541 | | - uint8 repeat; /* Minimum number of scan intervals |
---|
| 5695 | + uint8 bestn; /**< number of best networks in each scan */ |
---|
| 5696 | + uint8 mscan; /**< number of scans recorded */ |
---|
| 5697 | + uint8 repeat; /**< Minimum number of scan intervals |
---|
3542 | 5698 | *before scan frequency changes in adaptive scan |
---|
3543 | 5699 | */ |
---|
3544 | | - uint8 exp; /* Exponent of 2 for maximum scan interval */ |
---|
3545 | | - int32 slow_freq; /* slow scan period */ |
---|
| 5700 | + uint8 exp; /**< Exponent of 2 for maximum scan interval */ |
---|
| 5701 | + int32 slow_freq; /**< slow scan period */ |
---|
3546 | 5702 | } wl_pfn_param_t; |
---|
3547 | 5703 | |
---|
3548 | 5704 | typedef struct wl_pfn_bssid { |
---|
.. | .. |
---|
3550 | 5706 | /* Bit4: suppress_lost, Bit3: suppress_found */ |
---|
3551 | 5707 | uint16 flags; |
---|
3552 | 5708 | } wl_pfn_bssid_t; |
---|
3553 | | - |
---|
3554 | 5709 | typedef struct wl_pfn_significant_bssid { |
---|
3555 | 5710 | struct ether_addr macaddr; |
---|
3556 | 5711 | int8 rssi_low_threshold; |
---|
.. | .. |
---|
3558 | 5713 | } wl_pfn_significant_bssid_t; |
---|
3559 | 5714 | #define WL_PFN_SUPPRESSFOUND_MASK 0x08 |
---|
3560 | 5715 | #define WL_PFN_SUPPRESSLOST_MASK 0x10 |
---|
| 5716 | +#define WL_PFN_SSID_IMPRECISE_MATCH 0x80 |
---|
| 5717 | +#define WL_PFN_SSID_SAME_NETWORK 0x10000 |
---|
| 5718 | +#define WL_PFN_SUPPRESS_AGING_MASK 0x20000 |
---|
| 5719 | +#define WL_PFN_FLUSH_ALL_SSIDS 0x40000 |
---|
| 5720 | + |
---|
| 5721 | +#define WL_PFN_IOVAR_FLAG_MASK 0xFFFF00FF |
---|
3561 | 5722 | #define WL_PFN_RSSI_MASK 0xff00 |
---|
3562 | 5723 | #define WL_PFN_RSSI_SHIFT 8 |
---|
3563 | 5724 | |
---|
.. | .. |
---|
3568 | 5729 | uint32 flags; |
---|
3569 | 5730 | } wl_pfn_cfg_t; |
---|
3570 | 5731 | |
---|
3571 | | -#define CH_BUCKET_REPORT_REGULAR 0 |
---|
3572 | | -#define CH_BUCKET_REPORT_FULL_RESULT 2 |
---|
3573 | | -#define CH_BUCKET_GSCAN 4 |
---|
| 5732 | +#define WL_PFN_SSID_CFG_VERSION 1 |
---|
| 5733 | +#define WL_PFN_SSID_CFG_CLEAR 0x1 |
---|
3574 | 5734 | |
---|
| 5735 | +typedef struct wl_pfn_ssid_params { |
---|
| 5736 | + int8 min5G_rssi; /* minimum 5GHz RSSI for a BSSID to be considered */ |
---|
| 5737 | + int8 min2G_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered */ |
---|
| 5738 | + int16 init_score_max; /* The maximum score that a network can have before bonuses */ |
---|
| 5739 | + |
---|
| 5740 | + int16 cur_bssid_bonus; /* Add to current bssid */ |
---|
| 5741 | + int16 same_ssid_bonus; /* score bonus for all networks with the same network flag */ |
---|
| 5742 | + int16 secure_bonus; /* score bonus for networks that are not open */ |
---|
| 5743 | + int16 band_5g_bonus; |
---|
| 5744 | +} wl_pfn_ssid_params_t; |
---|
| 5745 | + |
---|
| 5746 | +typedef struct wl_ssid_ext_params { |
---|
| 5747 | + int8 min5G_rssi; /* minimum 5GHz RSSI for a BSSID to be considered */ |
---|
| 5748 | + int8 min2G_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered */ |
---|
| 5749 | + int16 init_score_max; /* The maximum score that a network can have before bonuses */ |
---|
| 5750 | + int16 cur_bssid_bonus; /* Add to current bssid */ |
---|
| 5751 | + int16 same_ssid_bonus; /* score bonus for all networks with the same network flag */ |
---|
| 5752 | + int16 secure_bonus; /* score bonus for networks that are not open */ |
---|
| 5753 | + int16 band_5g_bonus; |
---|
| 5754 | +} wl_ssid_ext_params_t; |
---|
| 5755 | + |
---|
| 5756 | +typedef struct wl_pfn_ssid_cfg { |
---|
| 5757 | + uint16 version; |
---|
| 5758 | + uint16 flags; |
---|
| 5759 | + wl_ssid_ext_params_t params; |
---|
| 5760 | +} wl_pfn_ssid_cfg_t; |
---|
| 5761 | + |
---|
| 5762 | +#define CH_BUCKET_REPORT_NONE 0 |
---|
| 5763 | +#define CH_BUCKET_REPORT_SCAN_COMPLETE_ONLY 1 |
---|
| 5764 | +#define CH_BUCKET_REPORT_FULL_RESULT 2 |
---|
| 5765 | +#define CH_BUCKET_REPORT_SCAN_COMPLETE (CH_BUCKET_REPORT_SCAN_COMPLETE_ONLY | \ |
---|
| 5766 | + CH_BUCKET_REPORT_FULL_RESULT) |
---|
| 5767 | +#define CH_BUCKET_REPORT_REGULAR 0 |
---|
| 5768 | +#define CH_BUCKET_GSCAN 4 |
---|
3575 | 5769 | |
---|
3576 | 5770 | typedef struct wl_pfn_gscan_ch_bucket_cfg { |
---|
3577 | 5771 | uint8 bucket_end_index; |
---|
.. | .. |
---|
3582 | 5776 | uint16 max_freq_multiple; |
---|
3583 | 5777 | } wl_pfn_gscan_ch_bucket_cfg_t; |
---|
3584 | 5778 | |
---|
3585 | | -#define GSCAN_SEND_ALL_RESULTS_MASK (1 << 0) |
---|
3586 | | -#define GSCAN_CFG_FLAGS_ONLY_MASK (1 << 7) |
---|
3587 | | -#define WL_GSCAN_CFG_VERSION 2 |
---|
| 5779 | +typedef struct wl_pfn_capabilities { |
---|
| 5780 | + uint16 max_mscan; |
---|
| 5781 | + uint16 max_bestn; |
---|
| 5782 | + uint16 max_swc_bssid; |
---|
| 5783 | + uint16 max_hotlist_bssid; |
---|
| 5784 | +} wl_pfn_capabilities_t; |
---|
| 5785 | + |
---|
| 5786 | +#define GSCAN_SEND_ALL_RESULTS_MASK (1 << 0) |
---|
| 5787 | +#define GSCAN_ALL_BUCKETS_IN_FIRST_SCAN_MASK (1 << 3) |
---|
| 5788 | +#define GSCAN_CFG_FLAGS_ONLY_MASK (1 << 7) |
---|
| 5789 | +#define WL_GSCAN_CFG_VERSION 1 |
---|
3588 | 5790 | typedef struct wl_pfn_gscan_cfg { |
---|
3589 | 5791 | uint16 version; |
---|
3590 | | - /* BIT0 1 = send probes/beacons to HOST |
---|
| 5792 | + /** |
---|
| 5793 | + * BIT0 1 = send probes/beacons to HOST |
---|
3591 | 5794 | * BIT1 Reserved |
---|
3592 | 5795 | * BIT2 Reserved |
---|
3593 | 5796 | * Add any future flags here |
---|
3594 | 5797 | * BIT7 1 = no other useful cfg sent |
---|
3595 | 5798 | */ |
---|
3596 | | - uint8 flags; |
---|
3597 | | - /* Buffer filled threshold in % to generate an event */ |
---|
| 5799 | + uint8 flags; |
---|
| 5800 | + /** Buffer filled threshold in % to generate an event */ |
---|
3598 | 5801 | uint8 buffer_threshold; |
---|
3599 | | - /* No. of BSSIDs with "change" to generate an evt |
---|
| 5802 | + /** |
---|
| 5803 | + * No. of BSSIDs with "change" to generate an evt |
---|
3600 | 5804 | * change - crosses rssi threshold/lost |
---|
3601 | 5805 | */ |
---|
3602 | 5806 | uint8 swc_nbssid_threshold; |
---|
.. | .. |
---|
3613 | 5817 | #define WL_PFN_REPORT_BSSIDNET 2 |
---|
3614 | 5818 | |
---|
3615 | 5819 | #define WL_PFN_CFG_FLAGS_PROHIBITED 0x00000001 /* Accept and use prohibited channels */ |
---|
3616 | | -#define WL_PFN_CFG_FLAGS_RESERVED 0xfffffffe /* Remaining reserved for future use */ |
---|
3617 | | -#define WL_PFN_SSID_A_BAND_TRIG 0x20 |
---|
3618 | | -#define WL_PFN_SSID_BG_BAND_TRIG 0x40 |
---|
| 5820 | +#define WL_PFN_CFG_FLAGS_RESERVED 0xfffffffe /**< Remaining reserved for future use */ |
---|
| 5821 | + |
---|
3619 | 5822 | typedef struct wl_pfn { |
---|
3620 | | - wlc_ssid_t ssid; /* ssid name and its length */ |
---|
3621 | | - int32 flags; /* bit2: hidden */ |
---|
3622 | | - int32 infra; /* BSS Vs IBSS */ |
---|
3623 | | - int32 auth; /* Open Vs Closed */ |
---|
3624 | | - int32 wpa_auth; /* WPA type */ |
---|
3625 | | - int32 wsec; /* wsec value */ |
---|
| 5823 | + wlc_ssid_t ssid; /**< ssid name and its length */ |
---|
| 5824 | + int32 flags; /**< bit2: hidden */ |
---|
| 5825 | + int32 infra; /**< BSS Vs IBSS */ |
---|
| 5826 | + int32 auth; /**< Open Vs Closed */ |
---|
| 5827 | + int32 wpa_auth; /**< WPA type */ |
---|
| 5828 | + int32 wsec; /**< wsec value */ |
---|
| 5829 | + wsec_pmk_t psk; /**< Password */ |
---|
3626 | 5830 | } wl_pfn_t; |
---|
3627 | 5831 | |
---|
3628 | 5832 | typedef struct wl_pfn_list { |
---|
.. | .. |
---|
3632 | 5836 | wl_pfn_t pfn[1]; |
---|
3633 | 5837 | } wl_pfn_list_t; |
---|
3634 | 5838 | |
---|
3635 | | -#define PFN_SSID_EXT_VERSION 2 |
---|
| 5839 | +#define PFN_SSID_EXT_VERSION 1 |
---|
3636 | 5840 | |
---|
3637 | 5841 | typedef struct wl_pfn_ext { |
---|
3638 | 5842 | uint8 flags; |
---|
.. | .. |
---|
3642 | 5846 | uint8 ssid_len; |
---|
3643 | 5847 | uint8 pad; |
---|
3644 | 5848 | } wl_pfn_ext_t; |
---|
3645 | | - |
---|
3646 | 5849 | typedef struct wl_pfn_ext_list { |
---|
3647 | 5850 | uint16 version; |
---|
3648 | 5851 | uint16 count; |
---|
.. | .. |
---|
3657 | 5860 | /* channel number */ |
---|
3658 | 5861 | uint16 channel; |
---|
3659 | 5862 | /* Assume idx in order of cfg */ |
---|
3660 | | - uint16 index; |
---|
3661 | | - struct ether_addr bssid; |
---|
| 5863 | + uint32 index; |
---|
3662 | 5864 | } wl_pfn_result_ssid_crc32_t; |
---|
3663 | 5865 | |
---|
3664 | 5866 | typedef struct wl_pfn_ssid_ext_result { |
---|
.. | .. |
---|
3671 | 5873 | #define PFN_EXT_AUTH_CODE_PSK 2 /* WPA_PSK or WPA2PSK */ |
---|
3672 | 5874 | #define PFN_EXT_AUTH_CODE_EAPOL 4 /* any EAPOL */ |
---|
3673 | 5875 | |
---|
3674 | | -#define WL_PFN_MAC_OUI_ONLY_MASK 1 |
---|
3675 | | -#define WL_PFN_SET_MAC_UNASSOC_MASK 2 |
---|
3676 | | -/* To configure pfn_macaddr */ |
---|
3677 | | -typedef struct wl_pfn_macaddr_cfg { |
---|
3678 | | - uint8 version; |
---|
3679 | | - uint8 flags; |
---|
3680 | | - struct ether_addr macaddr; |
---|
3681 | | -} wl_pfn_macaddr_cfg_t; |
---|
3682 | | -#define WL_PFN_MACADDR_CFG_VER 1 |
---|
3683 | | -typedef BWL_PRE_PACKED_STRUCT struct pfn_olmsg_params_t { |
---|
3684 | | - wlc_ssid_t ssid; |
---|
3685 | | - uint32 cipher_type; |
---|
3686 | | - uint32 auth_type; |
---|
3687 | | - uint8 channels[4]; |
---|
3688 | | -} BWL_POST_PACKED_STRUCT pfn_olmsg_params; |
---|
3689 | | - |
---|
3690 | 5876 | #define WL_PFN_HIDDEN_BIT 2 |
---|
3691 | 5877 | #define WL_PFN_HIDDEN_MASK 0x4 |
---|
3692 | 5878 | |
---|
3693 | 5879 | #ifndef BESTN_MAX |
---|
3694 | | -#define BESTN_MAX 3 |
---|
3695 | | -#endif |
---|
| 5880 | +#define BESTN_MAX 10 |
---|
| 5881 | +#endif // endif |
---|
3696 | 5882 | |
---|
3697 | 5883 | #ifndef MSCAN_MAX |
---|
3698 | 5884 | #define MSCAN_MAX 90 |
---|
3699 | | -#endif |
---|
| 5885 | +#endif // endif |
---|
3700 | 5886 | |
---|
| 5887 | +/* Dynamic scan configuration for motion profiles */ |
---|
| 5888 | + |
---|
| 5889 | +#define WL_PFN_MPF_VERSION 1 |
---|
| 5890 | + |
---|
| 5891 | +/* Valid group IDs, may be expanded in the future */ |
---|
| 5892 | +#define WL_PFN_MPF_GROUP_SSID 0 |
---|
| 5893 | +#define WL_PFN_MPF_GROUP_BSSID 1 |
---|
| 5894 | +#define WL_PFN_MPF_MAX_GROUPS 2 |
---|
| 5895 | + |
---|
| 5896 | +/* Max number of MPF states supported in this time */ |
---|
| 5897 | +#define WL_PFN_MPF_STATES_MAX 4 |
---|
| 5898 | + |
---|
| 5899 | +/* Flags for the mpf-specific stuff */ |
---|
| 5900 | +#define WL_PFN_MPF_ADAPT_ON_BIT 0 |
---|
| 5901 | +#define WL_PFN_MPF_ADAPTSCAN_BIT 1 |
---|
| 5902 | + |
---|
| 5903 | +#define WL_PFN_MPF_ADAPT_ON_MASK 0x0001 |
---|
| 5904 | +#define WL_PFN_MPF_ADAPTSCAN_MASK 0x0006 |
---|
| 5905 | + |
---|
| 5906 | +/* Per-state timing values */ |
---|
| 5907 | +typedef struct wl_pfn_mpf_state_params { |
---|
| 5908 | + int32 scan_freq; /* Scan frequency (secs) */ |
---|
| 5909 | + int32 lost_network_timeout; /* Timeout to declare net lost (secs) */ |
---|
| 5910 | + int16 flags; /* Space for flags: ADAPT etc */ |
---|
| 5911 | + uint8 exp; /* Exponent of 2 for max interval for SMART/STRICT_ADAPT */ |
---|
| 5912 | + uint8 repeat; /* Number of scans before changing adaptation level */ |
---|
| 5913 | + int32 slow_freq; /* Slow scan period for SLOW_ADAPT */ |
---|
| 5914 | +} wl_pfn_mpf_state_params_t; |
---|
| 5915 | + |
---|
| 5916 | +typedef struct wl_pfn_mpf_param { |
---|
| 5917 | + uint16 version; /* Structure version */ |
---|
| 5918 | + uint16 groupid; /* Group ID: 0 (SSID), 1 (BSSID), other: reserved */ |
---|
| 5919 | + wl_pfn_mpf_state_params_t state[WL_PFN_MPF_STATES_MAX]; |
---|
| 5920 | +} wl_pfn_mpf_param_t; |
---|
| 5921 | + |
---|
| 5922 | +/* Structure for setting pfn_override iovar */ |
---|
| 5923 | +typedef struct wl_pfn_override_param { |
---|
| 5924 | + uint16 version; /* Structure version */ |
---|
| 5925 | + uint16 start_offset; /* Seconds from now to apply new params */ |
---|
| 5926 | + uint16 duration; /* Seconds to keep new params applied */ |
---|
| 5927 | + uint16 reserved; |
---|
| 5928 | + wl_pfn_mpf_state_params_t override; |
---|
| 5929 | +} wl_pfn_override_param_t; |
---|
| 5930 | +#define WL_PFN_OVERRIDE_VERSION 1 |
---|
| 5931 | + |
---|
| 5932 | +/* |
---|
| 5933 | + * Definitions for base MPF configuration |
---|
| 5934 | + */ |
---|
| 5935 | + |
---|
| 5936 | +#define WL_MPF_VERSION 1 |
---|
| 5937 | +#define WL_MPF_MAX_BITS 3 |
---|
| 5938 | +#define WL_MPF_MAX_STATES (1 << WL_MPF_MAX_BITS) |
---|
| 5939 | + |
---|
| 5940 | +#define WL_MPF_STATE_NAME_MAX 12 |
---|
| 5941 | + |
---|
| 5942 | +typedef struct wl_mpf_val { |
---|
| 5943 | + uint16 val; /* Value of GPIO bits */ |
---|
| 5944 | + uint16 state; /* State identifier */ |
---|
| 5945 | + char name[WL_MPF_STATE_NAME_MAX]; /* Optional name */ |
---|
| 5946 | +} wl_mpf_val_t; |
---|
| 5947 | + |
---|
| 5948 | +typedef struct wl_mpf_map { |
---|
| 5949 | + uint16 version; |
---|
| 5950 | + uint16 type; |
---|
| 5951 | + uint16 mask; /* Which GPIO bits to use */ |
---|
| 5952 | + uint8 count; /* Count of state/value mappings */ |
---|
| 5953 | + uint8 PAD; |
---|
| 5954 | + wl_mpf_val_t vals[WL_MPF_MAX_STATES]; |
---|
| 5955 | +} wl_mpf_map_t; |
---|
| 5956 | + |
---|
| 5957 | +#define WL_MPF_STATE_AUTO (0xFFFF) /* (uint16)-1) */ |
---|
| 5958 | + |
---|
| 5959 | +typedef struct wl_mpf_state { |
---|
| 5960 | + uint16 version; |
---|
| 5961 | + uint16 type; |
---|
| 5962 | + uint16 state; /* Get/Set */ |
---|
| 5963 | + uint8 force; /* 0 - auto (HW) state, 1 - forced state */ |
---|
| 5964 | + char name[WL_MPF_STATE_NAME_MAX]; /* Get/Set: Optional/actual name */ |
---|
| 5965 | + uint8 PAD; |
---|
| 5966 | +} wl_mpf_state_t; |
---|
3701 | 5967 | /* |
---|
3702 | 5968 | * WLFCTS definition |
---|
3703 | 5969 | */ |
---|
.. | .. |
---|
3711 | 5977 | uint8 tx_cnt; |
---|
3712 | 5978 | } wl_txstatus_additional_info_t; |
---|
3713 | 5979 | |
---|
3714 | | -/* Service discovery */ |
---|
| 5980 | +/** Service discovery */ |
---|
3715 | 5981 | typedef struct { |
---|
3716 | | - uint8 transaction_id; /* Transaction id */ |
---|
3717 | | - uint8 protocol; /* Service protocol type */ |
---|
3718 | | - uint16 query_len; /* Length of query */ |
---|
3719 | | - uint16 response_len; /* Length of response */ |
---|
3720 | | - uint8 qrbuf[1]; |
---|
| 5982 | + uint8 transaction_id; /**< Transaction id */ |
---|
| 5983 | + uint8 protocol; /**< Service protocol type */ |
---|
| 5984 | + uint16 query_len; /**< Length of query */ |
---|
| 5985 | + uint16 response_len; /**< Length of response */ |
---|
| 5986 | + uint8 qrbuf[]; |
---|
3721 | 5987 | } wl_p2po_qr_t; |
---|
3722 | 5988 | |
---|
3723 | 5989 | typedef struct { |
---|
3724 | | - uint16 period; /* extended listen period */ |
---|
3725 | | - uint16 interval; /* extended listen interval */ |
---|
| 5990 | + uint16 period; /**< extended listen period */ |
---|
| 5991 | + uint16 interval; /**< extended listen interval */ |
---|
| 5992 | + uint16 count; /* count to repeat */ |
---|
| 5993 | + uint16 pad; /* pad for 32bit align */ |
---|
3726 | 5994 | } wl_p2po_listen_t; |
---|
3727 | 5995 | |
---|
3728 | | -/* GAS state machine tunable parameters. Structure field values of 0 means use the default. */ |
---|
| 5996 | +/** GAS state machine tunable parameters. Structure field values of 0 means use the default. */ |
---|
3729 | 5997 | typedef struct wl_gas_config { |
---|
3730 | | - uint16 max_retransmit; /* Max # of firmware/driver retransmits on no Ack |
---|
| 5998 | + uint16 max_retransmit; /**< Max # of firmware/driver retransmits on no Ack |
---|
3731 | 5999 | * from peer (on top of the ucode retries). |
---|
3732 | 6000 | */ |
---|
3733 | | - uint16 response_timeout; /* Max time to wait for a GAS-level response |
---|
| 6001 | + uint16 response_timeout; /**< Max time to wait for a GAS-level response |
---|
3734 | 6002 | * after sending a packet. |
---|
3735 | 6003 | */ |
---|
3736 | | - uint16 max_comeback_delay; /* Max GAS response comeback delay. |
---|
| 6004 | + uint16 max_comeback_delay; /**< Max GAS response comeback delay. |
---|
3737 | 6005 | * Exceeding this fails the GAS exchange. |
---|
3738 | 6006 | */ |
---|
3739 | | - uint16 max_retries; /* Max # of GAS state machine retries on failure |
---|
| 6007 | + uint16 max_retries; /**< Max # of GAS state machine retries on failure |
---|
3740 | 6008 | * of a GAS frame exchange. |
---|
3741 | 6009 | */ |
---|
3742 | 6010 | } wl_gas_config_t; |
---|
3743 | 6011 | |
---|
3744 | | -/* P2P Find Offload parameters */ |
---|
3745 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_p2po_find_config { |
---|
3746 | | - uint16 version; /* Version of this struct */ |
---|
3747 | | - uint16 length; /* sizeof(wl_p2po_find_config_t) */ |
---|
3748 | | - int32 search_home_time; /* P2P search state home time when concurrent |
---|
| 6012 | +/** P2P Find Offload parameters */ |
---|
| 6013 | +typedef struct wl_p2po_find_config { |
---|
| 6014 | + uint16 version; /**< Version of this struct */ |
---|
| 6015 | + uint16 length; /**< sizeof(wl_p2po_find_config_t) */ |
---|
| 6016 | + int32 search_home_time; /**< P2P search state home time when concurrent |
---|
3749 | 6017 | * connection exists. -1 for default. |
---|
3750 | 6018 | */ |
---|
3751 | 6019 | uint8 num_social_channels; |
---|
3752 | | - /* Number of social channels up to WL_P2P_SOCIAL_CHANNELS_MAX. |
---|
| 6020 | + /**< Number of social channels up to WL_P2P_SOCIAL_CHANNELS_MAX. |
---|
3753 | 6021 | * 0 means use default social channels. |
---|
3754 | 6022 | */ |
---|
3755 | 6023 | uint8 flags; |
---|
3756 | | - uint16 social_channels[1]; /* Variable length array of social channels */ |
---|
3757 | | -} BWL_POST_PACKED_STRUCT wl_p2po_find_config_t; |
---|
3758 | | -#define WL_P2PO_FIND_CONFIG_VERSION 2 /* value for version field */ |
---|
| 6024 | + uint16 social_channels[1]; /**< Variable length array of social channels */ |
---|
| 6025 | +} wl_p2po_find_config_t; |
---|
| 6026 | +#define WL_P2PO_FIND_CONFIG_VERSION 2 /**< value for version field */ |
---|
3759 | 6027 | |
---|
3760 | | -/* wl_p2po_find_config_t flags */ |
---|
3761 | | -#define P2PO_FIND_FLAG_SCAN_ALL_APS 0x01 /* Whether to scan for all APs in the p2po_find |
---|
| 6028 | +/** wl_p2po_find_config_t flags */ |
---|
| 6029 | +#define P2PO_FIND_FLAG_SCAN_ALL_APS 0x01 /**< Whether to scan for all APs in the p2po_find |
---|
3762 | 6030 | * periodic scans of all channels. |
---|
3763 | 6031 | * 0 means scan for only P2P devices. |
---|
3764 | 6032 | * 1 means scan for P2P devices plus non-P2P APs. |
---|
3765 | 6033 | */ |
---|
3766 | 6034 | |
---|
3767 | | - |
---|
3768 | | -/* For adding a WFDS service to seek */ |
---|
3769 | | -typedef BWL_PRE_PACKED_STRUCT struct { |
---|
3770 | | - uint32 seek_hdl; /* unique id chosen by host */ |
---|
3771 | | - uint8 addr[6]; /* Seek service from a specific device with this |
---|
| 6035 | +/** For adding a WFDS service to seek */ |
---|
| 6036 | +typedef struct { |
---|
| 6037 | + uint32 seek_hdl; /**< unique id chosen by host */ |
---|
| 6038 | + uint8 addr[6]; /**< Seek service from a specific device with this |
---|
3772 | 6039 | * MAC address, all 1's for any device. |
---|
3773 | 6040 | */ |
---|
3774 | 6041 | uint8 service_hash[P2P_WFDS_HASH_LEN]; |
---|
3775 | 6042 | uint8 service_name_len; |
---|
3776 | 6043 | uint8 service_name[MAX_WFDS_SEEK_SVC_NAME_LEN]; |
---|
3777 | | - /* Service name to seek, not null terminated */ |
---|
| 6044 | + /**< Service name to seek, not null terminated */ |
---|
3778 | 6045 | uint8 service_info_req_len; |
---|
3779 | | - uint8 service_info_req[1]; /* Service info request, not null terminated. |
---|
| 6046 | + uint8 service_info_req[1]; /**< Service info request, not null terminated. |
---|
3780 | 6047 | * Variable length specified by service_info_req_len. |
---|
3781 | 6048 | * Maximum length is MAX_WFDS_SEEK_SVC_INFO_LEN. |
---|
3782 | 6049 | */ |
---|
3783 | | -} BWL_POST_PACKED_STRUCT wl_p2po_wfds_seek_add_t; |
---|
| 6050 | +} wl_p2po_wfds_seek_add_t; |
---|
3784 | 6051 | |
---|
3785 | | -/* For deleting a WFDS service to seek */ |
---|
| 6052 | +/** For deleting a WFDS service to seek */ |
---|
| 6053 | +typedef struct { |
---|
| 6054 | + uint32 seek_hdl; /**< delete service specified by id */ |
---|
| 6055 | +} wl_p2po_wfds_seek_del_t; |
---|
| 6056 | + |
---|
| 6057 | +/** For adding a WFDS service to advertise */ |
---|
| 6058 | +#include <packed_section_start.h> |
---|
3786 | 6059 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
3787 | | - uint32 seek_hdl; /* delete service specified by id */ |
---|
3788 | | -} BWL_POST_PACKED_STRUCT wl_p2po_wfds_seek_del_t; |
---|
3789 | | - |
---|
3790 | | - |
---|
3791 | | -/* For adding a WFDS service to advertise */ |
---|
3792 | | -typedef BWL_PRE_PACKED_STRUCT struct { |
---|
3793 | | - uint32 advertise_hdl; /* unique id chosen by host */ |
---|
| 6060 | + uint32 advertise_hdl; /**< unique id chosen by host */ |
---|
3794 | 6061 | uint8 service_hash[P2P_WFDS_HASH_LEN]; |
---|
3795 | 6062 | uint32 advertisement_id; |
---|
3796 | 6063 | uint16 service_config_method; |
---|
3797 | 6064 | uint8 service_name_len; |
---|
3798 | 6065 | uint8 service_name[MAX_WFDS_SVC_NAME_LEN]; |
---|
3799 | | - /* Service name , not null terminated */ |
---|
| 6066 | + /**< Service name , not null terminated */ |
---|
3800 | 6067 | uint8 service_status; |
---|
3801 | 6068 | uint16 service_info_len; |
---|
3802 | | - uint8 service_info[1]; /* Service info, not null terminated. |
---|
| 6069 | + uint8 service_info[1]; /**< Service info, not null terminated. |
---|
3803 | 6070 | * Variable length specified by service_info_len. |
---|
3804 | 6071 | * Maximum length is MAX_WFDS_ADV_SVC_INFO_LEN. |
---|
3805 | 6072 | */ |
---|
3806 | 6073 | } BWL_POST_PACKED_STRUCT wl_p2po_wfds_advertise_add_t; |
---|
| 6074 | +#include <packed_section_end.h> |
---|
3807 | 6075 | |
---|
3808 | | -/* For deleting a WFDS service to advertise */ |
---|
3809 | | -typedef BWL_PRE_PACKED_STRUCT struct { |
---|
3810 | | - uint32 advertise_hdl; /* delete service specified by hdl */ |
---|
3811 | | -} BWL_POST_PACKED_STRUCT wl_p2po_wfds_advertise_del_t; |
---|
| 6076 | +/** For deleting a WFDS service to advertise */ |
---|
| 6077 | +typedef struct { |
---|
| 6078 | + uint32 advertise_hdl; /**< delete service specified by hdl */ |
---|
| 6079 | +} wl_p2po_wfds_advertise_del_t; |
---|
3812 | 6080 | |
---|
3813 | | -/* P2P Offload discovery mode for the p2po_state iovar */ |
---|
| 6081 | +/** P2P Offload discovery mode for the p2po_state iovar */ |
---|
3814 | 6082 | typedef enum { |
---|
3815 | 6083 | WL_P2PO_DISC_STOP, |
---|
3816 | 6084 | WL_P2PO_DISC_LISTEN, |
---|
.. | .. |
---|
3821 | 6089 | |
---|
3822 | 6090 | #define ANQPO_MAX_QUERY_SIZE 256 |
---|
3823 | 6091 | typedef struct { |
---|
3824 | | - uint16 max_retransmit; /* ~0 use default, max retransmit on no ACK from peer */ |
---|
3825 | | - uint16 response_timeout; /* ~0 use default, msec to wait for resp after tx packet */ |
---|
3826 | | - uint16 max_comeback_delay; /* ~0 use default, max comeback delay in resp else fail */ |
---|
3827 | | - uint16 max_retries; /* ~0 use default, max retries on failure */ |
---|
3828 | | - uint16 query_len; /* length of ANQP query */ |
---|
3829 | | - uint8 query_data[1]; /* ANQP encoded query (max ANQPO_MAX_QUERY_SIZE) */ |
---|
| 6092 | + uint16 max_retransmit; /**< ~0 use default, max retransmit on no ACK from peer */ |
---|
| 6093 | + uint16 response_timeout; /**< ~0 use default, msec to wait for resp after tx packet */ |
---|
| 6094 | + uint16 max_comeback_delay; /**< ~0 use default, max comeback delay in resp else fail */ |
---|
| 6095 | + uint16 max_retries; /**< ~0 use default, max retries on failure */ |
---|
| 6096 | + uint16 query_len; /**< length of ANQP query */ |
---|
| 6097 | + uint8 query_data[1]; /**< ANQP encoded query (max ANQPO_MAX_QUERY_SIZE) */ |
---|
3830 | 6098 | } wl_anqpo_set_t; |
---|
3831 | 6099 | |
---|
| 6100 | +#define WL_ANQPO_FLAGS_BSSID_WILDCARD 0x0001 |
---|
| 6101 | +#define WL_ANQPO_PEER_LIST_VERSION_2 2 |
---|
3832 | 6102 | typedef struct { |
---|
3833 | | - uint16 channel; /* channel of the peer */ |
---|
3834 | | - struct ether_addr addr; /* addr of the peer */ |
---|
3835 | | -} wl_anqpo_peer_t; |
---|
| 6103 | + uint16 channel; /**< channel of the peer */ |
---|
| 6104 | + struct ether_addr addr; /**< addr of the peer */ |
---|
| 6105 | +} wl_anqpo_peer_v1_t; |
---|
| 6106 | +typedef struct { |
---|
| 6107 | + uint16 channel; /**< channel of the peer */ |
---|
| 6108 | + struct ether_addr addr; /**< addr of the peer */ |
---|
| 6109 | + uint32 flags; /**< 0x01-Peer is MBO Capable */ |
---|
| 6110 | +} wl_anqpo_peer_v2_t; |
---|
3836 | 6111 | |
---|
3837 | 6112 | #define ANQPO_MAX_PEER_LIST 64 |
---|
3838 | 6113 | typedef struct { |
---|
3839 | | - uint16 count; /* number of peers in list */ |
---|
3840 | | - wl_anqpo_peer_t peer[1]; /* max ANQPO_MAX_PEER_LIST */ |
---|
3841 | | -} wl_anqpo_peer_list_t; |
---|
| 6114 | + uint16 count; /**< number of peers in list */ |
---|
| 6115 | + wl_anqpo_peer_v1_t peer[1]; /**< max ANQPO_MAX_PEER_LIST */ |
---|
| 6116 | +} wl_anqpo_peer_list_v1_t; |
---|
| 6117 | + |
---|
| 6118 | +typedef struct { |
---|
| 6119 | + uint16 version; /**<VERSION */ |
---|
| 6120 | + uint16 length; /**< length of entire structure */ |
---|
| 6121 | + uint16 count; /**< number of peers in list */ |
---|
| 6122 | + wl_anqpo_peer_v2_t peer[1]; /**< max ANQPO_MAX_PEER_LIST */ |
---|
| 6123 | +} wl_anqpo_peer_list_v2_t; |
---|
| 6124 | + |
---|
| 6125 | +#ifndef WL_ANQPO_PEER_LIST_TYPEDEF_HAS_ALIAS |
---|
| 6126 | +typedef wl_anqpo_peer_list_v1_t wl_anqpo_peer_list_t; |
---|
| 6127 | +typedef wl_anqpo_peer_v1_t wl_anqpo_peer_t; |
---|
| 6128 | +#endif /* WL_ANQPO_PEER_LIST_TYPEDEF_HAS_ALIAS */ |
---|
3842 | 6129 | |
---|
3843 | 6130 | #define ANQPO_MAX_IGNORE_SSID 64 |
---|
3844 | 6131 | typedef struct { |
---|
3845 | | - bool is_clear; /* set to clear list (not used on GET) */ |
---|
3846 | | - uint16 count; /* number of SSID in list */ |
---|
3847 | | - wlc_ssid_t ssid[1]; /* max ANQPO_MAX_IGNORE_SSID */ |
---|
| 6132 | + uint8 is_clear; /**< set to clear list (not used on GET) */ |
---|
| 6133 | + uint8 PAD; |
---|
| 6134 | + uint16 count; /**< number of SSID in list */ |
---|
| 6135 | + wlc_ssid_t ssid[1]; /**< max ANQPO_MAX_IGNORE_SSID */ |
---|
3848 | 6136 | } wl_anqpo_ignore_ssid_list_t; |
---|
3849 | 6137 | |
---|
3850 | 6138 | #define ANQPO_MAX_IGNORE_BSSID 64 |
---|
3851 | 6139 | typedef struct { |
---|
3852 | | - bool is_clear; /* set to clear list (not used on GET) */ |
---|
3853 | | - uint16 count; /* number of addr in list */ |
---|
3854 | | - struct ether_addr bssid[1]; /* max ANQPO_MAX_IGNORE_BSSID */ |
---|
| 6140 | + uint8 is_clear; /**< set to clear list (not used on GET) */ |
---|
| 6141 | + uint8 PAD; |
---|
| 6142 | + uint16 count; /**< number of addr in list */ |
---|
| 6143 | + struct ether_addr bssid[]; /**< max ANQPO_MAX_IGNORE_BSSID */ |
---|
3855 | 6144 | } wl_anqpo_ignore_bssid_list_t; |
---|
3856 | 6145 | |
---|
3857 | | - |
---|
3858 | 6146 | struct toe_ol_stats_t { |
---|
3859 | | - /* Num of tx packets that don't need to be checksummed */ |
---|
| 6147 | + /** Num of tx packets that don't need to be checksummed */ |
---|
3860 | 6148 | uint32 tx_summed; |
---|
3861 | 6149 | |
---|
3862 | 6150 | /* Num of tx packets where checksum is filled by offload engine */ |
---|
.. | .. |
---|
3886 | 6174 | uint32 rx_icmp_errinj; |
---|
3887 | 6175 | }; |
---|
3888 | 6176 | |
---|
3889 | | -/* Arp offload statistic counts */ |
---|
| 6177 | +/** Arp offload statistic counts */ |
---|
3890 | 6178 | struct arp_ol_stats_t { |
---|
3891 | | - uint32 host_ip_entries; /* Host IP table addresses (more than one if multihomed) */ |
---|
3892 | | - uint32 host_ip_overflow; /* Host IP table additions skipped due to overflow */ |
---|
| 6179 | + uint32 host_ip_entries; /**< Host IP table addresses (more than one if multihomed) */ |
---|
| 6180 | + uint32 host_ip_overflow; /**< Host IP table additions skipped due to overflow */ |
---|
3893 | 6181 | |
---|
3894 | | - uint32 arp_table_entries; /* ARP table entries */ |
---|
3895 | | - uint32 arp_table_overflow; /* ARP table additions skipped due to overflow */ |
---|
| 6182 | + uint32 arp_table_entries; /**< ARP table entries */ |
---|
| 6183 | + uint32 arp_table_overflow; /**< ARP table additions skipped due to overflow */ |
---|
3896 | 6184 | |
---|
3897 | | - uint32 host_request; /* ARP requests from host */ |
---|
3898 | | - uint32 host_reply; /* ARP replies from host */ |
---|
3899 | | - uint32 host_service; /* ARP requests from host serviced by ARP Agent */ |
---|
| 6185 | + uint32 host_request; /**< ARP requests from host */ |
---|
| 6186 | + uint32 host_reply; /**< ARP replies from host */ |
---|
| 6187 | + uint32 host_service; /**< ARP requests from host serviced by ARP Agent */ |
---|
3900 | 6188 | |
---|
3901 | | - uint32 peer_request; /* ARP requests received from network */ |
---|
3902 | | - uint32 peer_request_drop; /* ARP requests from network that were dropped */ |
---|
3903 | | - uint32 peer_reply; /* ARP replies received from network */ |
---|
3904 | | - uint32 peer_reply_drop; /* ARP replies from network that were dropped */ |
---|
3905 | | - uint32 peer_service; /* ARP request from host serviced by ARP Agent */ |
---|
| 6189 | + uint32 peer_request; /**< ARP requests received from network */ |
---|
| 6190 | + uint32 peer_request_drop; /**< ARP requests from network that were dropped */ |
---|
| 6191 | + uint32 peer_reply; /**< ARP replies received from network */ |
---|
| 6192 | + uint32 peer_reply_drop; /**< ARP replies from network that were dropped */ |
---|
| 6193 | + uint32 peer_service; /**< ARP request from host serviced by ARP Agent */ |
---|
3906 | 6194 | }; |
---|
3907 | 6195 | |
---|
3908 | | -/* NS offload statistic counts */ |
---|
| 6196 | +/** NS offload statistic counts */ |
---|
3909 | 6197 | struct nd_ol_stats_t { |
---|
3910 | | - uint32 host_ip_entries; /* Host IP table addresses (more than one if multihomed) */ |
---|
3911 | | - uint32 host_ip_overflow; /* Host IP table additions skipped due to overflow */ |
---|
3912 | | - uint32 peer_request; /* NS requests received from network */ |
---|
3913 | | - uint32 peer_request_drop; /* NS requests from network that were dropped */ |
---|
3914 | | - uint32 peer_reply_drop; /* NA replies from network that were dropped */ |
---|
3915 | | - uint32 peer_service; /* NS request from host serviced by firmware */ |
---|
| 6198 | + uint32 host_ip_entries; /**< Host IP table addresses (more than one if multihomed) */ |
---|
| 6199 | + uint32 host_ip_overflow; /**< Host IP table additions skipped due to overflow */ |
---|
| 6200 | + uint32 peer_request; /**< NS requests received from network */ |
---|
| 6201 | + uint32 peer_request_drop; /**< NS requests from network that were dropped */ |
---|
| 6202 | + uint32 peer_reply_drop; /**< NA replies from network that were dropped */ |
---|
| 6203 | + uint32 peer_service; /**< NS request from host serviced by firmware */ |
---|
3916 | 6204 | }; |
---|
| 6205 | + |
---|
| 6206 | +/* |
---|
| 6207 | + * Neighbor Discovery Offloading |
---|
| 6208 | + */ |
---|
| 6209 | +enum { |
---|
| 6210 | + WL_ND_IPV6_ADDR_TYPE_UNICAST = 0, |
---|
| 6211 | + WL_ND_IPV6_ADDR_TYPE_ANYCAST |
---|
| 6212 | +}; |
---|
| 6213 | + |
---|
| 6214 | +typedef struct wl_nd_host_ip_addr { |
---|
| 6215 | + struct ipv6_addr ip_addr; /* host ip address */ |
---|
| 6216 | + uint8 type; /* type of address */ |
---|
| 6217 | + uint8 pad[3]; |
---|
| 6218 | +} wl_nd_host_ip_addr_t; |
---|
| 6219 | + |
---|
| 6220 | +typedef struct wl_nd_host_ip_list { |
---|
| 6221 | + uint32 count; |
---|
| 6222 | + wl_nd_host_ip_addr_t host_ip[1]; |
---|
| 6223 | +} wl_nd_host_ip_list_t; |
---|
| 6224 | + |
---|
| 6225 | +#define WL_ND_HOSTIP_IOV_VER 1 |
---|
| 6226 | + |
---|
| 6227 | +enum { |
---|
| 6228 | + WL_ND_HOSTIP_OP_VER = 0, /* get version */ |
---|
| 6229 | + WL_ND_HOSTIP_OP_ADD, /* add address */ |
---|
| 6230 | + WL_ND_HOSTIP_OP_DEL, /* delete specified address */ |
---|
| 6231 | + WL_ND_HOSTIP_OP_DEL_UC, /* delete all unicast address */ |
---|
| 6232 | + WL_ND_HOSTIP_OP_DEL_AC, /* delete all anycast address */ |
---|
| 6233 | + WL_ND_HOSTIP_OP_DEL_ALL, /* delete all addresses */ |
---|
| 6234 | + WL_ND_HOSTIP_OP_LIST, /* get list of host ip address */ |
---|
| 6235 | + WL_ND_HOSTIP_OP_MAX |
---|
| 6236 | +}; |
---|
| 6237 | + |
---|
| 6238 | +typedef struct wl_nd_hostip { |
---|
| 6239 | + uint16 version; /* version of iovar buf */ |
---|
| 6240 | + uint16 op_type; /* operation type */ |
---|
| 6241 | + uint32 length; /* length of entire structure */ |
---|
| 6242 | + union { |
---|
| 6243 | + wl_nd_host_ip_addr_t host_ip; /* set param for add */ |
---|
| 6244 | + uint16 version; /* get return for ver */ |
---|
| 6245 | + } u; |
---|
| 6246 | +} wl_nd_hostip_t; |
---|
| 6247 | + |
---|
| 6248 | +#define WL_ND_HOSTIP_FIXED_LEN OFFSETOF(wl_nd_hostip_t, u) |
---|
| 6249 | +#define WL_ND_HOSTIP_WITH_ADDR_LEN (WL_ND_HOSTIP_FIXED_LEN + sizeof(wl_nd_host_ip_addr_t)) |
---|
3917 | 6250 | |
---|
3918 | 6251 | /* |
---|
3919 | 6252 | * Keep-alive packet offloading. |
---|
3920 | 6253 | */ |
---|
3921 | 6254 | |
---|
3922 | | -/* NAT keep-alive packets format: specifies the re-transmission period, the packet |
---|
| 6255 | +/** |
---|
| 6256 | + * NAT keep-alive packets format: specifies the re-transmission period, the packet |
---|
3923 | 6257 | * length, and packet contents. |
---|
3924 | 6258 | */ |
---|
3925 | 6259 | typedef struct wl_keep_alive_pkt { |
---|
3926 | | - uint32 period_msec; /* Retransmission period (0 to disable packet re-transmits) */ |
---|
| 6260 | + uint32 period_msec; /** Retransmission period (0 to disable packet re-transmits) */ |
---|
3927 | 6261 | uint16 len_bytes; /* Size of packet to transmit (0 to disable packet re-transmits) */ |
---|
3928 | | - uint8 data[1]; /* Variable length packet to transmit. Contents should include |
---|
| 6262 | + uint8 data[1]; /** Variable length packet to transmit. Contents should include |
---|
3929 | 6263 | * entire ethernet packet (enet header, IP header, UDP header, |
---|
3930 | 6264 | * and UDP payload) in network byte order. |
---|
3931 | 6265 | */ |
---|
.. | .. |
---|
3933 | 6267 | |
---|
3934 | 6268 | #define WL_KEEP_ALIVE_FIXED_LEN OFFSETOF(wl_keep_alive_pkt_t, data) |
---|
3935 | 6269 | |
---|
| 6270 | +#define MAX_RSSI_COUNT 8 |
---|
| 6271 | +typedef struct rssi_struct { |
---|
| 6272 | + int8 val[MAX_RSSI_COUNT]; /**< rssi values in AFs */ |
---|
| 6273 | + int16 sum; /**< total rssi sum */ |
---|
| 6274 | + uint8 cnt; /**< number rssi samples */ |
---|
| 6275 | + uint8 idx; /**< next rssi location */ |
---|
| 6276 | +} rssi_struct_t; |
---|
| 6277 | + |
---|
| 6278 | +#ifdef WLDFSP |
---|
| 6279 | +#define DFSP_EVT_OFFSET OFFSETOF(dfsp_event_data_t, ie) |
---|
| 6280 | +#define DFSP_EVT_FLAGS_AP_ASSOC (1 << 0) |
---|
| 6281 | +#define DFSP_EVT_FLAGS_AP_BCNMON (1 << 1) |
---|
| 6282 | +#define DFSP_EVT_FLAGS_PROXY_BCSA (1 << 2) |
---|
| 6283 | +#define DFSP_EVT_FLAGS_PROXY_UCSA (1 << 3) |
---|
| 6284 | +#define DFSP_EVT_FLAGS_PROXY_PCSA (1 << 4) |
---|
| 6285 | + |
---|
| 6286 | +typedef struct dfsp_event_data { |
---|
| 6287 | + uint16 flags; /* indicate what triggers the event */ |
---|
| 6288 | + uint16 ie_len; |
---|
| 6289 | + uint8 ie[]; /* variable length */ |
---|
| 6290 | +} dfsp_event_data_t; |
---|
| 6291 | + |
---|
| 6292 | +/* Proxy Channel Switch Announcement is a collection of IEs */ |
---|
| 6293 | +typedef struct dfsp_pcsa { |
---|
| 6294 | + dot11_ext_csa_ie_t ecsa; |
---|
| 6295 | + dot11_mesh_csp_ie_t mcsp; |
---|
| 6296 | + dot11_wide_bw_chan_switch_ie_t wbcs; |
---|
| 6297 | +} dfsp_pcsa_t; |
---|
| 6298 | + |
---|
| 6299 | +/* DFS Proxy */ |
---|
| 6300 | +#define DFSP_CFG_VERSION 1 |
---|
| 6301 | +#define DFSP_FLAGS_ENAB 0x1 |
---|
| 6302 | +typedef struct dfsp_cfg { |
---|
| 6303 | + uint16 version; |
---|
| 6304 | + uint16 len; |
---|
| 6305 | + uint16 flags; /**< bit 1 to enable/disable the feature */ |
---|
| 6306 | + uint16 max_bcn_miss_dur; /**< maximum beacon miss duration before ceasing data tx */ |
---|
| 6307 | + uint8 mcsp_ttl; /**< remaining number of hops allowed for pcsa message */ |
---|
| 6308 | + uint8 bcsa_cnt; /**< repeat numbers of broadcast CSA */ |
---|
| 6309 | + chanspec_t mon_chan; /**< passive monitoring channel spec */ |
---|
| 6310 | + struct ether_addr mon_bssid; /**< broadcast means monitoring all */ |
---|
| 6311 | + uint16 max_bcn_miss_dur_af; /**< maximum beacon miss duration before ceasing AF tx */ |
---|
| 6312 | +} dfsp_cfg_t; |
---|
| 6313 | + |
---|
| 6314 | +#define DFSP_UCSA_VERSION 1 |
---|
| 6315 | +typedef struct dfsp_ucsa { |
---|
| 6316 | + uint16 version; |
---|
| 6317 | + uint16 len; |
---|
| 6318 | + struct ether_addr address; |
---|
| 6319 | + uint8 enable; |
---|
| 6320 | + uint8 retry_cnt; /**< just in case host needs to control the value */ |
---|
| 6321 | +} dfsp_ucsa_t; |
---|
| 6322 | + |
---|
| 6323 | +typedef struct dfsp_ucsa_tbl { |
---|
| 6324 | + uint8 tbl_num; |
---|
| 6325 | + uint8 tbl[]; |
---|
| 6326 | +} dfsp_ucsa_tbl_t; |
---|
| 6327 | + |
---|
| 6328 | +typedef struct dfsp_stats { |
---|
| 6329 | + uint32 dfsp_csainfra; |
---|
| 6330 | + uint32 dfsp_csabcnmon; |
---|
| 6331 | + uint32 dfsp_bcsarx; |
---|
| 6332 | + uint32 dfsp_ucsarx; |
---|
| 6333 | + uint32 dfsp_pcsarx; |
---|
| 6334 | + uint32 dfsp_bcsatx; |
---|
| 6335 | + uint32 dfsp_ucsatx; |
---|
| 6336 | + uint32 dfsp_pcsatx; |
---|
| 6337 | + uint32 dfsp_ucsatxfail; |
---|
| 6338 | + uint32 dfsp_evtnotif; |
---|
| 6339 | + uint32 dfsp_evtsuspect; |
---|
| 6340 | + uint32 dfsp_evtresume; |
---|
| 6341 | +} dfsp_stats_t; |
---|
| 6342 | +#endif /* WLDFSP */ |
---|
| 6343 | + |
---|
| 6344 | +/* |
---|
| 6345 | + * ptk_start: iovar to start 4-way handshake for secured ranging |
---|
| 6346 | +*/ |
---|
| 6347 | + |
---|
| 6348 | +/* ptk negotiation security type - determines negotiation parameters */ |
---|
| 6349 | +typedef enum { |
---|
| 6350 | + WL_PTK_START_SEC_TYPE_PMK = 1 |
---|
| 6351 | +} wl_ptk_start_sec_type_t; |
---|
| 6352 | + |
---|
| 6353 | +/* ptk negotiation role */ |
---|
| 6354 | +typedef enum { |
---|
| 6355 | + ROLE_NONE = 0x0, |
---|
| 6356 | + ROLE_AUTH = 0x1, |
---|
| 6357 | + ROLE_SUP = 0x2, |
---|
| 6358 | + ROLE_STATIC = 0x3, |
---|
| 6359 | + ROLE_INVALID = 0xff, |
---|
| 6360 | + WL_PTK_START_ROLE_NONE = ROLE_NONE, |
---|
| 6361 | + WL_PTK_START_ROLE_AUTH = ROLE_AUTH, |
---|
| 6362 | + WL_PTK_START_ROLE_SUP = ROLE_SUP, |
---|
| 6363 | + WL_PTK_START_ROLE_STATIC = ROLE_STATIC, |
---|
| 6364 | + WL_PTK_START_ROLE_INVALID = ROLE_INVALID |
---|
| 6365 | +} wl_ptk_start_role_t; |
---|
| 6366 | + |
---|
| 6367 | +typedef struct wl_ptk_start_tlv { |
---|
| 6368 | + uint16 id; |
---|
| 6369 | + uint16 len; |
---|
| 6370 | + uint8 data[1]; |
---|
| 6371 | +} wl_ptk_start_tlv_t; |
---|
| 6372 | + |
---|
| 6373 | +typedef enum { |
---|
| 6374 | + WL_PTK_START_TLV_PMK = 1 /* uint8[] */ |
---|
| 6375 | +} wl_ptk_start_tlv_type; |
---|
| 6376 | + |
---|
| 6377 | +typedef enum { |
---|
| 6378 | + WL_PTK_START_FLAG_NO_DATA_PROT = 1, /* data frame protection disabled */ |
---|
| 6379 | + WL_PTK_START_FLAG_GEN_FTM_TPK = 2 /* Generate FTM Toast/Seq Protection Key */ |
---|
| 6380 | +} wl_ptk_start_flags_t; |
---|
| 6381 | + |
---|
| 6382 | +typedef struct wl_ptk_start_iov { |
---|
| 6383 | + uint16 version; |
---|
| 6384 | + uint16 len; /* length of entire iov from version */ |
---|
| 6385 | + wl_ptk_start_flags_t flags; |
---|
| 6386 | + wl_ptk_start_sec_type_t sec_type; |
---|
| 6387 | + wl_ptk_start_role_t role; |
---|
| 6388 | + struct ether_addr peer_addr; |
---|
| 6389 | + uint16 pad; /* reserved/32 bit alignment */ |
---|
| 6390 | + wl_ptk_start_tlv_t tlvs[1]; |
---|
| 6391 | +} wl_ptk_start_iov_t; |
---|
3936 | 6392 | |
---|
3937 | 6393 | /* |
---|
3938 | 6394 | * Dongle pattern matching filter. |
---|
3939 | 6395 | */ |
---|
3940 | 6396 | |
---|
3941 | | -#define MAX_WAKE_PACKET_CACHE_BYTES 128 /* Maximum cached wake packet */ |
---|
| 6397 | +#define MAX_WAKE_PACKET_CACHE_BYTES 128 /**< Maximum cached wake packet */ |
---|
3942 | 6398 | |
---|
3943 | 6399 | #define MAX_WAKE_PACKET_BYTES (DOT11_A3_HDR_LEN + \ |
---|
3944 | 6400 | DOT11_QOS_LEN + \ |
---|
.. | .. |
---|
3946 | 6402 | ETHER_MAX_DATA) |
---|
3947 | 6403 | |
---|
3948 | 6404 | typedef struct pm_wake_packet { |
---|
3949 | | - uint32 status; /* Is the wake reason a packet (if all the other field's valid) */ |
---|
3950 | | - uint32 pattern_id; /* Pattern ID that matched */ |
---|
| 6405 | + uint32 status; /**< Is the wake reason a packet (if all the other field's valid) */ |
---|
| 6406 | + uint32 pattern_id; /**< Pattern ID that matched */ |
---|
3951 | 6407 | uint32 original_packet_size; |
---|
3952 | 6408 | uint32 saved_packet_size; |
---|
3953 | | - uchar packet[MAX_WAKE_PACKET_CACHE_BYTES]; |
---|
| 6409 | + uint8 packet[MAX_WAKE_PACKET_CACHE_BYTES]; |
---|
3954 | 6410 | } pm_wake_packet_t; |
---|
3955 | 6411 | |
---|
3956 | 6412 | /* Packet filter types. Currently, only pattern matching is supported. */ |
---|
3957 | 6413 | typedef enum wl_pkt_filter_type { |
---|
3958 | | - WL_PKT_FILTER_TYPE_PATTERN_MATCH=0, /* Pattern matching filter */ |
---|
3959 | | - WL_PKT_FILTER_TYPE_MAGIC_PATTERN_MATCH=1, /* Magic packet match */ |
---|
3960 | | - WL_PKT_FILTER_TYPE_PATTERN_LIST_MATCH=2, /* A pattern list (match all to match filter) */ |
---|
3961 | | - WL_PKT_FILTER_TYPE_ENCRYPTED_PATTERN_MATCH=3, /* SECURE WOWL magic / net pattern match */ |
---|
| 6414 | + WL_PKT_FILTER_TYPE_PATTERN_MATCH=0, /**< Pattern matching filter */ |
---|
| 6415 | + WL_PKT_FILTER_TYPE_MAGIC_PATTERN_MATCH=1, /**< Magic packet match */ |
---|
| 6416 | + WL_PKT_FILTER_TYPE_PATTERN_LIST_MATCH=2, /**< A pattern list (match all to match filter) */ |
---|
| 6417 | + WL_PKT_FILTER_TYPE_ENCRYPTED_PATTERN_MATCH=3, /**< SECURE WOWL magic / net pattern match */ |
---|
| 6418 | + WL_PKT_FILTER_TYPE_APF_MATCH=4, /* Android packet filter match */ |
---|
| 6419 | + WL_PKT_FILTER_TYPE_PATTERN_MATCH_TIMEOUT=5, /* Pattern matching filter with timeout event */ |
---|
| 6420 | + WL_PKT_FILTER_TYPE_IMMEDIATE_PATTERN_MATCH=6, /* Immediately pattern matching filter */ |
---|
| 6421 | + WL_PKT_FILTYER_TYPE_MAX = 7, /* Pkt filter type MAX */ |
---|
3962 | 6422 | } wl_pkt_filter_type_t; |
---|
3963 | 6423 | |
---|
3964 | 6424 | #define WL_PKT_FILTER_TYPE wl_pkt_filter_type_t |
---|
3965 | 6425 | |
---|
3966 | 6426 | /* String mapping for types that may be used by applications or debug */ |
---|
3967 | 6427 | #define WL_PKT_FILTER_TYPE_NAMES \ |
---|
3968 | | - { "PATTERN", WL_PKT_FILTER_TYPE_PATTERN_MATCH }, \ |
---|
3969 | | - { "MAGIC", WL_PKT_FILTER_TYPE_MAGIC_PATTERN_MATCH }, \ |
---|
3970 | | - { "PATLIST", WL_PKT_FILTER_TYPE_PATTERN_LIST_MATCH } |
---|
| 6428 | + { "PATTERN", WL_PKT_FILTER_TYPE_PATTERN_MATCH }, \ |
---|
| 6429 | + { "MAGIC", WL_PKT_FILTER_TYPE_MAGIC_PATTERN_MATCH }, \ |
---|
| 6430 | + { "PATLIST", WL_PKT_FILTER_TYPE_PATTERN_LIST_MATCH }, \ |
---|
| 6431 | + { "SECURE WOWL", WL_PKT_FILTER_TYPE_ENCRYPTED_PATTERN_MATCH }, \ |
---|
| 6432 | + { "APF", WL_PKT_FILTER_TYPE_APF_MATCH }, \ |
---|
| 6433 | + { "PATTERN TIMEOUT", WL_PKT_FILTER_TYPE_PATTERN_MATCH_TIMEOUT }, \ |
---|
| 6434 | + { "IMMEDIATE", WL_PKT_FILTER_TYPE_IMMEDIATE_PATTERN_MATCH } |
---|
3971 | 6435 | |
---|
3972 | | -/* Secured WOWL packet was encrypted, need decrypted before check filter match */ |
---|
| 6436 | +/** Secured WOWL packet was encrypted, need decrypted before check filter match */ |
---|
3973 | 6437 | typedef struct wl_pkt_decrypter { |
---|
3974 | 6438 | uint8* (*dec_cb)(void* dec_ctx, const void *sdu, int sending); |
---|
3975 | 6439 | void* dec_ctx; |
---|
3976 | 6440 | } wl_pkt_decrypter_t; |
---|
3977 | 6441 | |
---|
3978 | | -/* Pattern matching filter. Specifies an offset within received packets to |
---|
| 6442 | +/** |
---|
| 6443 | + * Pattern matching filter. Specifies an offset within received packets to |
---|
3979 | 6444 | * start matching, the pattern to match, the size of the pattern, and a bitmask |
---|
3980 | 6445 | * that indicates which bits within the pattern should be matched. |
---|
3981 | 6446 | */ |
---|
3982 | 6447 | typedef struct wl_pkt_filter_pattern { |
---|
3983 | | - uint32 offset; /* Offset within received packet to start pattern matching. |
---|
| 6448 | + uint32 offset; /**< Offset within received packet to start pattern matching. |
---|
3984 | 6449 | * Offset '0' is the first byte of the ethernet header. |
---|
3985 | 6450 | */ |
---|
3986 | | - uint32 size_bytes; /* Size of the pattern. Bitmask must be the same size. */ |
---|
3987 | | - uint8 mask_and_pattern[1]; /* Variable length mask and pattern data. mask starts |
---|
| 6451 | + uint32 size_bytes; /**< Size of the pattern. Bitmask must be the same size. */ |
---|
| 6452 | + uint8 mask_and_pattern[]; /**< Variable length mask and pattern data. mask starts |
---|
3988 | 6453 | * at offset 0. Pattern immediately follows mask. for |
---|
3989 | 6454 | * secured pattern, put the descrypter pointer to the |
---|
3990 | 6455 | * beginning, mask and pattern postponed correspondingly |
---|
3991 | 6456 | */ |
---|
3992 | 6457 | } wl_pkt_filter_pattern_t; |
---|
3993 | 6458 | |
---|
3994 | | -/* A pattern list is a numerically specified list of modified pattern structures. */ |
---|
| 6459 | +/** A pattern list is a numerically specified list of modified pattern structures. */ |
---|
3995 | 6460 | typedef struct wl_pkt_filter_pattern_listel { |
---|
3996 | | - uint16 rel_offs; /* Offset to begin match (relative to 'base' below) */ |
---|
3997 | | - uint16 base_offs; /* Base for offset (defined below) */ |
---|
3998 | | - uint16 size_bytes; /* Size of mask/pattern */ |
---|
3999 | | - uint16 match_flags; /* Addition flags controlling the match */ |
---|
4000 | | - uint8 mask_and_data[1]; /* Variable length mask followed by data, each size_bytes */ |
---|
| 6461 | + uint16 rel_offs; /**< Offset to begin match (relative to 'base' below) */ |
---|
| 6462 | + uint16 base_offs; /**< Base for offset (defined below) */ |
---|
| 6463 | + uint16 size_bytes; /**< Size of mask/pattern */ |
---|
| 6464 | + uint16 match_flags; /**< Addition flags controlling the match */ |
---|
| 6465 | + uint8 mask_and_data[]; /**< Variable length mask followed by data, each size_bytes */ |
---|
4001 | 6466 | } wl_pkt_filter_pattern_listel_t; |
---|
4002 | 6467 | |
---|
4003 | 6468 | typedef struct wl_pkt_filter_pattern_list { |
---|
4004 | | - uint8 list_cnt; /* Number of elements in the list */ |
---|
4005 | | - uint8 PAD1[1]; /* Reserved (possible version: reserved) */ |
---|
4006 | | - uint16 totsize; /* Total size of this pattern list (includes this struct) */ |
---|
4007 | | - wl_pkt_filter_pattern_listel_t patterns[1]; /* Variable number of list elements */ |
---|
| 6469 | + uint8 list_cnt; /**< Number of elements in the list */ |
---|
| 6470 | + uint8 PAD1[1]; /**< Reserved (possible version: reserved) */ |
---|
| 6471 | + uint16 totsize; /**< Total size of this pattern list (includes this struct) */ |
---|
| 6472 | + uint8 patterns[]; /**< Variable number of wl_pkt_filter_pattern_listel_t elements */ |
---|
4008 | 6473 | } wl_pkt_filter_pattern_list_t; |
---|
4009 | 6474 | |
---|
4010 | | -/* IOVAR "pkt_filter_add" parameter. Used to install packet filters. */ |
---|
| 6475 | +typedef struct wl_apf_program { |
---|
| 6476 | + uint16 version; |
---|
| 6477 | + uint16 instr_len; /* number of instruction blocks */ |
---|
| 6478 | + uint32 inst_ts; /* program installation timestamp */ |
---|
| 6479 | + uint8 instrs[]; /* variable length instructions */ |
---|
| 6480 | +} wl_apf_program_t; |
---|
| 6481 | + |
---|
| 6482 | +typedef struct wl_pkt_filter_pattern_timeout { |
---|
| 6483 | + uint32 offset; /* Offset within received packet to start pattern matching. |
---|
| 6484 | + * Offset '0' is the first byte of the ethernet header. |
---|
| 6485 | + */ |
---|
| 6486 | + uint32 size_bytes; /* Size of the pattern. Bitmask must be the same size. */ |
---|
| 6487 | + uint32 timeout; /* Timeout(seconds) */ |
---|
| 6488 | + uint8 mask_and_pattern[]; /* Variable length mask and pattern data. |
---|
| 6489 | + * mask starts at offset 0. Pattern |
---|
| 6490 | + * immediately follows mask. |
---|
| 6491 | + */ |
---|
| 6492 | +} wl_pkt_filter_pattern_timeout_t; |
---|
| 6493 | + |
---|
| 6494 | +/** IOVAR "pkt_filter_add" parameter. Used to install packet filters. */ |
---|
4011 | 6495 | typedef struct wl_pkt_filter { |
---|
4012 | | - uint32 id; /* Unique filter id, specified by app. */ |
---|
4013 | | - uint32 type; /* Filter type (WL_PKT_FILTER_TYPE_xxx). */ |
---|
4014 | | - uint32 negate_match; /* Negate the result of filter matches */ |
---|
| 6496 | + uint32 id; /**< Unique filter id, specified by app. */ |
---|
| 6497 | + uint32 type; /**< Filter type (WL_PKT_FILTER_TYPE_xxx). */ |
---|
| 6498 | + uint32 negate_match; /**< Negate the result of filter matches */ |
---|
4015 | 6499 | union { /* Filter definitions */ |
---|
4016 | | - wl_pkt_filter_pattern_t pattern; /* Pattern matching filter */ |
---|
4017 | | - wl_pkt_filter_pattern_list_t patlist; /* List of patterns to match */ |
---|
| 6500 | + wl_pkt_filter_pattern_t pattern; /**< Pattern matching filter */ |
---|
| 6501 | + wl_pkt_filter_pattern_list_t patlist; /**< List of patterns to match */ |
---|
| 6502 | + wl_apf_program_t apf_program; /* apf program */ |
---|
| 6503 | + wl_pkt_filter_pattern_timeout_t pattern_timeout; /* Pattern timeout event filter */ |
---|
4018 | 6504 | } u; |
---|
4019 | 6505 | } wl_pkt_filter_t; |
---|
4020 | 6506 | |
---|
4021 | | -/* IOVAR "tcp_keep_set" parameter. Used to install tcp keep_alive stuff. */ |
---|
| 6507 | +/** IOVAR "tcp_keep_set" parameter. Used to install tcp keep_alive stuff. */ |
---|
4022 | 6508 | typedef struct wl_tcp_keep_set { |
---|
4023 | 6509 | uint32 val1; |
---|
4024 | 6510 | uint32 val2; |
---|
.. | .. |
---|
4029 | 6515 | #define WL_PKT_FILTER_PATTERN_LIST_FIXED_LEN OFFSETOF(wl_pkt_filter_pattern_list_t, patterns) |
---|
4030 | 6516 | #define WL_PKT_FILTER_PATTERN_LISTEL_FIXED_LEN \ |
---|
4031 | 6517 | OFFSETOF(wl_pkt_filter_pattern_listel_t, mask_and_data) |
---|
| 6518 | +#define WL_PKT_FILTER_PATTERN_TIMEOUT_FIXED_LEN \ |
---|
| 6519 | + OFFSETOF(wl_pkt_filter_pattern_timeout_t, mask_and_pattern) |
---|
4032 | 6520 | |
---|
4033 | | -/* IOVAR "pkt_filter_enable" parameter. */ |
---|
| 6521 | +#define WL_APF_INTERNAL_VERSION 1 |
---|
| 6522 | +#define WL_APF_PROGRAM_MAX_SIZE (2 * 1024) |
---|
| 6523 | +#define WL_APF_PROGRAM_FIXED_LEN OFFSETOF(wl_apf_program_t, instrs) |
---|
| 6524 | +#define WL_APF_PROGRAM_LEN(apf_program) \ |
---|
| 6525 | + ((apf_program)->instr_len * sizeof((apf_program)->instrs[0])) |
---|
| 6526 | +#define WL_APF_PROGRAM_TOTAL_LEN(apf_program) \ |
---|
| 6527 | + (WL_APF_PROGRAM_FIXED_LEN + WL_APF_PROGRAM_LEN(apf_program)) |
---|
| 6528 | + |
---|
| 6529 | +/** IOVAR "pkt_filter_enable" parameter. */ |
---|
4034 | 6530 | typedef struct wl_pkt_filter_enable { |
---|
4035 | | - uint32 id; /* Unique filter id */ |
---|
4036 | | - uint32 enable; /* Enable/disable bool */ |
---|
| 6531 | + uint32 id; /**< Unique filter id */ |
---|
| 6532 | + uint32 enable; /**< Enable/disable bool */ |
---|
4037 | 6533 | } wl_pkt_filter_enable_t; |
---|
4038 | 6534 | |
---|
4039 | | -/* IOVAR "pkt_filter_list" parameter. Used to retrieve a list of installed filters. */ |
---|
| 6535 | +/** IOVAR "pkt_filter_list" parameter. Used to retrieve a list of installed filters. */ |
---|
4040 | 6536 | typedef struct wl_pkt_filter_list { |
---|
4041 | | - uint32 num; /* Number of installed packet filters */ |
---|
4042 | | - wl_pkt_filter_t filter[1]; /* Variable array of packet filters. */ |
---|
| 6537 | + uint32 num; /**< Number of installed packet filters */ |
---|
| 6538 | + uint8 filter[]; /**< Variable array of packet filters. */ |
---|
4043 | 6539 | } wl_pkt_filter_list_t; |
---|
4044 | 6540 | |
---|
4045 | 6541 | #define WL_PKT_FILTER_LIST_FIXED_LEN OFFSETOF(wl_pkt_filter_list_t, filter) |
---|
4046 | 6542 | |
---|
4047 | | -/* IOVAR "pkt_filter_stats" parameter. Used to retrieve debug statistics. */ |
---|
| 6543 | +/** IOVAR "pkt_filter_stats" parameter. Used to retrieve debug statistics. */ |
---|
4048 | 6544 | typedef struct wl_pkt_filter_stats { |
---|
4049 | | - uint32 num_pkts_matched; /* # filter matches for specified filter id */ |
---|
4050 | | - uint32 num_pkts_forwarded; /* # packets fwded from dongle to host for all filters */ |
---|
4051 | | - uint32 num_pkts_discarded; /* # packets discarded by dongle for all filters */ |
---|
| 6545 | + uint32 num_pkts_matched; /**< # filter matches for specified filter id */ |
---|
| 6546 | + uint32 num_pkts_forwarded; /**< # packets fwded from dongle to host for all filters */ |
---|
| 6547 | + uint32 num_pkts_discarded; /**< # packets discarded by dongle for all filters */ |
---|
4052 | 6548 | } wl_pkt_filter_stats_t; |
---|
4053 | 6549 | |
---|
4054 | | -/* IOVAR "pkt_filter_ports" parameter. Configure TCP/UDP port filters. */ |
---|
| 6550 | +/** IOVAR "pkt_filter_ports" parameter. Configure TCP/UDP port filters. */ |
---|
4055 | 6551 | typedef struct wl_pkt_filter_ports { |
---|
4056 | | - uint8 version; /* Be proper */ |
---|
4057 | | - uint8 reserved; /* Be really proper */ |
---|
4058 | | - uint16 count; /* Number of ports following */ |
---|
| 6552 | + uint8 version; /**< Be proper */ |
---|
| 6553 | + uint8 reserved; /**< Be really proper */ |
---|
| 6554 | + uint16 count; /**< Number of ports following */ |
---|
4059 | 6555 | /* End of fixed data */ |
---|
4060 | | - uint16 ports[1]; /* Placeholder for ports[<count>] */ |
---|
| 6556 | + uint16 ports[1]; /**< Placeholder for ports[<count>] */ |
---|
4061 | 6557 | } wl_pkt_filter_ports_t; |
---|
4062 | 6558 | |
---|
4063 | 6559 | #define WL_PKT_FILTER_PORTS_FIXED_LEN OFFSETOF(wl_pkt_filter_ports_t, ports) |
---|
4064 | 6560 | |
---|
4065 | 6561 | #define WL_PKT_FILTER_PORTS_VERSION 0 |
---|
4066 | | -#define WL_PKT_FILTER_PORTS_MAX 128 |
---|
| 6562 | +#if defined(WL_PKT_FLTR_EXT) && !defined(WL_PKT_FLTR_EXT_DISABLED) |
---|
| 6563 | +#define WL_PKT_FILTER_PORTS_MAX 256 |
---|
| 6564 | +#else |
---|
| 6565 | +#define WL_PKT_FILTER_PORTS_MAX 128 |
---|
| 6566 | +#endif /* WL_PKT_FLTR_EXT && !WL_PKT_FLTR_EXT_DISABLED */ |
---|
4067 | 6567 | |
---|
4068 | 6568 | #define RSN_REPLAY_LEN 8 |
---|
4069 | 6569 | typedef struct _gtkrefresh { |
---|
4070 | | - uchar KCK[RSN_KCK_LENGTH]; |
---|
4071 | | - uchar KEK[RSN_KEK_LENGTH]; |
---|
4072 | | - uchar ReplayCounter[RSN_REPLAY_LEN]; |
---|
| 6570 | + uint8 KCK[RSN_KCK_LENGTH]; |
---|
| 6571 | + uint8 KEK[RSN_KEK_LENGTH]; |
---|
| 6572 | + uint8 ReplayCounter[RSN_REPLAY_LEN]; |
---|
4073 | 6573 | } gtk_keyinfo_t, *pgtk_keyinfo_t; |
---|
4074 | 6574 | |
---|
4075 | | -/* Sequential Commands ioctl */ |
---|
| 6575 | +/** Sequential Commands ioctl */ |
---|
4076 | 6576 | typedef struct wl_seq_cmd_ioctl { |
---|
4077 | | - uint32 cmd; /* common ioctl definition */ |
---|
4078 | | - uint32 len; /* length of user buffer */ |
---|
| 6577 | + uint32 cmd; /**< common ioctl definition */ |
---|
| 6578 | + uint32 len; /**< length of user buffer */ |
---|
4079 | 6579 | } wl_seq_cmd_ioctl_t; |
---|
4080 | 6580 | |
---|
4081 | 6581 | #define WL_SEQ_CMD_ALIGN_BYTES 4 |
---|
4082 | 6582 | |
---|
4083 | | -/* These are the set of get IOCTLs that should be allowed when using |
---|
| 6583 | +/** |
---|
| 6584 | + * These are the set of get IOCTLs that should be allowed when using |
---|
4084 | 6585 | * IOCTL sequence commands. These are issued implicitly by wl.exe each time |
---|
4085 | 6586 | * it is invoked. We never want to buffer these, or else wl.exe will stop working. |
---|
4086 | 6587 | */ |
---|
.. | .. |
---|
4090 | 6591 | ((cmd) == WLC_GET_AP) || \ |
---|
4091 | 6592 | ((cmd) == WLC_GET_INSTANCE)) |
---|
4092 | 6593 | |
---|
| 6594 | +#define MAX_PKTENG_SWEEP_STEPS 40 |
---|
4093 | 6595 | typedef struct wl_pkteng { |
---|
4094 | 6596 | uint32 flags; |
---|
4095 | | - uint32 delay; /* Inter-packet delay */ |
---|
4096 | | - uint32 nframes; /* Number of frames */ |
---|
4097 | | - uint32 length; /* Packet length */ |
---|
4098 | | - uint8 seqno; /* Enable/disable sequence no. */ |
---|
4099 | | - struct ether_addr dest; /* Destination address */ |
---|
4100 | | - struct ether_addr src; /* Source address */ |
---|
| 6597 | + uint32 delay; /**< Inter-packet delay */ |
---|
| 6598 | + uint32 nframes; /**< Number of frames */ |
---|
| 6599 | + uint32 length; /**< Packet length */ |
---|
| 6600 | + uint8 seqno; /**< Enable/disable sequence no. */ |
---|
| 6601 | + struct ether_addr dest; /**< Destination address */ |
---|
| 6602 | + struct ether_addr src; /**< Source address */ |
---|
| 6603 | + uint8 sweep_steps; /**< Number of sweep power */ |
---|
| 6604 | + uint8 PAD[2]; |
---|
4101 | 6605 | } wl_pkteng_t; |
---|
4102 | 6606 | |
---|
4103 | | -typedef struct wl_pkteng_stats { |
---|
4104 | | - uint32 lostfrmcnt; /* RX PER test: no of frames lost (skip seqno) */ |
---|
4105 | | - int32 rssi; /* RSSI */ |
---|
4106 | | - int32 snr; /* signal to noise ratio */ |
---|
| 6607 | +/* IOVAR pkteng_sweep_counters response structure */ |
---|
| 6608 | +#define WL_PKTENG_SWEEP_COUNTERS_VERSION 1 |
---|
| 6609 | +typedef struct wl_pkteng_sweep_ctrs { |
---|
| 6610 | + uint16 version; /**< Version - 1 */ |
---|
| 6611 | + uint16 size; /**< Complete Size including sweep_counters */ |
---|
| 6612 | + uint16 sweep_steps; /**< Number of steps */ |
---|
| 6613 | + uint16 PAD; |
---|
| 6614 | + uint16 sweep_counter[]; /**< Array of frame counters */ |
---|
| 6615 | +} wl_pkteng_sweep_ctrs_t; |
---|
| 6616 | + |
---|
| 6617 | +/* IOVAR pkteng_rx_pkt response structure */ |
---|
| 6618 | +#define WL_PKTENG_RX_PKT_VERSION 1 |
---|
| 6619 | +typedef struct wl_pkteng_rx_pkt { |
---|
| 6620 | + uint16 version; /**< Version - 1 */ |
---|
| 6621 | + uint16 size; /**< Complete Size including the packet */ |
---|
| 6622 | + uint8 payload[]; /**< Packet payload */ |
---|
| 6623 | +} wl_pkteng_rx_pkt_t; |
---|
| 6624 | + |
---|
| 6625 | +#define WL_PKTENG_RU_FILL_VER_1 1u |
---|
| 6626 | +// struct for ru packet engine |
---|
| 6627 | +typedef struct wl_pkteng_ru_v1 { |
---|
| 6628 | + uint16 version; /* ver is 1 */ |
---|
| 6629 | + uint16 length; /* size of complete structure */ |
---|
| 6630 | + uint8 bw; /* bandwidth info */ |
---|
| 6631 | + uint8 ru_alloc_val; /* ru allocation index number */ |
---|
| 6632 | + uint8 mcs_val; /* mcs allocated value */ |
---|
| 6633 | + uint8 nss_val; /* num of spatial streams */ |
---|
| 6634 | + uint32 num_bytes; /* approx num of bytes to calculate other required params */ |
---|
| 6635 | + uint8 cp_ltf_val; /* GI and LTF symbol size */ |
---|
| 6636 | + uint8 he_ltf_symb; /* num of HE-LTF symbols */ |
---|
| 6637 | + uint8 stbc; /* STBC support */ |
---|
| 6638 | + uint8 coding_val; /* BCC/LDPC coding support */ |
---|
| 6639 | + uint8 pe_category; /* PE duration 0/8/16usecs */ |
---|
| 6640 | + uint8 dcm; /* dual carrier modulation */ |
---|
| 6641 | + uint8 mumimo_ltfmode; /* ltf mode */ |
---|
| 6642 | + uint8 trig_tx; /* form and transmit the trigger frame */ |
---|
| 6643 | + uint8 trig_type; /* type of trigger frame */ |
---|
| 6644 | + uint8 trig_period; /* trigger tx periodicity TBD */ |
---|
| 6645 | + uint8 nuserinfo; /* number of Userinfo fields */ |
---|
| 6646 | + struct ether_addr dest; /* destination address for un-associated mode */ |
---|
| 6647 | + uint8 ppdu_format; /* trigger frame format */ |
---|
| 6648 | +} wl_pkteng_ru_v1_t; |
---|
| 6649 | + |
---|
| 6650 | +#ifndef WL_PKTENG_RU_VER |
---|
| 6651 | +/* This is for the App; source picks it up from wlc_types.h */ |
---|
| 6652 | +typedef wl_pkteng_ru_v1_t wl_pkteng_ru_fill_t; |
---|
| 6653 | +#endif // endif |
---|
| 6654 | + |
---|
| 6655 | +typedef struct wl_trig_frame_info { |
---|
| 6656 | + /* Structure versioning and structure length params */ |
---|
| 6657 | + uint16 version; |
---|
| 6658 | + uint16 length; |
---|
| 6659 | + /* Below params are the fields related to trigger frame contents */ |
---|
| 6660 | + /* Common Info Params Figure 9-52d - 11ax Draft 1.1 */ |
---|
| 6661 | + uint16 lsig_len; |
---|
| 6662 | + uint16 trigger_type; |
---|
| 6663 | + uint16 cascade_indication; |
---|
| 6664 | + uint16 cs_req; |
---|
| 6665 | + uint16 bw; |
---|
| 6666 | + uint16 cp_ltf_type; |
---|
| 6667 | + uint16 mu_mimo_ltf_mode; |
---|
| 6668 | + uint16 num_he_ltf_syms; |
---|
| 6669 | + uint16 stbc; |
---|
| 6670 | + uint16 ldpc_extra_symb; |
---|
| 6671 | + uint16 ap_tx_pwr; |
---|
| 6672 | + uint16 afactor; |
---|
| 6673 | + uint16 pe_disambiguity; |
---|
| 6674 | + uint16 spatial_resuse; |
---|
| 6675 | + uint16 doppler; |
---|
| 6676 | + uint16 he_siga_rsvd; |
---|
| 6677 | + uint16 cmn_info_rsvd; |
---|
| 6678 | + /* User Info Params Figure 9-52e - 11ax Draft 1.1 */ |
---|
| 6679 | + uint16 aid12; |
---|
| 6680 | + uint16 ru_alloc; |
---|
| 6681 | + uint16 coding_type; |
---|
| 6682 | + uint16 mcs; |
---|
| 6683 | + uint16 dcm; |
---|
| 6684 | + uint16 ss_alloc; |
---|
| 6685 | + uint16 tgt_rssi; |
---|
| 6686 | + uint16 usr_info_rsvd; |
---|
| 6687 | +} wl_trig_frame_info_t; |
---|
| 6688 | + |
---|
| 6689 | +/* wl pkteng_stats related definitions */ |
---|
| 6690 | +#define WL_PKTENG_STATS_V1 (1) |
---|
| 6691 | +#define WL_PKTENG_STATS_V2 (2) |
---|
| 6692 | + |
---|
| 6693 | +typedef struct wl_pkteng_stats_v1 { |
---|
| 6694 | + uint32 lostfrmcnt; /**< RX PER test: no of frames lost (skip seqno) */ |
---|
| 6695 | + int32 rssi; /**< RSSI */ |
---|
| 6696 | + int32 snr; /**< signal to noise ratio */ |
---|
4107 | 6697 | uint16 rxpktcnt[NUM_80211_RATES+1]; |
---|
4108 | | - uint8 rssi_qdb; /* qdB portion of the computed rssi */ |
---|
4109 | | -} wl_pkteng_stats_t; |
---|
| 6698 | + uint8 rssi_qdb; /**< qdB portion of the computed rssi */ |
---|
| 6699 | + uint8 version; |
---|
| 6700 | +} wl_pkteng_stats_v1_t; |
---|
| 6701 | + |
---|
| 6702 | +typedef struct wl_pkteng_stats_v2 { |
---|
| 6703 | + uint32 lostfrmcnt; /**< RX PER test: no of frames lost (skip seqno) */ |
---|
| 6704 | + int32 rssi; /**< RSSI */ |
---|
| 6705 | + int32 snr; /**< signal to noise ratio */ |
---|
| 6706 | + uint16 rxpktcnt[NUM_80211_RATES+1]; |
---|
| 6707 | + uint8 rssi_qdb; /**< qdB portion of the computed rssi */ |
---|
| 6708 | + uint8 version; |
---|
| 6709 | + uint16 length; |
---|
| 6710 | + uint16 pad; |
---|
| 6711 | + int32 rssi_per_core[WL_RSSI_ANT_MAX]; |
---|
| 6712 | + int32 rssi_per_core_qdb[WL_RSSI_ANT_MAX]; |
---|
| 6713 | +} wl_pkteng_stats_v2_t; |
---|
| 6714 | + |
---|
| 6715 | +#ifndef WL_PKTENG_STATS_TYPEDEF_HAS_ALIAS |
---|
| 6716 | +typedef wl_pkteng_stats_v1_t wl_pkteng_stats_t; |
---|
| 6717 | +#endif /* WL_PKTENG_STATS_TYPEDEF_HAS_ALIAS */ |
---|
4110 | 6718 | |
---|
4111 | 6719 | typedef struct wl_txcal_params { |
---|
4112 | 6720 | wl_pkteng_t pkteng; |
---|
4113 | 6721 | uint8 gidx_start; |
---|
4114 | 6722 | int8 gidx_step; |
---|
4115 | 6723 | uint8 gidx_stop; |
---|
| 6724 | + uint8 PAD; |
---|
4116 | 6725 | } wl_txcal_params_t; |
---|
4117 | 6726 | |
---|
| 6727 | +typedef struct wl_txcal_gainidx { |
---|
| 6728 | + uint8 num_actv_cores; |
---|
| 6729 | + uint8 gidx_start_percore[WL_STA_ANT_MAX]; |
---|
| 6730 | + uint8 gidx_stop_percore[WL_STA_ANT_MAX]; |
---|
| 6731 | + uint8 PAD[3]; |
---|
| 6732 | +} wl_txcal_gainidx_t; |
---|
| 6733 | + |
---|
| 6734 | +typedef struct wl_txcal_params_v2 { |
---|
| 6735 | + wl_pkteng_t pkteng; |
---|
| 6736 | + int8 gidx_step; |
---|
| 6737 | + uint8 pwr_start[WL_STA_ANT_MAX]; |
---|
| 6738 | + uint8 pwr_stop[WL_STA_ANT_MAX]; |
---|
| 6739 | + uint8 init_start_idx; |
---|
| 6740 | + uint8 gidx_start_percore[WL_STA_ANT_MAX]; |
---|
| 6741 | + uint8 gidx_stop_percore[WL_STA_ANT_MAX]; |
---|
| 6742 | + uint16 version; |
---|
| 6743 | +} wl_txcal_params_v2_t; |
---|
| 6744 | + |
---|
| 6745 | +typedef wl_txcal_params_t wl_txcal_params_v1_t; |
---|
| 6746 | + |
---|
| 6747 | +typedef struct wl_rssilog_params { |
---|
| 6748 | + uint8 enable; |
---|
| 6749 | + uint8 rssi_threshold; |
---|
| 6750 | + uint8 time_threshold; |
---|
| 6751 | + uint8 pad; |
---|
| 6752 | +} wl_rssilog_params_t; |
---|
| 6753 | + |
---|
| 6754 | +typedef struct wl_sslpnphy_papd_debug_data { |
---|
| 6755 | + uint8 psat_pwr; |
---|
| 6756 | + uint8 psat_indx; |
---|
| 6757 | + uint8 final_idx; |
---|
| 6758 | + uint8 start_idx; |
---|
| 6759 | + int32 min_phase; |
---|
| 6760 | + int32 voltage; |
---|
| 6761 | + int8 temperature; |
---|
| 6762 | + uint8 PAD[3]; |
---|
| 6763 | +} wl_sslpnphy_papd_debug_data_t; |
---|
| 6764 | +typedef struct wl_sslpnphy_debug_data { |
---|
| 6765 | + int16 papdcompRe [64]; |
---|
| 6766 | + int16 papdcompIm [64]; |
---|
| 6767 | +} wl_sslpnphy_debug_data_t; |
---|
| 6768 | +typedef struct wl_sslpnphy_spbdump_data { |
---|
| 6769 | + uint16 tbl_length; |
---|
| 6770 | + int16 spbreal[256]; |
---|
| 6771 | + int16 spbimg[256]; |
---|
| 6772 | +} wl_sslpnphy_spbdump_data_t; |
---|
| 6773 | +typedef struct wl_sslpnphy_percal_debug_data { |
---|
| 6774 | + uint32 cur_idx; |
---|
| 6775 | + uint32 tx_drift; |
---|
| 6776 | + uint8 prev_cal_idx; |
---|
| 6777 | + uint8 PAD[3]; |
---|
| 6778 | + uint32 percal_ctr; |
---|
| 6779 | + int32 nxt_cal_idx; |
---|
| 6780 | + uint32 force_1idxcal; |
---|
| 6781 | + uint32 onedxacl_req; |
---|
| 6782 | + int32 last_cal_volt; |
---|
| 6783 | + int8 last_cal_temp; |
---|
| 6784 | + uint8 PAD[3]; |
---|
| 6785 | + uint32 vbat_ripple; |
---|
| 6786 | + uint32 exit_route; |
---|
| 6787 | + int32 volt_winner; |
---|
| 6788 | +} wl_sslpnphy_percal_debug_data_t; |
---|
4118 | 6789 | |
---|
4119 | 6790 | typedef enum { |
---|
4120 | 6791 | wowl_pattern_type_bitmap = 0, |
---|
.. | .. |
---|
4123 | 6794 | } wowl_pattern_type_t; |
---|
4124 | 6795 | |
---|
4125 | 6796 | typedef struct wl_wowl_pattern { |
---|
4126 | | - uint32 masksize; /* Size of the mask in #of bytes */ |
---|
4127 | | - uint32 offset; /* Pattern byte offset in packet */ |
---|
4128 | | - uint32 patternoffset; /* Offset of start of pattern in the structure */ |
---|
4129 | | - uint32 patternsize; /* Size of the pattern itself in #of bytes */ |
---|
4130 | | - uint32 id; /* id */ |
---|
4131 | | - uint32 reasonsize; /* Size of the wakeup reason code */ |
---|
4132 | | - wowl_pattern_type_t type; /* Type of pattern */ |
---|
| 6797 | + uint32 masksize; /**< Size of the mask in #of bytes */ |
---|
| 6798 | + uint32 offset; /**< Pattern byte offset in packet */ |
---|
| 6799 | + uint32 patternoffset; /**< Offset of start of pattern in the structure */ |
---|
| 6800 | + uint32 patternsize; /**< Size of the pattern itself in #of bytes */ |
---|
| 6801 | + uint32 id; /**< id */ |
---|
| 6802 | + uint32 reasonsize; /**< Size of the wakeup reason code */ |
---|
| 6803 | + wowl_pattern_type_t type; /**< Type of pattern */ |
---|
4133 | 6804 | /* Mask follows the structure above */ |
---|
4134 | 6805 | /* Pattern follows the mask is at 'patternoffset' from the start */ |
---|
4135 | 6806 | } wl_wowl_pattern_t; |
---|
4136 | 6807 | |
---|
4137 | 6808 | typedef struct wl_wowl_pattern_list { |
---|
4138 | | - uint count; |
---|
| 6809 | + uint32 count; |
---|
4139 | 6810 | wl_wowl_pattern_t pattern[1]; |
---|
4140 | 6811 | } wl_wowl_pattern_list_t; |
---|
4141 | 6812 | |
---|
4142 | 6813 | typedef struct wl_wowl_wakeind { |
---|
4143 | | - uint8 pci_wakeind; /* Whether PCI PMECSR PMEStatus bit was set */ |
---|
4144 | | - uint32 ucode_wakeind; /* What wakeup-event indication was set by ucode */ |
---|
| 6814 | + uint8 pci_wakeind; /**< Whether PCI PMECSR PMEStatus bit was set */ |
---|
| 6815 | + uint32 ucode_wakeind; /**< What wakeup-event indication was set by ucode */ |
---|
4145 | 6816 | } wl_wowl_wakeind_t; |
---|
4146 | 6817 | |
---|
4147 | | -typedef struct { |
---|
4148 | | - uint32 pktlen; /* size of packet */ |
---|
4149 | | - void *sdu; |
---|
4150 | | -} tcp_keepalive_wake_pkt_infop_t; |
---|
4151 | | - |
---|
4152 | | -/* per AC rate control related data structure */ |
---|
| 6818 | +/** per AC rate control related data structure */ |
---|
4153 | 6819 | typedef struct wl_txrate_class { |
---|
4154 | 6820 | uint8 init_rate; |
---|
4155 | 6821 | uint8 min_rate; |
---|
4156 | 6822 | uint8 max_rate; |
---|
4157 | 6823 | } wl_txrate_class_t; |
---|
4158 | 6824 | |
---|
4159 | | -/* structure for Overlap BSS scan arguments */ |
---|
| 6825 | +/** structure for Overlap BSS scan arguments */ |
---|
4160 | 6826 | typedef struct wl_obss_scan_arg { |
---|
4161 | 6827 | int16 passive_dwell; |
---|
4162 | 6828 | int16 active_dwell; |
---|
.. | .. |
---|
4169 | 6835 | |
---|
4170 | 6836 | #define WL_OBSS_SCAN_PARAM_LEN sizeof(wl_obss_scan_arg_t) |
---|
4171 | 6837 | |
---|
4172 | | -/* RSSI event notification configuration. */ |
---|
| 6838 | +/** RSSI event notification configuration. */ |
---|
4173 | 6839 | typedef struct wl_rssi_event { |
---|
4174 | | - uint32 rate_limit_msec; /* # of events posted to application will be limited to |
---|
| 6840 | + uint32 rate_limit_msec; /**< # of events posted to application will be limited to |
---|
4175 | 6841 | * one per specified period (0 to disable rate limit). |
---|
4176 | 6842 | */ |
---|
4177 | | - uint8 num_rssi_levels; /* Number of entries in rssi_levels[] below */ |
---|
4178 | | - int8 rssi_levels[MAX_RSSI_LEVELS]; /* Variable number of RSSI levels. An event |
---|
| 6843 | + uint8 num_rssi_levels; /**< Number of entries in rssi_levels[] below */ |
---|
| 6844 | + int8 rssi_levels[MAX_RSSI_LEVELS]; /**< Variable number of RSSI levels. An event |
---|
4179 | 6845 | * will be posted each time the RSSI of received |
---|
4180 | 6846 | * beacons/packets crosses a level. |
---|
4181 | 6847 | */ |
---|
| 6848 | + int8 pad[3]; |
---|
4182 | 6849 | } wl_rssi_event_t; |
---|
4183 | 6850 | |
---|
4184 | 6851 | #define RSSI_MONITOR_VERSION 1 |
---|
.. | .. |
---|
4196 | 6863 | uint16 pad; |
---|
4197 | 6864 | } wl_rssi_monitor_evt_t; |
---|
4198 | 6865 | |
---|
4199 | | -/* CCA based channel quality event configuration */ |
---|
| 6866 | +/* CCA based channel quality event configuration (ID values for both config and report) */ |
---|
4200 | 6867 | #define WL_CHAN_QUAL_CCA 0 |
---|
4201 | 6868 | #define WL_CHAN_QUAL_NF 1 |
---|
4202 | 6869 | #define WL_CHAN_QUAL_NF_LTE 2 |
---|
4203 | | -#define WL_CHAN_QUAL_TOTAL 3 |
---|
| 6870 | +#define WL_CHAN_QUAL_TOTAL 3 /* The total IDs supported in both config and report */ |
---|
| 6871 | +/* Additional channel quality event support in report only (>= 0x100) |
---|
| 6872 | + * Notice that uint8 is used in configuration struct wl_chan_qual_metric_t, but uint16 is |
---|
| 6873 | + * used for report in struct cca_chan_qual_event_t. So the ID values beyond 8-bit are used |
---|
| 6874 | + * for reporting purpose only. |
---|
| 6875 | + */ |
---|
| 6876 | +#define WL_CHAN_QUAL_FULL_CCA (0x100 | WL_CHAN_QUAL_CCA) |
---|
| 6877 | +#define WL_CHAN_QUAL_FULLPM_CCA (0x200u | WL_CHAN_QUAL_CCA) /* CCA: me vs. notme, PM vs. !PM */ |
---|
4204 | 6878 | |
---|
4205 | 6879 | #define MAX_CHAN_QUAL_LEVELS 8 |
---|
4206 | 6880 | |
---|
4207 | 6881 | typedef struct wl_chan_qual_metric { |
---|
4208 | | - uint8 id; /* metric ID */ |
---|
4209 | | - uint8 num_levels; /* Number of entries in rssi_levels[] below */ |
---|
| 6882 | + uint8 id; /**< metric ID */ |
---|
| 6883 | + uint8 num_levels; /**< Number of entries in rssi_levels[] below */ |
---|
4210 | 6884 | uint16 flags; |
---|
4211 | | - int16 htol[MAX_CHAN_QUAL_LEVELS]; /* threshold level array: hi-to-lo */ |
---|
4212 | | - int16 ltoh[MAX_CHAN_QUAL_LEVELS]; /* threshold level array: lo-to-hi */ |
---|
| 6885 | + int16 htol[MAX_CHAN_QUAL_LEVELS]; /**< threshold level array: hi-to-lo */ |
---|
| 6886 | + int16 ltoh[MAX_CHAN_QUAL_LEVELS]; /**< threshold level array: lo-to-hi */ |
---|
4213 | 6887 | } wl_chan_qual_metric_t; |
---|
4214 | 6888 | |
---|
4215 | 6889 | typedef struct wl_chan_qual_event { |
---|
4216 | | - uint32 rate_limit_msec; /* # of events posted to application will be limited to |
---|
| 6890 | + uint32 rate_limit_msec; /**< # of events posted to application will be limited to |
---|
4217 | 6891 | * one per specified period (0 to disable rate limit). |
---|
4218 | 6892 | */ |
---|
4219 | 6893 | uint16 flags; |
---|
4220 | 6894 | uint16 num_metrics; |
---|
4221 | | - wl_chan_qual_metric_t metric[WL_CHAN_QUAL_TOTAL]; /* metric array */ |
---|
| 6895 | + wl_chan_qual_metric_t metric[WL_CHAN_QUAL_TOTAL]; /**< metric array */ |
---|
4222 | 6896 | } wl_chan_qual_event_t; |
---|
4223 | | - |
---|
4224 | 6897 | typedef struct wl_action_obss_coex_req { |
---|
4225 | 6898 | uint8 info; |
---|
4226 | 6899 | uint8 num; |
---|
4227 | 6900 | uint8 ch_list[1]; |
---|
4228 | 6901 | } wl_action_obss_coex_req_t; |
---|
4229 | 6902 | |
---|
4230 | | - |
---|
4231 | | -/* IOVar parameter block for small MAC address array with type indicator */ |
---|
| 6903 | +/** IOVar parameter block for small MAC address array with type indicator */ |
---|
4232 | 6904 | #define WL_IOV_MAC_PARAM_LEN 4 |
---|
4233 | 6905 | |
---|
4234 | 6906 | #define WL_IOV_PKTQ_LOG_PRECS 16 |
---|
4235 | 6907 | |
---|
| 6908 | +#include <packed_section_start.h> |
---|
4236 | 6909 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
4237 | 6910 | uint32 num_addrs; |
---|
4238 | | - char addr_type[WL_IOV_MAC_PARAM_LEN]; |
---|
| 6911 | + uint8 addr_type[WL_IOV_MAC_PARAM_LEN]; |
---|
4239 | 6912 | struct ether_addr ea[WL_IOV_MAC_PARAM_LEN]; |
---|
4240 | 6913 | } BWL_POST_PACKED_STRUCT wl_iov_mac_params_t; |
---|
| 6914 | +#include <packed_section_end.h> |
---|
4241 | 6915 | |
---|
4242 | | -/* This is extra info that follows wl_iov_mac_params_t */ |
---|
4243 | | -typedef BWL_PRE_PACKED_STRUCT struct { |
---|
| 6916 | +/** This is extra info that follows wl_iov_mac_params_t */ |
---|
| 6917 | +typedef struct { |
---|
4244 | 6918 | uint32 addr_info[WL_IOV_MAC_PARAM_LEN]; |
---|
4245 | | -} BWL_POST_PACKED_STRUCT wl_iov_mac_extra_params_t; |
---|
| 6919 | +} wl_iov_mac_extra_params_t; |
---|
4246 | 6920 | |
---|
4247 | | -/* Combined structure */ |
---|
| 6921 | +/** Combined structure */ |
---|
4248 | 6922 | typedef struct { |
---|
4249 | 6923 | wl_iov_mac_params_t params; |
---|
4250 | 6924 | wl_iov_mac_extra_params_t extra_params; |
---|
4251 | 6925 | } wl_iov_mac_full_params_t; |
---|
4252 | 6926 | |
---|
4253 | | -/* Parameter block for PKTQ_LOG statistics */ |
---|
| 6927 | +/** Parameter block for PKTQ_LOG statistics */ |
---|
4254 | 6928 | #define PKTQ_LOG_COUNTERS_V4 \ |
---|
4255 | 6929 | /* packets requested to be stored */ \ |
---|
4256 | 6930 | uint32 requested; \ |
---|
.. | .. |
---|
4299 | 6973 | PKTQ_LOG_COUNTERS_V4 |
---|
4300 | 6974 | } pktq_log_counters_v04_t; |
---|
4301 | 6975 | |
---|
4302 | | -/* v5 is the same as V4 with extra parameter */ |
---|
| 6976 | +/** v5 is the same as V4 with extra parameter */ |
---|
4303 | 6977 | typedef struct { |
---|
4304 | 6978 | PKTQ_LOG_COUNTERS_V4 |
---|
4305 | | - /* cumulative time to transmit */ |
---|
| 6979 | + /** cumulative time to transmit */ |
---|
4306 | 6980 | uint32 airtime; |
---|
4307 | 6981 | } pktq_log_counters_v05_t; |
---|
4308 | 6982 | |
---|
.. | .. |
---|
4311 | 6985 | pktq_log_counters_v04_t counters[WL_IOV_MAC_PARAM_LEN][WL_IOV_PKTQ_LOG_PRECS]; |
---|
4312 | 6986 | uint32 counter_info[WL_IOV_MAC_PARAM_LEN]; |
---|
4313 | 6987 | uint32 pspretend_time_delta[WL_IOV_MAC_PARAM_LEN]; |
---|
4314 | | - char headings[1]; |
---|
| 6988 | + char headings[]; |
---|
4315 | 6989 | } pktq_log_format_v04_t; |
---|
4316 | 6990 | |
---|
4317 | 6991 | typedef struct { |
---|
.. | .. |
---|
4319 | 6993 | pktq_log_counters_v05_t counters[WL_IOV_MAC_PARAM_LEN][WL_IOV_PKTQ_LOG_PRECS]; |
---|
4320 | 6994 | uint32 counter_info[WL_IOV_MAC_PARAM_LEN]; |
---|
4321 | 6995 | uint32 pspretend_time_delta[WL_IOV_MAC_PARAM_LEN]; |
---|
4322 | | - char headings[1]; |
---|
| 6996 | + char headings[]; |
---|
4323 | 6997 | } pktq_log_format_v05_t; |
---|
4324 | | - |
---|
4325 | 6998 | |
---|
4326 | 6999 | typedef struct { |
---|
4327 | 7000 | uint32 version; |
---|
.. | .. |
---|
4336 | 7009 | #define PKTQ_LOG_AUTO (1 << 31) |
---|
4337 | 7010 | #define PKTQ_LOG_DEF_PREC (1 << 30) |
---|
4338 | 7011 | |
---|
| 7012 | +typedef struct wl_pfn_macaddr_cfg_0 { |
---|
| 7013 | + uint8 version; |
---|
| 7014 | + uint8 reserved; |
---|
| 7015 | + struct ether_addr macaddr; |
---|
| 7016 | +} wl_pfn_macaddr_cfg_0_t; |
---|
4339 | 7017 | #define LEGACY1_WL_PFN_MACADDR_CFG_VER 0 |
---|
4340 | | - |
---|
4341 | 7018 | #define WL_PFN_MAC_OUI_ONLY_MASK 1 |
---|
4342 | 7019 | #define WL_PFN_SET_MAC_UNASSOC_MASK 2 |
---|
4343 | 7020 | #define WL_PFN_RESTRICT_LA_MAC_MASK 4 |
---|
4344 | 7021 | #define WL_PFN_MACADDR_FLAG_MASK 0x7 |
---|
4345 | | - |
---|
| 7022 | +/** To configure pfn_macaddr */ |
---|
| 7023 | +typedef struct wl_pfn_macaddr_cfg { |
---|
| 7024 | + uint8 version; |
---|
| 7025 | + uint8 flags; |
---|
| 7026 | + struct ether_addr macaddr; |
---|
| 7027 | +} wl_pfn_macaddr_cfg_t; |
---|
| 7028 | +#define WL_PFN_MACADDR_CFG_VER 1 |
---|
4346 | 7029 | |
---|
4347 | 7030 | /* |
---|
4348 | 7031 | * SCB_BS_DATA iovar definitions start. |
---|
4349 | 7032 | */ |
---|
4350 | 7033 | #define SCB_BS_DATA_STRUCT_VERSION 1 |
---|
4351 | 7034 | |
---|
4352 | | -/* The actual counters maintained for each station */ |
---|
4353 | | -typedef BWL_PRE_PACKED_STRUCT struct { |
---|
| 7035 | +/** The actual counters maintained for each station */ |
---|
| 7036 | +typedef struct { |
---|
4354 | 7037 | /* The following counters are a subset of what pktq_stats provides per precedence. */ |
---|
4355 | | - uint32 retry; /* packets re-sent because they were not received */ |
---|
4356 | | - uint32 retry_drop; /* packets finally dropped after retry limit */ |
---|
4357 | | - uint32 rtsfail; /* count of rts attempts that failed to receive cts */ |
---|
4358 | | - uint32 acked; /* count of packets sent (acked) successfully */ |
---|
4359 | | - uint32 txrate_succ; /* running total of phy rate of packets sent successfully */ |
---|
4360 | | - uint32 txrate_main; /* running total of phy 'main' rate */ |
---|
4361 | | - uint32 throughput; /* actual data transferred successfully */ |
---|
4362 | | - uint32 time_delta; /* time difference since last pktq_stats */ |
---|
4363 | | - uint32 airtime; /* cumulative total medium access delay in useconds */ |
---|
4364 | | -} BWL_POST_PACKED_STRUCT iov_bs_data_counters_t; |
---|
| 7038 | + uint32 retry; /**< packets re-sent because they were not received */ |
---|
| 7039 | + uint32 retry_drop; /**< packets finally dropped after retry limit */ |
---|
| 7040 | + uint32 rtsfail; /**< count of rts attempts that failed to receive cts */ |
---|
| 7041 | + uint32 acked; /**< count of packets sent (acked) successfully */ |
---|
| 7042 | + uint32 txrate_succ; /**< running total of phy rate of packets sent successfully */ |
---|
| 7043 | + uint32 txrate_main; /**< running total of phy 'main' rate */ |
---|
| 7044 | + uint32 throughput; /**< actual data transferred successfully */ |
---|
| 7045 | + uint32 time_delta; /**< time difference since last pktq_stats */ |
---|
| 7046 | + uint32 airtime; /**< cumulative total medium access delay in useconds */ |
---|
| 7047 | +} iov_bs_data_counters_t; |
---|
4365 | 7048 | |
---|
4366 | | -/* The structure for individual station information. */ |
---|
| 7049 | +/** The structure for individual station information. */ |
---|
| 7050 | +#include <packed_section_start.h> |
---|
4367 | 7051 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
4368 | | - struct ether_addr station_address; /* The station MAC address */ |
---|
4369 | | - uint16 station_flags; /* Bit mask of flags, for future use. */ |
---|
4370 | | - iov_bs_data_counters_t station_counters; /* The actual counter values */ |
---|
| 7052 | + struct ether_addr station_address; /**< The station MAC address */ |
---|
| 7053 | + uint16 station_flags; /**< Bit mask of flags, for future use. */ |
---|
| 7054 | + iov_bs_data_counters_t station_counters; /**< The actual counter values */ |
---|
4371 | 7055 | } BWL_POST_PACKED_STRUCT iov_bs_data_record_t; |
---|
| 7056 | +#include <packed_section_end.h> |
---|
4372 | 7057 | |
---|
| 7058 | +#include <packed_section_start.h> |
---|
4373 | 7059 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
4374 | | - uint16 structure_version; /* Structure version number (for wl/wlu matching) */ |
---|
4375 | | - uint16 structure_count; /* Number of iov_bs_data_record_t records following */ |
---|
4376 | | - iov_bs_data_record_t structure_record[1]; /* 0 - structure_count records */ |
---|
| 7060 | + uint16 structure_version; /**< Structure version number (for wl/wlu matching) */ |
---|
| 7061 | + uint16 structure_count; /**< Number of iov_bs_data_record_t records following */ |
---|
| 7062 | + iov_bs_data_record_t structure_record[1]; /**< 0 - structure_count records */ |
---|
4377 | 7063 | } BWL_POST_PACKED_STRUCT iov_bs_data_struct_t; |
---|
| 7064 | +#include <packed_section_end.h> |
---|
4378 | 7065 | |
---|
4379 | 7066 | /* Bitmask of options that can be passed in to the iovar. */ |
---|
4380 | 7067 | enum { |
---|
4381 | | - SCB_BS_DATA_FLAG_NO_RESET = (1<<0) /* Do not clear the counters after reading */ |
---|
| 7068 | + SCB_BS_DATA_FLAG_NO_RESET = (1<<0) /**< Do not clear the counters after reading */ |
---|
4382 | 7069 | }; |
---|
4383 | 7070 | /* |
---|
4384 | 7071 | * SCB_BS_DATA iovar definitions end. |
---|
4385 | 7072 | */ |
---|
4386 | 7073 | |
---|
4387 | 7074 | typedef struct wlc_extlog_cfg { |
---|
4388 | | - int max_number; |
---|
4389 | | - uint16 module; /* bitmap */ |
---|
| 7075 | + int32 max_number; |
---|
| 7076 | + uint16 module; /**< bitmap */ |
---|
4390 | 7077 | uint8 level; |
---|
4391 | 7078 | uint8 flag; |
---|
4392 | 7079 | uint16 version; |
---|
| 7080 | + uint16 PAD; |
---|
4393 | 7081 | } wlc_extlog_cfg_t; |
---|
4394 | 7082 | |
---|
4395 | 7083 | typedef struct log_record { |
---|
.. | .. |
---|
4399 | 7087 | uint8 level; |
---|
4400 | 7088 | uint8 sub_unit; |
---|
4401 | 7089 | uint8 seq_num; |
---|
| 7090 | + uint8 pad; |
---|
4402 | 7091 | int32 arg; |
---|
4403 | | - char str[MAX_ARGSTR_LEN]; |
---|
| 7092 | + char str[MAX_ARGSTR_LEN]; |
---|
| 7093 | + char PAD[4-MAX_ARGSTR_LEN%4]; |
---|
4404 | 7094 | } log_record_t; |
---|
4405 | 7095 | |
---|
4406 | 7096 | typedef struct wlc_extlog_req { |
---|
.. | .. |
---|
4462 | 7152 | FMTSTR_MAX_ID |
---|
4463 | 7153 | } log_fmtstr_id_t; |
---|
4464 | 7154 | |
---|
4465 | | -#ifdef DONGLEOVERLAYS |
---|
4466 | | -typedef struct { |
---|
4467 | | - uint32 flags_idx; /* lower 8 bits: overlay index; upper 24 bits: flags */ |
---|
4468 | | - uint32 offset; /* offset into overlay region to write code */ |
---|
4469 | | - uint32 len; /* overlay code len */ |
---|
4470 | | - /* overlay code follows this struct */ |
---|
4471 | | -} wl_ioctl_overlay_t; |
---|
4472 | | -#endif /* DONGLEOVERLAYS */ |
---|
4473 | | - |
---|
4474 | | -/* Mesh peering states */ |
---|
4475 | | -#define MESH_PEERING_IDLE 0 |
---|
4476 | | -#define MESH_PEERING_OPEN_SNT 1 |
---|
4477 | | -#define MESH_PEERING_CNF_RCVD 2 |
---|
4478 | | -#define MESH_PEERING_OPEN_RCVD 3 |
---|
4479 | | -#define MESH_PEERING_ESTAB 4 |
---|
4480 | | -#define MESH_PEERING_HOLDING 5 |
---|
4481 | | -#define MESH_PEERING_LAST_STATE 6 |
---|
4482 | | -/* for debugging: mapping strings */ |
---|
4483 | | -#define MESH_PEERING_STATE_STRINGS \ |
---|
4484 | | - {"IDLE ", "OPNSNT", "CNFRCV", "OPNRCV", "ESTAB ", "HOLDNG"} |
---|
4485 | | - |
---|
4486 | | -typedef BWL_PRE_PACKED_STRUCT struct mesh_peer_info { |
---|
4487 | | - /* mesh_peer_instance as given in the spec. Note that, peer address |
---|
4488 | | - * is stored in scb |
---|
4489 | | - */ |
---|
4490 | | - uint16 mesh_peer_prot_id; |
---|
4491 | | - uint16 local_link_id; |
---|
4492 | | - uint16 peer_link_id; |
---|
4493 | | - uint16 peer_aid; /* AID generated by *peer* to self & received in peer_confirm. |
---|
4494 | | - * TODO: no mention in spec? possibly used in PS case. Note that aid generated |
---|
4495 | | - * from self to peer is stored in scb. |
---|
4496 | | - */ |
---|
4497 | | - uint8 state; |
---|
4498 | | - /* TODO: struct mesh_peer_info *next; this field is required |
---|
4499 | | - * if multiple peerings per same src is allowed, which is |
---|
4500 | | - * true as per spec. |
---|
4501 | | - */ |
---|
4502 | | -} BWL_POST_PACKED_STRUCT mesh_peer_info_t; |
---|
4503 | | - |
---|
4504 | | -/* once an entry is added into mesh_peer_list, if peering is lost, it will |
---|
4505 | | -* get retried for peering, MAX_MESH_PEER_ENTRY_RETRIES times. after wards, it |
---|
4506 | | -* wont get retried and will be moved to MESH_PEER_ENTRY_STATE_TIMEDOUT state, |
---|
4507 | | -* until user adds it again explicitely, when its entry_state is changed |
---|
4508 | | -* to MESH_PEER_ENTRY_STATE_ACTIVE and tried again. |
---|
4509 | | -*/ |
---|
4510 | | -#define MAX_MESH_SELF_PEER_ENTRY_RETRIES 3 |
---|
4511 | | -#define MESH_SELF_PEER_ENTRY_STATE_ACTIVE 1 |
---|
4512 | | -#define MESH_SELF_PEER_ENTRY_STATE_TIMEDOUT 2 |
---|
4513 | | - |
---|
4514 | | -/* to identify if the list of mac addresses got in "mesh_peer" iovar |
---|
4515 | | -* have to be peered or should be cancelled peering |
---|
4516 | | -*/ |
---|
4517 | | -#define PEER_MACLIST_FLAG_CLEAR 1 |
---|
4518 | | - |
---|
4519 | | -typedef BWL_PRE_PACKED_STRUCT struct mesh_peer_info_ext { |
---|
4520 | | - mesh_peer_info_t peer_info; |
---|
4521 | | - uint16 local_aid; /* AID generated by *local* to peer */ |
---|
4522 | | - struct ether_addr ea; /* peer ea */ |
---|
4523 | | - uint32 entry_state; /* see MESH_PEER_ENTRY_STATE_ACTIVE etc; valid |
---|
4524 | | - * ONLY for internal peering requests |
---|
4525 | | - */ |
---|
4526 | | - int rssi; |
---|
4527 | | -} BWL_POST_PACKED_STRUCT mesh_peer_info_ext_t; |
---|
4528 | | - |
---|
4529 | | -typedef BWL_PRE_PACKED_STRUCT struct mesh_peer_info_dump { |
---|
4530 | | - uint32 buflen; |
---|
4531 | | - uint32 version; |
---|
4532 | | - uint32 count; /* number of results */ |
---|
4533 | | - mesh_peer_info_ext_t mpi_ext[1]; |
---|
4534 | | -} BWL_POST_PACKED_STRUCT mesh_peer_info_dump_t; |
---|
4535 | | - |
---|
4536 | | -#define WL_MESH_PEER_RES_FIXED_SIZE (sizeof(mesh_peer_info_dump_t) - sizeof(mesh_peer_info_ext_t)) |
---|
4537 | | - |
---|
4538 | | -typedef BWL_PRE_PACKED_STRUCT struct mesh_pmk { |
---|
4539 | | - struct ether_addr ea; |
---|
4540 | | - uint8 pmk[32]; |
---|
4541 | | -} BWL_POST_PACKED_STRUCT mesh_pmk_t; |
---|
4542 | | - |
---|
4543 | | -#define SAE_MAX_PASSWD_LEN 32 |
---|
4544 | | - |
---|
4545 | | -/* 11k Neighbor Report element (unversioned, deprecated) */ |
---|
| 7155 | +/** 11k Neighbor Report element (unversioned, deprecated) */ |
---|
4546 | 7156 | typedef struct nbr_element { |
---|
4547 | 7157 | uint8 id; |
---|
4548 | 7158 | uint8 len; |
---|
.. | .. |
---|
4553 | 7163 | uint8 phytype; |
---|
4554 | 7164 | uint8 pad; |
---|
4555 | 7165 | } nbr_element_t; |
---|
| 7166 | +#define NBR_ADD_STATIC 0 |
---|
| 7167 | +#define NBR_ADD_DYNAMIC 1 |
---|
4556 | 7168 | |
---|
4557 | 7169 | #define WL_RRM_NBR_RPT_VER 1 |
---|
4558 | | -/* 11k Neighbor Report element */ |
---|
| 7170 | +#define WL_NBR_RPT_FLAG_BSS_PREF_FROM_AP 0x01 |
---|
| 7171 | +#define WL_RRM_DEFAULT_BSS_PREFERENCE 255 |
---|
| 7172 | +#define WL_RRM_ADD_NBR_MIN_PARAMS 6 |
---|
| 7173 | +/** 11k Neighbor Report element */ |
---|
4559 | 7174 | typedef struct nbr_rpt_elem { |
---|
4560 | 7175 | uint8 version; |
---|
4561 | 7176 | uint8 id; |
---|
.. | .. |
---|
4567 | 7182 | uint8 reg; |
---|
4568 | 7183 | uint8 channel; |
---|
4569 | 7184 | uint8 phytype; |
---|
4570 | | - uint8 pad_2; |
---|
| 7185 | + uint8 addtype; /* static for manual add or dynamic if auto-learning of neighbors */ |
---|
4571 | 7186 | wlc_ssid_t ssid; |
---|
| 7187 | + chanspec_t chanspec; |
---|
4572 | 7188 | uint8 bss_trans_preference; |
---|
4573 | | - uint8 pad_3[3]; |
---|
| 7189 | + uint8 flags; |
---|
4574 | 7190 | } nbr_rpt_elem_t; |
---|
| 7191 | + |
---|
| 7192 | +typedef struct bcn_nbr_query { |
---|
| 7193 | + uint16 list_cnt; |
---|
| 7194 | + uint8 pad[2]; |
---|
| 7195 | + struct ether_addr sta_addr; |
---|
| 7196 | +} bcn_nbr_query_t; |
---|
4575 | 7197 | |
---|
4576 | 7198 | typedef enum event_msgs_ext_command { |
---|
4577 | 7199 | EVENTMSGS_NONE = 0, |
---|
.. | .. |
---|
4582 | 7204 | |
---|
4583 | 7205 | #define EVENTMSGS_VER 1 |
---|
4584 | 7206 | #define EVENTMSGS_EXT_STRUCT_SIZE OFFSETOF(eventmsgs_ext_t, mask[0]) |
---|
4585 | | - |
---|
4586 | | -#define WL_EVENTING_MASK_MAX_LEN 64 |
---|
4587 | | -#define WL_EVENTINT_MAX_GET_SIZE (WL_EVENTING_MASK_MAX_LEN + EVENTMSGS_EXT_STRUCT_SIZE) |
---|
4588 | 7207 | |
---|
4589 | 7208 | /* len- for SET it would be mask size from the application to the firmware */ |
---|
4590 | 7209 | /* for GET it would be actual firmware mask size */ |
---|
.. | .. |
---|
4599 | 7218 | uint8 mask[1]; |
---|
4600 | 7219 | } eventmsgs_ext_t; |
---|
4601 | 7220 | |
---|
| 7221 | +#include <packed_section_start.h> |
---|
4602 | 7222 | typedef BWL_PRE_PACKED_STRUCT struct pcie_bus_tput_params { |
---|
4603 | | - /* no of host dma descriptors programmed by the firmware before a commit */ |
---|
| 7223 | + /** no of host dma descriptors programmed by the firmware before a commit */ |
---|
4604 | 7224 | uint16 max_dma_descriptors; |
---|
4605 | 7225 | |
---|
4606 | | - uint16 host_buf_len; /* length of host buffer */ |
---|
4607 | | - dmaaddr_t host_buf_addr; /* physical address for bus_throughput_buf */ |
---|
| 7226 | + uint16 host_buf_len; /**< length of host buffer */ |
---|
| 7227 | + dmaaddr_t host_buf_addr; /**< physical address for bus_throughput_buf */ |
---|
4608 | 7228 | } BWL_POST_PACKED_STRUCT pcie_bus_tput_params_t; |
---|
4609 | | -typedef BWL_PRE_PACKED_STRUCT struct pcie_bus_tput_stats { |
---|
4610 | | - uint16 time_taken; /* no of secs the test is run */ |
---|
4611 | | - uint16 nbytes_per_descriptor; /* no of bytes of data dma ed per descriptor */ |
---|
| 7229 | +#include <packed_section_end.h> |
---|
4612 | 7230 | |
---|
4613 | | - /* no of desciptors fo which dma is sucessfully completed within the test time */ |
---|
| 7231 | +typedef struct pcie_bus_tput_stats { |
---|
| 7232 | + uint16 time_taken; /**< no of secs the test is run */ |
---|
| 7233 | + uint16 nbytes_per_descriptor; /**< no of bytes of data dma ed per descriptor */ |
---|
| 7234 | + |
---|
| 7235 | + /** no of desciptors for which dma is sucessfully completed within the test time */ |
---|
4614 | 7236 | uint32 count; |
---|
4615 | | -} BWL_POST_PACKED_STRUCT pcie_bus_tput_stats_t; |
---|
| 7237 | +} pcie_bus_tput_stats_t; |
---|
4616 | 7238 | |
---|
4617 | | -#define MAX_ROAMOFFL_BSSID_NUM 100 |
---|
| 7239 | +#define HOST_WAKEUP_DATA_VER 1 |
---|
| 7240 | +#include <packed_section_start.h> |
---|
| 7241 | +/* Bus interface host wakeup data */ |
---|
| 7242 | +typedef BWL_PRE_PACKED_STRUCT struct wl_host_wakeup_data { |
---|
| 7243 | + uint16 ver; |
---|
| 7244 | + uint16 len; |
---|
| 7245 | + uchar data[1]; /* wakeup data */ |
---|
| 7246 | +} BWL_POST_PACKED_STRUCT wl_host_wakeup_data_t; |
---|
| 7247 | +#include <packed_section_end.h> |
---|
4618 | 7248 | |
---|
4619 | | -typedef BWL_PRE_PACKED_STRUCT struct roamoffl_bssid_list { |
---|
4620 | | - int32 cnt; |
---|
4621 | | - struct ether_addr bssid[1]; |
---|
4622 | | -} BWL_POST_PACKED_STRUCT roamoffl_bssid_list_t; |
---|
4623 | | - |
---|
4624 | | -/* no default structure packing */ |
---|
| 7249 | +#define HOST_WAKEUP_DATA_VER_2 2 |
---|
| 7250 | +#include <packed_section_start.h> |
---|
| 7251 | +/* Bus interface host wakeup data */ |
---|
| 7252 | +typedef BWL_PRE_PACKED_STRUCT struct wl_host_wakeup_data_v2 { |
---|
| 7253 | + uint16 ver; |
---|
| 7254 | + uint16 len; |
---|
| 7255 | + uint32 gpio_toggle_time; /* gpio toggle time in ms */ |
---|
| 7256 | + uchar data[1]; /* wakeup data */ |
---|
| 7257 | +} BWL_POST_PACKED_STRUCT wl_host_wakeup_data_v2_t; |
---|
4625 | 7258 | #include <packed_section_end.h> |
---|
4626 | 7259 | |
---|
4627 | 7260 | typedef struct keepalives_max_idle { |
---|
4628 | | - uint16 keepalive_count; /* nmbr of keepalives per bss_max_idle period */ |
---|
4629 | | - uint8 mkeepalive_index; /* mkeepalive_index for keepalive frame to be used */ |
---|
4630 | | - uint8 PAD; /* to align next field */ |
---|
4631 | | - uint16 max_interval; /* seconds */ |
---|
| 7261 | + uint16 keepalive_count; /**< nmbr of keepalives per bss_max_idle period */ |
---|
| 7262 | + uint8 mkeepalive_index; /**< mkeepalive_index for keepalive frame to be used */ |
---|
| 7263 | + uint8 PAD; /**< to align next field */ |
---|
| 7264 | + uint16 max_interval; /**< seconds */ |
---|
4632 | 7265 | } keepalives_max_idle_t; |
---|
4633 | 7266 | |
---|
4634 | 7267 | #define PM_IGNORE_BCMC_PROXY_ARP (1 << 0) |
---|
4635 | 7268 | #define PM_IGNORE_BCMC_ALL_DMS_ACCEPTED (1 << 1) |
---|
4636 | 7269 | |
---|
4637 | | -/* require strict packing */ |
---|
4638 | | -#include <packed_section_start.h> |
---|
| 7270 | +/* ##### HMAP section ##### */ |
---|
| 7271 | +#define PCIE_MAX_HMAP_WINDOWS 8 |
---|
| 7272 | +#define PCIE_HMAPTEST_VERSION 2 |
---|
| 7273 | +#define HMAPTEST_INVALID_OFFSET 0xFFFFFFFFu |
---|
| 7274 | +#define HMAPTEST_DEFAULT_WRITE_PATTERN 0xBABECAFEu |
---|
| 7275 | +#define HMAPTEST_ACCESS_ARM 0 |
---|
| 7276 | +#define HMAPTEST_ACCESS_M2M 1 |
---|
| 7277 | +#define HMAPTEST_ACCESS_D11 2 |
---|
| 7278 | +#define HMAPTEST_ACCESS_NONE 3 |
---|
| 7279 | + |
---|
| 7280 | +typedef struct pcie_hmaptest { |
---|
| 7281 | + uint16 version; /* Version */ |
---|
| 7282 | + uint16 length; /* Length of entire structure */ |
---|
| 7283 | + uint32 xfer_len; |
---|
| 7284 | + uint32 accesstype; |
---|
| 7285 | + uint32 is_write; |
---|
| 7286 | + uint32 is_invalid; |
---|
| 7287 | + uint32 host_addr_hi; |
---|
| 7288 | + uint32 host_addr_lo; |
---|
| 7289 | + uint32 host_offset; |
---|
| 7290 | + uint32 value; /* 4 byte value to be filled in case of write access test */ |
---|
| 7291 | + uint32 delay; /* wait time in seconds before initiating access from dongle */ |
---|
| 7292 | +} pcie_hmaptest_t; |
---|
| 7293 | + |
---|
| 7294 | +/* HMAP window register set */ |
---|
| 7295 | +typedef struct hmapwindow { |
---|
| 7296 | + uint32 baseaddr_lo; /* BaseAddrLower */ |
---|
| 7297 | + uint32 baseaddr_hi; /* BaseAddrUpper */ |
---|
| 7298 | + uint32 windowlength; /* Window Length */ |
---|
| 7299 | +} hmapwindow_t; |
---|
| 7300 | + |
---|
| 7301 | +#define PCIE_HMAP_VERSION 1 |
---|
| 7302 | +typedef struct pcie_hmap { |
---|
| 7303 | + uint16 version; /**< Version */ |
---|
| 7304 | + uint16 length; /**< Length of entire structure */ |
---|
| 7305 | + uint32 enable; /**< status of HMAP enabled/disabled */ |
---|
| 7306 | + uint32 nwindows; /* no. of HMAP windows enabled */ |
---|
| 7307 | + uint32 window_config; /* HMAP window_config register */ |
---|
| 7308 | + uint32 hmap_violationaddr_lo; /* violating address lo */ |
---|
| 7309 | + uint32 hmap_violationaddr_hi; /* violating addr hi */ |
---|
| 7310 | + uint32 hmap_violation_info; /* violation info */ |
---|
| 7311 | + hmapwindow_t hwindows[]; /* Multiple hwindows */ |
---|
| 7312 | +} pcie_hmap_t; |
---|
4639 | 7313 | |
---|
4640 | 7314 | /* ##### Power Stats section ##### */ |
---|
4641 | 7315 | |
---|
4642 | 7316 | #define WL_PWRSTATS_VERSION 2 |
---|
4643 | 7317 | |
---|
4644 | | -/* Input structure for pwrstats IOVAR */ |
---|
4645 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_pwrstats_query { |
---|
4646 | | - uint16 length; /* Number of entries in type array. */ |
---|
4647 | | - uint16 type[1]; /* Types (tags) to retrieve. |
---|
| 7318 | +/** Input structure for pwrstats IOVAR */ |
---|
| 7319 | +typedef struct wl_pwrstats_query { |
---|
| 7320 | + uint16 length; /**< Number of entries in type array. */ |
---|
| 7321 | + uint16 type[1]; /**< Types (tags) to retrieve. |
---|
4648 | 7322 | * Length 0 (no types) means get all. |
---|
4649 | 7323 | */ |
---|
4650 | | -} BWL_POST_PACKED_STRUCT wl_pwrstats_query_t; |
---|
| 7324 | +} wl_pwrstats_query_t; |
---|
4651 | 7325 | |
---|
4652 | | -/* This structure is for version 2; version 1 will be deprecated in by FW */ |
---|
| 7326 | +/** This structure is for version 2; version 1 will be deprecated in by FW */ |
---|
| 7327 | +#include <packed_section_start.h> |
---|
4653 | 7328 | typedef BWL_PRE_PACKED_STRUCT struct wl_pwrstats { |
---|
4654 | | - uint16 version; /* Version = 2 is TLV format */ |
---|
4655 | | - uint16 length; /* Length of entire structure */ |
---|
4656 | | - uint8 data[1]; /* TLV data, a series of structures, |
---|
| 7329 | + uint16 version; /**< Version = 2 is TLV format */ |
---|
| 7330 | + uint16 length; /**< Length of entire structure */ |
---|
| 7331 | + uint8 data[1]; /**< TLV data, a series of structures, |
---|
4657 | 7332 | * each starting with type and length. |
---|
4658 | 7333 | * |
---|
4659 | 7334 | * Padded as necessary so each section |
---|
.. | .. |
---|
4664 | 7339 | * valid len values are 0-4095. |
---|
4665 | 7340 | */ |
---|
4666 | 7341 | } BWL_POST_PACKED_STRUCT wl_pwrstats_t; |
---|
| 7342 | +#include <packed_section_end.h> |
---|
4667 | 7343 | #define WL_PWR_STATS_HDRLEN OFFSETOF(wl_pwrstats_t, data) |
---|
4668 | | - |
---|
4669 | | -/* Type values for the data section */ |
---|
4670 | | -#define WL_PWRSTATS_TYPE_PHY 0 /* struct wl_pwr_phy_stats */ |
---|
4671 | | -#define WL_PWRSTATS_TYPE_SCAN 1 /* struct wl_pwr_scan_stats */ |
---|
4672 | | -#define WL_PWRSTATS_TYPE_USB_HSIC 2 /* struct wl_pwr_usb_hsic_stats */ |
---|
4673 | | -#define WL_PWRSTATS_TYPE_PM_AWAKE1 3 /* struct wl_pwr_pm_awake_stats_v1 */ |
---|
4674 | | -#define WL_PWRSTATS_TYPE_CONNECTION 4 /* struct wl_pwr_connect_stats; assoc and key-exch time */ |
---|
4675 | | -#define WL_PWRSTATS_TYPE_PCIE 6 /* struct wl_pwr_pcie_stats */ |
---|
4676 | | -#define WL_PWRSTATS_TYPE_PM_AWAKE2 7 /* struct wl_pwr_pm_awake_stats_v2 */ |
---|
4677 | 7344 | |
---|
4678 | 7345 | /* Bits for wake reasons */ |
---|
4679 | 7346 | #define WLC_PMD_WAKE_SET 0x1 |
---|
4680 | 7347 | #define WLC_PMD_PM_AWAKE_BCN 0x2 |
---|
4681 | | -#define WLC_PMD_BTA_ACTIVE 0x4 |
---|
| 7348 | +/* BIT:3 is no longer being used */ |
---|
4682 | 7349 | #define WLC_PMD_SCAN_IN_PROGRESS 0x8 |
---|
4683 | 7350 | #define WLC_PMD_RM_IN_PROGRESS 0x10 |
---|
4684 | 7351 | #define WLC_PMD_AS_IN_PROGRESS 0x20 |
---|
.. | .. |
---|
4686 | 7353 | #define WLC_PMD_PS_POLL 0x80 |
---|
4687 | 7354 | #define WLC_PMD_CHK_UNALIGN_TBTT 0x100 |
---|
4688 | 7355 | #define WLC_PMD_APSD_STA_UP 0x200 |
---|
4689 | | -#define WLC_PMD_TX_PEND_WAR 0x400 |
---|
| 7356 | +#define WLC_PMD_TX_PEND_WAR 0x400 /* obsolete, can be reused */ |
---|
4690 | 7357 | #define WLC_PMD_GPTIMER_STAY_AWAKE 0x800 |
---|
4691 | 7358 | #define WLC_PMD_PM2_RADIO_SOFF_PEND 0x2000 |
---|
4692 | 7359 | #define WLC_PMD_NON_PRIM_STA_UP 0x4000 |
---|
4693 | 7360 | #define WLC_PMD_AP_UP 0x8000 |
---|
4694 | 7361 | |
---|
4695 | | -typedef BWL_PRE_PACKED_STRUCT struct wlc_pm_debug { |
---|
4696 | | - uint32 timestamp; /* timestamp in millisecond */ |
---|
4697 | | - uint32 reason; /* reason(s) for staying awake */ |
---|
4698 | | -} BWL_POST_PACKED_STRUCT wlc_pm_debug_t; |
---|
| 7362 | +typedef struct wlc_pm_debug { |
---|
| 7363 | + uint32 timestamp; /**< timestamp in millisecond */ |
---|
| 7364 | + uint32 reason; /**< reason(s) for staying awake */ |
---|
| 7365 | +} wlc_pm_debug_t; |
---|
4699 | 7366 | |
---|
4700 | | -/* WL_PWRSTATS_TYPE_PM_AWAKE1 structures (for 6.25 firmware) */ |
---|
| 7367 | +/** WL_PWRSTATS_TYPE_PM_AWAKE1 structures (for 6.25 firmware) */ |
---|
4701 | 7368 | #define WLC_STA_AWAKE_STATES_MAX_V1 30 |
---|
4702 | 7369 | #define WLC_PMD_EVENT_MAX_V1 32 |
---|
4703 | | -/* Data sent as part of pwrstats IOVAR (and EXCESS_PM_WAKE event) */ |
---|
| 7370 | +/** Data sent as part of pwrstats IOVAR (and EXCESS_PM_WAKE event) */ |
---|
| 7371 | +#include <packed_section_start.h> |
---|
4704 | 7372 | typedef BWL_PRE_PACKED_STRUCT struct pm_awake_data_v1 { |
---|
| 7373 | + uint32 curr_time; /**< ms */ |
---|
| 7374 | + uint32 hw_macc; /**< HW maccontrol */ |
---|
| 7375 | + uint32 sw_macc; /**< SW maccontrol */ |
---|
| 7376 | + uint32 pm_dur; /**< Total sleep time in PM, msecs */ |
---|
| 7377 | + uint32 mpc_dur; /**< Total sleep time in MPC, msecs */ |
---|
| 7378 | + |
---|
| 7379 | + /* int32 drifts = remote - local; +ve drift => local-clk slow */ |
---|
| 7380 | + int32 last_drift; /**< Most recent TSF drift from beacon */ |
---|
| 7381 | + int32 min_drift; /**< Min TSF drift from beacon in magnitude */ |
---|
| 7382 | + int32 max_drift; /**< Max TSF drift from beacon in magnitude */ |
---|
| 7383 | + |
---|
| 7384 | + uint32 avg_drift; /**< Avg TSF drift from beacon */ |
---|
| 7385 | + |
---|
| 7386 | + /* Wake history tracking */ |
---|
| 7387 | + uint8 pmwake_idx; /**< for stepping through pm_state */ |
---|
| 7388 | + wlc_pm_debug_t pm_state[WLC_STA_AWAKE_STATES_MAX_V1]; /**< timestamped wake bits */ |
---|
| 7389 | + uint32 pmd_event_wake_dur[WLC_PMD_EVENT_MAX_V1]; /**< cumulative usecs per wake reason */ |
---|
| 7390 | + uint32 drift_cnt; /**< Count of drift readings over which avg_drift was computed */ |
---|
| 7391 | +} BWL_POST_PACKED_STRUCT pm_awake_data_v1_t; |
---|
| 7392 | +#include <packed_section_end.h> |
---|
| 7393 | + |
---|
| 7394 | +#include <packed_section_start.h> |
---|
| 7395 | +typedef BWL_PRE_PACKED_STRUCT struct wl_pwr_pm_awake_stats_v1 { |
---|
| 7396 | + uint16 type; /**< WL_PWRSTATS_TYPE_PM_AWAKE */ |
---|
| 7397 | + uint16 len; /**< Up to 4K-1, top 4 bits are reserved */ |
---|
| 7398 | + |
---|
| 7399 | + pm_awake_data_v1_t awake_data; |
---|
| 7400 | + uint32 frts_time; /**< Cumulative ms spent in frts since driver load */ |
---|
| 7401 | + uint32 frts_end_cnt; /**< No of times frts ended since driver load */ |
---|
| 7402 | +} BWL_POST_PACKED_STRUCT wl_pwr_pm_awake_stats_v1_t; |
---|
| 7403 | +#include <packed_section_end.h> |
---|
| 7404 | + |
---|
| 7405 | +/** WL_PWRSTATS_TYPE_PM_AWAKE2 structures. Data sent as part of pwrstats IOVAR */ |
---|
| 7406 | +typedef struct pm_awake_data_v2 { |
---|
| 7407 | + uint32 curr_time; /**< ms */ |
---|
| 7408 | + uint32 hw_macc; /**< HW maccontrol */ |
---|
| 7409 | + uint32 sw_macc; /**< SW maccontrol */ |
---|
| 7410 | + uint32 pm_dur; /**< Total sleep time in PM, msecs */ |
---|
| 7411 | + uint32 mpc_dur; /**< Total sleep time in MPC, msecs */ |
---|
| 7412 | + |
---|
| 7413 | + /* int32 drifts = remote - local; +ve drift => local-clk slow */ |
---|
| 7414 | + int32 last_drift; /**< Most recent TSF drift from beacon */ |
---|
| 7415 | + int32 min_drift; /**< Min TSF drift from beacon in magnitude */ |
---|
| 7416 | + int32 max_drift; /**< Max TSF drift from beacon in magnitude */ |
---|
| 7417 | + |
---|
| 7418 | + uint32 avg_drift; /**< Avg TSF drift from beacon */ |
---|
| 7419 | + |
---|
| 7420 | + /* Wake history tracking */ |
---|
| 7421 | + |
---|
| 7422 | + /* pmstate array (type wlc_pm_debug_t) start offset */ |
---|
| 7423 | + uint16 pm_state_offset; |
---|
| 7424 | + /** pmstate number of array entries */ |
---|
| 7425 | + uint16 pm_state_len; |
---|
| 7426 | + |
---|
| 7427 | + /** array (type uint32) start offset */ |
---|
| 7428 | + uint16 pmd_event_wake_dur_offset; |
---|
| 7429 | + /** pmd_event_wake_dur number of array entries */ |
---|
| 7430 | + uint16 pmd_event_wake_dur_len; |
---|
| 7431 | + |
---|
| 7432 | + uint32 drift_cnt; /**< Count of drift readings over which avg_drift was computed */ |
---|
| 7433 | + uint8 pmwake_idx; /**< for stepping through pm_state */ |
---|
| 7434 | + uint8 flags; /**< bit0: 1-sleep, 0- wake. bit1: 0-bit0 invlid, 1-bit0 valid */ |
---|
| 7435 | + uint8 pad[2]; |
---|
| 7436 | + uint32 frts_time; /**< Cumulative ms spent in frts since driver load */ |
---|
| 7437 | + uint32 frts_end_cnt; /**< No of times frts ended since driver load */ |
---|
| 7438 | +} pm_awake_data_v2_t; |
---|
| 7439 | + |
---|
| 7440 | +typedef struct wl_pwr_pm_awake_stats_v2 { |
---|
| 7441 | + uint16 type; /**< WL_PWRSTATS_TYPE_PM_AWAKE */ |
---|
| 7442 | + uint16 len; /**< Up to 4K-1, top 4 bits are reserved */ |
---|
| 7443 | + |
---|
| 7444 | + pm_awake_data_v2_t awake_data; |
---|
| 7445 | +} wl_pwr_pm_awake_stats_v2_t; |
---|
| 7446 | + |
---|
| 7447 | +/* bit0: 1-sleep, 0- wake. bit1: 0-bit0 invlid, 1-bit0 valid */ |
---|
| 7448 | +#define WL_PWR_PM_AWAKE_STATS_WAKE 0x02 |
---|
| 7449 | +#define WL_PWR_PM_AWAKE_STATS_ASLEEP 0x03 |
---|
| 7450 | +#define WL_PWR_PM_AWAKE_STATS_WAKE_MASK 0x03 |
---|
| 7451 | + |
---|
| 7452 | +/* WL_PWRSTATS_TYPE_PM_AWAKE Version 2 structures taken from 4324/43342 */ |
---|
| 7453 | +/* These structures are only to be used with 4324/43342 devices */ |
---|
| 7454 | + |
---|
| 7455 | +#define WL_STA_AWAKE_STATES_MAX_V2 30 |
---|
| 7456 | +#define WL_PMD_EVENT_MAX_V2 32 |
---|
| 7457 | +#define MAX_P2P_BSS_DTIM_PRD 4 |
---|
| 7458 | + |
---|
| 7459 | +#include <packed_section_start.h> |
---|
| 7460 | +typedef BWL_PRE_PACKED_STRUCT struct ucode_dbg_v2 { |
---|
| 7461 | + uint32 macctrl; |
---|
| 7462 | + uint16 m_p2p_hps; |
---|
| 7463 | + uint16 m_p2p_bss_dtim_prd[MAX_P2P_BSS_DTIM_PRD]; |
---|
| 7464 | + uint32 psmdebug[20]; |
---|
| 7465 | + uint32 phydebug[20]; |
---|
| 7466 | + uint32 psm_brc; |
---|
| 7467 | + uint32 ifsstat; |
---|
| 7468 | +} BWL_POST_PACKED_STRUCT ucode_dbg_v2_t; |
---|
| 7469 | +#include <packed_section_end.h> |
---|
| 7470 | + |
---|
| 7471 | +#include <packed_section_start.h> |
---|
| 7472 | +typedef BWL_PRE_PACKED_STRUCT struct pmalert_awake_data_v2 { |
---|
4705 | 7473 | uint32 curr_time; /* ms */ |
---|
4706 | 7474 | uint32 hw_macc; /* HW maccontrol */ |
---|
4707 | 7475 | uint32 sw_macc; /* SW maccontrol */ |
---|
.. | .. |
---|
4717 | 7485 | |
---|
4718 | 7486 | /* Wake history tracking */ |
---|
4719 | 7487 | uint8 pmwake_idx; /* for stepping through pm_state */ |
---|
4720 | | - wlc_pm_debug_t pm_state[WLC_STA_AWAKE_STATES_MAX_V1]; /* timestamped wake bits */ |
---|
4721 | | - uint32 pmd_event_wake_dur[WLC_PMD_EVENT_MAX_V1]; /* cumulative usecs per wake reason */ |
---|
| 7488 | + wlc_pm_debug_t pm_state[WL_STA_AWAKE_STATES_MAX_V2]; /* timestamped wake bits */ |
---|
| 7489 | + uint32 pmd_event_wake_dur[WL_PMD_EVENT_MAX_V2]; /* cumulative usecs per wake reason */ |
---|
4722 | 7490 | uint32 drift_cnt; /* Count of drift readings over which avg_drift was computed */ |
---|
4723 | | -} BWL_POST_PACKED_STRUCT pm_awake_data_v1_t; |
---|
| 7491 | + uint32 start_event_dur[WL_PMD_EVENT_MAX_V2]; /* start event-duration */ |
---|
| 7492 | + ucode_dbg_v2_t ud; |
---|
| 7493 | + uint32 frts_time; /* Cumulative ms spent in frts since driver load */ |
---|
| 7494 | + uint32 frts_end_cnt; /* No of times frts ended since driver load */ |
---|
| 7495 | +} BWL_POST_PACKED_STRUCT pmalert_awake_data_v2_t; |
---|
| 7496 | +#include <packed_section_end.h> |
---|
4724 | 7497 | |
---|
4725 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_pwr_pm_awake_stats_v1 { |
---|
| 7498 | +#include <packed_section_start.h> |
---|
| 7499 | +typedef BWL_PRE_PACKED_STRUCT struct pm_alert_data_v2 { |
---|
| 7500 | + uint32 version; |
---|
| 7501 | + uint32 length; /* Length of entire structure */ |
---|
| 7502 | + uint32 reasons; /* reason(s) for pm_alert */ |
---|
| 7503 | + /* Following fields are present only for reasons |
---|
| 7504 | + * PM_DUR_EXCEEDED, MPC_DUR_EXCEEDED & CONST_AWAKE_DUR_EXCEEDED |
---|
| 7505 | + */ |
---|
| 7506 | + uint32 prev_stats_time; /* msecs */ |
---|
| 7507 | + uint32 prev_pm_dur; /* msecs */ |
---|
| 7508 | + uint32 prev_mpc_dur; /* msecs */ |
---|
| 7509 | + pmalert_awake_data_v2_t awake_data; |
---|
| 7510 | +} BWL_POST_PACKED_STRUCT pm_alert_data_v2_t; |
---|
| 7511 | +#include <packed_section_end.h> |
---|
| 7512 | + |
---|
| 7513 | +#include <packed_section_start.h> |
---|
| 7514 | +typedef BWL_PRE_PACKED_STRUCT struct wl_pwr_pm_awake_status_v2 { |
---|
4726 | 7515 | uint16 type; /* WL_PWRSTATS_TYPE_PM_AWAKE */ |
---|
4727 | 7516 | uint16 len; /* Up to 4K-1, top 4 bits are reserved */ |
---|
4728 | 7517 | |
---|
| 7518 | + pmalert_awake_data_v2_t awake_data; |
---|
| 7519 | + uint32 frts_time; /* Cumulative ms spent in frts since driver load */ |
---|
| 7520 | + uint32 frts_end_cnt; /* No of times frts ended since driver load */ |
---|
| 7521 | +} BWL_POST_PACKED_STRUCT wl_pwr_pm_awake_status_v2_t; |
---|
| 7522 | +#include <packed_section_end.h> |
---|
| 7523 | + |
---|
| 7524 | +/* Below are latest definitions from PHO25178RC100_BRANCH_6_50 */ |
---|
| 7525 | +/* wl_pwr_pm_awake_stats_v1_t is used for WL_PWRSTATS_TYPE_PM_AWAKE */ |
---|
| 7526 | +/* (at least) the chip independent registers */ |
---|
| 7527 | +typedef struct ucode_dbg_ext { |
---|
| 7528 | + uint32 x120; |
---|
| 7529 | + uint32 x124; |
---|
| 7530 | + uint32 x154; |
---|
| 7531 | + uint32 x158; |
---|
| 7532 | + uint32 x15c; |
---|
| 7533 | + uint32 x180; |
---|
| 7534 | + uint32 x184; |
---|
| 7535 | + uint32 x188; |
---|
| 7536 | + uint32 x18c; |
---|
| 7537 | + uint32 x1a0; |
---|
| 7538 | + uint32 x1a8; |
---|
| 7539 | + uint32 x1e0; |
---|
| 7540 | + uint32 scr_x14; |
---|
| 7541 | + uint32 scr_x2b; |
---|
| 7542 | + uint32 scr_x2c; |
---|
| 7543 | + uint32 scr_x2d; |
---|
| 7544 | + uint32 scr_x2e; |
---|
| 7545 | + |
---|
| 7546 | + uint16 x40a; |
---|
| 7547 | + uint16 x480; |
---|
| 7548 | + uint16 x490; |
---|
| 7549 | + uint16 x492; |
---|
| 7550 | + uint16 x4d8; |
---|
| 7551 | + uint16 x4b8; |
---|
| 7552 | + uint16 x4ba; |
---|
| 7553 | + uint16 x4bc; |
---|
| 7554 | + uint16 x4be; |
---|
| 7555 | + uint16 x500; |
---|
| 7556 | + uint16 x50e; |
---|
| 7557 | + uint16 x522; |
---|
| 7558 | + uint16 x546; |
---|
| 7559 | + uint16 x578; |
---|
| 7560 | + uint16 x602; |
---|
| 7561 | + uint16 x646; |
---|
| 7562 | + uint16 x648; |
---|
| 7563 | + uint16 x666; |
---|
| 7564 | + uint16 x670; |
---|
| 7565 | + uint16 x690; |
---|
| 7566 | + uint16 x692; |
---|
| 7567 | + uint16 x6a0; |
---|
| 7568 | + uint16 x6a2; |
---|
| 7569 | + uint16 x6a4; |
---|
| 7570 | + uint16 x6b2; |
---|
| 7571 | + uint16 x7c0; |
---|
| 7572 | + |
---|
| 7573 | + uint16 shm_x20; |
---|
| 7574 | + uint16 shm_x4a; |
---|
| 7575 | + uint16 shm_x5e; |
---|
| 7576 | + uint16 shm_x5f; |
---|
| 7577 | + uint16 shm_xaab; |
---|
| 7578 | + uint16 shm_x74a; |
---|
| 7579 | + uint16 shm_x74b; |
---|
| 7580 | + uint16 shm_x74c; |
---|
| 7581 | + uint16 shm_x74e; |
---|
| 7582 | + uint16 shm_x756; |
---|
| 7583 | + uint16 shm_x75b; |
---|
| 7584 | + uint16 shm_x7b9; |
---|
| 7585 | + uint16 shm_x7d4; |
---|
| 7586 | + |
---|
| 7587 | + uint16 shm_P2P_HPS; |
---|
| 7588 | + uint16 shm_P2P_intr[16]; |
---|
| 7589 | + uint16 shm_P2P_perbss[48]; |
---|
| 7590 | +} ucode_dbg_ext_t; |
---|
| 7591 | + |
---|
| 7592 | +#include <packed_section_start.h> |
---|
| 7593 | +typedef BWL_PRE_PACKED_STRUCT struct pm_alert_data_v1 { |
---|
| 7594 | + uint32 version; |
---|
| 7595 | + uint32 length; /**< Length of entire structure */ |
---|
| 7596 | + uint32 reasons; /**< reason(s) for pm_alert */ |
---|
| 7597 | + /* Following fields are present only for reasons |
---|
| 7598 | + * PM_DUR_EXCEEDED, MPC_DUR_EXCEEDED & CONST_AWAKE_DUR_EXCEEDED |
---|
| 7599 | + */ |
---|
| 7600 | + uint32 prev_stats_time; /**< msecs */ |
---|
| 7601 | + uint32 prev_pm_dur; /**< msecs */ |
---|
| 7602 | + uint32 prev_mpc_dur; /**< msecs */ |
---|
4729 | 7603 | pm_awake_data_v1_t awake_data; |
---|
4730 | | - uint32 frts_time; /* Cumulative ms spent in frts since driver load */ |
---|
4731 | | - uint32 frts_end_cnt; /* No of times frts ended since driver load */ |
---|
4732 | | -} BWL_POST_PACKED_STRUCT wl_pwr_pm_awake_stats_v1_t; |
---|
| 7604 | + uint32 start_event_dur[WLC_PMD_EVENT_MAX_V1]; /**< start event-duration */ |
---|
| 7605 | + ucode_dbg_v2_t ud; |
---|
| 7606 | + uint32 frts_time; /**< Cumulative ms spent in frts since driver load */ |
---|
| 7607 | + uint32 frts_end_cnt; /**< No of times frts ended since driver load */ |
---|
| 7608 | + ucode_dbg_ext_t ud_ext; |
---|
| 7609 | + uint32 prev_frts_dur; /**< ms */ |
---|
| 7610 | +} BWL_POST_PACKED_STRUCT pm_alert_data_v1_t; |
---|
| 7611 | +#include <packed_section_end.h> |
---|
4733 | 7612 | |
---|
4734 | | -/* WL_PWRSTATS_TYPE_PM_AWAKE2 structures */ |
---|
4735 | | -/* Data sent as part of pwrstats IOVAR */ |
---|
4736 | | -typedef BWL_PRE_PACKED_STRUCT struct pm_awake_data_v2 { |
---|
4737 | | - uint32 curr_time; /* ms */ |
---|
4738 | | - uint32 hw_macc; /* HW maccontrol */ |
---|
4739 | | - uint32 sw_macc; /* SW maccontrol */ |
---|
4740 | | - uint32 pm_dur; /* Total sleep time in PM, msecs */ |
---|
4741 | | - uint32 mpc_dur; /* Total sleep time in MPC, msecs */ |
---|
4742 | | - |
---|
4743 | | - /* int32 drifts = remote - local; +ve drift => local-clk slow */ |
---|
4744 | | - int32 last_drift; /* Most recent TSF drift from beacon */ |
---|
4745 | | - int32 min_drift; /* Min TSF drift from beacon in magnitude */ |
---|
4746 | | - int32 max_drift; /* Max TSF drift from beacon in magnitude */ |
---|
4747 | | - |
---|
4748 | | - uint32 avg_drift; /* Avg TSF drift from beacon */ |
---|
4749 | | - |
---|
4750 | | - /* Wake history tracking */ |
---|
4751 | | - |
---|
4752 | | - /* pmstate array (type wlc_pm_debug_t) start offset */ |
---|
4753 | | - uint16 pm_state_offset; |
---|
4754 | | - /* pmstate number of array entries */ |
---|
4755 | | - uint16 pm_state_len; |
---|
4756 | | - |
---|
4757 | | - /* array (type uint32) start offset */ |
---|
4758 | | - uint16 pmd_event_wake_dur_offset; |
---|
4759 | | - /* pmd_event_wake_dur number of array entries */ |
---|
4760 | | - uint16 pmd_event_wake_dur_len; |
---|
4761 | | - |
---|
4762 | | - uint32 drift_cnt; /* Count of drift readings over which avg_drift was computed */ |
---|
4763 | | - uint8 pmwake_idx; /* for stepping through pm_state */ |
---|
4764 | | - uint8 pad[3]; |
---|
4765 | | - uint32 frts_time; /* Cumulative ms spent in frts since driver load */ |
---|
4766 | | - uint32 frts_end_cnt; /* No of times frts ended since driver load */ |
---|
4767 | | -} BWL_POST_PACKED_STRUCT pm_awake_data_v2_t; |
---|
4768 | | - |
---|
4769 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_pwr_pm_awake_stats_v2 { |
---|
4770 | | - uint16 type; /* WL_PWRSTATS_TYPE_PM_AWAKE */ |
---|
4771 | | - uint16 len; /* Up to 4K-1, top 4 bits are reserved */ |
---|
4772 | | - |
---|
4773 | | - pm_awake_data_v2_t awake_data; |
---|
4774 | | -} BWL_POST_PACKED_STRUCT wl_pwr_pm_awake_stats_v2_t; |
---|
| 7613 | +/* End of 43342/4324 v2 structure definitions */ |
---|
4775 | 7614 | |
---|
4776 | 7615 | /* Original bus structure is for HSIC */ |
---|
4777 | | -typedef BWL_PRE_PACKED_STRUCT struct bus_metrics { |
---|
4778 | | - uint32 suspend_ct; /* suspend count */ |
---|
4779 | | - uint32 resume_ct; /* resume count */ |
---|
4780 | | - uint32 disconnect_ct; /* disconnect count */ |
---|
4781 | | - uint32 reconnect_ct; /* reconnect count */ |
---|
4782 | | - uint32 active_dur; /* msecs in bus, usecs for user */ |
---|
4783 | | - uint32 suspend_dur; /* msecs in bus, usecs for user */ |
---|
4784 | | - uint32 disconnect_dur; /* msecs in bus, usecs for user */ |
---|
4785 | | -} BWL_POST_PACKED_STRUCT bus_metrics_t; |
---|
4786 | 7616 | |
---|
4787 | | -/* Bus interface info for USB/HSIC */ |
---|
| 7617 | +typedef struct bus_metrics { |
---|
| 7618 | + uint32 suspend_ct; /**< suspend count */ |
---|
| 7619 | + uint32 resume_ct; /**< resume count */ |
---|
| 7620 | + uint32 disconnect_ct; /**< disconnect count */ |
---|
| 7621 | + uint32 reconnect_ct; /**< reconnect count */ |
---|
| 7622 | + uint32 active_dur; /**< msecs in bus, usecs for user */ |
---|
| 7623 | + uint32 suspend_dur; /**< msecs in bus, usecs for user */ |
---|
| 7624 | + uint32 disconnect_dur; /**< msecs in bus, usecs for user */ |
---|
| 7625 | +} bus_metrics_t; |
---|
| 7626 | + |
---|
| 7627 | +/** Bus interface info for USB/HSIC */ |
---|
| 7628 | +#include <packed_section_start.h> |
---|
4788 | 7629 | typedef BWL_PRE_PACKED_STRUCT struct wl_pwr_usb_hsic_stats { |
---|
4789 | | - uint16 type; /* WL_PWRSTATS_TYPE_USB_HSIC */ |
---|
4790 | | - uint16 len; /* Up to 4K-1, top 4 bits are reserved */ |
---|
| 7630 | + uint16 type; /**< WL_PWRSTATS_TYPE_USB_HSIC */ |
---|
| 7631 | + uint16 len; /**< Up to 4K-1, top 4 bits are reserved */ |
---|
4791 | 7632 | |
---|
4792 | | - bus_metrics_t hsic; /* stats from hsic bus driver */ |
---|
| 7633 | + bus_metrics_t hsic; /**< stats from hsic bus driver */ |
---|
4793 | 7634 | } BWL_POST_PACKED_STRUCT wl_pwr_usb_hsic_stats_t; |
---|
| 7635 | +#include <packed_section_end.h> |
---|
4794 | 7636 | |
---|
4795 | | -typedef BWL_PRE_PACKED_STRUCT struct pcie_bus_metrics { |
---|
4796 | | - uint32 d3_suspend_ct; /* suspend count */ |
---|
4797 | | - uint32 d0_resume_ct; /* resume count */ |
---|
4798 | | - uint32 perst_assrt_ct; /* PERST# assert count */ |
---|
4799 | | - uint32 perst_deassrt_ct; /* PERST# de-assert count */ |
---|
4800 | | - uint32 active_dur; /* msecs */ |
---|
4801 | | - uint32 d3_suspend_dur; /* msecs */ |
---|
4802 | | - uint32 perst_dur; /* msecs */ |
---|
4803 | | - uint32 l0_cnt; /* L0 entry count */ |
---|
4804 | | - uint32 l0_usecs; /* L0 duration in usecs */ |
---|
4805 | | - uint32 l1_cnt; /* L1 entry count */ |
---|
4806 | | - uint32 l1_usecs; /* L1 duration in usecs */ |
---|
4807 | | - uint32 l1_1_cnt; /* L1_1ss entry count */ |
---|
4808 | | - uint32 l1_1_usecs; /* L1_1ss duration in usecs */ |
---|
4809 | | - uint32 l1_2_cnt; /* L1_2ss entry count */ |
---|
4810 | | - uint32 l1_2_usecs; /* L1_2ss duration in usecs */ |
---|
4811 | | - uint32 l2_cnt; /* L2 entry count */ |
---|
4812 | | - uint32 l2_usecs; /* L2 duration in usecs */ |
---|
4813 | | - uint32 timestamp; /* Timestamp on when stats are collected */ |
---|
4814 | | - uint32 num_h2d_doorbell; /* # of doorbell interrupts - h2d */ |
---|
4815 | | - uint32 num_d2h_doorbell; /* # of doorbell interrupts - d2h */ |
---|
4816 | | - uint32 num_submissions; /* # of submissions */ |
---|
4817 | | - uint32 num_completions; /* # of completions */ |
---|
4818 | | - uint32 num_rxcmplt; /* # of rx completions */ |
---|
4819 | | - uint32 num_rxcmplt_drbl; /* of drbl interrupts for rx complt. */ |
---|
4820 | | - uint32 num_txstatus; /* # of tx completions */ |
---|
4821 | | - uint32 num_txstatus_drbl; /* of drbl interrupts for tx complt. */ |
---|
4822 | | - uint32 ltr_active_ct; /* # of times chip went to LTR ACTIVE */ |
---|
4823 | | - uint32 ltr_active_dur; /* # of msecs chip was in LTR ACTIVE */ |
---|
4824 | | - uint32 ltr_sleep_ct; /* # of times chip went to LTR SLEEP */ |
---|
4825 | | - uint32 ltr_sleep_dur; /* # of msecs chip was in LTR SLEEP */ |
---|
4826 | | - uint32 deepsleep_count; /* # of times chip went to deepsleep */ |
---|
4827 | | - uint32 deepsleep_dur; /* # of msecs chip was in deepsleep */ |
---|
4828 | | -} BWL_POST_PACKED_STRUCT pcie_bus_metrics_t; |
---|
| 7637 | +/* PCIe Event counter tlv IDs */ |
---|
| 7638 | +enum pcie_cnt_xtlv_id { |
---|
| 7639 | + PCIE_CNT_XTLV_METRICS = 0x1, /**< PCIe Bus Metrics */ |
---|
| 7640 | + PCIE_CNT_XTLV_BUS_CNT = 0x2 /**< PCIe Bus counters */ |
---|
| 7641 | +}; |
---|
4829 | 7642 | |
---|
4830 | | -/* Bus interface info for PCIE */ |
---|
4831 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_pwr_pcie_stats { |
---|
4832 | | - uint16 type; /* WL_PWRSTATS_TYPE_PCIE */ |
---|
4833 | | - uint16 len; /* Up to 4K-1, top 4 bits are reserved */ |
---|
4834 | | - pcie_bus_metrics_t pcie; /* stats from pcie bus driver */ |
---|
4835 | | -} BWL_POST_PACKED_STRUCT wl_pwr_pcie_stats_t; |
---|
| 7643 | +typedef struct pcie_bus_metrics { |
---|
| 7644 | + uint32 d3_suspend_ct; /**< suspend count */ |
---|
| 7645 | + uint32 d0_resume_ct; /**< resume count */ |
---|
| 7646 | + uint32 perst_assrt_ct; /**< PERST# assert count */ |
---|
| 7647 | + uint32 perst_deassrt_ct; /**< PERST# de-assert count */ |
---|
| 7648 | + uint32 active_dur; /**< msecs */ |
---|
| 7649 | + uint32 d3_suspend_dur; /**< msecs */ |
---|
| 7650 | + uint32 perst_dur; /**< msecs */ |
---|
| 7651 | + uint32 l0_cnt; /**< L0 entry count */ |
---|
| 7652 | + uint32 l0_usecs; /**< L0 duration in usecs */ |
---|
| 7653 | + uint32 l1_cnt; /**< L1 entry count */ |
---|
| 7654 | + uint32 l1_usecs; /**< L1 duration in usecs */ |
---|
| 7655 | + uint32 l1_1_cnt; /**< L1_1ss entry count */ |
---|
| 7656 | + uint32 l1_1_usecs; /**< L1_1ss duration in usecs */ |
---|
| 7657 | + uint32 l1_2_cnt; /**< L1_2ss entry count */ |
---|
| 7658 | + uint32 l1_2_usecs; /**< L1_2ss duration in usecs */ |
---|
| 7659 | + uint32 l2_cnt; /**< L2 entry count */ |
---|
| 7660 | + uint32 l2_usecs; /**< L2 duration in usecs */ |
---|
| 7661 | + uint32 timestamp; /**< Timestamp on when stats are collected */ |
---|
| 7662 | + uint32 num_h2d_doorbell; /**< # of doorbell interrupts - h2d */ |
---|
| 7663 | + uint32 num_d2h_doorbell; /**< # of doorbell interrupts - d2h */ |
---|
| 7664 | + uint32 num_submissions; /**< # of submissions */ |
---|
| 7665 | + uint32 num_completions; /**< # of completions */ |
---|
| 7666 | + uint32 num_rxcmplt; /**< # of rx completions */ |
---|
| 7667 | + uint32 num_rxcmplt_drbl; /**< of drbl interrupts for rx complt. */ |
---|
| 7668 | + uint32 num_txstatus; /**< # of tx completions */ |
---|
| 7669 | + uint32 num_txstatus_drbl; /**< of drbl interrupts for tx complt. */ |
---|
| 7670 | + uint32 deepsleep_count; /**< # of times chip went to deepsleep */ |
---|
| 7671 | + uint32 deepsleep_dur; /**< # of msecs chip was in deepsleep */ |
---|
| 7672 | + uint32 ltr_active_ct; /**< # of times chip went to LTR ACTIVE */ |
---|
| 7673 | + uint32 ltr_active_dur; /**< # of msecs chip was in LTR ACTIVE */ |
---|
| 7674 | + uint32 ltr_sleep_ct; /**< # of times chip went to LTR SLEEP */ |
---|
| 7675 | + uint32 ltr_sleep_dur; /**< # of msecs chip was in LTR SLEEP */ |
---|
| 7676 | +} pcie_bus_metrics_t; |
---|
4836 | 7677 | |
---|
4837 | | -/* Scan information history per category */ |
---|
4838 | | -typedef BWL_PRE_PACKED_STRUCT struct scan_data { |
---|
4839 | | - uint32 count; /* Number of scans performed */ |
---|
4840 | | - uint32 dur; /* Total time (in us) used */ |
---|
4841 | | -} BWL_POST_PACKED_STRUCT scan_data_t; |
---|
| 7678 | +typedef struct pcie_cnt { |
---|
| 7679 | + uint32 ltr_state; /**< Current LTR state */ |
---|
| 7680 | + uint32 l0_sr_cnt; /**< SR count during L0 */ |
---|
| 7681 | + uint32 l2l3_sr_cnt; /**< SR count during L2L3 */ |
---|
| 7682 | + uint32 d3_ack_sr_cnt; /**< srcount during last D3-ACK */ |
---|
| 7683 | + uint32 d3_sr_cnt; /**< SR count during D3 */ |
---|
| 7684 | + uint32 d3_info_start; /**< D3 INFORM received time */ |
---|
| 7685 | + uint32 d3_info_enter_cnt; /**< # of D3 INFORM received */ |
---|
| 7686 | + uint32 d3_cnt; /**< # of real D3 */ |
---|
| 7687 | + uint32 d3_ack_sent_cnt; /**< # of D3 ACK sent count */ |
---|
| 7688 | + uint32 d3_drop_cnt_event; /**< # of events dropped during D3 */ |
---|
| 7689 | + uint32 d2h_req_q_len; /**< # of Packet pending in D2H request queue */ |
---|
| 7690 | + uint32 hw_reason; /**< Last Host wake assert reason */ |
---|
| 7691 | + uint32 hw_assert_cnt; /**< # of times Host wake Asserted */ |
---|
| 7692 | + uint32 host_ready_cnt; /**< # of Host ready interrupts */ |
---|
| 7693 | + uint32 hw_assert_reason_0; /**< timestamp when hw_reason is TRAP */ |
---|
| 7694 | + uint32 hw_assert_reason_1; /**< timestamp when hw_reason is WL_EVENT */ |
---|
| 7695 | + uint32 hw_assert_reason_2; /**< timestamp when hw_reason is DATA */ |
---|
| 7696 | + uint32 hw_assert_reason_3; /**< timestamp when hw_reason is DELAYED_WAKE */ |
---|
| 7697 | + uint32 last_host_ready; /**< Timestamp of last Host ready */ |
---|
| 7698 | + bool hw_asserted; /**< Flag to indicate if Host wake is Asserted */ |
---|
| 7699 | + bool event_delivery_pend; /**< No resources to send event */ |
---|
| 7700 | + uint16 pad; /**< Word alignment for scripts */ |
---|
| 7701 | +} pcie_cnt_t; |
---|
4842 | 7702 | |
---|
4843 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_pwr_scan_stats { |
---|
4844 | | - uint16 type; /* WL_PWRSTATS_TYPE_SCAN */ |
---|
4845 | | - uint16 len; /* Up to 4K-1, top 4 bits are reserved */ |
---|
| 7703 | +/** Bus interface info for PCIE */ |
---|
| 7704 | +typedef struct wl_pwr_pcie_stats { |
---|
| 7705 | + uint16 type; /**< WL_PWRSTATS_TYPE_PCIE */ |
---|
| 7706 | + uint16 len; /**< Up to 4K-1, top 4 bits are reserved */ |
---|
| 7707 | + pcie_bus_metrics_t pcie; /**< stats from pcie bus driver */ |
---|
| 7708 | +} wl_pwr_pcie_stats_t; |
---|
| 7709 | + |
---|
| 7710 | +/** Scan information history per category */ |
---|
| 7711 | +typedef struct scan_data { |
---|
| 7712 | + uint32 count; /**< Number of scans performed */ |
---|
| 7713 | + uint32 dur; /**< Total time (in us) used */ |
---|
| 7714 | +} scan_data_t; |
---|
| 7715 | + |
---|
| 7716 | +typedef struct wl_pwr_scan_stats { |
---|
| 7717 | + uint16 type; /**< WL_PWRSTATS_TYPE_SCAN */ |
---|
| 7718 | + uint16 len; /**< Up to 4K-1, top 4 bits are reserved */ |
---|
4846 | 7719 | |
---|
4847 | 7720 | /* Scan history */ |
---|
4848 | | - scan_data_t user_scans; /* User-requested scans: (i/e/p)scan */ |
---|
4849 | | - scan_data_t assoc_scans; /* Scans initiated by association requests */ |
---|
4850 | | - scan_data_t roam_scans; /* Scans initiated by the roam engine */ |
---|
4851 | | - scan_data_t pno_scans[8]; /* For future PNO bucketing (BSSID, SSID, etc) */ |
---|
4852 | | - scan_data_t other_scans; /* Scan engine usage not assigned to the above */ |
---|
4853 | | -} BWL_POST_PACKED_STRUCT wl_pwr_scan_stats_t; |
---|
| 7721 | + scan_data_t user_scans; /**< User-requested scans: (i/e/p)scan */ |
---|
| 7722 | + scan_data_t assoc_scans; /**< Scans initiated by association requests */ |
---|
| 7723 | + scan_data_t roam_scans; /**< Scans initiated by the roam engine */ |
---|
| 7724 | + scan_data_t pno_scans[8]; /**< For future PNO bucketing (BSSID, SSID, etc) */ |
---|
| 7725 | + scan_data_t other_scans; /**< Scan engine usage not assigned to the above */ |
---|
| 7726 | +} wl_pwr_scan_stats_t; |
---|
4854 | 7727 | |
---|
4855 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_pwr_connect_stats { |
---|
4856 | | - uint16 type; /* WL_PWRSTATS_TYPE_SCAN */ |
---|
4857 | | - uint16 len; /* Up to 4K-1, top 4 bits are reserved */ |
---|
| 7728 | +typedef struct wl_pwr_connect_stats { |
---|
| 7729 | + uint16 type; /**< WL_PWRSTATS_TYPE_SCAN */ |
---|
| 7730 | + uint16 len; /**< Up to 4K-1, top 4 bits are reserved */ |
---|
4858 | 7731 | |
---|
4859 | 7732 | /* Connection (Association + Key exchange) data */ |
---|
4860 | | - uint32 count; /* Number of connections performed */ |
---|
4861 | | - uint32 dur; /* Total time (in ms) used */ |
---|
4862 | | -} BWL_POST_PACKED_STRUCT wl_pwr_connect_stats_t; |
---|
| 7733 | + uint32 count; /**< Number of connections performed */ |
---|
| 7734 | + uint32 dur; /**< Total time (in ms) used */ |
---|
| 7735 | +} wl_pwr_connect_stats_t; |
---|
4863 | 7736 | |
---|
4864 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_pwr_phy_stats { |
---|
4865 | | - uint16 type; /* WL_PWRSTATS_TYPE_PHY */ |
---|
4866 | | - uint16 len; /* Up to 4K-1, top 4 bits are reserved */ |
---|
4867 | | - uint32 tx_dur; /* TX Active duration in us */ |
---|
4868 | | - uint32 rx_dur; /* RX Active duration in us */ |
---|
4869 | | -} BWL_POST_PACKED_STRUCT wl_pwr_phy_stats_t; |
---|
| 7737 | +typedef struct wl_pwr_phy_stats { |
---|
| 7738 | + uint16 type; /**< WL_PWRSTATS_TYPE_PHY */ |
---|
| 7739 | + uint16 len; /**< Up to 4K-1, top 4 bits are reserved */ |
---|
| 7740 | + uint32 tx_dur; /**< TX Active duration in us */ |
---|
| 7741 | + uint32 rx_dur; /**< RX Active duration in us */ |
---|
| 7742 | +} wl_pwr_phy_stats_t; |
---|
4870 | 7743 | |
---|
| 7744 | +typedef struct wl_mimo_meas_metrics_v1 { |
---|
| 7745 | + uint16 type; |
---|
| 7746 | + uint16 len; |
---|
| 7747 | + /* Total time(us) idle in MIMO RX chain configuration */ |
---|
| 7748 | + uint32 total_idle_time_mimo; |
---|
| 7749 | + /* Total time(us) idle in SISO RX chain configuration */ |
---|
| 7750 | + uint32 total_idle_time_siso; |
---|
| 7751 | + /* Total receive time (us) in SISO RX chain configuration */ |
---|
| 7752 | + uint32 total_rx_time_siso; |
---|
| 7753 | + /* Total receive time (us) in MIMO RX chain configuration */ |
---|
| 7754 | + uint32 total_rx_time_mimo; |
---|
| 7755 | + /* Total 1-chain transmit time(us) */ |
---|
| 7756 | + uint32 total_tx_time_1chain; |
---|
| 7757 | + /* Total 2-chain transmit time(us) */ |
---|
| 7758 | + uint32 total_tx_time_2chain; |
---|
| 7759 | + /* Total 3-chain transmit time(us) */ |
---|
| 7760 | + uint32 total_tx_time_3chain; |
---|
| 7761 | +} wl_mimo_meas_metrics_v1_t; |
---|
| 7762 | + |
---|
| 7763 | +typedef struct wl_mimo_meas_metrics { |
---|
| 7764 | + uint16 type; |
---|
| 7765 | + uint16 len; |
---|
| 7766 | + /* Total time(us) idle in MIMO RX chain configuration */ |
---|
| 7767 | + uint32 total_idle_time_mimo; |
---|
| 7768 | + /* Total time(us) idle in SISO RX chain configuration */ |
---|
| 7769 | + uint32 total_idle_time_siso; |
---|
| 7770 | + /* Total receive time (us) in SISO RX chain configuration */ |
---|
| 7771 | + uint32 total_rx_time_siso; |
---|
| 7772 | + /* Total receive time (us) in MIMO RX chain configuration */ |
---|
| 7773 | + uint32 total_rx_time_mimo; |
---|
| 7774 | + /* Total 1-chain transmit time(us) */ |
---|
| 7775 | + uint32 total_tx_time_1chain; |
---|
| 7776 | + /* Total 2-chain transmit time(us) */ |
---|
| 7777 | + uint32 total_tx_time_2chain; |
---|
| 7778 | + /* Total 3-chain transmit time(us) */ |
---|
| 7779 | + uint32 total_tx_time_3chain; |
---|
| 7780 | + /* End of original, OCL fields start here */ |
---|
| 7781 | + /* Total time(us) idle in ocl mode */ |
---|
| 7782 | + uint32 total_idle_time_ocl; |
---|
| 7783 | + /* Total receive time (us) in ocl mode */ |
---|
| 7784 | + uint32 total_rx_time_ocl; |
---|
| 7785 | + /* End of OCL fields, internal adjustment fields here */ |
---|
| 7786 | + /* Total SIFS idle time in MIMO mode */ |
---|
| 7787 | + uint32 total_sifs_time_mimo; |
---|
| 7788 | + /* Total SIFS idle time in SISO mode */ |
---|
| 7789 | + uint32 total_sifs_time_siso; |
---|
| 7790 | +} wl_mimo_meas_metrics_t; |
---|
| 7791 | + |
---|
| 7792 | +typedef struct wl_pwr_slice_index { |
---|
| 7793 | + uint16 type; /* WL_PWRSTATS_TYPE_SLICE_INDEX */ |
---|
| 7794 | + uint16 len; |
---|
| 7795 | + |
---|
| 7796 | + uint32 slice_index; /* Slice index for which stats are meant for */ |
---|
| 7797 | +} wl_pwr_slice_index_t; |
---|
| 7798 | + |
---|
| 7799 | +typedef struct wl_pwr_tsync_stats { |
---|
| 7800 | + uint16 type; /**< WL_PWRSTATS_TYPE_TSYNC */ |
---|
| 7801 | + uint16 len; |
---|
| 7802 | + uint32 avb_uptime; /**< AVB uptime in msec */ |
---|
| 7803 | +} wl_pwr_tsync_stats_t; |
---|
| 7804 | + |
---|
| 7805 | +typedef struct wl_pwr_ops_stats { |
---|
| 7806 | + uint16 type; /* WL_PWRSTATS_TYPE_OPS_STATS */ |
---|
| 7807 | + uint16 len; /* total length includes fixed fields */ |
---|
| 7808 | + uint32 partial_ops_dur; /* Total time(in usec) partial ops duration */ |
---|
| 7809 | + uint32 full_ops_dur; /* Total time(in usec) full ops duration */ |
---|
| 7810 | +} wl_pwr_ops_stats_t; |
---|
| 7811 | + |
---|
| 7812 | +typedef struct wl_pwr_bcntrim_stats { |
---|
| 7813 | + uint16 type; /* WL_PWRSTATS_TYPE_BCNTRIM_STATS */ |
---|
| 7814 | + uint16 len; /* total length includes fixed fields */ |
---|
| 7815 | + uint8 associated; /* STA is associated ? */ |
---|
| 7816 | + uint8 slice_idx; /* on which slice STA is associated */ |
---|
| 7817 | + uint16 pad; /* padding */ |
---|
| 7818 | + uint32 slice_beacon_seen; /* number of beacons seen on the Infra |
---|
| 7819 | + * interface on this slice |
---|
| 7820 | + */ |
---|
| 7821 | + uint32 slice_beacon_trimmed; /* number beacons actually trimmed on this slice */ |
---|
| 7822 | + uint32 total_beacon_seen; /* total number of beacons seen on the Infra interface */ |
---|
| 7823 | + uint32 total_beacon_trimmed; /* total beacons actually trimmed */ |
---|
| 7824 | +} wl_pwr_bcntrim_stats_t; |
---|
| 7825 | + |
---|
| 7826 | +typedef struct wl_pwr_slice_index_band { |
---|
| 7827 | + uint16 type; /* WL_PWRSTATS_TYPE_SLICE_INDEX_BAND_INFO */ |
---|
| 7828 | + uint16 len; /* Total length includes fixed fields */ |
---|
| 7829 | + uint16 index; /* Slice Index */ |
---|
| 7830 | + int16 bandtype; /* Slice Bandtype */ |
---|
| 7831 | +} wl_pwr_slice_index_band_t; |
---|
| 7832 | + |
---|
| 7833 | +typedef struct wl_pwr_psbw_stats { |
---|
| 7834 | + uint16 type; /* WL_PWRSTATS_TYPE_PSBW_STATS */ |
---|
| 7835 | + uint16 len; /* total length includes fixed fields */ |
---|
| 7836 | + uint8 slice_idx; /* on which slice STA is associated */ |
---|
| 7837 | + uint8 pad[3]; |
---|
| 7838 | + uint32 slice_enable_dur; /* time(ms) psbw remains enabled on this slice */ |
---|
| 7839 | + uint32 total_enable_dur; /* time(ms) psbw remains enabled total */ |
---|
| 7840 | +} wl_pwr_psbw_stats_t; |
---|
4871 | 7841 | |
---|
4872 | 7842 | /* ##### End of Power Stats section ##### */ |
---|
4873 | 7843 | |
---|
4874 | | -/* IPV4 Arp offloads for ndis context */ |
---|
| 7844 | +/** IPV4 Arp offloads for ndis context */ |
---|
| 7845 | +#include <packed_section_start.h> |
---|
4875 | 7846 | BWL_PRE_PACKED_STRUCT struct hostip_id { |
---|
4876 | 7847 | struct ipv4_addr ipa; |
---|
4877 | 7848 | uint8 id; |
---|
4878 | 7849 | } BWL_POST_PACKED_STRUCT; |
---|
| 7850 | +#include <packed_section_end.h> |
---|
4879 | 7851 | |
---|
4880 | 7852 | /* Return values */ |
---|
4881 | | -#define ND_REPLY_PEER 0x1 /* Reply was sent to service NS request from peer */ |
---|
4882 | | -#define ND_REQ_SINK 0x2 /* Input packet should be discarded */ |
---|
4883 | | -#define ND_FORCE_FORWARD 0X3 /* For the dongle to forward req to HOST */ |
---|
| 7853 | +#define ND_REPLY_PEER 0x1 /**< Reply was sent to service NS request from peer */ |
---|
| 7854 | +#define ND_REQ_SINK 0x2 /**< Input packet should be discarded */ |
---|
| 7855 | +#define ND_FORCE_FORWARD 0X3 /**< For the dongle to forward req to HOST */ |
---|
4884 | 7856 | |
---|
4885 | | -/* Neighbor Solicitation Response Offload IOVAR param */ |
---|
| 7857 | +/** Neighbor Solicitation Response Offload IOVAR param */ |
---|
| 7858 | +#include <packed_section_start.h> |
---|
4886 | 7859 | typedef BWL_PRE_PACKED_STRUCT struct nd_param { |
---|
4887 | 7860 | struct ipv6_addr host_ip[2]; |
---|
4888 | 7861 | struct ipv6_addr solicit_ip; |
---|
.. | .. |
---|
4890 | 7863 | uint8 host_mac[ETHER_ADDR_LEN]; |
---|
4891 | 7864 | uint32 offload_id; |
---|
4892 | 7865 | } BWL_POST_PACKED_STRUCT nd_param_t; |
---|
| 7866 | +#include <packed_section_end.h> |
---|
4893 | 7867 | |
---|
4894 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_pfn_roam_thresh { |
---|
4895 | | - uint32 pfn_alert_thresh; /* time in ms */ |
---|
4896 | | - uint32 roam_alert_thresh; /* time in ms */ |
---|
4897 | | -} BWL_POST_PACKED_STRUCT wl_pfn_roam_thresh_t; |
---|
4898 | | - |
---|
| 7868 | +typedef struct wl_pfn_roam_thresh { |
---|
| 7869 | + uint32 pfn_alert_thresh; /**< time in ms */ |
---|
| 7870 | + uint32 roam_alert_thresh; /**< time in ms */ |
---|
| 7871 | +} wl_pfn_roam_thresh_t; |
---|
4899 | 7872 | |
---|
4900 | 7873 | /* Reasons for wl_pmalert_t */ |
---|
4901 | 7874 | #define PM_DUR_EXCEEDED (1<<0) |
---|
.. | .. |
---|
4907 | 7880 | |
---|
4908 | 7881 | #define MIN_PM_ALERT_LEN 9 |
---|
4909 | 7882 | |
---|
4910 | | -/* Data sent in EXCESS_PM_WAKE event */ |
---|
| 7883 | +/** Data sent in EXCESS_PM_WAKE event */ |
---|
4911 | 7884 | #define WL_PM_ALERT_VERSION 3 |
---|
4912 | 7885 | |
---|
4913 | | -#define MAX_P2P_BSS_DTIM_PRD 4 |
---|
4914 | | - |
---|
4915 | | -/* This structure is for version 3; version 2 will be deprecated in by FW */ |
---|
| 7886 | +/** This structure is for version 3; version 2 will be deprecated in by FW */ |
---|
| 7887 | +#include <packed_section_start.h> |
---|
4916 | 7888 | typedef BWL_PRE_PACKED_STRUCT struct wl_pmalert { |
---|
4917 | | - uint16 version; /* Version = 3 is TLV format */ |
---|
4918 | | - uint16 length; /* Length of entire structure */ |
---|
4919 | | - uint32 reasons; /* reason(s) for pm_alert */ |
---|
4920 | | - uint8 data[1]; /* TLV data, a series of structures, |
---|
| 7889 | + uint16 version; /**< Version = 3 is TLV format */ |
---|
| 7890 | + uint16 length; /**< Length of entire structure */ |
---|
| 7891 | + uint32 reasons; /**< reason(s) for pm_alert */ |
---|
| 7892 | + uint8 data[1]; /**< TLV data, a series of structures, |
---|
4921 | 7893 | * each starting with type and length. |
---|
4922 | 7894 | * |
---|
4923 | 7895 | * Padded as necessary so each section |
---|
.. | .. |
---|
4928 | 7900 | * valid len values are 0-4095. |
---|
4929 | 7901 | */ |
---|
4930 | 7902 | } BWL_POST_PACKED_STRUCT wl_pmalert_t; |
---|
| 7903 | +#include <packed_section_end.h> |
---|
4931 | 7904 | |
---|
4932 | 7905 | /* Type values for the data section */ |
---|
4933 | | -#define WL_PMALERT_FIXED 0 /* struct wl_pmalert_fixed_t, fixed fields */ |
---|
4934 | | -#define WL_PMALERT_PMSTATE 1 /* struct wl_pmalert_pmstate_t, variable */ |
---|
4935 | | -#define WL_PMALERT_EVENT_DUR 2 /* struct wl_pmalert_event_dur_t, variable */ |
---|
4936 | | -#define WL_PMALERT_UCODE_DBG 3 /* struct wl_pmalert_ucode_dbg_t, variable */ |
---|
4937 | | -#define WL_PMALERT_PS_ALLOWED_HIST 4 /* struct wl_pmalert_ps_allowed_history, variable */ |
---|
4938 | | -#define WL_PMALERT_EXT_UCODE_DBG 5 /* struct wl_pmalert_ext_ucode_dbg_t, variable */ |
---|
4939 | | -#define WL_PMALERT_EPM_START_EVENT_DUR 6 /* struct wl_pmalert_event_dur_t, variable */ |
---|
| 7906 | +#define WL_PMALERT_FIXED 0 /**< struct wl_pmalert_fixed_t, fixed fields */ |
---|
| 7907 | +#define WL_PMALERT_PMSTATE 1 /**< struct wl_pmalert_pmstate_t, variable */ |
---|
| 7908 | +#define WL_PMALERT_EVENT_DUR 2 /**< struct wl_pmalert_event_dur_t, variable */ |
---|
| 7909 | +#define WL_PMALERT_UCODE_DBG 3 /**< struct wl_pmalert_ucode_dbg_v1, variable */ |
---|
| 7910 | +#define WL_PMALERT_PS_ALLOWED_HIST 4 /**< struct wl_pmalert_ps_allowed_history, variable */ |
---|
| 7911 | +#define WL_PMALERT_EXT_UCODE_DBG 5 /**< struct wl_pmalert_ext_ucode_dbg_t, variable */ |
---|
| 7912 | +#define WL_PMALERT_EPM_START_EVENT_DUR 6 /**< struct wl_pmalert_event_dur_t, variable */ |
---|
| 7913 | +#define WL_PMALERT_UCODE_DBG_V2 7 /**< struct wl_pmalert_ucode_dbg_v2, variable */ |
---|
4940 | 7914 | |
---|
4941 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_pmalert_fixed { |
---|
4942 | | - uint16 type; /* WL_PMALERT_FIXED */ |
---|
4943 | | - uint16 len; /* Up to 4K-1, top 4 bits are reserved */ |
---|
4944 | | - uint32 prev_stats_time; /* msecs */ |
---|
4945 | | - uint32 curr_time; /* ms */ |
---|
4946 | | - uint32 prev_pm_dur; /* msecs */ |
---|
4947 | | - uint32 pm_dur; /* Total sleep time in PM, msecs */ |
---|
4948 | | - uint32 prev_mpc_dur; /* msecs */ |
---|
4949 | | - uint32 mpc_dur; /* Total sleep time in MPC, msecs */ |
---|
4950 | | - uint32 hw_macc; /* HW maccontrol */ |
---|
4951 | | - uint32 sw_macc; /* SW maccontrol */ |
---|
| 7915 | +typedef struct wl_pmalert_fixed { |
---|
| 7916 | + uint16 type; /**< WL_PMALERT_FIXED */ |
---|
| 7917 | + uint16 len; /**< Up to 4K-1, top 4 bits are reserved */ |
---|
| 7918 | + uint32 prev_stats_time; /**< msecs */ |
---|
| 7919 | + uint32 curr_time; /**< ms */ |
---|
| 7920 | + uint32 prev_pm_dur; /**< msecs */ |
---|
| 7921 | + uint32 pm_dur; /**< Total sleep time in PM, msecs */ |
---|
| 7922 | + uint32 prev_mpc_dur; /**< msecs */ |
---|
| 7923 | + uint32 mpc_dur; /**< Total sleep time in MPC, msecs */ |
---|
| 7924 | + uint32 hw_macc; /**< HW maccontrol */ |
---|
| 7925 | + uint32 sw_macc; /**< SW maccontrol */ |
---|
4952 | 7926 | |
---|
4953 | 7927 | /* int32 drifts = remote - local; +ve drift -> local-clk slow */ |
---|
4954 | | - int32 last_drift; /* Most recent TSF drift from beacon */ |
---|
4955 | | - int32 min_drift; /* Min TSF drift from beacon in magnitude */ |
---|
4956 | | - int32 max_drift; /* Max TSF drift from beacon in magnitude */ |
---|
| 7928 | + int32 last_drift; /**< Most recent TSF drift from beacon */ |
---|
| 7929 | + int32 min_drift; /**< Min TSF drift from beacon in magnitude */ |
---|
| 7930 | + int32 max_drift; /**< Max TSF drift from beacon in magnitude */ |
---|
4957 | 7931 | |
---|
4958 | | - uint32 avg_drift; /* Avg TSF drift from beacon */ |
---|
4959 | | - uint32 drift_cnt; /* Count of drift readings over which avg_drift was computed */ |
---|
4960 | | - uint32 frts_time; /* Cumulative ms spent in data frts since driver load */ |
---|
4961 | | - uint32 frts_end_cnt; /* No of times frts ended since driver load */ |
---|
4962 | | - uint32 prev_frts_dur; /* Data frts duration at start of pm-period */ |
---|
4963 | | - uint32 cal_dur; /* Cumulative ms spent in calibration */ |
---|
4964 | | - uint32 prev_cal_dur; /* cal duration at start of pm-period */ |
---|
4965 | | -} BWL_POST_PACKED_STRUCT wl_pmalert_fixed_t; |
---|
| 7932 | + uint32 avg_drift; /**< Avg TSF drift from beacon */ |
---|
| 7933 | + uint32 drift_cnt; /**< Count of drift readings over which avg_drift was computed */ |
---|
| 7934 | + uint32 frts_time; /**< Cumulative ms spent in data frts since driver load */ |
---|
| 7935 | + uint32 frts_end_cnt; /**< No of times frts ended since driver load */ |
---|
| 7936 | + uint32 prev_frts_dur; /**< Data frts duration at start of pm-period */ |
---|
| 7937 | + uint32 cal_dur; /**< Cumulative ms spent in calibration */ |
---|
| 7938 | + uint32 prev_cal_dur; /**< cal duration at start of pm-period */ |
---|
| 7939 | +} wl_pmalert_fixed_t; |
---|
4966 | 7940 | |
---|
4967 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_pmalert_pmstate { |
---|
4968 | | - uint16 type; /* WL_PMALERT_PMSTATE */ |
---|
4969 | | - uint16 len; /* Up to 4K-1, top 4 bits are reserved */ |
---|
| 7941 | +typedef struct wl_pmalert_pmstate { |
---|
| 7942 | + uint16 type; /**< WL_PMALERT_PMSTATE */ |
---|
| 7943 | + uint16 len; /**< Up to 4K-1, top 4 bits are reserved */ |
---|
4970 | 7944 | |
---|
4971 | | - uint8 pmwake_idx; /* for stepping through pm_state */ |
---|
| 7945 | + uint8 pmwake_idx; /**< for stepping through pm_state */ |
---|
4972 | 7946 | uint8 pad[3]; |
---|
4973 | 7947 | /* Array of pmstate; len of array is based on tlv len */ |
---|
4974 | 7948 | wlc_pm_debug_t pmstate[1]; |
---|
4975 | | -} BWL_POST_PACKED_STRUCT wl_pmalert_pmstate_t; |
---|
| 7949 | +} wl_pmalert_pmstate_t; |
---|
4976 | 7950 | |
---|
4977 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_pmalert_event_dur { |
---|
4978 | | - uint16 type; /* WL_PMALERT_EVENT_DUR */ |
---|
4979 | | - uint16 len; /* Up to 4K-1, top 4 bits are reserved */ |
---|
| 7951 | +typedef struct wl_pmalert_event_dur { |
---|
| 7952 | + uint16 type; /**< WL_PMALERT_EVENT_DUR */ |
---|
| 7953 | + uint16 len; /**< Up to 4K-1, top 4 bits are reserved */ |
---|
4980 | 7954 | |
---|
4981 | 7955 | /* Array of event_dur, len of array is based on tlv len */ |
---|
4982 | 7956 | uint32 event_dur[1]; |
---|
4983 | | -} BWL_POST_PACKED_STRUCT wl_pmalert_event_dur_t; |
---|
| 7957 | +} wl_pmalert_event_dur_t; |
---|
4984 | 7958 | |
---|
4985 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_pmalert_ucode_dbg { |
---|
4986 | | - uint16 type; /* WL_PMALERT_UCODE_DBG */ |
---|
4987 | | - uint16 len; /* Up to 4K-1, top 4 bits are reserved */ |
---|
| 7959 | +#include <packed_section_start.h> |
---|
| 7960 | +BWL_PRE_PACKED_STRUCT struct wl_pmalert_ucode_dbg_v1 { |
---|
| 7961 | + uint16 type; /* WL_PMALERT_UCODE_DBG */ |
---|
| 7962 | + uint16 len; /* Up to 4K-1, top 4 bits are reserved */ |
---|
4988 | 7963 | uint32 macctrl; |
---|
4989 | 7964 | uint16 m_p2p_hps; |
---|
4990 | 7965 | uint32 psm_brc; |
---|
.. | .. |
---|
4992 | 7967 | uint16 m_p2p_bss_dtim_prd[MAX_P2P_BSS_DTIM_PRD]; |
---|
4993 | 7968 | uint32 psmdebug[20]; |
---|
4994 | 7969 | uint32 phydebug[20]; |
---|
4995 | | -} BWL_POST_PACKED_STRUCT wl_pmalert_ucode_dbg_t; |
---|
| 7970 | + uint16 M_P2P_BSS[3][12]; |
---|
| 7971 | + uint16 M_P2P_PRE_TBTT[3]; |
---|
4996 | 7972 | |
---|
| 7973 | + /* Following is valid only for corerevs<40 */ |
---|
| 7974 | + uint16 xmtfifordy; |
---|
| 7975 | + |
---|
| 7976 | + /* Following 3 are valid only for 11ac corerevs (>=40) */ |
---|
| 7977 | + uint16 psm_maccommand; |
---|
| 7978 | + uint16 txe_status1; |
---|
| 7979 | + uint16 AQMFifoReady; |
---|
| 7980 | +} BWL_POST_PACKED_STRUCT; |
---|
| 7981 | +#include <packed_section_end.h> |
---|
| 7982 | + |
---|
| 7983 | +#include <packed_section_start.h> |
---|
| 7984 | +BWL_PRE_PACKED_STRUCT struct wl_pmalert_ucode_dbg_v2 { |
---|
| 7985 | + uint16 type; /**< WL_PMALERT_UCODE_DBG_V2 */ |
---|
| 7986 | + uint16 len; /**< Up to 4K-1, top 4 bits are reserved */ |
---|
| 7987 | + uint32 macctrl; |
---|
| 7988 | + uint16 m_p2p_hps; |
---|
| 7989 | + uint32 psm_brc; |
---|
| 7990 | + uint32 ifsstat; |
---|
| 7991 | + uint16 m_p2p_bss_dtim_prd[MAX_P2P_BSS_DTIM_PRD]; |
---|
| 7992 | + uint32 psmdebug[20]; |
---|
| 7993 | + uint32 phydebug[20]; |
---|
| 7994 | + uint16 M_P2P_BSS[3][12]; |
---|
| 7995 | + uint16 M_P2P_PRE_TBTT[3]; |
---|
| 7996 | + |
---|
| 7997 | + /* Following is valid only for corerevs<40 */ |
---|
| 7998 | + uint16 xmtfifordy; |
---|
| 7999 | + |
---|
| 8000 | + /* Following 3 are valid only for 11ac corerevs (>=40) */ |
---|
| 8001 | + uint16 psm_maccommand; |
---|
| 8002 | + uint16 txe_status1; |
---|
| 8003 | + uint32 AQMFifoReady; |
---|
| 8004 | +} BWL_POST_PACKED_STRUCT; |
---|
| 8005 | +#include <packed_section_end.h> |
---|
| 8006 | + |
---|
| 8007 | +typedef struct wlc_ps_debug { |
---|
| 8008 | + uint32 timestamp; /**< timestamp in millisecond */ |
---|
| 8009 | + uint32 ps_mask; /**< reason(s) for disallowing ps */ |
---|
| 8010 | +} wlc_ps_debug_t; |
---|
| 8011 | + |
---|
| 8012 | +typedef struct wl_pmalert_ps_allowed_hist { |
---|
| 8013 | + uint16 type; /**< WL_PMALERT_PS_ALLOWED_HIST */ |
---|
| 8014 | + uint16 len; /**< Up to 4K-1, top 4 bits are reserved */ |
---|
| 8015 | + uint32 ps_allowed_start_idx; |
---|
| 8016 | + /* Array of ps_debug, len of array is based on tlv len */ |
---|
| 8017 | + wlc_ps_debug_t ps_debug[1]; |
---|
| 8018 | +} wl_pmalert_ps_allowed_hist_t; |
---|
4997 | 8019 | |
---|
4998 | 8020 | /* Structures and constants used for "vndr_ie" IOVar interface */ |
---|
4999 | | -#define VNDR_IE_CMD_LEN 4 /* length of the set command string: |
---|
| 8021 | +#define VNDR_IE_CMD_LEN 4 /**< length of the set command string: |
---|
5000 | 8022 | * "add", "del" (+ NUL) |
---|
5001 | 8023 | */ |
---|
5002 | 8024 | |
---|
5003 | 8025 | #define VNDR_IE_INFO_HDR_LEN (sizeof(uint32)) |
---|
5004 | 8026 | |
---|
| 8027 | +#include <packed_section_start.h> |
---|
5005 | 8028 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5006 | | - uint32 pktflag; /* bitmask indicating which packet(s) contain this IE */ |
---|
5007 | | - vndr_ie_t vndr_ie_data; /* vendor IE data */ |
---|
| 8029 | + uint32 pktflag; /**< bitmask indicating which packet(s) contain this IE */ |
---|
| 8030 | + vndr_ie_t vndr_ie_data; /**< vendor IE data */ |
---|
5008 | 8031 | } BWL_POST_PACKED_STRUCT vndr_ie_info_t; |
---|
| 8032 | +#include <packed_section_end.h> |
---|
5009 | 8033 | |
---|
| 8034 | +#include <packed_section_start.h> |
---|
5010 | 8035 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5011 | | - int iecount; /* number of entries in the vndr_ie_list[] array */ |
---|
5012 | | - vndr_ie_info_t vndr_ie_list[1]; /* variable size list of vndr_ie_info_t structs */ |
---|
| 8036 | + int32 iecount; /**< number of entries in the vndr_ie_list[] array */ |
---|
| 8037 | + vndr_ie_info_t vndr_ie_list[1]; /**< variable size list of vndr_ie_info_t structs */ |
---|
5013 | 8038 | } BWL_POST_PACKED_STRUCT vndr_ie_buf_t; |
---|
| 8039 | +#include <packed_section_end.h> |
---|
5014 | 8040 | |
---|
| 8041 | +#include <packed_section_start.h> |
---|
5015 | 8042 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5016 | | - char cmd[VNDR_IE_CMD_LEN]; /* vndr_ie IOVar set command : "add", "del" + NUL */ |
---|
5017 | | - vndr_ie_buf_t vndr_ie_buffer; /* buffer containing Vendor IE list information */ |
---|
| 8043 | + char cmd[VNDR_IE_CMD_LEN]; /**< vndr_ie IOVar set command : "add", "del" + NUL */ |
---|
| 8044 | + vndr_ie_buf_t vndr_ie_buffer; /**< buffer containing Vendor IE list information */ |
---|
5018 | 8045 | } BWL_POST_PACKED_STRUCT vndr_ie_setbuf_t; |
---|
| 8046 | +#include <packed_section_end.h> |
---|
5019 | 8047 | |
---|
5020 | | -/* tag_ID/length/value_buffer tuple */ |
---|
| 8048 | +/** tag_ID/length/value_buffer tuple */ |
---|
| 8049 | +#include <packed_section_start.h> |
---|
5021 | 8050 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5022 | 8051 | uint8 id; |
---|
5023 | 8052 | uint8 len; |
---|
5024 | 8053 | uint8 data[1]; |
---|
5025 | 8054 | } BWL_POST_PACKED_STRUCT tlv_t; |
---|
| 8055 | +#include <packed_section_end.h> |
---|
5026 | 8056 | |
---|
| 8057 | +#include <packed_section_start.h> |
---|
5027 | 8058 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5028 | | - uint32 pktflag; /* bitmask indicating which packet(s) contain this IE */ |
---|
5029 | | - tlv_t ie_data; /* IE data */ |
---|
| 8059 | + uint32 pktflag; /**< bitmask indicating which packet(s) contain this IE */ |
---|
| 8060 | + tlv_t ie_data; /**< IE data */ |
---|
5030 | 8061 | } BWL_POST_PACKED_STRUCT ie_info_t; |
---|
| 8062 | +#include <packed_section_end.h> |
---|
5031 | 8063 | |
---|
| 8064 | +#include <packed_section_start.h> |
---|
5032 | 8065 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5033 | | - int iecount; /* number of entries in the ie_list[] array */ |
---|
5034 | | - ie_info_t ie_list[1]; /* variable size list of ie_info_t structs */ |
---|
| 8066 | + int32 iecount; /**< number of entries in the ie_list[] array */ |
---|
| 8067 | + ie_info_t ie_list[1]; /**< variable size list of ie_info_t structs */ |
---|
5035 | 8068 | } BWL_POST_PACKED_STRUCT ie_buf_t; |
---|
| 8069 | +#include <packed_section_end.h> |
---|
5036 | 8070 | |
---|
| 8071 | +#include <packed_section_start.h> |
---|
5037 | 8072 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5038 | | - char cmd[VNDR_IE_CMD_LEN]; /* ie IOVar set command : "add" + NUL */ |
---|
5039 | | - ie_buf_t ie_buffer; /* buffer containing IE list information */ |
---|
| 8073 | + char cmd[VNDR_IE_CMD_LEN]; /**< ie IOVar set command : "add" + NUL */ |
---|
| 8074 | + ie_buf_t ie_buffer; /**< buffer containing IE list information */ |
---|
5040 | 8075 | } BWL_POST_PACKED_STRUCT ie_setbuf_t; |
---|
| 8076 | +#include <packed_section_end.h> |
---|
5041 | 8077 | |
---|
| 8078 | +#include <packed_section_start.h> |
---|
5042 | 8079 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5043 | | - uint32 pktflag; /* bitmask indicating which packet(s) contain this IE */ |
---|
5044 | | - uint8 id; /* IE type */ |
---|
| 8080 | + uint32 pktflag; /**< bitmask indicating which packet(s) contain this IE */ |
---|
| 8081 | + uint8 id; /**< IE type */ |
---|
5045 | 8082 | } BWL_POST_PACKED_STRUCT ie_getbuf_t; |
---|
| 8083 | +#include <packed_section_end.h> |
---|
5046 | 8084 | |
---|
5047 | 8085 | /* structures used to define format of wps ie data from probe requests */ |
---|
5048 | 8086 | /* passed up to applications via iovar "prbreq_wpsie" */ |
---|
5049 | | -typedef BWL_PRE_PACKED_STRUCT struct sta_prbreq_wps_ie_hdr { |
---|
| 8087 | +typedef struct sta_prbreq_wps_ie_hdr { |
---|
5050 | 8088 | struct ether_addr staAddr; |
---|
5051 | 8089 | uint16 ieLen; |
---|
5052 | | -} BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_hdr_t; |
---|
| 8090 | +} sta_prbreq_wps_ie_hdr_t; |
---|
5053 | 8091 | |
---|
| 8092 | +#include <packed_section_start.h> |
---|
5054 | 8093 | typedef BWL_PRE_PACKED_STRUCT struct sta_prbreq_wps_ie_data { |
---|
5055 | 8094 | sta_prbreq_wps_ie_hdr_t hdr; |
---|
5056 | 8095 | uint8 ieData[1]; |
---|
5057 | 8096 | } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_data_t; |
---|
| 8097 | +#include <packed_section_end.h> |
---|
5058 | 8098 | |
---|
| 8099 | +#include <packed_section_start.h> |
---|
5059 | 8100 | typedef BWL_PRE_PACKED_STRUCT struct sta_prbreq_wps_ie_list { |
---|
5060 | 8101 | uint32 totLen; |
---|
5061 | 8102 | uint8 ieDataList[1]; |
---|
5062 | 8103 | } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_list_t; |
---|
| 8104 | +#include <packed_section_end.h> |
---|
5063 | 8105 | |
---|
5064 | | - |
---|
5065 | | -#ifdef WLMEDIA_TXFAILEVENT |
---|
5066 | | -typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5067 | | - char dest[ETHER_ADDR_LEN]; /* destination MAC */ |
---|
5068 | | - uint8 prio; /* Packet Priority */ |
---|
5069 | | - uint8 flags; /* Flags */ |
---|
5070 | | - uint32 tsf_l; /* TSF timer low */ |
---|
5071 | | - uint32 tsf_h; /* TSF timer high */ |
---|
5072 | | - uint16 rates; /* Main Rates */ |
---|
5073 | | - uint16 txstatus; /* TX Status */ |
---|
5074 | | -} BWL_POST_PACKED_STRUCT txfailinfo_t; |
---|
5075 | | -#endif /* WLMEDIA_TXFAILEVENT */ |
---|
5076 | | - |
---|
| 8106 | +#include <packed_section_start.h> |
---|
5077 | 8107 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5078 | 8108 | uint32 flags; |
---|
5079 | | - chanspec_t chanspec; /* txpwr report for this channel */ |
---|
5080 | | - chanspec_t local_chanspec; /* channel on which we are associated */ |
---|
5081 | | - uint8 local_max; /* local max according to the AP */ |
---|
5082 | | - uint8 local_constraint; /* local constraint according to the AP */ |
---|
5083 | | - int8 antgain[2]; /* Ant gain for each band - from SROM */ |
---|
5084 | | - uint8 rf_cores; /* count of RF Cores being reported */ |
---|
5085 | | - uint8 est_Pout[4]; /* Latest tx power out estimate per RF chain */ |
---|
5086 | | - uint8 est_Pout_act[4]; /* Latest tx power out estimate per RF chain w/o adjustment */ |
---|
5087 | | - uint8 est_Pout_cck; /* Latest CCK tx power out estimate */ |
---|
5088 | | - uint8 tx_power_max[4]; /* Maximum target power among all rates */ |
---|
5089 | | - uint tx_power_max_rate_ind[4]; /* Index of the rate with the max target power */ |
---|
5090 | | - int8 sar; /* SAR limit for display by wl executable */ |
---|
5091 | | - int8 channel_bandwidth; /* 20, 40 or 80 MHz bandwidth? */ |
---|
5092 | | - uint8 version; /* Version of the data format wlu <--> driver */ |
---|
5093 | | - uint8 display_core; /* Displayed curpower core */ |
---|
5094 | | - int8 target_offsets[4]; /* Target power offsets for current rate per core */ |
---|
5095 | | - uint32 last_tx_ratespec; /* Ratespec for last transmition */ |
---|
5096 | | -#ifdef WLTXPWR_PER_CORE |
---|
5097 | | - int8 user_target[WL_TXPWR_CORE_MAX]; |
---|
5098 | | -#if WL_TXPWR_CORE_MAX < 4 |
---|
5099 | | - int8 padding[sizeof(uint32) - WL_TXPWR_CORE_MAX]; |
---|
5100 | | -#else |
---|
5101 | | -#error "Please fix this padding for > 4 cores" |
---|
5102 | | -#endif /* WL_TXPWR_CORE_MAX */ |
---|
5103 | | -#else |
---|
5104 | | - uint32 user_target; |
---|
5105 | | -#endif /* WLTXPWR_PER_CORE */ |
---|
5106 | | - uint32 ppr_len; /* length of each ppr serialization buffer */ |
---|
| 8109 | + chanspec_t chanspec; /**< txpwr report for this channel */ |
---|
| 8110 | + chanspec_t local_chanspec; /**< channel on which we are associated */ |
---|
| 8111 | + uint8 local_max; /**< local max according to the AP */ |
---|
| 8112 | + uint8 local_constraint; /**< local constraint according to the AP */ |
---|
| 8113 | + int8 antgain[2]; /**< Ant gain for each band - from SROM */ |
---|
| 8114 | + uint8 rf_cores; /**< count of RF Cores being reported */ |
---|
| 8115 | + uint8 est_Pout[4]; /**< Latest tx power out estimate per RF chain */ |
---|
| 8116 | + uint8 est_Pout_act[4]; /**< Latest tx power out estimate per RF chain w/o adjustment */ |
---|
| 8117 | + uint8 est_Pout_cck; /**< Latest CCK tx power out estimate */ |
---|
| 8118 | + uint8 tx_power_max[4]; /**< Maximum target power among all rates */ |
---|
| 8119 | + uint32 tx_power_max_rate_ind[4]; /**< Index of the rate with the max target power */ |
---|
| 8120 | + int8 sar; /**< SAR limit for display by wl executable */ |
---|
| 8121 | + int8 channel_bandwidth; /**< 20, 40 or 80 MHz bandwidth? */ |
---|
| 8122 | + uint8 version; /**< Version of the data format wlu <--> driver */ |
---|
| 8123 | + uint8 display_core; /**< Displayed curpower core */ |
---|
| 8124 | + int8 target_offsets[4]; /**< Target power offsets for current rate per core */ |
---|
| 8125 | + uint32 last_tx_ratespec; /**< Ratespec for last transmition */ |
---|
| 8126 | + uint32 user_target; /**< user limit */ |
---|
| 8127 | + uint32 ppr_len; /**< length of each ppr serialization buffer */ |
---|
5107 | 8128 | int8 SARLIMIT[MAX_STREAMS_SUPPORTED]; |
---|
5108 | | - uint8 pprdata[1]; /* ppr serialization buffer */ |
---|
5109 | | -} BWL_POST_PACKED_STRUCT tx_pwr_rpt_t; |
---|
| 8129 | + uint8 pprdata[1]; /**< ppr serialization buffer */ |
---|
| 8130 | +} BWL_POST_PACKED_STRUCT tx_pwr_rpt_v1_t; |
---|
| 8131 | +#include <packed_section_end.h> |
---|
5110 | 8132 | |
---|
| 8133 | +#include <packed_section_start.h> |
---|
| 8134 | +typedef BWL_PRE_PACKED_STRUCT struct { |
---|
| 8135 | + uint32 flags; |
---|
| 8136 | + chanspec_t chanspec; /**< txpwr report for this channel */ |
---|
| 8137 | + chanspec_t local_chanspec; /**< channel on which we are associated */ |
---|
| 8138 | + uint8 local_max; /**< local max according to the AP */ |
---|
| 8139 | + uint8 local_constraint; /**< local constraint according to the AP */ |
---|
| 8140 | + int8 antgain[3]; /**< Ant gain for each band - from SROM */ |
---|
| 8141 | + uint8 rf_cores; /**< count of RF Cores being reported */ |
---|
| 8142 | + uint8 est_Pout[4]; /**< Latest tx power out estimate per RF chain */ |
---|
| 8143 | + uint8 est_Pout_act[4]; /**< Latest tx power out estimate per RF chain w/o adjustment */ |
---|
| 8144 | + uint8 est_Pout_cck; /**< Latest CCK tx power out estimate */ |
---|
| 8145 | + uint8 tx_power_max[4]; /**< Maximum target power among all rates */ |
---|
| 8146 | + uint32 tx_power_max_rate_ind[4]; /**< Index of the rate with the max target power */ |
---|
| 8147 | + int8 sar; /**< SAR limit for display by wl executable */ |
---|
| 8148 | + int8 channel_bandwidth; /**< 20, 40 or 80 MHz bandwidth? */ |
---|
| 8149 | + uint8 version; /**< Version of the data format wlu <--> driver */ |
---|
| 8150 | + uint8 display_core; /**< Displayed curpower core */ |
---|
| 8151 | + int8 target_offsets[4]; /**< Target power offsets for current rate per core */ |
---|
| 8152 | + uint32 last_tx_ratespec; /**< Ratespec for last transmition */ |
---|
| 8153 | + uint32 user_target; /**< user limit */ |
---|
| 8154 | + uint32 ppr_len; /**< length of each ppr serialization buffer */ |
---|
| 8155 | + int8 SARLIMIT[MAX_STREAMS_SUPPORTED]; |
---|
| 8156 | + uint8 pprdata[1]; /**< ppr serialization buffer */ |
---|
| 8157 | +} BWL_POST_PACKED_STRUCT tx_pwr_rpt_v2_t; |
---|
| 8158 | +#include <packed_section_end.h> |
---|
| 8159 | + |
---|
| 8160 | +#include <packed_section_start.h> |
---|
| 8161 | +typedef BWL_PRE_PACKED_STRUCT struct { |
---|
| 8162 | + uint8 version; /* Version of the data format wlu <--> driver */ |
---|
| 8163 | + uint32 length; /* Length token */ |
---|
| 8164 | +} BWL_POST_PACKED_STRUCT tx_pwr_rpt_version_t; |
---|
| 8165 | +#include <packed_section_end.h> |
---|
| 8166 | + |
---|
| 8167 | +#ifdef TBAND |
---|
| 8168 | +typedef tx_pwr_rpt_v2_t tx_pwr_rpt_t; |
---|
| 8169 | +#else |
---|
| 8170 | +typedef tx_pwr_rpt_v1_t tx_pwr_rpt_t; |
---|
| 8171 | +#endif /* TBAND */ |
---|
| 8172 | + |
---|
| 8173 | +#define TXPWR_RPT_LEN_TOKEN 0x5649414e /* Spells VIAN */ |
---|
| 8174 | +#define TXPWR_RPT_VERSION_V1 1 |
---|
| 8175 | +#define TXPWR_RPT_VERSION_V2 2 |
---|
| 8176 | + |
---|
| 8177 | +#include <packed_section_start.h> |
---|
5111 | 8178 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5112 | 8179 | struct ipv4_addr ipv4_addr; |
---|
5113 | 8180 | struct ether_addr nexthop; |
---|
5114 | 8181 | } BWL_POST_PACKED_STRUCT ibss_route_entry_t; |
---|
| 8182 | +#include <packed_section_end.h> |
---|
| 8183 | + |
---|
| 8184 | +#include <packed_section_start.h> |
---|
5115 | 8185 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5116 | 8186 | uint32 num_entry; |
---|
5117 | 8187 | ibss_route_entry_t route_entry[1]; |
---|
5118 | 8188 | } BWL_POST_PACKED_STRUCT ibss_route_tbl_t; |
---|
| 8189 | +#include <packed_section_end.h> |
---|
5119 | 8190 | |
---|
5120 | 8191 | #define MAX_IBSS_ROUTE_TBL_ENTRY 64 |
---|
5121 | 8192 | |
---|
5122 | 8193 | #define TXPWR_TARGET_VERSION 0 |
---|
| 8194 | +#include <packed_section_start.h> |
---|
5123 | 8195 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5124 | | - int32 version; /* version number */ |
---|
5125 | | - chanspec_t chanspec; /* txpwr report for this channel */ |
---|
5126 | | - int8 txpwr[WL_STA_ANT_MAX]; /* Max tx target power, in qdb */ |
---|
5127 | | - uint8 rf_cores; /* count of RF Cores being reported */ |
---|
| 8196 | + int32 version; /**< version number */ |
---|
| 8197 | + chanspec_t chanspec; /**< txpwr report for this channel */ |
---|
| 8198 | + int8 txpwr[WL_STA_ANT_MAX]; /**< Max tx target power, in qdb */ |
---|
| 8199 | + uint8 rf_cores; /**< count of RF Cores being reported */ |
---|
5128 | 8200 | } BWL_POST_PACKED_STRUCT txpwr_target_max_t; |
---|
| 8201 | +#include <packed_section_end.h> |
---|
5129 | 8202 | |
---|
5130 | 8203 | #define BSS_PEER_INFO_PARAM_CUR_VER 0 |
---|
5131 | | -/* Input structure for IOV_BSS_PEER_INFO */ |
---|
| 8204 | +/** Input structure for IOV_BSS_PEER_INFO */ |
---|
| 8205 | +#include <packed_section_start.h> |
---|
5132 | 8206 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5133 | 8207 | uint16 version; |
---|
5134 | | - struct ether_addr ea; /* peer MAC address */ |
---|
| 8208 | + struct ether_addr ea; /**< peer MAC address */ |
---|
5135 | 8209 | } BWL_POST_PACKED_STRUCT bss_peer_info_param_t; |
---|
| 8210 | +#include <packed_section_end.h> |
---|
5136 | 8211 | |
---|
5137 | 8212 | #define BSS_PEER_INFO_CUR_VER 0 |
---|
5138 | 8213 | |
---|
| 8214 | +#include <packed_section_start.h> |
---|
5139 | 8215 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5140 | 8216 | uint16 version; |
---|
5141 | 8217 | struct ether_addr ea; |
---|
5142 | 8218 | int32 rssi; |
---|
5143 | | - uint32 tx_rate; /* current tx rate */ |
---|
5144 | | - uint32 rx_rate; /* current rx rate */ |
---|
5145 | | - wl_rateset_t rateset; /* rateset in use */ |
---|
5146 | | - uint32 age; /* age in seconds */ |
---|
| 8219 | + uint32 tx_rate; /**< current tx rate */ |
---|
| 8220 | + uint32 rx_rate; /**< current rx rate */ |
---|
| 8221 | + wl_rateset_t rateset; /**< rateset in use */ |
---|
| 8222 | + uint32 age; /**< age in seconds */ |
---|
5147 | 8223 | } BWL_POST_PACKED_STRUCT bss_peer_info_t; |
---|
| 8224 | +#include <packed_section_end.h> |
---|
5148 | 8225 | |
---|
5149 | 8226 | #define BSS_PEER_LIST_INFO_CUR_VER 0 |
---|
5150 | 8227 | |
---|
| 8228 | +#include <packed_section_start.h> |
---|
5151 | 8229 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5152 | 8230 | uint16 version; |
---|
5153 | | - uint16 bss_peer_info_len; /* length of bss_peer_info_t */ |
---|
5154 | | - uint32 count; /* number of peer info */ |
---|
5155 | | - bss_peer_info_t peer_info[1]; /* peer info */ |
---|
| 8231 | + uint16 bss_peer_info_len; /**< length of bss_peer_info_t */ |
---|
| 8232 | + uint32 count; /**< number of peer info */ |
---|
| 8233 | + bss_peer_info_t peer_info[1]; /**< peer info */ |
---|
5156 | 8234 | } BWL_POST_PACKED_STRUCT bss_peer_list_info_t; |
---|
| 8235 | +#include <packed_section_end.h> |
---|
5157 | 8236 | |
---|
5158 | 8237 | #define BSS_PEER_LIST_INFO_FIXED_LEN OFFSETOF(bss_peer_list_info_t, peer_info) |
---|
5159 | 8238 | |
---|
5160 | 8239 | #define AIBSS_BCN_FORCE_CONFIG_VER_0 0 |
---|
5161 | 8240 | |
---|
5162 | | -/* structure used to configure AIBSS beacon force xmit */ |
---|
| 8241 | +/** structure used to configure AIBSS beacon force xmit */ |
---|
| 8242 | +#include <packed_section_start.h> |
---|
5163 | 8243 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5164 | 8244 | uint16 version; |
---|
5165 | 8245 | uint16 len; |
---|
5166 | | - uint32 initial_min_bcn_dur; /* dur in ms to check a bcn in bcn_flood period */ |
---|
5167 | | - uint32 min_bcn_dur; /* dur in ms to check a bcn after bcn_flood period */ |
---|
5168 | | - uint32 bcn_flood_dur; /* Initial bcn xmit period in ms */ |
---|
| 8246 | + uint32 initial_min_bcn_dur; /**< dur in ms to check a bcn in bcn_flood period */ |
---|
| 8247 | + uint32 min_bcn_dur; /**< dur in ms to check a bcn after bcn_flood period */ |
---|
| 8248 | + uint32 bcn_flood_dur; /**< Initial bcn xmit period in ms */ |
---|
5169 | 8249 | } BWL_POST_PACKED_STRUCT aibss_bcn_force_config_t; |
---|
| 8250 | +#include <packed_section_end.h> |
---|
5170 | 8251 | |
---|
5171 | 8252 | #define AIBSS_TXFAIL_CONFIG_VER_0 0 |
---|
5172 | 8253 | #define AIBSS_TXFAIL_CONFIG_VER_1 1 |
---|
5173 | 8254 | #define AIBSS_TXFAIL_CONFIG_CUR_VER AIBSS_TXFAIL_CONFIG_VER_1 |
---|
5174 | 8255 | |
---|
5175 | | -/* structure used to configure aibss tx fail event */ |
---|
| 8256 | +/** structure used to configure aibss tx fail event */ |
---|
| 8257 | +#include <packed_section_start.h> |
---|
5176 | 8258 | typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5177 | 8259 | uint16 version; |
---|
5178 | 8260 | uint16 len; |
---|
5179 | | - uint32 bcn_timeout; /* dur in seconds to receive 1 bcn */ |
---|
5180 | | - uint32 max_tx_retry; /* no of consecutive no acks to send txfail event */ |
---|
5181 | | - uint32 max_atim_failure; /* no of consecutive atim failure */ |
---|
| 8261 | + uint32 bcn_timeout; /**< dur in seconds to receive 1 bcn */ |
---|
| 8262 | + uint32 max_tx_retry; /**< no of consecutive no acks to send txfail event */ |
---|
| 8263 | + uint32 max_atim_failure; /**< no of consecutive atim failure */ |
---|
5182 | 8264 | } BWL_POST_PACKED_STRUCT aibss_txfail_config_t; |
---|
| 8265 | +#include <packed_section_end.h> |
---|
5183 | 8266 | |
---|
| 8267 | +#include <packed_section_start.h> |
---|
5184 | 8268 | typedef BWL_PRE_PACKED_STRUCT struct wl_aibss_if { |
---|
5185 | 8269 | uint16 version; |
---|
5186 | 8270 | uint16 len; |
---|
.. | .. |
---|
5188 | 8272 | struct ether_addr addr; |
---|
5189 | 8273 | chanspec_t chspec; |
---|
5190 | 8274 | } BWL_POST_PACKED_STRUCT wl_aibss_if_t; |
---|
| 8275 | +#include <packed_section_end.h> |
---|
5191 | 8276 | |
---|
| 8277 | +#include <packed_section_start.h> |
---|
5192 | 8278 | typedef BWL_PRE_PACKED_STRUCT struct wlc_ipfo_route_entry { |
---|
5193 | 8279 | struct ipv4_addr ip_addr; |
---|
5194 | 8280 | struct ether_addr nexthop; |
---|
5195 | 8281 | } BWL_POST_PACKED_STRUCT wlc_ipfo_route_entry_t; |
---|
| 8282 | +#include <packed_section_end.h> |
---|
5196 | 8283 | |
---|
| 8284 | +#include <packed_section_start.h> |
---|
5197 | 8285 | typedef BWL_PRE_PACKED_STRUCT struct wlc_ipfo_route_tbl { |
---|
5198 | 8286 | uint32 num_entry; |
---|
5199 | 8287 | wlc_ipfo_route_entry_t route_entry[1]; |
---|
5200 | 8288 | } BWL_POST_PACKED_STRUCT wlc_ipfo_route_tbl_t; |
---|
| 8289 | +#include <packed_section_end.h> |
---|
5201 | 8290 | |
---|
5202 | | -#ifdef WL_OLDPPR |
---|
5203 | | -#define WL_CLM_NUM_RATES 178 |
---|
5204 | | -typedef BWL_PRE_PACKED_STRUCT struct { |
---|
5205 | | - uint32 flags; |
---|
5206 | | - chanspec_t chanspec; /* txpwr report for this channel */ |
---|
5207 | | - chanspec_t local_chanspec; /* channel on which we are associated */ |
---|
5208 | | - uint8 local_max; /* local max according to the AP */ |
---|
5209 | | - uint8 local_constraint; /* local constraint according to the AP */ |
---|
5210 | | - int8 antgain[2]; /* Ant gain for each band - from SROM */ |
---|
5211 | | - uint8 rf_cores; /* count of RF Cores being reported */ |
---|
5212 | | - uint8 est_Pout[4]; /* Latest tx power out estimate per RF chain */ |
---|
5213 | | - uint8 est_Pout_act[4]; /* Latest tx power out estimate per RF chain |
---|
5214 | | - * without adjustment |
---|
5215 | | - */ |
---|
5216 | | - uint8 est_Pout_cck; /* Latest CCK tx power out estimate */ |
---|
5217 | | - uint8 tx_power_max[4]; /* Maximum target power among all rates */ |
---|
5218 | | - uint8 tx_power_max_rate_ind[4]; /* Index of the rate with the max target power */ |
---|
5219 | | - uint8 user_limit; /* User limit */ |
---|
5220 | | - int8 clm_limits[WL_CLM_NUM_RATES]; /* regulatory limits - 20 or 40MHz */ |
---|
5221 | | - int8 clm_limits20in40[WL_CLM_NUM_RATES]; /* regulatory limits - 20in40MHz */ |
---|
5222 | | - int8 sar; /* SAR limit for display by wl executable */ |
---|
5223 | | - bool bandwidth_is_20MHz; /* 20 or 40MHz bandwidth? */ |
---|
5224 | | - uint board_limit_len; /* board limit buffer length */ |
---|
5225 | | - uint target_len; /* target limit buffer length */ |
---|
5226 | | - uint8 ppr_buf[1]; /* ppr serialization buffer */ |
---|
5227 | | -} BWL_POST_PACKED_STRUCT tx_pwr_rpt_t_old; |
---|
5228 | | -#endif /* WL_OLDPPR */ |
---|
| 8291 | +/* Version of wlc_btc_stats_t structure. |
---|
| 8292 | + * Increment whenever a change is made to wlc_btc_stats_t |
---|
| 8293 | + */ |
---|
| 8294 | +#define BTCX_STATS_VER_4 4 |
---|
| 8295 | +typedef struct wlc_btc_stats_v4 { |
---|
| 8296 | + uint16 version; /* version number of struct */ |
---|
| 8297 | + uint16 valid; /* Size of this struct */ |
---|
| 8298 | + uint32 stats_update_timestamp; /* tStamp when data is updated. */ |
---|
| 8299 | + uint32 btc_status; /* Hybrid/TDM indicator: Bit2:Hybrid, Bit1:TDM,Bit0:CoexEnabled */ |
---|
| 8300 | + uint32 bt_req_type_map; /* BT Antenna Req types since last stats sample */ |
---|
| 8301 | + uint32 bt_req_cnt; /* #BT antenna requests since last stats sampl */ |
---|
| 8302 | + uint32 bt_gnt_cnt; /* #BT antenna grants since last stats sample */ |
---|
| 8303 | + uint32 bt_gnt_dur; /* usec BT owns antenna since last stats sample */ |
---|
| 8304 | + uint16 bt_abort_cnt; /* #Times WL was preempted due to BT since WL up */ |
---|
| 8305 | + uint16 bt_rxf1ovfl_cnt; /* #Time PSNULL retry count exceeded since WL up */ |
---|
| 8306 | + uint16 bt_latency_cnt; /* #Time ucode high latency detected since WL up */ |
---|
| 8307 | + uint16 bt_succ_pm_protect_cnt; /* successful PM protection */ |
---|
| 8308 | + uint16 bt_succ_cts_cnt; /* successful CTS2A protection */ |
---|
| 8309 | + uint16 bt_wlan_tx_preempt_cnt; /* WLAN TX Preemption */ |
---|
| 8310 | + uint16 bt_wlan_rx_preempt_cnt; /* WLAN RX Preemption */ |
---|
| 8311 | + uint16 bt_ap_tx_after_pm_cnt; /* AP TX even after PM protection */ |
---|
| 8312 | + uint16 bt_peraud_cumu_gnt_cnt; /* Grant cnt for periodic audio */ |
---|
| 8313 | + uint16 bt_peraud_cumu_deny_cnt; /* Deny cnt for periodic audio */ |
---|
| 8314 | + uint16 bt_a2dp_cumu_gnt_cnt; /* Grant cnt for A2DP */ |
---|
| 8315 | + uint16 bt_a2dp_cumu_deny_cnt; /* Deny cnt for A2DP */ |
---|
| 8316 | + uint16 bt_sniff_cumu_gnt_cnt; /* Grant cnt for Sniff */ |
---|
| 8317 | + uint16 bt_sniff_cumu_deny_cnt; /* Deny cnt for Sniff */ |
---|
| 8318 | + uint16 bt_dcsn_map; /* Accumulated decision bitmap once Ant grant */ |
---|
| 8319 | + uint16 bt_dcsn_cnt; /* Accumulated decision bitmap counters once Ant grant */ |
---|
| 8320 | + uint16 bt_a2dp_hiwat_cnt; /* Ant grant by a2dp high watermark */ |
---|
| 8321 | + uint16 bt_datadelay_cnt; /* Ant grant by acl/a2dp datadelay */ |
---|
| 8322 | + uint16 bt_crtpri_cnt; /* Ant grant by critical BT task */ |
---|
| 8323 | + uint16 bt_pri_cnt; /* Ant grant by high BT task */ |
---|
| 8324 | + uint16 a2dpbuf1cnt; /* Ant request with a2dp buffercnt 1 */ |
---|
| 8325 | + uint16 a2dpbuf2cnt; /* Ant request with a2dp buffercnt 2 */ |
---|
| 8326 | + uint16 a2dpbuf3cnt; /* Ant request with a2dp buffercnt 3 */ |
---|
| 8327 | + uint16 a2dpbuf4cnt; /* Ant request with a2dp buffercnt 4 */ |
---|
| 8328 | + uint16 a2dpbuf5cnt; /* Ant request with a2dp buffercnt 5 */ |
---|
| 8329 | + uint16 a2dpbuf6cnt; /* Ant request with a2dp buffercnt 6 */ |
---|
| 8330 | + uint16 a2dpbuf7cnt; /* Ant request with a2dp buffercnt 7 */ |
---|
| 8331 | + uint16 a2dpbuf8cnt; /* Ant request with a2dp buffercnt 8 */ |
---|
| 8332 | + uint16 antgrant_lt10ms; /* Ant grant duration cnt 0~10ms */ |
---|
| 8333 | + uint16 antgrant_lt30ms; /* Ant grant duration cnt 10~30ms */ |
---|
| 8334 | + uint16 antgrant_lt60ms; /* Ant grant duration cnt 30~60ms */ |
---|
| 8335 | + uint16 antgrant_ge60ms; /* Ant grant duration cnt 60~ms */ |
---|
| 8336 | +} wlc_btc_stats_v4_t; |
---|
| 8337 | + |
---|
| 8338 | +#define BTCX_STATS_VER_3 3 |
---|
| 8339 | + |
---|
| 8340 | +typedef struct wlc_btc_stats_v3 { |
---|
| 8341 | + uint16 version; /* version number of struct */ |
---|
| 8342 | + uint16 valid; /* Size of this struct */ |
---|
| 8343 | + uint32 stats_update_timestamp; /* tStamp when data is updated. */ |
---|
| 8344 | + uint32 btc_status; /* Hybrid/TDM indicator: Bit2:Hybrid, Bit1:TDM,Bit0:CoexEnabled */ |
---|
| 8345 | + uint32 bt_req_type_map; /* BT Antenna Req types since last stats sample */ |
---|
| 8346 | + uint32 bt_req_cnt; /* #BT antenna requests since last stats sampl */ |
---|
| 8347 | + uint32 bt_gnt_cnt; /* #BT antenna grants since last stats sample */ |
---|
| 8348 | + uint32 bt_gnt_dur; /* usec BT owns antenna since last stats sample */ |
---|
| 8349 | + uint16 bt_abort_cnt; /* #Times WL was preempted due to BT since WL up */ |
---|
| 8350 | + uint16 bt_rxf1ovfl_cnt; /* #Time PSNULL retry count exceeded since WL up */ |
---|
| 8351 | + uint16 bt_latency_cnt; /* #Time ucode high latency detected since WL up */ |
---|
| 8352 | + uint16 rsvd; /* pad to align struct to 32bit bndry */ |
---|
| 8353 | + uint16 bt_succ_pm_protect_cnt; /* successful PM protection */ |
---|
| 8354 | + uint16 bt_succ_cts_cnt; /* successful CTS2A protection */ |
---|
| 8355 | + uint16 bt_wlan_tx_preempt_cnt; /* WLAN TX Preemption */ |
---|
| 8356 | + uint16 bt_wlan_rx_preempt_cnt; /* WLAN RX Preemption */ |
---|
| 8357 | + uint16 bt_ap_tx_after_pm_cnt; /* AP TX even after PM protection */ |
---|
| 8358 | + uint16 bt_peraud_cumu_gnt_cnt; /* Grant cnt for periodic audio */ |
---|
| 8359 | + uint16 bt_peraud_cumu_deny_cnt; /* Deny cnt for periodic audio */ |
---|
| 8360 | + uint16 bt_a2dp_cumu_gnt_cnt; /* Grant cnt for A2DP */ |
---|
| 8361 | + uint16 bt_a2dp_cumu_deny_cnt; /* Deny cnt for A2DP */ |
---|
| 8362 | + uint16 bt_sniff_cumu_gnt_cnt; /* Grant cnt for Sniff */ |
---|
| 8363 | + uint16 bt_sniff_cumu_deny_cnt; /* Deny cnt for Sniff */ |
---|
| 8364 | + uint8 pad; /* Padding */ |
---|
| 8365 | + uint8 slice_index; /* Slice to report */ |
---|
| 8366 | +} wlc_btc_stats_v3_t; |
---|
| 8367 | + |
---|
| 8368 | +#define BTCX_STATS_VER_2 2 |
---|
| 8369 | + |
---|
| 8370 | +typedef struct wlc_btc_stats_v2 { |
---|
| 8371 | + uint16 version; /* version number of struct */ |
---|
| 8372 | + uint16 valid; /* Size of this struct */ |
---|
| 8373 | + uint32 stats_update_timestamp; /* tStamp when data is updated. */ |
---|
| 8374 | + uint32 btc_status; /* Hybrid/TDM indicator: Bit2:Hybrid, Bit1:TDM,Bit0:CoexEnabled */ |
---|
| 8375 | + uint32 bt_req_type_map; /* BT Antenna Req types since last stats sample */ |
---|
| 8376 | + uint32 bt_req_cnt; /* #BT antenna requests since last stats sampl */ |
---|
| 8377 | + uint32 bt_gnt_cnt; /* #BT antenna grants since last stats sample */ |
---|
| 8378 | + uint32 bt_gnt_dur; /* usec BT owns antenna since last stats sample */ |
---|
| 8379 | + uint16 bt_abort_cnt; /* #Times WL was preempted due to BT since WL up */ |
---|
| 8380 | + uint16 bt_rxf1ovfl_cnt; /* #Time PSNULL retry count exceeded since WL up */ |
---|
| 8381 | + uint16 bt_latency_cnt; /* #Time ucode high latency detected since WL up */ |
---|
| 8382 | + uint16 rsvd; /* pad to align struct to 32bit bndry */ |
---|
| 8383 | +} wlc_btc_stats_v2_t; |
---|
| 8384 | + |
---|
| 8385 | +/* Durations for each bt task in millisecond */ |
---|
| 8386 | +#define WL_BTCX_DURSTATS_VER_1 (1u) |
---|
| 8387 | +typedef struct wlc_btcx_durstats_v1 { |
---|
| 8388 | + uint16 version; /* version number of struct */ |
---|
| 8389 | + uint16 valid; /* validity of this struct */ |
---|
| 8390 | + uint32 stats_update_timestamp; /* tStamp when data is updated */ |
---|
| 8391 | + uint16 bt_acl_dur; /* acl duration in ms */ |
---|
| 8392 | + uint16 bt_sco_dur; /* sco duration in ms */ |
---|
| 8393 | + uint16 bt_esco_dur; /* esco duration in ms */ |
---|
| 8394 | + uint16 bt_a2dp_dur; /* a2dp duration in ms */ |
---|
| 8395 | + uint16 bt_sniff_dur; /* sniff duration in ms */ |
---|
| 8396 | + uint16 bt_pscan_dur; /* page scan duration in ms */ |
---|
| 8397 | + uint16 bt_iscan_dur; /* inquiry scan duration in ms */ |
---|
| 8398 | + uint16 bt_page_dur; /* paging duration in ms */ |
---|
| 8399 | + uint16 bt_inquiry_dur; /* inquiry duration in ms */ |
---|
| 8400 | + uint16 bt_mss_dur; /* mss duration in ms */ |
---|
| 8401 | + uint16 bt_park_dur; /* park duration in ms */ |
---|
| 8402 | + uint16 bt_rssiscan_dur; /* rssiscan duration in ms */ |
---|
| 8403 | + uint16 bt_iscan_sco_dur; /* inquiry scan sco duration in ms */ |
---|
| 8404 | + uint16 bt_pscan_sco_dur; /* page scan sco duration in ms */ |
---|
| 8405 | + uint16 bt_tpoll_dur; /* tpoll duration in ms */ |
---|
| 8406 | + uint16 bt_sacq_dur; /* sacq duration in ms */ |
---|
| 8407 | + uint16 bt_sdata_dur; /* sdata duration in ms */ |
---|
| 8408 | + uint16 bt_rs_listen_dur; /* rs listen duration in ms */ |
---|
| 8409 | + uint16 bt_rs_burst_dur; /* rs brust duration in ms */ |
---|
| 8410 | + uint16 bt_ble_adv_dur; /* ble adv duration in ms */ |
---|
| 8411 | + uint16 bt_ble_scan_dur; /* ble scan duration in ms */ |
---|
| 8412 | + uint16 bt_ble_init_dur; /* ble init duration in ms */ |
---|
| 8413 | + uint16 bt_ble_conn_dur; /* ble connection duration in ms */ |
---|
| 8414 | + uint16 bt_task_lmp_dur; /* lmp duration in ms */ |
---|
| 8415 | + uint16 bt_esco_retran_dur; /* esco retransmission duration in ms */ |
---|
| 8416 | + uint16 bt_task26_dur; /* task26 duration in ms */ |
---|
| 8417 | + uint16 bt_task27_dur; /* task27 duration in ms */ |
---|
| 8418 | + uint16 bt_task28_dur; /* task28 duration in ms */ |
---|
| 8419 | + uint16 bt_task_pred_dur; /* prediction task duration in ms */ |
---|
| 8420 | + uint16 bt_multihid_dur; /* multihid duration in ms */ |
---|
| 8421 | +} wlc_btcx_durstats_v1_t; |
---|
5229 | 8422 | |
---|
5230 | 8423 | #define WL_IPFO_ROUTE_TBL_FIXED_LEN 4 |
---|
5231 | 8424 | #define WL_MAX_IPFO_ROUTE_TBL_ENTRY 64 |
---|
5232 | | - |
---|
5233 | | -/* no strict structure packing */ |
---|
5234 | | -#include <packed_section_end.h> |
---|
5235 | 8425 | |
---|
5236 | 8426 | /* Global ASSERT Logging */ |
---|
5237 | 8427 | #define ASSERTLOG_CUR_VER 0x0100 |
---|
.. | .. |
---|
5240 | 8430 | typedef struct assert_record { |
---|
5241 | 8431 | uint32 time; |
---|
5242 | 8432 | uint8 seq_num; |
---|
5243 | | - char str[MAX_ASSRTSTR_LEN]; |
---|
| 8433 | + int8 str[MAX_ASSRTSTR_LEN]; |
---|
5244 | 8434 | } assert_record_t; |
---|
5245 | 8435 | |
---|
5246 | 8436 | typedef struct assertlog_results { |
---|
.. | .. |
---|
5252 | 8442 | |
---|
5253 | 8443 | #define LOGRRC_FIX_LEN 8 |
---|
5254 | 8444 | #define IOBUF_ALLOWED_NUM_OF_LOGREC(type, len) ((len - LOGRRC_FIX_LEN)/sizeof(type)) |
---|
5255 | | - |
---|
5256 | | - |
---|
| 8445 | +/* BCMWAPI_WAI */ |
---|
| 8446 | +#define IV_LEN 16 |
---|
| 8447 | + struct wapi_sta_msg_t |
---|
| 8448 | + { |
---|
| 8449 | + uint16 msg_type; |
---|
| 8450 | + uint16 datalen; |
---|
| 8451 | + uint8 vap_mac[6]; |
---|
| 8452 | + uint8 reserve_data1[2]; |
---|
| 8453 | + uint8 sta_mac[6]; |
---|
| 8454 | + uint8 reserve_data2[2]; |
---|
| 8455 | + uint8 gsn[IV_LEN]; |
---|
| 8456 | + uint8 wie[TLV_BODY_LEN_MAX + TLV_HDR_LEN]; /* 257 */ |
---|
| 8457 | + uint8 pad[3]; /* padding for alignment */ |
---|
| 8458 | + }; |
---|
| 8459 | +/* #endif BCMWAPI_WAI */ |
---|
5257 | 8460 | /* chanim acs record */ |
---|
5258 | 8461 | typedef struct { |
---|
5259 | | - bool valid; |
---|
| 8462 | + uint8 valid; |
---|
5260 | 8463 | uint8 trigger; |
---|
5261 | 8464 | chanspec_t selected_chspc; |
---|
5262 | 8465 | int8 bgnoise; |
---|
5263 | 8466 | uint32 glitch_cnt; |
---|
5264 | 8467 | uint8 ccastats; |
---|
5265 | 8468 | uint8 chan_idle; |
---|
5266 | | - uint timestamp; |
---|
| 8469 | + uint32 timestamp; |
---|
5267 | 8470 | } chanim_acs_record_t; |
---|
5268 | 8471 | |
---|
5269 | 8472 | typedef struct { |
---|
5270 | 8473 | chanim_acs_record_t acs_record[CHANIM_ACS_RECORD]; |
---|
5271 | 8474 | uint8 count; |
---|
5272 | | - uint timestamp; |
---|
| 8475 | + uint32 timestamp; |
---|
5273 | 8476 | } wl_acs_record_t; |
---|
5274 | 8477 | |
---|
5275 | | - typedef struct chanim_stats { |
---|
5276 | | - uint32 glitchcnt; /* normalized as per second count */ |
---|
5277 | | - uint32 badplcp; /* normalized as per second count */ |
---|
5278 | | - uint8 ccastats[CCASTATS_MAX]; /* normalized as 0-255 */ |
---|
5279 | | - int8 bgnoise; /* background noise level (in dBm) */ |
---|
5280 | | - chanspec_t chanspec; /* ctrl chanspec of the interface */ |
---|
5281 | | - uint32 timestamp; /* time stamp at which the stats are collected */ |
---|
5282 | | - uint32 bphy_glitchcnt; /* normalized as per second count */ |
---|
5283 | | - uint32 bphy_badplcp; /* normalized as per second count */ |
---|
5284 | | - uint8 chan_idle; /* normalized as 0~255 */ |
---|
5285 | | - } chanim_stats_t; |
---|
| 8478 | +#define WL_CHANIM_STATS_V2 2 |
---|
| 8479 | +#define CCASTATS_V2_MAX 9 |
---|
| 8480 | +typedef struct chanim_stats_v2 { |
---|
| 8481 | + uint32 glitchcnt; /**< normalized as per second count */ |
---|
| 8482 | + uint32 badplcp; /**< normalized as per second count */ |
---|
| 8483 | + uint8 ccastats[CCASTATS_V2_MAX]; /**< normalized as 0-255 */ |
---|
| 8484 | + int8 bgnoise; /**< background noise level (in dBm) */ |
---|
| 8485 | + chanspec_t chanspec; /**< ctrl chanspec of the interface */ |
---|
| 8486 | + uint32 timestamp; /**< time stamp at which the stats are collected */ |
---|
| 8487 | + uint32 bphy_glitchcnt; /**< normalized as per second count */ |
---|
| 8488 | + uint32 bphy_badplcp; /**< normalized as per second count */ |
---|
| 8489 | + uint8 chan_idle; /**< normalized as 0~255 */ |
---|
| 8490 | + uint8 PAD[3]; |
---|
| 8491 | +} chanim_stats_v2_t; |
---|
5286 | 8492 | |
---|
5287 | | -#define WL_CHANIM_STATS_VERSION 2 |
---|
| 8493 | +#define CCASTATS_V3_MAX 10 |
---|
| 8494 | +typedef struct chanim_stats { |
---|
| 8495 | + uint32 glitchcnt; /**< normalized as per second count */ |
---|
| 8496 | + uint32 badplcp; /**< normalized as per second count */ |
---|
| 8497 | + uint8 ccastats[CCASTATS_V3_MAX]; /**< normalized as 0-255 */ |
---|
| 8498 | + int8 bgnoise; /**< background noise level (in dBm) */ |
---|
| 8499 | + uint8 pad_1[11 - CCASTATS_V3_MAX]; |
---|
| 8500 | + chanspec_t chanspec; /**< ctrl chanspec of the interface */ |
---|
| 8501 | + uint8 pad_2[2]; |
---|
| 8502 | + uint32 timestamp; /**< time stamp at which the stats are collected */ |
---|
| 8503 | + uint32 bphy_glitchcnt; /**< normalized as per second count */ |
---|
| 8504 | + uint32 bphy_badplcp; /**< normalized as per second count */ |
---|
| 8505 | + uint8 chan_idle; /**< normalized as 0~255 */ |
---|
| 8506 | + uint8 PAD[3]; |
---|
| 8507 | +} chanim_stats_t; |
---|
5288 | 8508 | |
---|
| 8509 | +#define WL_CHANIM_STATS_VERSION 3 |
---|
5289 | 8510 | typedef struct { |
---|
5290 | 8511 | uint32 buflen; |
---|
5291 | 8512 | uint32 version; |
---|
.. | .. |
---|
5295 | 8516 | |
---|
5296 | 8517 | #define WL_CHANIM_STATS_FIXED_LEN OFFSETOF(wl_chanim_stats_t, stats) |
---|
5297 | 8518 | |
---|
5298 | | -/* Noise measurement metrics. */ |
---|
| 8519 | +/** Noise measurement metrics. */ |
---|
5299 | 8520 | #define NOISE_MEASURE_KNOISE 0x1 |
---|
5300 | 8521 | |
---|
5301 | | -/* scb probe parameter */ |
---|
| 8522 | +/** scb probe parameter */ |
---|
5302 | 8523 | typedef struct { |
---|
5303 | 8524 | uint32 scb_timeout; |
---|
5304 | 8525 | uint32 scb_activity_time; |
---|
.. | .. |
---|
5308 | 8529 | /* structure/defines for selective mgmt frame (smf) stats support */ |
---|
5309 | 8530 | |
---|
5310 | 8531 | #define SMFS_VERSION 1 |
---|
5311 | | -/* selected mgmt frame (smf) stats element */ |
---|
| 8532 | +/** selected mgmt frame (smf) stats element */ |
---|
5312 | 8533 | typedef struct wl_smfs_elem { |
---|
5313 | 8534 | uint32 count; |
---|
5314 | | - uint16 code; /* SC or RC code */ |
---|
| 8535 | + uint16 code; /**< SC or RC code */ |
---|
| 8536 | + uint8 PAD[2]; |
---|
5315 | 8537 | } wl_smfs_elem_t; |
---|
5316 | 8538 | |
---|
5317 | 8539 | typedef struct wl_smf_stats { |
---|
5318 | 8540 | uint32 version; |
---|
5319 | | - uint16 length; /* reserved for future usage */ |
---|
| 8541 | + uint16 length; /**< reserved for future usage */ |
---|
5320 | 8542 | uint8 type; |
---|
5321 | 8543 | uint8 codetype; |
---|
5322 | 8544 | uint32 ignored_cnt; |
---|
5323 | 8545 | uint32 malformed_cnt; |
---|
5324 | | - uint32 count_total; /* count included the interested group */ |
---|
| 8546 | + uint32 count_total; /**< count included the interested group */ |
---|
5325 | 8547 | wl_smfs_elem_t elem[1]; |
---|
5326 | 8548 | } wl_smf_stats_t; |
---|
5327 | 8549 | |
---|
.. | .. |
---|
5343 | 8565 | SMFS_TYPE_MAX |
---|
5344 | 8566 | } smfs_type_t; |
---|
5345 | 8567 | |
---|
5346 | | -#ifdef PHYMON |
---|
| 8568 | +/* #ifdef PHYMON */ |
---|
5347 | 8569 | |
---|
5348 | 8570 | #define PHYMON_VERSION 1 |
---|
5349 | 8571 | |
---|
.. | .. |
---|
5360 | 8582 | int8 tx_iqlocal_fi; |
---|
5361 | 8583 | int8 tx_iqlocal_fq; |
---|
5362 | 8584 | |
---|
5363 | | - /* Rx IQ calibration coeffs */ |
---|
| 8585 | + /** Rx IQ calibration coeffs */ |
---|
5364 | 8586 | int16 rx_iqcal_a; |
---|
5365 | 8587 | int16 rx_iqcal_b; |
---|
5366 | 8588 | |
---|
5367 | | - uint8 tx_iqlocal_pwridx; /* Tx Power Index for Tx IQ/LO calibration */ |
---|
5368 | | - uint32 papd_epsilon_table[64]; /* PAPD epsilon table */ |
---|
5369 | | - int16 papd_epsilon_offset; /* PAPD epsilon offset */ |
---|
5370 | | - uint8 curr_tx_pwrindex; /* Tx power index */ |
---|
5371 | | - int8 idle_tssi; /* Idle TSSI */ |
---|
5372 | | - int8 est_tx_pwr; /* Estimated Tx Power (dB) */ |
---|
5373 | | - int8 est_rx_pwr; /* Estimated Rx Power (dB) from RSSI */ |
---|
5374 | | - uint16 rx_gaininfo; /* Rx gain applied on last Rx pkt */ |
---|
5375 | | - uint16 init_gaincode; /* initgain required for ACI */ |
---|
| 8589 | + uint8 tx_iqlocal_pwridx; /**< Tx Power Index for Tx IQ/LO calibration */ |
---|
| 8590 | + uint8 PAD[3]; |
---|
| 8591 | + uint32 papd_epsilon_table[64]; /**< PAPD epsilon table */ |
---|
| 8592 | + int16 papd_epsilon_offset; /**< PAPD epsilon offset */ |
---|
| 8593 | + uint8 curr_tx_pwrindex; /**< Tx power index */ |
---|
| 8594 | + int8 idle_tssi; /**< Idle TSSI */ |
---|
| 8595 | + int8 est_tx_pwr; /**< Estimated Tx Power (dB) */ |
---|
| 8596 | + int8 est_rx_pwr; /**< Estimated Rx Power (dB) from RSSI */ |
---|
| 8597 | + uint16 rx_gaininfo; /**< Rx gain applied on last Rx pkt */ |
---|
| 8598 | + uint16 init_gaincode; /**< initgain required for ACI */ |
---|
5376 | 8599 | int8 estirr_tx; |
---|
5377 | 8600 | int8 estirr_rx; |
---|
5378 | | - |
---|
5379 | 8601 | } wl_phycal_core_state_t; |
---|
5380 | 8602 | |
---|
5381 | 8603 | typedef struct wl_phycal_state { |
---|
5382 | | - int version; |
---|
5383 | | - int8 num_phy_cores; /* number of cores */ |
---|
5384 | | - int8 curr_temperature; /* on-chip temperature sensor reading */ |
---|
5385 | | - chanspec_t chspec; /* channspec for this state */ |
---|
5386 | | - bool aci_state; /* ACI state: ON/OFF */ |
---|
5387 | | - uint16 crsminpower; /* crsminpower required for ACI */ |
---|
5388 | | - uint16 crsminpowerl; /* crsminpowerl required for ACI */ |
---|
5389 | | - uint16 crsminpoweru; /* crsminpoweru required for ACI */ |
---|
| 8604 | + int32 version; |
---|
| 8605 | + int8 num_phy_cores; /**< number of cores */ |
---|
| 8606 | + int8 curr_temperature; /**< on-chip temperature sensor reading */ |
---|
| 8607 | + chanspec_t chspec; /**< channspec for this state */ |
---|
| 8608 | + uint8 aci_state; /**< ACI state: ON/OFF */ |
---|
| 8609 | + uint8 PAD; |
---|
| 8610 | + uint16 crsminpower; /**< crsminpower required for ACI */ |
---|
| 8611 | + uint16 crsminpowerl; /**< crsminpowerl required for ACI */ |
---|
| 8612 | + uint16 crsminpoweru; /**< crsminpoweru required for ACI */ |
---|
5390 | 8613 | wl_phycal_core_state_t phycal_core[1]; |
---|
5391 | 8614 | } wl_phycal_state_t; |
---|
5392 | 8615 | |
---|
5393 | 8616 | #define WL_PHYCAL_STAT_FIXED_LEN OFFSETOF(wl_phycal_state_t, phycal_core) |
---|
5394 | | -#endif /* PHYMON */ |
---|
| 8617 | +/* endif PHYMON */ |
---|
5395 | 8618 | |
---|
5396 | | -/* discovery state */ |
---|
| 8619 | +/** discovery state */ |
---|
5397 | 8620 | typedef struct wl_p2p_disc_st { |
---|
5398 | | - uint8 state; /* see state */ |
---|
5399 | | - chanspec_t chspec; /* valid in listen state */ |
---|
5400 | | - uint16 dwell; /* valid in listen state, in ms */ |
---|
| 8621 | + uint8 state; /**< see state */ |
---|
| 8622 | + uint8 PAD; |
---|
| 8623 | + chanspec_t chspec; /**< valid in listen state */ |
---|
| 8624 | + uint16 dwell; /**< valid in listen state, in ms */ |
---|
5401 | 8625 | } wl_p2p_disc_st_t; |
---|
5402 | 8626 | |
---|
5403 | | -/* scan request */ |
---|
| 8627 | +/** scan request */ |
---|
5404 | 8628 | typedef struct wl_p2p_scan { |
---|
5405 | | - uint8 type; /* 'S' for WLC_SCAN, 'E' for "escan" */ |
---|
| 8629 | + uint8 type; /**< 'S' for WLC_SCAN, 'E' for "escan" */ |
---|
5406 | 8630 | uint8 reserved[3]; |
---|
5407 | 8631 | /* scan or escan parms... */ |
---|
5408 | 8632 | } wl_p2p_scan_t; |
---|
5409 | 8633 | |
---|
5410 | | -/* i/f request */ |
---|
| 8634 | +/** i/f request */ |
---|
5411 | 8635 | typedef struct wl_p2p_if { |
---|
5412 | 8636 | struct ether_addr addr; |
---|
5413 | | - uint8 type; /* see i/f type */ |
---|
5414 | | - chanspec_t chspec; /* for p2p_ifadd GO */ |
---|
| 8637 | + uint8 type; /**< see i/f type */ |
---|
| 8638 | + uint8 PAD; |
---|
| 8639 | + chanspec_t chspec; /**< for p2p_ifadd GO */ |
---|
5415 | 8640 | } wl_p2p_if_t; |
---|
5416 | 8641 | |
---|
5417 | | -/* i/f query */ |
---|
| 8642 | +/** i/f query */ |
---|
5418 | 8643 | typedef struct wl_p2p_ifq { |
---|
5419 | | - uint bsscfgidx; |
---|
| 8644 | + uint32 bsscfgidx; |
---|
5420 | 8645 | char ifname[BCM_MSG_IFNAME_MAX]; |
---|
5421 | 8646 | } wl_p2p_ifq_t; |
---|
5422 | 8647 | |
---|
5423 | | -/* OppPS & CTWindow */ |
---|
| 8648 | +/** OppPS & CTWindow */ |
---|
5424 | 8649 | typedef struct wl_p2p_ops { |
---|
5425 | | - uint8 ops; /* 0: disable 1: enable */ |
---|
5426 | | - uint8 ctw; /* >= 10 */ |
---|
| 8650 | + uint8 ops; /**< 0: disable 1: enable */ |
---|
| 8651 | + uint8 ctw; /**< >= 10 */ |
---|
5427 | 8652 | } wl_p2p_ops_t; |
---|
5428 | 8653 | |
---|
5429 | | -/* absence and presence request */ |
---|
| 8654 | +/** absence and presence request */ |
---|
5430 | 8655 | typedef struct wl_p2p_sched_desc { |
---|
5431 | 8656 | uint32 start; |
---|
5432 | 8657 | uint32 interval; |
---|
5433 | 8658 | uint32 duration; |
---|
5434 | | - uint32 count; /* see count */ |
---|
| 8659 | + uint32 count; /**< see count */ |
---|
5435 | 8660 | } wl_p2p_sched_desc_t; |
---|
5436 | 8661 | |
---|
5437 | 8662 | typedef struct wl_p2p_sched { |
---|
5438 | | - uint8 type; /* see schedule type */ |
---|
5439 | | - uint8 action; /* see schedule action */ |
---|
5440 | | - uint8 option; /* see schedule option */ |
---|
| 8663 | + uint8 type; /**< see schedule type */ |
---|
| 8664 | + uint8 action; /**< see schedule action */ |
---|
| 8665 | + uint8 option; /**< see schedule option */ |
---|
| 8666 | + uint8 PAD; |
---|
5441 | 8667 | wl_p2p_sched_desc_t desc[1]; |
---|
5442 | 8668 | } wl_p2p_sched_t; |
---|
5443 | 8669 | |
---|
.. | .. |
---|
5447 | 8673 | uint8 wfds_hash[6]; |
---|
5448 | 8674 | uint8 name_len; |
---|
5449 | 8675 | uint8 service_name[MAX_WFDS_SVC_NAME_LEN]; |
---|
| 8676 | + uint8 PAD[3]; |
---|
5450 | 8677 | } wl_p2p_wfds_hash_t; |
---|
5451 | 8678 | |
---|
| 8679 | +typedef struct wl_p2p_config_params { |
---|
| 8680 | + uint16 enable; /**< 0: disable 1: enable */ |
---|
| 8681 | + uint16 chanspec; /* GO chanspec */ |
---|
| 8682 | + wlc_ssid_t ssid; /* SSID */ |
---|
| 8683 | +} wl_p2p_config_params_t; |
---|
| 8684 | + |
---|
5452 | 8685 | typedef struct wl_bcmdcs_data { |
---|
5453 | | - uint reason; |
---|
| 8686 | + uint32 reason; |
---|
5454 | 8687 | chanspec_t chspec; |
---|
| 8688 | + uint8 PAD[2]; |
---|
5455 | 8689 | } wl_bcmdcs_data_t; |
---|
5456 | | - |
---|
5457 | | - |
---|
5458 | | -/* NAT configuration */ |
---|
| 8690 | +/* ifdef EXT_STA */ |
---|
| 8691 | +/** |
---|
| 8692 | + * Format of IHV data passed to OID_DOT11_NIC_SPECIFIC_EXTENSION. |
---|
| 8693 | + */ |
---|
| 8694 | +typedef struct _IHV_NIC_SPECIFIC_EXTENSION { |
---|
| 8695 | + uint8 oui[4]; /**< vendor specific OUI value */ |
---|
| 8696 | + uint32 event; /**< event code */ |
---|
| 8697 | + uint8 ihvData[1]; /**< ihv data */ |
---|
| 8698 | +} IHV_NIC_SPECIFIC_EXTENSION, *PIHV_NIC_SPECIFIC_EXTENSION; |
---|
| 8699 | +#define IHV_NIC_SPECIFIC_EXTENTION_HEADER OFFSETOF(IHV_NIC_SPECIFIC_EXTENSION, ihvData[0]) |
---|
| 8700 | +/* EXT_STA */ |
---|
| 8701 | +/** NAT configuration */ |
---|
5459 | 8702 | typedef struct { |
---|
5460 | | - uint32 ipaddr; /* interface ip address */ |
---|
5461 | | - uint32 ipaddr_mask; /* interface ip address mask */ |
---|
5462 | | - uint32 ipaddr_gateway; /* gateway ip address */ |
---|
5463 | | - uint8 mac_gateway[6]; /* gateway mac address */ |
---|
5464 | | - uint32 ipaddr_dns; /* DNS server ip address, valid only for public if */ |
---|
5465 | | - uint8 mac_dns[6]; /* DNS server mac address, valid only for public if */ |
---|
5466 | | - uint8 GUID[38]; /* interface GUID */ |
---|
| 8703 | + uint32 ipaddr; /**< interface ip address */ |
---|
| 8704 | + uint32 ipaddr_mask; /**< interface ip address mask */ |
---|
| 8705 | + uint32 ipaddr_gateway; /**< gateway ip address */ |
---|
| 8706 | + uint8 mac_gateway[6]; /**< gateway mac address */ |
---|
| 8707 | + uint8 PAD[2]; |
---|
| 8708 | + uint32 ipaddr_dns; /**< DNS server ip address, valid only for public if */ |
---|
| 8709 | + uint8 mac_dns[6]; /**< DNS server mac address, valid only for public if */ |
---|
| 8710 | + uint8 GUID[38]; /**< interface GUID */ |
---|
5467 | 8711 | } nat_if_info_t; |
---|
5468 | 8712 | |
---|
5469 | 8713 | typedef struct { |
---|
5470 | | - uint op; /* operation code */ |
---|
5471 | | - bool pub_if; /* set for public if, clear for private if */ |
---|
5472 | | - nat_if_info_t if_info; /* interface info */ |
---|
| 8714 | + uint32 op; /**< operation code */ |
---|
| 8715 | + uint8 pub_if; /**< set for public if, clear for private if */ |
---|
| 8716 | + uint8 PAD[3]; |
---|
| 8717 | + nat_if_info_t if_info; /**< interface info */ |
---|
5473 | 8718 | } nat_cfg_t; |
---|
5474 | 8719 | |
---|
5475 | 8720 | typedef struct { |
---|
5476 | | - int state; /* NAT state returned */ |
---|
| 8721 | + int32 state; /**< NAT state returned */ |
---|
5477 | 8722 | } nat_state_t; |
---|
5478 | | - |
---|
5479 | | - |
---|
5480 | | -#define BTA_STATE_LOG_SZ 64 |
---|
5481 | | - |
---|
5482 | | -/* BTAMP Statemachine states */ |
---|
5483 | | -enum { |
---|
5484 | | - HCIReset = 1, |
---|
5485 | | - HCIReadLocalAMPInfo, |
---|
5486 | | - HCIReadLocalAMPASSOC, |
---|
5487 | | - HCIWriteRemoteAMPASSOC, |
---|
5488 | | - HCICreatePhysicalLink, |
---|
5489 | | - HCIAcceptPhysicalLinkRequest, |
---|
5490 | | - HCIDisconnectPhysicalLink, |
---|
5491 | | - HCICreateLogicalLink, |
---|
5492 | | - HCIAcceptLogicalLink, |
---|
5493 | | - HCIDisconnectLogicalLink, |
---|
5494 | | - HCILogicalLinkCancel, |
---|
5495 | | - HCIAmpStateChange, |
---|
5496 | | - HCIWriteLogicalLinkAcceptTimeout |
---|
5497 | | -}; |
---|
5498 | 8723 | |
---|
5499 | 8724 | typedef struct flush_txfifo { |
---|
5500 | 8725 | uint32 txfifobmp; |
---|
5501 | 8726 | uint32 hwtxfifoflush; |
---|
5502 | 8727 | struct ether_addr ea; |
---|
| 8728 | + uint8 PAD[2]; |
---|
5503 | 8729 | } flush_txfifo_t; |
---|
5504 | 8730 | |
---|
5505 | 8731 | enum { |
---|
.. | .. |
---|
5511 | 8737 | SPATIAL_MODE_MAX_IDX |
---|
5512 | 8738 | }; |
---|
5513 | 8739 | |
---|
5514 | | -#define WLC_TXCORE_MAX 4 /* max number of txcore supports */ |
---|
5515 | | -#define WLC_SUBBAND_MAX 4 /* max number of sub-band supports */ |
---|
| 8740 | +#define WLC_TXCORE_MAX 4 /**< max number of txcore supports */ |
---|
| 8741 | +#define WLC_TXCORE_MAX_OLD 2 /**< backward compatibilty for TXCAL */ |
---|
| 8742 | +#define WLC_SUBBAND_MAX 4 /**< max number of sub-band supports */ |
---|
5516 | 8743 | typedef struct { |
---|
5517 | 8744 | uint8 band2g[WLC_TXCORE_MAX]; |
---|
5518 | 8745 | uint8 band5g[WLC_SUBBAND_MAX][WLC_TXCORE_MAX]; |
---|
| 8746 | +#ifdef TBAND |
---|
| 8747 | + /* Temporary WAR. SWWLAN-140646 */ |
---|
| 8748 | + uint8 band6g[WLC_SUBBAND_MAX][WLC_TXCORE_MAX]; |
---|
| 8749 | +#endif /* TBAND */ |
---|
5519 | 8750 | } sar_limit_t; |
---|
5520 | 8751 | |
---|
5521 | | -#define WLC_TXCAL_CORE_MAX 2 /* max number of txcore supports for txcal */ |
---|
5522 | 8752 | #define MAX_NUM_TXCAL_MEAS 128 |
---|
5523 | 8753 | #define MAX_NUM_PWR_STEP 40 |
---|
5524 | | -#define TXCAL_ROUNDING_FIX 1 |
---|
5525 | | -typedef struct wl_txcal_meas { |
---|
5526 | | -#ifdef TXCAL_ROUNDING_FIX |
---|
5527 | | - uint16 tssi[WLC_TXCAL_CORE_MAX][MAX_NUM_TXCAL_MEAS]; |
---|
5528 | | -#else |
---|
5529 | | - uint8 tssi[WLC_TXCAL_CORE_MAX][MAX_NUM_TXCAL_MEAS]; |
---|
5530 | | -#endif /* TXCAL_ROUNDING_FIX */ |
---|
5531 | | - int16 pwr[WLC_TXCAL_CORE_MAX][MAX_NUM_TXCAL_MEAS]; |
---|
| 8754 | +#define TXCAL_IOVAR_VERSION 0x1 |
---|
| 8755 | + |
---|
| 8756 | +#define TXCAL_GAINSWEEP_VER (TXCAL_GAINSWEEP_VERSION_V2) |
---|
| 8757 | +#define TXCAL_GAINSWEEP_VERSION_V2 2 |
---|
| 8758 | + |
---|
| 8759 | +/* Below macro defines the latest txcal iovar version updated */ |
---|
| 8760 | +/* This macro also reflects in the 'txcal_ver' iovar */ |
---|
| 8761 | +#define TXCAL_IOVAR_LATEST TXCAL_GAINSWEEP_VER |
---|
| 8762 | + |
---|
| 8763 | +/* below are used for bphy/ofdm separated LSC */ |
---|
| 8764 | +#define TXCAL_PWR_BPHY 0 |
---|
| 8765 | +#define TXCAL_PWR_OFDM 1 |
---|
| 8766 | + |
---|
| 8767 | +typedef struct wl_txcal_meas_percore { |
---|
| 8768 | + uint16 tssi[MAX_NUM_TXCAL_MEAS]; |
---|
| 8769 | + int16 pwr[MAX_NUM_TXCAL_MEAS]; |
---|
| 8770 | +} wl_txcal_meas_percore_t; |
---|
| 8771 | + |
---|
| 8772 | +typedef struct wl_txcal_meas_ncore { |
---|
| 8773 | + uint16 version; |
---|
5532 | 8774 | uint8 valid_cnt; |
---|
| 8775 | + uint8 num_core; |
---|
| 8776 | + wl_txcal_meas_percore_t txcal_percore[1]; |
---|
| 8777 | +} wl_txcal_meas_ncore_t; |
---|
| 8778 | + |
---|
| 8779 | +typedef struct wl_txcal_power_tssi_percore { |
---|
| 8780 | + int16 tempsense; |
---|
| 8781 | + int16 pwr_start; |
---|
| 8782 | + uint8 pwr_start_idx; |
---|
| 8783 | + uint8 num_entries; |
---|
| 8784 | + uint16 pad; |
---|
| 8785 | + uint8 tssi[MAX_NUM_PWR_STEP]; |
---|
| 8786 | +} wl_txcal_power_tssi_percore_t; |
---|
| 8787 | + |
---|
| 8788 | +typedef struct wl_txcal_power_tssi_ncore { |
---|
| 8789 | + uint16 version; |
---|
| 8790 | + uint8 set_core; |
---|
| 8791 | + uint8 channel; |
---|
| 8792 | + uint8 num_core; |
---|
| 8793 | + uint8 gen_tbl; |
---|
| 8794 | + uint8 ofdm; |
---|
| 8795 | + uint8 pad; |
---|
| 8796 | + wl_txcal_power_tssi_percore_t tssi_percore[4]; |
---|
| 8797 | +} wl_txcal_power_tssi_ncore_t; |
---|
| 8798 | + |
---|
| 8799 | +typedef struct wl_txcal_meas { |
---|
| 8800 | + uint16 tssi[WLC_TXCORE_MAX][MAX_NUM_TXCAL_MEAS]; |
---|
| 8801 | + int16 pwr[WLC_TXCORE_MAX][MAX_NUM_TXCAL_MEAS]; |
---|
| 8802 | + uint8 valid_cnt; |
---|
| 8803 | + uint8 PAD; |
---|
5533 | 8804 | } wl_txcal_meas_t; |
---|
| 8805 | + |
---|
| 8806 | +typedef struct wl_txcal_meas_old { |
---|
| 8807 | + uint16 tssi[WLC_TXCORE_MAX_OLD][MAX_NUM_TXCAL_MEAS]; |
---|
| 8808 | + int16 pwr[WLC_TXCORE_MAX_OLD][MAX_NUM_TXCAL_MEAS]; |
---|
| 8809 | + uint8 valid_cnt; |
---|
| 8810 | + uint8 PAD; |
---|
| 8811 | +} wl_txcal_meas_old_t; |
---|
5534 | 8812 | |
---|
5535 | 8813 | typedef struct wl_txcal_power_tssi { |
---|
5536 | 8814 | uint8 set_core; |
---|
5537 | 8815 | uint8 channel; |
---|
5538 | | - int16 tempsense[WLC_TXCAL_CORE_MAX]; |
---|
5539 | | - int16 pwr_start[WLC_TXCAL_CORE_MAX]; |
---|
5540 | | - uint8 pwr_start_idx[WLC_TXCAL_CORE_MAX]; |
---|
5541 | | - uint8 num_entries[WLC_TXCAL_CORE_MAX]; |
---|
5542 | | - uint8 tssi[WLC_TXCAL_CORE_MAX][MAX_NUM_PWR_STEP]; |
---|
5543 | | - bool gen_tbl; |
---|
| 8816 | + int16 tempsense[WLC_TXCORE_MAX]; |
---|
| 8817 | + int16 pwr_start[WLC_TXCORE_MAX]; |
---|
| 8818 | + uint8 pwr_start_idx[WLC_TXCORE_MAX]; |
---|
| 8819 | + uint8 num_entries[WLC_TXCORE_MAX]; |
---|
| 8820 | + uint8 tssi[WLC_TXCORE_MAX][MAX_NUM_PWR_STEP]; |
---|
| 8821 | + uint8 gen_tbl; |
---|
| 8822 | + uint8 ofdm; |
---|
5544 | 8823 | } wl_txcal_power_tssi_t; |
---|
5545 | 8824 | |
---|
5546 | | -/* IOVAR "mempool" parameter. Used to retrieve a list of memory pool statistics. */ |
---|
| 8825 | +typedef struct wl_txcal_power_tssi_old { |
---|
| 8826 | + uint8 set_core; |
---|
| 8827 | + uint8 channel; |
---|
| 8828 | + int16 tempsense[WLC_TXCORE_MAX_OLD]; |
---|
| 8829 | + int16 pwr_start[WLC_TXCORE_MAX_OLD]; |
---|
| 8830 | + uint8 pwr_start_idx[WLC_TXCORE_MAX_OLD]; |
---|
| 8831 | + uint8 num_entries[WLC_TXCORE_MAX_OLD]; |
---|
| 8832 | + uint8 tssi[WLC_TXCORE_MAX_OLD][MAX_NUM_PWR_STEP]; |
---|
| 8833 | + uint8 gen_tbl; |
---|
| 8834 | + uint8 ofdm; |
---|
| 8835 | +} wl_txcal_power_tssi_old_t; |
---|
| 8836 | + |
---|
| 8837 | +typedef struct wl_olpc_pwr { |
---|
| 8838 | + uint16 version; |
---|
| 8839 | + uint8 core; |
---|
| 8840 | + uint8 channel; |
---|
| 8841 | + int16 tempsense; |
---|
| 8842 | + uint8 olpc_idx; |
---|
| 8843 | + uint8 ofdm; |
---|
| 8844 | +} wl_olpc_pwr_t; |
---|
| 8845 | + |
---|
| 8846 | +typedef struct wl_rfem_temp_vdet_temp { |
---|
| 8847 | + uint8 vdet_fem_t1; |
---|
| 8848 | + int8 rfem_temp_t1; |
---|
| 8849 | + uint8 vdet_fem_t2; |
---|
| 8850 | + int8 rfem_temp_t2; |
---|
| 8851 | +} wl_rfem_temp_vdet_temp_t; |
---|
| 8852 | + |
---|
| 8853 | +typedef struct wl_rfem_temp_vin_tssi { |
---|
| 8854 | + uint16 vin_chip_v1; |
---|
| 8855 | + int16 tssi_chip_v1; |
---|
| 8856 | + uint16 vin_chip_v2; |
---|
| 8857 | + int16 tssi_chip_v2; |
---|
| 8858 | +} wl_rfem_temp_vin_tssi_t; |
---|
| 8859 | + |
---|
| 8860 | +typedef struct wl_txcal_tempsense { |
---|
| 8861 | + uint16 version; |
---|
| 8862 | + uint8 valid_cnt; |
---|
| 8863 | + uint8 core; |
---|
| 8864 | + int16 ref_temperature; |
---|
| 8865 | + int16 meas_temperature; |
---|
| 8866 | + wl_rfem_temp_vdet_temp_t vdet_temp; |
---|
| 8867 | + wl_rfem_temp_vin_tssi_t vin_tssi; |
---|
| 8868 | +} wl_txcal_tempsense_t; |
---|
| 8869 | + |
---|
| 8870 | +/** IOVAR "mempool" parameter. Used to retrieve a list of memory pool statistics. */ |
---|
5547 | 8871 | typedef struct wl_mempool_stats { |
---|
5548 | | - int num; /* Number of memory pools */ |
---|
5549 | | - bcm_mp_stats_t s[1]; /* Variable array of memory pool stats. */ |
---|
| 8872 | + int32 num; /**< Number of memory pools */ |
---|
| 8873 | + bcm_mp_stats_t s[1]; /**< Variable array of memory pool stats. */ |
---|
5550 | 8874 | } wl_mempool_stats_t; |
---|
5551 | 8875 | |
---|
5552 | 8876 | typedef struct { |
---|
.. | .. |
---|
5555 | 8879 | uint32 ipaddr_gateway; |
---|
5556 | 8880 | } nwoe_ifconfig_t; |
---|
5557 | 8881 | |
---|
5558 | | -/* Traffic management priority classes */ |
---|
| 8882 | +/** Traffic management priority classes */ |
---|
5559 | 8883 | typedef enum trf_mgmt_priority_class { |
---|
5560 | | - trf_mgmt_priority_low = 0, /* Maps to 802.1p BK */ |
---|
5561 | | - trf_mgmt_priority_medium = 1, /* Maps to 802.1p BE */ |
---|
5562 | | - trf_mgmt_priority_high = 2, /* Maps to 802.1p VI */ |
---|
5563 | | - trf_mgmt_priority_nochange = 3, /* do not update the priority */ |
---|
| 8884 | + trf_mgmt_priority_low = 0, /**< Maps to 802.1p BK */ |
---|
| 8885 | + trf_mgmt_priority_medium = 1, /**< Maps to 802.1p BE */ |
---|
| 8886 | + trf_mgmt_priority_high = 2, /**< Maps to 802.1p VI */ |
---|
| 8887 | + trf_mgmt_priority_nochange = 3, /**< do not update the priority */ |
---|
5564 | 8888 | trf_mgmt_priority_invalid = (trf_mgmt_priority_nochange + 1) |
---|
5565 | 8889 | } trf_mgmt_priority_class_t; |
---|
5566 | 8890 | |
---|
5567 | | -/* Traffic management configuration parameters */ |
---|
| 8891 | +/** Traffic management configuration parameters */ |
---|
5568 | 8892 | typedef struct trf_mgmt_config { |
---|
5569 | | - uint32 trf_mgmt_enabled; /* 0 - disabled, 1 - enabled */ |
---|
5570 | | - uint32 flags; /* See TRF_MGMT_FLAG_xxx defines */ |
---|
5571 | | - uint32 host_ip_addr; /* My IP address to determine subnet */ |
---|
5572 | | - uint32 host_subnet_mask; /* My subnet mask */ |
---|
5573 | | - uint32 downlink_bandwidth; /* In units of kbps */ |
---|
5574 | | - uint32 uplink_bandwidth; /* In units of kbps */ |
---|
5575 | | - uint32 min_tx_bandwidth[TRF_MGMT_MAX_PRIORITIES]; /* Minimum guaranteed tx bandwidth */ |
---|
5576 | | - uint32 min_rx_bandwidth[TRF_MGMT_MAX_PRIORITIES]; /* Minimum guaranteed rx bandwidth */ |
---|
| 8893 | + uint32 trf_mgmt_enabled; /**< 0 - disabled, 1 - enabled */ |
---|
| 8894 | + uint32 flags; /**< See TRF_MGMT_FLAG_xxx defines */ |
---|
| 8895 | + uint32 host_ip_addr; /**< My IP address to determine subnet */ |
---|
| 8896 | + uint32 host_subnet_mask; /**< My subnet mask */ |
---|
| 8897 | + uint32 downlink_bandwidth; /**< In units of kbps */ |
---|
| 8898 | + uint32 uplink_bandwidth; /**< In units of kbps */ |
---|
| 8899 | + uint32 min_tx_bandwidth[TRF_MGMT_MAX_PRIORITIES]; /**< Minimum guaranteed tx bandwidth */ |
---|
| 8900 | + uint32 min_rx_bandwidth[TRF_MGMT_MAX_PRIORITIES]; /**< Minimum guaranteed rx bandwidth */ |
---|
5577 | 8901 | } trf_mgmt_config_t; |
---|
5578 | 8902 | |
---|
5579 | | -/* Traffic management filter */ |
---|
| 8903 | +/** Traffic management filter */ |
---|
5580 | 8904 | typedef struct trf_mgmt_filter { |
---|
5581 | | - struct ether_addr dst_ether_addr; /* His L2 address */ |
---|
5582 | | - uint32 dst_ip_addr; /* His IP address */ |
---|
5583 | | - uint16 dst_port; /* His L4 port */ |
---|
5584 | | - uint16 src_port; /* My L4 port */ |
---|
5585 | | - uint16 prot; /* L4 protocol (only TCP or UDP) */ |
---|
5586 | | - uint16 flags; /* TBD. For now, this must be zero. */ |
---|
5587 | | - trf_mgmt_priority_class_t priority; /* Priority for filtered packets */ |
---|
5588 | | - uint32 dscp; /* DSCP */ |
---|
| 8905 | + struct ether_addr dst_ether_addr; /**< His L2 address */ |
---|
| 8906 | + uint8 PAD[2]; |
---|
| 8907 | + uint32 dst_ip_addr; /**< His IP address */ |
---|
| 8908 | + uint16 dst_port; /**< His L4 port */ |
---|
| 8909 | + uint16 src_port; /**< My L4 port */ |
---|
| 8910 | + uint16 prot; /**< L4 protocol (only TCP or UDP) */ |
---|
| 8911 | + uint16 flags; /**< TBD. For now, this must be zero. */ |
---|
| 8912 | + trf_mgmt_priority_class_t priority; /**< Priority for filtered packets */ |
---|
| 8913 | + uint32 dscp; /**< DSCP */ |
---|
5589 | 8914 | } trf_mgmt_filter_t; |
---|
5590 | 8915 | |
---|
5591 | | -/* Traffic management filter list (variable length) */ |
---|
| 8916 | +/** Traffic management filter list (variable length) */ |
---|
5592 | 8917 | typedef struct trf_mgmt_filter_list { |
---|
5593 | 8918 | uint32 num_filters; |
---|
5594 | 8919 | trf_mgmt_filter_t filter[1]; |
---|
5595 | 8920 | } trf_mgmt_filter_list_t; |
---|
5596 | 8921 | |
---|
5597 | | -/* Traffic management global info used for all queues */ |
---|
| 8922 | +/** Traffic management global info used for all queues */ |
---|
5598 | 8923 | typedef struct trf_mgmt_global_info { |
---|
5599 | 8924 | uint32 maximum_bytes_per_second; |
---|
5600 | 8925 | uint32 maximum_bytes_per_sampling_period; |
---|
.. | .. |
---|
5603 | 8928 | uint32 total_unused_bytes_per_sampling_period; |
---|
5604 | 8929 | } trf_mgmt_global_info_t; |
---|
5605 | 8930 | |
---|
5606 | | -/* Traffic management shaping info per priority queue */ |
---|
| 8931 | +/** Traffic management shaping info per priority queue */ |
---|
5607 | 8932 | typedef struct trf_mgmt_shaping_info { |
---|
5608 | 8933 | uint32 gauranteed_bandwidth_percentage; |
---|
5609 | 8934 | uint32 guaranteed_bytes_per_second; |
---|
5610 | 8935 | uint32 guaranteed_bytes_per_sampling_period; |
---|
5611 | 8936 | uint32 num_bytes_produced_per_second; |
---|
5612 | 8937 | uint32 num_bytes_consumed_per_second; |
---|
5613 | | - uint32 num_queued_packets; /* Number of packets in queue */ |
---|
5614 | | - uint32 num_queued_bytes; /* Number of bytes in queue */ |
---|
| 8938 | + uint32 num_queued_packets; /**< Number of packets in queue */ |
---|
| 8939 | + uint32 num_queued_bytes; /**< Number of bytes in queue */ |
---|
5615 | 8940 | } trf_mgmt_shaping_info_t; |
---|
5616 | 8941 | |
---|
5617 | | -/* Traffic management shaping info array */ |
---|
| 8942 | +/** Traffic management shaping info array */ |
---|
5618 | 8943 | typedef struct trf_mgmt_shaping_info_array { |
---|
5619 | 8944 | trf_mgmt_global_info_t tx_global_shaping_info; |
---|
5620 | 8945 | trf_mgmt_shaping_info_t tx_queue_shaping_info[TRF_MGMT_MAX_PRIORITIES]; |
---|
.. | .. |
---|
5622 | 8947 | trf_mgmt_shaping_info_t rx_queue_shaping_info[TRF_MGMT_MAX_PRIORITIES]; |
---|
5623 | 8948 | } trf_mgmt_shaping_info_array_t; |
---|
5624 | 8949 | |
---|
5625 | | - |
---|
5626 | | -/* Traffic management statistical counters */ |
---|
| 8950 | +/** Traffic management statistical counters */ |
---|
5627 | 8951 | typedef struct trf_mgmt_stats { |
---|
5628 | | - uint32 num_processed_packets; /* Number of packets processed */ |
---|
5629 | | - uint32 num_processed_bytes; /* Number of bytes processed */ |
---|
5630 | | - uint32 num_discarded_packets; /* Number of packets discarded from queue */ |
---|
| 8952 | + uint32 num_processed_packets; /**< Number of packets processed */ |
---|
| 8953 | + uint32 num_processed_bytes; /**< Number of bytes processed */ |
---|
| 8954 | + uint32 num_discarded_packets; /**< Number of packets discarded from queue */ |
---|
5631 | 8955 | } trf_mgmt_stats_t; |
---|
5632 | 8956 | |
---|
5633 | | -/* Traffic management statisics array */ |
---|
| 8957 | +/** Traffic management statistics array */ |
---|
5634 | 8958 | typedef struct trf_mgmt_stats_array { |
---|
5635 | 8959 | trf_mgmt_stats_t tx_queue_stats[TRF_MGMT_MAX_PRIORITIES]; |
---|
5636 | 8960 | trf_mgmt_stats_t rx_queue_stats[TRF_MGMT_MAX_PRIORITIES]; |
---|
5637 | 8961 | } trf_mgmt_stats_array_t; |
---|
5638 | 8962 | |
---|
| 8963 | +/* Both powersel_params and lpc_params are used by IOVAR lpc_params. |
---|
| 8964 | + * The powersel_params is replaced by lpc_params in later WLC versions. |
---|
| 8965 | + */ |
---|
5639 | 8966 | typedef struct powersel_params { |
---|
5640 | 8967 | /* LPC Params exposed via IOVAR */ |
---|
5641 | | - int32 tp_ratio_thresh; /* Throughput ratio threshold */ |
---|
5642 | | - uint8 rate_stab_thresh; /* Thresh for rate stability based on nupd */ |
---|
5643 | | - uint8 pwr_stab_thresh; /* Number of successes before power step down */ |
---|
5644 | | - uint8 pwr_sel_exp_time; /* Time lapse for expiry of database */ |
---|
| 8968 | + int32 tp_ratio_thresh; /**< Throughput ratio threshold */ |
---|
| 8969 | + uint8 rate_stab_thresh; /**< Thresh for rate stability based on nupd */ |
---|
| 8970 | + uint8 pwr_stab_thresh; /**< Number of successes before power step down */ |
---|
| 8971 | + uint8 pwr_sel_exp_time; /**< Time lapse for expiry of database */ |
---|
| 8972 | + uint8 PAD; |
---|
5645 | 8973 | } powersel_params_t; |
---|
5646 | 8974 | |
---|
| 8975 | +#define WL_LPC_PARAMS_VER_2 2 |
---|
| 8976 | +#define WL_LPC_PARAMS_CURRENT_VERSION WL_LPC_PARAMS_VER_2 |
---|
| 8977 | + |
---|
5647 | 8978 | typedef struct lpc_params { |
---|
| 8979 | + uint16 version; |
---|
| 8980 | + uint16 length; |
---|
5648 | 8981 | /* LPC Params exposed via IOVAR */ |
---|
5649 | | - uint8 rate_stab_thresh; /* Thresh for rate stability based on nupd */ |
---|
5650 | | - uint8 pwr_stab_thresh; /* Number of successes before power step down */ |
---|
5651 | | - uint8 lpc_exp_time; /* Time lapse for expiry of database */ |
---|
5652 | | - uint8 pwrup_slow_step; /* Step size for slow step up */ |
---|
5653 | | - uint8 pwrup_fast_step; /* Step size for fast step up */ |
---|
5654 | | - uint8 pwrdn_slow_step; /* Step size for slow step down */ |
---|
| 8982 | + uint8 rate_stab_thresh; /**< Thresh for rate stability based on nupd */ |
---|
| 8983 | + uint8 pwr_stab_thresh; /**< Number of successes before power step down */ |
---|
| 8984 | + uint8 lpc_exp_time; /**< Time lapse for expiry of database */ |
---|
| 8985 | + uint8 pwrup_slow_step; /**< Step size for slow step up */ |
---|
| 8986 | + uint8 pwrup_fast_step; /**< Step size for fast step up */ |
---|
| 8987 | + uint8 pwrdn_slow_step; /**< Step size for slow step down */ |
---|
5655 | 8988 | } lpc_params_t; |
---|
5656 | 8989 | |
---|
5657 | 8990 | /* tx pkt delay statistics */ |
---|
5658 | | -#define SCB_RETRY_SHORT_DEF 7 /* Default Short retry Limit */ |
---|
5659 | | -#define WLPKTDLY_HIST_NBINS 16 /* number of bins used in the Delay histogram */ |
---|
| 8991 | +#define SCB_RETRY_SHORT_DEF 7 /**< Default Short retry Limit */ |
---|
| 8992 | +#define WLPKTDLY_HIST_NBINS 16 /**< number of bins used in the Delay histogram */ |
---|
5660 | 8993 | |
---|
5661 | | -/* structure to store per-AC delay statistics */ |
---|
| 8994 | +/** structure to store per-AC delay statistics */ |
---|
5662 | 8995 | typedef struct scb_delay_stats { |
---|
5663 | | - uint32 txmpdu_lost; /* number of MPDUs lost */ |
---|
5664 | | - uint32 txmpdu_cnt[SCB_RETRY_SHORT_DEF]; /* retry times histogram */ |
---|
5665 | | - uint32 delay_sum[SCB_RETRY_SHORT_DEF]; /* cumulative packet latency */ |
---|
5666 | | - uint32 delay_min; /* minimum packet latency observed */ |
---|
5667 | | - uint32 delay_max; /* maximum packet latency observed */ |
---|
5668 | | - uint32 delay_avg; /* packet latency average */ |
---|
5669 | | - uint32 delay_hist[WLPKTDLY_HIST_NBINS]; /* delay histogram */ |
---|
5670 | | - uint32 delay_count; /* minimum number of time period units before |
---|
| 8996 | + uint32 txmpdu_lost; /**< number of MPDUs lost */ |
---|
| 8997 | + uint32 txmpdu_cnt[SCB_RETRY_SHORT_DEF]; /**< retry times histogram */ |
---|
| 8998 | + uint32 delay_sum[SCB_RETRY_SHORT_DEF]; /**< cumulative packet latency */ |
---|
| 8999 | + uint32 delay_min; /**< minimum packet latency observed */ |
---|
| 9000 | + uint32 delay_max; /**< maximum packet latency observed */ |
---|
| 9001 | + uint32 delay_avg; /**< packet latency average */ |
---|
| 9002 | + uint32 delay_hist[WLPKTDLY_HIST_NBINS]; /**< delay histogram */ |
---|
| 9003 | + uint32 delay_count; /**< minimum number of time period units before |
---|
5671 | 9004 | consequent packet delay events can be generated |
---|
5672 | 9005 | */ |
---|
5673 | | - uint32 prev_txmpdu_cnt; /* Previous value of txmpdu_cnt[] during last iteration */ |
---|
5674 | | - uint32 prev_delay_sum; /* Previous value of delay_sum[] during last iteration */ |
---|
| 9006 | + uint32 prev_txmpdu_cnt; /**< Previous value of txmpdu_cnt[] during last iteration */ |
---|
| 9007 | + uint32 prev_delay_sum; /**< Previous value of delay_sum[] during last iteration */ |
---|
5675 | 9008 | } scb_delay_stats_t; |
---|
5676 | 9009 | |
---|
5677 | | -/* structure for txdelay event */ |
---|
| 9010 | +/** structure for txdelay event */ |
---|
5678 | 9011 | typedef struct txdelay_event { |
---|
5679 | | - uint8 status; |
---|
5680 | | - int rssi; |
---|
| 9012 | + uint8 status; |
---|
| 9013 | + uint8 PAD[3]; |
---|
| 9014 | + int32 rssi; |
---|
5681 | 9015 | chanim_stats_t chanim_stats; |
---|
5682 | 9016 | scb_delay_stats_t delay_stats[AC_COUNT]; |
---|
5683 | 9017 | } txdelay_event_t; |
---|
5684 | 9018 | |
---|
5685 | | -/* structure for txdelay parameters */ |
---|
| 9019 | +/** structure for txdelay parameters */ |
---|
5686 | 9020 | typedef struct txdelay_params { |
---|
5687 | | - uint16 ratio; /* Avg Txdelay Delta */ |
---|
5688 | | - uint8 cnt; /* Sample cnt */ |
---|
5689 | | - uint8 period; /* Sample period */ |
---|
5690 | | - uint8 tune; /* Debug */ |
---|
| 9021 | + uint16 ratio; /**< Avg Txdelay Delta */ |
---|
| 9022 | + uint8 cnt; /**< Sample cnt */ |
---|
| 9023 | + uint8 period; /**< Sample period */ |
---|
| 9024 | + uint8 tune; /**< Debug */ |
---|
| 9025 | + uint8 PAD; |
---|
5691 | 9026 | } txdelay_params_t; |
---|
5692 | | - |
---|
5693 | 9027 | #define MAX_TXDELAY_STATS_SCBS 6 |
---|
5694 | 9028 | #define TXDELAY_STATS_VERSION 1 |
---|
5695 | 9029 | |
---|
.. | .. |
---|
5699 | 9033 | }; |
---|
5700 | 9034 | |
---|
5701 | 9035 | typedef struct scb_total_delay_stats { |
---|
5702 | | - struct ether_addr ea; |
---|
5703 | | - uint8 pad[2]; |
---|
| 9036 | + struct ether_addr ea; |
---|
| 9037 | + uint8 pad[2]; |
---|
5704 | 9038 | scb_delay_stats_t dlystats[AC_COUNT]; |
---|
5705 | 9039 | } scb_total_delay_stats_t; |
---|
5706 | 9040 | |
---|
5707 | 9041 | typedef struct txdelay_stats { |
---|
5708 | 9042 | uint32 version; |
---|
5709 | 9043 | uint32 full_result; /* 0:Partial, 1:full */ |
---|
5710 | | - uint32 scb_cnt; /* in:requested, out:returned */ |
---|
| 9044 | + uint32 scb_cnt; /* in:requested, out:returned */ |
---|
5711 | 9045 | scb_total_delay_stats_t scb_delay_stats[1]; |
---|
5712 | 9046 | } txdelay_stats_t; |
---|
5713 | 9047 | |
---|
5714 | 9048 | #define WL_TXDELAY_STATS_FIXED_SIZE \ |
---|
5715 | 9049 | (sizeof(txdelay_stats_t)+(MAX_TXDELAY_STATS_SCBS-1)*sizeof(scb_total_delay_stats_t)) |
---|
5716 | | - |
---|
5717 | 9050 | enum { |
---|
5718 | 9051 | WNM_SERVICE_DMS = 1, |
---|
5719 | 9052 | WNM_SERVICE_FMS = 2, |
---|
5720 | 9053 | WNM_SERVICE_TFS = 3 |
---|
5721 | 9054 | }; |
---|
5722 | 9055 | |
---|
5723 | | -/* Definitions for WNM/NPS TCLAS */ |
---|
| 9056 | +/** Definitions for WNM/NPS TCLAS */ |
---|
5724 | 9057 | typedef struct wl_tclas { |
---|
5725 | 9058 | uint8 user_priority; |
---|
5726 | 9059 | uint8 fc_len; |
---|
.. | .. |
---|
5731 | 9064 | |
---|
5732 | 9065 | typedef struct wl_tclas_list { |
---|
5733 | 9066 | uint32 num; |
---|
5734 | | - wl_tclas_t tclas[1]; |
---|
| 9067 | + wl_tclas_t tclas[]; |
---|
5735 | 9068 | } wl_tclas_list_t; |
---|
5736 | 9069 | |
---|
5737 | | -/* Definitions for WNM/NPS Traffic Filter Service */ |
---|
| 9070 | +/** Definitions for WNM/NPS Traffic Filter Service */ |
---|
5738 | 9071 | typedef struct wl_tfs_req { |
---|
5739 | 9072 | uint8 tfs_id; |
---|
5740 | 9073 | uint8 tfs_actcode; |
---|
.. | .. |
---|
5743 | 9076 | } wl_tfs_req_t; |
---|
5744 | 9077 | |
---|
5745 | 9078 | typedef struct wl_tfs_filter { |
---|
5746 | | - uint8 status; /* Status returned by the AP */ |
---|
5747 | | - uint8 tclas_proc; /* TCLAS processing value (0:and, 1:or) */ |
---|
5748 | | - uint8 tclas_cnt; /* count of all wl_tclas_t in tclas array */ |
---|
5749 | | - uint8 tclas[1]; /* VLA of wl_tclas_t */ |
---|
| 9079 | + uint8 status; /**< Status returned by the AP */ |
---|
| 9080 | + uint8 tclas_proc; /**< TCLAS processing value (0:and, 1:or) */ |
---|
| 9081 | + uint8 tclas_cnt; /**< count of all wl_tclas_t in tclas array */ |
---|
| 9082 | + uint8 tclas[1]; /**< VLA of wl_tclas_t */ |
---|
5750 | 9083 | } wl_tfs_filter_t; |
---|
5751 | 9084 | #define WL_TFS_FILTER_FIXED_SIZE OFFSETOF(wl_tfs_filter_t, tclas) |
---|
5752 | 9085 | |
---|
5753 | 9086 | typedef struct wl_tfs_fset { |
---|
5754 | | - struct ether_addr ea; /* Address of AP/STA involved with this filter set */ |
---|
5755 | | - uint8 tfs_id; /* TFS ID field chosen by STA host */ |
---|
5756 | | - uint8 status; /* Internal status TFS_STATUS_xxx */ |
---|
5757 | | - uint8 actcode; /* Action code DOT11_TFS_ACTCODE_xxx */ |
---|
5758 | | - uint8 token; /* Token used in last request frame */ |
---|
5759 | | - uint8 notify; /* Notify frame sent/received because of this set */ |
---|
5760 | | - uint8 filter_cnt; /* count of all wl_tfs_filter_t in filter array */ |
---|
5761 | | - uint8 filter[1]; /* VLA of wl_tfs_filter_t */ |
---|
| 9087 | + struct ether_addr ea; /**< Address of AP/STA involved with this filter set */ |
---|
| 9088 | + uint8 tfs_id; /**< TFS ID field chosen by STA host */ |
---|
| 9089 | + uint8 status; /**< Internal status TFS_STATUS_xxx */ |
---|
| 9090 | + uint8 actcode; /**< Action code DOT11_TFS_ACTCODE_xxx */ |
---|
| 9091 | + uint8 token; /**< Token used in last request frame */ |
---|
| 9092 | + uint8 notify; /**< Notify frame sent/received because of this set */ |
---|
| 9093 | + uint8 filter_cnt; /**< count of all wl_tfs_filter_t in filter array */ |
---|
| 9094 | + uint8 filter[1]; /**< VLA of wl_tfs_filter_t */ |
---|
5762 | 9095 | } wl_tfs_fset_t; |
---|
5763 | 9096 | #define WL_TFS_FSET_FIXED_SIZE OFFSETOF(wl_tfs_fset_t, filter) |
---|
5764 | 9097 | |
---|
5765 | 9098 | enum { |
---|
5766 | | - TFS_STATUS_DISABLED = 0, /* TFS filter set disabled by user */ |
---|
5767 | | - TFS_STATUS_DISABLING = 1, /* Empty request just sent to AP */ |
---|
5768 | | - TFS_STATUS_VALIDATED = 2, /* Filter set validated by AP (but maybe not enabled!) */ |
---|
5769 | | - TFS_STATUS_VALIDATING = 3, /* Filter set just sent to AP */ |
---|
5770 | | - TFS_STATUS_NOT_ASSOC = 4, /* STA not associated */ |
---|
5771 | | - TFS_STATUS_NOT_SUPPORT = 5, /* TFS not supported by AP */ |
---|
5772 | | - TFS_STATUS_DENIED = 6, /* Filter set refused by AP (=> all sets are disabled!) */ |
---|
| 9099 | + TFS_STATUS_DISABLED = 0, /**< TFS filter set disabled by user */ |
---|
| 9100 | + TFS_STATUS_DISABLING = 1, /**< Empty request just sent to AP */ |
---|
| 9101 | + TFS_STATUS_VALIDATED = 2, /**< Filter set validated by AP (but maybe not enabled!) */ |
---|
| 9102 | + TFS_STATUS_VALIDATING = 3, /**< Filter set just sent to AP */ |
---|
| 9103 | + TFS_STATUS_NOT_ASSOC = 4, /**< STA not associated */ |
---|
| 9104 | + TFS_STATUS_NOT_SUPPORT = 5, /**< TFS not supported by AP */ |
---|
| 9105 | + TFS_STATUS_DENIED = 6, /**< Filter set refused by AP (=> all sets are disabled!) */ |
---|
5773 | 9106 | }; |
---|
5774 | 9107 | |
---|
5775 | 9108 | typedef struct wl_tfs_status { |
---|
5776 | | - uint8 fset_cnt; /* count of all wl_tfs_fset_t in fset array */ |
---|
5777 | | - wl_tfs_fset_t fset[1]; /* VLA of wl_tfs_fset_t */ |
---|
| 9109 | + uint8 fset_cnt; /**< count of all wl_tfs_fset_t in fset array */ |
---|
| 9110 | + wl_tfs_fset_t fset[1]; /**< VLA of wl_tfs_fset_t */ |
---|
5778 | 9111 | } wl_tfs_status_t; |
---|
5779 | 9112 | |
---|
5780 | 9113 | typedef struct wl_tfs_set { |
---|
5781 | | - uint8 send; /* Immediatly register registered sets on AP side */ |
---|
5782 | | - uint8 tfs_id; /* ID of a specific set (existing or new), or nul for all */ |
---|
5783 | | - uint8 actcode; /* Action code for this filter set */ |
---|
5784 | | - uint8 tclas_proc; /* TCLAS processing operator for this filter set */ |
---|
| 9114 | + uint8 send; /**< Immediatly register registered sets on AP side */ |
---|
| 9115 | + uint8 tfs_id; /**< ID of a specific set (existing or new), or nul for all */ |
---|
| 9116 | + uint8 actcode; /**< Action code for this filter set */ |
---|
| 9117 | + uint8 tclas_proc; /**< TCLAS processing operator for this filter set */ |
---|
5785 | 9118 | } wl_tfs_set_t; |
---|
5786 | 9119 | |
---|
5787 | 9120 | typedef struct wl_tfs_term { |
---|
5788 | | - uint8 del; /* Delete internal set once confirmation received */ |
---|
5789 | | - uint8 tfs_id; /* ID of a specific set (existing), or nul for all */ |
---|
| 9121 | + uint8 del; /**< Delete internal set once confirmation received */ |
---|
| 9122 | + uint8 tfs_id; /**< ID of a specific set (existing), or nul for all */ |
---|
5790 | 9123 | } wl_tfs_term_t; |
---|
5791 | | - |
---|
5792 | 9124 | |
---|
5793 | 9125 | #define DMS_DEP_PROXY_ARP (1 << 0) |
---|
5794 | 9126 | |
---|
5795 | 9127 | /* Definitions for WNM/NPS Directed Multicast Service */ |
---|
5796 | 9128 | enum { |
---|
5797 | | - DMS_STATUS_DISABLED = 0, /* DMS desc disabled by user */ |
---|
5798 | | - DMS_STATUS_ACCEPTED = 1, /* Request accepted by AP */ |
---|
5799 | | - DMS_STATUS_NOT_ASSOC = 2, /* STA not associated */ |
---|
5800 | | - DMS_STATUS_NOT_SUPPORT = 3, /* DMS not supported by AP */ |
---|
5801 | | - DMS_STATUS_DENIED = 4, /* Request denied by AP */ |
---|
5802 | | - DMS_STATUS_TERM = 5, /* Request terminated by AP */ |
---|
5803 | | - DMS_STATUS_REMOVING = 6, /* Remove request just sent */ |
---|
5804 | | - DMS_STATUS_ADDING = 7, /* Add request just sent */ |
---|
5805 | | - DMS_STATUS_ERROR = 8, /* Non compliant AP behvior */ |
---|
5806 | | - DMS_STATUS_IN_PROGRESS = 9, /* Request just sent */ |
---|
5807 | | - DMS_STATUS_REQ_MISMATCH = 10 /* Conditions for sending DMS req not met */ |
---|
| 9129 | + DMS_STATUS_DISABLED = 0, /**< DMS desc disabled by user */ |
---|
| 9130 | + DMS_STATUS_ACCEPTED = 1, /**< Request accepted by AP */ |
---|
| 9131 | + DMS_STATUS_NOT_ASSOC = 2, /**< STA not associated */ |
---|
| 9132 | + DMS_STATUS_NOT_SUPPORT = 3, /**< DMS not supported by AP */ |
---|
| 9133 | + DMS_STATUS_DENIED = 4, /**< Request denied by AP */ |
---|
| 9134 | + DMS_STATUS_TERM = 5, /**< Request terminated by AP */ |
---|
| 9135 | + DMS_STATUS_REMOVING = 6, /**< Remove request just sent */ |
---|
| 9136 | + DMS_STATUS_ADDING = 7, /**< Add request just sent */ |
---|
| 9137 | + DMS_STATUS_ERROR = 8, /**< Non compliant AP behvior */ |
---|
| 9138 | + DMS_STATUS_IN_PROGRESS = 9, /**< Request just sent */ |
---|
| 9139 | + DMS_STATUS_REQ_MISMATCH = 10 /**< Conditions for sending DMS req not met */ |
---|
5808 | 9140 | }; |
---|
5809 | 9141 | |
---|
5810 | 9142 | typedef struct wl_dms_desc { |
---|
.. | .. |
---|
5813 | 9145 | uint8 token; |
---|
5814 | 9146 | uint8 dms_id; |
---|
5815 | 9147 | uint8 tclas_proc; |
---|
5816 | | - uint8 mac_len; /* length of all ether_addr in data array, 0 if STA */ |
---|
5817 | | - uint8 tclas_len; /* length of all wl_tclas_t in data array */ |
---|
5818 | | - uint8 data[1]; /* VLA of 'ether_addr' and 'wl_tclas_t' (in this order ) */ |
---|
| 9148 | + uint8 mac_len; /**< length of all ether_addr in data array, 0 if STA */ |
---|
| 9149 | + uint8 tclas_len; /**< length of all wl_tclas_t in data array */ |
---|
| 9150 | + uint8 data[1]; /**< VLA of 'ether_addr' and 'wl_tclas_t' (in this order ) */ |
---|
5819 | 9151 | } wl_dms_desc_t; |
---|
5820 | 9152 | |
---|
5821 | 9153 | #define WL_DMS_DESC_FIXED_SIZE OFFSETOF(wl_dms_desc_t, data) |
---|
.. | .. |
---|
5843 | 9175 | } u; |
---|
5844 | 9176 | } wl_service_term_t; |
---|
5845 | 9177 | |
---|
5846 | | -/* Definitions for WNM/NPS BSS Transistion */ |
---|
| 9178 | +/** Definitions for WNM/NPS BSS Transistion */ |
---|
| 9179 | +#define WL_BSSTRANS_QUERY_VERSION_1 1 |
---|
| 9180 | +typedef struct wl_bsstrans_query { |
---|
| 9181 | + uint16 version; /* structure version */ |
---|
| 9182 | + uint16 pad0; /* padding for 4-byte allignment */ |
---|
| 9183 | + wlc_ssid_t ssid; /* SSID of NBR elem to be queried for */ |
---|
| 9184 | + uint8 reason; /* Reason code of the BTQ */ |
---|
| 9185 | + uint8 pad1[3]; /* padding for 4-byte allignment */ |
---|
| 9186 | +} wl_bsstrans_query_t; |
---|
| 9187 | + |
---|
| 9188 | +#define BTM_QUERY_NBR_COUNT_MAX 16 |
---|
| 9189 | + |
---|
| 9190 | +#define WL_BTQ_NBR_LIST_VERSION_1 1 |
---|
| 9191 | +typedef struct wl_btq_nbr_list { |
---|
| 9192 | + uint16 version; /* structure version */ |
---|
| 9193 | + uint8 count; /* No. of BTQ NBRs returned */ |
---|
| 9194 | + uint8 pad; /* padding for 4-byte allignment */ |
---|
| 9195 | + nbr_rpt_elem_t btq_nbt_elem[]; /* BTQ NBR elem in a BTQ NBR list */ |
---|
| 9196 | +} wl_btq_nbr_list_t; |
---|
| 9197 | + |
---|
5847 | 9198 | typedef struct wl_bsstrans_req { |
---|
5848 | | - uint16 tbtt; /* time of BSS to end of life, in unit of TBTT */ |
---|
5849 | | - uint16 dur; /* time of BSS to keep off, in unit of minute */ |
---|
5850 | | - uint8 reqmode; /* request mode of BSS transition request */ |
---|
5851 | | - uint8 unicast; /* request by unicast or by broadcast */ |
---|
| 9199 | + uint16 tbtt; /**< time of BSS to end of life, in unit of TBTT */ |
---|
| 9200 | + uint16 dur; /**< time of BSS to keep off, in unit of minute */ |
---|
| 9201 | + uint8 reqmode; /**< request mode of BSS transition request */ |
---|
| 9202 | + uint8 unicast; /**< request by unicast or by broadcast */ |
---|
5852 | 9203 | } wl_bsstrans_req_t; |
---|
5853 | 9204 | |
---|
| 9205 | +typedef struct wl_bsstrans_req_v2 { |
---|
| 9206 | + wl_bsstrans_req_t v1; |
---|
| 9207 | + int16 reason; /**< Transition reason code, -1: no reason code */ |
---|
| 9208 | + uint16 assoc_delay; /**< Association retry delay, 0: means no delay */ |
---|
| 9209 | +} wl_bsstrans_req_v2_t; |
---|
| 9210 | + |
---|
| 9211 | +#define WL_BTM_REQ_NO_REASON_CODE -1 |
---|
| 9212 | +#define WL_BTM_REQ_NO_ASSOC_RETRY_DELAY 0 |
---|
| 9213 | + |
---|
5854 | 9214 | enum { |
---|
5855 | | - BSSTRANS_RESP_AUTO = 0, /* Currently equivalent to ENABLE */ |
---|
5856 | | - BSSTRANS_RESP_DISABLE = 1, /* Never answer BSS Trans Req frames */ |
---|
5857 | | - BSSTRANS_RESP_ENABLE = 2, /* Always answer Req frames with preset data */ |
---|
5858 | | - BSSTRANS_RESP_WAIT = 3, /* Send ind, wait and/or send preset data (NOT IMPL) */ |
---|
5859 | | - BSSTRANS_RESP_IMMEDIATE = 4 /* After an ind, set data and send resp (NOT IMPL) */ |
---|
| 9215 | + BSSTRANS_RESP_AUTO = 0, /**< Currently equivalent to ENABLE */ |
---|
| 9216 | + BSSTRANS_RESP_DISABLE = 1, /**< Never answer BSS Trans Req frames */ |
---|
| 9217 | + BSSTRANS_RESP_ENABLE = 2, /**< Always answer Req frames with preset data */ |
---|
| 9218 | + BSSTRANS_RESP_WAIT = 3, /**< Send ind, wait and/or send preset data (NOT IMPL) */ |
---|
| 9219 | + BSSTRANS_RESP_IMMEDIATE = 4 /**< After an ind, set data and send resp (NOT IMPL) */ |
---|
5860 | 9220 | }; |
---|
5861 | 9221 | |
---|
5862 | 9222 | typedef struct wl_bsstrans_resp { |
---|
.. | .. |
---|
5872 | 9232 | * mandates different behavior on receiving BSS-transition request. To accomodate |
---|
5873 | 9233 | * such divergent behaviors these policies have been created. |
---|
5874 | 9234 | */ |
---|
5875 | | -enum { |
---|
5876 | | - WL_BSSTRANS_POLICY_ROAM_ALWAYS = 0, /* Roam (or disassociate) in all cases */ |
---|
5877 | | - WL_BSSTRANS_POLICY_ROAM_IF_MODE = 1, /* Roam only if requested by Request Mode field */ |
---|
5878 | | - WL_BSSTRANS_POLICY_ROAM_IF_PREF = 2, /* Roam only if Preferred BSS provided */ |
---|
5879 | | - WL_BSSTRANS_POLICY_WAIT = 3, /* Wait for deauth and send Accepted status */ |
---|
5880 | | - WL_BSSTRANS_POLICY_PRODUCT = 4, /* Policy for real product use cases (non-pf) */ |
---|
5881 | | -}; |
---|
| 9235 | +typedef enum { |
---|
| 9236 | + WL_BSSTRANS_POLICY_ROAM_ALWAYS = 0, /**< Roam (or disassociate) in all cases */ |
---|
| 9237 | + WL_BSSTRANS_POLICY_ROAM_IF_MODE = 1, /**< Roam only if requested by Request Mode field */ |
---|
| 9238 | + WL_BSSTRANS_POLICY_ROAM_IF_PREF = 2, /**< Roam only if Preferred BSS provided */ |
---|
| 9239 | + WL_BSSTRANS_POLICY_WAIT = 3, /**< Wait for deauth and send Accepted status */ |
---|
| 9240 | + WL_BSSTRANS_POLICY_PRODUCT = 4, /**< Policy for real product use cases (Olympic) */ |
---|
| 9241 | + WL_BSSTRANS_POLICY_PRODUCT_WBTEXT = 5, /**< Policy for real product use cases (SS) */ |
---|
| 9242 | + WL_BSSTRANS_POLICY_MBO = 6, /**< Policy for MBO certification */ |
---|
| 9243 | + WL_BSSTRANS_POLICY_MAX = 7 |
---|
| 9244 | +} wnm_bsstrans_policy_type_t; |
---|
5882 | 9245 | |
---|
5883 | | -/* Definitions for WNM/NPS TIM Broadcast */ |
---|
| 9246 | +/** Definitions for WNM/NPS TIM Broadcast */ |
---|
5884 | 9247 | typedef struct wl_timbc_offset { |
---|
5885 | | - int16 offset; /* offset in us */ |
---|
5886 | | - uint16 fix_intv; /* override interval sent from STA */ |
---|
5887 | | - uint16 rate_override; /* use rate override to send high rate TIM broadcast frame */ |
---|
5888 | | - uint8 tsf_present; /* show timestamp in TIM broadcast frame */ |
---|
| 9248 | + int16 offset; /**< offset in us */ |
---|
| 9249 | + uint16 fix_intv; /**< override interval sent from STA */ |
---|
| 9250 | + uint16 rate_override; /**< use rate override to send high rate TIM broadcast frame */ |
---|
| 9251 | + uint8 tsf_present; /**< show timestamp in TIM broadcast frame */ |
---|
| 9252 | + uint8 PAD; |
---|
5889 | 9253 | } wl_timbc_offset_t; |
---|
5890 | 9254 | |
---|
5891 | 9255 | typedef struct wl_timbc_set { |
---|
5892 | | - uint8 interval; /* Interval in DTIM wished or required. */ |
---|
5893 | | - uint8 flags; /* Bitfield described below */ |
---|
5894 | | - uint16 rate_min; /* Minimum rate required for High/Low TIM frames. Optionnal */ |
---|
5895 | | - uint16 rate_max; /* Maximum rate required for High/Low TIM frames. Optionnal */ |
---|
| 9256 | + uint8 interval; /**< Interval in DTIM wished or required. */ |
---|
| 9257 | + uint8 flags; /**< Bitfield described below */ |
---|
| 9258 | + uint16 rate_min; /**< Minimum rate required for High/Low TIM frames. Optionnal */ |
---|
| 9259 | + uint16 rate_max; /**< Maximum rate required for High/Low TIM frames. Optionnal */ |
---|
5896 | 9260 | } wl_timbc_set_t; |
---|
5897 | 9261 | |
---|
5898 | 9262 | enum { |
---|
5899 | | - WL_TIMBC_SET_TSF_REQUIRED = 1, /* Enable TIMBC only if TSF in TIM frames */ |
---|
5900 | | - WL_TIMBC_SET_NO_OVERRIDE = 2, /* ... if AP does not override interval */ |
---|
5901 | | - WL_TIMBC_SET_PROXY_ARP = 4, /* ... if AP support Proxy ARP */ |
---|
5902 | | - WL_TIMBC_SET_DMS_ACCEPTED = 8 /* ... if all DMS desc have been accepted */ |
---|
| 9263 | + WL_TIMBC_SET_TSF_REQUIRED = 1, /**< Enable TIMBC only if TSF in TIM frames */ |
---|
| 9264 | + WL_TIMBC_SET_NO_OVERRIDE = 2, /**< ... if AP does not override interval */ |
---|
| 9265 | + WL_TIMBC_SET_PROXY_ARP = 4, /**< ... if AP support Proxy ARP */ |
---|
| 9266 | + WL_TIMBC_SET_DMS_ACCEPTED = 8 /**< ... if all DMS desc have been accepted */ |
---|
5903 | 9267 | }; |
---|
5904 | 9268 | |
---|
5905 | 9269 | typedef struct wl_timbc_status { |
---|
5906 | | - uint8 status_sta; /* Status from internal state machine (check below) */ |
---|
5907 | | - uint8 status_ap; /* From AP response frame (check 8.4.2.86 from 802.11) */ |
---|
| 9270 | + uint8 status_sta; /**< Status from internal state machine (check below) */ |
---|
| 9271 | + uint8 status_ap; /**< From AP response frame (check 8.4.2.86 from 802.11) */ |
---|
5908 | 9272 | uint8 interval; |
---|
5909 | 9273 | uint8 pad; |
---|
5910 | 9274 | int32 offset; |
---|
.. | .. |
---|
5913 | 9277 | } wl_timbc_status_t; |
---|
5914 | 9278 | |
---|
5915 | 9279 | enum { |
---|
5916 | | - WL_TIMBC_STATUS_DISABLE = 0, /* TIMBC disabled by user */ |
---|
5917 | | - WL_TIMBC_STATUS_REQ_MISMATCH = 1, /* AP settings do no match user requirements */ |
---|
5918 | | - WL_TIMBC_STATUS_NOT_ASSOC = 2, /* STA not associated */ |
---|
5919 | | - WL_TIMBC_STATUS_NOT_SUPPORT = 3, /* TIMBC not supported by AP */ |
---|
5920 | | - WL_TIMBC_STATUS_DENIED = 4, /* Req to disable TIMBC sent to AP */ |
---|
5921 | | - WL_TIMBC_STATUS_ENABLE = 5 /* TIMBC enabled */ |
---|
| 9280 | + WL_TIMBC_STATUS_DISABLE = 0, /**< TIMBC disabled by user */ |
---|
| 9281 | + WL_TIMBC_STATUS_REQ_MISMATCH = 1, /**< AP settings do no match user requirements */ |
---|
| 9282 | + WL_TIMBC_STATUS_NOT_ASSOC = 2, /**< STA not associated */ |
---|
| 9283 | + WL_TIMBC_STATUS_NOT_SUPPORT = 3, /**< TIMBC not supported by AP */ |
---|
| 9284 | + WL_TIMBC_STATUS_DENIED = 4, /**< Req to disable TIMBC sent to AP */ |
---|
| 9285 | + WL_TIMBC_STATUS_ENABLE = 5 /**< TIMBC enabled */ |
---|
5922 | 9286 | }; |
---|
5923 | 9287 | |
---|
5924 | | -/* Definitions for PM2 Dynamic Fast Return To Sleep */ |
---|
| 9288 | +/** Definitions for PM2 Dynamic Fast Return To Sleep */ |
---|
5925 | 9289 | typedef struct wl_pm2_sleep_ret_ext { |
---|
5926 | | - uint8 logic; /* DFRTS logic: see WL_DFRTS_LOGIC_* below */ |
---|
5927 | | - uint16 low_ms; /* Low FRTS timeout */ |
---|
5928 | | - uint16 high_ms; /* High FRTS timeout */ |
---|
5929 | | - uint16 rx_pkts_threshold; /* switching threshold: # rx pkts */ |
---|
5930 | | - uint16 tx_pkts_threshold; /* switching threshold: # tx pkts */ |
---|
5931 | | - uint16 txrx_pkts_threshold; /* switching threshold: # (tx+rx) pkts */ |
---|
5932 | | - uint32 rx_bytes_threshold; /* switching threshold: # rx bytes */ |
---|
5933 | | - uint32 tx_bytes_threshold; /* switching threshold: # tx bytes */ |
---|
5934 | | - uint32 txrx_bytes_threshold; /* switching threshold: # (tx+rx) bytes */ |
---|
| 9290 | + uint8 logic; /**< DFRTS logic: see WL_DFRTS_LOGIC_* below */ |
---|
| 9291 | + uint8 PAD; |
---|
| 9292 | + uint16 low_ms; /**< Low FRTS timeout */ |
---|
| 9293 | + uint16 high_ms; /**< High FRTS timeout */ |
---|
| 9294 | + uint16 rx_pkts_threshold; /**< switching threshold: # rx pkts */ |
---|
| 9295 | + uint16 tx_pkts_threshold; /**< switching threshold: # tx pkts */ |
---|
| 9296 | + uint16 txrx_pkts_threshold; /**< switching threshold: # (tx+rx) pkts */ |
---|
| 9297 | + uint32 rx_bytes_threshold; /**< switching threshold: # rx bytes */ |
---|
| 9298 | + uint32 tx_bytes_threshold; /**< switching threshold: # tx bytes */ |
---|
| 9299 | + uint32 txrx_bytes_threshold; /**< switching threshold: # (tx+rx) bytes */ |
---|
5935 | 9300 | } wl_pm2_sleep_ret_ext_t; |
---|
5936 | 9301 | |
---|
5937 | | -#define WL_DFRTS_LOGIC_OFF 0 /* Feature is disabled */ |
---|
5938 | | -#define WL_DFRTS_LOGIC_OR 1 /* OR all non-zero threshold conditions */ |
---|
5939 | | -#define WL_DFRTS_LOGIC_AND 2 /* AND all non-zero threshold conditions */ |
---|
| 9302 | +#define WL_DFRTS_LOGIC_OFF 0 /**< Feature is disabled */ |
---|
| 9303 | +#define WL_DFRTS_LOGIC_OR 1 /**< OR all non-zero threshold conditions */ |
---|
| 9304 | +#define WL_DFRTS_LOGIC_AND 2 /**< AND all non-zero threshold conditions */ |
---|
5940 | 9305 | |
---|
5941 | 9306 | /* Values for the passive_on_restricted_mode iovar. When set to non-zero, this iovar |
---|
5942 | 9307 | * disables automatic conversions of a channel from passively scanned to |
---|
5943 | 9308 | * actively scanned. These values only have an effect for country codes such |
---|
5944 | 9309 | * as XZ where some 5 GHz channels are defined to be passively scanned. |
---|
5945 | 9310 | */ |
---|
5946 | | -#define WL_PASSACTCONV_DISABLE_NONE 0 /* Enable permanent and temporary conversions */ |
---|
5947 | | -#define WL_PASSACTCONV_DISABLE_ALL 1 /* Disable permanent and temporary conversions */ |
---|
5948 | | -#define WL_PASSACTCONV_DISABLE_PERM 2 /* Disable only permanent conversions */ |
---|
| 9311 | +#define WL_PASSACTCONV_DISABLE_NONE 0 /**< Enable permanent and temporary conversions */ |
---|
| 9312 | +#define WL_PASSACTCONV_DISABLE_ALL 1 /**< Disable permanent and temporary conversions */ |
---|
| 9313 | +#define WL_PASSACTCONV_DISABLE_PERM 2 /**< Disable only permanent conversions */ |
---|
5949 | 9314 | |
---|
5950 | 9315 | /* Definitions for Reliable Multicast */ |
---|
5951 | 9316 | #define WL_RMC_CNT_VERSION 1 |
---|
.. | .. |
---|
5963 | 9328 | #define WL_RMC_MAX_TRS_IN_ACKALL 1 |
---|
5964 | 9329 | #define WL_RMC_ACK_MCAST0 0x02 |
---|
5965 | 9330 | #define WL_RMC_ACK_MCAST_ALL 0x01 |
---|
5966 | | -#define WL_RMC_ACTF_TIME_MIN 300 /* time in ms */ |
---|
5967 | | -#define WL_RMC_ACTF_TIME_MAX 20000 /* time in ms */ |
---|
5968 | | -#define WL_RMC_MAX_NUM_TRS 32 /* maximun transmitters allowed */ |
---|
5969 | | -#define WL_RMC_ARTMO_MIN 350 /* time in ms */ |
---|
5970 | | -#define WL_RMC_ARTMO_MAX 40000 /* time in ms */ |
---|
| 9331 | +#define WL_RMC_ACTF_TIME_MIN 300 /**< time in ms */ |
---|
| 9332 | +#define WL_RMC_ACTF_TIME_MAX 20000 /**< time in ms */ |
---|
| 9333 | +#define WL_RMC_MAX_NUM_TRS 32 /**< maximun transmitters allowed */ |
---|
| 9334 | +#define WL_RMC_ARTMO_MIN 350 /**< time in ms */ |
---|
| 9335 | +#define WL_RMC_ARTMO_MAX 40000 /**< time in ms */ |
---|
5971 | 9336 | |
---|
5972 | 9337 | /* RMC events in action frames */ |
---|
5973 | 9338 | enum rmc_opcodes { |
---|
5974 | | - RELMCAST_ENTRY_OP_DISABLE = 0, /* Disable multi-cast group */ |
---|
5975 | | - RELMCAST_ENTRY_OP_DELETE = 1, /* Delete multi-cast group */ |
---|
5976 | | - RELMCAST_ENTRY_OP_ENABLE = 2, /* Enable multi-cast group */ |
---|
5977 | | - RELMCAST_ENTRY_OP_ACK_ALL = 3 /* Enable ACK ALL bit in AMT */ |
---|
| 9339 | + RELMCAST_ENTRY_OP_DISABLE = 0, /**< Disable multi-cast group */ |
---|
| 9340 | + RELMCAST_ENTRY_OP_DELETE = 1, /**< Delete multi-cast group */ |
---|
| 9341 | + RELMCAST_ENTRY_OP_ENABLE = 2, /**< Enable multi-cast group */ |
---|
| 9342 | + RELMCAST_ENTRY_OP_ACK_ALL = 3 /**< Enable ACK ALL bit in AMT */ |
---|
5978 | 9343 | }; |
---|
5979 | 9344 | |
---|
5980 | 9345 | /* RMC operational modes */ |
---|
5981 | 9346 | enum rmc_modes { |
---|
5982 | | - WL_RMC_MODE_RECEIVER = 0, /* Receiver mode by default */ |
---|
5983 | | - WL_RMC_MODE_TRANSMITTER = 1, /* Transmitter mode using wl ackreq */ |
---|
5984 | | - WL_RMC_MODE_INITIATOR = 2 /* Initiator mode using wl ackreq */ |
---|
| 9347 | + WL_RMC_MODE_RECEIVER = 0, /**< Receiver mode by default */ |
---|
| 9348 | + WL_RMC_MODE_TRANSMITTER = 1, /**< Transmitter mode using wl ackreq */ |
---|
| 9349 | + WL_RMC_MODE_INITIATOR = 2 /**< Initiator mode using wl ackreq */ |
---|
5985 | 9350 | }; |
---|
5986 | 9351 | |
---|
5987 | | -/* Each RMC mcast client info */ |
---|
| 9352 | +/** Each RMC mcast client info */ |
---|
5988 | 9353 | typedef struct wl_relmcast_client { |
---|
5989 | | - uint8 flag; /* status of client such as AR, R, or blacklisted */ |
---|
5990 | | - int16 rssi; /* rssi value of RMC client */ |
---|
5991 | | - struct ether_addr addr; /* mac address of RMC client */ |
---|
| 9354 | + uint8 flag; /**< status of client such as AR, R, or blacklisted */ |
---|
| 9355 | + uint8 PAD; |
---|
| 9356 | + int16 rssi; /**< rssi value of RMC client */ |
---|
| 9357 | + struct ether_addr addr; /**< mac address of RMC client */ |
---|
5992 | 9358 | } wl_relmcast_client_t; |
---|
5993 | 9359 | |
---|
5994 | | -/* RMC Counters */ |
---|
| 9360 | +/** RMC Counters */ |
---|
5995 | 9361 | typedef struct wl_rmc_cnts { |
---|
5996 | | - uint16 version; /* see definition of WL_CNT_T_VERSION */ |
---|
5997 | | - uint16 length; /* length of entire structure */ |
---|
5998 | | - uint16 dupcnt; /* counter for duplicate rmc MPDU */ |
---|
5999 | | - uint16 ackreq_err; /* counter for wl ackreq error */ |
---|
6000 | | - uint16 af_tx_err; /* error count for action frame transmit */ |
---|
6001 | | - uint16 null_tx_err; /* error count for rmc null frame transmit */ |
---|
6002 | | - uint16 af_unicast_tx_err; /* error count for rmc unicast frame transmit */ |
---|
6003 | | - uint16 mc_no_amt_slot; /* No mcast AMT entry available */ |
---|
| 9362 | + uint16 version; /**< see definition of WL_CNT_T_VERSION */ |
---|
| 9363 | + uint16 length; /**< length of entire structure */ |
---|
| 9364 | + uint16 dupcnt; /**< counter for duplicate rmc MPDU */ |
---|
| 9365 | + uint16 ackreq_err; /**< counter for wl ackreq error */ |
---|
| 9366 | + uint16 af_tx_err; /**< error count for action frame transmit */ |
---|
| 9367 | + uint16 null_tx_err; /**< error count for rmc null frame transmit */ |
---|
| 9368 | + uint16 af_unicast_tx_err; /**< error count for rmc unicast frame transmit */ |
---|
| 9369 | + uint16 mc_no_amt_slot; /**< No mcast AMT entry available */ |
---|
6004 | 9370 | /* Unused. Keep for rom compatibility */ |
---|
6005 | | - uint16 mc_no_glb_slot; /* No mcast entry available in global table */ |
---|
6006 | | - uint16 mc_not_mirrored; /* mcast group is not mirrored */ |
---|
6007 | | - uint16 mc_existing_tr; /* mcast group is already taken by transmitter */ |
---|
6008 | | - uint16 mc_exist_in_amt; /* mcast group is already programmed in amt */ |
---|
| 9371 | + uint16 mc_no_glb_slot; /**< No mcast entry available in global table */ |
---|
| 9372 | + uint16 mc_not_mirrored; /**< mcast group is not mirrored */ |
---|
| 9373 | + uint16 mc_existing_tr; /**< mcast group is already taken by transmitter */ |
---|
| 9374 | + uint16 mc_exist_in_amt; /**< mcast group is already programmed in amt */ |
---|
6009 | 9375 | /* Unused. Keep for rom compatibility */ |
---|
6010 | | - uint16 mc_not_exist_in_gbl; /* mcast group is not in global table */ |
---|
6011 | | - uint16 mc_not_exist_in_amt; /* mcast group is not in AMT table */ |
---|
6012 | | - uint16 mc_utilized; /* mcast addressed is already taken */ |
---|
6013 | | - uint16 mc_taken_other_tr; /* multi-cast addressed is already taken */ |
---|
6014 | | - uint32 rmc_rx_frames_mac; /* no of mc frames received from mac */ |
---|
6015 | | - uint32 rmc_tx_frames_mac; /* no of mc frames transmitted to mac */ |
---|
6016 | | - uint32 mc_null_ar_cnt; /* no. of times NULL AR is received */ |
---|
6017 | | - uint32 mc_ar_role_selected; /* no. of times took AR role */ |
---|
6018 | | - uint32 mc_ar_role_deleted; /* no. of times AR role cancelled */ |
---|
6019 | | - uint32 mc_noacktimer_expired; /* no. of times noack timer expired */ |
---|
6020 | | - uint16 mc_no_wl_clk; /* no wl clk detected when trying to access amt */ |
---|
6021 | | - uint16 mc_tr_cnt_exceeded; /* No of transmitters in the network exceeded */ |
---|
| 9376 | + uint16 mc_not_exist_in_gbl; /**< mcast group is not in global table */ |
---|
| 9377 | + uint16 mc_not_exist_in_amt; /**< mcast group is not in AMT table */ |
---|
| 9378 | + uint16 mc_utilized; /**< mcast addressed is already taken */ |
---|
| 9379 | + uint16 mc_taken_other_tr; /**< multi-cast addressed is already taken */ |
---|
| 9380 | + uint32 rmc_rx_frames_mac; /**< no of mc frames received from mac */ |
---|
| 9381 | + uint32 rmc_tx_frames_mac; /**< no of mc frames transmitted to mac */ |
---|
| 9382 | + uint32 mc_null_ar_cnt; /**< no. of times NULL AR is received */ |
---|
| 9383 | + uint32 mc_ar_role_selected; /**< no. of times took AR role */ |
---|
| 9384 | + uint32 mc_ar_role_deleted; /**< no. of times AR role cancelled */ |
---|
| 9385 | + uint32 mc_noacktimer_expired; /**< no. of times noack timer expired */ |
---|
| 9386 | + uint16 mc_no_wl_clk; /**< no wl clk detected when trying to access amt */ |
---|
| 9387 | + uint16 mc_tr_cnt_exceeded; /**< No of transmitters in the network exceeded */ |
---|
6022 | 9388 | } wl_rmc_cnts_t; |
---|
6023 | 9389 | |
---|
6024 | | -/* RMC Status */ |
---|
| 9390 | +/** RMC Status */ |
---|
6025 | 9391 | typedef struct wl_relmcast_st { |
---|
6026 | | - uint8 ver; /* version of RMC */ |
---|
6027 | | - uint8 num; /* number of clients detected by transmitter */ |
---|
| 9392 | + uint8 ver; /**< version of RMC */ |
---|
| 9393 | + uint8 num; /**< number of clients detected by transmitter */ |
---|
6028 | 9394 | wl_relmcast_client_t clients[WL_RMC_MAX_CLIENT]; |
---|
6029 | | - uint16 err; /* error status (used in infra) */ |
---|
6030 | | - uint16 actf_time; /* action frame time period */ |
---|
| 9395 | + uint16 err; /**< error status (used in infra) */ |
---|
| 9396 | + uint16 actf_time; /**< action frame time period */ |
---|
6031 | 9397 | } wl_relmcast_status_t; |
---|
6032 | 9398 | |
---|
6033 | | -/* Entry for each STA/node */ |
---|
| 9399 | +/** Entry for each STA/node */ |
---|
6034 | 9400 | typedef struct wl_rmc_entry { |
---|
6035 | 9401 | /* operation on multi-cast entry such add, |
---|
6036 | 9402 | * delete, ack-all |
---|
6037 | 9403 | */ |
---|
6038 | 9404 | int8 flag; |
---|
6039 | | - struct ether_addr addr; /* multi-cast group mac address */ |
---|
| 9405 | + struct ether_addr addr; /**< multi-cast group mac address */ |
---|
6040 | 9406 | } wl_rmc_entry_t; |
---|
6041 | 9407 | |
---|
6042 | | -/* RMC table */ |
---|
| 9408 | +/** RMC table */ |
---|
6043 | 9409 | typedef struct wl_rmc_entry_table { |
---|
6044 | | - uint8 index; /* index to a particular mac entry in table */ |
---|
6045 | | - uint8 opcode; /* opcodes or operation on entry */ |
---|
| 9410 | + uint8 index; /**< index to a particular mac entry in table */ |
---|
| 9411 | + uint8 opcode; /**< opcodes or operation on entry */ |
---|
6046 | 9412 | wl_rmc_entry_t entry[WL_RMC_MAX_TABLE_ENTRY]; |
---|
6047 | 9413 | } wl_rmc_entry_table_t; |
---|
6048 | 9414 | |
---|
6049 | 9415 | typedef struct wl_rmc_trans_elem { |
---|
6050 | | - struct ether_addr tr_mac; /* transmitter mac */ |
---|
6051 | | - struct ether_addr ar_mac; /* ar mac */ |
---|
6052 | | - uint16 artmo; /* AR timeout */ |
---|
6053 | | - uint8 amt_idx; /* amt table entry */ |
---|
6054 | | - uint16 flag; /* entry will be acked, not acked, programmed, full etc */ |
---|
| 9416 | + struct ether_addr tr_mac; /**< transmitter mac */ |
---|
| 9417 | + struct ether_addr ar_mac; /**< ar mac */ |
---|
| 9418 | + uint16 artmo; /**< AR timeout */ |
---|
| 9419 | + uint8 amt_idx; /**< amt table entry */ |
---|
| 9420 | + uint8 PAD; |
---|
| 9421 | + uint16 flag; /**< entry will be acked, not acked, programmed, full etc */ |
---|
6055 | 9422 | } wl_rmc_trans_elem_t; |
---|
6056 | 9423 | |
---|
6057 | | -/* RMC transmitters */ |
---|
| 9424 | +/** RMC transmitters */ |
---|
6058 | 9425 | typedef struct wl_rmc_trans_in_network { |
---|
6059 | | - uint8 ver; /* version of RMC */ |
---|
6060 | | - uint8 num_tr; /* number of transmitters in the network */ |
---|
| 9426 | + uint8 ver; /**< version of RMC */ |
---|
| 9427 | + uint8 num_tr; /**< number of transmitters in the network */ |
---|
6061 | 9428 | wl_rmc_trans_elem_t trs[WL_RMC_MAX_NUM_TRS]; |
---|
6062 | 9429 | } wl_rmc_trans_in_network_t; |
---|
6063 | 9430 | |
---|
6064 | | -/* To update vendor specific ie for RMC */ |
---|
| 9431 | +/** To update vendor specific ie for RMC */ |
---|
6065 | 9432 | typedef struct wl_rmc_vsie { |
---|
6066 | 9433 | uint8 oui[DOT11_OUI_LEN]; |
---|
6067 | | - uint16 payload; /* IE Data Payload */ |
---|
| 9434 | + uint8 PAD; |
---|
| 9435 | + uint16 payload; /**< IE Data Payload */ |
---|
6068 | 9436 | } wl_rmc_vsie_t; |
---|
6069 | | - |
---|
6070 | 9437 | |
---|
6071 | 9438 | /* structures & defines for proximity detection */ |
---|
6072 | 9439 | enum proxd_method { |
---|
.. | .. |
---|
6093 | 9460 | #define WL_PROXD_FLAG_ONEWAY 0x40 |
---|
6094 | 9461 | #define WL_PROXD_FLAG_SEQ_EN 0x80 |
---|
6095 | 9462 | |
---|
| 9463 | +#define WL_PROXD_SETFLAG_K 0x1 |
---|
| 9464 | +#define WL_PROXD_SETFLAG_N 0x2 |
---|
| 9465 | +#define WL_PROXD_SETFLAG_S 0x4 |
---|
| 9466 | + |
---|
| 9467 | +#define WL_PROXD_SETFLAG_K 0x1 |
---|
| 9468 | +#define WL_PROXD_SETFLAG_N 0x2 |
---|
| 9469 | +#define WL_PROXD_SETFLAG_S 0x4 |
---|
| 9470 | + |
---|
6096 | 9471 | #define WL_PROXD_RANDOM_WAKEUP 0x8000 |
---|
6097 | 9472 | #define WL_PROXD_MAXREPORT 8 |
---|
6098 | 9473 | |
---|
6099 | 9474 | typedef struct wl_proxd_iovar { |
---|
6100 | | - uint16 method; /* Proxmity Detection method */ |
---|
6101 | | - uint16 mode; /* Mode (neutral, initiator, target) */ |
---|
| 9475 | + uint16 method; /**< Proximity Detection method */ |
---|
| 9476 | + uint16 mode; /**< Mode (neutral, initiator, target) */ |
---|
6102 | 9477 | } wl_proxd_iovar_t; |
---|
6103 | 9478 | |
---|
6104 | 9479 | /* |
---|
.. | .. |
---|
6107 | 9482 | * common params should be placed at the beginning |
---|
6108 | 9483 | */ |
---|
6109 | 9484 | |
---|
6110 | | -/* require strict packing */ |
---|
6111 | | -#include <packed_section_start.h> |
---|
| 9485 | +typedef struct wl_proxd_params_common { |
---|
| 9486 | + chanspec_t chanspec; /**< channel spec */ |
---|
| 9487 | + int16 tx_power; /**< tx power of Proximity Detection(PD) frames (in dBm) */ |
---|
| 9488 | + uint16 tx_rate; /**< tx rate of PD rames (in 500kbps units) */ |
---|
| 9489 | + uint16 timeout; /**< timeout value */ |
---|
| 9490 | + uint16 interval; /**< interval between neighbor finding attempts (in TU) */ |
---|
| 9491 | + uint16 duration; /**< duration of neighbor finding attempts (in ms) */ |
---|
| 9492 | +} wl_proxd_params_common_t; |
---|
6112 | 9493 | |
---|
6113 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_params_common { |
---|
6114 | | - chanspec_t chanspec; /* channel spec */ |
---|
6115 | | - int16 tx_power; /* tx power of Proximity Detection(PD) frames (in dBm) */ |
---|
6116 | | - uint16 tx_rate; /* tx rate of PD rames (in 500kbps units) */ |
---|
6117 | | - uint16 timeout; /* timeout value */ |
---|
6118 | | - uint16 interval; /* interval between neighbor finding attempts (in TU) */ |
---|
6119 | | - uint16 duration; /* duration of neighbor finding attempts (in ms) */ |
---|
6120 | | -} BWL_POST_PACKED_STRUCT wl_proxd_params_common_t; |
---|
6121 | | - |
---|
6122 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_params_rssi_method { |
---|
6123 | | - chanspec_t chanspec; /* chanspec for home channel */ |
---|
6124 | | - int16 tx_power; /* tx power of Proximity Detection frames (in dBm) */ |
---|
6125 | | - uint16 tx_rate; /* tx rate of PD frames, 500kbps units */ |
---|
6126 | | - uint16 timeout; /* state machine wait timeout of the frames (in ms) */ |
---|
6127 | | - uint16 interval; /* interval between neighbor finding attempts (in TU) */ |
---|
6128 | | - uint16 duration; /* duration of neighbor finding attempts (in ms) */ |
---|
| 9494 | +typedef struct wl_proxd_params_rssi_method { |
---|
| 9495 | + chanspec_t chanspec; /**< chanspec for home channel */ |
---|
| 9496 | + int16 tx_power; /**< tx power of Proximity Detection frames (in dBm) */ |
---|
| 9497 | + uint16 tx_rate; /**< tx rate of PD frames, 500kbps units */ |
---|
| 9498 | + uint16 timeout; /**< state machine wait timeout of the frames (in ms) */ |
---|
| 9499 | + uint16 interval; /**< interval between neighbor finding attempts (in TU) */ |
---|
| 9500 | + uint16 duration; /**< duration of neighbor finding attempts (in ms) */ |
---|
6129 | 9501 | /* method specific ones go after this line */ |
---|
6130 | | - int16 rssi_thresh; /* RSSI threshold (in dBm) */ |
---|
6131 | | - uint16 maxconvergtmo; /* max wait converge timeout (in ms) */ |
---|
| 9502 | + int16 rssi_thresh; /**< RSSI threshold (in dBm) */ |
---|
| 9503 | + uint16 maxconvergtmo; /**< max wait converge timeout (in ms) */ |
---|
6132 | 9504 | } wl_proxd_params_rssi_method_t; |
---|
6133 | 9505 | |
---|
6134 | | -#define Q1_NS 25 /* Q1 time units */ |
---|
| 9506 | +#define Q1_NS 25 /**< Q1 time units */ |
---|
6135 | 9507 | |
---|
6136 | | -#define TOF_BW_NUM 3 /* number of bandwidth that the TOF can support */ |
---|
| 9508 | +#define TOF_BW_NUM 3 /**< number of bandwidth that the TOF can support */ |
---|
6137 | 9509 | #define TOF_BW_SEQ_NUM (TOF_BW_NUM+2) /* number of total index */ |
---|
6138 | 9510 | enum tof_bw_index { |
---|
6139 | 9511 | TOF_BW_20MHZ_INDEX = 0, |
---|
.. | .. |
---|
6143 | 9515 | TOF_BW_SEQRX_INDEX = 4 |
---|
6144 | 9516 | }; |
---|
6145 | 9517 | |
---|
6146 | | -#define BANDWIDTH_BASE 20 /* base value of bandwidth */ |
---|
| 9518 | +#define BANDWIDTH_BASE 20 /**< base value of bandwidth */ |
---|
6147 | 9519 | #define TOF_BW_20MHZ (BANDWIDTH_BASE << TOF_BW_20MHZ_INDEX) |
---|
6148 | 9520 | #define TOF_BW_40MHZ (BANDWIDTH_BASE << TOF_BW_40MHZ_INDEX) |
---|
6149 | 9521 | #define TOF_BW_80MHZ (BANDWIDTH_BASE << TOF_BW_80MHZ_INDEX) |
---|
6150 | 9522 | #define TOF_BW_10MHZ 10 |
---|
6151 | 9523 | |
---|
6152 | | -#define NFFT_BASE 64 /* base size of fft */ |
---|
| 9524 | +#define NFFT_BASE 64 /**< base size of fft */ |
---|
6153 | 9525 | #define TOF_NFFT_20MHZ (NFFT_BASE << TOF_BW_20MHZ_INDEX) |
---|
6154 | 9526 | #define TOF_NFFT_40MHZ (NFFT_BASE << TOF_BW_40MHZ_INDEX) |
---|
6155 | 9527 | #define TOF_NFFT_80MHZ (NFFT_BASE << TOF_BW_80MHZ_INDEX) |
---|
6156 | 9528 | |
---|
6157 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_params_tof_method { |
---|
6158 | | - chanspec_t chanspec; /* chanspec for home channel */ |
---|
6159 | | - int16 tx_power; /* tx power of Proximity Detection(PD) frames (in dBm) */ |
---|
6160 | | - uint16 tx_rate; /* tx rate of PD rames (in 500kbps units) */ |
---|
6161 | | - uint16 timeout; /* state machine wait timeout of the frames (in ms) */ |
---|
6162 | | - uint16 interval; /* interval between neighbor finding attempts (in TU) */ |
---|
6163 | | - uint16 duration; /* duration of neighbor finding attempts (in ms) */ |
---|
| 9529 | +typedef struct wl_proxd_params_tof_method { |
---|
| 9530 | + chanspec_t chanspec; /**< chanspec for home channel */ |
---|
| 9531 | + int16 tx_power; /**< tx power of Proximity Detection(PD) frames (in dBm) */ |
---|
| 9532 | + uint16 tx_rate; /**< tx rate of PD rames (in 500kbps units) */ |
---|
| 9533 | + uint16 timeout; /**< state machine wait timeout of the frames (in ms) */ |
---|
| 9534 | + uint16 interval; /**< interval between neighbor finding attempts (in TU) */ |
---|
| 9535 | + uint16 duration; /**< duration of neighbor finding attempts (in ms) */ |
---|
6164 | 9536 | /* specific for the method go after this line */ |
---|
6165 | | - struct ether_addr tgt_mac; /* target mac addr for TOF method */ |
---|
6166 | | - uint16 ftm_cnt; /* number of the frames txed by initiator */ |
---|
6167 | | - uint16 retry_cnt; /* number of retransmit attampts for ftm frames */ |
---|
6168 | | - int16 vht_rate; /* ht or vht rate */ |
---|
| 9537 | + struct ether_addr tgt_mac; /**< target mac addr for TOF method */ |
---|
| 9538 | + uint16 ftm_cnt; /**< number of the frames txed by initiator */ |
---|
| 9539 | + uint16 retry_cnt; /**< number of retransmit attampts for ftm frames */ |
---|
| 9540 | + int16 vht_rate; /**< ht or vht rate */ |
---|
6169 | 9541 | /* add more params required for other methods can be added here */ |
---|
6170 | | -} BWL_POST_PACKED_STRUCT wl_proxd_params_tof_method_t; |
---|
| 9542 | +} wl_proxd_params_tof_method_t; |
---|
6171 | 9543 | |
---|
6172 | 9544 | typedef struct wl_proxd_seq_config |
---|
6173 | 9545 | { |
---|
.. | .. |
---|
6179 | 9551 | int16 w_offset; |
---|
6180 | 9552 | } wl_proxd_seq_config_t; |
---|
6181 | 9553 | |
---|
6182 | | - |
---|
6183 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_params_tof_tune { |
---|
6184 | | - uint32 Ki; /* h/w delay K factor for initiator */ |
---|
6185 | | - uint32 Kt; /* h/w delay K factor for target */ |
---|
6186 | | - int16 vhtack; /* enable/disable VHT ACK */ |
---|
6187 | | - int16 N_log2[TOF_BW_SEQ_NUM]; /* simple threshold crossing */ |
---|
6188 | | - int16 w_offset[TOF_BW_NUM]; /* offset of threshold crossing window(per BW) */ |
---|
6189 | | - int16 w_len[TOF_BW_NUM]; /* length of threshold crossing window(per BW) */ |
---|
6190 | | - int32 maxDT; /* max time difference of T4/T1 or T3/T2 */ |
---|
6191 | | - int32 minDT; /* min time difference of T4/T1 or T3/T2 */ |
---|
6192 | | - uint8 totalfrmcnt; /* total count of transfered measurement frames */ |
---|
6193 | | - uint16 rsv_media; /* reserve media value for TOF */ |
---|
6194 | | - uint32 flags; /* flags */ |
---|
6195 | | - uint8 core; /* core to use for tx */ |
---|
6196 | | - uint8 force_K; /* set to force value of K */ |
---|
6197 | | - int16 N_scale[TOF_BW_SEQ_NUM]; /* simple threshold crossing */ |
---|
6198 | | - uint8 sw_adj; /* enable sw assisted timestamp adjustment */ |
---|
6199 | | - uint8 hw_adj; /* enable hw assisted timestamp adjustment */ |
---|
6200 | | - uint8 seq_en; /* enable ranging sequence */ |
---|
6201 | | - uint8 ftm_cnt[TOF_BW_SEQ_NUM]; /* number of ftm frames based on bandwidth */ |
---|
6202 | | - int16 N_log2_2g; /* simple threshold crossing for 2g channel */ |
---|
6203 | | - int16 N_scale_2g; /* simple threshold crossing for 2g channel */ |
---|
| 9554 | +#define WL_PROXD_TUNE_VERSION_1 1 |
---|
| 9555 | +#define WL_PROXD_TUNE_VERSION_2 2 |
---|
| 9556 | +#include <packed_section_start.h> |
---|
| 9557 | +/* For legacy ranging target (e.g. 43430, 43342) */ |
---|
| 9558 | +typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_params_tof_tune_v1 { |
---|
| 9559 | + uint32 version; |
---|
| 9560 | + uint32 Ki; /**< h/w delay K factor for initiator */ |
---|
| 9561 | + uint32 Kt; /**< h/w delay K factor for target */ |
---|
| 9562 | + int16 vhtack; /**< enable/disable VHT ACK */ |
---|
| 9563 | + int16 N_log2[TOF_BW_SEQ_NUM]; /**< simple threshold crossing */ |
---|
| 9564 | + int16 w_offset[TOF_BW_NUM]; /**< offset of threshold crossing window(per BW) */ |
---|
| 9565 | + int16 w_len[TOF_BW_NUM]; /**< length of threshold crossing window(per BW) */ |
---|
| 9566 | + int32 maxDT; /**< max time difference of T4/T1 or T3/T2 */ |
---|
| 9567 | + int32 minDT; /**< min time difference of T4/T1 or T3/T2 */ |
---|
| 9568 | + uint8 totalfrmcnt; /**< total count of transfered measurement frames */ |
---|
| 9569 | + uint16 rsv_media; /**< reserve media value for TOF */ |
---|
| 9570 | + uint32 flags; /**< flags */ |
---|
| 9571 | + uint8 core; /**< core to use for tx */ |
---|
| 9572 | + uint8 setflags; /* set flags of K, N. S values */ |
---|
| 9573 | + int16 N_scale[TOF_BW_SEQ_NUM]; /**< simple threshold crossing */ |
---|
| 9574 | + uint8 sw_adj; /**< enable sw assisted timestamp adjustment */ |
---|
| 9575 | + uint8 hw_adj; /**< enable hw assisted timestamp adjustment */ |
---|
| 9576 | + uint8 seq_en; /**< enable ranging sequence */ |
---|
| 9577 | + uint8 ftm_cnt[TOF_BW_SEQ_NUM]; /**< number of ftm frames based on bandwidth */ |
---|
| 9578 | + int16 N_log2_2g; /**< simple threshold crossing for 2g channel */ |
---|
| 9579 | + int16 N_scale_2g; /**< simple threshold crossing for 2g channel */ |
---|
6204 | 9580 | wl_proxd_seq_config_t seq_5g20; |
---|
6205 | | -} BWL_POST_PACKED_STRUCT wl_proxd_params_tof_tune_t; |
---|
| 9581 | + wl_proxd_seq_config_t seq_2g20; /* Thresh crossing params for 2G Sequence */ |
---|
| 9582 | + uint16 bitflip_thresh; /* bitflip threshold */ |
---|
| 9583 | + uint16 snr_thresh; /* SNR threshold */ |
---|
| 9584 | + int8 recv_2g_thresh; /* 2g recieve sensitivity threshold */ |
---|
| 9585 | + uint32 acs_gdv_thresh; |
---|
| 9586 | + int8 acs_rssi_thresh; |
---|
| 9587 | + uint8 smooth_win_en; |
---|
| 9588 | + int32 emu_delay; |
---|
| 9589 | +} BWL_POST_PACKED_STRUCT wl_proxd_params_tof_tune_v1_t; |
---|
| 9590 | +#include <packed_section_end.h> |
---|
| 9591 | + |
---|
| 9592 | +#include <packed_section_start.h> |
---|
| 9593 | +/* For legacy ranging initiator (including 4364) */ |
---|
| 9594 | +typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_params_tof_tune_v2 { |
---|
| 9595 | + uint32 version; |
---|
| 9596 | + uint32 Ki; /**< h/w delay K factor for initiator */ |
---|
| 9597 | + uint32 Kt; /**< h/w delay K factor for target */ |
---|
| 9598 | + int16 vhtack; /**< enable/disable VHT ACK */ |
---|
| 9599 | + int16 N_log2[TOF_BW_SEQ_NUM]; /**< simple threshold crossing */ |
---|
| 9600 | + int16 w_offset[TOF_BW_NUM]; /**< offset of threshold crossing window(per BW) */ |
---|
| 9601 | + int16 w_len[TOF_BW_NUM]; /**< length of threshold crossing window(per BW) */ |
---|
| 9602 | + int32 maxDT; /**< max time difference of T4/T1 or T3/T2 */ |
---|
| 9603 | + int32 minDT; /**< min time difference of T4/T1 or T3/T2 */ |
---|
| 9604 | + uint8 totalfrmcnt; /**< total count of transfered measurement frames */ |
---|
| 9605 | + uint16 rsv_media; /**< reserve media value for TOF */ |
---|
| 9606 | + uint32 flags; /**< flags */ |
---|
| 9607 | + uint8 core; /**< core to use for tx */ |
---|
| 9608 | + uint8 setflags; /* set flags of K, N. S values */ |
---|
| 9609 | + int16 N_scale[TOF_BW_SEQ_NUM]; /**< simple threshold crossing */ |
---|
| 9610 | + uint8 sw_adj; /**< enable sw assisted timestamp adjustment */ |
---|
| 9611 | + uint8 hw_adj; /**< enable hw assisted timestamp adjustment */ |
---|
| 9612 | + uint8 seq_en; /**< enable ranging sequence */ |
---|
| 9613 | + uint8 ftm_cnt[TOF_BW_SEQ_NUM]; /**< number of ftm frames based on bandwidth */ |
---|
| 9614 | + int16 N_log2_2g; /**< simple threshold crossing for 2g channel */ |
---|
| 9615 | + int16 N_scale_2g; /**< simple threshold crossing for 2g channel */ |
---|
| 9616 | + wl_proxd_seq_config_t seq_5g20; |
---|
| 9617 | + wl_proxd_seq_config_t seq_2g20; /* Thresh crossing params for 2G Sequence */ |
---|
| 9618 | + uint16 bitflip_thresh; /* bitflip threshold */ |
---|
| 9619 | + uint16 snr_thresh; /* SNR threshold */ |
---|
| 9620 | + int8 recv_2g_thresh; /* 2g recieve sensitivity threshold */ |
---|
| 9621 | + uint32 acs_gdv_thresh; |
---|
| 9622 | + int8 acs_rssi_thresh; |
---|
| 9623 | + uint8 smooth_win_en; |
---|
| 9624 | + int32 acs_gdmm_thresh; |
---|
| 9625 | + int8 acs_delta_rssi_thresh; |
---|
| 9626 | + int32 emu_delay; |
---|
| 9627 | + uint8 core_mask; /* core mask selection */ |
---|
| 9628 | +} BWL_POST_PACKED_STRUCT wl_proxd_params_tof_tune_v2_t; |
---|
| 9629 | +#include <packed_section_end.h> |
---|
| 9630 | + |
---|
| 9631 | +#define WL_PROXD_TUNE_VERSION_3 3 |
---|
| 9632 | +/* Future ranging support */ |
---|
| 9633 | +typedef struct wl_proxd_params_tof_tune_v3 { |
---|
| 9634 | + uint16 version; |
---|
| 9635 | + uint16 len; |
---|
| 9636 | + uint32 Ki; /**< h/w delay K factor for initiator */ |
---|
| 9637 | + uint32 Kt; /**< h/w delay K factor for target */ |
---|
| 9638 | + int16 vhtack; /**< enable/disable VHT ACK */ |
---|
| 9639 | + uint16 PAD; |
---|
| 9640 | + int16 N_log2[TOF_BW_SEQ_NUM]; /**< simple threshold crossing */ |
---|
| 9641 | + uint16 PAD; |
---|
| 9642 | + int16 w_offset[TOF_BW_NUM]; /**< offset of threshold crossing window(per BW) */ |
---|
| 9643 | + uint16 PAD; |
---|
| 9644 | + int16 w_len[TOF_BW_NUM]; /**< length of threshold crossing window(per BW) */ |
---|
| 9645 | + uint16 PAD; |
---|
| 9646 | + int32 maxDT; /**< max time difference of T4/T1 or T3/T2 */ |
---|
| 9647 | + int32 minDT; /**< min time difference of T4/T1 or T3/T2 */ |
---|
| 9648 | + uint8 totalfrmcnt; /**< total count of transfered measurement frames */ |
---|
| 9649 | + uint8 PAD[3]; |
---|
| 9650 | + uint16 rsv_media; /**< reserve media value for TOF */ |
---|
| 9651 | + uint16 PAD; |
---|
| 9652 | + uint32 flags; /**< flags */ |
---|
| 9653 | + uint8 core; /**< core to use for tx */ |
---|
| 9654 | + uint8 setflags; /* set flags of K, N. S values */ |
---|
| 9655 | + uint16 PAD; |
---|
| 9656 | + int16 N_scale[TOF_BW_SEQ_NUM]; /**< simple threshold crossing */ |
---|
| 9657 | + uint8 sw_adj; /**< enable sw assisted timestamp adjustment */ |
---|
| 9658 | + uint8 hw_adj; /**< enable hw assisted timestamp adjustment */ |
---|
| 9659 | + uint8 seq_en; /**< enable ranging sequence */ |
---|
| 9660 | + uint8 PAD[3]; |
---|
| 9661 | + uint8 ftm_cnt[TOF_BW_SEQ_NUM]; /**< number of ftm frames based on bandwidth */ |
---|
| 9662 | + uint8 PAD[3]; |
---|
| 9663 | + int16 N_log2_2g; /**< simple threshold crossing for 2g channel */ |
---|
| 9664 | + int16 N_scale_2g; /**< simple threshold crossing for 2g channel */ |
---|
| 9665 | + wl_proxd_seq_config_t seq_5g20; |
---|
| 9666 | + wl_proxd_seq_config_t seq_2g20; /* Thresh crossing params for 2G Sequence */ |
---|
| 9667 | + uint16 bitflip_thresh; /* bitflip threshold */ |
---|
| 9668 | + uint16 snr_thresh; /* SNR threshold */ |
---|
| 9669 | + int8 recv_2g_thresh; /* 2g recieve sensitivity threshold */ |
---|
| 9670 | + uint8 PAD[3]; |
---|
| 9671 | + uint32 acs_gdv_thresh; |
---|
| 9672 | + int8 acs_rssi_thresh; |
---|
| 9673 | + uint8 smooth_win_en; |
---|
| 9674 | + uint16 PAD; |
---|
| 9675 | + int32 acs_gdmm_thresh; |
---|
| 9676 | + int8 acs_delta_rssi_thresh; |
---|
| 9677 | + uint8 PAD[3]; |
---|
| 9678 | + int32 emu_delay; |
---|
| 9679 | + uint8 core_mask; /* core mask selection */ |
---|
| 9680 | + uint8 PAD[3]; |
---|
| 9681 | +} wl_proxd_params_tof_tune_v3_t; |
---|
6206 | 9682 | |
---|
6207 | 9683 | typedef struct wl_proxd_params_iovar { |
---|
6208 | | - uint16 method; /* Proxmity Detection method */ |
---|
| 9684 | + uint16 method; /**< Proximity Detection method */ |
---|
| 9685 | + uint8 PAD[2]; |
---|
6209 | 9686 | union { |
---|
6210 | 9687 | /* common params for pdsvc */ |
---|
6211 | | - wl_proxd_params_common_t cmn_params; /* common parameters */ |
---|
| 9688 | + wl_proxd_params_common_t cmn_params; /**< common parameters */ |
---|
6212 | 9689 | /* method specific */ |
---|
6213 | | - wl_proxd_params_rssi_method_t rssi_params; /* RSSI method parameters */ |
---|
6214 | | - wl_proxd_params_tof_method_t tof_params; /* TOF meothod parameters */ |
---|
| 9690 | + wl_proxd_params_rssi_method_t rssi_params; /**< RSSI method parameters */ |
---|
| 9691 | + wl_proxd_params_tof_method_t tof_params; /**< TOF method parameters */ |
---|
6215 | 9692 | /* tune parameters */ |
---|
6216 | | - wl_proxd_params_tof_tune_t tof_tune; /* TOF tune parameters */ |
---|
6217 | | - } u; /* Method specific optional parameters */ |
---|
| 9693 | + wl_proxd_params_tof_tune_v3_t tof_tune; /**< TOF tune parameters */ |
---|
| 9694 | + } u; /**< Method specific optional parameters */ |
---|
6218 | 9695 | } wl_proxd_params_iovar_t; |
---|
6219 | 9696 | |
---|
6220 | 9697 | #define PROXD_COLLECT_GET_STATUS 0 |
---|
.. | .. |
---|
6223 | 9700 | #define PROXD_COLLECT_QUERY_DATA 3 |
---|
6224 | 9701 | #define PROXD_COLLECT_QUERY_DEBUG 4 |
---|
6225 | 9702 | #define PROXD_COLLECT_REMOTE_REQUEST 5 |
---|
6226 | | -#define PROXD_COLLECT_DONE 6 |
---|
| 9703 | +#define PROXD_COLLECT_DONE 6 |
---|
6227 | 9704 | |
---|
| 9705 | +typedef enum { |
---|
| 9706 | + WL_PROXD_COLLECT_METHOD_TYPE_DISABLE = 0x0, |
---|
| 9707 | + WL_PROXD_COLLECT_METHOD_TYPE_IOVAR = 0x1, |
---|
| 9708 | + WL_PROXD_COLLECT_METHOD_TYPE_EVENT = 0x2, |
---|
| 9709 | + WL_PROXD_COLLECT_METHOD_TYPE_EVENT_LOG = 0x4 |
---|
| 9710 | +} wl_proxd_collect_method_type_t; |
---|
| 9711 | + |
---|
| 9712 | +typedef uint16 wl_proxd_collect_method_t; /* query status: method to send proxd collect */ |
---|
| 9713 | + |
---|
| 9714 | +#include <packed_section_start.h> |
---|
6228 | 9715 | typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_collect_query { |
---|
6229 | | - uint32 method; /* method */ |
---|
6230 | | - uint8 request; /* Query request. */ |
---|
6231 | | - uint8 status; /* 0 -- disable, 1 -- enable collection, */ |
---|
6232 | | - /* 2 -- enable collection & debug */ |
---|
6233 | | - uint16 index; /* The current frame index [0 to total_frames - 1]. */ |
---|
6234 | | - uint16 mode; /* Initiator or Target */ |
---|
6235 | | - bool busy; /* tof sm is busy */ |
---|
6236 | | - bool remote; /* Remote collect data */ |
---|
| 9716 | + uint32 method; /**< method */ |
---|
| 9717 | + uint8 request; /**< Query request. */ |
---|
| 9718 | + uint8 status; /**< bitmask 0 -- disable, 0x1 -- enable collection, */ |
---|
| 9719 | + /* 0x2 -- Use generic event, 0x4 -- use event log */ |
---|
| 9720 | + uint16 index; /**< The current frame index [0 to total_frames - 1]. */ |
---|
| 9721 | + uint16 mode; /**< Initiator or Target */ |
---|
| 9722 | + uint8 busy; /**< tof sm is busy */ |
---|
| 9723 | + uint8 remote; /**< Remote collect data */ |
---|
6237 | 9724 | } BWL_POST_PACKED_STRUCT wl_proxd_collect_query_t; |
---|
| 9725 | +#include <packed_section_end.h> |
---|
6238 | 9726 | |
---|
| 9727 | +#include <packed_section_start.h> |
---|
6239 | 9728 | typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_collect_header { |
---|
6240 | | - uint16 total_frames; /* The totral frames for this collect. */ |
---|
6241 | | - uint16 nfft; /* nfft value */ |
---|
6242 | | - uint16 bandwidth; /* bandwidth */ |
---|
6243 | | - uint16 channel; /* channel number */ |
---|
6244 | | - uint32 chanspec; /* channel spec */ |
---|
6245 | | - uint32 fpfactor; /* avb timer value factor */ |
---|
6246 | | - uint16 fpfactor_shift; /* avb timer value shift bits */ |
---|
6247 | | - int32 distance; /* distance calculated by fw */ |
---|
6248 | | - uint32 meanrtt; /* mean of RTTs */ |
---|
6249 | | - uint32 modertt; /* mode of RTTs */ |
---|
6250 | | - uint32 medianrtt; /* median of RTTs */ |
---|
6251 | | - uint32 sdrtt; /* standard deviation of RTTs */ |
---|
6252 | | - uint32 clkdivisor; /* clock divisor */ |
---|
6253 | | - uint16 chipnum; /* chip type */ |
---|
6254 | | - uint8 chiprev; /* chip revision */ |
---|
6255 | | - uint8 phyver; /* phy version */ |
---|
6256 | | - struct ether_addr loaclMacAddr; /* local mac address */ |
---|
6257 | | - struct ether_addr remoteMacAddr; /* remote mac address */ |
---|
6258 | | - wl_proxd_params_tof_tune_t params; |
---|
| 9729 | + uint16 total_frames; /**< The total frames for this collect. */ |
---|
| 9730 | + uint16 nfft; /**< nfft value */ |
---|
| 9731 | + uint16 bandwidth; /**< bandwidth */ |
---|
| 9732 | + uint16 channel; /**< channel number */ |
---|
| 9733 | + uint32 chanspec; /**< channel spec */ |
---|
| 9734 | + uint32 fpfactor; /**< avb timer value factor */ |
---|
| 9735 | + uint16 fpfactor_shift; /**< avb timer value shift bits */ |
---|
| 9736 | + int32 distance; /**< distance calculated by fw */ |
---|
| 9737 | + uint32 meanrtt; /**< mean of RTTs */ |
---|
| 9738 | + uint32 modertt; /**< mode of RTTs */ |
---|
| 9739 | + uint32 medianrtt; /**< median of RTTs */ |
---|
| 9740 | + uint32 sdrtt; /**< standard deviation of RTTs */ |
---|
| 9741 | + uint32 clkdivisor; /**< clock divisor */ |
---|
| 9742 | + uint16 chipnum; /**< chip type */ |
---|
| 9743 | + uint8 chiprev; /**< chip revision */ |
---|
| 9744 | + uint8 phyver; /**< phy version */ |
---|
| 9745 | + struct ether_addr localMacAddr; /**< local mac address */ |
---|
| 9746 | + struct ether_addr remoteMacAddr; /**< remote mac address */ |
---|
| 9747 | + wl_proxd_params_tof_tune_v3_t params; |
---|
6259 | 9748 | } BWL_POST_PACKED_STRUCT wl_proxd_collect_header_t; |
---|
| 9749 | +#include <packed_section_end.h> |
---|
6260 | 9750 | |
---|
6261 | | - |
---|
6262 | | -#ifdef WL_NAN |
---|
| 9751 | +/* ifdef WL_NAN */ |
---|
6263 | 9752 | /* ********************** NAN wl interface struct types and defs ******************** */ |
---|
| 9753 | +/* |
---|
| 9754 | + * Uses new common IOVAR batch processing mechanism |
---|
| 9755 | + */ |
---|
6264 | 9756 | |
---|
6265 | | -#define WL_NAN_IOCTL_VERSION 0x1 |
---|
6266 | | -#define NAN_IOC_BUFSZ 256 /* some sufficient ioc buff size for our module */ |
---|
6267 | | -#define NAN_IOC_BUFSZ_EXT 1024 /* some sufficient ioc buff size for dump commands */ |
---|
| 9757 | +/* |
---|
| 9758 | + * NAN config control |
---|
| 9759 | + * Bits 0 - 23 can be set by host |
---|
| 9760 | + * Bits 24 - 31 - Internal use for firmware, host cannot set it |
---|
| 9761 | + */ |
---|
6268 | 9762 | |
---|
6269 | | -/* wl_nan_sub_cmd may also be used in dhd */ |
---|
6270 | | -typedef struct wl_nan_sub_cmd wl_nan_sub_cmd_t; |
---|
6271 | | -typedef int (cmd_handler_t)(void *wl, const wl_nan_sub_cmd_t *cmd, char **argv); |
---|
6272 | | -/* nan cmd list entry */ |
---|
6273 | | -struct wl_nan_sub_cmd { |
---|
6274 | | - char *name; |
---|
6275 | | - uint8 version; /* cmd version */ |
---|
6276 | | - uint16 id; /* id for the dongle f/w switch/case */ |
---|
6277 | | - uint16 type; /* base type of argument */ |
---|
6278 | | - cmd_handler_t *handler; /* cmd handler */ |
---|
| 9763 | +/* |
---|
| 9764 | + * Bit 0 : If set to 1, means event uses nan bsscfg, |
---|
| 9765 | + * otherwise uses infra bsscfg. Default is using infra bsscfg |
---|
| 9766 | + */ |
---|
| 9767 | +#define WL_NAN_CTRL_ROUTE_EVENT_VIA_NAN_BSSCFG 0x0000001 |
---|
| 9768 | +/* If set, discovery beacons are transmitted on 2G band */ |
---|
| 9769 | +#define WL_NAN_CTRL_DISC_BEACON_TX_2G 0x0000002 |
---|
| 9770 | +/* If set, sync beacons are transmitted on 2G band */ |
---|
| 9771 | +#define WL_NAN_CTRL_SYNC_BEACON_TX_2G 0x0000004 |
---|
| 9772 | +/* If set, discovery beacons are transmitted on 5G band */ |
---|
| 9773 | +#define WL_NAN_CTRL_DISC_BEACON_TX_5G 0x0000008 |
---|
| 9774 | +/* If set, sync beacons are transmitted on 5G band */ |
---|
| 9775 | +#define WL_NAN_CTRL_SYNC_BEACON_TX_5G 0x0000010 |
---|
| 9776 | +/* If set, auto datapath responses will be sent by FW */ |
---|
| 9777 | +#define WL_NAN_CTRL_AUTO_DPRESP 0x0000020 |
---|
| 9778 | +/* If set, auto datapath confirms will be sent by FW */ |
---|
| 9779 | +#define WL_NAN_CTRL_AUTO_DPCONF 0x0000040 |
---|
| 9780 | +/* If set, auto schedule responses will be sent by FW */ |
---|
| 9781 | +#define WL_NAN_CTRL_AUTO_SCHEDRESP 0x0000080 |
---|
| 9782 | +/* If set, auto schedule confirms will be sent by FW */ |
---|
| 9783 | +#define WL_NAN_CTRL_AUTO_SCHEDCONF 0x0000100 |
---|
| 9784 | +/* If set, proprietary rates are supported by FW */ |
---|
| 9785 | +#define WL_NAN_CTRL_PROP_RATE 0x0000200 |
---|
| 9786 | +/* If set, service awake_dw overrides global dev awake_dw */ |
---|
| 9787 | +#define WL_NAN_CTRL_SVC_OVERRIDE_DEV_AWAKE_DW 0x0000400 |
---|
| 9788 | +/* If set, merge scan will be disabled */ |
---|
| 9789 | +#define WL_NAN_CTRL_SCAN_DISABLE 0x0000800 |
---|
| 9790 | +/* If set, power save will be disabled */ |
---|
| 9791 | +#define WL_NAN_CTRL_POWER_SAVE_DISABLE 0x0001000 |
---|
| 9792 | +/* If set, device will merge to configured CID only */ |
---|
| 9793 | +#define WL_NAN_CTRL_MERGE_CONF_CID_ONLY 0x0002000 |
---|
| 9794 | +/* If set, 5g core will be brought down in single band NAN */ |
---|
| 9795 | +#define WL_NAN_CTRL_5G_SLICE_POWER_OPT 0x0004000 |
---|
| 9796 | +#define WL_NAN_CTRL_DUMP_HEAP 0x0008000 |
---|
| 9797 | +/* If set, host generates and assign ndp id for ndp sessions */ |
---|
| 9798 | +#define WL_NAN_CTRL_HOST_GEN_NDPID 0x0010000 |
---|
| 9799 | +/* If set, nan ndp inactivity watchdog will be activated */ |
---|
| 9800 | +#define WL_NAN_CTRL_DELETE_INACTIVE_PEERS 0x0020000 |
---|
| 9801 | +/* If set, nan assoc coex will be activated */ |
---|
| 9802 | +#define WL_NAN_CTRL_INFRA_ASSOC_COEX 0x0040000 |
---|
| 9803 | +/* If set, dam will accept all NDP/RNG request from the peer including counter */ |
---|
| 9804 | +#define WL_NAN_CTRL_DAM_ACCEPT_ALL 0x0080000 |
---|
| 9805 | +/* If set, nan mac ignores role for tx discovery beacon for periodic config */ |
---|
| 9806 | +#define WL_NAN_CTRL_FASTDISC_IGNO_ROLE 0x0100000 |
---|
| 9807 | +/* If set, include NA in NAN beacons (disc beacons for now) */ |
---|
| 9808 | +#define WL_NAN_CTRL_INCL_NA_IN_BCNS 0x0200000 |
---|
| 9809 | +/* If set, host assist will be enabled */ |
---|
| 9810 | +#define WL_NAN_CTRL_HOST_ASSIST 0x0400000 |
---|
| 9811 | +/* If set, host configures NDI associated with the service */ |
---|
| 9812 | +#define WL_NAN_CTRL_HOST_CFG_SVC_NDI 0x0800000 |
---|
| 9813 | +#define WL_NAN_CTRL_NDP_HB_ENABLE 0x1000000 |
---|
| 9814 | + |
---|
| 9815 | +/* Value when all host-configurable bits set */ |
---|
| 9816 | +#define WL_NAN_CTRL_MAX_MASK 0xFFFFFFF |
---|
| 9817 | +#define WL_NAN_CFG_CTRL_FW_BITS 4 |
---|
| 9818 | + |
---|
| 9819 | +/* Last 4-bits are firmware controlled bits. |
---|
| 9820 | + * Bit 31: |
---|
| 9821 | + * If set - indicates that NAN initialization is successful |
---|
| 9822 | + * Bit 30: |
---|
| 9823 | + * If set - indicates that NAN MAC cfg creation is successful |
---|
| 9824 | + * |
---|
| 9825 | + * NOTE: These are only ready-only bits for host. |
---|
| 9826 | + * All sets to these bits from host are masked off |
---|
| 9827 | + */ |
---|
| 9828 | +#define WL_NAN_PROTO_INIT_DONE (1 << 31) |
---|
| 9829 | +#define WL_NAN_CFG_CREATE_DONE (1 << 30) |
---|
| 9830 | + |
---|
| 9831 | +#define WL_NAN_GET_PROTO_INIT_STATUS(x) \ |
---|
| 9832 | + (((x) & WL_NAN_PROTO_INIT_DONE) ? TRUE:FALSE) |
---|
| 9833 | +#define WL_NAN_CLEAR_PROTO_INIT_STATUS(x) \ |
---|
| 9834 | + ((x) &= ~WL_NAN_PROTO_INIT_DONE) |
---|
| 9835 | +#define WL_NAN_SET_PROTO_INIT_STATUS(x) \ |
---|
| 9836 | + ((x) |= (WL_NAN_PROTO_INIT_DONE)) |
---|
| 9837 | + |
---|
| 9838 | +#define WL_NAN_GET_CFG_CREATE_STATUS(x) \ |
---|
| 9839 | + (((x) & WL_NAN_CFG_CREATE_DONE) ? TRUE:FALSE) |
---|
| 9840 | +#define WL_NAN_CLEAR_CFG_CREATE_STATUS(x) \ |
---|
| 9841 | + ((x) &= ~WL_NAN_CFG_CREATE_DONE) |
---|
| 9842 | +#define WL_NAN_SET_CFG_CREATE_STATUS(x) \ |
---|
| 9843 | + ((x) |= (WL_NAN_CFG_CREATE_DONE)) |
---|
| 9844 | + |
---|
| 9845 | +#define WL_NAN_IOCTL_VERSION 0x2 |
---|
| 9846 | +/* < some sufficient ioc buff size for our module */ |
---|
| 9847 | +#define WL_NAN_IOC_BUFSZ 256 |
---|
| 9848 | +/* some sufficient ioc buff size for dump commands */ |
---|
| 9849 | +#define WL_NAN_IOC_BUFSZ_EXT 1024 |
---|
| 9850 | +#define WL_NAN_MAX_SIDS_IN_BEACONS 127 /* Max allowed SIDs */ |
---|
| 9851 | +#define WL_NAN_MASTER_RANK_LEN 8 |
---|
| 9852 | +#define WL_NAN_RANGE_LIMITED 0x0040 /* Publish/Subscribe flags */ |
---|
| 9853 | + |
---|
| 9854 | +/** The service hash (service id) is exactly this many bytes. */ |
---|
| 9855 | +#define WL_NAN_SVC_HASH_LEN 6 |
---|
| 9856 | +#define WL_NAN_HASHES_PER_BLOOM 4 /** Number of hash functions per bloom filter */ |
---|
| 9857 | + |
---|
| 9858 | +/* no. of max last disc results */ |
---|
| 9859 | +#define WL_NAN_MAX_DISC_RESULTS 3 |
---|
| 9860 | + |
---|
| 9861 | +/* Max len of Rx and Tx filters */ |
---|
| 9862 | +#define WL_NAN_MAX_SVC_MATCH_FILTER_LEN 255 |
---|
| 9863 | + |
---|
| 9864 | +/* Max service name len */ |
---|
| 9865 | +#define WL_NAN_MAX_SVC_NAME_LEN 32 |
---|
| 9866 | + |
---|
| 9867 | +/* Type of Data path connection */ |
---|
| 9868 | +#define WL_NAN_DP_TYPE_UNICAST 0 |
---|
| 9869 | +#define WL_NAN_DP_TYPE_MULTICAST 1 |
---|
| 9870 | + |
---|
| 9871 | +/* MAX security params length PMK field */ |
---|
| 9872 | +#define WL_NAN_NCS_SK_PMK_LEN 32 |
---|
| 9873 | + |
---|
| 9874 | +/* Post disc attr ID type */ |
---|
| 9875 | +typedef uint8 wl_nan_post_disc_attr_id_t; |
---|
| 9876 | + |
---|
| 9877 | +/* |
---|
| 9878 | + * Component IDs |
---|
| 9879 | + */ |
---|
| 9880 | +typedef enum { |
---|
| 9881 | + WL_NAN_COMPID_CONFIG = 1, |
---|
| 9882 | + WL_NAN_COMPID_ELECTION = 2, |
---|
| 9883 | + WL_NAN_COMPID_SD = 3, |
---|
| 9884 | + WL_NAN_COMPID_TIMESYNC = 4, |
---|
| 9885 | + WL_NAN_COMPID_DATA_PATH = 5, |
---|
| 9886 | + WL_NAN_COMPID_DEBUG = 15 /* Keep this at the end */ |
---|
| 9887 | +} wl_nan_comp_id_t; |
---|
| 9888 | + |
---|
| 9889 | +#define WL_NAN_COMP_SHIFT 8 |
---|
| 9890 | +#define WL_NAN_COMP_MASK(_c) (0x0F & ((uint8)(_c))) |
---|
| 9891 | +#define WL_NAN_COMP_ID(_c) (WL_NAN_COMP_MASK(_c) << WL_NAN_COMP_SHIFT) |
---|
| 9892 | + |
---|
| 9893 | +/* NAN Events */ |
---|
| 9894 | + |
---|
| 9895 | +/** Instance ID type (unique identifier) */ |
---|
| 9896 | +typedef uint8 wl_nan_instance_id_t; |
---|
| 9897 | + |
---|
| 9898 | +/* Publish sent for a subscribe */ |
---|
| 9899 | +/* WL_NAN_EVENT_REPLIED */ |
---|
| 9900 | + |
---|
| 9901 | +typedef struct wl_nan_ev_replied { |
---|
| 9902 | + struct ether_addr sub_mac; /* Subscriber MAC */ |
---|
| 9903 | + wl_nan_instance_id_t pub_id; /* Publisher Instance ID */ |
---|
| 9904 | + uint8 sub_id; /* Subscriber ID */ |
---|
| 9905 | + int8 sub_rssi; /* Subscriber RSSI */ |
---|
| 9906 | + uint8 pad[3]; |
---|
| 9907 | +} wl_nan_ev_replied_t; |
---|
| 9908 | + |
---|
| 9909 | +typedef struct wl_nan_event_replied { |
---|
| 9910 | + struct ether_addr sub_mac; /* Subscriber MAC */ |
---|
| 9911 | + wl_nan_instance_id_t pub_id; /* Publisher Instance ID */ |
---|
| 9912 | + uint8 sub_id; /* Subscriber ID */ |
---|
| 9913 | + int8 sub_rssi; /* Subscriber RSSI */ |
---|
| 9914 | + uint8 attr_num; |
---|
| 9915 | + uint16 attr_list_len; /* sizeof attributes attached to payload */ |
---|
| 9916 | + uint8 attr_list[0]; /* attributes payload */ |
---|
| 9917 | +} wl_nan_event_replied_t; |
---|
| 9918 | + |
---|
| 9919 | +/* NAN Tx status of transmitted frames */ |
---|
| 9920 | +#define WL_NAN_TXS_FAILURE 0 |
---|
| 9921 | +#define WL_NAN_TXS_SUCCESS 1 |
---|
| 9922 | + |
---|
| 9923 | +/* NAN frame types */ |
---|
| 9924 | +enum wl_nan_frame_type { |
---|
| 9925 | + /* discovery frame types */ |
---|
| 9926 | + WL_NAN_FRM_TYPE_PUBLISH = 1, |
---|
| 9927 | + WL_NAN_FRM_TYPE_SUBSCRIBE = 2, |
---|
| 9928 | + WL_NAN_FRM_TYPE_FOLLOWUP = 3, |
---|
| 9929 | + |
---|
| 9930 | + /* datapath frame types */ |
---|
| 9931 | + WL_NAN_FRM_TYPE_DP_REQ = 4, |
---|
| 9932 | + WL_NAN_FRM_TYPE_DP_RESP = 5, |
---|
| 9933 | + WL_NAN_FRM_TYPE_DP_CONF = 6, |
---|
| 9934 | + WL_NAN_FRM_TYPE_DP_INSTALL = 7, |
---|
| 9935 | + WL_NAN_FRM_TYPE_DP_END = 8, |
---|
| 9936 | + |
---|
| 9937 | + /* schedule frame types */ |
---|
| 9938 | + WL_NAN_FRM_TYPE_SCHED_REQ = 9, |
---|
| 9939 | + WL_NAN_FRM_TYPE_SCHED_RESP = 10, |
---|
| 9940 | + WL_NAN_FRM_TYPE_SCHED_CONF = 11, |
---|
| 9941 | + WL_NAN_FRM_TYPE_SCHED_UPD = 12, |
---|
| 9942 | + |
---|
| 9943 | + /* ranging frame types */ |
---|
| 9944 | + WL_NAN_FRM_TYPE_RNG_REQ = 13, |
---|
| 9945 | + WL_NAN_FRM_TYPE_RNG_RESP = 14, |
---|
| 9946 | + WL_NAN_FRM_TYPE_RNG_TERM = 15, |
---|
| 9947 | + WL_NAN_FRM_TYPE_RNG_REPORT = 16, |
---|
| 9948 | + |
---|
| 9949 | + WL_NAN_FRM_TYPE_UNSOLICIT_SDF = 17, |
---|
| 9950 | + WL_NAN_FRM_TYPE_INVALID |
---|
| 9951 | +}; |
---|
| 9952 | +typedef uint8 wl_nan_frame_type_t; |
---|
| 9953 | + |
---|
| 9954 | +/* NAN Reason codes for tx status */ |
---|
| 9955 | +enum wl_nan_txs_reason_codes { |
---|
| 9956 | + WL_NAN_REASON_SUCCESS = 1, /* NAN status success */ |
---|
| 9957 | + WL_NAN_REASON_TIME_OUT = 2, /* timeout reached */ |
---|
| 9958 | + WL_NAN_REASON_DROPPED = 3, /* pkt dropped due to internal failure */ |
---|
| 9959 | + WL_NAN_REASON_MAX_RETRIES_DONE = 4 /* Max retries exceeded */ |
---|
6279 | 9960 | }; |
---|
6280 | 9961 | |
---|
6281 | | -/* container for nan iovtls & events */ |
---|
6282 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_nan_ioc { |
---|
6283 | | - uint16 version; /* interface command or event version */ |
---|
6284 | | - uint16 id; /* nan ioctl cmd ID */ |
---|
6285 | | - uint16 len; /* total length of all tlv records in data[] */ |
---|
6286 | | - uint16 pad; /* pad to be 32 bit aligment */ |
---|
6287 | | - uint8 data [1]; /* var len payload of bcm_xtlv_t type */ |
---|
6288 | | -} BWL_POST_PACKED_STRUCT wl_nan_ioc_t; |
---|
| 9962 | +/* For NAN TX status */ |
---|
| 9963 | +typedef struct wl_nan_event_txs { |
---|
| 9964 | + uint8 status; /* For TX status, success or failure */ |
---|
| 9965 | + uint8 reason_code; /* to identify reason when status is failure */ |
---|
| 9966 | + uint16 host_seq; /* seq num to keep track of pkts sent by host */ |
---|
| 9967 | + uint8 type; /* frame type */ |
---|
| 9968 | + uint8 pad; |
---|
| 9969 | + uint16 opt_tlvs_len; |
---|
| 9970 | + uint8 opt_tlvs[]; |
---|
| 9971 | +} wl_nan_event_txs_t; |
---|
6289 | 9972 | |
---|
6290 | | -typedef struct wl_nan_status { |
---|
6291 | | - uint8 inited; |
---|
6292 | | - uint8 joined; |
---|
6293 | | - uint8 role; |
---|
6294 | | - uint8 hop_count; |
---|
6295 | | - uint32 chspec[2]; |
---|
6296 | | - uint8 amr[8]; /* Anchor Master Rank */ |
---|
6297 | | - uint32 cnt_pend_txfrm; /* pending TX frames */ |
---|
6298 | | - uint32 cnt_bcn_tx; /* TX disc/sync beacon count */ |
---|
6299 | | - uint32 cnt_bcn_rx; /* RX disc/sync beacon count */ |
---|
6300 | | - uint32 cnt_svc_disc_tx; /* TX svc disc frame count */ |
---|
6301 | | - uint32 cnt_svc_disc_rx; /* RX svc disc frame count */ |
---|
6302 | | - struct ether_addr cid; |
---|
6303 | | -} wl_nan_status_t; |
---|
| 9973 | +/* SD transmit pkt's event status is sent as optional tlv in wl_nan_event_txs_t */ |
---|
| 9974 | +typedef struct wl_nan_event_sd_txs { |
---|
| 9975 | + uint8 inst_id; /* Publish or subscribe instance id */ |
---|
| 9976 | + uint8 req_id; /* Requestor instance id */ |
---|
| 9977 | +} wl_nan_event_sd_txs_t; |
---|
6304 | 9978 | |
---|
6305 | | -typedef struct wl_nan_count { |
---|
6306 | | - uint32 cnt_bcn_tx; /* TX disc/sync beacon count */ |
---|
6307 | | - uint32 cnt_bcn_rx; /* RX disc/sync beacon count */ |
---|
6308 | | - uint32 cnt_svc_disc_tx; /* TX svc disc frame count */ |
---|
6309 | | - uint32 cnt_svc_disc_rx; /* RX svc disc frame count */ |
---|
6310 | | -} wl_nan_count_t; |
---|
| 9979 | +/* Subscribe or Publish instance Terminated */ |
---|
6311 | 9980 | |
---|
6312 | | -/* various params and ctl swithce for nan_debug instance */ |
---|
6313 | | -typedef struct nan_debug_params { |
---|
6314 | | - uint8 enabled; /* runtime debuging enabled */ |
---|
6315 | | - uint8 collect; /* enables debug svc sdf monitor mode */ |
---|
6316 | | - uint16 cmd; /* debug cmd to perform a debug action */ |
---|
6317 | | - uint32 msglevel; /* msg level if enabled */ |
---|
6318 | | - uint16 status; |
---|
6319 | | -} nan_debug_params_t; |
---|
| 9981 | +/* WL_NAN_EVENT_TERMINATED */ |
---|
6320 | 9982 | |
---|
6321 | | -/* time slot */ |
---|
6322 | | -#define NAN_MAX_TIMESLOT 32 |
---|
6323 | | -typedef struct nan_timeslot { |
---|
6324 | | - uint32 abitmap; /* available bitmap */ |
---|
6325 | | - uint32 chanlist[NAN_MAX_TIMESLOT]; |
---|
6326 | | -} nan_timeslot_t; |
---|
| 9983 | +#define NAN_SD_TERM_REASON_TIMEOUT 1 |
---|
| 9984 | +#define NAN_SD_TERM_REASON_HOSTREQ 2 |
---|
| 9985 | +#define NAN_SD_TERM_REASON_FWTERM 3 |
---|
| 9986 | +#define NAN_SD_TERM_REASON_FAIL 4 |
---|
6327 | 9987 | |
---|
6328 | | -/* nan passive scan params */ |
---|
6329 | | -#define NAN_SCAN_MAX_CHCNT 8 |
---|
6330 | | -typedef struct nan_scan_params { |
---|
6331 | | - uint16 scan_time; |
---|
6332 | | - uint16 home_time; |
---|
6333 | | - uint16 ms_intvl; /* interval between merge scan */ |
---|
6334 | | - uint16 ms_dur; /* duration of merge scan */ |
---|
6335 | | - uint16 chspec_num; |
---|
| 9988 | +typedef struct wl_nan_ev_terminated { |
---|
| 9989 | + uint8 instance_id; /* publish / subscribe instance id */ |
---|
| 9990 | + uint8 reason; /* 1=timeout, 2=Host/IOVAR, 3=FW Terminated 4=Failure */ |
---|
| 9991 | + uint8 svctype; /* 0 - Publish, 0x1 - Subscribe */ |
---|
| 9992 | + uint8 pad; /* Align */ |
---|
| 9993 | + uint32 tx_cnt; /* Number of SDFs sent */ |
---|
| 9994 | +} wl_nan_ev_terminated_t; |
---|
| 9995 | + |
---|
| 9996 | +/* Follow up received against a pub / subscr */ |
---|
| 9997 | +/* WL_NAN_EVENT_RECEIVE */ |
---|
| 9998 | + |
---|
| 9999 | +typedef struct wl_nan_ev_receive { |
---|
| 10000 | + struct ether_addr remote_addr; /* Peer NAN device MAC */ |
---|
| 10001 | + uint8 local_id; /* Local subscribe or publish ID */ |
---|
| 10002 | + uint8 remote_id; /* Remote subscribe or publish ID */ |
---|
| 10003 | + int8 fup_rssi; |
---|
| 10004 | + uint8 attr_num; |
---|
| 10005 | + uint16 attr_list_len; /* sizeof attributes attached to payload */ |
---|
| 10006 | + uint8 attr_list[0]; /* attributes payload */ |
---|
| 10007 | +} wl_nan_ev_receive_t; |
---|
| 10008 | + |
---|
| 10009 | +/* WL_NAN_EVENT_DISC_CACHE_TIMEOUT */ |
---|
| 10010 | +#define WL_NAN_DISC_CACHE_EXPIRY_ENTRIES_MAX 8 |
---|
| 10011 | + |
---|
| 10012 | +typedef struct wl_nan_disc_expired_cache_entry { |
---|
| 10013 | + uint8 l_sub_id; /* local sub instance_id */ |
---|
| 10014 | + uint8 r_pub_id; /* remote-matched pub instance_id */ |
---|
| 10015 | + struct ether_addr r_nmi_addr; /* remote-matched pub nmi addr */ |
---|
| 10016 | +} wl_nan_disc_expired_cache_entry_t; |
---|
| 10017 | + |
---|
| 10018 | +typedef struct wl_nan_ev_disc_cache_timeout { |
---|
| 10019 | + uint16 count; /* no. of expired cache entries */ |
---|
| 10020 | + uint16 pad; |
---|
| 10021 | + wl_nan_disc_expired_cache_entry_t cache_exp_list[]; |
---|
| 10022 | +} wl_nan_ev_disc_cache_timeout_t; |
---|
| 10023 | + |
---|
| 10024 | +/* For NAN event mask extention */ |
---|
| 10025 | +#define WL_NAN_EVMASK_EXTN_VER 1 |
---|
| 10026 | +#define WL_NAN_EVMASK_EXTN_LEN 16 /* 16*8 = 128 masks supported */ |
---|
| 10027 | + |
---|
| 10028 | +typedef struct wl_nan_event_extn { |
---|
| 10029 | + uint8 ver; |
---|
| 10030 | + uint8 pad; |
---|
| 10031 | + uint16 len; |
---|
| 10032 | + uint8 evmask[]; |
---|
| 10033 | +} wl_nan_evmask_extn_t; |
---|
| 10034 | + |
---|
| 10035 | +/* WL_NAN_XTLV_DATA_DP_TXS */ |
---|
| 10036 | + |
---|
| 10037 | +typedef struct wl_nan_data_dp_txs { |
---|
| 10038 | + uint8 ndp_id; |
---|
| 10039 | + uint8 pad; |
---|
| 10040 | + struct ether_addr indi; /* initiator ndi */ |
---|
| 10041 | +} wl_nan_data_dp_txs_t; |
---|
| 10042 | + |
---|
| 10043 | +/* WL_NAN_XTLV_RNG_TXS */ |
---|
| 10044 | + |
---|
| 10045 | +typedef struct wl_nan_range_txs { |
---|
| 10046 | + uint8 range_id; |
---|
| 10047 | + uint8 pad[3]; |
---|
| 10048 | +} wl_nan_range_txs_t; |
---|
| 10049 | + |
---|
| 10050 | +#define NAN_MAX_BANDS 2 |
---|
| 10051 | + |
---|
| 10052 | +/* |
---|
| 10053 | + * TLVs - Below XTLV definitions will be deprecated |
---|
| 10054 | + * in due course (soon as all other branches update |
---|
| 10055 | + * to the comp ID based XTLVs listed below). |
---|
| 10056 | + */ |
---|
| 10057 | +enum wl_nan_cmd_xtlv_id { |
---|
| 10058 | + WL_NAN_XTLV_MAC_ADDR = 0x120, |
---|
| 10059 | + WL_NAN_XTLV_MATCH_RX = 0x121, |
---|
| 10060 | + WL_NAN_XTLV_MATCH_TX = 0x122, |
---|
| 10061 | + WL_NAN_XTLV_SVC_INFO = 0x123, |
---|
| 10062 | + WL_NAN_XTLV_SVC_NAME = 0x124, |
---|
| 10063 | + WL_NAN_XTLV_SR_FILTER = 0x125, |
---|
| 10064 | + WL_NAN_XTLV_FOLLOWUP = 0x126, |
---|
| 10065 | + WL_NAN_XTLV_SVC_LIFE_COUNT = 0x127, |
---|
| 10066 | + WL_NAN_XTLV_AVAIL = 0x128, |
---|
| 10067 | + WL_NAN_XTLV_SDF_RX = 0x129, |
---|
| 10068 | + WL_NAN_XTLV_SDE_CONTROL = 0x12a, |
---|
| 10069 | + WL_NAN_XTLV_SDE_RANGE_LIMIT = 0x12b, |
---|
| 10070 | + WL_NAN_XTLV_NAN_AF = 0x12c, |
---|
| 10071 | + WL_NAN_XTLV_SD_TERMINATE = 0x12d, |
---|
| 10072 | + WL_NAN_XTLV_CLUSTER_ID = 0x12e, |
---|
| 10073 | + WL_NAN_XTLV_PEER_RSSI = 0x12f, |
---|
| 10074 | + WL_NAN_XTLV_BCN_RX = 0x130, |
---|
| 10075 | + WL_NAN_XTLV_REPLIED = 0x131, /* Publish sent for a subscribe */ |
---|
| 10076 | + WL_NAN_XTLV_RECEIVED = 0x132, /* FUP Received */ |
---|
| 10077 | + WL_NAN_XTLV_DISC_RESULTS = 0x133, /* Discovery results */ |
---|
| 10078 | + WL_NAN_XTLV_TXS = 0x134 /* TX status */ |
---|
| 10079 | +}; |
---|
| 10080 | + |
---|
| 10081 | +#define WL_NAN_CMD_GLOBAL 0x00 |
---|
| 10082 | +#define WL_NAN_CMD_CFG_COMP_ID 0x01 |
---|
| 10083 | +#define WL_NAN_CMD_ELECTION_COMP_ID 0x02 |
---|
| 10084 | +#define WL_NAN_CMD_SD_COMP_ID 0x03 |
---|
| 10085 | +#define WL_NAN_CMD_SYNC_COMP_ID 0x04 |
---|
| 10086 | +#define WL_NAN_CMD_DATA_COMP_ID 0x05 |
---|
| 10087 | +#define WL_NAN_CMD_DAM_COMP_ID 0x06 |
---|
| 10088 | +#define WL_NAN_CMD_RANGE_COMP_ID 0x07 |
---|
| 10089 | +#define WL_NAN_CMD_GENERIC_COMP_ID 0x08 |
---|
| 10090 | +#define WL_NAN_CMD_SCHED_COMP_ID 0x09 |
---|
| 10091 | +#define WL_NAN_CMD_NSR_COMP_ID 0x0a /* NAN Save Restore */ |
---|
| 10092 | +#define WL_NAN_CMD_NANHO_COMP_ID 0x0b /* NAN Host offload */ |
---|
| 10093 | +#define WL_NAN_CMD_DBG_COMP_ID 0x0f |
---|
| 10094 | + |
---|
| 10095 | +#define WL_NAN_CMD_COMP_SHIFT 8 |
---|
| 10096 | +#define NAN_CMD(x, y) (((x) << WL_NAN_CMD_COMP_SHIFT) | (y)) |
---|
| 10097 | + |
---|
| 10098 | +/* |
---|
| 10099 | + * Module based NAN TLV IDs |
---|
| 10100 | + */ |
---|
| 10101 | +typedef enum wl_nan_tlv { |
---|
| 10102 | + |
---|
| 10103 | + WL_NAN_XTLV_CFG_MATCH_RX = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x01), |
---|
| 10104 | + WL_NAN_XTLV_CFG_MATCH_TX = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x02), |
---|
| 10105 | + WL_NAN_XTLV_CFG_SR_FILTER = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x03), |
---|
| 10106 | + WL_NAN_XTLV_CFG_SVC_NAME = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x04), |
---|
| 10107 | + WL_NAN_XTLV_CFG_NAN_STATUS = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x05), |
---|
| 10108 | + WL_NAN_XTLV_CFG_SVC_LIFE_COUNT = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x06), |
---|
| 10109 | + WL_NAN_XTLV_CFG_SVC_HASH = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x07), |
---|
| 10110 | + WL_NAN_XTLV_CFG_SEC_CSID = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x08), /* Security CSID */ |
---|
| 10111 | + WL_NAN_XTLV_CFG_SEC_PMK = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x09), /* Security PMK */ |
---|
| 10112 | + WL_NAN_XTLV_CFG_SEC_PMKID = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x0A), |
---|
| 10113 | + WL_NAN_XTLV_CFG_SEC_SCID = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x0B), |
---|
| 10114 | + WL_NAN_XTLV_CFG_VNDR_PAYLOAD = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x0C), |
---|
| 10115 | + WL_NAN_XTLV_CFG_HOST_INDPID = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x0D), |
---|
| 10116 | + /* when host ndpid is used */ |
---|
| 10117 | + WL_NAN_XTLV_CFG_MAC_ADDR = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x0E), |
---|
| 10118 | + /* fast disc time bitmap config */ |
---|
| 10119 | + WL_NAN_XTLV_CFG_FDISC_TBMP = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x0F), |
---|
| 10120 | + |
---|
| 10121 | + WL_NAN_XTLV_SD_SVC_INFO = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x01), |
---|
| 10122 | + WL_NAN_XTLV_SD_FOLLOWUP = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x02), |
---|
| 10123 | + WL_NAN_XTLV_SD_SDF_RX = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x03), |
---|
| 10124 | + WL_NAN_XTLV_SD_SDE_CONTROL = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x04), |
---|
| 10125 | + WL_NAN_XTLV_SD_SDE_RANGE_LIMIT = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x05), |
---|
| 10126 | + WL_NAN_XTLV_SD_NAN_AF = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x06), |
---|
| 10127 | + WL_NAN_XTLV_SD_TERM = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x07), |
---|
| 10128 | + WL_NAN_XTLV_SD_REPLIED = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x08), /* Pub sent */ |
---|
| 10129 | + WL_NAN_XTLV_SD_FUP_RECEIVED = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x09), /* FUP Received */ |
---|
| 10130 | + WL_NAN_XTLV_SD_DISC_RESULTS = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x0A), /* Pub RX */ |
---|
| 10131 | + WL_NAN_XTLV_SD_TXS = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x0B), /* Tx status */ |
---|
| 10132 | + WL_NAN_XTLV_SD_SDE_SVC_INFO = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x0C), |
---|
| 10133 | + WL_NAN_XTLV_SD_SDE_SVC_UPD_IND = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x0D), |
---|
| 10134 | + WL_NAN_XTLV_SD_SVC_NDI = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x0E), |
---|
| 10135 | + WL_NAN_XTLV_SD_NDP_SPEC_INFO = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x0F), |
---|
| 10136 | + WL_NAN_XTLV_SD_NDPE_TLV_LIST = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x10), |
---|
| 10137 | + WL_NAN_XTLV_SD_NDL_QOS_UPD = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x11), |
---|
| 10138 | + WL_NAN_XTLV_SD_DISC_CACHE_TIMEOUT = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x12), |
---|
| 10139 | + |
---|
| 10140 | + WL_NAN_XTLV_SYNC_BCN_RX = NAN_CMD(WL_NAN_CMD_SYNC_COMP_ID, 0x01), |
---|
| 10141 | + WL_NAN_XTLV_EV_MR_CHANGED = NAN_CMD(WL_NAN_CMD_SYNC_COMP_ID, 0x02), |
---|
| 10142 | + |
---|
| 10143 | + WL_NAN_XTLV_DATA_DP_END = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x01), |
---|
| 10144 | + WL_NAN_XTLV_DATA_DP_INFO = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x02), |
---|
| 10145 | + WL_NAN_XTLV_DATA_DP_SEC_INST = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x03), |
---|
| 10146 | + WL_NAN_XTLV_DATA_DP_TXS = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x04), /* txs for dp */ |
---|
| 10147 | + WL_NAN_XTLV_DATA_DP_OPAQUE_INFO = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x05), |
---|
| 10148 | + WL_NAN_XTLV_RANGE_INFO = NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID, 0x01), |
---|
| 10149 | + WL_NAN_XTLV_RNG_TXS = NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID, 0x02), |
---|
| 10150 | + |
---|
| 10151 | + WL_NAN_XTLV_EV_SLOT_INFO = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x01), |
---|
| 10152 | + WL_NAN_XTLV_EV_GEN_INFO = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x02), |
---|
| 10153 | + WL_NAN_XTLV_CCA_STATS = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x03), |
---|
| 10154 | + WL_NAN_XTLV_PER_STATS = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x04), |
---|
| 10155 | + WL_NAN_XTLV_CHBOUND_INFO = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x05), |
---|
| 10156 | + WL_NAN_XTLV_SLOT_STATS = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x06), |
---|
| 10157 | + |
---|
| 10158 | + WL_NAN_XTLV_DAM_NA_ATTR = NAN_CMD(WL_NAN_CMD_DAM_COMP_ID, 0x01), /* na attr */ |
---|
| 10159 | + WL_NAN_XTLV_HOST_ASSIST_REQ = NAN_CMD(WL_NAN_CMD_DAM_COMP_ID, 0x02), /* host assist */ |
---|
| 10160 | + |
---|
| 10161 | + WL_NAN_XTLV_GEN_FW_CAP = NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID, 0x01), /* fw cap */ |
---|
| 10162 | + |
---|
| 10163 | + WL_NAN_XTLV_SCHED_INFO = NAN_CMD(WL_NAN_CMD_SCHED_COMP_ID, 0x01), |
---|
| 10164 | + |
---|
| 10165 | + /* Nan Save-Restore XTLVs */ |
---|
| 10166 | + WL_NAN_XTLV_NSR2_PEER = NAN_CMD(WL_NAN_CMD_NSR_COMP_ID, 0x21), |
---|
| 10167 | + WL_NAN_XTLV_NSR2_NDP = NAN_CMD(WL_NAN_CMD_NSR_COMP_ID, 0x22), |
---|
| 10168 | + |
---|
| 10169 | + /* Host offload XTLVs */ |
---|
| 10170 | + WL_NAN_XTLV_NANHO_PEER_ENTRY = NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID, 0x01), |
---|
| 10171 | + WL_NAN_XTLV_NANHO_DCAPLIST = NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID, 0x02), |
---|
| 10172 | + WL_NAN_XTLV_NANHO_DCSLIST = NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID, 0x03), |
---|
| 10173 | + WL_NAN_XTLV_NANHO_BLOB = NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID, 0x04), |
---|
| 10174 | + WL_NAN_XTLV_NANHO_NDP_STATE = NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID, 0x05), |
---|
| 10175 | + WL_NAN_XTLV_NANHO_FRM_TPLT = NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID, 0x06), |
---|
| 10176 | + WL_NAN_XTLV_NANHO_OOB_NAF = NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID, 0x07) |
---|
| 10177 | +} wl_nan_tlv_t; |
---|
| 10178 | + |
---|
| 10179 | +/* Sub Module ID's for NAN */ |
---|
| 10180 | +enum { |
---|
| 10181 | + NAN_MAC = 0, /* nan mac */ |
---|
| 10182 | + NAN_DISC = 1, /* nan discovery */ |
---|
| 10183 | + NAN_DBG = 2, /* nan debug */ |
---|
| 10184 | + NAN_SCHED = 3, /* nan sched */ |
---|
| 10185 | + NAN_PEER_ENTRY = 4, /* nan peer entry */ |
---|
| 10186 | + NAN_AVAIL = 5, /* nan avail */ |
---|
| 10187 | + NAN_DAM = 6, /* nan dam */ |
---|
| 10188 | + NAN_FSM = 7, /* nan fsm registry */ |
---|
| 10189 | + NAN_NDP = 8, /* nan ndp */ |
---|
| 10190 | + NAN_NDL = 9, /* nan ndl */ |
---|
| 10191 | + NAN_DP = 10, /* nan dp core */ |
---|
| 10192 | + NAN_RNG = 11, /* nan ranging */ |
---|
| 10193 | + NAN_SEC = 12, /* nan sec */ |
---|
| 10194 | + NAN_LAST = 13 |
---|
| 10195 | +}; |
---|
| 10196 | + |
---|
| 10197 | +enum wl_nan_sub_cmd_xtlv_id { |
---|
| 10198 | + |
---|
| 10199 | + /* Special command - Tag zero */ |
---|
| 10200 | + WL_NAN_CMD_GLB_NAN_VER = NAN_CMD(WL_NAN_CMD_GLOBAL, 0x00), |
---|
| 10201 | + |
---|
| 10202 | + /* nan cfg sub-commands */ |
---|
| 10203 | + |
---|
| 10204 | + WL_NAN_CMD_CFG_NAN_INIT = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x01), |
---|
| 10205 | + WL_NAN_CMD_CFG_ROLE = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x02), |
---|
| 10206 | + WL_NAN_CMD_CFG_HOP_CNT = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x03), |
---|
| 10207 | + WL_NAN_CMD_CFG_HOP_LIMIT = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x04), |
---|
| 10208 | + WL_NAN_CMD_CFG_WARMUP_TIME = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x05), |
---|
| 10209 | + WL_NAN_CMD_CFG_STATUS = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x06), |
---|
| 10210 | + WL_NAN_CMD_CFG_OUI = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x07), |
---|
| 10211 | + WL_NAN_CMD_CFG_COUNT = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x08), |
---|
| 10212 | + WL_NAN_CMD_CFG_CLEARCOUNT = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x09), |
---|
| 10213 | + WL_NAN_CMD_CFG_CHANNEL = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x0A), |
---|
| 10214 | + WL_NAN_CMD_CFG_BAND = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x0B), |
---|
| 10215 | + WL_NAN_CMD_CFG_CID = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x0C), |
---|
| 10216 | + WL_NAN_CMD_CFG_IF_ADDR = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x0D), |
---|
| 10217 | + WL_NAN_CMD_CFG_BCN_INTERVAL = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x0E), |
---|
| 10218 | + WL_NAN_CMD_CFG_SDF_TXTIME = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x0F), |
---|
| 10219 | + WL_NAN_CMD_CFG_SID_BEACON = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x10), |
---|
| 10220 | + WL_NAN_CMD_CFG_DW_LEN = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x11), |
---|
| 10221 | + WL_NAN_CMD_CFG_AVAIL = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x12), |
---|
| 10222 | + WL_NAN_CMD_CFG_WFA_TM = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x13), |
---|
| 10223 | + WL_NAN_CMD_CFG_EVENT_MASK = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x14), |
---|
| 10224 | + WL_NAN_CMD_CFG_NAN_CONFIG = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x15), /* ctrl */ |
---|
| 10225 | + WL_NAN_CMD_CFG_NAN_ENAB = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x16), |
---|
| 10226 | + WL_NAN_CMD_CFG_ULW = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x17), |
---|
| 10227 | + WL_NAN_CMD_CFG_NAN_CONFIG2 = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x18), /* ctrl2 */ |
---|
| 10228 | + WL_NAN_CMD_CFG_DEV_CAP = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x19), |
---|
| 10229 | + WL_NAN_CMD_CFG_SCAN_PARAMS = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x1A), |
---|
| 10230 | + WL_NAN_CMD_CFG_VNDR_PAYLOAD = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x1B), |
---|
| 10231 | + WL_NAN_CMD_CFG_FASTDISC = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x1C), |
---|
| 10232 | + WL_NAN_CMD_CFG_MIN_TX_RATE = NAN_CMD(WL_NAN_CMD_CFG_COMP_ID, 0x1D), |
---|
| 10233 | + WL_NAN_CMD_CFG_MAX = WL_NAN_CMD_CFG_MIN_TX_RATE, |
---|
| 10234 | + |
---|
| 10235 | + /* Add new commands before and update */ |
---|
| 10236 | + |
---|
| 10237 | + /* nan election sub-commands */ |
---|
| 10238 | + WL_NAN_CMD_ELECTION_HOST_ENABLE = NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID, 0x01), |
---|
| 10239 | + WL_NAN_CMD_ELECTION_METRICS_CONFIG = NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID, 0x02), |
---|
| 10240 | + WL_NAN_CMD_ELECTION_METRICS_STATE = NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID, 0x03), |
---|
| 10241 | + WL_NAN_CMD_ELECTION_LEAVE = NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID, 0x03), |
---|
| 10242 | + WL_NAN_CMD_ELECTION_MERGE = NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID, 0x04), |
---|
| 10243 | + WL_NAN_CMD_ELECTION_ADVERTISERS = NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID, 0x05), |
---|
| 10244 | + WL_NAN_CMD_ELECTION_RSSI_THRESHOLD = NAN_CMD(WL_NAN_CMD_ELECTION_COMP_ID, 0x06), |
---|
| 10245 | + WL_NAN_CMD_ELECTION_MAX = WL_NAN_CMD_ELECTION_RSSI_THRESHOLD, |
---|
| 10246 | + /* New commands go before and update */ |
---|
| 10247 | + |
---|
| 10248 | + /* nan SD sub-commands */ |
---|
| 10249 | + WL_NAN_CMD_SD_PARAMS = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x01), |
---|
| 10250 | + WL_NAN_CMD_SD_PUBLISH = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x02), |
---|
| 10251 | + WL_NAN_CMD_SD_PUBLISH_LIST = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x03), |
---|
| 10252 | + WL_NAN_CMD_SD_CANCEL_PUBLISH = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x04), |
---|
| 10253 | + WL_NAN_CMD_SD_SUBSCRIBE = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x05), |
---|
| 10254 | + WL_NAN_CMD_SD_SUBSCRIBE_LIST = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x06), |
---|
| 10255 | + WL_NAN_CMD_SD_CANCEL_SUBSCRIBE = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x07), |
---|
| 10256 | + WL_NAN_CMD_SD_VND_INFO = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x08), |
---|
| 10257 | + WL_NAN_CMD_SD_STATS = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x09), |
---|
| 10258 | + WL_NAN_CMD_SD_TRANSMIT = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x0A), |
---|
| 10259 | + WL_NAN_CMD_SD_FUP_TRANSMIT = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x0B), |
---|
| 10260 | + WL_NAN_CMD_SD_CONNECTION = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x0C), |
---|
| 10261 | + WL_NAN_CMD_SD_SHOW = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x0D), |
---|
| 10262 | + WL_NAN_CMD_SD_DISC_CACHE_TIMEOUT = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x0E), |
---|
| 10263 | + WL_NAN_CMD_SD_DISC_CACHE_CLEAR = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x0F), |
---|
| 10264 | + WL_NAN_CMD_SD_MAX = WL_NAN_CMD_SD_DISC_CACHE_CLEAR, |
---|
| 10265 | + |
---|
| 10266 | + /* nan time sync sub-commands */ |
---|
| 10267 | + |
---|
| 10268 | + WL_NAN_CMD_SYNC_SOCIAL_CHAN = NAN_CMD(WL_NAN_CMD_SYNC_COMP_ID, 0x01), |
---|
| 10269 | + WL_NAN_CMD_SYNC_AWAKE_DWS = NAN_CMD(WL_NAN_CMD_SYNC_COMP_ID, 0x02), |
---|
| 10270 | + WL_NAN_CMD_SYNC_BCN_RSSI_NOTIF_THRESHOLD = NAN_CMD(WL_NAN_CMD_SYNC_COMP_ID, 0x03), |
---|
| 10271 | + WL_NAN_CMD_SYNC_MAX = WL_NAN_CMD_SYNC_BCN_RSSI_NOTIF_THRESHOLD, |
---|
| 10272 | + |
---|
| 10273 | + /* nan2 commands */ |
---|
| 10274 | + WL_NAN_CMD_DATA_CONFIG = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x01), |
---|
| 10275 | + WL_NAN_CMD_DATA_RSVD02 = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x02), |
---|
| 10276 | + WL_NAN_CMD_DATA_RSVD03 = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x03), |
---|
| 10277 | + WL_NAN_CMD_DATA_DATAREQ = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x04), |
---|
| 10278 | + WL_NAN_CMD_DATA_DATARESP = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x05), |
---|
| 10279 | + WL_NAN_CMD_DATA_DATAEND = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x06), |
---|
| 10280 | + WL_NAN_CMD_DATA_SCHEDUPD = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x07), |
---|
| 10281 | + WL_NAN_CMD_DATA_RSVD08 = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x08), |
---|
| 10282 | + WL_NAN_CMD_DATA_CAP = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x9), |
---|
| 10283 | + WL_NAN_CMD_DATA_STATUS = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x0A), |
---|
| 10284 | + WL_NAN_CMD_DATA_STATS = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x0B), |
---|
| 10285 | + WL_NAN_CMD_DATA_RSVD0C = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x0C), |
---|
| 10286 | + WL_NAN_CMD_DATA_NDP_SHOW = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x0D), |
---|
| 10287 | + WL_NAN_CMD_DATA_DATACONF = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x0E), |
---|
| 10288 | + WL_NAN_CMD_DATA_MIN_TX_RATE = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x0F), |
---|
| 10289 | + WL_NAN_CMD_DATA_MAX_PEERS = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x10), |
---|
| 10290 | + WL_NAN_CMD_DATA_DP_IDLE_PERIOD = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x11), |
---|
| 10291 | + WL_NAN_CMD_DATA_DP_OPAQUE_INFO = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x12), |
---|
| 10292 | + WL_NAN_CMD_DATA_DP_HB_DURATION = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x13), |
---|
| 10293 | + WL_NAN_CMD_DATA_PATH_MAX = WL_NAN_CMD_DATA_DP_HB_DURATION, /* New ones before and update */ |
---|
| 10294 | + |
---|
| 10295 | + /* nan dam sub-commands */ |
---|
| 10296 | + WL_NAN_CMD_DAM_CFG = NAN_CMD(WL_NAN_CMD_DAM_COMP_ID, 0x01), |
---|
| 10297 | + WL_NAN_CMD_DAM_MAX = WL_NAN_CMD_DAM_CFG, /* New ones before and update */ |
---|
| 10298 | + |
---|
| 10299 | + /* nan2.0 ranging commands */ |
---|
| 10300 | + WL_NAN_CMD_RANGE_REQUEST = NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID, 0x01), |
---|
| 10301 | + WL_NAN_CMD_RANGE_AUTO = NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID, 0x02), |
---|
| 10302 | + WL_NAN_CMD_RANGE_RESPONSE = NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID, 0x03), |
---|
| 10303 | + WL_NAN_CMD_RANGE_CANCEL = NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID, 0x04), |
---|
| 10304 | + WL_NAN_CMD_RANGE_IDLE_COUNT = NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID, 0x05), |
---|
| 10305 | + WL_NAN_CMD_RANGE_CANCEL_EXT = NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID, 0x06), |
---|
| 10306 | + |
---|
| 10307 | + /* nan debug sub-commands */ |
---|
| 10308 | + WL_NAN_CMD_DBG_SCAN_PARAMS = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x01), |
---|
| 10309 | + WL_NAN_CMD_DBG_SCAN = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x02), |
---|
| 10310 | + WL_NAN_CMD_DBG_SCAN_RESULTS = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x03), |
---|
| 10311 | + /* This is now moved under CFG */ |
---|
| 10312 | + WL_NAN_CMD_DBG_EVENT_MASK = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x04), |
---|
| 10313 | + WL_NAN_CMD_DBG_EVENT_CHECK = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x05), |
---|
| 10314 | + WL_NAN_CMD_DBG_DUMP = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x06), |
---|
| 10315 | + WL_NAN_CMD_DBG_CLEAR = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x07), |
---|
| 10316 | + WL_NAN_CMD_DBG_RSSI = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x08), |
---|
| 10317 | + WL_NAN_CMD_DBG_DEBUG = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x09), |
---|
| 10318 | + WL_NAN_CMD_DBG_TEST1 = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x0A), |
---|
| 10319 | + WL_NAN_CMD_DBG_TEST2 = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x0B), |
---|
| 10320 | + WL_NAN_CMD_DBG_TEST3 = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x0C), |
---|
| 10321 | + WL_NAN_CMD_DBG_DISC_RESULTS = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x0D), |
---|
| 10322 | + WL_NAN_CMD_DBG_STATS = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x0E), |
---|
| 10323 | + WL_NAN_CMD_DBG_LEVEL = NAN_CMD(WL_NAN_CMD_DBG_COMP_ID, 0x0F), |
---|
| 10324 | + WL_NAN_CMD_DBG_MAX = WL_NAN_CMD_DBG_LEVEL, /* New ones before and update */ |
---|
| 10325 | + |
---|
| 10326 | + /* Generic componenet */ |
---|
| 10327 | + WL_NAN_CMD_GEN_STATS = NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID, 0x01), |
---|
| 10328 | + WL_NAN_CMD_GEN_FW_CAP = NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID, 0x02), |
---|
| 10329 | + WL_NAN_CMD_GEN_MAX = WL_NAN_CMD_GEN_FW_CAP, |
---|
| 10330 | + |
---|
| 10331 | + /* NAN Save-Restore */ |
---|
| 10332 | + WL_NAN_CMD_NSR2 = NAN_CMD(WL_NAN_CMD_NSR_COMP_ID, 0x20), |
---|
| 10333 | + WL_NAN_CMD_NSR2_MAX = WL_NAN_CMD_NSR2, |
---|
| 10334 | + |
---|
| 10335 | + /* Host offload sub-commands */ |
---|
| 10336 | + WL_NAN_CMD_NANHO_UPDATE = NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID, 0x01), |
---|
| 10337 | + WL_NAN_CMD_NANHO_FRM_TPLT = NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID, 0x02), |
---|
| 10338 | + WL_NAN_CMD_NANHO_OOB_NAF = NAN_CMD(WL_NAN_CMD_NANHO_COMP_ID, 0x03), |
---|
| 10339 | + WL_NAN_CMD_NANHO_MAX = WL_NAN_CMD_NANHO_OOB_NAF |
---|
| 10340 | +}; |
---|
| 10341 | + |
---|
| 10342 | +/* |
---|
| 10343 | + * Component/Module based NAN TLV IDs for NAN stats |
---|
| 10344 | + */ |
---|
| 10345 | +typedef enum wl_nan_stats_tlv { |
---|
| 10346 | + WL_NAN_XTLV_SYNC_MAC_STATS = NAN_CMD(WL_NAN_CMD_SYNC_COMP_ID, 0x01), |
---|
| 10347 | + |
---|
| 10348 | + WL_NAN_XTLV_SD_DISC_STATS = NAN_CMD(WL_NAN_CMD_SD_COMP_ID, 0x01), |
---|
| 10349 | + |
---|
| 10350 | + WL_NAN_XTLV_DATA_NDP_STATS = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x01), |
---|
| 10351 | + WL_NAN_XTLV_DATA_NDL_STATS = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x02), |
---|
| 10352 | + WL_NAN_XTLV_DATA_SEC_STATS = NAN_CMD(WL_NAN_CMD_DATA_COMP_ID, 0x03), |
---|
| 10353 | + |
---|
| 10354 | + WL_NAN_XTLV_GEN_SCHED_STATS = NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID, 0x01), |
---|
| 10355 | + WL_NAN_XTLV_GEN_PEER_STATS = NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID, 0x02), |
---|
| 10356 | + WL_NAN_XTLV_GEN_PEER_STATS_DEVCAP = NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID, 0x03), |
---|
| 10357 | + WL_NAN_XTLV_GEN_PEER_STATS_NDP = NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID, 0x04), |
---|
| 10358 | + WL_NAN_XTLV_GEN_PEER_STATS_SCHED = NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID, 0x05), |
---|
| 10359 | + WL_NAN_XTLV_GEN_AVAIL_STATS_SCHED = NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID, 0x06), |
---|
| 10360 | + WL_NAN_XTLV_GEN_NDP_STATS = NAN_CMD(WL_NAN_CMD_GENERIC_COMP_ID, 0x07), |
---|
| 10361 | + |
---|
| 10362 | + WL_NAN_XTLV_DAM_STATS = NAN_CMD(WL_NAN_CMD_DAM_COMP_ID, 0x01), |
---|
| 10363 | + WL_NAN_XTLV_DAM_AVAIL_STATS = NAN_CMD(WL_NAN_CMD_DAM_COMP_ID, 0x02), |
---|
| 10364 | + |
---|
| 10365 | + WL_NAN_XTLV_RANGE_STATS = NAN_CMD(WL_NAN_CMD_RANGE_COMP_ID, 0x01) |
---|
| 10366 | +} wl_nan_stats_tlv_t; |
---|
| 10367 | + |
---|
| 10368 | +/* NAN stats WL_NAN_CMD_GEN_STATS command */ |
---|
| 10369 | +/* Input data */ |
---|
| 10370 | +typedef struct wl_nan_cmn_get_stat { |
---|
| 10371 | + uint32 modules_btmap; /* Bitmap to indicate module stats are needed: |
---|
| 10372 | + * See NAN Sub Module ID's above |
---|
| 10373 | + */ |
---|
| 10374 | + uint8 operation; /* Get, Get and Clear */ |
---|
| 10375 | + uint8 arg1; /* Submodule control variable1 */ |
---|
| 10376 | + uint8 arg2; /* Submodule control variable2 */ |
---|
| 10377 | + uint8 pad; /* May not be needed as TLV's are aligned,add to pass compile chk */ |
---|
| 10378 | +} wl_nan_cmn_get_stat_t; |
---|
| 10379 | + |
---|
| 10380 | +/* Output for Stats container */ |
---|
| 10381 | +typedef struct wl_nan_cmn_stat { |
---|
| 10382 | + uint32 n_stats; /* Number of different sub TLV stats present in the container */ |
---|
| 10383 | + uint32 totlen; /* Total Length of stats data in container */ |
---|
| 10384 | + uint8 stats_tlvs []; /* Stat TLV's container */ |
---|
| 10385 | +} wl_nan_cmn_stat_t; |
---|
| 10386 | + |
---|
| 10387 | +/* Defines for operation */ |
---|
| 10388 | +#define WLA_NAN_STATS_GET 0 |
---|
| 10389 | +#define WLA_NAN_STATS_GET_CLEAR 1 |
---|
| 10390 | + |
---|
| 10391 | +#define WL_NAN_STAT_ALL 0xFFFFFFFF |
---|
| 10392 | + |
---|
| 10393 | +/* NAN Mac stats */ |
---|
| 10394 | + |
---|
| 10395 | +typedef struct wl_nan_mac_band_stats { |
---|
| 10396 | + uint32 bcn_tx; /* 2g/5g disc/sync beacon tx count */ |
---|
| 10397 | + uint32 bcn_rx; /* 2g/5g disc/sync beacon rx count */ |
---|
| 10398 | + uint32 dws; /* Number of 2g/5g DW's */ |
---|
| 10399 | +} wl_nan_mac_band_stats_t; |
---|
| 10400 | + |
---|
| 10401 | +/* Note: if this struct is changing update wl_nan_slot_ecounters_vX_t version, |
---|
| 10402 | + * as this struct is sent as payload in wl_nan_slot_ecounter_vX_ts |
---|
| 10403 | + */ |
---|
| 10404 | +typedef struct wl_nan_mac_stats { |
---|
| 10405 | + wl_nan_mac_band_stats_t band[NAN_MAX_BANDS]; /* MAC sync band specific stats */ |
---|
| 10406 | + uint32 naf_tx; /* NAN AF tx */ |
---|
| 10407 | + uint32 naf_rx; /* NAN AF rx */ |
---|
| 10408 | + uint32 sdf_tx; /* SDF tx */ |
---|
| 10409 | + uint32 sdf_rx; /* SDF rx */ |
---|
| 10410 | +} wl_nan_mac_stats_t; |
---|
| 10411 | + |
---|
| 10412 | +/* NAN Sched stats */ |
---|
| 10413 | +/* Per core Sched stats */ |
---|
| 10414 | +typedef struct nan_sched_stats_core { |
---|
| 10415 | + uint32 slotstart; /* slot_start */ |
---|
| 10416 | + uint32 slotend; /* slot_end */ |
---|
| 10417 | + uint32 slotskip; /* slot_skip */ |
---|
| 10418 | + uint32 slotstart_partial; /* slot resume */ |
---|
| 10419 | + uint32 slotend_partial; /* slot pre-empt */ |
---|
| 10420 | + uint8 avail_upd_cnt; /* count to track num of times avail has been updated */ |
---|
| 10421 | + uint8 pad[3]; |
---|
| 10422 | +} nan_sched_stats_core_t; |
---|
| 10423 | +/* Common Sched stats */ |
---|
| 10424 | +typedef struct nan_sched_stats_cmn { |
---|
| 10425 | + uint32 slot_adj_dw; /* Slot adjusts due to DW changes */ |
---|
| 10426 | + uint32 slot_dur; /* Total slot duration in TU's */ |
---|
| 10427 | +} nan_sched_stats_cmn_t; |
---|
| 10428 | + |
---|
| 10429 | +/* Note: if this struct is changing update wl_nan_slot_ecounters_vX_t version, |
---|
| 10430 | + * as this struct is sent as payload in wl_nan_slot_ecounters_vX_t |
---|
| 10431 | + */ |
---|
| 10432 | +typedef struct nan_sched_stats { |
---|
| 10433 | + nan_sched_stats_cmn_t cmn; |
---|
| 10434 | + nan_sched_stats_core_t slice[MAX_NUM_D11CORES]; |
---|
| 10435 | +} nan_sched_stats_t; |
---|
| 10436 | +/* End NAN Sched stats */ |
---|
| 10437 | + |
---|
| 10438 | +/* NAN Discovery stats */ |
---|
| 10439 | +typedef struct nan_disc_stats { |
---|
| 10440 | + uint32 pub_tx; /* Publish tx */ |
---|
| 10441 | + uint32 pub_rx; /* Publish rx */ |
---|
| 10442 | + uint32 sub_tx; /* Subscribe tx */ |
---|
| 10443 | + uint32 sub_rx; /* Subscribe rx */ |
---|
| 10444 | + uint32 fup_tx; /* Followup tx */ |
---|
| 10445 | + uint32 fup_rx; /* Followup rx */ |
---|
| 10446 | + uint32 pub_resp_ignored; /* response to incoming publish ignored */ |
---|
| 10447 | + uint32 sub_resp_ignored; /* response to incoming subscribe ignored */ |
---|
| 10448 | +} nan_disc_stats_t; |
---|
| 10449 | +/* NAN Discovery stats end */ |
---|
| 10450 | + |
---|
| 10451 | +/* statistics for nan sec */ |
---|
| 10452 | +typedef struct nan_sec_stats_s { |
---|
| 10453 | + uint32 mic_fail; /* rx mic fail */ |
---|
| 10454 | + uint32 replay_fail; /* replay counter */ |
---|
| 10455 | + uint32 tx_fail; /* tx fail (from txstatus) */ |
---|
| 10456 | + uint32 key_info_err; /* key info field err */ |
---|
| 10457 | + uint32 ok_sessions; /* successful mx negotiations */ |
---|
| 10458 | + uint32 fail_sessions; /* failed sessions */ |
---|
| 10459 | + uint32 keydesc_err; /* key desc error */ |
---|
| 10460 | + uint32 invalid_cipher; /* cipher suite not valid */ |
---|
| 10461 | + uint32 pmk_not_found; /* no pmk found for given service or for any reason */ |
---|
| 10462 | + uint32 no_pmk_for_pmkid; /* no pmk found for give pmkid */ |
---|
| 10463 | + uint32 key_install_err; /* failed to install keys */ |
---|
| 10464 | + uint32 no_keydesc_attr; /* key desc attr missing */ |
---|
| 10465 | + uint32 nonce_mismatch; /* nonce mismatch */ |
---|
| 10466 | +} nan_sec_stats_t; |
---|
| 10467 | + |
---|
| 10468 | +/* WL_NAN_XTLV_GEN_PEER_STATS */ |
---|
| 10469 | +typedef struct wl_nan_peer_stats { |
---|
| 10470 | + struct ether_addr nmi; |
---|
6336 | 10471 | uint8 pad[2]; |
---|
6337 | | - chanspec_t chspec_list[NAN_SCAN_MAX_CHCNT]; /* act. used 3, 5 rfu */ |
---|
6338 | | -} nan_scan_params_t; |
---|
| 10472 | + uint32 pkt_enq; /* counter for queued pkt of peer */ |
---|
6339 | 10473 | |
---|
| 10474 | + /* NDL */ |
---|
| 10475 | + bool ndl_exist; |
---|
| 10476 | + uint8 ndl_state; |
---|
| 10477 | + bool counter_proposed; |
---|
| 10478 | + uint8 pad1; |
---|
| 10479 | + |
---|
| 10480 | + /* NDL QoS */ |
---|
| 10481 | + uint16 local_max_latency; |
---|
| 10482 | + uint16 peer_max_latency; |
---|
| 10483 | + uint8 local_min_slots; |
---|
| 10484 | + uint8 peer_min_slots; |
---|
| 10485 | + |
---|
| 10486 | + /* security association */ |
---|
| 10487 | + struct ether_addr sec_laddr; /* local mac addr */ |
---|
| 10488 | + struct ether_addr sec_raddr; /* remote mac addr */ |
---|
| 10489 | + uint8 sec_csid; |
---|
| 10490 | + uint8 pad2; |
---|
| 10491 | +} wl_nan_peer_stats_t; |
---|
| 10492 | + |
---|
| 10493 | +/* WL_NAN_XTLV_GEN_PEER_STATS_DEVCAP */ |
---|
| 10494 | +typedef struct wl_nan_peer_stats_dev_cap { |
---|
| 10495 | + uint8 mapid; |
---|
| 10496 | + uint8 awake_dw_2g; |
---|
| 10497 | + uint8 awake_dw_5g; |
---|
| 10498 | + uint8 bands_supported; |
---|
| 10499 | + uint8 op_mode; |
---|
| 10500 | + uint8 num_antennas; |
---|
| 10501 | + uint16 chan_switch_time; |
---|
| 10502 | + uint8 capabilities; |
---|
| 10503 | + uint8 pad[3]; |
---|
| 10504 | +} wl_nan_peer_stats_dev_cap_t; |
---|
| 10505 | + |
---|
| 10506 | +/* WL_NAN_XTLV_GEN_PEER_STATS_NDP */ |
---|
| 10507 | +typedef struct wl_nan_peer_stats_ndp { |
---|
| 10508 | + uint8 peer_role; |
---|
| 10509 | + uint8 ndp_state; |
---|
| 10510 | + uint8 indp_id; /* initiator ndp id */ |
---|
| 10511 | + uint8 ndp_ctrl; /* ndp control field */ |
---|
| 10512 | + struct ether_addr peer_nmi; |
---|
| 10513 | + struct ether_addr peer_ndi; |
---|
| 10514 | + struct ether_addr local_ndi; |
---|
| 10515 | + |
---|
| 10516 | + /* peer scb info */ |
---|
| 10517 | + bool scb_allocated; |
---|
| 10518 | + bool scb_found; |
---|
| 10519 | + uint32 scb_flags; |
---|
| 10520 | + uint32 scb_flags2; |
---|
| 10521 | + uint32 scb_flags3; |
---|
| 10522 | +} wl_nan_peer_stats_ndp_t; |
---|
| 10523 | + |
---|
| 10524 | +enum { |
---|
| 10525 | + WL_NAN_SCHED_STAT_SLOT_COMM = 0x01, /* Committed slot */ |
---|
| 10526 | + WL_NAN_SCHED_STAT_SLOT_COND = 0x02, /* Conditional slot(proposal/counter) */ |
---|
| 10527 | + WL_NAN_SCHED_STAT_SLOT_NDC = 0x04, /* NDC slot */ |
---|
| 10528 | + WL_NAN_SCHED_STAT_SLOT_IMMUT = 0x08, /* Immutable slot */ |
---|
| 10529 | + WL_NAN_SCHED_STAT_SLOT_RANGE = 0x10, /* Ranging slot */ |
---|
| 10530 | +}; |
---|
| 10531 | +typedef uint16 wl_nan_stats_sched_slot_info_t; |
---|
| 10532 | + |
---|
| 10533 | +typedef struct wl_nan_stats_sched_slot { |
---|
| 10534 | + wl_nan_stats_sched_slot_info_t info; /* capture slot type and more info */ |
---|
| 10535 | + chanspec_t chanspec; |
---|
| 10536 | +} wl_nan_stats_sched_slot_t; |
---|
| 10537 | + |
---|
| 10538 | +/* WL_NAN_XTLV_GEN_PEER_STATS_SCHED, WL_NAN_XTLV_GEN_AVAIL_STATS_SCHED */ |
---|
| 10539 | +typedef struct wl_nan_stats_sched { |
---|
| 10540 | + uint8 map_id; |
---|
| 10541 | + uint8 seq_id; /* seq id from NA attr */ |
---|
| 10542 | + uint8 slot_dur; |
---|
| 10543 | + uint8 pad; |
---|
| 10544 | + uint16 period; |
---|
| 10545 | + uint16 num_slot; |
---|
| 10546 | + wl_nan_stats_sched_slot_t slot[]; |
---|
| 10547 | +} wl_nan_stats_sched_t; |
---|
| 10548 | + |
---|
| 10549 | +/* WL_NAN_XTLV_GEN_PEER_STATS_SCHED */ |
---|
| 10550 | +typedef struct wl_nan_peer_stats_sched { |
---|
| 10551 | + uint8 map_id; |
---|
| 10552 | + uint8 seq_id; /* seq id from NA attr */ |
---|
| 10553 | + uint8 slot_dur; |
---|
| 10554 | + uint8 pad; |
---|
| 10555 | + uint16 period; |
---|
| 10556 | + uint16 num_slot; |
---|
| 10557 | + wl_nan_stats_sched_slot_t slot[]; |
---|
| 10558 | +} wl_nan_peer_stats_sched_t; |
---|
| 10559 | + |
---|
| 10560 | +/* WL_NAN_XTLV_RANGE_STATS */ |
---|
| 10561 | +typedef struct wl_nan_range_stats { |
---|
| 10562 | + uint16 rng_ssn_estb; |
---|
| 10563 | + uint16 rng_ssn_fail; |
---|
| 10564 | + uint16 rng_sched_start; |
---|
| 10565 | + uint16 rng_sched_end; |
---|
| 10566 | + uint16 ftm_ssn_success; /* number of succesfull ftm sessions */ |
---|
| 10567 | + uint16 ftm_ssn_fail; |
---|
| 10568 | + uint16 num_meas; /* number of ftm frames */ |
---|
| 10569 | + uint16 num_valid_meas; /* number of ftm frames with valid timestamp */ |
---|
| 10570 | +} wl_nan_range_stats_t; |
---|
| 10571 | + |
---|
| 10572 | +/* defines for ndp stats flag */ |
---|
| 10573 | + |
---|
| 10574 | +#define NAN_NDP_STATS_FLAG_ROLE_MASK 0x01 |
---|
| 10575 | +#define NAN_NDP_STATS_FLAG_ROLE_INIT 0x00 |
---|
| 10576 | +#define NAN_NDP_STATS_FLAG_ROLE_RESP 0x01 |
---|
| 10577 | + |
---|
| 10578 | +#define NAN_NDP_STATS_STATE_BIT_SHIFT 1 |
---|
| 10579 | +#define NAN_NDP_STATS_FLAG_STATE_MASK 0x07 |
---|
| 10580 | +#define NAN_NDP_STATS_FLAG_STATE_IN_PROG 0x00 |
---|
| 10581 | +#define NAN_NDP_STATS_FLAG_STATE_ESTB 0x01 |
---|
| 10582 | +#define NAN_NDP_STATS_FLAG_STATE_TEARDOWN_WAIT 0x02 |
---|
| 10583 | +/* More states can be added here, when needed */ |
---|
| 10584 | + |
---|
| 10585 | +/* WL_NAN_XTLV_GEN_NDP_STATS */ |
---|
| 10586 | +typedef struct wl_nan_ndp_stats_s { |
---|
| 10587 | + uint8 ndp_id; |
---|
| 10588 | + uint8 indp_id; |
---|
| 10589 | + uint8 flags; |
---|
| 10590 | + uint8 nan_sec_csid; |
---|
| 10591 | + struct ether_addr lndi_addr; |
---|
| 10592 | + struct ether_addr pnmi_addr; |
---|
| 10593 | + struct ether_addr pndi_addr; |
---|
| 10594 | + uint8 PAD[2]; |
---|
| 10595 | +} wl_nan_ndp_stats_t; |
---|
| 10596 | + |
---|
| 10597 | +/* WL_NAN_XTLV_EV_SLOT_INFO */ |
---|
| 10598 | +typedef struct wl_nan_slot_info_s { |
---|
| 10599 | + /* dw slot start expected */ |
---|
| 10600 | + uint32 dwst_h; |
---|
| 10601 | + uint32 dwst_l; |
---|
| 10602 | + /* dw slot start actual */ |
---|
| 10603 | + uint32 act_dwst_h; |
---|
| 10604 | + uint32 act_dwst_l; |
---|
| 10605 | + uint16 cur_chan[MAX_NUM_D11CORES]; /* sdb channels */ |
---|
| 10606 | + uint16 dw_chan; /* dw channel */ |
---|
| 10607 | + uint8 dw_no; /* dw number */ |
---|
| 10608 | + uint8 slot_seq_no; /* slot seq no. */ |
---|
| 10609 | +} wl_nan_slot_info_t; |
---|
| 10610 | + |
---|
| 10611 | +/* WL_NAN_EVENT_MR_CHANGED */ |
---|
| 10612 | +typedef uint8 wl_nan_mr_changed_t; |
---|
| 10613 | +#define WL_NAN_AMR_CHANGED 1 |
---|
| 10614 | +#define WL_NAN_IMR_CHANGED 2 |
---|
| 10615 | + |
---|
| 10616 | +/** status - TBD BCME_ vs NAN status - range reserved for BCME_ */ |
---|
| 10617 | +enum { |
---|
| 10618 | + /* add new status here... */ |
---|
| 10619 | + WL_NAN_E_PEER_NOTAVAIL = -2131, |
---|
| 10620 | + WL_NAN_E_SCB_EXISTS = -2130, |
---|
| 10621 | + WL_NAN_E_INVALID_PEER_NDI = -2129, |
---|
| 10622 | + WL_NAN_E_INVALID_LOCAL_NDI = -2128, |
---|
| 10623 | + WL_NAN_E_ALREADY_EXISTS = -2127, /* generic NAN error for duplication */ |
---|
| 10624 | + WL_NAN_E_EXCEED_MAX_NUM_MAPS = -2126, |
---|
| 10625 | + WL_NAN_E_INVALID_DEV_CHAN_SCHED = -2125, |
---|
| 10626 | + WL_NAN_E_INVALID_PEER_BLOB_TYPE = -2124, |
---|
| 10627 | + WL_NAN_E_INVALID_LCL_BLOB_TYPE = -2123, |
---|
| 10628 | + WL_NAN_E_BCMC_PDPA = -2122, /* BCMC NAF PDPA */ |
---|
| 10629 | + WL_NAN_E_TIMEOUT = -2121, |
---|
| 10630 | + WL_NAN_E_HOST_CFG = -2120, |
---|
| 10631 | + WL_NAN_E_NO_ACK = -2119, |
---|
| 10632 | + WL_NAN_E_SECINST_FAIL = -2118, |
---|
| 10633 | + WL_NAN_E_REJECT_NDL = -2117, /* generic NDL rejection error */ |
---|
| 10634 | + WL_NAN_E_INVALID_NDP_ATTR = -2116, |
---|
| 10635 | + WL_NAN_E_HOST_REJECTED = -2115, |
---|
| 10636 | + WL_NAN_E_PCB_NORESOURCE = -2114, |
---|
| 10637 | + WL_NAN_E_NDC_EXISTS = -2113, |
---|
| 10638 | + WL_NAN_E_NO_NDC_ENTRY_AVAIL = -2112, |
---|
| 10639 | + WL_NAN_E_INVALID_NDC_ENTRY = -2111, |
---|
| 10640 | + WL_NAN_E_SD_TX_LIST_FULL = -2110, |
---|
| 10641 | + WL_NAN_E_SVC_SUB_LIST_FULL = -2109, |
---|
| 10642 | + WL_NAN_E_SVC_PUB_LIST_FULL = -2108, |
---|
| 10643 | + WL_NAN_E_SDF_MAX_LEN_EXCEEDED = -2107, |
---|
| 10644 | + WL_NAN_E_ZERO_CRB = -2106, /* no CRB between local and peer */ |
---|
| 10645 | + WL_NAN_E_PEER_NDC_NOT_SELECTED = -2105, /* peer ndc not selected */ |
---|
| 10646 | + WL_NAN_E_DAM_CHAN_CONFLICT = -2104, /* dam schedule channel conflict */ |
---|
| 10647 | + WL_NAN_E_DAM_SCHED_PERIOD = -2103, /* dam schedule period mismatch */ |
---|
| 10648 | + WL_NAN_E_LCL_NDC_NOT_SELECTED = -2102, /* local selected ndc not configured */ |
---|
| 10649 | + WL_NAN_E_NDL_QOS_INVALID_NA = -2101, /* na doesn't comply with ndl qos */ |
---|
| 10650 | + WL_NAN_E_CLEAR_NAF_WITH_SA_AS_RNDI = -2100, /* rx clear naf with peer rndi */ |
---|
| 10651 | + WL_NAN_E_SEC_CLEAR_PKT = -2099, /* rx clear pkt from a peer with sec_sa */ |
---|
| 10652 | + WL_NAN_E_PROT_NON_PDPA_NAF = -2098, /* rx protected non PDPA frame */ |
---|
| 10653 | + WL_NAN_E_DAM_DOUBLE_REMOVE = -2097, /* remove peer schedule already removed */ |
---|
| 10654 | + WL_NAN_E_DAM_DOUBLE_MERGE = -2096, /* merge peer schedule already merged */ |
---|
| 10655 | + WL_NAN_E_DAM_REJECT_INVALID = -2095, /* reject for invalid schedule */ |
---|
| 10656 | + WL_NAN_E_DAM_REJECT_RANGE = -2094, |
---|
| 10657 | + WL_NAN_E_DAM_REJECT_QOS = -2093, |
---|
| 10658 | + WL_NAN_E_DAM_REJECT_NDC = -2092, |
---|
| 10659 | + WL_NAN_E_DAM_REJECT_PEER_IMMUT = -2091, |
---|
| 10660 | + WL_NAN_E_DAM_REJECT_LCL_IMMUT = -2090, |
---|
| 10661 | + WL_NAN_E_DAM_EXCEED_NUM_SCHED = -2089, |
---|
| 10662 | + WL_NAN_E_DAM_INVALID_SCHED_MAP = -2088, /* invalid schedule map list */ |
---|
| 10663 | + WL_NAN_E_DAM_INVALID_LCL_SCHED = -2087, |
---|
| 10664 | + WL_NAN_E_INVALID_MAP_ID = -2086, |
---|
| 10665 | + WL_NAN_E_CHAN_OVERLAP_ACROSS_MAP = -2085, |
---|
| 10666 | + WL_NAN_E_INVALID_CHAN_LIST = -2084, |
---|
| 10667 | + WL_NAN_E_INVALID_RANGE_TBMP = -2083, |
---|
| 10668 | + WL_NAN_E_INVALID_IMMUT_SCHED = -2082, |
---|
| 10669 | + WL_NAN_E_INVALID_NDC_ATTR = -2081, |
---|
| 10670 | + WL_NAN_E_INVALID_TIME_BITMAP = -2080, |
---|
| 10671 | + WL_NAN_E_INVALID_NA_ATTR = -2079, |
---|
| 10672 | + WL_NAN_E_NO_NA_ATTR_IN_AVAIL_MAP = -2078, /* no na attr saved in avail map */ |
---|
| 10673 | + WL_NAN_E_INVALID_MAP_IDX = -2077, |
---|
| 10674 | + WL_NAN_E_SEC_SA_NOTFOUND = -2076, |
---|
| 10675 | + WL_NAN_E_BSSCFG_NOTFOUND = -2075, |
---|
| 10676 | + WL_NAN_E_SCB_NOTFOUND = -2074, |
---|
| 10677 | + WL_NAN_E_NCS_SK_KDESC_TYPE = -2073, |
---|
| 10678 | + WL_NAN_E_NCS_SK_KEY_DESC_VER = -2072, /* key descr ver */ |
---|
| 10679 | + WL_NAN_E_NCS_SK_KEY_TYPE = -2071, /* key descr type */ |
---|
| 10680 | + WL_NAN_E_NCS_SK_KEYINFO_FAIL = -2070, /* key info (generic) */ |
---|
| 10681 | + WL_NAN_E_NCS_SK_KEY_LEN = -2069, /* key len */ |
---|
| 10682 | + WL_NAN_E_NCS_SK_KDESC_NOT_FOUND = -2068, /* key desc not found */ |
---|
| 10683 | + WL_NAN_E_NCS_SK_INVALID_PARAMS = -2067, /* invalid args */ |
---|
| 10684 | + WL_NAN_E_NCS_SK_KDESC_INVALID = -2066, /* key descr is not valid */ |
---|
| 10685 | + WL_NAN_E_NCS_SK_NONCE_MISMATCH = -2065, |
---|
| 10686 | + WL_NAN_E_NCS_SK_KDATA_SAVE_FAIL = -2064, /* not able to save key data */ |
---|
| 10687 | + WL_NAN_E_NCS_SK_AUTH_TOKEN_CALC_FAIL = -2063, |
---|
| 10688 | + WL_NAN_E_NCS_SK_PTK_CALC_FAIL = -2062, |
---|
| 10689 | + WL_NAN_E_INVALID_STARTOFFSET = -2061, |
---|
| 10690 | + WL_NAN_E_BAD_NA_ENTRY_TYPE = -2060, |
---|
| 10691 | + WL_NAN_E_INVALID_CHANBMP = -2059, |
---|
| 10692 | + WL_NAN_E_INVALID_OP_CLASS = -2058, |
---|
| 10693 | + WL_NAN_E_NO_IES = -2057, |
---|
| 10694 | + WL_NAN_E_NO_PEER_ENTRY_AVAIL = -2056, |
---|
| 10695 | + WL_NAN_E_INVALID_PEER = -2055, |
---|
| 10696 | + WL_NAN_E_PEER_EXISTS = -2054, |
---|
| 10697 | + WL_NAN_E_PEER_NOTFOUND = -2053, |
---|
| 10698 | + WL_NAN_E_NO_MEM = -2052, |
---|
| 10699 | + WL_NAN_E_INVALID_OPTION = -2051, |
---|
| 10700 | + WL_NAN_E_INVALID_BAND = -2050, |
---|
| 10701 | + WL_NAN_E_INVALID_MAC = -2049, |
---|
| 10702 | + WL_NAN_E_BAD_INSTANCE = -2048, |
---|
| 10703 | + /* NAN status code reserved from -2048 to -3071 */ |
---|
| 10704 | + WL_NAN_E_ERROR = -1, |
---|
| 10705 | + WL_NAN_E_OK = 0 |
---|
| 10706 | +}; |
---|
| 10707 | + |
---|
| 10708 | +/* Error codes used in vendor specific attribute in Data Path Termination frames */ |
---|
| 10709 | +enum { |
---|
| 10710 | + WL_NAN_DPEND_E_OK = 0, |
---|
| 10711 | + WL_NAN_DPEND_E_ERROR = 1, |
---|
| 10712 | + WL_NAN_DPEND_E_HOST_CMD = 2, |
---|
| 10713 | + WL_NAN_DPEND_E_HOST_REJECTED = 3, /* host rejected rx frame */ |
---|
| 10714 | + WL_NAN_DPEND_E_RESOURCE_LIMIT = 4, |
---|
| 10715 | + WL_NAN_DPEND_E_NO_ACK_RCV = 5, |
---|
| 10716 | + WL_NAN_DPEND_E_TIMEOUT = 6, |
---|
| 10717 | + WL_NAN_DPEND_E_NO_ELT = 7, /* rx frame missing element container */ |
---|
| 10718 | + WL_NAN_DPEND_E_NO_NDP_ATTR = 8, |
---|
| 10719 | + WL_NAN_DPEND_E_NO_AVAIL_ATTR = 9, |
---|
| 10720 | + WL_NAN_DPEND_E_NO_NDC_ATTR = 10, |
---|
| 10721 | + WL_NAN_DPEND_E_NO_RANGE_BM = 11, |
---|
| 10722 | + WL_NAN_DPEND_E_INVALID_NDP_ATTR = 12, |
---|
| 10723 | + WL_NAN_DPEND_E_INVALID_NDC_ATTR = 13, |
---|
| 10724 | + WL_NAN_DPEND_E_INVALID_IMMUT = 14, |
---|
| 10725 | + WL_NAN_DPEND_E_INVALID_NDL_QOS = 15, |
---|
| 10726 | + WL_NAN_DPEND_E_INVALID_SEC_PARAMS = 16, |
---|
| 10727 | + WL_NAN_DPEND_E_REJECT_AVAIL = 17, |
---|
| 10728 | + WL_NAN_DPEND_E_REJECT_NDL = 18 |
---|
| 10729 | +}; |
---|
| 10730 | + |
---|
| 10731 | +typedef int32 wl_nan_status_t; |
---|
| 10732 | + |
---|
| 10733 | +/** nan cmd list entry */ |
---|
| 10734 | +enum wl_nan_sub_cmd_input_flags { |
---|
| 10735 | + WL_NAN_SUB_CMD_FLAG_NONE = 0, |
---|
| 10736 | + WL_NAN_SUB_CMD_FLAG_SKIP = 1, /* Skip to next sub-command on error */ |
---|
| 10737 | + WL_NAN_SUB_CMD_FLAG_TERMINATE = 2, /* Terminate processing and return */ |
---|
| 10738 | + WL_NAN_SUB_CMD_FLAG_LAST /* Keep this at the end */ |
---|
| 10739 | +}; |
---|
| 10740 | + |
---|
| 10741 | +/** container for nan events */ |
---|
| 10742 | +typedef struct wl_nan_ioc { |
---|
| 10743 | + uint16 version; /**< interface command or event version */ |
---|
| 10744 | + uint16 id; /**< nan ioctl cmd ID */ |
---|
| 10745 | + uint16 len; /**< total length of all tlv records in data[] */ |
---|
| 10746 | + uint16 pad; /**< pad to be 32 bit aligment */ |
---|
| 10747 | + uint8 data []; /**< var len payload of bcm_xtlv_t type */ |
---|
| 10748 | +} wl_nan_ioc_t; |
---|
| 10749 | + |
---|
| 10750 | +/* |
---|
| 10751 | + * NAN sub-command data structures |
---|
| 10752 | + */ |
---|
| 10753 | + |
---|
| 10754 | +/* |
---|
| 10755 | + * Config component WL_NAN_CMD_CFG_XXXX sub-commands |
---|
| 10756 | + * WL_NAN_CMD_CFG_ENABLE |
---|
| 10757 | + */ |
---|
| 10758 | +enum wl_nan_config_state { |
---|
| 10759 | + WL_NAN_CONFIG_STATE_DISABLE = 0, |
---|
| 10760 | + WL_NAN_CONFIG_STATE_ENABLE = 1 |
---|
| 10761 | +}; |
---|
| 10762 | + |
---|
| 10763 | +typedef int8 wl_nan_config_state_t; |
---|
| 10764 | + |
---|
| 10765 | +/* WL_NAN_CMD_CFG_NAN_INIT */ |
---|
| 10766 | + |
---|
| 10767 | +typedef uint8 wl_nan_init_t; |
---|
| 10768 | + |
---|
| 10769 | +/* WL_NAN_CMD_CFG_NAN_VERSION */ |
---|
| 10770 | +typedef uint16 wl_nan_ver_t; |
---|
| 10771 | + |
---|
| 10772 | +/* WL_NAN_CMD_CFG_NAN_CONFIG */ |
---|
| 10773 | +typedef uint32 wl_nan_cfg_ctrl_t; |
---|
| 10774 | + |
---|
| 10775 | +/* WL_NAN_CMD_CFG_NAN_CONFIG2 */ |
---|
| 10776 | +typedef struct wl_nan_cfg_ctrl2 { |
---|
| 10777 | + uint32 flags1; /* wl_nan_cfg_ctrl2_flags1 */ |
---|
| 10778 | + uint32 flags2; /* wl_nan_cfg_ctrl2_flags2 */ |
---|
| 10779 | +} wl_nan_cfg_ctrl2_t; |
---|
| 10780 | + |
---|
| 10781 | +enum wl_nan_cfg_ctrl2_flags1 { |
---|
| 10782 | + /* Allows unicast SDF TX while local device is under NDP/NDL negotiation, |
---|
| 10783 | + * but Not with the peer SDF destined to. |
---|
| 10784 | + */ |
---|
| 10785 | + WL_NAN_CTRL2_FLAG1_ALLOW_SDF_TX_UCAST_IN_PROG = 0x00000001, |
---|
| 10786 | + /* Allows broadcast SDF TX while local device is under NDP/NDL negotiation */ |
---|
| 10787 | + WL_NAN_CTRL2_FLAG1_ALLOW_SDF_TX_BCAST_IN_PROG = 0x00000002, |
---|
| 10788 | + /* Allows the device to send schedule update automatically on local schedule change */ |
---|
| 10789 | + WL_NAN_CTRL2_FLAG1_AUTO_SCHEDUPD = 0x00000004, |
---|
| 10790 | + /* Allows the device to handle slot pre_close operations */ |
---|
| 10791 | + WL_NAN_CTRL2_FLAG1_SLOT_PRE_CLOSE = 0x00000008 |
---|
| 10792 | +}; |
---|
| 10793 | +#define WL_NAN_CTRL2_FLAGS1_MASK 0x0000000F |
---|
| 10794 | + |
---|
| 10795 | +#define WL_NAN_CTRL2_FLAGS2_MASK 0x00000000 |
---|
| 10796 | + |
---|
| 10797 | +/* |
---|
| 10798 | + * WL_NAN_CMD_CFG_BAND, WL_NAN_CMD_CFG_RSSI_THRESHOLD(Get only) |
---|
| 10799 | + */ |
---|
| 10800 | +typedef uint8 wl_nan_band_t; |
---|
| 10801 | + |
---|
| 10802 | +/* |
---|
| 10803 | + * WL_NAN_CMD_CFG_ROLE |
---|
| 10804 | + */ |
---|
6340 | 10805 | enum wl_nan_role { |
---|
6341 | 10806 | WL_NAN_ROLE_AUTO = 0, |
---|
6342 | 10807 | WL_NAN_ROLE_NON_MASTER_NON_SYNC = 1, |
---|
.. | .. |
---|
6344 | 10809 | WL_NAN_ROLE_MASTER = 3, |
---|
6345 | 10810 | WL_NAN_ROLE_ANCHOR_MASTER = 4 |
---|
6346 | 10811 | }; |
---|
6347 | | -#define NAN_MASTER_RANK_LEN 8 |
---|
| 10812 | + |
---|
| 10813 | +typedef uint8 wl_nan_role_t; |
---|
| 10814 | + |
---|
| 10815 | +typedef struct wl_nan_device_state |
---|
| 10816 | +{ |
---|
| 10817 | + wl_nan_role_t role; /* Sync Master, Non-Sync Master */ |
---|
| 10818 | + uint8 state; /* TBD */ |
---|
| 10819 | + uint8 hopcount; /* Hops to the Anchor Master */ |
---|
| 10820 | + struct ether_addr immediate_master; /* Master MAC */ |
---|
| 10821 | + struct ether_addr anchor_master; /* Anchor Master MAC */ |
---|
| 10822 | + struct ether_addr cluster_id; /* Cluster ID to which this device belongs to */ |
---|
| 10823 | + uint8 PAD[3]; |
---|
| 10824 | + uint32 tsf_high; /* NAN Cluster TSFs */ |
---|
| 10825 | + uint32 tsf_low; |
---|
| 10826 | +} wl_nan_device_state_t; |
---|
| 10827 | + |
---|
| 10828 | +/* |
---|
| 10829 | + * WL_NAN_CMD_CFG_HOP_CNT, WL_NAN_CMD_CFG_HOP_LIMIT |
---|
| 10830 | + */ |
---|
| 10831 | +typedef uint8 wl_nan_hop_count_t; |
---|
| 10832 | + |
---|
| 10833 | +/* |
---|
| 10834 | + * WL_NAN_CMD_CFG_WARMUP_TIME |
---|
| 10835 | + */ |
---|
| 10836 | +typedef uint32 wl_nan_warmup_time_ticks_t; |
---|
| 10837 | + |
---|
| 10838 | +/* |
---|
| 10839 | + * WL_NAN_CMD_CFG_RSSI_THRESHOLD |
---|
| 10840 | + * rssi_close and rssi_mid are used to transition master to non-master |
---|
| 10841 | + * role by NAN state machine. rssi thresholds corresponding to the band |
---|
| 10842 | + * will be updated. |
---|
| 10843 | + */ |
---|
| 10844 | +/* To be deprecated */ |
---|
| 10845 | +typedef struct wl_nan_rssi_threshold { |
---|
| 10846 | + wl_nan_band_t band; |
---|
| 10847 | + int8 rssi_close; |
---|
| 10848 | + int8 rssi_mid; |
---|
| 10849 | + uint8 pad; |
---|
| 10850 | +} wl_nan_rssi_threshold_t; |
---|
| 10851 | + |
---|
| 10852 | +/* WL_NAN_CMD_ELECTION_RSSI_THRESHOLD */ |
---|
| 10853 | + |
---|
| 10854 | +typedef struct wl_nan_rssi_thld { |
---|
| 10855 | + int8 rssi_close_2g; |
---|
| 10856 | + int8 rssi_mid_2g; |
---|
| 10857 | + int8 rssi_close_5g; |
---|
| 10858 | + int8 rssi_mid_5g; |
---|
| 10859 | +} wl_nan_rssi_thld_t; |
---|
| 10860 | + |
---|
| 10861 | +/* WL_NAN_CMD_DATA_MAX_PEERS */ |
---|
| 10862 | + |
---|
| 10863 | +typedef uint8 wl_nan_max_peers_t; |
---|
| 10864 | + |
---|
| 10865 | +/* |
---|
| 10866 | + * WL_NAN_CMD_CFG_STATUS |
---|
| 10867 | + */ |
---|
| 10868 | + |
---|
| 10869 | +typedef enum wl_nan_election_mode { |
---|
| 10870 | + WL_NAN_ELECTION_RUN_BY_HOST = 1, |
---|
| 10871 | + WL_NAN_ELECTION_RUN_BY_FW = 2 |
---|
| 10872 | +} wl_nan_election_mode_t; |
---|
| 10873 | + |
---|
| 10874 | +typedef struct wl_nan_conf_status { |
---|
| 10875 | + struct ether_addr nmi; /* NAN mgmt interface address */ |
---|
| 10876 | + uint8 enabled; /* NAN is enabled */ |
---|
| 10877 | + uint8 role; /* Current nan sync role */ |
---|
| 10878 | + struct ether_addr cid; /* Current Cluster id */ |
---|
| 10879 | + uint8 social_chans[2]; /* Social channels */ |
---|
| 10880 | + uint8 mr[8]; /* Self Master Rank */ |
---|
| 10881 | + uint8 amr[8]; /* Anchor Master Rank */ |
---|
| 10882 | + uint32 ambtt; /* Anchor master beacon target time */ |
---|
| 10883 | + uint32 cluster_tsf_h; /* Current Cluster TSF High */ |
---|
| 10884 | + uint32 cluster_tsf_l; /* Current Cluster TSF Low */ |
---|
| 10885 | + uint8 election_mode; /* Election mode, host or firmware */ |
---|
| 10886 | + uint8 hop_count; /* Current Hop count */ |
---|
| 10887 | + uint8 imr[8]; /* Immediate Master Rank */ |
---|
| 10888 | + uint8 pad[4]; |
---|
| 10889 | + uint16 opt_tlvs_len; |
---|
| 10890 | + uint8 opt_tlvs[]; |
---|
| 10891 | +} wl_nan_conf_status_t; |
---|
| 10892 | + |
---|
| 10893 | +/* |
---|
| 10894 | + * WL_NAN_CMD_CFG_OUI |
---|
| 10895 | + */ |
---|
| 10896 | +typedef struct wl_nan_oui_type { |
---|
| 10897 | + uint8 nan_oui[DOT11_OUI_LEN]; |
---|
| 10898 | + uint8 type; |
---|
| 10899 | +} wl_nan_oui_type_t; |
---|
| 10900 | + |
---|
| 10901 | +/* |
---|
| 10902 | + * WL_NAN_CMD_CFG_COUNT |
---|
| 10903 | + */ |
---|
| 10904 | +typedef struct wl_nan_count { |
---|
| 10905 | + uint32 cnt_bcn_tx; /**< TX disc/sync beacon count */ |
---|
| 10906 | + uint32 cnt_bcn_rx; /**< RX disc/sync beacon count */ |
---|
| 10907 | + uint32 cnt_svc_disc_tx; /**< TX svc disc frame count */ |
---|
| 10908 | + uint32 cnt_svc_disc_rx; /**< RX svc disc frame count */ |
---|
| 10909 | +} wl_nan_count_t; |
---|
| 10910 | +/* |
---|
| 10911 | + * Election component WL_NAN_CMD_ELECTION_XXXX sub-commands |
---|
| 10912 | + * WL_NAN_CMD_ELECTION_HOST_ENABLE |
---|
| 10913 | + */ |
---|
| 10914 | +enum wl_nan_enable_flags { |
---|
| 10915 | + WL_NAN_DISABLE_FLAG_HOST_ELECTION = 0, |
---|
| 10916 | + WL_NAN_ENABLE_FLAG_HOST_ELECTION = 1 |
---|
| 10917 | +}; |
---|
| 10918 | + |
---|
| 10919 | +/* |
---|
| 10920 | + * 0 - disable host based election |
---|
| 10921 | + * 1 - enable host based election |
---|
| 10922 | + */ |
---|
| 10923 | +typedef uint8 wl_nan_host_enable_t; |
---|
| 10924 | + |
---|
| 10925 | +/* |
---|
| 10926 | + * WL_NAN_CMD_ELECTION_METRICS_CONFIG |
---|
| 10927 | + */ |
---|
| 10928 | +/* Set only */ |
---|
| 10929 | +typedef struct wl_nan_election_metric_config { |
---|
| 10930 | + uint8 random_factor; /* Configured random factor */ |
---|
| 10931 | + uint8 master_pref; /* configured master preference */ |
---|
| 10932 | + uint8 pad[2]; |
---|
| 10933 | +} wl_nan_election_metric_config_t; |
---|
| 10934 | + |
---|
| 10935 | +/* |
---|
| 10936 | + * WL_NAN_CMD_ELECTION_METRICS_STATE |
---|
| 10937 | + */ |
---|
| 10938 | +/* Get only */ |
---|
| 10939 | +typedef struct wl_nan_election_metric_state { |
---|
| 10940 | + uint8 random_factor; /* random factor used in MIs */ |
---|
| 10941 | + uint8 master_pref; /* Master advertised in MIs */ |
---|
| 10942 | + uint8 pad[2]; |
---|
| 10943 | +} wl_nan_election_metric_state_t; |
---|
| 10944 | + |
---|
| 10945 | +/* |
---|
| 10946 | + * WL_NAN_CMD_ELECTION_LEAVE |
---|
| 10947 | + * WL_NAN_CMD_ELECTION_STOP |
---|
| 10948 | + */ |
---|
| 10949 | +typedef struct ether_addr wl_nan_cluster_id_t; |
---|
| 10950 | + |
---|
| 10951 | +/* |
---|
| 10952 | + * WL_NAN_CMD_ELECTION_MERGE |
---|
| 10953 | + * 0 - disable cluster merge |
---|
| 10954 | + * 1 - enable cluster merge |
---|
| 10955 | + */ |
---|
| 10956 | +typedef uint8 wl_nan_merge_enable_t; |
---|
| 10957 | + |
---|
| 10958 | +/* |
---|
| 10959 | + * WL_NAN_CMD_CFG_ROLE |
---|
| 10960 | + * role = 0 means configuration by firmware(obsolete); otherwise by host |
---|
| 10961 | + * when host configures role, also need target master address to sync to |
---|
| 10962 | + */ |
---|
| 10963 | +#define NAN_SYNC_MASTER_SELF 1 |
---|
| 10964 | +#define NAN_SYNC_MASTER_USE_TIMING 2 /* Use the tsf timing provided */ |
---|
| 10965 | +#define NAN_SYNC_MASTER_AMREC_UPD 4 /* provide AM record update */ |
---|
| 10966 | + |
---|
| 10967 | +/* |
---|
| 10968 | + struct ether_addr addr: |
---|
| 10969 | + when NAN_SYNC_MASTER_USE_TIMING is set, addr is the mac of Rx NAN beacon |
---|
| 10970 | + providing the timing info |
---|
| 10971 | + ltsf_h, ltsf_l: |
---|
| 10972 | + The local TSF timestamp filled in by FW in the WL_NAN_EVENT_BCN_RX event; |
---|
| 10973 | + rtsf_h, rtsf_l: |
---|
| 10974 | + The timestamp in the Rx beacon frame, filled in by host |
---|
| 10975 | + uint32 ambtt: |
---|
| 10976 | + the amtt in the cluster ID attribute in the Rx beacon frame |
---|
| 10977 | +*/ |
---|
| 10978 | + |
---|
| 10979 | +typedef struct nan_sync_master { |
---|
| 10980 | + uint8 flag; /* 1: self; 2: use TSF timing; 4: AMR update */ |
---|
| 10981 | + uint8 hop_count; |
---|
| 10982 | + struct ether_addr addr; |
---|
| 10983 | + struct ether_addr cluster_id; |
---|
| 10984 | + chanspec_t channel; /* bcn reception channel */ |
---|
| 10985 | + uint32 ltsf_h; |
---|
| 10986 | + uint32 ltsf_l; |
---|
| 10987 | + uint32 rtsf_h; |
---|
| 10988 | + uint32 rtsf_l; |
---|
| 10989 | + uint8 amr[WL_NAN_MASTER_RANK_LEN]; |
---|
| 10990 | + uint32 ambtt; |
---|
| 10991 | +} nan_sync_master_t; |
---|
| 10992 | + |
---|
| 10993 | +/* |
---|
| 10994 | +* NAN Sync TLV(NSTLV): |
---|
| 10995 | +* To keep NAN/AWDL concurrency time sync. |
---|
| 10996 | +* It is generated at hybrid device, and propogated by AWDL only device. |
---|
| 10997 | +* It contains the information needed to run NAN election |
---|
| 10998 | +*/ |
---|
| 10999 | +#include <packed_section_start.h> |
---|
| 11000 | +typedef BWL_PRE_PACKED_STRUCT struct awdl_nan_sync_tlv { |
---|
| 11001 | + uint16 hop_count; /* total hop_count */ |
---|
| 11002 | + struct ether_addr src_addr; /* macaddr of the hybrid originator of nstlv */ |
---|
| 11003 | + struct ether_addr cluster_id; /* NAN cluster ID of hybrid originator of nstlv */ |
---|
| 11004 | + uint32 nan_tsf_h; /* NAN cluster TSF of the hybrid originator of nstlv */ |
---|
| 11005 | + uint32 nan_tsf_l; |
---|
| 11006 | + uint8 master_preference; |
---|
| 11007 | + uint8 random_factor; |
---|
| 11008 | + uint8 amr[WL_NAN_MASTER_RANK_LEN]; |
---|
| 11009 | + uint8 orig_hop_count; /* hop_count of the origin hybrid NAN device */ |
---|
| 11010 | + uint32 ambtt; /* Anchor Master Beacon Transmission Time */ |
---|
| 11011 | + uint8 opt_xtlv_len; /* xtlv len */ |
---|
| 11012 | +} BWL_POST_PACKED_STRUCT awdl_nan_sync_tlv_t; |
---|
| 11013 | + |
---|
| 11014 | +typedef BWL_PRE_PACKED_STRUCT struct wl_awdl_nan_sync_tlv { |
---|
| 11015 | + uint8 type; /* 23 for NTLV */ |
---|
| 11016 | + uint16 param_len; |
---|
| 11017 | + awdl_nan_sync_tlv_t ntlv; |
---|
| 11018 | +} BWL_POST_PACKED_STRUCT wl_awdl_nan_sync_tlv_t; |
---|
| 11019 | +#include <packed_section_end.h> |
---|
| 11020 | + |
---|
| 11021 | +/* NAN advertiser structure */ |
---|
| 11022 | +/* TODO RSDB: add chspec to indicates core corresponds correct core */ |
---|
| 11023 | +typedef struct nan_adv_entry { |
---|
| 11024 | + uint8 age; /* used to remove stale entries */ |
---|
| 11025 | + uint8 hop_count; /* for NTLV support, use bit7 for virtual NAN peer */ |
---|
| 11026 | + struct ether_addr addr; |
---|
| 11027 | + struct ether_addr cluster_id; |
---|
| 11028 | + chanspec_t channel; /* bcn reception channel */ |
---|
| 11029 | + uint32 ltsf_h; |
---|
| 11030 | + uint32 ltsf_l; |
---|
| 11031 | + uint32 rtsf_h; |
---|
| 11032 | + uint32 rtsf_l; |
---|
| 11033 | + uint8 amr[WL_NAN_MASTER_RANK_LEN]; |
---|
| 11034 | + uint32 ambtt; |
---|
| 11035 | + int8 rssi[NAN_MAX_BANDS]; /* rssi last af was received at */ |
---|
| 11036 | + int8 last_rssi[NAN_MAX_BANDS]; /* rssi in the last AF */ |
---|
| 11037 | +} nan_adv_entry_t; |
---|
| 11038 | +#define NAN_VIRTUAL_PEER_BIT 0x80 |
---|
| 11039 | + |
---|
| 11040 | +typedef enum { |
---|
| 11041 | + NAC_CNT_NTLV_AF_TX = 0, /* count of AWDL AF containing NTLV tx */ |
---|
| 11042 | + NAC_CNT_NTLV_AF_RX, /* count of AWDL AF containing NTLV rx */ |
---|
| 11043 | + NAC_CNT_NTLV_TMERR_TX, /* count of NTLV tx timing error */ |
---|
| 11044 | + NAC_CNT_NTLV_TMERR_RX, /* count of NTLV rx timing error */ |
---|
| 11045 | + NAC_CNT_NTLV_TM_MISMATCH, /* count of TopMaster mismatch in Rx NTLV processing */ |
---|
| 11046 | + NAC_CNT_NTLV_ADV_EXISTED, /* count of NTLV ignored bc advertiser existed from bcn */ |
---|
| 11047 | + NAC_CNT_NTLV_STALED_BCN, /* count of staled bcn from NTLV info */ |
---|
| 11048 | + NAC_CNT_NTLV_MERGE, /* count of NTLV used for NAN cluster merge */ |
---|
| 11049 | + NAC_CNT_NTLV_ELECTION_DROP, /* count of NTLV dropped in NAN election */ |
---|
| 11050 | + NAC_CNT_NTLV_TSF_ADOPT, /* count of NTLV used for NAN TSF adoption */ |
---|
| 11051 | + NAC_CNT_NTLV_LAST |
---|
| 11052 | +} nac_cnt_enum_t; |
---|
| 11053 | + |
---|
| 11054 | +#define NAC_MAX_CNT (NAC_CNT_NTLV_LAST) |
---|
| 11055 | + |
---|
| 11056 | +typedef struct nac_stats { |
---|
| 11057 | + uint32 nac_cnt[NAC_MAX_CNT]; |
---|
| 11058 | +} nac_stats_t; |
---|
| 11059 | + |
---|
| 11060 | +typedef struct nan_adv_table { |
---|
| 11061 | + uint8 num_adv; |
---|
| 11062 | + uint8 adv_size; |
---|
| 11063 | + uint8 pad[2]; |
---|
| 11064 | + nan_adv_entry_t adv_nodes[0]; |
---|
| 11065 | +} nan_adv_table_t; |
---|
| 11066 | + |
---|
| 11067 | +typedef struct wl_nan_role_cfg { |
---|
| 11068 | + wl_nan_role_t cfg_role; |
---|
| 11069 | + wl_nan_role_t cur_role; |
---|
| 11070 | + uint8 pad[2]; |
---|
| 11071 | + nan_sync_master_t target_master; |
---|
| 11072 | +} wl_nan_role_cfg_t; |
---|
| 11073 | + |
---|
| 11074 | +typedef int8 wl_nan_sd_optional_field_types_t; |
---|
| 11075 | + |
---|
| 11076 | +/* Flag bits for Publish and Subscribe (wl_nan_sd_params_t flags) */ |
---|
| 11077 | + |
---|
| 11078 | +/* First 8 bits are blocked for mapping |
---|
| 11079 | + * against svc_control flag bits which goes out |
---|
| 11080 | + * as part of SDA attribute in air in SDF frames |
---|
| 11081 | + */ |
---|
| 11082 | +#define WL_NAN_RANGE_LIMITED 0x0040 |
---|
| 11083 | + |
---|
| 11084 | +/* Event generation indicator (default is continuous) */ |
---|
| 11085 | + |
---|
| 11086 | +#define WL_NAN_MATCH_ONCE 0x100000 |
---|
| 11087 | +#define WL_NAN_MATCH_NEVER 0x200000 |
---|
| 11088 | + |
---|
| 11089 | +/* Bits specific to Publish */ |
---|
| 11090 | + |
---|
| 11091 | +#define WL_NAN_PUB_UNSOLICIT 0x1000 /* Unsolicited Tx */ |
---|
| 11092 | +#define WL_NAN_PUB_SOLICIT 0x2000 /* Solicited Tx */ |
---|
| 11093 | +#define WL_NAN_PUB_BOTH 0x3000 /* Both the above */ |
---|
| 11094 | + |
---|
| 11095 | +#define WL_NAN_PUB_BCAST 0x4000 /* bcast solicited Tx only */ |
---|
| 11096 | +#define WL_NAN_PUB_EVENT 0x8000 /* Event on each solicited Tx */ |
---|
| 11097 | +#define WL_NAN_PUB_SOLICIT_PENDING 0x10000 /* Used for one-time solicited Publish */ |
---|
| 11098 | + |
---|
| 11099 | +#define WL_NAN_FOLLOWUP 0x20000 /* Follow-up frames */ |
---|
| 11100 | +#define WL_NAN_TX_FOLLOWUP 0x40000 /* host generated transmit Follow-up frames */ |
---|
| 11101 | + |
---|
| 11102 | +/* Bits specific to Subscribe */ |
---|
| 11103 | + |
---|
| 11104 | +#define WL_NAN_SUB_ACTIVE 0x1000 /* Active subscribe mode */ |
---|
| 11105 | +#define WL_NAN_SUB_MATCH_IF_SVC_INFO 0x2000 /* Service info in publish */ |
---|
| 11106 | + |
---|
| 11107 | +#define WL_NAN_TTL_UNTIL_CANCEL 0xFFFFFFFF /* Special values for time to live (ttl) parameter */ |
---|
| 11108 | + |
---|
| 11109 | +/* |
---|
| 11110 | + * Publish - runs until first transmission |
---|
| 11111 | + * Subscribe - runs until first DiscoveryResult event |
---|
| 11112 | + */ |
---|
| 11113 | +#define WL_NAN_TTL_FIRST 0 |
---|
| 11114 | + |
---|
| 11115 | +/* Nan Service Based control Flags */ |
---|
| 11116 | + |
---|
| 11117 | +/* If set, dev will take care of dp_resp */ |
---|
| 11118 | +#define WL_NAN_SVC_CTRL_AUTO_DPRESP 0x1000000 |
---|
| 11119 | + |
---|
| 11120 | +/* If set, host wont rec event "receive" */ |
---|
| 11121 | +#define WL_NAN_SVC_CTRL_SUPPRESS_EVT_RECEIVE 0x2000000 |
---|
| 11122 | + |
---|
| 11123 | +/* If set, host wont rec event "replied" */ |
---|
| 11124 | +#define WL_NAN_SVC_CTRL_SUPPRESS_EVT_REPLIED 0x4000000 |
---|
| 11125 | + |
---|
| 11126 | +/* If set, host wont rec event "terminated" */ |
---|
| 11127 | +#define WL_NAN_SVC_CTRL_SUPPRESS_EVT_TERMINATED 0x8000000 |
---|
| 11128 | + |
---|
| 11129 | +/* |
---|
| 11130 | + * WL_NAN_CMD_SD_PARAMS |
---|
| 11131 | + */ |
---|
| 11132 | +typedef struct wl_nan_sd_params |
---|
| 11133 | +{ |
---|
| 11134 | + uint16 length; /* length including options */ |
---|
| 11135 | + uint8 period; /* period of the unsolicited SDF xmission in DWs */ |
---|
| 11136 | + uint8 awake_dw; /* interval between two DWs where SDF tx/rx are done */ |
---|
| 11137 | + uint8 svc_hash[WL_NAN_SVC_HASH_LEN]; /* Hash for the service name */ |
---|
| 11138 | + uint8 instance_id; /* Instance of the current service */ |
---|
| 11139 | + int8 proximity_rssi; /* RSSI limit to Rx subscribe or pub SDF 0 no effect */ |
---|
| 11140 | + uint32 flags; /* bitmap representing aforesaid optional flags */ |
---|
| 11141 | + int32 ttl; /* TTL for this instance id, -1 will run till cancelled */ |
---|
| 11142 | + tlv_t optional[1]; /* optional fields in the SDF as appropriate */ |
---|
| 11143 | +} wl_nan_sd_params_t; |
---|
| 11144 | + |
---|
| 11145 | +/* |
---|
| 11146 | + * WL_NAN_CMD_SD_PUBLISH_LIST |
---|
| 11147 | + * WL_NAN_CMD_SD_SUBSCRIBE_LIST |
---|
| 11148 | + */ |
---|
| 11149 | +typedef struct wl_nan_service_info |
---|
| 11150 | +{ |
---|
| 11151 | + uint8 instance_id; /* Publish instance ID */ |
---|
| 11152 | + uint8 service_hash[WL_NAN_SVC_HASH_LEN]; /* Hash for service name */ |
---|
| 11153 | +} wl_nan_service_info_t; |
---|
| 11154 | + |
---|
| 11155 | +typedef struct wl_nan_service_list |
---|
| 11156 | +{ |
---|
| 11157 | + uint16 id_count; /* Number of registered publish/subscribe services */ |
---|
| 11158 | + wl_nan_service_info_t list[1]; /* service info defined by nan_service instance */ |
---|
| 11159 | +} wl_nan_service_list_t; |
---|
| 11160 | + |
---|
| 11161 | +/* |
---|
| 11162 | + * WL_NAN_CMD_CFG_BCN_INTERVAL |
---|
| 11163 | + */ |
---|
| 11164 | +typedef uint16 wl_nan_disc_bcn_interval_t; |
---|
| 11165 | + |
---|
| 11166 | +/* |
---|
| 11167 | + * WL_NAN_CMD_CFG_SDF_TXTIME |
---|
| 11168 | + */ |
---|
| 11169 | +typedef uint16 wl_nan_svc_disc_txtime_t; |
---|
| 11170 | + |
---|
| 11171 | +/* |
---|
| 11172 | + * WL_NAN_CMD_CFG_STOP_BCN_TX |
---|
| 11173 | + */ |
---|
| 11174 | +typedef uint16 wl_nan_stop_bcn_tx_t; |
---|
| 11175 | + |
---|
| 11176 | +/* |
---|
| 11177 | + * WL_NAN_CMD_CFG_SID_BEACON |
---|
| 11178 | + */ |
---|
| 11179 | +typedef struct wl_nan_sid_beacon_control { |
---|
| 11180 | + uint8 sid_enable; /* Flag to indicate the inclusion of Service IDs in Beacons */ |
---|
| 11181 | + uint8 sid_count; /* Limit for number of publish SIDs to be included in Beacons */ |
---|
| 11182 | + uint8 sub_sid_count; /* Limit for number of subscribe SIDs to be included in Beacons */ |
---|
| 11183 | + uint8 pad; |
---|
| 11184 | +} wl_nan_sid_beacon_control_t; |
---|
| 11185 | + |
---|
| 11186 | +/* |
---|
| 11187 | + * WL_NAN_CMD_CFG_DW_LEN |
---|
| 11188 | + */ |
---|
| 11189 | +typedef uint16 wl_nan_dw_len_t; |
---|
| 11190 | + |
---|
| 11191 | +/* |
---|
| 11192 | + * WL_NAN_CMD_CFG_AWAKE_DW Will be deprecated. |
---|
| 11193 | + */ |
---|
| 11194 | +typedef struct wl_nan_awake_dw { |
---|
| 11195 | + wl_nan_band_t band; /* 0 - b mode 1- a mode */ |
---|
| 11196 | + uint8 interval; /* 1 or 2 or 4 or 8 or 16 */ |
---|
| 11197 | + uint16 pad; |
---|
| 11198 | +} wl_nan_awake_dw_t; |
---|
| 11199 | + |
---|
| 11200 | +/* |
---|
| 11201 | + * WL_NAN_CMD_CFG_AWAKE_DWS |
---|
| 11202 | + */ |
---|
| 11203 | +typedef struct wl_nan_awake_dws { |
---|
| 11204 | + uint8 dw_interval_2g; /* 2G DW interval */ |
---|
| 11205 | + uint8 dw_interval_5g; /* 5G DW interval */ |
---|
| 11206 | + uint16 pad; |
---|
| 11207 | +} wl_nan_awake_dws_t; |
---|
| 11208 | + |
---|
| 11209 | +/* WL_NAN_CMD_SYNC_BCN_RSSI_NOTIF_THRESHOLD */ |
---|
| 11210 | + |
---|
| 11211 | +typedef struct wl_nan_rssi_notif_thld { |
---|
| 11212 | + int8 bcn_rssi_2g; |
---|
| 11213 | + int8 bcn_rssi_5g; |
---|
| 11214 | + int16 pad; |
---|
| 11215 | +} wl_nan_rssi_notif_thld_t; |
---|
| 11216 | + |
---|
| 11217 | +/* |
---|
| 11218 | + * WL_NAN_CMD_CFG_SOCIAL_CHAN |
---|
| 11219 | + */ |
---|
| 11220 | +typedef struct wl_nan_social_channels { |
---|
| 11221 | + uint8 soc_chan_2g; /* 2G social channel */ |
---|
| 11222 | + uint8 soc_chan_5g; /* 5G social channel */ |
---|
| 11223 | + uint16 pad; |
---|
| 11224 | +} wl_nan_social_channels_t; |
---|
| 11225 | + |
---|
| 11226 | +/* |
---|
| 11227 | + * WL_NAN_CMD_SD_CANCEL_PUBLISH |
---|
| 11228 | + * WL_NAN_CMD_SD_CANCEL_SUBSCRIBE |
---|
| 11229 | + */ |
---|
| 11230 | +typedef uint8 wl_nan_instance_id; /* Instance ID of an active publish instance */ |
---|
| 11231 | + |
---|
| 11232 | +/* |
---|
| 11233 | + * WL_NAN_CMD_SD_VND_INFO |
---|
| 11234 | + */ |
---|
| 11235 | +typedef struct wl_nan_sd_vendor_info |
---|
| 11236 | +{ |
---|
| 11237 | + uint16 length; /* Size in bytes of the payload following this field */ |
---|
| 11238 | + uint8 data[]; /* Vendor Information */ |
---|
| 11239 | +} wl_nan_sd_vendor_info_t; |
---|
| 11240 | + |
---|
| 11241 | +/* |
---|
| 11242 | + * WL_NAN_CMD_SD_STATS |
---|
| 11243 | + */ |
---|
| 11244 | +typedef struct wl_nan_sd_stats { |
---|
| 11245 | + uint32 sdftx; |
---|
| 11246 | + uint32 sdfrx; |
---|
| 11247 | + uint32 sdsrffail; |
---|
| 11248 | + uint32 sdrejrssi; |
---|
| 11249 | + uint32 sdfollowuprx; |
---|
| 11250 | + uint32 sdsubmatch; |
---|
| 11251 | + uint32 sdpubreplied; |
---|
| 11252 | + uint32 sdmftfail1; |
---|
| 11253 | + uint32 sdmftfail2; |
---|
| 11254 | + uint32 sdmftfail3; |
---|
| 11255 | + uint32 sdmftfail4; |
---|
| 11256 | +} wl_nan_sd_stats_t; |
---|
| 11257 | + |
---|
| 11258 | +/* Flag bits for sd transmit message (wl_nan_sd_transmit_t flags) */ |
---|
| 11259 | + |
---|
| 11260 | +/* If set, host wont rec "tx status" event for tx-followup msg */ |
---|
| 11261 | +#define WL_NAN_FUP_SUPR_EVT_TXS 0x01 |
---|
| 11262 | +/* more flags can be added here */ |
---|
| 11263 | + |
---|
| 11264 | +/* |
---|
| 11265 | + * WL_NAN_CMD_SD_TRANSMIT |
---|
| 11266 | + * WL_NAN_CMD_SD_FUP_TRANSMIT |
---|
| 11267 | + */ |
---|
| 11268 | +typedef struct wl_nan_sd_transmit { |
---|
| 11269 | + uint8 local_service_id; /* Sender Service ID */ |
---|
| 11270 | + uint8 requestor_service_id; /* Destination Service ID */ |
---|
| 11271 | + struct ether_addr destination_addr; /* Destination MAC */ |
---|
| 11272 | + uint16 token; /* follow_up_token when a follow-up |
---|
| 11273 | + * msg is queued successfully |
---|
| 11274 | + */ |
---|
| 11275 | + uint8 priority; /* requested relative prio */ |
---|
| 11276 | + uint8 flags; /* Flags for tx follow-up msg */ |
---|
| 11277 | + uint16 opt_len; /* total length of optional tlvs */ |
---|
| 11278 | + uint8 opt_tlv[]; /* optional tlvs in bcm_xtlv_t type */ |
---|
| 11279 | +} wl_nan_sd_transmit_t; |
---|
| 11280 | + |
---|
| 11281 | +/* disc cache timeout for a cache entry */ |
---|
| 11282 | +typedef uint16 wl_nan_disc_cache_timeout_t; |
---|
| 11283 | + |
---|
| 11284 | +/* |
---|
| 11285 | + * WL_NAN_CMD_SYNC_TSRESERVE |
---|
| 11286 | + */ |
---|
| 11287 | +/** time slot */ |
---|
| 11288 | +#define NAN_MAX_TIMESLOT 32 |
---|
| 11289 | +typedef struct wl_nan_timeslot { |
---|
| 11290 | + uint32 abitmap; /**< available bitmap */ |
---|
| 11291 | + uint32 chanlist[NAN_MAX_TIMESLOT]; |
---|
| 11292 | +} wl_nan_timeslot_t; |
---|
| 11293 | + |
---|
| 11294 | +/* |
---|
| 11295 | + * Deprecated |
---|
| 11296 | + * |
---|
| 11297 | + * WL_NAN_CMD_SYNC_TSRELEASE |
---|
| 11298 | + */ |
---|
| 11299 | +typedef uint32 wl_nan_ts_bitmap_t; |
---|
| 11300 | + |
---|
| 11301 | +/* nan passive scan params */ |
---|
| 11302 | +#define NAN_SCAN_MAX_CHCNT 8 |
---|
| 11303 | +/* nan merge scan params */ |
---|
| 11304 | +typedef struct wl_nan_scan_params { |
---|
| 11305 | + /* dwell time of discovery channel corresponds to band_idx. |
---|
| 11306 | + * If set to 0 then fw default will be used. |
---|
| 11307 | + */ |
---|
| 11308 | + uint16 dwell_time; |
---|
| 11309 | + /* scan period of discovery channel corresponds to band_idx. |
---|
| 11310 | + * If set to 0 then fw default will be used. |
---|
| 11311 | + */ |
---|
| 11312 | + uint16 scan_period; |
---|
| 11313 | + /* band index of discovery channel */ |
---|
| 11314 | + uint8 band_index; |
---|
| 11315 | +} wl_nan_scan_params_t; |
---|
| 11316 | + |
---|
| 11317 | +/* |
---|
| 11318 | + * WL_NAN_CMD_DBG_SCAN |
---|
| 11319 | + */ |
---|
| 11320 | +typedef struct wl_nan_dbg_scan { |
---|
| 11321 | + struct ether_addr cid; |
---|
| 11322 | + uint8 pad[2]; |
---|
| 11323 | +} wl_nan_dbg_scan_t; |
---|
| 11324 | + |
---|
| 11325 | +/* NAN_DBG_LEVEL */ |
---|
| 11326 | +typedef struct wl_nan_dbg_level { |
---|
| 11327 | + uint32 nan_err_level; /* for Error levels */ |
---|
| 11328 | + uint32 nan_dbg_level; /* for bebug logs and trace */ |
---|
| 11329 | + uint32 nan_info_level; /* for dumps like prhex */ |
---|
| 11330 | +} wl_nan_dbg_level_t; |
---|
| 11331 | + |
---|
| 11332 | +/* |
---|
| 11333 | + * WL_NAN_CMD_DBG_EVENT_MASK |
---|
| 11334 | + */ |
---|
| 11335 | +typedef uint32 wl_nan_event_mask_t; |
---|
| 11336 | + |
---|
| 11337 | +/* |
---|
| 11338 | + * WL_NAN_CMD_DBG_EVENT_CHECK |
---|
| 11339 | + */ |
---|
| 11340 | +typedef uint8 wl_nan_dbg_ifname[BCM_MSG_IFNAME_MAX]; |
---|
| 11341 | + |
---|
| 11342 | +/* |
---|
| 11343 | + * WL_NAN_CMD_DBG_DUMP |
---|
| 11344 | + * WL_NAN_CMD_DBG_CLEAR |
---|
| 11345 | + */ |
---|
| 11346 | +enum wl_nan_dbg_dump_type { |
---|
| 11347 | + WL_NAN_DBG_DT_RSSI_DATA = 1, |
---|
| 11348 | + WL_NAN_DBG_DT_STATS_DATA = 2, |
---|
| 11349 | + /* |
---|
| 11350 | + * Additional enums before this line |
---|
| 11351 | + */ |
---|
| 11352 | + WL_NAN_DBG_DT_INVALID |
---|
| 11353 | +}; |
---|
| 11354 | +typedef int8 wl_nan_dbg_dump_type_t; |
---|
| 11355 | + |
---|
| 11356 | +/** various params and ctl swithce for nan_debug instance */ |
---|
| 11357 | +/* |
---|
| 11358 | + * WL_NAN_CMD_DBG_DEBUG |
---|
| 11359 | + */ |
---|
| 11360 | +typedef struct wl_nan_debug_params { |
---|
| 11361 | + uint16 cmd; /**< debug cmd to perform a debug action */ |
---|
| 11362 | + uint16 status; |
---|
| 11363 | + uint32 msglevel; /**< msg level if enabled */ |
---|
| 11364 | + uint8 enabled; /**< runtime debuging enabled */ |
---|
| 11365 | + uint8 collect; |
---|
| 11366 | + uint8 PAD[2]; |
---|
| 11367 | +} wl_nan_debug_params_t; |
---|
| 11368 | + |
---|
| 11369 | +typedef struct wl_nan_sched_svc_timeslot_s { |
---|
| 11370 | + uint32 abitmap; /* availability bitmap */ |
---|
| 11371 | + uint32 chanlist[NAN_MAX_TIMESLOT]; |
---|
| 11372 | + uint8 res; /* resolution: 0 = 16ms, 1 = 32ms, 2 = 64ms 3 = reserved. REfer NAN spec */ |
---|
| 11373 | + uint8 mapid; /* mapid from NAN spec. Used to differentiate 2G Vs 5G band */ |
---|
| 11374 | + uint8 PAD[2]; |
---|
| 11375 | +} wl_nan_sched_svc_timeslot_t; |
---|
| 11376 | + |
---|
| 11377 | +/* |
---|
| 11378 | + * WL_NAN_CMD_DATA_DP_IDLE_PERIOD |
---|
| 11379 | + */ |
---|
| 11380 | +typedef uint16 wl_nan_ndp_idle_period_t; |
---|
| 11381 | + |
---|
| 11382 | +/* |
---|
| 11383 | + * WL_NAN_CMD_DATA_DP_HB_DURATION |
---|
| 11384 | + */ |
---|
| 11385 | +typedef uint16 wl_nan_ndp_hb_duration_t; |
---|
| 11386 | + |
---|
6348 | 11387 | /* nan cmd IDs */ |
---|
6349 | 11388 | enum wl_nan_cmds { |
---|
6350 | 11389 | /* nan cfg /disc & dbg ioctls */ |
---|
.. | .. |
---|
6358 | 11397 | WL_NAN_CMD_TSSCHEDULE = 8, |
---|
6359 | 11398 | WL_NAN_CMD_TSRELEASE = 9, |
---|
6360 | 11399 | WL_NAN_CMD_OUI = 10, |
---|
| 11400 | + WL_NAN_CMD_OOB_AF = 11, |
---|
| 11401 | + WL_NAN_CMD_SCAN_PARAMS = 12, |
---|
6361 | 11402 | |
---|
6362 | 11403 | WL_NAN_CMD_COUNT = 15, |
---|
6363 | 11404 | WL_NAN_CMD_CLEARCOUNT = 16, |
---|
.. | .. |
---|
6372 | 11413 | WL_NAN_CMD_SHOW = 26, |
---|
6373 | 11414 | WL_NAN_CMD_STOP = 27, /* stop nan for a given cluster ID */ |
---|
6374 | 11415 | /* nan debug iovars & cmds */ |
---|
6375 | | - WL_NAN_CMD_SCAN_PARAMS = 46, |
---|
6376 | 11416 | WL_NAN_CMD_SCAN = 47, |
---|
6377 | 11417 | WL_NAN_CMD_SCAN_RESULTS = 48, |
---|
6378 | 11418 | WL_NAN_CMD_EVENT_MASK = 49, |
---|
.. | .. |
---|
6385 | 11425 | WL_NAN_CMD_TEST1 = 61, |
---|
6386 | 11426 | WL_NAN_CMD_TEST2 = 62, |
---|
6387 | 11427 | WL_NAN_CMD_TEST3 = 63, |
---|
6388 | | - WL_NAN_CMD_DISC_RESULTS = 64 |
---|
| 11428 | + WL_NAN_CMD_DISC_RESULTS = 64, |
---|
| 11429 | + /* nan 2.0 data path commands */ |
---|
| 11430 | + WL_NAN_CMD_DATAPATH = 65 |
---|
6389 | 11431 | }; |
---|
6390 | 11432 | |
---|
6391 | | -/* |
---|
6392 | | - * tlv IDs uniquely identifies cmd parameters |
---|
6393 | | - * packed into wl_nan_ioc_t container |
---|
6394 | | - */ |
---|
6395 | | -enum wl_nan_cmd_xtlv_id { |
---|
6396 | | - /* 0x00 ~ 0xFF: standard TLV ID whose data format is the same as NAN attribute TLV */ |
---|
6397 | | - WL_NAN_XTLV_ZERO = 0, /* used as tlv buf end marker */ |
---|
6398 | | -#ifdef NAN_STD_TLV /* rfu, don't use yet */ |
---|
6399 | | - WL_NAN_XTLV_MASTER_IND = 1, /* == NAN_ATTR_MASTER_IND, */ |
---|
6400 | | - WL_NAN_XTLV_CLUSTER = 2, /* == NAN_ATTR_CLUSTER, */ |
---|
6401 | | - WL_NAN_XTLV_VENDOR = 221, /* == NAN_ATTR_VENDOR, */ |
---|
6402 | | -#endif |
---|
6403 | | - /* 0x02 ~ 0xFF: reserved. In case to use with the same data format as NAN attribute TLV */ |
---|
6404 | | - /* 0x100 ~ : private TLV ID defined just for NAN command */ |
---|
6405 | | - /* common types */ |
---|
6406 | | - WL_NAN_XTLV_MAC_ADDR = 0x102, /* used in various cmds */ |
---|
6407 | | - WL_NAN_XTLV_REASON = 0x103, |
---|
6408 | | - WL_NAN_XTLV_ENABLED = 0x104, |
---|
6409 | | - /* explicit types, primarily for discovery engine iovars */ |
---|
6410 | | - WL_NAN_XTLV_SVC_PARAMS = 0x120, /* Contains required params: wl_nan_disc_params_t */ |
---|
6411 | | - WL_NAN_XTLV_MATCH_RX = 0x121, /* Matching filter to evaluate on receive */ |
---|
6412 | | - WL_NAN_XTLV_MATCH_TX = 0x122, /* Matching filter to send */ |
---|
6413 | | - WL_NAN_XTLV_SVC_INFO = 0x123, /* Service specific info */ |
---|
6414 | | - WL_NAN_XTLV_SVC_NAME = 0x124, /* Optional UTF-8 service name, for debugging. */ |
---|
6415 | | - WL_NAN_XTLV_INSTANCE_ID = 0x125, /* Identifies unique publish or subscribe instance */ |
---|
6416 | | - WL_NAN_XTLV_PRIORITY = 0x126, /* used in transmit cmd context */ |
---|
6417 | | - WL_NAN_XTLV_REQUESTOR_ID = 0x127, /* Requestor instance ID */ |
---|
6418 | | - WL_NAN_XTLV_VNDR = 0x128, /* Vendor specific attribute */ |
---|
6419 | | - WL_NAN_XTLV_SR_FILTER = 0x129, /* Service Response Filter */ |
---|
6420 | | - WL_NAN_XTLV_PEER_INSTANCE_ID = 0x131, /* Used to parse remote instance Id */ |
---|
6421 | | - /* explicit types, primarily for NAN MAC iovars */ |
---|
6422 | | - WL_NAN_XTLV_DW_LEN = 0x140, /* discovery win length */ |
---|
6423 | | - WL_NAN_XTLV_BCN_INTERVAL = 0x141, /* beacon interval, both sync and descovery bcns? */ |
---|
6424 | | - WL_NAN_XTLV_CLUSTER_ID = 0x142, |
---|
6425 | | - WL_NAN_XTLV_IF_ADDR = 0x143, |
---|
6426 | | - WL_NAN_XTLV_MC_ADDR = 0x144, |
---|
6427 | | - WL_NAN_XTLV_ROLE = 0x145, |
---|
6428 | | - WL_NAN_XTLV_START = 0x146, |
---|
6429 | | - |
---|
6430 | | - WL_NAN_XTLV_MASTER_PREF = 0x147, |
---|
6431 | | - WL_NAN_XTLV_DW_INTERVAL = 0x148, |
---|
6432 | | - WL_NAN_XTLV_PTBTT_OVERRIDE = 0x149, |
---|
6433 | | - /* nan status command xtlvs */ |
---|
6434 | | - WL_NAN_XTLV_MAC_INITED = 0x14a, |
---|
6435 | | - WL_NAN_XTLV_MAC_ENABLED = 0x14b, |
---|
6436 | | - WL_NAN_XTLV_MAC_CHANSPEC = 0x14c, |
---|
6437 | | - WL_NAN_XTLV_MAC_AMR = 0x14d, /* anchormaster rank u8 amr[8] */ |
---|
6438 | | - WL_NAN_XTLV_MAC_HOPCNT = 0x14e, |
---|
6439 | | - WL_NAN_XTLV_MAC_AMBTT = 0x14f, |
---|
6440 | | - WL_NAN_XTLV_MAC_TXRATE = 0x150, |
---|
6441 | | - WL_NAN_XTLV_MAC_STATUS = 0x151, /* xtlv payload is nan_status_t */ |
---|
6442 | | - WL_NAN_XTLV_NAN_SCANPARAMS = 0x152, /* payload is nan_scan_params_t */ |
---|
6443 | | - WL_NAN_XTLV_DEBUGPARAMS = 0x153, /* payload is nan_scan_params_t */ |
---|
6444 | | - WL_NAN_XTLV_SUBSCR_ID = 0x154, /* subscriber id */ |
---|
6445 | | - WL_NAN_XTLV_PUBLR_ID = 0x155, /* publisher id */ |
---|
6446 | | - WL_NAN_XTLV_EVENT_MASK = 0x156, |
---|
6447 | | - WL_NAN_XTLV_MASTER_RANK = 0x158, |
---|
6448 | | - WL_NAN_XTLV_WARM_UP_TIME = 0x159, |
---|
6449 | | - WL_NAN_XTLV_PM_OPTION = 0x15a, |
---|
6450 | | - WL_NAN_XTLV_OUI = 0x15b, /* NAN OUI */ |
---|
6451 | | - WL_NAN_XTLV_MAC_COUNT = 0x15c, /* xtlv payload is nan_count_t */ |
---|
6452 | | - /* nan timeslot management */ |
---|
6453 | | - WL_NAN_XTLV_TSRESERVE = 0x160, |
---|
6454 | | - WL_NAN_XTLV_TSRELEASE = 0x161, |
---|
6455 | | - WL_NAN_XTLV_IDLE_DW_TIMEOUT = 0x162, |
---|
6456 | | - WL_NAN_XTLV_IDLE_DW_LEN = 0x163, |
---|
6457 | | - WL_NAN_XTLV_RND_FACTOR = 0x164, |
---|
6458 | | - WL_NAN_XTLV_SVC_DISC_TXTIME = 0x165, /* svc disc frame tx time in DW */ |
---|
6459 | | - WL_NAN_XTLV_OPERATING_BAND = 0x166, |
---|
6460 | | - WL_NAN_XTLV_STOP_BCN_TX = 0x167, |
---|
6461 | | - WL_NAN_XTLV_CONCUR_SCAN = 0x168, |
---|
6462 | | - WL_NAN_XTLV_BMP_RESOLUTION = 0x169, |
---|
6463 | | - WL_NAN_XTLV_AVAILABILITY_REPEAT = 0x170, |
---|
6464 | | - WL_NAN_XTLV_AVAILABLE_BMP = 0x171, |
---|
6465 | | - /* p2p operation attribute */ |
---|
6466 | | - WL_NAN_XTLV_P2P_DEV_ROLE = 0x172, |
---|
6467 | | - WL_NAN_XTLV_P2P_DEV_ADDR = 0x173, |
---|
6468 | | - WL_NAN_XTLV_POST_DISC_ATTR_ID = 0x174, /* Post discovery attribute id */ |
---|
6469 | | - WL_NAN_XTLV_DUMP_CLR_TYPE = 0x175, /* wl nan dump/clear subtype */ |
---|
6470 | | - WL_NAN_XTLV_PEER_RSSI = 0x176, /* xtlv payload for wl nan dump rssi */ |
---|
6471 | | - WL_NAN_XTLV_POST_DISC_DATA_P2P = 0x177, /* p2p post disc data */ |
---|
6472 | | - WL_NAN_XTLV_RX_FAVAIL_MAP = 0x178, /* Rx Further Avail Map Data */ |
---|
6473 | | - WL_NAN_XTLV_RX_CONN_CAP_BMP = 0x179, /* Rx Conn Capability Data */ |
---|
6474 | | - WL_NAN_XTLV_MAC_CHANSPEC_1 = 0x17A, /* to get chanspec[1] */ |
---|
6475 | | - WL_NAN_XTLV_DISC_RESULTS = 0x17B, /* get disc results */ |
---|
6476 | | - WL_NAN_XTLV_MAC_STATS = 0x17C /* xtlv payload for wl nan dump stats */ |
---|
| 11433 | +/* NAN DP interface commands */ |
---|
| 11434 | +enum wl_nan_dp_cmds { |
---|
| 11435 | + /* nan 2.0 ioctls */ |
---|
| 11436 | + WL_NAN_CMD_DP_CAP = 1000, |
---|
| 11437 | + WL_NAN_CMD_DP_CONFIG = 1001, |
---|
| 11438 | + WL_NAN_CMD_DP_CREATE = 1002, |
---|
| 11439 | + WL_NAN_CMD_DP_AUTO_CONNECT = 1003, |
---|
| 11440 | + WL_NAN_CMD_DP_DATA_REQ = 1004, |
---|
| 11441 | + WL_NAN_CMD_DP_DATA_RESP = 1005, |
---|
| 11442 | + WL_NAN_CMD_DP_SCHED_UPD = 1006, |
---|
| 11443 | + WL_NAN_CMD_DP_END = 1007, |
---|
| 11444 | + WL_NAN_CMD_DP_CONNECT = 1008, |
---|
| 11445 | + WL_NAN_CMD_DP_STATUS = 1009 |
---|
6477 | 11446 | }; |
---|
6478 | 11447 | |
---|
6479 | | -/* Flag bits for Publish and Subscribe (wl_nan_disc_params_t flags) */ |
---|
6480 | | -#define WL_NAN_RANGE_LIMITED 0x0040 |
---|
6481 | | -/* Bits specific to Publish */ |
---|
6482 | | -/* Unsolicited transmissions */ |
---|
6483 | | -#define WL_NAN_PUB_UNSOLICIT 0x1000 |
---|
6484 | | -/* Solicited transmissions */ |
---|
6485 | | -#define WL_NAN_PUB_SOLICIT 0x2000 |
---|
6486 | | -#define WL_NAN_PUB_BOTH 0x3000 |
---|
6487 | | -/* Set for broadcast solicited transmission |
---|
6488 | | - * Do not set for unicast solicited transmission |
---|
6489 | | - */ |
---|
6490 | | -#define WL_NAN_PUB_BCAST 0x4000 |
---|
6491 | | -/* Generate event on each solicited transmission */ |
---|
6492 | | -#define WL_NAN_PUB_EVENT 0x8000 |
---|
6493 | | -/* Used for one-time solicited Publish functions to indicate transmision occurred */ |
---|
6494 | | -#define WL_NAN_PUB_SOLICIT_PENDING 0x10000 |
---|
6495 | | -/* Follow-up frames */ |
---|
6496 | | -#define WL_NAN_FOLLOWUP 0x20000 |
---|
6497 | | -/* Bits specific to Subscribe */ |
---|
6498 | | -/* Active subscribe mode (Leave unset for passive) */ |
---|
6499 | | -#define WL_NAN_SUB_ACTIVE 0x1000 |
---|
| 11448 | +/* TODO Should remove this fixed length */ |
---|
| 11449 | +#define WL_NAN_DATA_SVC_SPEC_INFO_LEN 32 /* arbitrary */ |
---|
| 11450 | +#define WL_NAN_DP_MAX_SVC_INFO 0xFF |
---|
| 11451 | +#define WL_NAN_DATA_NDP_INST_SUPPORT 16 |
---|
6500 | 11452 | |
---|
6501 | | -/* Special values for time to live (ttl) parameter */ |
---|
6502 | | -#define WL_NAN_TTL_UNTIL_CANCEL 0xFFFFFFFF |
---|
6503 | | -/* Publish - runs until first transmission |
---|
6504 | | - * Subscribe - runs until first DiscoveryResult event |
---|
6505 | | - */ |
---|
6506 | | -#define WL_NAN_TTL_FIRST 0 |
---|
| 11453 | +/* Nan flags (16 bits) */ |
---|
| 11454 | +#define WL_NAN_DP_FLAG_SVC_INFO 0x0001 |
---|
| 11455 | +#define WL_NAN_DP_FLAG_CONFIRM 0x0002 |
---|
| 11456 | +#define WL_NAN_DP_FLAG_EXPLICIT_CFM 0x0004 |
---|
| 11457 | +#define WL_NAN_DP_FLAG_SECURITY 0x0008 |
---|
| 11458 | +#define WL_NAN_DP_FLAG_HAST_NDL_COUNTER 0x0010 /* Host assisted NDL counter */ |
---|
6507 | 11459 | |
---|
6508 | | -/* The service hash (service id) is exactly this many bytes. */ |
---|
| 11460 | +/* NAN Datapath host status */ |
---|
| 11461 | +#define WL_NAN_DP_STATUS_ACCEPTED 1 |
---|
| 11462 | +#define WL_NAN_DP_STATUS_REJECTED 0 |
---|
| 11463 | + |
---|
| 11464 | +/* to be done */ |
---|
| 11465 | +typedef struct wl_nan_dp_cap { |
---|
| 11466 | + uint8 tbd; |
---|
| 11467 | +} wl_nan_dp_cap_t; |
---|
| 11468 | + |
---|
| 11469 | +/** The service hash (service id) is exactly this many bytes. */ |
---|
6509 | 11470 | #define WL_NAN_SVC_HASH_LEN 6 |
---|
6510 | | - |
---|
6511 | | -/* Number of hash functions per bloom filter */ |
---|
| 11471 | +/** Number of hash functions per bloom filter */ |
---|
6512 | 11472 | #define WL_NAN_HASHES_PER_BLOOM 4 |
---|
6513 | | - |
---|
6514 | | -/* Instance ID type (unique identifier) */ |
---|
6515 | | -typedef uint8 wl_nan_instance_id_t; |
---|
6516 | | - |
---|
6517 | 11473 | /* no. of max last disc results */ |
---|
6518 | 11474 | #define WL_NAN_MAX_DISC_RESULTS 3 |
---|
6519 | 11475 | |
---|
6520 | | -/* Mandatory parameters for publish/subscribe iovars - NAN_TLV_SVC_PARAMS */ |
---|
6521 | | -typedef struct wl_nan_disc_params_s { |
---|
6522 | | - /* Periodicity of unsolicited/query transmissions, in DWs */ |
---|
6523 | | - uint32 period; |
---|
6524 | | - /* Time to live in DWs */ |
---|
6525 | | - uint32 ttl; |
---|
6526 | | - /* Flag bits */ |
---|
6527 | | - uint32 flags; |
---|
6528 | | - /* Publish or subscribe service id, i.e. hash of the service name */ |
---|
6529 | | - uint8 svc_hash[WL_NAN_SVC_HASH_LEN]; |
---|
6530 | | - /* pad to make 4 byte alignment, can be used for something else in the future */ |
---|
6531 | | - uint8 pad; |
---|
6532 | | - /* Publish or subscribe id */ |
---|
6533 | | - wl_nan_instance_id_t instance_id; |
---|
6534 | | -} wl_nan_disc_params_t; |
---|
| 11476 | +/* NAN security related defines */ |
---|
| 11477 | +/* NCS-SK related */ |
---|
| 11478 | +#define WL_NAN_NCS_SK_PMK_LEN 32 |
---|
| 11479 | +#define WL_NAN_NCS_SK_PMKID_LEN 16 |
---|
6535 | 11480 | |
---|
6536 | 11481 | /* recent discovery results */ |
---|
6537 | 11482 | typedef struct wl_nan_disc_result_s |
---|
.. | .. |
---|
6548 | 11493 | wl_nan_disc_result_t disc_result[WL_NAN_MAX_DISC_RESULTS]; |
---|
6549 | 11494 | } wl_nan_disc_results_list_t; |
---|
6550 | 11495 | |
---|
| 11496 | +/* nan 1.0 events */ |
---|
| 11497 | +/* To be deprecated - will be replaced by event_disc_result */ |
---|
| 11498 | +typedef struct wl_nan_ev_disc_result { |
---|
| 11499 | + wl_nan_instance_id_t pub_id; |
---|
| 11500 | + wl_nan_instance_id_t sub_id; |
---|
| 11501 | + struct ether_addr pub_mac; |
---|
| 11502 | + uint8 opt_tlvs[0]; |
---|
| 11503 | +} wl_nan_ev_disc_result_t; |
---|
| 11504 | + |
---|
| 11505 | +typedef struct wl_nan_event_disc_result { |
---|
| 11506 | + wl_nan_instance_id_t pub_id; |
---|
| 11507 | + wl_nan_instance_id_t sub_id; |
---|
| 11508 | + struct ether_addr pub_mac; |
---|
| 11509 | + int8 publish_rssi; /* publisher RSSI */ |
---|
| 11510 | + uint8 attr_num; |
---|
| 11511 | + uint16 attr_list_len; /* length of the all the attributes in the SDF */ |
---|
| 11512 | + uint8 attr_list[0]; /* list of NAN attributes */ |
---|
| 11513 | +} wl_nan_event_disc_result_t; |
---|
| 11514 | + |
---|
| 11515 | +typedef struct wl_nan_ev_p2p_avail { |
---|
| 11516 | + struct ether_addr sender; |
---|
| 11517 | + struct ether_addr p2p_dev_addr; |
---|
| 11518 | + uint8 dev_role; |
---|
| 11519 | + uint8 resolution; |
---|
| 11520 | + uint8 repeat; |
---|
| 11521 | + uint8 pad[3]; |
---|
| 11522 | + chanspec_t chanspec; |
---|
| 11523 | + uint32 avail_bmap; |
---|
| 11524 | +} wl_nan_ev_p2p_avail_t; |
---|
| 11525 | + |
---|
6551 | 11526 | /* |
---|
6552 | | -* desovery interface event structures * |
---|
| 11527 | +* discovery interface event structures * |
---|
6553 | 11528 | */ |
---|
| 11529 | + |
---|
| 11530 | +/* mandatory parameters for OOB action frame */ |
---|
| 11531 | +/* single-shot when bitmap and offset are set to 0; periodic otherwise */ |
---|
| 11532 | +typedef struct wl_nan_oob_af_params_s |
---|
| 11533 | +{ |
---|
| 11534 | + /* bitmap for the 32 timeslots in 512TU dw interval */ |
---|
| 11535 | + uint32 ts_map; |
---|
| 11536 | + /* offset from start of dw, in us */ |
---|
| 11537 | + uint32 tx_offset; |
---|
| 11538 | + struct ether_addr bssid; |
---|
| 11539 | + struct ether_addr dest; |
---|
| 11540 | + uint32 pkt_lifetime; |
---|
| 11541 | + uint16 payload_len; |
---|
| 11542 | + uint8 payload[1]; |
---|
| 11543 | +} wl_nan_oob_af_params_t; |
---|
6554 | 11544 | |
---|
6555 | 11545 | /* NAN Ranging */ |
---|
6556 | 11546 | |
---|
6557 | 11547 | /* Bit defines for global flags */ |
---|
6558 | | -#define WL_NAN_RANGING_ENABLE 1 /* enable RTT */ |
---|
6559 | | -#define WL_NAN_RANGING_RANGED 2 /* Report to host if ranged as target */ |
---|
| 11548 | +#define WL_NAN_RANGING_ENABLE 1 /**< enable RTT */ |
---|
| 11549 | +#define WL_NAN_RANGING_RANGED 2 /**< Report to host if ranged as target */ |
---|
6560 | 11550 | typedef struct nan_ranging_config { |
---|
6561 | | - uint32 chanspec; /* Ranging chanspec */ |
---|
6562 | | - uint16 timeslot; /* NAN RTT start time slot 1-511 */ |
---|
6563 | | - uint16 duration; /* NAN RTT duration in ms */ |
---|
6564 | | - struct ether_addr allow_mac; /* peer initiated ranging: the allowed peer mac |
---|
| 11551 | + uint32 chanspec; /**< Ranging chanspec */ |
---|
| 11552 | + uint16 timeslot; /**< NAN RTT start time slot 1-511 */ |
---|
| 11553 | + uint16 duration; /**< NAN RTT duration in ms */ |
---|
| 11554 | + struct ether_addr allow_mac; /**< peer initiated ranging: the allowed peer mac |
---|
6565 | 11555 | * address, a unicast (for one peer) or |
---|
6566 | 11556 | * a broadcast for all. Setting it to all zeros |
---|
6567 | 11557 | * means responding to none,same as not setting |
---|
.. | .. |
---|
6570 | 11560 | uint16 flags; |
---|
6571 | 11561 | } wl_nan_ranging_config_t; |
---|
6572 | 11562 | |
---|
6573 | | -/* list of peers for self initiated ranging */ |
---|
6574 | | -/* Bit defines for per peer flags */ |
---|
6575 | | -#define WL_NAN_RANGING_REPORT (1<<0) /* Enable reporting range to target */ |
---|
| 11563 | +/** list of peers for self initiated ranging */ |
---|
| 11564 | +/** Bit defines for per peer flags */ |
---|
| 11565 | +#define WL_NAN_RANGING_REPORT (1<<0) /**< Enable reporting range to target */ |
---|
6576 | 11566 | typedef struct nan_ranging_peer { |
---|
6577 | | - uint32 chanspec; /* desired chanspec for this peer */ |
---|
6578 | | - uint32 abitmap; /* available bitmap */ |
---|
6579 | | - struct ether_addr ea; /* peer MAC address */ |
---|
6580 | | - uint8 frmcnt; /* frame count */ |
---|
6581 | | - uint8 retrycnt; /* retry count */ |
---|
6582 | | - uint16 flags; /* per peer flags, report or not */ |
---|
| 11567 | + uint32 chanspec; /**< desired chanspec for this peer */ |
---|
| 11568 | + uint32 abitmap; /**< available bitmap */ |
---|
| 11569 | + struct ether_addr ea; /**< peer MAC address */ |
---|
| 11570 | + uint8 frmcnt; /**< frame count */ |
---|
| 11571 | + uint8 retrycnt; /**< retry count */ |
---|
| 11572 | + uint16 flags; /**< per peer flags, report or not */ |
---|
| 11573 | + uint16 PAD; |
---|
6583 | 11574 | } wl_nan_ranging_peer_t; |
---|
6584 | 11575 | typedef struct nan_ranging_list { |
---|
6585 | | - uint8 count; /* number of MAC addresses */ |
---|
6586 | | - uint8 num_peers_done; /* host set to 0, when read, shows number of peers |
---|
| 11576 | + uint8 count; /**< number of MAC addresses */ |
---|
| 11577 | + uint8 num_peers_done; /**< host set to 0, when read, shows number of peers |
---|
6587 | 11578 | * completed, success or fail |
---|
6588 | 11579 | */ |
---|
6589 | | - uint8 num_dws; /* time period to do the ranging, specified in dws */ |
---|
6590 | | - uint8 reserve; /* reserved field */ |
---|
6591 | | - wl_nan_ranging_peer_t rp[1]; /* variable length array of peers */ |
---|
| 11580 | + uint8 num_dws; /**< time period to do the ranging, specified in dws */ |
---|
| 11581 | + uint8 reserve; /**< reserved field */ |
---|
| 11582 | + wl_nan_ranging_peer_t rp[1]; /**< variable length array of peers */ |
---|
6592 | 11583 | } wl_nan_ranging_list_t; |
---|
6593 | 11584 | |
---|
6594 | 11585 | /* ranging results, a list for self initiated ranging and one for peer initiated ranging */ |
---|
6595 | 11586 | /* There will be one structure for each peer */ |
---|
6596 | 11587 | #define WL_NAN_RANGING_STATUS_SUCCESS 1 |
---|
6597 | | -#define WL_NAN_RANGING_STATUS_FAIL 2 |
---|
| 11588 | +#define WL_NAN_RANGING_STATUS_FAIL 2 |
---|
6598 | 11589 | #define WL_NAN_RANGING_STATUS_TIMEOUT 3 |
---|
6599 | | -#define WL_NAN_RANGING_STATUS_ABORT 4 /* with partial results if sounding count > 0 */ |
---|
| 11590 | +#define WL_NAN_RANGING_STATUS_ABORT 4 /**< with partial results if sounding count > 0 */ |
---|
6600 | 11591 | typedef struct nan_ranging_result { |
---|
6601 | | - uint8 status; /* 1: Success, 2: Fail 3: Timeout 4: Aborted */ |
---|
6602 | | - uint8 sounding_count; /* number of measurements completed (0 = failure) */ |
---|
6603 | | - struct ether_addr ea; /* initiator MAC address */ |
---|
6604 | | - uint32 chanspec; /* Chanspec where the ranging was done */ |
---|
6605 | | - uint32 timestamp; /* 32bits of the TSF timestamp ranging was completed at */ |
---|
6606 | | - uint32 distance; /* mean distance in meters expressed as Q4 number. |
---|
| 11592 | + uint8 status; /**< 1: Success, 2: Fail 3: Timeout 4: Aborted */ |
---|
| 11593 | + uint8 sounding_count; /**< number of measurements completed (0 = failure) */ |
---|
| 11594 | + struct ether_addr ea; /**< initiator MAC address */ |
---|
| 11595 | + uint32 chanspec; /**< Chanspec where the ranging was done */ |
---|
| 11596 | + uint32 timestamp; /**< 32bits of the TSF timestamp ranging was completed at */ |
---|
| 11597 | + uint32 distance; /**< mean distance in meters expressed as Q4 number. |
---|
6607 | 11598 | * Only valid when sounding_count > 0. Examples: |
---|
6608 | 11599 | * 0x08 = 0.5m |
---|
6609 | 11600 | * 0x10 = 1m |
---|
6610 | 11601 | * 0x18 = 1.5m |
---|
6611 | 11602 | * set to 0xffffffff to indicate invalid number |
---|
6612 | 11603 | */ |
---|
6613 | | - int32 rtt_var; /* standard deviation in 10th of ns of RTTs measured. |
---|
| 11604 | + int32 rtt_var; /**< standard deviation in 10th of ns of RTTs measured. |
---|
6614 | 11605 | * Only valid when sounding_count > 0 |
---|
6615 | 11606 | */ |
---|
6616 | | - struct ether_addr tgtea; /* target MAC address */ |
---|
| 11607 | + struct ether_addr tgtea; /**< target MAC address */ |
---|
| 11608 | + uint8 PAD[2]; |
---|
6617 | 11609 | } wl_nan_ranging_result_t; |
---|
6618 | 11610 | typedef struct nan_ranging_event_data { |
---|
6619 | | - uint8 mode; /* 1: Result of host initiated ranging */ |
---|
| 11611 | + uint8 mode; /**< 1: Result of host initiated ranging */ |
---|
6620 | 11612 | /* 2: Result of peer initiated ranging */ |
---|
6621 | 11613 | uint8 reserved; |
---|
6622 | | - uint8 success_count; /* number of peers completed successfully */ |
---|
6623 | | - uint8 count; /* number of peers in the list */ |
---|
6624 | | - wl_nan_ranging_result_t rr[1]; /* variable array of ranging peers */ |
---|
| 11614 | + uint8 success_count; /**< number of peers completed successfully */ |
---|
| 11615 | + uint8 count; /**< number of peers in the list */ |
---|
| 11616 | + wl_nan_ranging_result_t rr[1]; /**< variable array of ranging peers */ |
---|
6625 | 11617 | } wl_nan_ranging_event_data_t; |
---|
6626 | 11618 | |
---|
6627 | 11619 | enum { |
---|
6628 | | - WL_NAN_RSSI_DATA = 1, |
---|
| 11620 | + WL_NAN_STATS_RSSI = 1, |
---|
6629 | 11621 | WL_NAN_STATS_DATA = 2, |
---|
| 11622 | + WL_NAN_STATS_DP = 3, |
---|
6630 | 11623 | /* |
---|
6631 | 11624 | * ***** ADD before this line **** |
---|
6632 | 11625 | */ |
---|
6633 | | - WL_NAN_INVALID |
---|
| 11626 | + WL_NAN_STATS_INVALID |
---|
6634 | 11627 | }; |
---|
| 11628 | +typedef struct wl_nan_dp_stats { |
---|
| 11629 | + uint32 tbd; /* TBD */ |
---|
| 11630 | +} wl_nan_dp_stats_t; |
---|
6635 | 11631 | |
---|
6636 | 11632 | typedef struct wl_nan_stats { |
---|
6637 | 11633 | /* general */ |
---|
.. | .. |
---|
6671 | 11667 | uint32 cnt_err_ms_rej; /* number of merge scan failed */ |
---|
6672 | 11668 | uint32 cnt_scan_results; /* no. of nan beacons scanned */ |
---|
6673 | 11669 | uint32 cnt_join_scan_rej; /* no. of join scans rejected */ |
---|
| 11670 | + uint32 cnt_nan_scan_abort; /* no. of join scans rejected */ |
---|
6674 | 11671 | /* enable/disable */ |
---|
6675 | 11672 | uint32 cnt_nan_enab; /* no. of times nan feature got enabled */ |
---|
6676 | 11673 | uint32 cnt_nan_disab; /* no. of times nan feature got disabled */ |
---|
| 11674 | + uint32 cnt_sync_bcn_rx; /* count of sync bcn rx within DW */ |
---|
| 11675 | + uint32 cnt_sync_bcn_rx_tu[3]; /* Delta bw the tsf in bcn & remote */ |
---|
| 11676 | + uint32 cnt_bcn_tx_out_dw; /* TX sync beacon outside dw */ |
---|
| 11677 | + uint32 cnt_role_am_dw; /* anchor master role due to dw */ |
---|
| 11678 | + uint32 cnt_am_hop_err; /* wrong hopcount set for AM */ |
---|
6677 | 11679 | } wl_nan_stats_t; |
---|
6678 | 11680 | |
---|
6679 | 11681 | #define WL_NAN_MAC_MAX_NAN_PEERS 6 |
---|
.. | .. |
---|
6681 | 11683 | |
---|
6682 | 11684 | typedef struct wl_nan_nbr_rssi { |
---|
6683 | 11685 | uint8 rx_chan; /* channel number on which bcn rcvd */ |
---|
6684 | | - int rssi_raw; /* received rssi value */ |
---|
6685 | | - int rssi_avg; /* normalized rssi value */ |
---|
| 11686 | + uint8 PAD[3]; |
---|
| 11687 | + int32 rssi_raw; /* received rssi value */ |
---|
| 11688 | + int32 rssi_avg; /* normalized rssi value */ |
---|
6686 | 11689 | } wl_nan_peer_rssi_t; |
---|
6687 | 11690 | |
---|
6688 | 11691 | typedef struct wl_nan_peer_rssi_entry { |
---|
.. | .. |
---|
6702 | 11705 | wl_nan_peer_rssi_entry_t peers[1]; /* peers data list */ |
---|
6703 | 11706 | } wl_nan_peer_rssi_data_t; |
---|
6704 | 11707 | |
---|
| 11708 | +/* WL_NAN_CMD_DBG_DUMP, GET Resp */ |
---|
| 11709 | +typedef struct wl_nan_dbg_dump_rsp { |
---|
| 11710 | + wl_nan_dbg_dump_type_t dump_type; /* dump data type */ |
---|
| 11711 | + uint8 pad[3]; |
---|
| 11712 | + union { |
---|
| 11713 | + wl_nan_peer_rssi_data_t peer_rssi; |
---|
| 11714 | + wl_nan_stats_t nan_stats; |
---|
| 11715 | + } u; |
---|
| 11716 | +} wl_nan_dbg_dump_rsp_t; |
---|
| 11717 | + |
---|
| 11718 | +enum nan_termination_status { |
---|
| 11719 | + NAN_TERM_REASON_INVALID = 1, |
---|
| 11720 | + NAN_TERM_REASON_TIMEOUT = 2, |
---|
| 11721 | + NAN_TERM_REASON_USER_REQ = 3, |
---|
| 11722 | + NAN_TERM_REASON_FAILURE = 4, |
---|
| 11723 | + NAN_TERM_REASON_COUNT_REACHED = 5, |
---|
| 11724 | + NAN_TERM_REASON_DE_SHUTDOWN = 6, |
---|
| 11725 | + NAN_TERM_REASON_DISABLE_IN_PROGRESS = 7 |
---|
| 11726 | +}; |
---|
| 11727 | + |
---|
| 11728 | +/* nan2 data iovar */ |
---|
| 11729 | +/* nan2 qos */ |
---|
| 11730 | +typedef struct wl_nan_dp_qos |
---|
| 11731 | +{ |
---|
| 11732 | + uint8 tid; |
---|
| 11733 | + uint8 pad; |
---|
| 11734 | + uint16 pkt_size; |
---|
| 11735 | + uint16 mean_rate; |
---|
| 11736 | + uint16 svc_interval; |
---|
| 11737 | +} wl_nan_dp_qos_t; |
---|
| 11738 | + |
---|
| 11739 | +#define WL_NAN_NDL_QOS_MAX_LAT_NO_PREF 0xFFFF |
---|
| 11740 | + |
---|
| 11741 | +/* nan2 qos */ |
---|
| 11742 | +typedef struct wl_nan_ndl_qos |
---|
| 11743 | +{ |
---|
| 11744 | + uint8 min_slots; /* min slots per dw interval */ |
---|
| 11745 | + uint8 pad; |
---|
| 11746 | + uint16 max_latency; /* max latency */ |
---|
| 11747 | +} wl_nan_ndl_qos_t; |
---|
| 11748 | + |
---|
| 11749 | +/* ndp config */ |
---|
| 11750 | +typedef struct wl_nan_ndp_config |
---|
| 11751 | +{ |
---|
| 11752 | + uint8 ndp_id; |
---|
| 11753 | + uint8 pub_id; |
---|
| 11754 | + struct ether_addr pub_addr; |
---|
| 11755 | + struct ether_addr data_addr; /* configure local data addr */ |
---|
| 11756 | + struct ether_addr init_data_addr; /* initiator data addr */ |
---|
| 11757 | + uint8 svc_spec_info[WL_NAN_DATA_SVC_SPEC_INFO_LEN]; |
---|
| 11758 | + wl_nan_dp_qos_t qos; |
---|
| 11759 | + uint16 avail_len; |
---|
| 11760 | + uint8 pad[3]; |
---|
| 11761 | + uint8 data[1]; |
---|
| 11762 | +} wl_nan_ndp_config_t; |
---|
| 11763 | + |
---|
| 11764 | +/* nan2 device capabilities */ |
---|
| 11765 | +typedef struct wl_nan_ndp_oper_cfg { |
---|
| 11766 | + uint8 awake_dw_2g; |
---|
| 11767 | + uint8 awake_dw_5g; |
---|
| 11768 | + uint8 bands_supported; |
---|
| 11769 | + uint8 op_mode; |
---|
| 11770 | +} wl_nan_ndp_oper_cfg_t; |
---|
| 11771 | + |
---|
| 11772 | +typedef uint8 wl_nan_ndp_ndpid_t; |
---|
| 11773 | +typedef uint8 wl_nan_ndp_conn_t; |
---|
| 11774 | + |
---|
| 11775 | +#define WL_NAN_INVALID_NDPID 0 /* reserved ndp id */ |
---|
| 11776 | + |
---|
| 11777 | +typedef struct wl_nan_dp_req { |
---|
| 11778 | + uint8 type; /* 0- unicast 1 - multicast */ |
---|
| 11779 | + uint8 pub_id; /* Publisher ID */ |
---|
| 11780 | + uint16 flags; |
---|
| 11781 | + struct ether_addr peer_mac; /* Peer's NMI addr */ |
---|
| 11782 | + struct ether_addr mcast_mac; /* Multicast addr */ |
---|
| 11783 | + struct ether_addr ndi; |
---|
| 11784 | + wl_nan_dp_qos_t qos; |
---|
| 11785 | + wl_nan_ndl_qos_t ndl_qos; /* ndl qos */ |
---|
| 11786 | + uint8 tlv_params[]; /* xtlv parameters for command */ |
---|
| 11787 | +} wl_nan_dp_req_t; |
---|
| 11788 | + |
---|
| 11789 | +/* TODO Need to replace ndp_id with lndp_id */ |
---|
| 11790 | +/* Return structure to data req IOVAR */ |
---|
| 11791 | +typedef struct wl_nan_dp_req_ret { |
---|
| 11792 | + struct ether_addr indi; /* Initiators data mac addr */ |
---|
| 11793 | + uint8 ndp_id; /* Initiators ndpid */ |
---|
| 11794 | + uint8 pad; |
---|
| 11795 | +} wl_nan_dp_req_ret_t; |
---|
| 11796 | + |
---|
| 11797 | +typedef struct wl_nan_dp_resp { |
---|
| 11798 | + uint8 type; /* 0- unicast 1 - multicast */ |
---|
| 11799 | + uint8 status; /* Accepted or Rejected */ |
---|
| 11800 | + uint8 reason_code; |
---|
| 11801 | + /* Local NDP ID for unicast, mc_id for multicast, 0 for implicit NMSG */ |
---|
| 11802 | + uint8 ndp_id; /* can be host indp id also */ |
---|
| 11803 | + wl_nan_dp_qos_t qos; |
---|
| 11804 | + /* Initiator data address for unicast or multicast address for multicast */ |
---|
| 11805 | + struct ether_addr mac_addr; |
---|
| 11806 | + struct ether_addr ndi; |
---|
| 11807 | + uint16 flags; |
---|
| 11808 | + wl_nan_ndl_qos_t ndl_qos; /* ndl qos */ |
---|
| 11809 | + uint8 tlv_params[]; /* xtlv parameters for command */ |
---|
| 11810 | +} wl_nan_dp_resp_t; |
---|
| 11811 | + |
---|
| 11812 | +/* Return structure to data resp IOVAR */ |
---|
| 11813 | +typedef struct wl_nan_dp_resp_ret { |
---|
| 11814 | + uint8 nmsgid; /* NMSG ID or for multicast else 0 */ |
---|
| 11815 | + uint8 pad[3]; |
---|
| 11816 | +} wl_nan_dp_resp_ret_t; |
---|
| 11817 | + |
---|
| 11818 | +typedef struct wl_nan_dp_conf { |
---|
| 11819 | + uint8 lndp_id; /* can be host ndp id */ |
---|
| 11820 | + uint8 status; /* Accepted or Rejected */ |
---|
| 11821 | + uint8 pad[2]; |
---|
| 11822 | +} wl_nan_dp_conf_t; |
---|
| 11823 | + |
---|
| 11824 | +typedef struct wl_nan_dp_end |
---|
| 11825 | +{ |
---|
| 11826 | + uint8 lndp_id; /* can be host ndp id */ |
---|
| 11827 | + uint8 status; |
---|
| 11828 | + struct ether_addr mac_addr; /* initiator's ndi */ |
---|
| 11829 | +} wl_nan_dp_end_t; |
---|
| 11830 | + |
---|
| 11831 | +typedef struct wl_nan_dp_schedupd { |
---|
| 11832 | + uint8 type; /* 0: unicast, 1: multicast */ |
---|
| 11833 | + uint8 flags; |
---|
| 11834 | + struct ether_addr addr; /* peer NMI or multicast addr */ |
---|
| 11835 | + wl_nan_dp_qos_t qos; |
---|
| 11836 | + wl_nan_ndl_qos_t ndl_qos; /* ndl qos */ |
---|
| 11837 | + uint8 map_id; |
---|
| 11838 | + uint8 pad; |
---|
| 11839 | + uint16 hostseq; |
---|
| 11840 | +} wl_nan_dp_schedupd_t; |
---|
| 11841 | + |
---|
| 11842 | +/* set: update with notification, unset: NDL setup handshake */ |
---|
| 11843 | +#define WL_NAN_DP_SCHEDUPD_NOTIF (1 << 0) |
---|
| 11844 | + |
---|
| 11845 | +/* list ndp ids */ |
---|
| 11846 | +typedef struct wl_nan_ndp_id_list { |
---|
| 11847 | + uint16 ndp_count; |
---|
| 11848 | + uint8 lndp_id[]; |
---|
| 11849 | +} wl_nan_ndp_id_list_t; |
---|
| 11850 | + |
---|
| 11851 | +/* nan2 status */ |
---|
| 11852 | +typedef struct ndp_session { |
---|
| 11853 | + uint8 lndp_id; |
---|
| 11854 | + uint8 state; |
---|
| 11855 | + uint8 pub_id; |
---|
| 11856 | + uint8 pad; |
---|
| 11857 | +} ndp_session_t; |
---|
| 11858 | + |
---|
| 11859 | +typedef struct wl_nan_ndp_status { |
---|
| 11860 | + struct ether_addr peer_nmi; |
---|
| 11861 | + struct ether_addr peer_ndi; |
---|
| 11862 | + ndp_session_t session; |
---|
| 11863 | + struct ether_addr lndi; |
---|
| 11864 | + uint8 pad[2]; |
---|
| 11865 | +} wl_nan_ndp_status_t; |
---|
| 11866 | + |
---|
| 11867 | +#define NAN_DP_OPAQUE_INFO_DP_RESP 0x01 |
---|
| 11868 | +#define NAN_DP_OPAQUE_INFO_DP_CONF 0x02 |
---|
| 11869 | + |
---|
| 11870 | +typedef struct wl_nan_dp_opaque_info { |
---|
| 11871 | + uint8 frm_mask; /* dp_resp / dp_conf as defined above. */ |
---|
| 11872 | + struct ether_addr initiator_ndi; /* NDI to match in the dp_req. */ |
---|
| 11873 | + uint8 pub_id; /* publish id where the opaque data is included. */ |
---|
| 11874 | + uint8 len; /* len of opaque_info[]. */ |
---|
| 11875 | + uint8 pad[3]; |
---|
| 11876 | + uint8 opaque_info[0]; |
---|
| 11877 | +} wl_nan_dp_opaque_info_t; |
---|
| 11878 | + |
---|
| 11879 | +/* events */ |
---|
| 11880 | +#define NAN_DP_SESSION_UNICAST 0 |
---|
| 11881 | +#define NAN_DP_SESSION_MULTICAST 1 |
---|
| 11882 | +#define NAN_DP_SECURITY_NONE 0 |
---|
| 11883 | +#define NAN_DP_SECURITY_CSID 1 |
---|
| 11884 | +#define NAN_DP_SECURITY_MK 2 |
---|
| 11885 | +#define WL_NAN_DATA_NMSGID_LEN 8 /* 8 bytes as per nan spec */ |
---|
| 11886 | + |
---|
| 11887 | +/* Common event structure for Nan Datapath |
---|
| 11888 | + * Used for sending NDP Indication, Response, Confirmation, Securty Install and Establish events |
---|
| 11889 | + */ |
---|
| 11890 | +typedef struct wl_nan_ev_datapath_cmn { |
---|
| 11891 | + uint8 type; |
---|
| 11892 | + /* ndp_id is valid only if type is unicast */ |
---|
| 11893 | + uint8 ndp_id; |
---|
| 11894 | + uint8 pub_id; |
---|
| 11895 | + uint8 security; |
---|
| 11896 | + /* Following two fields are valid only if type is unicast */ |
---|
| 11897 | + struct ether_addr initiator_ndi; |
---|
| 11898 | + struct ether_addr responder_ndi; |
---|
| 11899 | + struct ether_addr peer_nmi; |
---|
| 11900 | + uint8 status; |
---|
| 11901 | + uint8 role; |
---|
| 11902 | + /* Following two fields are valid only if type is multicast */ |
---|
| 11903 | + uint8 nmsg_id[WL_NAN_DATA_NMSGID_LEN]; |
---|
| 11904 | + uint8 mc_id; |
---|
| 11905 | + uint8 pad; |
---|
| 11906 | + uint16 opt_tlv_len; |
---|
| 11907 | + uint8 opt_tlvs[]; |
---|
| 11908 | +} wl_nan_ev_datapath_cmn_t; |
---|
| 11909 | + |
---|
| 11910 | +/* this is obsolete - DON'T USE */ |
---|
| 11911 | +typedef struct wl_nan_ev_datapath_end { |
---|
| 11912 | + uint8 ndp_id; |
---|
| 11913 | + uint8 status; |
---|
| 11914 | + uint8 pad[2]; |
---|
| 11915 | + struct ether_addr peer_nmi; |
---|
| 11916 | + struct ether_addr peer_ndi; |
---|
| 11917 | +} wl_nan_ev_datapath_end_t; |
---|
| 11918 | + |
---|
| 11919 | +typedef struct wl_tsf { |
---|
| 11920 | + uint32 tsf_l; |
---|
| 11921 | + uint32 tsf_h; |
---|
| 11922 | +} wl_tsf_t; |
---|
| 11923 | + |
---|
| 11924 | +typedef struct wl_nan_ev_rx_bcn { |
---|
| 11925 | + wl_tsf_t tsf; |
---|
| 11926 | + uint16 bcn_len; |
---|
| 11927 | + uint8 pad[2]; |
---|
| 11928 | + uint8 bcn[0]; |
---|
| 11929 | +} wl_nan_ev_rx_bcn_t; |
---|
| 11930 | + |
---|
| 11931 | +/* reason of host assist request */ |
---|
| 11932 | +enum wl_nan_host_assist_reason { |
---|
| 11933 | + WL_NAN_HAST_REASON_NONE = 0, |
---|
| 11934 | + |
---|
| 11935 | + /* reason for host assist request */ |
---|
| 11936 | + WL_NAN_HAST_REASON_NO_CRB = 1, /* NDL: no common NA */ |
---|
| 11937 | + WL_NAN_HAST_REASON_NDC = 2, /* NDL: NDC not compliant */ |
---|
| 11938 | + WL_NAN_HAST_REASON_IMMUT = 3, /* NDL: peer immutable schedule */ |
---|
| 11939 | + WL_NAN_HAST_REASON_RNG = 4, /* NDL: ranging schedule */ |
---|
| 11940 | + WL_NAN_HAST_REASON_QOS = 5, /* NDL: QoS not satisfied */ |
---|
| 11941 | + WL_NAN_HAST_REASON_SVC_NDI_MISSING = 6 /* SD: NDI associated with svc is missing */ |
---|
| 11942 | +}; |
---|
| 11943 | +typedef uint8 wl_nan_host_assist_reason_t; |
---|
| 11944 | + |
---|
| 11945 | +/* WL_NAN_XTLV_HOST_ASSIST_REQ */ |
---|
| 11946 | +typedef struct wl_nan_host_assist_req { |
---|
| 11947 | + struct ether_addr peer_nmi; /* peer nmi */ |
---|
| 11948 | + struct ether_addr initiator_ndi; /* initiator ndi */ |
---|
| 11949 | + uint8 indp_id; /* initiator NDP ID */ |
---|
| 11950 | + wl_nan_frame_type_t frm_type; /* received NAF type */ |
---|
| 11951 | + wl_nan_host_assist_reason_t reason; /* reason of host assist request */ |
---|
| 11952 | + uint8 pub_id; /* Publish ID (valid for WL_NAN_FRM_TYPE_DP_REQ) */ |
---|
| 11953 | + uint8 pad[2]; |
---|
| 11954 | +} wl_nan_host_assist_req_t; |
---|
| 11955 | + |
---|
| 11956 | +/* nan sub-features */ |
---|
| 11957 | +enum wl_nan_fw_cap_flag1 { |
---|
| 11958 | + WL_NAN_FW_CAP_FLAG_NONE = 0x00000000, /* dummy */ |
---|
| 11959 | + WL_NAN_FW_CAP_FLAG1_AVAIL = 0x00000001, |
---|
| 11960 | + WL_NAN_FW_CAP_FLAG1_DISC = 0x00000002, |
---|
| 11961 | + WL_NAN_FW_CAP_FLAG1_DATA = 0x00000004, |
---|
| 11962 | + WL_NAN_FW_CAP_FLAG1_SEC = 0x00000008, |
---|
| 11963 | + WL_NAN_FW_CAP_FLAG1_RANGE = 0x00000010, |
---|
| 11964 | + WL_NAN_FW_CAP_FLAG1_WFA_TB = 0x00000020, |
---|
| 11965 | + WL_NAN_FW_CAP_FLAG1_DAM = 0x00000040, |
---|
| 11966 | + WL_NAN_FW_CAP_FLAG1_DAM_STRICT = 0x00000080, |
---|
| 11967 | + WL_NAN_FW_CAP_FLAG1_DAM_AUTO = 0x00000100, |
---|
| 11968 | + WL_NAN_FW_CAP_FLAG1_DBG = 0x00000200, |
---|
| 11969 | + WL_NAN_FW_CAP_FLAG1_BCMC_IN_NDC = 0x00000400, |
---|
| 11970 | + WL_NAN_FW_CAP_FLAG1_CHSTATS = 0x00000800, |
---|
| 11971 | + WL_NAN_FW_CAP_FLAG1_ASSOC_COEX = 0x00001000, |
---|
| 11972 | + WL_NAN_FW_CAP_FLAG1_FASTDISC = 0x00002000, |
---|
| 11973 | + WL_NAN_FW_CAP_FLAG1_NO_ID_GEN = 0x00004000, |
---|
| 11974 | + WL_NAN_FW_CAP_FLAG1_DP_OPAQUE_DATA = 0x00008000, |
---|
| 11975 | + WL_NAN_FW_CAP_FLAG1_NSR2 = 0x00010000, |
---|
| 11976 | + WL_NAN_FW_CAP_FLAG1_NSR2_SAVE = 0x00020000, |
---|
| 11977 | + WL_NAN_FW_CAP_FLAG1_NANHO = 0x00040000 |
---|
| 11978 | +}; |
---|
| 11979 | + |
---|
| 11980 | +/* WL_NAN_XTLV_GEN_FW_CAP */ |
---|
| 11981 | +typedef struct wl_nan_fw_cap { |
---|
| 11982 | + uint32 flags1; /* nan sub-features compiled in firmware */ |
---|
| 11983 | + uint32 flags2; /* for more sub-features in future */ |
---|
| 11984 | + uint8 max_svc_publishes; /* max num of service publish */ |
---|
| 11985 | + uint8 max_svc_subscribes; /* max num of service subscribe */ |
---|
| 11986 | + uint8 max_lcl_sched_maps; /* max num of local schedule map */ |
---|
| 11987 | + uint8 max_lcl_ndc_entries; /* max num of local NDC entry */ |
---|
| 11988 | + uint8 max_lcl_ndi_interfaces; /* max num of local NDI interface */ |
---|
| 11989 | + uint8 max_peer_entries; /* max num of peer entry */ |
---|
| 11990 | + uint8 max_ndp_sessions; /* max num of NDP session */ |
---|
| 11991 | + uint8 max_concurrent_nan_clusters; /* max num of concurrent clusters */ |
---|
| 11992 | + uint16 max_service_name_len; /* max service name length */ |
---|
| 11993 | + uint16 max_match_filter_len; /* max match filter length */ |
---|
| 11994 | + uint16 max_total_match_filter_len; /* max total match filter length */ |
---|
| 11995 | + uint16 max_service_specific_info_len; /* max service specific info length */ |
---|
| 11996 | + uint16 max_vsa_data_len; /* max vendor specific attrib data length */ |
---|
| 11997 | + uint16 max_mesh_data_len; /* max mesh data length */ |
---|
| 11998 | + uint16 max_app_info_len; /* max app info length */ |
---|
| 11999 | + uint16 max_sdea_svc_specific_info_len; /* max sdea ser specific info length */ |
---|
| 12000 | + uint8 max_queued_tx_followup_msgs; /* max no. of queued tx followup msgs */ |
---|
| 12001 | + uint8 max_subscribe_address; /* max subscribe addresses supported */ |
---|
| 12002 | + uint8 ndp_supported_bands; /* number of ndp supported bands */ |
---|
| 12003 | + uint8 is_ndp_security_supported; /* if secure ndp is supported */ |
---|
| 12004 | + uint8 cipher_suites_supported_mask; /* bitmask for suites supported */ |
---|
| 12005 | + uint8 pad[3]; |
---|
| 12006 | +} wl_nan_fw_cap_t; |
---|
| 12007 | + |
---|
| 12008 | +/* nan cipher suite support mask bits */ |
---|
| 12009 | +#define WL_NAN_CIPHER_SUITE_SHARED_KEY_128_MASK 0x01 |
---|
| 12010 | +#define WL_NAN_CIPHER_SUITE_SHARED_KEY_256_MASK 0x02 |
---|
| 12011 | + |
---|
| 12012 | +/* NAN Save Restore */ |
---|
| 12013 | +#define WL_NAN_NSR2_INFO_MAX_SIZE 2048 /* arbitrary */ |
---|
| 12014 | + |
---|
| 12015 | +/* WL_NAN_XTLV_NSR2_PEER */ |
---|
| 12016 | +typedef struct wl_nan_nsr_peer_info { |
---|
| 12017 | + struct ether_addr nmi; |
---|
| 12018 | + uint8 l_min_slots; /* local QoS min slots */ |
---|
| 12019 | + uint8 p_min_slots; /* peer QoS min slots */ |
---|
| 12020 | + uint16 l_max_latency; /* local QoS max latency */ |
---|
| 12021 | + uint16 p_max_latency; /* peer QoS max latency */ |
---|
| 12022 | + uint8 num_map; /* num of NA map */ |
---|
| 12023 | + uint8 pad; |
---|
| 12024 | + uint16 attrs_len; /* total len of following attrs */ |
---|
| 12025 | + uint8 attrs[]; /* peer attributes (NA/NDC/ULW/DevCap/Element container) */ |
---|
| 12026 | +} wl_nan_nsr_peer_info_t; |
---|
| 12027 | + |
---|
| 12028 | +enum wl_nan_nsr_ndp_flag { |
---|
| 12029 | + WL_NAN_NSR_NDP_FLAG_LCL_INITATOR = 0x0001, |
---|
| 12030 | + WL_NAN_NSR_NDP_FLAG_MCAST = 0x0002 |
---|
| 12031 | +}; |
---|
| 12032 | +typedef uint16 wl_nan_nsr_ndp_flag_t; |
---|
| 12033 | + |
---|
| 12034 | +/* WL_NAN_XTLV_NSR2_NDP */ |
---|
| 12035 | +typedef struct wl_nan_nsr_ndp_info { |
---|
| 12036 | + struct ether_addr peer_nmi; |
---|
| 12037 | + struct ether_addr peer_ndi; |
---|
| 12038 | + struct ether_addr lcl_ndi; |
---|
| 12039 | + uint16 flags; /* wl_nan_nsr_ndp_flag_t */ |
---|
| 12040 | + uint8 pub_id; /* publish id */ |
---|
| 12041 | + uint8 indp_id; /* initiator's ndp id */ |
---|
| 12042 | + uint8 last_token; /* last NDP dialog token */ |
---|
| 12043 | + uint8 pad; |
---|
| 12044 | +} wl_nan_nsr_ndp_info_t; |
---|
| 12045 | + |
---|
| 12046 | +/* NAN2.0 Ranging definitions */ |
---|
| 12047 | + |
---|
| 12048 | +/* result indication bit map */ |
---|
| 12049 | +#define NAN_RANGE_INDICATION_CONT (1<<0) |
---|
| 12050 | +#define NAN_RANGE_INDICATION_INGRESS (1<<1) |
---|
| 12051 | +#define NAN_RANGE_INDICATION_EGRESS (1<<2) |
---|
| 12052 | + |
---|
| 12053 | +/* responder flags */ |
---|
| 12054 | +#define NAN_RANGE_FLAG_AUTO_ACCEPT (1 << 0) |
---|
| 12055 | +#define NAN_RANGE_FLAG_RESULT_REQUIRED (1 << 1) |
---|
| 12056 | + |
---|
| 12057 | +typedef struct wl_nan_range_req { |
---|
| 12058 | + struct ether_addr peer; |
---|
| 12059 | + uint8 publisher_id; |
---|
| 12060 | + uint8 indication; /* bit map for result event */ |
---|
| 12061 | + uint32 resolution; /* default millimeters */ |
---|
| 12062 | + uint32 ingress; /* ingress limit in mm */ |
---|
| 12063 | + uint32 egress; /* egress limit in mm */ |
---|
| 12064 | + uint32 interval; /* max interval(in TU) b/w two ranging measurements */ |
---|
| 12065 | +} wl_nan_range_req_t; |
---|
| 12066 | + |
---|
| 12067 | +#define NAN_RNG_REQ_IOV_LEN 24 |
---|
| 12068 | + |
---|
| 12069 | +typedef uint8 wl_nan_range_id; |
---|
| 12070 | + |
---|
| 12071 | +typedef struct wl_nan_range_resp { |
---|
| 12072 | + wl_nan_range_id range_id; |
---|
| 12073 | + uint8 flags; /* auto response, range result required */ |
---|
| 12074 | + uint8 status; /* accept, reject */ |
---|
| 12075 | + uint8 indication; /* bit map for result event */ |
---|
| 12076 | + uint32 resolution; /* default millimeters */ |
---|
| 12077 | + uint32 ingress; /* ingress limit in mm */ |
---|
| 12078 | + uint32 egress; /* egress limit in mm */ |
---|
| 12079 | + uint32 interval; /* max interval(in TU) b/w two ranging measurements */ |
---|
| 12080 | +} wl_nan_range_resp_t; |
---|
| 12081 | + |
---|
| 12082 | +#define NAN_RNG_RESP_IOV_LEN 20 |
---|
| 12083 | + |
---|
| 12084 | +#define NAN_RNG_TERM_FLAG_IMMEDIATE (1u << 0u) /* Do not wait for TXS */ |
---|
| 12085 | +#define NAN_RNG_TERM_FLAG_SILIENT_TEARDOWN (1u << 1u) /* Do not TX rng_term */ |
---|
| 12086 | +#define NAN_RNG_TERM_FLAG_EVENT_HOST (1u << 2u) /* Notify event to host */ |
---|
| 12087 | +#define NAN_RNG_TERM_FLAG_OPT_TLVS (1u << 3u) /* opt tlvs present */ |
---|
| 12088 | + |
---|
| 12089 | +typedef struct wl_nan_range_cancel_ext { |
---|
| 12090 | + wl_nan_range_id range_id; |
---|
| 12091 | + uint8 flags; |
---|
| 12092 | + uint8 pad[2]; |
---|
| 12093 | +} wl_nan_range_cancel_ext_t; |
---|
| 12094 | + |
---|
| 12095 | +#define NAN_RNG_CANCEL_IOV_FIXED_LEN 4u |
---|
| 12096 | + |
---|
| 12097 | +#define NAN_RNG_MAX_IOV_LEN 255 |
---|
| 12098 | + |
---|
| 12099 | +typedef struct wl_nan_ev_rng_req_ind { |
---|
| 12100 | + struct ether_addr peer_m_addr; |
---|
| 12101 | + uint8 rng_id; |
---|
| 12102 | + /* ftm parameters */ |
---|
| 12103 | + uint8 max_burst_dur; |
---|
| 12104 | + uint8 min_ftm_delta; |
---|
| 12105 | + uint8 max_num_ftm; |
---|
| 12106 | + uint8 ftm_format_bw; |
---|
| 12107 | + /* location info availability bit map */ |
---|
| 12108 | + uint8 lc_info_avail; |
---|
| 12109 | + /* Last movement indication */ |
---|
| 12110 | + uint16 last_movement; |
---|
| 12111 | + uint8 pad[2]; |
---|
| 12112 | +} wl_nan_ev_rng_req_ind_t; |
---|
| 12113 | + |
---|
| 12114 | +#define NAN_RNG_REQ_IND_SIZE 14 |
---|
| 12115 | + |
---|
| 12116 | +typedef struct wl_nan_ev_rng_rpt_ind { |
---|
| 12117 | + uint32 dist_mm; /* in millimeter */ |
---|
| 12118 | + struct ether_addr peer_m_addr; |
---|
| 12119 | + uint8 indication; /* indication definitions mentioned above */ |
---|
| 12120 | + uint8 rng_id; |
---|
| 12121 | +} wl_nan_ev_rng_rpt_ind_t; |
---|
| 12122 | + |
---|
| 12123 | +#define NAN_RNG_RPT_IND_SIZE 12 |
---|
| 12124 | + |
---|
| 12125 | +/* number of continuous ranging crbs which can be idle, |
---|
| 12126 | +* after which ranging session will be terminated. |
---|
| 12127 | +* Default value is 5. Set to zero for disabling the |
---|
| 12128 | +* idle timeout functionality |
---|
| 12129 | +*/ |
---|
| 12130 | +typedef uint8 wl_nan_range_idle_count_t; |
---|
| 12131 | + |
---|
| 12132 | +/* nan ranging termination reason codes */ |
---|
| 12133 | +#define NAN_RNG_TERM_IDLE_TIMEOUT 1 /* no ftms from peer */ |
---|
| 12134 | +#define NAN_RNG_TERM_PEER_REQ 2 |
---|
| 12135 | +#define NAN_RNG_TERM_USER_REQ 3 |
---|
| 12136 | +#define NAN_RNG_TERM_RNG_RESP_TIMEOUT 4 |
---|
| 12137 | + |
---|
| 12138 | +typedef struct wl_nan_ev_rng_term_ind { |
---|
| 12139 | + struct ether_addr peer_m_addr; |
---|
| 12140 | + uint8 reason_code; |
---|
| 12141 | + uint8 rng_id; |
---|
| 12142 | +} wl_nan_ev_rng_term_ind_t; |
---|
| 12143 | + |
---|
| 12144 | +#define NAN_RNG_TERM_IND_SIZE 8 |
---|
| 12145 | + |
---|
| 12146 | +typedef struct wl_nan_ev_rng_resp { |
---|
| 12147 | + struct ether_addr peer_m_addr; |
---|
| 12148 | + uint8 status; |
---|
| 12149 | + uint8 rng_id; |
---|
| 12150 | +} wl_nan_ev_rng_resp_t; |
---|
| 12151 | + |
---|
| 12152 | +/* Used by NDL schedule events - |
---|
| 12153 | + * WL_NAN_EVENT_PEER_SCHED_UPD_NOTIF, WL_NAN_EVENT_PEER_SCHED_REQ |
---|
| 12154 | + * WL_NAN_EVENT_PEER_SCHED_RESP, WL_NAN_EVENT_PEER_SCHED_CONF |
---|
| 12155 | + */ |
---|
| 12156 | +typedef struct wl_nan_ev_sched_info { |
---|
| 12157 | + struct ether_addr peer_nmi; |
---|
| 12158 | + uint8 ndl_status; /* applies only to sched resp/conf */ |
---|
| 12159 | + uint8 pad; |
---|
| 12160 | + uint16 opt_tlv_len; |
---|
| 12161 | + uint8 opt_tlvs[]; |
---|
| 12162 | +} wl_nan_ev_sched_info_t; |
---|
| 12163 | + |
---|
| 12164 | +/* WL_NAN_EVENT_CHAN_BOUNDARY */ |
---|
| 12165 | +typedef struct wl_nan_chbound_info { |
---|
| 12166 | + uint32 cluster_tsf_h; /* Current Cluster TSF High */ |
---|
| 12167 | + uint32 cluster_tsf_l; /* Current Cluster TSF Low */ |
---|
| 12168 | + uint16 cur_chspec; |
---|
| 12169 | + uint16 opt_tlvs_len; |
---|
| 12170 | + uint8 opt_tlvs[]; |
---|
| 12171 | +} wl_nan_chbound_info_t; |
---|
| 12172 | + |
---|
| 12173 | +/* channel stats (includes nan & non-nan) */ |
---|
| 12174 | + |
---|
| 12175 | +/* WL_NAN_XTLV_CCA_STATS */ |
---|
| 12176 | +typedef struct wl_nan_cca_stats { |
---|
| 12177 | + uint16 chanspec; |
---|
| 12178 | + uint8 pad[2]; |
---|
| 12179 | + uint32 sample_dur; |
---|
| 12180 | + |
---|
| 12181 | + uint32 congest_ibss; |
---|
| 12182 | + uint32 congest_obss; |
---|
| 12183 | + uint32 interference; |
---|
| 12184 | +} wl_nan_cca_stats_t; |
---|
| 12185 | + |
---|
| 12186 | +/* WL_NAN_XTLV_PER_STATS */ |
---|
| 12187 | +typedef struct wl_nan_per_stats_s { |
---|
| 12188 | + uint16 chanspec; |
---|
| 12189 | + uint8 pad[2]; |
---|
| 12190 | + uint32 sample_dur; |
---|
| 12191 | + |
---|
| 12192 | + uint32 txframe; /* tx data frames */ |
---|
| 12193 | + uint32 txretrans; /* tx mac retransmits */ |
---|
| 12194 | + uint32 txerror; /* tx data errors */ |
---|
| 12195 | + uint32 txctl; /* tx management frames */ |
---|
| 12196 | + uint32 txserr; /* tx status errors */ |
---|
| 12197 | + |
---|
| 12198 | + uint32 rxframe; /* rx data frames */ |
---|
| 12199 | + uint32 rxerror; /* rx data errors */ |
---|
| 12200 | + uint32 rxctl; /* rx management frames */ |
---|
| 12201 | + |
---|
| 12202 | + uint32 txbar; /* tx bar */ |
---|
| 12203 | + uint32 rxbar; /* rx bar */ |
---|
| 12204 | + uint32 txaction; /* tx action frame */ |
---|
| 12205 | + uint32 rxaction; /* rx action frame */ |
---|
| 12206 | + uint32 txlost; /* lost packets reported in txs */ |
---|
| 12207 | + uint32 rxback; /* rx block ack */ |
---|
| 12208 | + uint32 txback; /* tx bloak ack */ |
---|
| 12209 | +} wl_nan_per_stats_t; |
---|
| 12210 | + |
---|
| 12211 | +/* fast discovery beacon config |
---|
| 12212 | + * WL_NAN_XTLV_CFG_FDISC_TBMP |
---|
| 12213 | +*/ |
---|
| 12214 | +typedef struct wl_nan_fastdisc_s { |
---|
| 12215 | + uint8 id; |
---|
| 12216 | + uint8 bitmap_len; |
---|
| 12217 | + uint8 pad[2]; |
---|
| 12218 | + uint8 bitmap[]; |
---|
| 12219 | +} wl_nan_fastdisc_t; |
---|
| 12220 | + |
---|
| 12221 | +#define WL_NAN_FASTDISC_CFG_SIZE 1024 /* arbitrary */ |
---|
| 12222 | + |
---|
6705 | 12223 | /* ********************* end of NAN section ******************************** */ |
---|
6706 | | -#endif /* WL_NAN */ |
---|
| 12224 | +/* endif WL_NAN */ |
---|
6707 | 12225 | |
---|
6708 | 12226 | #define P2P_NAN_IOC_BUFSZ 512 /* some sufficient ioc buff size */ |
---|
6709 | 12227 | #define WL_P2P_NAN_IOCTL_VERSION 0x1 |
---|
6710 | 12228 | |
---|
6711 | 12229 | /* container for p2p nan iovtls & events */ |
---|
6712 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_p2p_nan_ioc { |
---|
| 12230 | +typedef struct wl_p2p_nan_ioc { |
---|
6713 | 12231 | uint16 version; /* interface command or event version */ |
---|
6714 | 12232 | uint16 id; /* p2p nan ioctl cmd ID */ |
---|
6715 | 12233 | uint16 len; /* total length of data[] */ |
---|
6716 | 12234 | uint16 pad; /* padding */ |
---|
6717 | | - uint8 data [1]; /* var len payload of bcm_xtlv_t type */ |
---|
6718 | | -} BWL_POST_PACKED_STRUCT wl_p2p_nan_ioc_t; |
---|
| 12235 | + uint8 data []; /* var len payload of bcm_xtlv_t type */ |
---|
| 12236 | +} wl_p2p_nan_ioc_t; |
---|
6719 | 12237 | |
---|
6720 | 12238 | /* p2p nan cmd IDs */ |
---|
6721 | 12239 | enum wl_p2p_nan_cmds { |
---|
.. | .. |
---|
6749 | 12267 | uint16 pad2; /* Padding */ |
---|
6750 | 12268 | uint32 avail_bmap; /* availability interval bitmap */ |
---|
6751 | 12269 | uint32 chanspec; /* Chanspec */ |
---|
6752 | | - uint8 ie[1]; /* hex ie data */ |
---|
| 12270 | + uint8 ie[]; /* hex ie data */ |
---|
6753 | 12271 | } wl_p2p_nan_config_t; |
---|
6754 | 12272 | |
---|
6755 | 12273 | #define WL_P2P_NAN_SERVICE_LIST_VERSION 1 |
---|
.. | .. |
---|
6790 | 12308 | uint32 avl_bmp; /* availability interval bitmap */ |
---|
6791 | 12309 | } nan_post_disc_p2p_data_t; |
---|
6792 | 12310 | |
---|
6793 | | -/* timeslot etc for NAN */ |
---|
6794 | 12311 | enum { |
---|
6795 | | - WL_TMU_TU = 0, |
---|
6796 | | - WL_TMU_SEC = 1, |
---|
6797 | | - WL_TMU_MILLI_SEC = 2, |
---|
6798 | | - WL_TMU_MICRO_SEC = 3, |
---|
6799 | | - WL_TMU_NANO_SEC = 4, |
---|
6800 | | - WL_TMU_PICO_SEC = 5 |
---|
| 12312 | + WL_AVAIL_NONE = 0x0000, |
---|
| 12313 | + WL_AVAIL_LOCAL = 0x0001, |
---|
| 12314 | + WL_AVAIL_PEER = 0x0002, |
---|
| 12315 | + WL_AVAIL_NDC = 0x0003, |
---|
| 12316 | + WL_AVAIL_IMMUTABLE = 0x0004, |
---|
| 12317 | + WL_AVAIL_RESPONSE = 0x0005, |
---|
| 12318 | + WL_AVAIL_COUNTER = 0x0006, |
---|
| 12319 | + WL_AVAIL_RANGING = 0x0007, |
---|
| 12320 | + WL_AVAIL_UPD_POT = 0x0008, /* modify potential, keep committed/conditional */ |
---|
| 12321 | + WL_AVAIL_UPD_COM_COND = 0x0009, /* modify committed/conditional, keep potential */ |
---|
| 12322 | + WL_AVAIL_REMOVE_MAP = 0x000A, /* remove map */ |
---|
| 12323 | + WL_AVAIL_FRM_TYPE = 0x000B, /* specify frame types containing NA */ |
---|
| 12324 | + WL_AVAIL_TYPE_MAX = WL_AVAIL_FRM_TYPE /* New ones before and update */ |
---|
6801 | 12325 | }; |
---|
6802 | | - |
---|
6803 | | -typedef int16 wl_tmu_t; |
---|
6804 | | - |
---|
6805 | | -typedef struct { |
---|
6806 | | - uint32 intvl; /* time interval */ |
---|
6807 | | - wl_tmu_t tmu; /* time unit */ |
---|
6808 | | - uint8 pad[2]; /* padding */ |
---|
6809 | | -} wl_time_interval_t; |
---|
6810 | | - |
---|
6811 | | -typedef struct wl_time_slot { |
---|
6812 | | - wl_time_interval_t start; /* from time ref; in TU */ |
---|
6813 | | - wl_time_interval_t duration; /* from start; in TU */ |
---|
6814 | | - uint32 chanspec; /* channel spec */ |
---|
6815 | | -} wl_time_slot_t; |
---|
6816 | | - |
---|
6817 | | -/* time reference */ |
---|
6818 | | -enum { |
---|
6819 | | - WL_TIME_REF_NONE = 0, |
---|
6820 | | - WL_TIME_REF_DEV_TSF = 1, |
---|
6821 | | - WL_TIME_REF_NAN_DW = 2, |
---|
6822 | | - WL_TIME_REF_TBTT = 3, |
---|
6823 | | - WL_TIME_REF_MAX = 4 |
---|
6824 | | -}; |
---|
6825 | | - |
---|
6826 | | -typedef int16 wl_time_ref_t; |
---|
6827 | | - |
---|
6828 | | -/* Read only flags */ |
---|
6829 | | -enum { |
---|
6830 | | - WL_AVAIL_NONE = 0, |
---|
6831 | | - WL_AVAIL_NAN_PUBLISHED = 0x0001, /* Published by NAN */ |
---|
6832 | | - WL_AVAIL_SCHEDULED = 0x0002, /* already scheduled */ |
---|
6833 | | -}; |
---|
| 12326 | +#define WL_AVAIL_TYPE_MASK 0x000F |
---|
| 12327 | +#define WL_AVAIL_FLAG_REMOVE 0x2000 /* remove schedule attr of given type & map id */ |
---|
| 12328 | +#define WL_AVAIL_FLAG_SELECTED_NDC 0x4000 |
---|
| 12329 | +#define WL_AVAIL_FLAG_RAW_MODE 0x8000 |
---|
| 12330 | +#define WL_AVAIL_FLAGS_MASK 0xFF00 |
---|
| 12331 | +#define WL_AVAIL_FLAGS_SHIFT 8 |
---|
6834 | 12332 | |
---|
6835 | 12333 | typedef int16 wl_avail_flags_t; |
---|
6836 | 12334 | |
---|
| 12335 | +/* availability entry flags */ |
---|
| 12336 | +enum { |
---|
| 12337 | + WL_AVAIL_ENTRY_NONE = 0x0000, |
---|
| 12338 | + WL_AVAIL_ENTRY_COM = 0x0001, /* committed */ |
---|
| 12339 | + WL_AVAIL_ENTRY_POT = 0x0002, /* potential */ |
---|
| 12340 | + WL_AVAIL_ENTRY_COND = 0x0004, /* conditional */ |
---|
| 12341 | + WL_AVAIL_ENTRY_PAGED = 0x0008, /* P-NDL */ |
---|
| 12342 | + WL_AVAIL_ENTRY_USAGE = 0x0030, /* usage preference */ |
---|
| 12343 | + WL_AVAIL_ENTRY_BIT_DUR = 0x00C0, /* bit duration */ |
---|
| 12344 | + WL_AVAIL_ENTRY_BAND_PRESENT = 0x0100, /* band present */ |
---|
| 12345 | + WL_AVAIL_ENTRY_CHAN_PRESENT = 0x0200, /* channel information present */ |
---|
| 12346 | + WL_AVAIL_ENTRY_CHAN_ENTRY_PRESENT = 0x0400, /* channel entry (opclass+bitmap) */ |
---|
| 12347 | + /* free to use 0x0800 */ |
---|
| 12348 | + WL_AVAIL_ENTRY_RXNSS = 0xF000 /* max num of spatial stream RX */ |
---|
| 12349 | +}; |
---|
| 12350 | + |
---|
| 12351 | +/* bit duration */ |
---|
| 12352 | +enum { |
---|
| 12353 | + WL_AVAIL_BIT_DUR_16 = 0, /* 16TU */ |
---|
| 12354 | + WL_AVAIL_BIT_DUR_32 = 1, /* 32TU */ |
---|
| 12355 | + WL_AVAIL_BIT_DUR_64 = 2, /* 64TU */ |
---|
| 12356 | + WL_AVAIL_BIT_DUR_128 = 3, /* 128TU */ |
---|
| 12357 | +}; |
---|
| 12358 | + |
---|
| 12359 | +/* period */ |
---|
| 12360 | +enum { |
---|
| 12361 | + WL_AVAIL_PERIOD_0 = 0, /* 0TU */ |
---|
| 12362 | + WL_AVAIL_PERIOD_128 = 1, /* 128TU */ |
---|
| 12363 | + WL_AVAIL_PERIOD_256 = 2, /* 256TU */ |
---|
| 12364 | + WL_AVAIL_PERIOD_512 = 3, /* 512TU */ |
---|
| 12365 | + WL_AVAIL_PERIOD_1024 = 4, /* 1024TU */ |
---|
| 12366 | + WL_AVAIL_PERIOD_2048 = 5, /* 2048TU */ |
---|
| 12367 | + WL_AVAIL_PERIOD_4096 = 6, /* 4096TU */ |
---|
| 12368 | + WL_AVAIL_PERIOD_8192 = 7, /* 8192TU */ |
---|
| 12369 | +}; |
---|
| 12370 | + |
---|
| 12371 | +/* band */ |
---|
| 12372 | +enum { |
---|
| 12373 | + WL_AVAIL_BAND_NONE = 0, /* reserved */ |
---|
| 12374 | + WL_AVAIL_BAND_SUB1G = 1, /* sub-1 GHz */ |
---|
| 12375 | + WL_AVAIL_BAND_2G = 2, /* 2.4 GHz */ |
---|
| 12376 | + WL_AVAIL_BAND_3G = 3, /* reserved (for 3.6 GHz) */ |
---|
| 12377 | + WL_AVAIL_BAND_5G = 4, /* 4.9 and 5 GHz */ |
---|
| 12378 | + WL_AVAIL_BAND_60G = 5, /* reserved (for 60 GHz) */ |
---|
| 12379 | +}; |
---|
| 12380 | + |
---|
| 12381 | +#define WL_AVAIL_ENTRY_TYPE_MASK 0x000F |
---|
| 12382 | +#define WL_AVAIL_ENTRY_USAGE_MASK 0x0030 /* up to 4 usage preferences */ |
---|
| 12383 | +#define WL_AVAIL_ENTRY_USAGE_SHIFT 4 |
---|
| 12384 | +#define WL_AVAIL_ENTRY_USAGE_VAL(_flags) (((_flags) & WL_AVAIL_ENTRY_USAGE_MASK) \ |
---|
| 12385 | + >> WL_AVAIL_ENTRY_USAGE_SHIFT) |
---|
| 12386 | + |
---|
| 12387 | +#define WL_AVAIL_ENTRY_BIT_DUR_MASK 0x00C0 /* 0:16TU, 1:32TU, 2:64TU, 3:128TU */ |
---|
| 12388 | +#define WL_AVAIL_ENTRY_BIT_DUR_SHIFT 6 |
---|
| 12389 | +#define WL_AVAIL_ENTRY_BIT_DUR_VAL(_flags) (((_flags) & WL_AVAIL_ENTRY_BIT_DUR_MASK) \ |
---|
| 12390 | + >> WL_AVAIL_ENTRY_BIT_DUR_SHIFT) |
---|
| 12391 | + |
---|
| 12392 | +#define WL_AVAIL_ENTRY_BAND_MASK 0x0100 /* 0=band not present, 1=present */ |
---|
| 12393 | +#define WL_AVAIL_ENTRY_BAND_SHIFT 8 |
---|
| 12394 | + |
---|
| 12395 | +#define WL_AVAIL_ENTRY_CHAN_MASK 0x0200 /* 0=channel info not present, 1=present */ |
---|
| 12396 | +#define WL_AVAIL_ENTRY_CHAN_SHIFT 9 |
---|
| 12397 | + |
---|
| 12398 | +#define WL_AVAIL_ENTRY_CHAN_ENTRY_MASK 0x0400 /* 0=chanspec, 1=hex channel entry */ |
---|
| 12399 | +#define WL_AVAIL_ENTRY_CHAN_ENTRY_SHIFT 10 |
---|
| 12400 | + |
---|
| 12401 | +#define WL_AVAIL_ENTRY_RXNSS_MASK 0xF000 |
---|
| 12402 | +#define WL_AVAIL_ENTRY_RXNSS_SHIFT 12 |
---|
| 12403 | +#define WL_AVAIL_ENTRY_RXNSS_VAL(_flags) (((_flags) & WL_AVAIL_ENTRY_RXNSS_MASK) \ |
---|
| 12404 | + >> WL_AVAIL_ENTRY_RXNSS_SHIFT) |
---|
| 12405 | +#define WL_AVAIL_ENTRY_RXNSS_MAX 15 /* 0-15 */ |
---|
| 12406 | + |
---|
| 12407 | +/* mask for channel_entry (to be obsoleted) */ |
---|
| 12408 | +#define WL_AVAIL_ENTRY_OPCLASS_MASK 0xFF |
---|
| 12409 | +#define WL_AVAIL_ENTRY_CHAN_BITMAP_MASK 0xFF00 |
---|
| 12410 | +#define WL_AVAIL_ENTRY_CHAN_BITMAP_SHIFT 8 |
---|
| 12411 | +#define WL_AVAIL_ENTRY_CHAN_BITMAP_VAL(_info) (((_info) & WL_AVAIL_ENTRY_CHAN_BITMAP_MASK) \ |
---|
| 12412 | + >> WL_AVAIL_ENTRY_CHAN_BITMAP_SHIFT) |
---|
| 12413 | + |
---|
| 12414 | +/* Used for raw channel entry field input */ |
---|
| 12415 | +#define MAX_CHAN_ENTRY_LEN 6 |
---|
| 12416 | + |
---|
| 12417 | +typedef struct wl_avail_entry { |
---|
| 12418 | + uint16 length; /* total length */ |
---|
| 12419 | + uint16 start_offset; /* in TUs, multiply by 16 for total offset */ |
---|
| 12420 | + union { |
---|
| 12421 | + uint32 channel_info; /* either chanspec or hex channel entry (opclass + |
---|
| 12422 | + * bitmap per NAN spec), as indicated by setting |
---|
| 12423 | + * WL_AVAIL_ENTRY_HEX_CHAN_ENTRY flag |
---|
| 12424 | + */ |
---|
| 12425 | + uint32 band; /* defined by WL_BAND enum, 2=2.4GHz, 4=5GHz */ |
---|
| 12426 | + uint8 channel_entry[MAX_CHAN_ENTRY_LEN]; |
---|
| 12427 | + uint8 align[8]; /* aligned len of union in structure (not for use) |
---|
| 12428 | + * if member of union is changed, |
---|
| 12429 | + * update length of align[] accordingly. |
---|
| 12430 | + */ |
---|
| 12431 | + } u; /* band or channel value, 0=all band/channels */ |
---|
| 12432 | + uint8 sched_map_id; /* avail map id associated with sched entry */ |
---|
| 12433 | + uint8 pad; |
---|
| 12434 | + uint8 period; /* in TUs, defined by WL_AVAIL_PERIOD enum |
---|
| 12435 | + * 1:128, 2:256, 3:512, 4:1024, 5:2048, 6:4096, |
---|
| 12436 | + * 7:8192 |
---|
| 12437 | + */ |
---|
| 12438 | + uint8 bitmap_len; |
---|
| 12439 | + uint16 flags; /* defined by avail entry flags enum: |
---|
| 12440 | + * type, usage pref, bit duration, rx nss, |
---|
| 12441 | + * and band, channel or channel entry |
---|
| 12442 | + */ |
---|
| 12443 | + uint8 bitmap[]; /* time bitmap */ |
---|
| 12444 | +} wl_avail_entry_t; |
---|
| 12445 | + |
---|
| 12446 | +#define WL_AVAIL_VERSION 1 /* current wl_avail version */ |
---|
| 12447 | + |
---|
6837 | 12448 | typedef struct wl_avail { |
---|
6838 | | - /* future use/specific use. |
---|
6839 | | - * To indicate any specific use |
---|
6840 | | - */ |
---|
6841 | | - wl_avail_flags_t flags; |
---|
6842 | | - /* time reference base for slots */ |
---|
6843 | | - wl_time_ref_t time_ref; |
---|
6844 | | - /* repeat sequence */ |
---|
6845 | | - wl_time_interval_t repeat; |
---|
6846 | | - /* num of slots present */ |
---|
6847 | | - uint16 num_slots; |
---|
6848 | | - /* padding */ |
---|
6849 | | - uint8 pad[2]; |
---|
6850 | | - /* slots */ |
---|
6851 | | - wl_time_slot_t slots[1]; |
---|
| 12449 | + uint16 length; /* total length */ |
---|
| 12450 | + uint16 flags; /* LSB - avail type (defined by WL_AVAIL enum) |
---|
| 12451 | + * MSB - avail flags |
---|
| 12452 | + */ |
---|
| 12453 | + uint8 id; /* id used for multiple maps/avail */ |
---|
| 12454 | + uint8 lndc_id; /* ndc id used in multi-ndc case */ |
---|
| 12455 | + uint8 version; |
---|
| 12456 | + uint8 pad; |
---|
| 12457 | + struct ether_addr addr; /* peer mac address or ndc id */ |
---|
| 12458 | + uint8 num_entries; |
---|
| 12459 | + uint8 unused_byte; |
---|
| 12460 | + /* add additional fields above this line */ |
---|
| 12461 | + uint8 entry[]; |
---|
6852 | 12462 | } wl_avail_t; |
---|
| 12463 | + |
---|
| 12464 | +#define WL_AVAIL_MIN_LEN(n) ((n) ? OFFSETOF(wl_avail_t, entry) + \ |
---|
| 12465 | + ((n) * OFFSETOF(wl_avail_entry_t, bitmap)) : 0) |
---|
| 12466 | + |
---|
| 12467 | +/* unaligned schedule (window) */ |
---|
| 12468 | +typedef struct wl_avail_ulw { |
---|
| 12469 | + uint8 id; /* schedule ID */ |
---|
| 12470 | + uint8 overwrite; /* bit 0: overwrite all |
---|
| 12471 | + * 1-4: map ID if overwrite all is 0 |
---|
| 12472 | + */ |
---|
| 12473 | + uint16 flags; |
---|
| 12474 | + uint32 start; /* start time of first ULW, in us */ |
---|
| 12475 | + uint32 dur; /* duration of ULW, in us */ |
---|
| 12476 | + uint32 period; /* time between consecutive ULWs, in us */ |
---|
| 12477 | + union { |
---|
| 12478 | + uint32 chanspec; |
---|
| 12479 | + uint32 band; |
---|
| 12480 | + uint8 chan_entry[MAX_CHAN_ENTRY_LEN]; |
---|
| 12481 | + uint8 pad[8]; |
---|
| 12482 | + } u; |
---|
| 12483 | + uint8 cntdwn; /* remaining ULWs before schedule ends */ |
---|
| 12484 | + uint8 pad[3]; |
---|
| 12485 | +} wl_avail_ulw_t; |
---|
| 12486 | + |
---|
| 12487 | +/* unset: NAN is not available during ULW, set: NAN is avail depending on ctrl flags */ |
---|
| 12488 | +#define WL_NAN_ULW_CTRL_PRESENT (1 << 0) |
---|
| 12489 | +/* unset: band, set: channel */ |
---|
| 12490 | +#define WL_NAN_ULW_CTRL_TYPE (1 << 1) |
---|
| 12491 | +/* set: NAN is availabile on specified band/channel */ |
---|
| 12492 | +#define WL_NAN_ULW_CTRL_AVAIL (1 << 2) |
---|
| 12493 | +/* channel is provided in raw attribute format */ |
---|
| 12494 | +#define WL_NAN_ULW_CTRL_RAW_CHAN (1 << 3) |
---|
| 12495 | + |
---|
| 12496 | +/* nan wfa testmode operations */ |
---|
| 12497 | +enum { |
---|
| 12498 | + WL_NAN_WFA_TM_IGNORE_TERMINATE_NAF = 0x00000001, |
---|
| 12499 | + WL_NAN_WFA_TM_IGNORE_RX_DATA_OUTSIDE_CRB = 0x00000002, |
---|
| 12500 | + WL_NAN_WFA_TM_ALLOW_TX_DATA_OUTSIDE_CRB = 0x00000004, |
---|
| 12501 | + WL_NAN_WFA_TM_ENFORCE_NDL_COUNTER = 0x00000008, |
---|
| 12502 | + WL_NAN_WFA_TM_BYPASS_NDL_PROPOSAL_VALIDATION = 0x00000010, |
---|
| 12503 | + /* allow data(pings) tx while ndp sec negotiation */ |
---|
| 12504 | + WL_NAN_WFA_TM_SEC_SEND_PINGS_BYPASS_NDP_SM = 0x00000020, |
---|
| 12505 | + /* generate and insert incorrect mic */ |
---|
| 12506 | + WL_NAN_WFA_TM_SEC_INCORRECT_MIC = 0x00000040, |
---|
| 12507 | + /* send m4 reject deliberately */ |
---|
| 12508 | + WL_NAN_WFA_TM_SEC_REJECT_STATUS4M4 = 0x00000080, |
---|
| 12509 | + /* send mgmt frame (for eg. ndp terminate) in clear txt (bypass security) */ |
---|
| 12510 | + WL_NAN_WFA_TM_SEC_SEND_MGMT_CLEAR = 0x00000100, |
---|
| 12511 | + /* validate qos */ |
---|
| 12512 | + WL_NAN_WFA_TM_NDL_QOS_VALIDATE = 0x00000200, |
---|
| 12513 | + /* firmware generated schedule update */ |
---|
| 12514 | + WL_NAN_WFA_TM_GEN_SCHED_UPD = 0x00000400, |
---|
| 12515 | + /* add lower 4-bytes of TSF to configured start time */ |
---|
| 12516 | + WL_NAN_WFA_TM_ULW_START_TIME = 0x00000800, |
---|
| 12517 | + /* enable schedule validation for SDF */ |
---|
| 12518 | + WL_NAN_WFA_TM_SDF_SCHED_VALIDATE = 0x00001000, |
---|
| 12519 | + /* by pass faw na iovar */ |
---|
| 12520 | + WL_NAN_WFA_TM_SKIP_RAW_NA_BLOB = 0x00002000, |
---|
| 12521 | + /* overwrite local NA with peer NA in received frame */ |
---|
| 12522 | + WL_NAN_WFA_TM_LOCAL_NA_OVERWRITE = 0x00004000, |
---|
| 12523 | + /* randomize and self configure ndl qos(needed at responder in auto mode) */ |
---|
| 12524 | + WL_NAN_WFA_TM_SELF_CFG_NDL_QOS = 0x00008000, |
---|
| 12525 | + /* send NAF frames only in DW */ |
---|
| 12526 | + WL_NAN_WFA_TM_SEND_NAF_IN_DW = 0x00010000, |
---|
| 12527 | + /* restrict channels used for countered slots to Ch 6/149 only */ |
---|
| 12528 | + WL_NAN_WFA_TM_RESTRICT_COUNTER_SLOTS_CHAN = 0x00020000, |
---|
| 12529 | + /* NDPE negative test case (4.2.5 & 4.2.6) */ |
---|
| 12530 | + WL_NAN_WFA_TM_NDPE_NEGATIVE_TEST_TB = 0x00040000, |
---|
| 12531 | + /* Set NDPE(NAN3.0) capable bit in dev cap attr */ |
---|
| 12532 | + WL_NAN_WFA_TM_ENABLE_NDPE_CAP = 0x00080000, |
---|
| 12533 | + |
---|
| 12534 | + /* add above & update mask */ |
---|
| 12535 | + WL_NAN_WFA_TM_FLAG_MASK = 0x000FFFFF |
---|
| 12536 | +}; |
---|
| 12537 | +typedef uint32 wl_nan_wfa_testmode_t; |
---|
| 12538 | + |
---|
| 12539 | +/* To be removed; replaced by wl_nan_vndr_payload */ |
---|
| 12540 | +typedef struct wl_nan_vndr_ie { |
---|
| 12541 | + uint32 flags; /* bitmask indicating which packet(s) contain this IE */ |
---|
| 12542 | + uint16 body_len; /* length of body (does not include oui field) */ |
---|
| 12543 | + uint8 pad[2]; |
---|
| 12544 | + uint8 oui[DOT11_OUI_LEN]; |
---|
| 12545 | + uint8 pad2; |
---|
| 12546 | + uint8 body[]; /* vendor IE payload */ |
---|
| 12547 | +} wl_nan_vndr_ie_t; |
---|
| 12548 | + |
---|
| 12549 | +typedef struct wl_nan_vndr_payload { |
---|
| 12550 | + uint32 flags; /* bitmask indicating which packet(s) contain payload */ |
---|
| 12551 | + uint16 payload_len; /* length of payload */ |
---|
| 12552 | + uint8 pad[2]; |
---|
| 12553 | + uint8 payload[]; /* payload to be appended to NAN frame */ |
---|
| 12554 | +} wl_nan_vndr_payload_t; |
---|
| 12555 | + |
---|
| 12556 | +typedef struct wl_nan_dev_cap { |
---|
| 12557 | + uint8 bands[NAN_MAX_BANDS]; |
---|
| 12558 | + uint8 awake_dw[NAN_MAX_BANDS]; |
---|
| 12559 | + uint8 overwrite_mapid[NAN_MAX_BANDS]; |
---|
| 12560 | + uint8 mapid; /* dev cap mapid */ |
---|
| 12561 | + uint8 all_maps; /* applies to device */ |
---|
| 12562 | + uint8 paging; |
---|
| 12563 | + uint8 pad[3]; |
---|
| 12564 | +} wl_nan_dev_cap_t; |
---|
| 12565 | + |
---|
| 12566 | +/* arbitrary max len for frame template */ |
---|
| 12567 | +#define WL_NAN_FRM_TPLT_MAX_LEN 1024 |
---|
| 12568 | + |
---|
| 12569 | +typedef struct wl_nan_frm_tplt { |
---|
| 12570 | + wl_nan_frame_type_t type; |
---|
| 12571 | + uint8 pad; |
---|
| 12572 | + uint16 len; /* length of template */ |
---|
| 12573 | + uint8 data[]; /* template */ |
---|
| 12574 | +} wl_nan_frm_tplt_t; |
---|
6853 | 12575 | |
---|
6854 | 12576 | #define RSSI_THRESHOLD_SIZE 16 |
---|
6855 | 12577 | #define MAX_IMP_RESP_SIZE 256 |
---|
6856 | 12578 | |
---|
6857 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_rssi_bias { |
---|
6858 | | - int32 version; /* version */ |
---|
6859 | | - int32 threshold[RSSI_THRESHOLD_SIZE]; /* threshold */ |
---|
6860 | | - int32 peak_offset; /* peak offset */ |
---|
6861 | | - int32 bias; /* rssi bias */ |
---|
6862 | | - int32 gd_delta; /* GD - GD_ADJ */ |
---|
6863 | | - int32 imp_resp[MAX_IMP_RESP_SIZE]; /* (Hi*Hi)+(Hr*Hr) */ |
---|
6864 | | -} BWL_POST_PACKED_STRUCT wl_proxd_rssi_bias_t; |
---|
| 12579 | +typedef struct wl_proxd_rssi_bias { |
---|
| 12580 | + int32 version; /**< version */ |
---|
| 12581 | + int32 threshold[RSSI_THRESHOLD_SIZE]; /**< threshold */ |
---|
| 12582 | + int32 peak_offset; /**< peak offset */ |
---|
| 12583 | + int32 bias; /**< rssi bias */ |
---|
| 12584 | + int32 gd_delta; /**< GD - GD_ADJ */ |
---|
| 12585 | + int32 imp_resp[MAX_IMP_RESP_SIZE]; /**< (Hi*Hi)+(Hr*Hr) */ |
---|
| 12586 | +} wl_proxd_rssi_bias_t; |
---|
6865 | 12587 | |
---|
6866 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_rssi_bias_avg { |
---|
6867 | | - int32 avg_threshold[RSSI_THRESHOLD_SIZE]; /* avg threshold */ |
---|
6868 | | - int32 avg_peak_offset; /* avg peak offset */ |
---|
6869 | | - int32 avg_rssi; /* avg rssi */ |
---|
6870 | | - int32 avg_bias; /* avg bias */ |
---|
6871 | | -} BWL_POST_PACKED_STRUCT wl_proxd_rssi_bias_avg_t; |
---|
| 12588 | +typedef struct wl_proxd_rssi_bias_avg { |
---|
| 12589 | + int32 avg_threshold[RSSI_THRESHOLD_SIZE]; /**< avg threshold */ |
---|
| 12590 | + int32 avg_peak_offset; /**< avg peak offset */ |
---|
| 12591 | + int32 avg_rssi; /**< avg rssi */ |
---|
| 12592 | + int32 avg_bias; /**< avg bias */ |
---|
| 12593 | +} wl_proxd_rssi_bias_avg_t; |
---|
6872 | 12594 | |
---|
| 12595 | +#include <packed_section_start.h> |
---|
6873 | 12596 | typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_collect_info { |
---|
6874 | | - uint16 type; /* type: 0 channel table, 1 channel smoothing table, 2 and 3 seq */ |
---|
6875 | | - uint16 index; /* The current frame index, from 1 to total_frames. */ |
---|
6876 | | - uint16 tof_cmd; /* M_TOF_CMD */ |
---|
6877 | | - uint16 tof_rsp; /* M_TOF_RSP */ |
---|
6878 | | - uint16 tof_avb_rxl; /* M_TOF_AVB_RX_L */ |
---|
6879 | | - uint16 tof_avb_rxh; /* M_TOF_AVB_RX_H */ |
---|
6880 | | - uint16 tof_avb_txl; /* M_TOF_AVB_TX_L */ |
---|
6881 | | - uint16 tof_avb_txh; /* M_TOF_AVB_TX_H */ |
---|
6882 | | - uint16 tof_id; /* M_TOF_ID */ |
---|
| 12597 | + uint16 type; /**< type: 0 channel table, 1 channel smoothing table, 2 and 3 seq */ |
---|
| 12598 | + uint16 index; /**< The current frame index, from 1 to total_frames. */ |
---|
| 12599 | + uint16 tof_cmd; /**< M_TOF_CMD */ |
---|
| 12600 | + uint16 tof_rsp; /**< M_TOF_RSP */ |
---|
| 12601 | + uint16 tof_avb_rxl; /**< M_TOF_AVB_RX_L */ |
---|
| 12602 | + uint16 tof_avb_rxh; /**< M_TOF_AVB_RX_H */ |
---|
| 12603 | + uint16 tof_avb_txl; /**< M_TOF_AVB_TX_L */ |
---|
| 12604 | + uint16 tof_avb_txh; /**< M_TOF_AVB_TX_H */ |
---|
| 12605 | + uint16 tof_id; /**< M_TOF_ID */ |
---|
6883 | 12606 | uint8 tof_frame_type; |
---|
6884 | 12607 | uint8 tof_frame_bw; |
---|
6885 | 12608 | int8 tof_rssi; |
---|
6886 | 12609 | int32 tof_cfo; |
---|
6887 | | - int32 gd_adj_ns; /* gound delay */ |
---|
6888 | | - int32 gd_h_adj_ns; /* group delay + threshold crossing */ |
---|
6889 | | -#ifdef RSSI_REFINE |
---|
6890 | | - wl_proxd_rssi_bias_t rssi_bias; /* RSSI refinement info */ |
---|
6891 | | -#endif |
---|
6892 | | - int16 nfft; /* number of samples stored in H */ |
---|
| 12610 | + int32 gd_adj_ns; /**< gound delay */ |
---|
| 12611 | + int32 gd_h_adj_ns; /**< group delay + threshold crossing */ |
---|
| 12612 | + int16 nfft; /**< number of samples stored in H */ |
---|
| 12613 | + uint8 num_max_cores; |
---|
6893 | 12614 | |
---|
6894 | 12615 | } BWL_POST_PACKED_STRUCT wl_proxd_collect_info_t; |
---|
| 12616 | +#include <packed_section_end.h> |
---|
6895 | 12617 | |
---|
6896 | | -#define k_tof_collect_H_pad 1 |
---|
6897 | | -#define k_tof_collect_H_size (256+16+k_tof_collect_H_pad) |
---|
6898 | | -#define k_tof_collect_Hraw_size (2*k_tof_collect_H_size) |
---|
6899 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_collect_data { |
---|
| 12618 | +#define K_TOF_COLLECT_H_PAD 1 |
---|
| 12619 | +#define K_TOF_COLLECT_SC_20MHZ (64) |
---|
| 12620 | +/* Maximum possible size of sample capture */ |
---|
| 12621 | +#define K_TOF_COLLECT_SC_80MHZ (2*K_TOF_COLLECT_SC_20MHZ) |
---|
| 12622 | +/* Maximum possible size of channel dump */ |
---|
| 12623 | +#define K_TOF_COLLECT_CHAN_SIZE (2*K_TOF_COLLECT_SC_80MHZ) |
---|
| 12624 | + |
---|
| 12625 | +/* |
---|
| 12626 | +A few extra samples are required to estimate frequency offset |
---|
| 12627 | +Right now 16 samples are being used. Can be changed in future. |
---|
| 12628 | +*/ |
---|
| 12629 | +#define K_TOF_COLLECT_SAMP_SIZE_20MHZ (2*(K_TOF_COLLECT_SC_20MHZ)+16+K_TOF_COLLECT_H_PAD) |
---|
| 12630 | +#define K_TOF_COLLECT_RAW_SAMP_SIZE_20MHZ (2*K_TOF_COLLECT_SAMP_SIZE_20MHZ) |
---|
| 12631 | +#define K_TOF_COLLECT_H_SIZE_20MHZ (K_TOF_COLLECT_SAMP_SIZE_20MHZ) |
---|
| 12632 | +#define K_TOF_COLLECT_HRAW_SIZE_20MHZ (K_TOF_COLLECT_RAW_SAMP_SIZE_20MHZ) |
---|
| 12633 | + |
---|
| 12634 | +#define K_TOF_COLLECT_SAMP_SIZE_80MHZ (2*(K_TOF_COLLECT_SC_80MHZ)+16+K_TOF_COLLECT_H_PAD) |
---|
| 12635 | +#define K_TOF_COLLECT_RAW_SAMP_SIZE_80MHZ (2*K_TOF_COLLECT_SAMP_SIZE_80MHZ) |
---|
| 12636 | +#define K_TOF_COLLECT_H_SIZE_80MHZ (K_TOF_COLLECT_SAMP_SIZE_80MHZ) |
---|
| 12637 | +#define K_TOF_COLLECT_HRAW_SIZE_80MHZ (K_TOF_COLLECT_RAW_SAMP_SIZE_80MHZ) |
---|
| 12638 | + |
---|
| 12639 | +#define WL_PROXD_COLLECT_DATA_VERSION_1 1 |
---|
| 12640 | +#include <packed_section_start.h> |
---|
| 12641 | +typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_collect_data_v1 { |
---|
6900 | 12642 | wl_proxd_collect_info_t info; |
---|
6901 | | - uint32 H[k_tof_collect_H_size]; /* raw data read from phy used to adjust timestamps */ |
---|
| 12643 | + uint8 ri_rr[FTM_TPK_RI_RR_LEN]; |
---|
| 12644 | + /**< raw data read from phy used to adjust timestamps */ |
---|
| 12645 | + uint32 H[K_TOF_COLLECT_H_SIZE_20MHZ]; |
---|
| 12646 | +} BWL_POST_PACKED_STRUCT wl_proxd_collect_data_t_v1; |
---|
| 12647 | +#include <packed_section_end.h> |
---|
6902 | 12648 | |
---|
6903 | | -} BWL_POST_PACKED_STRUCT wl_proxd_collect_data_t; |
---|
| 12649 | +#define WL_PROXD_COLLECT_DATA_VERSION_2 2 |
---|
| 12650 | +#include <packed_section_start.h> |
---|
| 12651 | +typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_collect_data_v2 { |
---|
| 12652 | + wl_proxd_collect_info_t info; |
---|
| 12653 | + uint8 ri_rr[FTM_TPK_RI_RR_LEN_SECURE_2_0]; |
---|
| 12654 | + /**< raw data read from phy used to adjust timestamps */ |
---|
| 12655 | + uint32 H[K_TOF_COLLECT_H_SIZE_20MHZ]; |
---|
| 12656 | +} BWL_POST_PACKED_STRUCT wl_proxd_collect_data_t_v2; |
---|
| 12657 | +#include <packed_section_end.h> |
---|
6904 | 12658 | |
---|
6905 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_debug_data { |
---|
6906 | | - uint8 count; /* number of packets */ |
---|
6907 | | - uint8 stage; /* state machone stage */ |
---|
6908 | | - uint8 received; /* received or txed */ |
---|
6909 | | - uint8 paket_type; /* packet type */ |
---|
6910 | | - uint8 category; /* category field */ |
---|
6911 | | - uint8 action; /* action field */ |
---|
6912 | | - uint8 token; /* token number */ |
---|
6913 | | - uint8 follow_token; /* following token number */ |
---|
6914 | | - uint16 index; /* index of the packet */ |
---|
6915 | | - uint16 tof_cmd; /* M_TOF_CMD */ |
---|
6916 | | - uint16 tof_rsp; /* M_TOF_RSP */ |
---|
6917 | | - uint16 tof_avb_rxl; /* M_TOF_AVB_RX_L */ |
---|
6918 | | - uint16 tof_avb_rxh; /* M_TOF_AVB_RX_H */ |
---|
6919 | | - uint16 tof_avb_txl; /* M_TOF_AVB_TX_L */ |
---|
6920 | | - uint16 tof_avb_txh; /* M_TOF_AVB_TX_H */ |
---|
6921 | | - uint16 tof_id; /* M_TOF_ID */ |
---|
6922 | | - uint16 tof_status0; /* M_TOF_STATUS_0 */ |
---|
6923 | | - uint16 tof_status2; /* M_TOF_STATUS_2 */ |
---|
6924 | | - uint16 tof_chsm0; /* M_TOF_CHNSM_0 */ |
---|
6925 | | - uint16 tof_phyctl0; /* M_TOF_PHYCTL0 */ |
---|
6926 | | - uint16 tof_phyctl1; /* M_TOF_PHYCTL1 */ |
---|
6927 | | - uint16 tof_phyctl2; /* M_TOF_PHYCTL2 */ |
---|
6928 | | - uint16 tof_lsig; /* M_TOF_LSIG */ |
---|
6929 | | - uint16 tof_vhta0; /* M_TOF_VHTA0 */ |
---|
6930 | | - uint16 tof_vhta1; /* M_TOF_VHTA1 */ |
---|
6931 | | - uint16 tof_vhta2; /* M_TOF_VHTA2 */ |
---|
6932 | | - uint16 tof_vhtb0; /* M_TOF_VHTB0 */ |
---|
6933 | | - uint16 tof_vhtb1; /* M_TOF_VHTB1 */ |
---|
6934 | | - uint16 tof_apmductl; /* M_TOF_AMPDU_CTL */ |
---|
6935 | | - uint16 tof_apmdudlim; /* M_TOF_AMPDU_DLIM */ |
---|
6936 | | - uint16 tof_apmdulen; /* M_TOF_AMPDU_LEN */ |
---|
6937 | | -} BWL_POST_PACKED_STRUCT wl_proxd_debug_data_t; |
---|
| 12659 | +#define WL_PROXD_COLLECT_DATA_VERSION_3 3 |
---|
| 12660 | +typedef struct wl_proxd_collect_data_v3 { |
---|
| 12661 | + uint16 version; |
---|
| 12662 | + uint16 len; |
---|
| 12663 | + wl_proxd_collect_info_t info; |
---|
| 12664 | + uint8 ri_rr[FTM_TPK_RI_RR_LEN_SECURE_2_0]; |
---|
| 12665 | + /**< raw data read from phy used to adjust timestamps */ |
---|
| 12666 | + uint32 H[K_TOF_COLLECT_H_SIZE_20MHZ]; |
---|
| 12667 | + uint32 chan[4 * K_TOF_COLLECT_CHAN_SIZE]; |
---|
| 12668 | +} wl_proxd_collect_data_t_v3; |
---|
| 12669 | +#define WL_PROXD_COLLECT_DATA_VERSION_MAX WL_PROXD_COLLECT_DATA_VERSION_3 |
---|
6938 | 12670 | |
---|
6939 | | -/* version of the wl_wsec_info structure */ |
---|
| 12671 | +typedef struct wl_proxd_debug_data { |
---|
| 12672 | + uint8 count; /**< number of packets */ |
---|
| 12673 | + uint8 stage; /**< state machone stage */ |
---|
| 12674 | + uint8 received; /**< received or txed */ |
---|
| 12675 | + uint8 paket_type; /**< packet type */ |
---|
| 12676 | + uint8 category; /**< category field */ |
---|
| 12677 | + uint8 action; /**< action field */ |
---|
| 12678 | + uint8 token; /**< token number */ |
---|
| 12679 | + uint8 follow_token; /**< following token number */ |
---|
| 12680 | + uint16 index; /**< index of the packet */ |
---|
| 12681 | + uint16 tof_cmd; /**< M_TOF_CMD */ |
---|
| 12682 | + uint16 tof_rsp; /**< M_TOF_RSP */ |
---|
| 12683 | + uint16 tof_avb_rxl; /**< M_TOF_AVB_RX_L */ |
---|
| 12684 | + uint16 tof_avb_rxh; /**< M_TOF_AVB_RX_H */ |
---|
| 12685 | + uint16 tof_avb_txl; /**< M_TOF_AVB_TX_L */ |
---|
| 12686 | + uint16 tof_avb_txh; /**< M_TOF_AVB_TX_H */ |
---|
| 12687 | + uint16 tof_id; /**< M_TOF_ID */ |
---|
| 12688 | + uint16 tof_status0; /**< M_TOF_STATUS_0 */ |
---|
| 12689 | + uint16 tof_status2; /**< M_TOF_STATUS_2 */ |
---|
| 12690 | + uint16 tof_chsm0; /**< M_TOF_CHNSM_0 */ |
---|
| 12691 | + uint16 tof_phyctl0; /**< M_TOF_PHYCTL0 */ |
---|
| 12692 | + uint16 tof_phyctl1; /**< M_TOF_PHYCTL1 */ |
---|
| 12693 | + uint16 tof_phyctl2; /**< M_TOF_PHYCTL2 */ |
---|
| 12694 | + uint16 tof_lsig; /**< M_TOF_LSIG */ |
---|
| 12695 | + uint16 tof_vhta0; /**< M_TOF_VHTA0 */ |
---|
| 12696 | + uint16 tof_vhta1; /**< M_TOF_VHTA1 */ |
---|
| 12697 | + uint16 tof_vhta2; /**< M_TOF_VHTA2 */ |
---|
| 12698 | + uint16 tof_vhtb0; /**< M_TOF_VHTB0 */ |
---|
| 12699 | + uint16 tof_vhtb1; /**< M_TOF_VHTB1 */ |
---|
| 12700 | + uint16 tof_apmductl; /**< M_TOF_AMPDU_CTL */ |
---|
| 12701 | + uint16 tof_apmdudlim; /**< M_TOF_AMPDU_DLIM */ |
---|
| 12702 | + uint16 tof_apmdulen; /**< M_TOF_AMPDU_LEN */ |
---|
| 12703 | +} wl_proxd_debug_data_t; |
---|
| 12704 | + |
---|
| 12705 | +/** version of the wl_wsec_info structure */ |
---|
6940 | 12706 | #define WL_WSEC_INFO_VERSION 0x01 |
---|
6941 | 12707 | |
---|
6942 | | -/* start enum value for BSS properties */ |
---|
| 12708 | +/** start enum value for BSS properties */ |
---|
6943 | 12709 | #define WL_WSEC_INFO_BSS_BASE 0x0100 |
---|
6944 | 12710 | |
---|
6945 | | -/* size of len and type fields of wl_wsec_info_tlv_t struct */ |
---|
| 12711 | +/** size of len and type fields of wl_wsec_info_tlv_t struct */ |
---|
6946 | 12712 | #define WL_WSEC_INFO_TLV_HDR_LEN OFFSETOF(wl_wsec_info_tlv_t, data) |
---|
6947 | 12713 | |
---|
6948 | | -/* Allowed wl_wsec_info properties; not all of them may be supported. */ |
---|
| 12714 | +/** Allowed wl_wsec_info properties; not all of them may be supported. */ |
---|
6949 | 12715 | typedef enum { |
---|
6950 | 12716 | WL_WSEC_INFO_NONE = 0, |
---|
6951 | 12717 | WL_WSEC_INFO_MAX_KEYS = 1, |
---|
.. | .. |
---|
6962 | 12728 | WL_WSEC_INFO_BSS_TX_KEY_ID = (WL_WSEC_INFO_BSS_BASE + 3), |
---|
6963 | 12729 | WL_WSEC_INFO_BSS_ALGO = (WL_WSEC_INFO_BSS_BASE + 4), |
---|
6964 | 12730 | WL_WSEC_INFO_BSS_KEY_LEN = (WL_WSEC_INFO_BSS_BASE + 5), |
---|
| 12731 | + WL_WSEC_INFO_BSS_ALGOS = (WL_WSEC_INFO_BSS_BASE + 6), |
---|
6965 | 12732 | /* add per-BSS properties above */ |
---|
6966 | 12733 | WL_WSEC_INFO_MAX = 0xffff |
---|
6967 | 12734 | } wl_wsec_info_type_t; |
---|
6968 | 12735 | |
---|
6969 | | -/* tlv used to return wl_wsec_info properties */ |
---|
| 12736 | +typedef struct { |
---|
| 12737 | + uint32 algos; /* set algos to be enabled/disabled */ |
---|
| 12738 | + uint32 mask; /* algos outside mask unaltered */ |
---|
| 12739 | +} wl_wsec_info_algos_t; |
---|
| 12740 | + |
---|
| 12741 | +/** tlv used to return wl_wsec_info properties */ |
---|
6970 | 12742 | typedef struct { |
---|
6971 | 12743 | uint16 type; |
---|
6972 | | - uint16 len; /* data length */ |
---|
6973 | | - uint8 data[1]; /* data follows */ |
---|
| 12744 | + uint16 len; /**< data length */ |
---|
| 12745 | + uint8 data[1]; /**< data follows */ |
---|
6974 | 12746 | } wl_wsec_info_tlv_t; |
---|
6975 | 12747 | |
---|
6976 | | -/* input/output data type for wsec_info iovar */ |
---|
| 12748 | +/** input/output data type for wsec_info iovar */ |
---|
6977 | 12749 | typedef struct wl_wsec_info { |
---|
6978 | | - uint8 version; /* structure version */ |
---|
| 12750 | + uint8 version; /**< structure version */ |
---|
6979 | 12751 | uint8 pad[2]; |
---|
6980 | 12752 | uint8 num_tlvs; |
---|
6981 | | - wl_wsec_info_tlv_t tlvs[1]; /* tlv data follows */ |
---|
| 12753 | + wl_wsec_info_tlv_t tlvs[1]; /**< tlv data follows */ |
---|
6982 | 12754 | } wl_wsec_info_t; |
---|
| 12755 | + |
---|
| 12756 | +/* |
---|
| 12757 | + * randmac definitions |
---|
| 12758 | + */ |
---|
| 12759 | +#define WL_RANDMAC_MODULE "randmac" |
---|
| 12760 | +#define WL_RANDMAC_API_VERSION 0x0100 /**< version 1.0 */ |
---|
| 12761 | +#define WL_RANDMAC_API_MIN_VERSION 0x0100 /**< version 1.0 */ |
---|
| 12762 | + |
---|
| 12763 | +/** subcommands that can apply to randmac */ |
---|
| 12764 | +enum { |
---|
| 12765 | + WL_RANDMAC_SUBCMD_NONE = 0, |
---|
| 12766 | + WL_RANDMAC_SUBCMD_GET_VERSION = 1, |
---|
| 12767 | + WL_RANDMAC_SUBCMD_ENABLE = 2, |
---|
| 12768 | + WL_RANDMAC_SUBCMD_DISABLE = 3, |
---|
| 12769 | + WL_RANDMAC_SUBCMD_CONFIG = 4, |
---|
| 12770 | + WL_RANDMAC_SUBCMD_STATS = 5, |
---|
| 12771 | + WL_RANDMAC_SUBCMD_CLEAR_STATS = 6, |
---|
| 12772 | + |
---|
| 12773 | + WL_RANDMAC_SUBCMD_MAX |
---|
| 12774 | +}; |
---|
| 12775 | +typedef int16 wl_randmac_subcmd_t; |
---|
| 12776 | + |
---|
| 12777 | +/* Common IOVAR struct */ |
---|
| 12778 | +typedef struct wl_randmac { |
---|
| 12779 | + uint16 version; |
---|
| 12780 | + uint16 len; /* total length */ |
---|
| 12781 | + wl_randmac_subcmd_t subcmd_id; /* subcommand id */ |
---|
| 12782 | + uint8 data[0]; /* subcommand data */ |
---|
| 12783 | +} wl_randmac_t; |
---|
| 12784 | + |
---|
| 12785 | +#define WL_RANDMAC_IOV_HDR_SIZE OFFSETOF(wl_randmac_t, data) |
---|
| 12786 | + |
---|
| 12787 | +/* randmac version subcommand */ |
---|
| 12788 | +typedef struct wl_randmac_version { |
---|
| 12789 | + uint16 version; /* Randmac method version info */ |
---|
| 12790 | + uint8 pad[2]; /* Align on 4 byte boundary */ |
---|
| 12791 | +} wl_randmac_version_t; |
---|
| 12792 | + |
---|
| 12793 | +/* |
---|
| 12794 | + * Bitmask for methods supporting MAC randomization feature |
---|
| 12795 | + */ |
---|
| 12796 | +#define WL_RANDMAC_USER_NONE 0x0000 |
---|
| 12797 | +#define WL_RANDMAC_USER_FTM 0x0001 |
---|
| 12798 | +#define WL_RANDMAC_USER_NAN 0x0002 |
---|
| 12799 | +#define WL_RANDMAC_USER_SCAN 0x0004 |
---|
| 12800 | +#define WL_RANDMAC_USER_ANQP 0x0008 |
---|
| 12801 | +#define WL_RANDMAC_USER_ALL 0xFFFF |
---|
| 12802 | +typedef uint16 wl_randmac_method_t; |
---|
| 12803 | + |
---|
| 12804 | +enum { |
---|
| 12805 | + WL_RANDMAC_FLAGS_NONE = 0x00, |
---|
| 12806 | + WL_RANDMAC_FLAGS_ADDR = 0x01, |
---|
| 12807 | + WL_RANDMAC_FLAGS_MASK = 0x02, |
---|
| 12808 | + WL_RANDMAC_FLAGS_METHOD = 0x04, |
---|
| 12809 | + WL_RANDMAC_FLAGS_ALL = 0xFF |
---|
| 12810 | +}; |
---|
| 12811 | +typedef uint8 wl_randmac_flags_t; |
---|
| 12812 | + |
---|
| 12813 | +/* randmac statistics subcommand */ |
---|
| 12814 | +typedef struct wl_randmac_stats { |
---|
| 12815 | + uint32 set_ok; /* Set random addr success count */ |
---|
| 12816 | + uint32 set_fail; /* Set random addr failed count */ |
---|
| 12817 | + uint32 set_reqs; /* Set random addr count */ |
---|
| 12818 | + uint32 reset_reqs; /* Restore random addr count */ |
---|
| 12819 | + uint32 restore_ok; /* Restore random addr succes count */ |
---|
| 12820 | + uint32 restore_fail; /* Restore random addr failed count */ |
---|
| 12821 | + uint32 events_sent; /* randmac module events count */ |
---|
| 12822 | + uint32 events_rcvd; /* randmac events received count */ |
---|
| 12823 | +} wl_randmac_stats_t; |
---|
| 12824 | + |
---|
| 12825 | +/* randmac config subcommand */ |
---|
| 12826 | +typedef struct wl_randmac_config { |
---|
| 12827 | + struct ether_addr addr; /* Randomized MAC address */ |
---|
| 12828 | + struct ether_addr addr_mask; /* bitmask for randomization */ |
---|
| 12829 | + wl_randmac_method_t method; /* Enabled methods */ |
---|
| 12830 | + wl_randmac_flags_t flags; /* What config info changed */ |
---|
| 12831 | + uint8 PAD; |
---|
| 12832 | +} wl_randmac_config_t; |
---|
| 12833 | + |
---|
| 12834 | +enum { |
---|
| 12835 | + WL_RANDMAC_EVENT_NONE = 0, /**< not an event, reserved */ |
---|
| 12836 | + WL_RANDMAC_EVENT_BSSCFG_ADDR_SET = 1, /* bsscfg addr randomized */ |
---|
| 12837 | + WL_RANDMAC_EVENT_BSSCFG_ADDR_RESTORE = 2, /* bsscfg addr restored */ |
---|
| 12838 | + WL_RANDMAC_EVENT_ENABLED = 3, /* randmac module enabled */ |
---|
| 12839 | + WL_RANDMAC_EVENT_DISABLE = 4, /* randmac module disabled */ |
---|
| 12840 | + WL_RANDMAC_EVENT_BSSCFG_STATUS = 5, /* bsscfg enable/disable */ |
---|
| 12841 | + |
---|
| 12842 | + WL_RANDMAC_EVENT_MAX |
---|
| 12843 | +}; |
---|
| 12844 | +typedef int16 wl_randmac_event_type_t; |
---|
| 12845 | +typedef int32 wl_randmac_status_t; |
---|
| 12846 | +typedef uint32 wl_randmac_event_mask_t; |
---|
| 12847 | + |
---|
| 12848 | +#define WL_RANDMAC_EVENT_MASK_ALL 0xfffffffe |
---|
| 12849 | +#define WL_RANDMAC_EVENT_MASK_EVENT(_event_type) (1 << (_event_type)) |
---|
| 12850 | +#define WL_RANDMAC_EVENT_ENABLED(_mask, _event_type) (\ |
---|
| 12851 | + ((_mask) & WL_RANDMAC_EVENT_MASK_EVENT(_event_type)) != 0) |
---|
| 12852 | + |
---|
| 12853 | +/** tlv IDs - data length 4 bytes unless overridden by type, alignment 32 bits */ |
---|
| 12854 | +enum { |
---|
| 12855 | + WL_RANDMAC_TLV_NONE = 0, |
---|
| 12856 | + WL_RANDMAC_TLV_METHOD = 1, |
---|
| 12857 | + WL_RANDMAC_TLV_ADDR = 2, |
---|
| 12858 | + WL_RANDMAC_TLV_MASK = 3 |
---|
| 12859 | +}; |
---|
| 12860 | +typedef uint16 wl_randmac_tlv_id_t; |
---|
| 12861 | + |
---|
| 12862 | +typedef struct wl_randmac_tlv { |
---|
| 12863 | + wl_randmac_tlv_id_t id; |
---|
| 12864 | + uint16 len; /* Length of variable */ |
---|
| 12865 | + uint8 data[1]; |
---|
| 12866 | +} wl_randmac_tlv_t; |
---|
| 12867 | + |
---|
| 12868 | +/** randmac event */ |
---|
| 12869 | +typedef struct wl_randmac_event { |
---|
| 12870 | + uint16 version; |
---|
| 12871 | + uint16 len; /* Length of all variables */ |
---|
| 12872 | + wl_randmac_event_type_t type; |
---|
| 12873 | + wl_randmac_method_t method; |
---|
| 12874 | + uint8 pad[2]; |
---|
| 12875 | + wl_randmac_tlv_t tlvs[1]; /**< variable */ |
---|
| 12876 | +} wl_randmac_event_t; |
---|
6983 | 12877 | |
---|
6984 | 12878 | /* |
---|
6985 | 12879 | * scan MAC definitions |
---|
6986 | 12880 | */ |
---|
6987 | 12881 | |
---|
6988 | | -/* common iovar struct */ |
---|
| 12882 | +/** common iovar struct */ |
---|
6989 | 12883 | typedef struct wl_scanmac { |
---|
6990 | | - uint16 subcmd_id; /* subcommand id */ |
---|
6991 | | - uint16 len; /* total length of data[] */ |
---|
6992 | | - uint8 data[1]; /* subcommand data */ |
---|
| 12884 | + uint16 subcmd_id; /**< subcommand id */ |
---|
| 12885 | + uint16 len; /**< total length of data[] */ |
---|
| 12886 | + uint8 data[]; /**< subcommand data */ |
---|
6993 | 12887 | } wl_scanmac_t; |
---|
6994 | 12888 | |
---|
6995 | 12889 | /* subcommand ids */ |
---|
6996 | 12890 | #define WL_SCANMAC_SUBCMD_ENABLE 0 |
---|
6997 | | -#define WL_SCANMAC_SUBCMD_BSSCFG 1 /* only GET supported */ |
---|
| 12891 | +#define WL_SCANMAC_SUBCMD_BSSCFG 1 /**< only GET supported */ |
---|
6998 | 12892 | #define WL_SCANMAC_SUBCMD_CONFIG 2 |
---|
6999 | 12893 | |
---|
7000 | | -/* scanmac enable data struct */ |
---|
| 12894 | +/** scanmac enable data struct */ |
---|
7001 | 12895 | typedef struct wl_scanmac_enable { |
---|
7002 | | - uint8 enable; /* 1 - enable, 0 - disable */ |
---|
7003 | | - uint8 pad[3]; /* 4-byte struct alignment */ |
---|
| 12896 | + uint8 enable; /**< 1 - enable, 0 - disable */ |
---|
| 12897 | + uint8 pad[3]; /**< 4-byte struct alignment */ |
---|
7004 | 12898 | } wl_scanmac_enable_t; |
---|
7005 | 12899 | |
---|
7006 | | -/* scanmac bsscfg data struct */ |
---|
| 12900 | +/** scanmac bsscfg data struct */ |
---|
7007 | 12901 | typedef struct wl_scanmac_bsscfg { |
---|
7008 | | - uint32 bsscfg; /* bsscfg index */ |
---|
| 12902 | + uint32 bsscfg; /**< bsscfg index */ |
---|
7009 | 12903 | } wl_scanmac_bsscfg_t; |
---|
7010 | 12904 | |
---|
7011 | | -/* scanmac config data struct */ |
---|
| 12905 | +/** scanmac config data struct */ |
---|
7012 | 12906 | typedef struct wl_scanmac_config { |
---|
7013 | | - struct ether_addr mac; /* 6 bytes of MAC address or MAC prefix (i.e. OUI) */ |
---|
7014 | | - struct ether_addr random_mask; /* randomized bits on each scan */ |
---|
7015 | | - uint16 scan_bitmap; /* scans to use this MAC address */ |
---|
7016 | | - uint8 pad[2]; /* 4-byte struct alignment */ |
---|
| 12907 | + struct ether_addr mac; /**< 6 bytes of MAC address or MAC prefix (i.e. OUI) */ |
---|
| 12908 | + struct ether_addr random_mask; /**< randomized bits on each scan */ |
---|
| 12909 | + uint16 scan_bitmap; /**< scans to use this MAC address */ |
---|
| 12910 | + uint8 pad[2]; /**< 4-byte struct alignment */ |
---|
7017 | 12911 | } wl_scanmac_config_t; |
---|
7018 | 12912 | |
---|
7019 | 12913 | /* scan bitmap */ |
---|
7020 | | -#define WL_SCANMAC_SCAN_UNASSOC (0x01 << 0) /* unassociated scans */ |
---|
7021 | | -#define WL_SCANMAC_SCAN_ASSOC_ROAM (0x01 << 1) /* associated roam scans */ |
---|
7022 | | -#define WL_SCANMAC_SCAN_ASSOC_PNO (0x01 << 2) /* associated PNO scans */ |
---|
7023 | | -#define WL_SCANMAC_SCAN_ASSOC_HOST (0x01 << 3) /* associated host scans */ |
---|
| 12914 | +#define WL_SCANMAC_SCAN_UNASSOC (0x01 << 0) /**< unassociated scans */ |
---|
| 12915 | +#define WL_SCANMAC_SCAN_ASSOC_ROAM (0x01 << 1) /**< associated roam scans */ |
---|
| 12916 | +#define WL_SCANMAC_SCAN_ASSOC_PNO (0x01 << 2) /**< associated PNO scans */ |
---|
| 12917 | +#define WL_SCANMAC_SCAN_ASSOC_HOST (0x01 << 3) /**< associated host scans */ |
---|
7024 | 12918 | |
---|
7025 | | -/* no default structure packing */ |
---|
7026 | | -#include <packed_section_end.h> |
---|
| 12919 | +#define WL_SCAN_EVENT_VERSION 1 |
---|
| 12920 | + |
---|
| 12921 | +#define WL_SCAN_TYPE_ASSOC 0x1 /* Assoc scan */ |
---|
| 12922 | +#define WL_SCAN_TYPE_ROAM 0x2 /* Roam scan */ |
---|
| 12923 | +#define WL_SCAN_TYPE_FWSCAN 0x4 /* Other FW scan */ |
---|
| 12924 | +#define WL_SCAN_TYPE_HOSTSCAN 0x8 /* Host scan */ |
---|
| 12925 | + |
---|
| 12926 | +typedef struct scan_event_data { |
---|
| 12927 | + uint32 version; |
---|
| 12928 | + uint32 flags; |
---|
| 12929 | + uint16 num_chan_slice0; |
---|
| 12930 | + uint16 num_chan_slice1; |
---|
| 12931 | + /* Will contain num_chan_slice0 followed by num_chan_slice1 chanspecs */ |
---|
| 12932 | + chanspec_t scan_chan_list[]; |
---|
| 12933 | +} scan_event_data_t; |
---|
| 12934 | + |
---|
| 12935 | +/* |
---|
| 12936 | + * bonjour dongle offload definitions |
---|
| 12937 | + */ |
---|
| 12938 | + |
---|
| 12939 | +/* common iovar struct */ |
---|
| 12940 | +typedef struct wl_bdo { |
---|
| 12941 | + uint16 subcmd_id; /* subcommand id */ |
---|
| 12942 | + uint16 len; /* total length of data[] */ |
---|
| 12943 | + uint8 data[]; /* subcommand data */ |
---|
| 12944 | +} wl_bdo_t; |
---|
| 12945 | + |
---|
| 12946 | +/* subcommand ids */ |
---|
| 12947 | +#define WL_BDO_SUBCMD_DOWNLOAD 0 /* Download flattened database */ |
---|
| 12948 | +#define WL_BDO_SUBCMD_ENABLE 1 /* Start bonjour after download */ |
---|
| 12949 | +#define WL_BDO_SUBCMD_MAX_DOWNLOAD 2 /* Get the max download size */ |
---|
| 12950 | + |
---|
| 12951 | +/* maximum fragment size */ |
---|
| 12952 | +#define BDO_MAX_FRAGMENT_SIZE 1024 |
---|
| 12953 | + |
---|
| 12954 | +/* download flattened database |
---|
| 12955 | + * |
---|
| 12956 | + * BDO must be disabled before database download else fail. |
---|
| 12957 | + * |
---|
| 12958 | + * If database size is within BDO_MAX_FRAGMENT_SIZE then only a single fragment |
---|
| 12959 | + * is required (i.e. frag_num = 0, total_size = frag_size). |
---|
| 12960 | + * If database size exceeds BDO_MAX_FRAGMENT_SIZE then multiple fragments are required. |
---|
| 12961 | + */ |
---|
| 12962 | +typedef struct wl_bdo_download { |
---|
| 12963 | + uint16 total_size; /* total database size */ |
---|
| 12964 | + uint16 frag_num; /* fragment number, 0 for first fragment, N-1 for last fragment */ |
---|
| 12965 | + uint16 frag_size; /* size of fragment (max BDO_MAX_FRAGMENT_SIZE) */ |
---|
| 12966 | + uint8 pad[2]; /* 4-byte struct alignment */ |
---|
| 12967 | + uint8 fragment[BDO_MAX_FRAGMENT_SIZE]; /* fragment data */ |
---|
| 12968 | +} wl_bdo_download_t; |
---|
| 12969 | + |
---|
| 12970 | +/* enable |
---|
| 12971 | + * |
---|
| 12972 | + * Enable requires a downloaded database else fail. |
---|
| 12973 | + */ |
---|
| 12974 | +typedef struct wl_bdo_enable { |
---|
| 12975 | + uint8 enable; /* 1 - enable, 0 - disable */ |
---|
| 12976 | + uint8 pad[3]; /* 4-byte struct alignment */ |
---|
| 12977 | +} wl_bdo_enable_t; |
---|
| 12978 | + |
---|
| 12979 | +/* |
---|
| 12980 | + * Get the max download size for Bonjour Offload. |
---|
| 12981 | + */ |
---|
| 12982 | +typedef struct wl_bdo_max_download { |
---|
| 12983 | + uint16 size; /* Max download size in bytes */ |
---|
| 12984 | + uint8 pad[2]; /* 4-byte struct alignment */ |
---|
| 12985 | +} wl_bdo_max_download_t; |
---|
| 12986 | + |
---|
| 12987 | +/* |
---|
| 12988 | + * TCP keepalive offload definitions |
---|
| 12989 | + */ |
---|
| 12990 | + |
---|
| 12991 | +/* common iovar struct */ |
---|
| 12992 | +typedef struct wl_tko { |
---|
| 12993 | + uint16 subcmd_id; /* subcommand id */ |
---|
| 12994 | + uint16 len; /* total length of data[] */ |
---|
| 12995 | + uint8 data[]; /* subcommand data */ |
---|
| 12996 | +} wl_tko_t; |
---|
| 12997 | + |
---|
| 12998 | +/* subcommand ids */ |
---|
| 12999 | +#define WL_TKO_SUBCMD_MAX_TCP 0 /* max TCP connections supported */ |
---|
| 13000 | +#define WL_TKO_SUBCMD_PARAM 1 /* configure offload common parameters */ |
---|
| 13001 | +#define WL_TKO_SUBCMD_CONNECT 2 /* TCP connection info */ |
---|
| 13002 | +#define WL_TKO_SUBCMD_ENABLE 3 /* enable/disable */ |
---|
| 13003 | +#define WL_TKO_SUBCMD_STATUS 4 /* TCP connection status */ |
---|
| 13004 | +#define WL_TKO_SUBCMD_RST 5 /* TCP wake RST frame release request */ |
---|
| 13005 | + |
---|
| 13006 | +/** Delay to retain a TCP RST frame on a monitored TCP session |
---|
| 13007 | + * before toggling the wake GPIO (in sec). |
---|
| 13008 | + */ |
---|
| 13009 | +typedef enum tko_rst_wake_delay { |
---|
| 13010 | + /** No delay, no RST frame retention */ |
---|
| 13011 | + TKO_RST_WAKE_DELAY_DISABLED = -2, |
---|
| 13012 | + /** Infinite delay. No timeout */ |
---|
| 13013 | + TKO_RST_WAKE_DELAY_INFINITY = -1, |
---|
| 13014 | + /* 0 - 3600 sec are valid */ |
---|
| 13015 | + TKO_RST_WAKE_DELAY_MAX = 3600 |
---|
| 13016 | +} tko_rst_wake_delay_t; |
---|
| 13017 | + |
---|
| 13018 | +/* WL_TKO_SUBCMD_MAX_CONNECT subcommand data */ |
---|
| 13019 | +typedef struct wl_tko_max_tcp { |
---|
| 13020 | + uint8 max; /* max TCP connections supported */ |
---|
| 13021 | + uint8 pad[3]; /* 4-byte struct alignment */ |
---|
| 13022 | +} wl_tko_max_tcp_t; |
---|
| 13023 | + |
---|
| 13024 | +/* WL_TKO_SUBCMD_PARAM subcommand data */ |
---|
| 13025 | +typedef struct wl_tko_param { |
---|
| 13026 | + uint16 interval; /* keepalive tx interval (secs) */ |
---|
| 13027 | + uint16 retry_interval; /* keepalive retry interval (secs) */ |
---|
| 13028 | + uint16 retry_count; /* retry_count */ |
---|
| 13029 | + int16 rst_delay; /* delay to delay a RST frame from reaching the host */ |
---|
| 13030 | +} wl_tko_param_t; |
---|
| 13031 | + |
---|
| 13032 | +/* WL_TKO_SUBCMD_CONNECT subcommand data |
---|
| 13033 | + * invoke with unique 'index' for each TCP connection |
---|
| 13034 | + */ |
---|
| 13035 | +typedef struct wl_tko_connect { |
---|
| 13036 | + uint8 index; /* TCP connection index, 0 to max-1 */ |
---|
| 13037 | + uint8 ip_addr_type; /* 0 - IPv4, 1 - IPv6 */ |
---|
| 13038 | + uint16 local_port; /* local port */ |
---|
| 13039 | + uint16 remote_port; /* remote port */ |
---|
| 13040 | + uint16 PAD; |
---|
| 13041 | + uint32 local_seq; /* local sequence number */ |
---|
| 13042 | + uint32 remote_seq; /* remote sequence number */ |
---|
| 13043 | + uint16 request_len; /* TCP keepalive request packet length */ |
---|
| 13044 | + uint16 response_len; /* TCP keepalive response packet length */ |
---|
| 13045 | + uint8 data[]; /* variable length field containing local/remote IPv4/IPv6, |
---|
| 13046 | + * TCP keepalive request packet, TCP keepalive response packet |
---|
| 13047 | + * For IPv4, length is 4 * 2 + request_length + response_length |
---|
| 13048 | + * offset 0 - local IPv4 |
---|
| 13049 | + * offset 4 - remote IPv4 |
---|
| 13050 | + * offset 8 - TCP keepalive request packet |
---|
| 13051 | + * offset 8+request_length - TCP keepalive response packet |
---|
| 13052 | + * For IPv6, length is 16 * 2 + request_length + response_length |
---|
| 13053 | + * offset 0 - local IPv6 |
---|
| 13054 | + * offset 16 - remote IPv6 |
---|
| 13055 | + * offset 32 - TCP keepalive request packet |
---|
| 13056 | + * offset 32+request_length - TCP keepalive response packet |
---|
| 13057 | + */ |
---|
| 13058 | +} wl_tko_connect_t; |
---|
| 13059 | + |
---|
| 13060 | +/* WL_TKO_SUBCMD_CONNECT subcommand data to GET configured info for specific index */ |
---|
| 13061 | +typedef struct wl_tko_get_connect { |
---|
| 13062 | + uint8 index; /* TCP connection index, 0 to max-1 */ |
---|
| 13063 | + uint8 pad[3]; /* 4-byte struct alignment */ |
---|
| 13064 | +} wl_tko_get_connect_t; |
---|
| 13065 | + |
---|
| 13066 | +typedef struct wl_tko_enable { |
---|
| 13067 | + uint8 enable; /* 1 - enable, 0 - disable */ |
---|
| 13068 | + uint8 pad[3]; /* 4-byte struct alignment */ |
---|
| 13069 | +} wl_tko_enable_t; |
---|
| 13070 | + |
---|
| 13071 | +/* WL_TKO_SUBCMD_STATUS subcommand data */ |
---|
| 13072 | +/* must be invoked before tko is disabled else status is unavailable */ |
---|
| 13073 | +typedef struct wl_tko_status { |
---|
| 13074 | + uint8 count; /* number of status entries (i.e. equals |
---|
| 13075 | + * max TCP connections supported) |
---|
| 13076 | + */ |
---|
| 13077 | + uint8 status[1]; /* variable length field contain status for |
---|
| 13078 | + * each TCP connection index |
---|
| 13079 | + */ |
---|
| 13080 | +} wl_tko_status_t; |
---|
| 13081 | + |
---|
| 13082 | +/* TKO_STATUS_TCP_RST subcommand data */ |
---|
| 13083 | +typedef struct wl_tko_get_reset { |
---|
| 13084 | + uint8 index; /**< TCP connection index, 0 to max-1 */ |
---|
| 13085 | + uint8 clear_only; /**< 1 to clear the RST frame without sending it up to the host */ |
---|
| 13086 | + uint8 pad[2]; /**< 4-bytes structure alignment */ |
---|
| 13087 | +} wl_tko_get_reset_t; |
---|
| 13088 | + |
---|
| 13089 | +typedef enum { |
---|
| 13090 | + TKO_STATUS_NORMAL = 0, /* TCP connection normal, no error */ |
---|
| 13091 | + TKO_STATUS_NO_RESPONSE = 1, /* no response to TCP keepalive */ |
---|
| 13092 | + TKO_STATUS_NO_TCP_ACK_FLAG = 2, /* TCP ACK flag not set */ |
---|
| 13093 | + TKO_STATUS_UNEXPECT_TCP_FLAG = 3, /* unexpect TCP flags set other than ACK */ |
---|
| 13094 | + TKO_STATUS_SEQ_NUM_INVALID = 4, /* ACK != sequence number */ |
---|
| 13095 | + TKO_STATUS_REMOTE_SEQ_NUM_INVALID = 5, /* SEQ > remote sequence number */ |
---|
| 13096 | + TKO_STATUS_TCP_DATA = 6, /* TCP data available */ |
---|
| 13097 | + TKO_STATUS_TCP_RST = 7, /* TCP RST flag received */ |
---|
| 13098 | + TKO_STATUS_UNAVAILABLE = 255, /* not used/configured */ |
---|
| 13099 | +} tko_status_t; |
---|
| 13100 | + |
---|
| 13101 | +/* |
---|
| 13102 | + * DHCP lease time renew offload definitions |
---|
| 13103 | + */ |
---|
| 13104 | + |
---|
| 13105 | +/* Common iovar struct */ |
---|
| 13106 | +typedef struct wl_dltro { |
---|
| 13107 | + uint8 subcmd_id; /* Subcommand id */ |
---|
| 13108 | + uint8 pad; |
---|
| 13109 | + uint16 len; /* Total length of data[] */ |
---|
| 13110 | + uint8 data[1]; /* Subcommand data */ |
---|
| 13111 | +} wl_dltro_t; |
---|
| 13112 | + |
---|
| 13113 | +/* Subcommand ids */ |
---|
| 13114 | +#define WL_DLTRO_SUBCMD_CONNECT 0 /* DLTRO connection info */ |
---|
| 13115 | +#define WL_DLTRO_SUBCMD_PARAM 1 /* DLTRO parameter info */ |
---|
| 13116 | +#define WL_DLTRO_SUBCMD_MAX_DLTRO 2 /* Max DLTRO supported */ |
---|
| 13117 | + |
---|
| 13118 | +/* WL_DLTRO_SUBCMD_CONNECT subcommand data |
---|
| 13119 | + * Invoke with unique 'index' for each DLTRO connection |
---|
| 13120 | + */ |
---|
| 13121 | +typedef struct wl_dltro_connect { |
---|
| 13122 | + uint8 index; /* DLTRO connection index, 0 to max-1 */ |
---|
| 13123 | + uint8 ip_addr_type; /* 0 - IPv4, 1 - IPv6 */ |
---|
| 13124 | + uint8 offload_type; /* 0 - Client, 1 - Server */ |
---|
| 13125 | + uint8 pad; |
---|
| 13126 | + uint32 tid; /* Transaction id */ |
---|
| 13127 | + uint32 timer_val; /* DHCP lease time remaining in seconds */ |
---|
| 13128 | + uint32 time_before_expiry; /* Time before expiry for DHCP lease renewal in seconds */ |
---|
| 13129 | + uint32 len; /* Length of the variable data */ |
---|
| 13130 | + uint8 data[1]; /* Variable length field containing DLTRO packet */ |
---|
| 13131 | +} wl_dltro_connect_t; |
---|
| 13132 | + |
---|
| 13133 | +/* WL_DLTRO_SUBCMD_PARAM subcommand data |
---|
| 13134 | + * Invoke with unique 'index' for each DLTRO connection |
---|
| 13135 | + */ |
---|
| 13136 | +typedef struct wl_dltro_param { |
---|
| 13137 | + uint8 index; /* DLTRO connection index, 0 to max-1 */ |
---|
| 13138 | + uint8 retry; /* Number of retries */ |
---|
| 13139 | +} wl_dltro_param_t; |
---|
| 13140 | + |
---|
| 13141 | +/* WL_DLTRO_SUBCMD_MAX_DLTRO subcommand data */ |
---|
| 13142 | +typedef struct wl_dltro_max_dltro { |
---|
| 13143 | + uint8 max; /* Max DLTRO supported */ |
---|
| 13144 | +} wl_dltro_max_dltro_t; |
---|
| 13145 | + |
---|
| 13146 | +/* WL_DLTRO_SUBCMD_PARAM subcommand data to GET configured info for specific index */ |
---|
| 13147 | +typedef struct wl_dltro_get_param { |
---|
| 13148 | + uint8 index; /* DLTRO connection index, 0 to max-1 */ |
---|
| 13149 | +} wl_dltro_get_param_t; |
---|
7027 | 13150 | |
---|
7028 | 13151 | enum rssi_reason { |
---|
7029 | 13152 | RSSI_REASON_UNKNOW = 0, |
---|
.. | .. |
---|
7083 | 13206 | TOF_FRAME_RATE_LEGACY = 1 |
---|
7084 | 13207 | }; |
---|
7085 | 13208 | |
---|
7086 | | -#define TOF_ADJ_TYPE_NUM 4 /* number of assisted timestamp adjustment */ |
---|
| 13209 | +#define TOF_ADJ_TYPE_NUM 4 /**< number of assisted timestamp adjustment */ |
---|
7087 | 13210 | enum tof_adj_mode { |
---|
7088 | 13211 | TOF_ADJ_SOFTWARE = 0, |
---|
7089 | 13212 | TOF_ADJ_HARDWARE = 1, |
---|
.. | .. |
---|
7091 | 13214 | TOF_ADJ_NONE = 3 |
---|
7092 | 13215 | }; |
---|
7093 | 13216 | |
---|
7094 | | -#define FRAME_TYPE_NUM 4 /* number of frame type */ |
---|
| 13217 | +#define FRAME_TYPE_NUM 4 /**< number of frame type */ |
---|
7095 | 13218 | enum frame_type { |
---|
7096 | 13219 | FRAME_TYPE_CCK = 0, |
---|
7097 | 13220 | FRAME_TYPE_OFDM = 1, |
---|
.. | .. |
---|
7100 | 13223 | }; |
---|
7101 | 13224 | |
---|
7102 | 13225 | typedef struct wl_proxd_status_iovar { |
---|
7103 | | - uint16 method; /* method */ |
---|
7104 | | - uint8 mode; /* mode */ |
---|
7105 | | - uint8 peermode; /* peer mode */ |
---|
7106 | | - uint8 state; /* state */ |
---|
7107 | | - uint8 reason; /* reason code */ |
---|
7108 | | - uint32 distance; /* distance */ |
---|
7109 | | - uint32 txcnt; /* tx pkt counter */ |
---|
7110 | | - uint32 rxcnt; /* rx pkt counter */ |
---|
7111 | | - struct ether_addr peer; /* peer mac address */ |
---|
7112 | | - int8 avg_rssi; /* average rssi */ |
---|
7113 | | - int8 hi_rssi; /* highest rssi */ |
---|
7114 | | - int8 low_rssi; /* lowest rssi */ |
---|
7115 | | - uint32 dbgstatus; /* debug status */ |
---|
7116 | | - uint16 frame_type_cnt[FRAME_TYPE_NUM]; /* frame types */ |
---|
7117 | | - uint8 adj_type_cnt[TOF_ADJ_TYPE_NUM]; /* adj types HW/SW */ |
---|
| 13226 | + uint16 method; /**< method */ |
---|
| 13227 | + uint8 mode; /**< mode */ |
---|
| 13228 | + uint8 peermode; /**< peer mode */ |
---|
| 13229 | + uint8 state; /**< state */ |
---|
| 13230 | + uint8 reason; /**< reason code */ |
---|
| 13231 | + uint8 PAD[2]; |
---|
| 13232 | + uint32 distance; /**< distance */ |
---|
| 13233 | + uint32 txcnt; /**< tx pkt counter */ |
---|
| 13234 | + uint32 rxcnt; /**< rx pkt counter */ |
---|
| 13235 | + struct ether_addr peer; /**< peer mac address */ |
---|
| 13236 | + int8 avg_rssi; /**< average rssi */ |
---|
| 13237 | + int8 hi_rssi; /**< highest rssi */ |
---|
| 13238 | + int8 low_rssi; /**< lowest rssi */ |
---|
| 13239 | + uint8 PAD[3]; |
---|
| 13240 | + uint32 dbgstatus; /**< debug status */ |
---|
| 13241 | + uint16 frame_type_cnt[FRAME_TYPE_NUM]; /**< frame types */ |
---|
| 13242 | + uint8 adj_type_cnt[TOF_ADJ_TYPE_NUM]; /**< adj types HW/SW */ |
---|
7118 | 13243 | } wl_proxd_status_iovar_t; |
---|
7119 | 13244 | |
---|
7120 | | -#ifdef NET_DETECT |
---|
| 13245 | +/* ifdef NET_DETECT */ |
---|
7121 | 13246 | typedef struct net_detect_adapter_features { |
---|
7122 | | - bool wowl_enabled; |
---|
7123 | | - bool net_detect_enabled; |
---|
7124 | | - bool nlo_enabled; |
---|
| 13247 | + uint8 wowl_enabled; |
---|
| 13248 | + uint8 net_detect_enabled; |
---|
| 13249 | + uint8 nlo_enabled; |
---|
7125 | 13250 | } net_detect_adapter_features_t; |
---|
7126 | 13251 | |
---|
7127 | 13252 | typedef enum net_detect_bss_type { |
---|
.. | .. |
---|
7132 | 13257 | |
---|
7133 | 13258 | typedef struct net_detect_profile { |
---|
7134 | 13259 | wlc_ssid_t ssid; |
---|
7135 | | - net_detect_bss_type_t bss_type; /* Ignore for now since Phase 1 is only for ESS */ |
---|
7136 | | - uint32 cipher_type; /* DOT11_CIPHER_ALGORITHM enumeration values */ |
---|
7137 | | - uint32 auth_type; /* DOT11_AUTH_ALGORITHM enumeration values */ |
---|
| 13260 | + net_detect_bss_type_t bss_type; /**< Ignore for now since Phase 1 is only for ESS */ |
---|
| 13261 | + uint32 cipher_type; /**< DOT11_CIPHER_ALGORITHM enumeration values */ |
---|
| 13262 | + uint32 auth_type; /**< DOT11_AUTH_ALGORITHM enumeration values */ |
---|
7138 | 13263 | } net_detect_profile_t; |
---|
7139 | 13264 | |
---|
7140 | 13265 | typedef struct net_detect_profile_list { |
---|
7141 | 13266 | uint32 num_nd_profiles; |
---|
7142 | | - net_detect_profile_t nd_profile[0]; |
---|
| 13267 | + net_detect_profile_t nd_profile[]; |
---|
7143 | 13268 | } net_detect_profile_list_t; |
---|
7144 | 13269 | |
---|
7145 | 13270 | typedef struct net_detect_config { |
---|
7146 | | - bool nd_enabled; |
---|
| 13271 | + uint8 nd_enabled; |
---|
| 13272 | + uint8 PAD[3]; |
---|
7147 | 13273 | uint32 scan_interval; |
---|
7148 | 13274 | uint32 wait_period; |
---|
7149 | | - bool wake_if_connected; |
---|
7150 | | - bool wake_if_disconnected; |
---|
| 13275 | + uint8 wake_if_connected; |
---|
| 13276 | + uint8 wake_if_disconnected; |
---|
| 13277 | + uint8 PAD[2]; |
---|
7151 | 13278 | net_detect_profile_list_t nd_profile_list; |
---|
7152 | 13279 | } net_detect_config_t; |
---|
7153 | 13280 | |
---|
.. | .. |
---|
7161 | 13288 | typedef struct net_detect_wake_data { |
---|
7162 | 13289 | net_detect_wake_reason_t nd_wake_reason; |
---|
7163 | 13290 | uint32 nd_wake_date_length; |
---|
7164 | | - uint8 nd_wake_data[0]; /* Wake data (currently unused) */ |
---|
| 13291 | + uint8 nd_wake_data[0]; /**< Wake data (currently unused) */ |
---|
7165 | 13292 | } net_detect_wake_data_t; |
---|
7166 | 13293 | |
---|
7167 | | -#endif /* NET_DETECT */ |
---|
| 13294 | +/* endif NET_DETECT */ |
---|
7168 | 13295 | |
---|
7169 | 13296 | /* (unversioned, deprecated) */ |
---|
7170 | 13297 | typedef struct bcnreq { |
---|
7171 | 13298 | uint8 bcn_mode; |
---|
7172 | | - int dur; |
---|
7173 | | - int channel; |
---|
| 13299 | + uint8 PAD[3]; |
---|
| 13300 | + int32 dur; |
---|
| 13301 | + int32 channel; |
---|
7174 | 13302 | struct ether_addr da; |
---|
7175 | 13303 | uint16 random_int; |
---|
7176 | 13304 | wlc_ssid_t ssid; |
---|
7177 | 13305 | uint16 reps; |
---|
| 13306 | + uint8 PAD[2]; |
---|
7178 | 13307 | } bcnreq_t; |
---|
7179 | 13308 | |
---|
7180 | 13309 | #define WL_RRM_BCN_REQ_VER 1 |
---|
.. | .. |
---|
7192 | 13321 | uint8 pad_2; |
---|
7193 | 13322 | chanspec_list_t chspec_list; |
---|
7194 | 13323 | } bcn_req_t; |
---|
| 13324 | + |
---|
| 13325 | +#define WL_RRM_BCN_REQ_VER_2 2 |
---|
| 13326 | +typedef struct bcn_req_v2 { |
---|
| 13327 | + uint8 version; |
---|
| 13328 | + uint8 bcn_mode; |
---|
| 13329 | + uint8 pad_1[2]; |
---|
| 13330 | + int32 dur; |
---|
| 13331 | + int32 channel; |
---|
| 13332 | + struct ether_addr da; |
---|
| 13333 | + uint16 random_int; |
---|
| 13334 | + wlc_ssid_t ssid; |
---|
| 13335 | + uint16 reps; |
---|
| 13336 | + uint8 req_elements; |
---|
| 13337 | + uint8 pad_2; |
---|
| 13338 | + struct ether_addr bssid; |
---|
| 13339 | + uint8 pad_3[2]; |
---|
| 13340 | + chanspec_list_t chspec_list; |
---|
| 13341 | +} bcn_req_v2_t; |
---|
| 13342 | + |
---|
| 13343 | +#define WL_RRM_BCN_REQ_MIN_PARAMS 8 |
---|
| 13344 | +#define WL_RRM_BCN_REQ_PARAM_INC_SSID 8 |
---|
| 13345 | +#define WL_RRM_BCN_REQ_PARAM_INC_CHANS 9 |
---|
| 13346 | +enum { |
---|
| 13347 | + WL_RRM_BCN_MODE_PASSIVE = 0, /* passive mode */ |
---|
| 13348 | + WL_RRM_BCN_MODE_ACTIVE = 1, /* active mode */ |
---|
| 13349 | + WL_RRM_BCN_MODE_TABLE = 2, /* beacon table */ |
---|
| 13350 | + WL_RRM_BCN_MODE_MAX_VALUE = 2 |
---|
| 13351 | +}; |
---|
7195 | 13352 | |
---|
7196 | 13353 | typedef struct rrmreq { |
---|
7197 | 13354 | struct ether_addr da; |
---|
.. | .. |
---|
7218 | 13375 | uint16 random_int; |
---|
7219 | 13376 | uint16 dur; |
---|
7220 | 13377 | uint8 group_id; |
---|
| 13378 | + uint8 PAD; |
---|
7221 | 13379 | uint16 reps; |
---|
7222 | 13380 | } statreq_t; |
---|
| 13381 | + |
---|
| 13382 | +typedef struct txstrmreq { |
---|
| 13383 | + struct ether_addr da; /* Destination address */ |
---|
| 13384 | + uint16 random_int; /* Random interval for measurement start */ |
---|
| 13385 | + uint16 dur; /* Measurement duration */ |
---|
| 13386 | + uint16 reps; /* number of repetitions */ |
---|
| 13387 | + struct ether_addr peer; /* Peer MAC address */ |
---|
| 13388 | + uint8 tid; /* Traffic ID */ |
---|
| 13389 | + uint8 bin0_range; /* Delay range of the first bin */ |
---|
| 13390 | +} txstrmreq_t; |
---|
| 13391 | + |
---|
| 13392 | +typedef struct lcireq { |
---|
| 13393 | + struct ether_addr da; /* Destination address */ |
---|
| 13394 | + uint16 reps; /* number of repetitions */ |
---|
| 13395 | + uint8 subj; /* Local/Remote/Thid party */ |
---|
| 13396 | + uint8 lat_res; /* Latitude requested Resolution */ |
---|
| 13397 | + uint8 lon_res; /* Longitude requested Resolution */ |
---|
| 13398 | + uint8 alt_res; /* Altitude requested Resolution */ |
---|
| 13399 | +} lcireq_t; |
---|
| 13400 | + |
---|
| 13401 | +typedef struct civicreq { |
---|
| 13402 | + struct ether_addr da; /* Destination address */ |
---|
| 13403 | + uint16 reps; /* number of repetitions */ |
---|
| 13404 | + uint8 subj; /* Local/Remote/Thid party */ |
---|
| 13405 | + uint8 civloc_type; /* Format of location info */ |
---|
| 13406 | + uint8 siu; /* Unit of Location service interval */ |
---|
| 13407 | + uint8 pad; |
---|
| 13408 | + uint16 si; /* Location service interval */ |
---|
| 13409 | +} civicreq_t; |
---|
| 13410 | + |
---|
| 13411 | +typedef struct locidreq { |
---|
| 13412 | + struct ether_addr da; /* Destination address */ |
---|
| 13413 | + uint16 reps; /* number of repetitions */ |
---|
| 13414 | + uint8 subj; /* Local/Remote/Thid party */ |
---|
| 13415 | + uint8 siu; /* Unit of Location service interval */ |
---|
| 13416 | + uint16 si; /* Location service interval */ |
---|
| 13417 | +} locidreq_t; |
---|
| 13418 | + |
---|
| 13419 | +typedef struct wl_rrm_config_ioc { |
---|
| 13420 | + uint16 version; /* command version */ |
---|
| 13421 | + uint16 id; /* subiovar cmd ID */ |
---|
| 13422 | + uint16 len; /* total length of all bytes in data[] */ |
---|
| 13423 | + uint16 pad; /* 4-byte boundary padding */ |
---|
| 13424 | + uint8 data[1]; /* payload */ |
---|
| 13425 | +} wl_rrm_config_ioc_t; |
---|
| 13426 | + |
---|
| 13427 | +enum { |
---|
| 13428 | + WL_RRM_CONFIG_NONE = 0, /* reserved */ |
---|
| 13429 | + WL_RRM_CONFIG_GET_LCI = 1, /* get LCI */ |
---|
| 13430 | + WL_RRM_CONFIG_SET_LCI = 2, /* set LCI */ |
---|
| 13431 | + WL_RRM_CONFIG_GET_CIVIC = 3, /* get civic location */ |
---|
| 13432 | + WL_RRM_CONFIG_SET_CIVIC = 4, /* set civic location */ |
---|
| 13433 | + WL_RRM_CONFIG_GET_LOCID = 5, /* get location identifier */ |
---|
| 13434 | + WL_RRM_CONFIG_SET_LOCID = 6, /* set location identifier */ |
---|
| 13435 | + WL_RRM_CONFIG_MAX = 7 |
---|
| 13436 | +}; |
---|
| 13437 | + |
---|
| 13438 | +#define WL_RRM_CONFIG_NAME "rrm_config" |
---|
| 13439 | +#define WL_RRM_CONFIG_MIN_LENGTH OFFSETOF(wl_rrm_config_ioc_t, data) |
---|
| 13440 | + |
---|
| 13441 | +enum { |
---|
| 13442 | + WL_RRM_EVENT_NONE = 0, /* not an event, reserved */ |
---|
| 13443 | + WL_RRM_EVENT_FRNG_REQ = 1, /* Receipt of FRNG request frame */ |
---|
| 13444 | + WL_RRM_EVENT_FRNG_REP = 2, /* Receipt of FRNG report frame */ |
---|
| 13445 | + |
---|
| 13446 | + WL_RRM_EVENT_MAX |
---|
| 13447 | +}; |
---|
| 13448 | +typedef int16 wl_rrm_event_type_t; |
---|
| 13449 | + |
---|
| 13450 | +typedef struct frngreq_target { |
---|
| 13451 | + uint32 bssid_info; |
---|
| 13452 | + uint8 channel; |
---|
| 13453 | + uint8 phytype; |
---|
| 13454 | + uint8 reg; |
---|
| 13455 | + uint8 pad; |
---|
| 13456 | + struct ether_addr bssid; |
---|
| 13457 | + chanspec_t chanspec; |
---|
| 13458 | + uint32 sid; |
---|
| 13459 | +} frngreq_target_t; |
---|
| 13460 | + |
---|
| 13461 | +typedef struct frngreq { |
---|
| 13462 | + wl_rrm_event_type_t event; /* RRM event type */ |
---|
| 13463 | + struct ether_addr da; |
---|
| 13464 | + uint16 max_init_delay; /* Upper bound of random delay, in TUs */ |
---|
| 13465 | + uint8 min_ap_count; /* Min FTM ranges requested (1-15) */ |
---|
| 13466 | + uint8 num_aps; /* Number of APs to range, at least min_ap_count */ |
---|
| 13467 | + uint16 max_age; /* Max elapsed time before FTM request, 0xFFFF = any */ |
---|
| 13468 | + uint16 reps; /* Number of repetitions of this measurement type */ |
---|
| 13469 | + frngreq_target_t targets[1]; /* Target BSSIDs to range */ |
---|
| 13470 | +} frngreq_t; |
---|
| 13471 | + |
---|
| 13472 | +typedef struct frngrep_range { |
---|
| 13473 | + uint32 start_tsf; /* 4 lsb of tsf */ |
---|
| 13474 | + struct ether_addr bssid; |
---|
| 13475 | + uint8 pad[2]; |
---|
| 13476 | + uint32 range; |
---|
| 13477 | + uint32 max_err; |
---|
| 13478 | + uint8 rsvd; |
---|
| 13479 | + uint8 pad2[3]; |
---|
| 13480 | +} frngrep_range_t; |
---|
| 13481 | + |
---|
| 13482 | +typedef struct frngrep_error { |
---|
| 13483 | + uint32 start_tsf; /* 4 lsb of tsf */ |
---|
| 13484 | + struct ether_addr bssid; |
---|
| 13485 | + uint8 code; |
---|
| 13486 | + uint8 pad[1]; |
---|
| 13487 | +} frngrep_error_t; |
---|
| 13488 | + |
---|
| 13489 | +typedef struct frngrep { |
---|
| 13490 | + wl_rrm_event_type_t event; /* RRM event type */ |
---|
| 13491 | + struct ether_addr da; |
---|
| 13492 | + uint8 range_entry_count; |
---|
| 13493 | + uint8 error_entry_count; |
---|
| 13494 | + uint16 dialog_token; /* dialog token */ |
---|
| 13495 | + frngrep_range_t range_entries[DOT11_FTM_RANGE_ENTRY_MAX_COUNT]; |
---|
| 13496 | + frngrep_error_t error_entries[DOT11_FTM_RANGE_ERROR_ENTRY_MAX_COUNT]; |
---|
| 13497 | +} frngrep_t; |
---|
| 13498 | + |
---|
| 13499 | +typedef struct wl_rrm_frng_ioc { |
---|
| 13500 | + uint16 version; /* command version */ |
---|
| 13501 | + uint16 id; /* subiovar cmd ID */ |
---|
| 13502 | + uint16 len; /* total length of all bytes in data[] */ |
---|
| 13503 | + uint16 pad; /* 4-byte boundary padding */ |
---|
| 13504 | + uint8 data[]; /* payload */ |
---|
| 13505 | +} wl_rrm_frng_ioc_t; |
---|
| 13506 | + |
---|
| 13507 | +enum { |
---|
| 13508 | + WL_RRM_FRNG_NONE = 0, /* reserved */ |
---|
| 13509 | + WL_RRM_FRNG_SET_REQ = 1, /* send ftm ranging request */ |
---|
| 13510 | + WL_RRM_FRNG_MAX = 2 |
---|
| 13511 | +}; |
---|
| 13512 | + |
---|
| 13513 | +#define WL_RRM_FRNG_NAME "rrm_frng" |
---|
| 13514 | +#define WL_RRM_FRNG_MIN_LENGTH OFFSETOF(wl_rrm_frng_ioc_t, data) |
---|
7223 | 13515 | |
---|
7224 | 13516 | #define WL_RRM_RPT_VER 0 |
---|
7225 | 13517 | #define WL_RRM_RPT_MAX_PAYLOAD 256 |
---|
.. | .. |
---|
7228 | 13520 | #define WL_RRM_RPT_FALG_GRP_ID_PROPR (1 << 0) |
---|
7229 | 13521 | #define WL_RRM_RPT_FALG_GRP_ID_0 (1 << 1) |
---|
7230 | 13522 | typedef struct { |
---|
7231 | | - uint16 ver; /* version */ |
---|
7232 | | - struct ether_addr addr; /* STA MAC addr */ |
---|
7233 | | - uint32 timestamp; /* timestamp of the report */ |
---|
7234 | | - uint16 flag; /* flag */ |
---|
7235 | | - uint16 len; /* length of payload data */ |
---|
7236 | | - unsigned char data[WL_RRM_RPT_MAX_PAYLOAD]; |
---|
| 13523 | + uint16 ver; /**< version */ |
---|
| 13524 | + struct ether_addr addr; /**< STA MAC addr */ |
---|
| 13525 | + uint32 timestamp; /**< timestamp of the report */ |
---|
| 13526 | + uint16 flag; /**< flag */ |
---|
| 13527 | + uint16 len; /**< length of payload data */ |
---|
| 13528 | + uint8 data[WL_RRM_RPT_MAX_PAYLOAD]; |
---|
7237 | 13529 | } statrpt_t; |
---|
7238 | | - |
---|
7239 | | -typedef struct wlc_l2keepalive_ol_params { |
---|
7240 | | - uint8 flags; |
---|
7241 | | - uint8 prio; |
---|
7242 | | - uint16 period_ms; |
---|
7243 | | -} wlc_l2keepalive_ol_params_t; |
---|
7244 | 13530 | |
---|
7245 | 13531 | typedef struct wlc_dwds_config { |
---|
7246 | 13532 | uint32 enable; |
---|
7247 | | - uint32 mode; /* STA/AP interface */ |
---|
| 13533 | + uint32 mode; /**< STA/AP interface */ |
---|
7248 | 13534 | struct ether_addr ea; |
---|
| 13535 | + uint8 PAD[2]; |
---|
7249 | 13536 | } wlc_dwds_config_t; |
---|
7250 | 13537 | |
---|
7251 | 13538 | typedef struct wl_el_set_params_s { |
---|
7252 | | - uint8 set; /* Set number */ |
---|
7253 | | - uint32 size; /* Size to make/expand */ |
---|
| 13539 | + uint8 set; /**< Set number */ |
---|
| 13540 | + uint8 PAD[3]; |
---|
| 13541 | + uint32 size; /**< Size to make/expand */ |
---|
7254 | 13542 | } wl_el_set_params_t; |
---|
7255 | 13543 | |
---|
7256 | 13544 | typedef struct wl_el_tag_params_s { |
---|
.. | .. |
---|
7259 | 13547 | uint8 flags; |
---|
7260 | 13548 | } wl_el_tag_params_t; |
---|
7261 | 13549 | |
---|
7262 | | -/* Video Traffic Interference Monitor config */ |
---|
| 13550 | +/** Video Traffic Interference Monitor config */ |
---|
7263 | 13551 | #define INTFER_VERSION 1 |
---|
7264 | 13552 | typedef struct wl_intfer_params { |
---|
7265 | | - uint16 version; /* version */ |
---|
7266 | | - uint8 period; /* sample period */ |
---|
7267 | | - uint8 cnt; /* sample cnt */ |
---|
7268 | | - uint8 txfail_thresh; /* non-TCP txfail threshold */ |
---|
7269 | | - uint8 tcptxfail_thresh; /* tcptxfail threshold */ |
---|
| 13553 | + uint16 version; /**< version */ |
---|
| 13554 | + uint8 period; /**< sample period */ |
---|
| 13555 | + uint8 cnt; /**< sample cnt */ |
---|
| 13556 | + uint8 txfail_thresh; /**< non-TCP txfail threshold */ |
---|
| 13557 | + uint8 tcptxfail_thresh; /**< tcptxfail threshold */ |
---|
7270 | 13558 | } wl_intfer_params_t; |
---|
7271 | 13559 | |
---|
| 13560 | +#define EVENT_LOG_SET_TYPE_CURRENT_VERSION 0 |
---|
| 13561 | +typedef struct wl_el_set_type_s { |
---|
| 13562 | + uint16 version; |
---|
| 13563 | + uint16 len; |
---|
| 13564 | + uint8 set; /* Set number */ |
---|
| 13565 | + uint8 type; /* Type- EVENT_LOG_SET_TYPE_DEFAULT or EVENT_LOG_SET_TYPE_PRSRV */ |
---|
| 13566 | + uint16 PAD; |
---|
| 13567 | +} wl_el_set_type_t; |
---|
| 13568 | + |
---|
7272 | 13569 | typedef struct wl_staprio_cfg { |
---|
7273 | | - struct ether_addr ea; /* mac addr */ |
---|
7274 | | - uint8 prio; /* scb priority */ |
---|
| 13570 | + struct ether_addr ea; /**< mac addr */ |
---|
| 13571 | + uint8 prio; /**< scb priority */ |
---|
7275 | 13572 | } wl_staprio_cfg_t; |
---|
| 13573 | + |
---|
| 13574 | +#define STAMON_STACONFIG_VER 1 |
---|
| 13575 | +/* size of struct wlc_stamon_sta_config_t elements */ |
---|
| 13576 | +#define STAMON_STACONFIG_LENGTH 20 |
---|
7276 | 13577 | |
---|
7277 | 13578 | typedef enum wl_stamon_cfg_cmd_type { |
---|
7278 | 13579 | STAMON_CFG_CMD_DEL = 0, |
---|
.. | .. |
---|
7280 | 13581 | STAMON_CFG_CMD_ENB = 2, |
---|
7281 | 13582 | STAMON_CFG_CMD_DSB = 3, |
---|
7282 | 13583 | STAMON_CFG_CMD_CNT = 4, |
---|
7283 | | - STAMON_CFG_CMD_RSTCNT = 5 |
---|
| 13584 | + STAMON_CFG_CMD_RSTCNT = 5, |
---|
| 13585 | + STAMON_CFG_CMD_GET_STATS = 6, |
---|
| 13586 | + STAMON_CFG_CMD_SET_MONTIME = 7 |
---|
7284 | 13587 | } wl_stamon_cfg_cmd_type_t; |
---|
7285 | 13588 | |
---|
7286 | 13589 | typedef struct wlc_stamon_sta_config { |
---|
7287 | | - wl_stamon_cfg_cmd_type_t cmd; /* 0 - delete, 1 - add */ |
---|
| 13590 | + wl_stamon_cfg_cmd_type_t cmd; /**< 0 - delete, 1 - add */ |
---|
7288 | 13591 | struct ether_addr ea; |
---|
| 13592 | + uint16 version; /* Command structure version */ |
---|
| 13593 | + uint16 length; /* Command structure length */ |
---|
| 13594 | + uint8 pad[2]; |
---|
| 13595 | + /* Time (ms) for which STA's are monitored. Value ZERO indicates no time limit */ |
---|
| 13596 | + uint32 monitor_time; |
---|
7289 | 13597 | } wlc_stamon_sta_config_t; |
---|
7290 | 13598 | |
---|
7291 | | -#ifdef SR_DEBUG |
---|
| 13599 | +/* ifdef SR_DEBUG */ |
---|
7292 | 13600 | typedef struct /* pmu_reg */{ |
---|
7293 | 13601 | uint32 pmu_control; |
---|
7294 | 13602 | uint32 pmu_capabilities; |
---|
.. | .. |
---|
7304 | 13612 | uint32 pmu_rsrc_up_down_timer[31]; |
---|
7305 | 13613 | uint32 rsrc_dep_mask[31]; |
---|
7306 | 13614 | } pmu_reg_t; |
---|
7307 | | -#endif /* pmu_reg */ |
---|
| 13615 | +/* endif SR_DEBUG */ |
---|
7308 | 13616 | |
---|
7309 | 13617 | typedef struct wl_taf_define { |
---|
7310 | | - struct ether_addr ea; /* STA MAC or 0xFF... */ |
---|
7311 | | - uint16 version; /* version */ |
---|
7312 | | - uint32 sch; /* method index */ |
---|
7313 | | - uint32 prio; /* priority */ |
---|
7314 | | - uint32 misc; /* used for return value */ |
---|
7315 | | - char text[1]; /* used to pass and return ascii text */ |
---|
| 13618 | + struct ether_addr ea; /**< STA MAC or 0xFF... */ |
---|
| 13619 | + uint16 version; /**< version */ |
---|
| 13620 | + uint32 sch; /**< method index */ |
---|
| 13621 | + uint32 prio; /**< priority */ |
---|
| 13622 | + uint32 misc; /**< used for return value */ |
---|
| 13623 | + uint8 text[]; /**< used to pass and return ascii text */ |
---|
7316 | 13624 | } wl_taf_define_t; |
---|
7317 | 13625 | |
---|
7318 | | -/* Received Beacons lengths information */ |
---|
| 13626 | +/** Received Beacons lengths information */ |
---|
7319 | 13627 | #define WL_LAST_BCNS_INFO_FIXED_LEN OFFSETOF(wlc_bcn_len_hist_t, bcnlen_ring) |
---|
7320 | 13628 | typedef struct wlc_bcn_len_hist { |
---|
7321 | | - uint16 ver; /* version field */ |
---|
7322 | | - uint16 cur_index; /* current pointed index in ring buffer */ |
---|
7323 | | - uint32 max_bcnlen; /* Max beacon length received */ |
---|
7324 | | - uint32 min_bcnlen; /* Min beacon length received */ |
---|
7325 | | - uint32 ringbuff_len; /* Length of the ring buffer 'bcnlen_ring' */ |
---|
7326 | | - uint32 bcnlen_ring[1]; /* ring buffer storing received beacon lengths */ |
---|
| 13629 | + uint16 ver; /**< version field */ |
---|
| 13630 | + uint16 cur_index; /**< current pointed index in ring buffer */ |
---|
| 13631 | + uint32 max_bcnlen; /**< Max beacon length received */ |
---|
| 13632 | + uint32 min_bcnlen; /**< Min beacon length received */ |
---|
| 13633 | + uint32 ringbuff_len; /**< Length of the ring buffer 'bcnlen_ring' */ |
---|
| 13634 | + uint32 bcnlen_ring[1]; /**< ring buffer storing received beacon lengths */ |
---|
7327 | 13635 | } wlc_bcn_len_hist_t; |
---|
7328 | 13636 | |
---|
7329 | 13637 | /* WDS net interface types */ |
---|
7330 | | -#define WL_WDSIFTYPE_NONE 0x0 /* The interface type is neither WDS nor DWDS. */ |
---|
7331 | | -#define WL_WDSIFTYPE_WDS 0x1 /* The interface is WDS type. */ |
---|
7332 | | -#define WL_WDSIFTYPE_DWDS 0x2 /* The interface is DWDS type. */ |
---|
| 13638 | +#define WL_WDSIFTYPE_NONE 0x0 /**< The interface type is neither WDS nor DWDS. */ |
---|
| 13639 | +#define WL_WDSIFTYPE_WDS 0x1 /**< The interface is WDS type. */ |
---|
| 13640 | +#define WL_WDSIFTYPE_DWDS 0x2 /**< The interface is DWDS type. */ |
---|
7333 | 13641 | |
---|
7334 | 13642 | typedef struct wl_bssload_static { |
---|
7335 | | - bool is_static; |
---|
| 13643 | + uint8 is_static; |
---|
| 13644 | + uint8 PAD; |
---|
7336 | 13645 | uint16 sta_count; |
---|
7337 | 13646 | uint8 chan_util; |
---|
| 13647 | + uint8 PAD; |
---|
7338 | 13648 | uint16 aac; |
---|
7339 | 13649 | } wl_bssload_static_t; |
---|
7340 | 13650 | |
---|
| 13651 | +/* Buffer of size WLC_SAMPLECOLLECT_MAXLEN (=10240 for 4345a0 ACPHY) |
---|
| 13652 | + * gets copied to this, multiple times |
---|
| 13653 | + */ |
---|
| 13654 | +typedef enum wl_gpaio_option { |
---|
| 13655 | + GPAIO_PMU_AFELDO, |
---|
| 13656 | + GPAIO_PMU_TXLDO, |
---|
| 13657 | + GPAIO_PMU_VCOLDO, |
---|
| 13658 | + GPAIO_PMU_LNALDO, |
---|
| 13659 | + GPAIO_PMU_ADCLDO, |
---|
| 13660 | + GPAIO_ICTAT_CAL, |
---|
| 13661 | + GPAIO_PMU_CLEAR, |
---|
| 13662 | + GPAIO_OFF, |
---|
| 13663 | + GPAIO_PMU_LOGENLDO, |
---|
| 13664 | + GPAIO_PMU_RXLDO2G, |
---|
| 13665 | + GPAIO_PMU_RXLDO5G, |
---|
| 13666 | + GPAIO_PMU_LPFTXLDO, |
---|
| 13667 | + GPAIO_PMU_LDO1P6, |
---|
| 13668 | + GPAIO_RCAL, |
---|
| 13669 | + GPAIO_IQDAC_BUF_DC_MEAS, |
---|
| 13670 | + GPAIO_IQDAC_BUF_DC_CLEAR, |
---|
| 13671 | + GPAIO_DAC_IQ_DC_RDBK, |
---|
| 13672 | + GPAIO_DAC_IQ_DC_RDBK_CLEAR, |
---|
| 13673 | + GPAIO_AFE_LDO_FOR_DAC_DC, |
---|
| 13674 | + GPAIO_PA5G_VCAS_SOURCE, |
---|
| 13675 | + GPAIO_BIQ2_DC_MEAS, |
---|
| 13676 | + GPAIO_BIQ2_DC_CLEAR, |
---|
| 13677 | + GPAIO_LDO_1P8_OUT |
---|
| 13678 | +} wl_gpaio_option_t; |
---|
7341 | 13679 | |
---|
7342 | | -/* IO Var Operations - the Value of iov_op In wlc_ap_doiovar */ |
---|
7343 | | -typedef enum wlc_ap_iov_operation { |
---|
| 13680 | +/** IO Var Operations - the Value of iov_op In wlc_ap_doiovar */ |
---|
| 13681 | +typedef enum wlc_ap_iov_bss_operation { |
---|
7344 | 13682 | WLC_AP_IOV_OP_DELETE = -1, |
---|
7345 | 13683 | WLC_AP_IOV_OP_DISABLE = 0, |
---|
7346 | 13684 | WLC_AP_IOV_OP_ENABLE = 1, |
---|
7347 | | - WLC_AP_IOV_OP_MANUAL_AP_BSSCFG_CREATE = 2, |
---|
7348 | | - WLC_AP_IOV_OP_MANUAL_STA_BSSCFG_CREATE = 3, |
---|
| 13685 | + WLC_AP_IOV_OP_MANUAL_STA_BSSCFG_CREATE = 2, |
---|
| 13686 | + WLC_AP_IOV_OP_MANUAL_AP_BSSCFG_CREATE = 3, |
---|
7349 | 13687 | WLC_AP_IOV_OP_MOVE = 4 |
---|
7350 | | -} wlc_ap_iov_oper_t; |
---|
| 13688 | +} wlc_ap_iov_bss_oper_t; |
---|
7351 | 13689 | |
---|
7352 | 13690 | /* LTE coex info */ |
---|
7353 | 13691 | /* Analogue of HCI Set MWS Signaling cmd */ |
---|
7354 | 13692 | typedef struct { |
---|
7355 | | - uint16 mws_rx_assert_offset; |
---|
7356 | | - uint16 mws_rx_assert_jitter; |
---|
7357 | | - uint16 mws_rx_deassert_offset; |
---|
7358 | | - uint16 mws_rx_deassert_jitter; |
---|
7359 | | - uint16 mws_tx_assert_offset; |
---|
7360 | | - uint16 mws_tx_assert_jitter; |
---|
7361 | | - uint16 mws_tx_deassert_offset; |
---|
7362 | | - uint16 mws_tx_deassert_jitter; |
---|
7363 | | - uint16 mws_pattern_assert_offset; |
---|
7364 | | - uint16 mws_pattern_assert_jitter; |
---|
7365 | | - uint16 mws_inact_dur_assert_offset; |
---|
7366 | | - uint16 mws_inact_dur_assert_jitter; |
---|
7367 | | - uint16 mws_scan_freq_assert_offset; |
---|
7368 | | - uint16 mws_scan_freq_assert_jitter; |
---|
7369 | | - uint16 mws_prio_assert_offset_req; |
---|
| 13693 | + int16 mws_rx_assert_offset; |
---|
| 13694 | + int16 mws_rx_assert_jitter; |
---|
| 13695 | + int16 mws_rx_deassert_offset; |
---|
| 13696 | + int16 mws_rx_deassert_jitter; |
---|
| 13697 | + int16 mws_tx_assert_offset; |
---|
| 13698 | + int16 mws_tx_assert_jitter; |
---|
| 13699 | + int16 mws_tx_deassert_offset; |
---|
| 13700 | + int16 mws_tx_deassert_jitter; |
---|
| 13701 | + int16 mws_pattern_assert_offset; |
---|
| 13702 | + int16 mws_pattern_assert_jitter; |
---|
| 13703 | + int16 mws_inact_dur_assert_offset; |
---|
| 13704 | + int16 mws_inact_dur_assert_jitter; |
---|
| 13705 | + int16 mws_scan_freq_assert_offset; |
---|
| 13706 | + int16 mws_scan_freq_assert_jitter; |
---|
| 13707 | + int16 mws_prio_assert_offset_req; |
---|
7370 | 13708 | } wci2_config_t; |
---|
7371 | 13709 | |
---|
7372 | | -/* Analogue of HCI MWS Channel Params */ |
---|
| 13710 | +/** Analogue of HCI MWS Channel Params */ |
---|
7373 | 13711 | typedef struct { |
---|
7374 | | - uint16 mws_rx_center_freq; /* MHz */ |
---|
| 13712 | + uint16 mws_rx_center_freq; /**< MHz */ |
---|
7375 | 13713 | uint16 mws_tx_center_freq; |
---|
7376 | | - uint16 mws_rx_channel_bw; /* KHz */ |
---|
| 13714 | + uint16 mws_rx_channel_bw; /**< KHz */ |
---|
7377 | 13715 | uint16 mws_tx_channel_bw; |
---|
7378 | 13716 | uint8 mws_channel_en; |
---|
7379 | | - uint8 mws_channel_type; /* Don't care for WLAN? */ |
---|
| 13717 | + uint8 mws_channel_type; /**< Don't care for WLAN? */ |
---|
7380 | 13718 | } mws_params_t; |
---|
7381 | 13719 | |
---|
7382 | | -/* MWS wci2 message */ |
---|
| 13720 | +#define LTECX_MAX_NUM_PERIOD_TYPES 7 |
---|
| 13721 | + |
---|
| 13722 | +/* LTE Frame params */ |
---|
7383 | 13723 | typedef struct { |
---|
7384 | | - uint8 mws_wci2_data; /* BT-SIG msg */ |
---|
7385 | | - uint16 mws_wci2_interval; /* Interval in us */ |
---|
7386 | | - uint16 mws_wci2_repeat; /* No of msgs to send */ |
---|
| 13724 | + uint16 mws_frame_dur; |
---|
| 13725 | + int16 mws_framesync_assert_offset; |
---|
| 13726 | + uint16 mws_framesync_assert_jitter; |
---|
| 13727 | + uint16 mws_period_dur[LTECX_MAX_NUM_PERIOD_TYPES]; |
---|
| 13728 | + uint8 mws_period_type[LTECX_MAX_NUM_PERIOD_TYPES]; |
---|
| 13729 | + uint8 mws_num_periods; |
---|
| 13730 | +} mws_frame_config_t; |
---|
| 13731 | + |
---|
| 13732 | +/** MWS wci2 message */ |
---|
| 13733 | +typedef struct { |
---|
| 13734 | + uint8 mws_wci2_data; /**< BT-SIG msg */ |
---|
| 13735 | + uint8 PAD; |
---|
| 13736 | + uint16 mws_wci2_interval; /**< Interval in us */ |
---|
| 13737 | + uint16 mws_wci2_repeat; /**< No of msgs to send */ |
---|
7387 | 13738 | } mws_wci2_msg_t; |
---|
| 13739 | +/* MWS ANT map */ |
---|
| 13740 | +typedef struct { |
---|
| 13741 | + uint16 combo1; /* mws ant selection 1 */ |
---|
| 13742 | + uint16 combo2; /* mws ant selection 2 */ |
---|
| 13743 | + uint16 combo3; /* mws ant selection 3 */ |
---|
| 13744 | + uint16 combo4; /* mws ant selection 4 */ |
---|
| 13745 | +} mws_ant_map_t; |
---|
| 13746 | + |
---|
| 13747 | +/* MWS ANT map 2nd generation */ |
---|
| 13748 | +typedef struct { |
---|
| 13749 | + uint16 combo[16]; /* mws ant selection 2nd */ |
---|
| 13750 | +} mws_ant_map_t_2nd; |
---|
| 13751 | + |
---|
| 13752 | +/* MWS SCAN_REQ Bitmap */ |
---|
| 13753 | +typedef struct mws_scanreq_params { |
---|
| 13754 | + uint16 idx; |
---|
| 13755 | + uint16 bm_2g; |
---|
| 13756 | + uint16 bm_5g_lo; |
---|
| 13757 | + uint16 bm_5g_mid; |
---|
| 13758 | + uint16 bm_5g_hi; |
---|
| 13759 | +} mws_scanreq_params_t; |
---|
7388 | 13760 | |
---|
7389 | 13761 | typedef struct { |
---|
7390 | | - uint32 config; /* MODE: AUTO (-1), Disable (0), Enable (1) */ |
---|
7391 | | - uint32 status; /* Current state: Disabled (0), Enabled (1) */ |
---|
| 13762 | + uint32 config; /**< MODE: AUTO (-1), Disable (0), Enable (1) */ |
---|
| 13763 | + uint32 status; /**< Current state: Disabled (0), Enabled (1) */ |
---|
7392 | 13764 | } wl_config_t; |
---|
7393 | 13765 | |
---|
7394 | 13766 | #define WLC_RSDB_MODE_AUTO_MASK 0x80 |
---|
7395 | 13767 | #define WLC_RSDB_EXTRACT_MODE(val) ((int8)((val) & (~(WLC_RSDB_MODE_AUTO_MASK)))) |
---|
7396 | 13768 | |
---|
7397 | | -#define WL_IF_STATS_T_VERSION 1 /* current version of wl_if_stats structure */ |
---|
| 13769 | +typedef struct { |
---|
| 13770 | + uint16 request; /* type of sensor hub request */ |
---|
| 13771 | + uint16 enable; /* enable/disable response for specified request */ |
---|
| 13772 | + uint16 interval; /* interval between responses to the request */ |
---|
| 13773 | +} shub_req_t; |
---|
7398 | 13774 | |
---|
7399 | | -/* per interface counters */ |
---|
| 13775 | +#define WL_IF_STATS_T_VERSION 1 /**< current version of wl_if_stats structure */ |
---|
| 13776 | + |
---|
| 13777 | +/** per interface counters */ |
---|
7400 | 13778 | typedef struct wl_if_stats { |
---|
7401 | | - uint16 version; /* version of the structure */ |
---|
7402 | | - uint16 length; /* length of the entire structure */ |
---|
7403 | | - uint32 PAD; /* padding */ |
---|
| 13779 | + uint16 version; /**< version of the structure */ |
---|
| 13780 | + uint16 length; /**< length of the entire structure */ |
---|
| 13781 | + uint32 PAD; /**< padding */ |
---|
7404 | 13782 | |
---|
7405 | 13783 | /* transmit stat counters */ |
---|
7406 | | - uint64 txframe; /* tx data frames */ |
---|
7407 | | - uint64 txbyte; /* tx data bytes */ |
---|
7408 | | - uint64 txerror; /* tx data errors (derived: sum of others) */ |
---|
7409 | | - uint64 txnobuf; /* tx out of buffer errors */ |
---|
7410 | | - uint64 txrunt; /* tx runt frames */ |
---|
7411 | | - uint64 txfail; /* tx failed frames */ |
---|
7412 | | - uint64 txretry; /* tx retry frames */ |
---|
7413 | | - uint64 txretrie; /* tx multiple retry frames */ |
---|
7414 | | - uint64 txfrmsnt; /* tx sent frames */ |
---|
7415 | | - uint64 txmulti; /* tx mulitcast sent frames */ |
---|
7416 | | - uint64 txfrag; /* tx fragments sent */ |
---|
| 13784 | + uint64 txframe; /**< tx data frames */ |
---|
| 13785 | + uint64 txbyte; /**< tx data bytes */ |
---|
| 13786 | + uint64 txerror; /**< tx data errors (derived: sum of others) */ |
---|
| 13787 | + uint64 txnobuf; /**< tx out of buffer errors */ |
---|
| 13788 | + uint64 txrunt; /**< tx runt frames */ |
---|
| 13789 | + uint64 txfail; /**< tx failed frames */ |
---|
| 13790 | + uint64 txretry; /**< tx retry frames */ |
---|
| 13791 | + uint64 txretrie; /**< tx multiple retry frames */ |
---|
| 13792 | + uint64 txfrmsnt; /**< tx sent frames */ |
---|
| 13793 | + uint64 txmulti; /**< tx mulitcast sent frames */ |
---|
| 13794 | + uint64 txfrag; /**< tx fragments sent */ |
---|
7417 | 13795 | |
---|
7418 | 13796 | /* receive stat counters */ |
---|
7419 | | - uint64 rxframe; /* rx data frames */ |
---|
7420 | | - uint64 rxbyte; /* rx data bytes */ |
---|
7421 | | - uint64 rxerror; /* rx data errors (derived: sum of others) */ |
---|
7422 | | - uint64 rxnobuf; /* rx out of buffer errors */ |
---|
7423 | | - uint64 rxrunt; /* rx runt frames */ |
---|
7424 | | - uint64 rxfragerr; /* rx fragment errors */ |
---|
7425 | | - uint64 rxmulti; /* rx multicast frames */ |
---|
| 13797 | + uint64 rxframe; /**< rx data frames */ |
---|
| 13798 | + uint64 rxbyte; /**< rx data bytes */ |
---|
| 13799 | + uint64 rxerror; /**< rx data errors (derived: sum of others) */ |
---|
| 13800 | + uint64 rxnobuf; /**< rx out of buffer errors */ |
---|
| 13801 | + uint64 rxrunt; /**< rx runt frames */ |
---|
| 13802 | + uint64 rxfragerr; /**< rx fragment errors */ |
---|
| 13803 | + uint64 rxmulti; /**< rx multicast frames */ |
---|
7426 | 13804 | |
---|
7427 | 13805 | uint64 txexptime; /* DATA Tx frames suppressed due to timer expiration */ |
---|
7428 | 13806 | uint64 txrts; /* RTS/CTS succeeeded count */ |
---|
7429 | 13807 | uint64 txnocts; /* RTS/CTS faled count */ |
---|
| 13808 | + |
---|
| 13809 | + uint64 txretrans; /* Number of frame retransmissions */ |
---|
7430 | 13810 | } |
---|
7431 | 13811 | wl_if_stats_t; |
---|
7432 | 13812 | |
---|
7433 | 13813 | typedef struct wl_band { |
---|
7434 | | - uint16 bandtype; /* WL_BAND_2G, WL_BAND_5G */ |
---|
7435 | | - uint16 bandunit; /* bandstate[] index */ |
---|
7436 | | - uint16 phytype; /* phytype */ |
---|
| 13814 | + uint16 bandtype; /**< WL_BAND_2G, WL_BAND_5G */ |
---|
| 13815 | + uint16 bandunit; /**< bandstate[] index */ |
---|
| 13816 | + uint16 phytype; /**< phytype */ |
---|
7437 | 13817 | uint16 phyrev; |
---|
7438 | 13818 | } |
---|
7439 | 13819 | wl_band_t; |
---|
7440 | 13820 | |
---|
7441 | | -#define WL_WLC_VERSION_T_VERSION 1 /* current version of wlc_version structure */ |
---|
| 13821 | +#define WL_WLC_VERSION_T_VERSION 1 /**< current version of wlc_version structure */ |
---|
7442 | 13822 | |
---|
7443 | | -/* wlc interface version */ |
---|
| 13823 | +/** wlc interface version */ |
---|
7444 | 13824 | typedef struct wl_wlc_version { |
---|
7445 | | - uint16 version; /* version of the structure */ |
---|
7446 | | - uint16 length; /* length of the entire structure */ |
---|
| 13825 | + uint16 version; /**< version of the structure */ |
---|
| 13826 | + uint16 length; /**< length of the entire structure */ |
---|
7447 | 13827 | |
---|
7448 | 13828 | /* epi version numbers */ |
---|
7449 | | - uint16 epi_ver_major; /* epi major version number */ |
---|
7450 | | - uint16 epi_ver_minor; /* epi minor version number */ |
---|
7451 | | - uint16 epi_rc_num; /* epi RC number */ |
---|
7452 | | - uint16 epi_incr_num; /* epi increment number */ |
---|
| 13829 | + uint16 epi_ver_major; /**< epi major version number */ |
---|
| 13830 | + uint16 epi_ver_minor; /**< epi minor version number */ |
---|
| 13831 | + uint16 epi_rc_num; /**< epi RC number */ |
---|
| 13832 | + uint16 epi_incr_num; /**< epi increment number */ |
---|
7453 | 13833 | |
---|
7454 | 13834 | /* wlc interface version numbers */ |
---|
7455 | | - uint16 wlc_ver_major; /* wlc interface major version number */ |
---|
7456 | | - uint16 wlc_ver_minor; /* wlc interface minor version number */ |
---|
| 13835 | + uint16 wlc_ver_major; /**< wlc interface major version number */ |
---|
| 13836 | + uint16 wlc_ver_minor; /**< wlc interface minor version number */ |
---|
7457 | 13837 | } |
---|
7458 | 13838 | wl_wlc_version_t; |
---|
7459 | 13839 | |
---|
7460 | | -/* Version of WLC interface to be returned as a part of wl_wlc_version structure. |
---|
7461 | | - * For the discussion related to versions update policy refer to |
---|
7462 | | - * http://hwnbu-twiki.broadcom.com/bin/view/Mwgroup/WlShimAbstractionLayer |
---|
7463 | | - * For now the policy is to increment WLC_VERSION_MAJOR each time |
---|
7464 | | - * there is a change that involves both WLC layer and per-port layer. |
---|
7465 | | - * WLC_VERSION_MINOR is currently not in use. |
---|
7466 | | - */ |
---|
7467 | | -#define WLC_VERSION_MAJOR 3 |
---|
7468 | | -#define WLC_VERSION_MINOR 0 |
---|
| 13840 | +/* Highest version of WLC_API_VERSION supported */ |
---|
| 13841 | +#define WLC_API_VERSION_MAJOR_MAX 8 |
---|
| 13842 | +#define WLC_API_VERSION_MINOR_MAX 0 |
---|
7469 | 13843 | |
---|
7470 | 13844 | /* begin proxd definitions */ |
---|
7471 | 13845 | #include <packed_section_start.h> |
---|
7472 | 13846 | |
---|
7473 | | -#define WL_PROXD_API_VERSION 0x0300 /* version 3.0 */ |
---|
| 13847 | +#define WL_PROXD_API_VERSION 0x0300 /**< version 3.0 */ |
---|
7474 | 13848 | |
---|
7475 | | -/* Minimum supported API version */ |
---|
| 13849 | +/** Minimum supported API version */ |
---|
7476 | 13850 | #define WL_PROXD_API_MIN_VERSION 0x0300 |
---|
7477 | 13851 | |
---|
7478 | | -/* proximity detection methods */ |
---|
| 13852 | +/** proximity detection methods */ |
---|
7479 | 13853 | enum { |
---|
7480 | 13854 | WL_PROXD_METHOD_NONE = 0, |
---|
7481 | | - WL_PROXD_METHOD_RSVD1 = 1, /* backward compatibility - RSSI, not supported */ |
---|
7482 | | - WL_PROXD_METHOD_TOF = 2, |
---|
7483 | | - WL_PROXD_METHOD_RSVD2 = 3, /* 11v only - if needed */ |
---|
7484 | | - WL_PROXD_METHOD_FTM = 4, /* IEEE rev mc/2014 */ |
---|
| 13855 | + WL_PROXD_METHOD_RSVD1 = 1, /**< backward compatibility - RSSI, not supported */ |
---|
| 13856 | + WL_PROXD_METHOD_TOF = 2, |
---|
| 13857 | + WL_PROXD_METHOD_RSVD2 = 3, /**< 11v only - if needed */ |
---|
| 13858 | + WL_PROXD_METHOD_FTM = 4, /**< IEEE rev mc/2014 */ |
---|
7485 | 13859 | WL_PROXD_METHOD_MAX |
---|
7486 | 13860 | }; |
---|
7487 | 13861 | typedef int16 wl_proxd_method_t; |
---|
7488 | 13862 | |
---|
7489 | | -/* global and method configuration flags */ |
---|
| 13863 | +/** global and method configuration flags */ |
---|
7490 | 13864 | enum { |
---|
7491 | | - WL_PROXD_FLAG_NONE = 0x00000000, |
---|
7492 | | - WL_PROXD_FLAG_RX_ENABLED = 0x00000001, /* respond to requests */ |
---|
7493 | | - WL_PROXD_FLAG_RX_RANGE_REQ = 0x00000002, /* 11mc range requests enabled */ |
---|
7494 | | - WL_PROXD_FLAG_TX_LCI = 0x00000004, /* transmit location, if available */ |
---|
7495 | | - WL_PROXD_FLAG_TX_CIVIC = 0x00000008, /* tx civic loc, if available */ |
---|
7496 | | - WL_PROXD_FLAG_RX_AUTO_BURST = 0x00000010, /* respond to requests w/o host action */ |
---|
7497 | | - WL_PROXD_FLAG_TX_AUTO_BURST = 0x00000020, /* continue requests w/o host action */ |
---|
7498 | | - WL_PROXD_FLAG_AVAIL_PUBLISH = 0x00000040, /* publish availability */ |
---|
7499 | | - WL_PROXD_FLAG_AVAIL_SCHEDULE = 0x00000080, /* schedule using availability */ |
---|
7500 | | - WL_PROXD_FLAG_ALL = 0xffffffff |
---|
| 13865 | + WL_PROXD_FLAG_NONE = 0x00000000, |
---|
| 13866 | + WL_PROXD_FLAG_RX_ENABLED = 0x00000001, /**< respond to requests, per bss */ |
---|
| 13867 | + WL_PROXD_FLAG_RX_RANGE_REQ = 0x00000002, /**< 11mc range requests enabled */ |
---|
| 13868 | + WL_PROXD_FLAG_TX_LCI = 0x00000004, /**< tx lci, if known */ |
---|
| 13869 | + WL_PROXD_FLAG_TX_CIVIC = 0x00000008, /**< tx civic, if known */ |
---|
| 13870 | + WL_PROXD_FLAG_RX_AUTO_BURST = 0x00000010, /**< auto respond w/o host action */ |
---|
| 13871 | + WL_PROXD_FLAG_TX_AUTO_BURST = 0x00000020, /**< continue tx w/o host action */ |
---|
| 13872 | + WL_PROXD_FLAG_AVAIL_PUBLISH = 0x00000040, /**< publish availability */ |
---|
| 13873 | + WL_PROXD_FLAG_AVAIL_SCHEDULE = 0x00000080, /**< schedule using availability */ |
---|
| 13874 | + WL_PROXD_FLAG_ASAP_CAPABLE = 0x00000100, /* ASAP capable */ |
---|
| 13875 | + WL_PROXD_FLAG_MBURST_FOLLOWUP = 0x00000200, /* new multi-burst algorithm */ |
---|
| 13876 | + WL_PROXD_FLAG_SECURE = 0x00000400, /* per bsscfg option */ |
---|
| 13877 | + WL_PROXD_FLAG_NO_TSF_SYNC = 0x00000800, /* disable tsf sync */ |
---|
| 13878 | + WL_PROXD_FLAG_ALL = 0xffffffff |
---|
7501 | 13879 | }; |
---|
7502 | 13880 | typedef uint32 wl_proxd_flags_t; |
---|
7503 | 13881 | |
---|
7504 | 13882 | #define WL_PROXD_FLAGS_AVAIL (WL_PROXD_FLAG_AVAIL_PUBLISH | \ |
---|
7505 | 13883 | WL_PROXD_FLAG_AVAIL_SCHEDULE) |
---|
7506 | 13884 | |
---|
7507 | | -/* session flags */ |
---|
| 13885 | +/** session flags */ |
---|
7508 | 13886 | enum { |
---|
7509 | | - WL_PROXD_SESSION_FLAG_NONE = 0x00000000, /* no flags */ |
---|
7510 | | - WL_PROXD_SESSION_FLAG_INITIATOR = 0x00000001, /* local device is initiator */ |
---|
7511 | | - WL_PROXD_SESSION_FLAG_TARGET = 0x00000002, /* local device is target */ |
---|
7512 | | - WL_PROXD_SESSION_FLAG_ONE_WAY = 0x00000004, /* (initiated) 1-way rtt */ |
---|
7513 | | - WL_PROXD_SESSION_FLAG_AUTO_BURST = 0x00000008, /* created w/ rx_auto_burst */ |
---|
7514 | | - WL_PROXD_SESSION_FLAG_PERSIST = 0x00000010, /* good until cancelled */ |
---|
7515 | | - WL_PROXD_SESSION_FLAG_RTT_DETAIL = 0x00000020, /* rtt detail in results */ |
---|
7516 | | - WL_PROXD_SESSION_FLAG_TOF_COMPAT = 0x00000040, /* TOF compatibility - TBD */ |
---|
7517 | | - WL_PROXD_SESSION_FLAG_AOA = 0x00000080, /* AOA along w/ RTT */ |
---|
7518 | | - WL_PROXD_SESSION_FLAG_RX_AUTO_BURST = 0x00000100, /* Same as proxd flags above */ |
---|
7519 | | - WL_PROXD_SESSION_FLAG_TX_AUTO_BURST = 0x00000200, /* Same as proxd flags above */ |
---|
7520 | | - WL_PROXD_SESSION_FLAG_NAN_BSS = 0x00000400, /* Use NAN BSS, if applicable */ |
---|
7521 | | - WL_PROXD_SESSION_FLAG_TS1 = 0x00000800, /* e.g. FTM1 - cap or rx */ |
---|
7522 | | - WL_PROXD_SESSION_FLAG_REPORT_FAILURE= 0x00002000, /* report failure to target */ |
---|
7523 | | - WL_PROXD_SESSION_FLAG_INITIATOR_RPT = 0x00004000, /* report distance to target */ |
---|
7524 | | - WL_PROXD_SESSION_FLAG_NOCHANSWT = 0x00008000, /* No channel switching */ |
---|
7525 | | - WL_PROXD_SESSION_FLAG_NETRUAL = 0x00010000, /* netrual mode */ |
---|
7526 | | - WL_PROXD_SESSION_FLAG_SEQ_EN = 0x00020000, /* Toast */ |
---|
7527 | | - WL_PROXD_SESSION_FLAG_NO_PARAM_OVRD = 0x00040000, /* no param override from target */ |
---|
7528 | | - WL_PROXD_SESSION_FLAG_ASAP = 0x00080000, /* ASAP session */ |
---|
7529 | | - WL_PROXD_SESSION_FLAG_REQ_LCI = 0x00100000, /* transmit LCI req */ |
---|
7530 | | - WL_PROXD_SESSION_FLAG_REQ_CIV = 0x00200000, /* transmit civic loc req */ |
---|
7531 | | - WL_PROXD_SESSION_FLAG_COLLECT = 0x80000000, /* debug - collect */ |
---|
7532 | | - WL_PROXD_SESSION_FLAG_ALL = 0xffffffff |
---|
| 13887 | + WL_PROXD_SESSION_FLAG_NONE = 0x00000000, /**< no flags */ |
---|
| 13888 | + WL_PROXD_SESSION_FLAG_INITIATOR = 0x00000001, /**< local device is initiator */ |
---|
| 13889 | + WL_PROXD_SESSION_FLAG_TARGET = 0x00000002, /**< local device is target */ |
---|
| 13890 | + WL_PROXD_SESSION_FLAG_ONE_WAY = 0x00000004, /**< (initiated) 1-way rtt */ |
---|
| 13891 | + WL_PROXD_SESSION_FLAG_AUTO_BURST = 0x00000008, /**< created w/ rx_auto_burst */ |
---|
| 13892 | + WL_PROXD_SESSION_FLAG_PERSIST = 0x00000010, /**< good until cancelled */ |
---|
| 13893 | + WL_PROXD_SESSION_FLAG_RTT_DETAIL = 0x00000020, /**< rtt detail in results */ |
---|
| 13894 | + WL_PROXD_SESSION_FLAG_SECURE = 0x00000040, /**< sessionis secure */ |
---|
| 13895 | + WL_PROXD_SESSION_FLAG_AOA = 0x00000080, /**< AOA along w/ RTT */ |
---|
| 13896 | + WL_PROXD_SESSION_FLAG_RX_AUTO_BURST = 0x00000100, /**< Same as proxd flags above */ |
---|
| 13897 | + WL_PROXD_SESSION_FLAG_TX_AUTO_BURST = 0x00000200, /**< Same as proxd flags above */ |
---|
| 13898 | + WL_PROXD_SESSION_FLAG_NAN_BSS = 0x00000400, /**< Use NAN BSS, if applicable */ |
---|
| 13899 | + WL_PROXD_SESSION_FLAG_TS1 = 0x00000800, /**< e.g. FTM1 - ASAP-capable */ |
---|
| 13900 | + WL_PROXD_SESSION_FLAG_REPORT_FAILURE = 0x00002000, /**< report failure to target */ |
---|
| 13901 | + WL_PROXD_SESSION_FLAG_INITIATOR_RPT = 0x00004000, /**< report distance to target */ |
---|
| 13902 | + WL_PROXD_SESSION_FLAG_NOCHANSWT = 0x00008000, |
---|
| 13903 | + WL_PROXD_SESSION_FLAG_NETRUAL = 0x00010000, /**< netrual mode */ |
---|
| 13904 | + WL_PROXD_SESSION_FLAG_SEQ_EN = 0x00020000, /**< Toast */ |
---|
| 13905 | + WL_PROXD_SESSION_FLAG_NO_PARAM_OVRD = 0x00040000, /**< no param override from target */ |
---|
| 13906 | + WL_PROXD_SESSION_FLAG_ASAP = 0x00080000, /**< ASAP session */ |
---|
| 13907 | + WL_PROXD_SESSION_FLAG_REQ_LCI = 0x00100000, /**< transmit LCI req */ |
---|
| 13908 | + WL_PROXD_SESSION_FLAG_REQ_CIV = 0x00200000, /**< transmit civic loc req */ |
---|
| 13909 | + WL_PROXD_SESSION_FLAG_PRE_SCAN = 0x00400000, /* enable pre-scan for asap=1 */ |
---|
| 13910 | + WL_PROXD_SESSION_FLAG_AUTO_VHTACK = 0x00800000, /* use vhtack based on brcm ie */ |
---|
| 13911 | + WL_PROXD_SESSION_FLAG_VHTACK = 0x01000000, /* vht ack is in use - output only */ |
---|
| 13912 | + WL_PROXD_SESSION_FLAG_BDUR_NOPREF = 0x02000000, /* burst-duration: no preference */ |
---|
| 13913 | + WL_PROXD_SESSION_FLAG_NUM_FTM_NOPREF = 0x04000000, /* num of FTM frames: no preference */ |
---|
| 13914 | + WL_PROXD_SESSION_FLAG_FTM_SEP_NOPREF = 0x08000000, /* time btw FTM frams: no pref */ |
---|
| 13915 | + WL_PROXD_SESSION_FLAG_NUM_BURST_NOPREF = 0x10000000, /* num of bursts: no pref */ |
---|
| 13916 | + WL_PROXD_SESSION_FLAG_BURST_PERIOD_NOPREF = 0x20000000, /* burst period: no pref */ |
---|
| 13917 | + WL_PROXD_SESSION_FLAG_MBURST_FOLLOWUP = 0x40000000, /* new mburst algo - reserved */ |
---|
| 13918 | + WL_PROXD_SESSION_FLAG_MBURST_NODELAY = 0x80000000, /**< good until cancelled */ |
---|
| 13919 | + WL_PROXD_SESSION_FLAG_ALL = 0xffffffff |
---|
| 13920 | + |
---|
7533 | 13921 | }; |
---|
7534 | 13922 | typedef uint32 wl_proxd_session_flags_t; |
---|
7535 | 13923 | |
---|
7536 | | -/* time units - mc supports up to 0.1ns resolution */ |
---|
| 13924 | +/** time units - mc supports up to 0.1ns resolution */ |
---|
7537 | 13925 | enum { |
---|
7538 | | - WL_PROXD_TMU_TU = 0, /* 1024us */ |
---|
| 13926 | + WL_PROXD_TMU_TU = 0, /**< 1024us */ |
---|
7539 | 13927 | WL_PROXD_TMU_SEC = 1, |
---|
7540 | 13928 | WL_PROXD_TMU_MILLI_SEC = 2, |
---|
7541 | 13929 | WL_PROXD_TMU_MICRO_SEC = 3, |
---|
.. | .. |
---|
7544 | 13932 | }; |
---|
7545 | 13933 | typedef int16 wl_proxd_tmu_t; |
---|
7546 | 13934 | |
---|
7547 | | -/* time interval e.g. 10ns */ |
---|
| 13935 | +/** time interval e.g. 10ns */ |
---|
7548 | 13936 | typedef struct wl_proxd_intvl { |
---|
7549 | 13937 | uint32 intvl; |
---|
7550 | 13938 | wl_proxd_tmu_t tmu; |
---|
7551 | 13939 | uint8 pad[2]; |
---|
7552 | 13940 | } wl_proxd_intvl_t; |
---|
7553 | 13941 | |
---|
7554 | | -/* commands that can apply to proxd, method or a session */ |
---|
| 13942 | +/** commands that can apply to proxd, method or a session */ |
---|
7555 | 13943 | enum { |
---|
7556 | | - WL_PROXD_CMD_NONE = 0, |
---|
| 13944 | + WL_PROXD_CMD_NONE = 0, |
---|
7557 | 13945 | WL_PROXD_CMD_GET_VERSION = 1, |
---|
7558 | | - WL_PROXD_CMD_ENABLE = 2, |
---|
7559 | | - WL_PROXD_CMD_DISABLE = 3, |
---|
7560 | | - WL_PROXD_CMD_CONFIG = 4, |
---|
7561 | | - WL_PROXD_CMD_START_SESSION = 5, |
---|
7562 | | - WL_PROXD_CMD_BURST_REQUEST = 6, |
---|
7563 | | - WL_PROXD_CMD_STOP_SESSION = 7, |
---|
7564 | | - WL_PROXD_CMD_DELETE_SESSION = 8, |
---|
7565 | | - WL_PROXD_CMD_GET_RESULT = 9, |
---|
7566 | | - WL_PROXD_CMD_GET_INFO = 10, |
---|
7567 | | - WL_PROXD_CMD_GET_STATUS = 11, |
---|
7568 | | - WL_PROXD_CMD_GET_SESSIONS = 12, |
---|
7569 | | - WL_PROXD_CMD_GET_COUNTERS = 13, |
---|
7570 | | - WL_PROXD_CMD_CLEAR_COUNTERS = 14, |
---|
7571 | | - WL_PROXD_CMD_COLLECT = 15, |
---|
7572 | | - WL_PROXD_CMD_TUNE = 16, |
---|
7573 | | - WL_PROXD_CMD_DUMP = 17, |
---|
| 13946 | + WL_PROXD_CMD_ENABLE = 2, |
---|
| 13947 | + WL_PROXD_CMD_DISABLE = 3, |
---|
| 13948 | + WL_PROXD_CMD_CONFIG = 4, |
---|
| 13949 | + WL_PROXD_CMD_START_SESSION = 5, |
---|
| 13950 | + WL_PROXD_CMD_BURST_REQUEST = 6, |
---|
| 13951 | + WL_PROXD_CMD_STOP_SESSION = 7, |
---|
| 13952 | + WL_PROXD_CMD_DELETE_SESSION = 8, |
---|
| 13953 | + WL_PROXD_CMD_GET_RESULT = 9, |
---|
| 13954 | + WL_PROXD_CMD_GET_INFO = 10, |
---|
| 13955 | + WL_PROXD_CMD_GET_STATUS = 11, |
---|
| 13956 | + WL_PROXD_CMD_GET_SESSIONS = 12, |
---|
| 13957 | + WL_PROXD_CMD_GET_COUNTERS = 13, |
---|
| 13958 | + WL_PROXD_CMD_CLEAR_COUNTERS = 14, |
---|
| 13959 | + WL_PROXD_CMD_COLLECT = 15, /* not supported, see 'wl proxd_collect' */ |
---|
| 13960 | + WL_PROXD_CMD_TUNE = 16, /* not supported, see 'wl proxd_tune' */ |
---|
| 13961 | + WL_PROXD_CMD_DUMP = 17, |
---|
7574 | 13962 | WL_PROXD_CMD_START_RANGING = 18, |
---|
7575 | 13963 | WL_PROXD_CMD_STOP_RANGING = 19, |
---|
7576 | | - WL_PROXD_CMD_GET_RANGING_INFO = 20, |
---|
7577 | | - WL_PROXD_CMD_IS_TLV_SUPPORTED = 21, |
---|
| 13964 | + WL_PROXD_CMD_GET_RANGING_INFO = 20, |
---|
| 13965 | + WL_PROXD_CMD_IS_TLV_SUPPORTED = 21, |
---|
7578 | 13966 | |
---|
7579 | 13967 | WL_PROXD_CMD_MAX |
---|
7580 | 13968 | }; |
---|
.. | .. |
---|
7589 | 13977 | WL_PROXD_SESSION_ID_GLOBAL = 0 |
---|
7590 | 13978 | }; |
---|
7591 | 13979 | |
---|
7592 | | -#define WL_PROXD_SID_HOST_MAX 0x7fff |
---|
7593 | | -#define WL_PROXD_SID_HOST_ALLOC(_sid) ((_sid) > 0 && (_sid) <= WL_PROXD_SID_HOST_MAX) |
---|
| 13980 | +/* Externally allocated sids */ |
---|
| 13981 | +#define WL_PROXD_SID_EXT_MAX 0x7fff |
---|
| 13982 | +#define WL_PROXD_SID_EXT_ALLOC(_sid) ((_sid) > 0 && (_sid) <= WL_PROXD_SID_EXT_MAX) |
---|
7594 | 13983 | |
---|
7595 | | -/* maximum number sessions that can be allocated, may be less if tunable */ |
---|
| 13984 | +/* block size for reserved sid blocks */ |
---|
| 13985 | +#define WL_PROXD_SID_EXT_BLKSZ 256 |
---|
| 13986 | +#define WL_PROXD_SID_EXT_BLK_START(_i) (WL_PROXD_SID_EXT_MAX - (_i) * WL_PROXD_SID_EXT_BLKSZ + 1) |
---|
| 13987 | +#define WL_PROXD_SID_EXT_BLK_END(_start) ((_start) + WL_PROXD_SID_EXT_BLKSZ - 1) |
---|
| 13988 | + |
---|
| 13989 | +/* rrm block */ |
---|
| 13990 | +#define WL_PROXD_SID_RRM_START WL_PROXD_SID_EXT_BLK_START(1) |
---|
| 13991 | +#define WL_PROXD_SID_RRM_END WL_PROXD_SID_EXT_BLK_END(WL_PROXD_SID_RRM_START) |
---|
| 13992 | + |
---|
| 13993 | +/* nan block */ |
---|
| 13994 | +#define WL_PROXD_SID_NAN_START WL_PROXD_SID_EXT_BLK_START(2) |
---|
| 13995 | +#define WL_PROXD_SID_NAN_END WL_PROXD_SID_EXT_BLK_END(WL_PROXD_SID_NAN_START) |
---|
| 13996 | + |
---|
| 13997 | +/** maximum number sessions that can be allocated, may be less if tunable */ |
---|
7596 | 13998 | #define WL_PROXD_MAX_SESSIONS 16 |
---|
7597 | 13999 | |
---|
7598 | 14000 | typedef uint16 wl_proxd_session_id_t; |
---|
7599 | 14001 | |
---|
7600 | | -/* status - TBD BCME_ vs proxd status - range reserved for BCME_ */ |
---|
| 14002 | +/** status - TBD BCME_ vs proxd status - range reserved for BCME_ */ |
---|
7601 | 14003 | enum { |
---|
7602 | | - WL_PROXD_E_POLICY = -1045, |
---|
| 14004 | + WL_PROXD_E_LAST = -1056, |
---|
| 14005 | + WL_PROXD_E_NOAVAIL = -1056, |
---|
| 14006 | + WL_PROXD_E_EXT_SCHED = -1055, |
---|
| 14007 | + WL_PROXD_E_NOT_BCM = -1054, |
---|
| 14008 | + WL_PROXD_E_FRAME_TYPE = -1053, |
---|
| 14009 | + WL_PROXD_E_VERNOSUPPORT = -1052, |
---|
| 14010 | + WL_PROXD_E_SEC_NOKEY = -1051, |
---|
| 14011 | + WL_PROXD_E_SEC_POLICY = -1050, |
---|
| 14012 | + WL_PROXD_E_SCAN_INPROCESS = -1049, |
---|
| 14013 | + WL_PROXD_E_BAD_PARTIAL_TSF = -1048, |
---|
| 14014 | + WL_PROXD_E_SCANFAIL = -1047, |
---|
| 14015 | + WL_PROXD_E_NOTSF = -1046, |
---|
| 14016 | + WL_PROXD_E_POLICY = -1045, |
---|
7603 | 14017 | WL_PROXD_E_INCOMPLETE = -1044, |
---|
7604 | 14018 | WL_PROXD_E_OVERRIDDEN = -1043, |
---|
7605 | 14019 | WL_PROXD_E_ASAP_FAILED = -1042, |
---|
7606 | 14020 | WL_PROXD_E_NOTSTARTED = -1041, |
---|
7607 | | - WL_PROXD_E_INVALIDAVB = -1040, |
---|
| 14021 | + WL_PROXD_E_INVALIDMEAS = -1040, |
---|
7608 | 14022 | WL_PROXD_E_INCAPABLE = -1039, |
---|
7609 | | - WL_PROXD_E_MISMATCH = -1038, |
---|
| 14023 | + WL_PROXD_E_MISMATCH = -1038, |
---|
7610 | 14024 | WL_PROXD_E_DUP_SESSION = -1037, |
---|
7611 | 14025 | WL_PROXD_E_REMOTE_FAIL = -1036, |
---|
7612 | | - WL_PROXD_E_REMOTE_INCAPABLE = -1035, |
---|
| 14026 | + WL_PROXD_E_REMOTE_INCAPABLE = -1035, |
---|
7613 | 14027 | WL_PROXD_E_SCHED_FAIL = -1034, |
---|
7614 | | - WL_PROXD_E_PROTO = -1033, |
---|
7615 | | - WL_PROXD_E_EXPIRED = -1032, |
---|
7616 | | - WL_PROXD_E_TIMEOUT = -1031, |
---|
7617 | | - WL_PROXD_E_NOACK = -1030, |
---|
7618 | | - WL_PROXD_E_DEFERRED = -1029, |
---|
| 14028 | + WL_PROXD_E_PROTO = -1033, |
---|
| 14029 | + WL_PROXD_E_EXPIRED = -1032, |
---|
| 14030 | + WL_PROXD_E_TIMEOUT = -1031, |
---|
| 14031 | + WL_PROXD_E_NOACK = -1030, |
---|
| 14032 | + WL_PROXD_E_DEFERRED = -1029, |
---|
7619 | 14033 | WL_PROXD_E_INVALID_SID = -1028, |
---|
7620 | | - WL_PROXD_E_REMOTE_CANCEL = -1027, |
---|
7621 | | - WL_PROXD_E_CANCELED = -1026, /* local */ |
---|
| 14034 | + WL_PROXD_E_REMOTE_CANCEL = -1027, |
---|
| 14035 | + WL_PROXD_E_CANCELED = -1026, /**< local */ |
---|
7622 | 14036 | WL_PROXD_E_INVALID_SESSION = -1025, |
---|
7623 | 14037 | WL_PROXD_E_BAD_STATE = -1024, |
---|
7624 | | - WL_PROXD_E_ERROR = -1, |
---|
7625 | | - WL_PROXD_E_OK = 0 |
---|
| 14038 | + WL_PROXD_E_START = -1024, |
---|
| 14039 | + WL_PROXD_E_ERROR = -1, |
---|
| 14040 | + WL_PROXD_E_OK = 0 |
---|
7626 | 14041 | }; |
---|
7627 | 14042 | typedef int32 wl_proxd_status_t; |
---|
7628 | 14043 | |
---|
7629 | | -/* session states */ |
---|
| 14044 | +/* proxd errors from phy */ |
---|
| 14045 | +#define PROXD_TOF_INIT_ERR_BITS 16 |
---|
| 14046 | + |
---|
7630 | 14047 | enum { |
---|
7631 | | - WL_PROXD_SESSION_STATE_NONE = 0, |
---|
| 14048 | + WL_PROXD_PHY_ERR_LB_CORR_THRESH = (1 << 0), /* Loopback Correlation threshold */ |
---|
| 14049 | + WL_PROXD_PHY_ERR_RX_CORR_THRESH = (1 << 1), /* Received Correlation threshold */ |
---|
| 14050 | + WL_PROXD_PHY_ERR_LB_PEAK_POWER = (1 << 2), /* Loopback Peak power */ |
---|
| 14051 | + WL_PROXD_PHY_ERR_RX_PEAK_POWER = (1 << 3), /* Received Peak power */ |
---|
| 14052 | + WL_PROXD_PHY_ERR_BITFLIP = (1 << 4), /* Bitflips */ |
---|
| 14053 | + WL_PROXD_PHY_ERR_SNR = (1 << 5), /* SNR */ |
---|
| 14054 | + WL_PROXD_PHY_RX_STRT_WIN_OFF = (1 << 6), /* Receive start window is off */ |
---|
| 14055 | + WL_PROXD_PHY_RX_END_WIN_OFF = (1 << 7), /* Receive End window is off */ |
---|
| 14056 | + WL_PROXD_PHY_ERR_LOW_CONFIDENCE = (1 << 15), /* Low confidence on meas distance */ |
---|
| 14057 | +}; |
---|
| 14058 | +typedef uint32 wl_proxd_phy_error_t; |
---|
| 14059 | + |
---|
| 14060 | +/** session states */ |
---|
| 14061 | +enum { |
---|
| 14062 | + WL_PROXD_SESSION_STATE_NONE = 0, |
---|
7632 | 14063 | WL_PROXD_SESSION_STATE_CREATED = 1, |
---|
7633 | 14064 | WL_PROXD_SESSION_STATE_CONFIGURED = 2, |
---|
7634 | 14065 | WL_PROXD_SESSION_STATE_STARTED = 3, |
---|
.. | .. |
---|
7638 | 14069 | WL_PROXD_SESSION_STATE_BURST = 7, |
---|
7639 | 14070 | WL_PROXD_SESSION_STATE_STOPPING = 8, |
---|
7640 | 14071 | WL_PROXD_SESSION_STATE_ENDED = 9, |
---|
| 14072 | + WL_PROXD_SESSION_STATE_START_WAIT = 10, |
---|
7641 | 14073 | WL_PROXD_SESSION_STATE_DESTROYING = -1 |
---|
7642 | 14074 | }; |
---|
7643 | 14075 | typedef int16 wl_proxd_session_state_t; |
---|
7644 | 14076 | |
---|
7645 | | -/* RTT sample flags */ |
---|
| 14077 | +/** RTT sample flags */ |
---|
7646 | 14078 | enum { |
---|
7647 | | - WL_PROXD_RTT_SAMPLE_NONE = 0x00, |
---|
7648 | | - WL_PROXD_RTT_SAMPLE_DISCARD = 0x01 |
---|
| 14079 | + WL_PROXD_RTT_SAMPLE_NONE = 0x00, |
---|
| 14080 | + WL_PROXD_RTT_SAMPLE_DISCARD = 0x01 |
---|
7649 | 14081 | }; |
---|
7650 | 14082 | typedef uint8 wl_proxd_rtt_sample_flags_t; |
---|
| 14083 | +typedef int16 wl_proxd_rssi_t; |
---|
| 14084 | +typedef uint16 wl_proxd_snr_t; |
---|
| 14085 | +typedef uint16 wl_proxd_bitflips_t; |
---|
7651 | 14086 | |
---|
7652 | | -typedef struct wl_proxd_rtt_sample { |
---|
7653 | | - uint8 id; /* id for the sample - non-zero */ |
---|
7654 | | - wl_proxd_rtt_sample_flags_t flags; |
---|
7655 | | - int16 rssi; |
---|
7656 | | - wl_proxd_intvl_t rtt; /* round trip time */ |
---|
7657 | | - uint32 ratespec; |
---|
7658 | | -} wl_proxd_rtt_sample_t; |
---|
7659 | | - |
---|
7660 | | -/* result flags */ |
---|
| 14087 | +/** result flags */ |
---|
7661 | 14088 | enum { |
---|
7662 | 14089 | WL_PRXOD_RESULT_FLAG_NONE = 0x0000, |
---|
7663 | | - WL_PROXD_RESULT_FLAG_NLOS = 0x0001, /* LOS - if available */ |
---|
7664 | | - WL_PROXD_RESULT_FLAG_LOS = 0x0002, /* NLOS - if available */ |
---|
7665 | | - WL_PROXD_RESULT_FLAG_FATAL = 0x0004, /* Fatal error during burst */ |
---|
| 14090 | + WL_PROXD_RESULT_FLAG_NLOS = 0x0001, /**< LOS - if available */ |
---|
| 14091 | + WL_PROXD_RESULT_FLAG_LOS = 0x0002, /**< NLOS - if available */ |
---|
| 14092 | + WL_PROXD_RESULT_FLAG_FATAL = 0x0004, /**< Fatal error during burst */ |
---|
7666 | 14093 | WL_PROXD_RESULT_FLAG_VHTACK = 0x0008, /* VHTACK or Legacy ACK used */ |
---|
7667 | | - WL_PROXD_RESULT_FLAG_ALL = 0xffff |
---|
| 14094 | + WL_PROXD_REQUEST_SENT = 0x0010, /* FTM request was sent */ |
---|
| 14095 | + WL_PROXD_REQUEST_ACKED = 0x0020, /* FTM request was acked */ |
---|
| 14096 | + WL_PROXD_LTFSEQ_STARTED = 0x0040, /* LTF sequence started */ |
---|
| 14097 | + WL_PROXD_RESULT_FLAG_ALL = 0xffff |
---|
7668 | 14098 | }; |
---|
7669 | 14099 | typedef int16 wl_proxd_result_flags_t; |
---|
7670 | 14100 | |
---|
7671 | | -/* rtt measurement result */ |
---|
7672 | | -typedef struct wl_proxd_rtt_result { |
---|
7673 | | - wl_proxd_session_id_t sid; |
---|
7674 | | - wl_proxd_result_flags_t flags; |
---|
7675 | | - wl_proxd_status_t status; |
---|
7676 | | - struct ether_addr peer; |
---|
7677 | | - wl_proxd_session_state_t state; /* current state */ |
---|
7678 | | - union { |
---|
7679 | | - wl_proxd_intvl_t retry_after; /* hint for errors */ |
---|
7680 | | - wl_proxd_intvl_t burst_duration; /* burst duration */ |
---|
7681 | | - } u; |
---|
7682 | | - wl_proxd_rtt_sample_t avg_rtt; |
---|
7683 | | - uint32 avg_dist; /* 1/256m units */ |
---|
7684 | | - uint16 sd_rtt; /* RTT standard deviation */ |
---|
7685 | | - uint8 num_valid_rtt; /* valid rtt cnt */ |
---|
7686 | | - uint8 num_ftm; /* actual num of ftm cnt */ |
---|
7687 | | - uint16 burst_num; /* in a session */ |
---|
7688 | | - uint16 num_rtt; /* 0 if no detail */ |
---|
7689 | | - wl_proxd_rtt_sample_t rtt[1]; /* variable */ |
---|
7690 | | -} wl_proxd_rtt_result_t; |
---|
| 14101 | +#define WL_PROXD_RTT_SAMPLE_VERSION_1 1 |
---|
| 14102 | +typedef struct wl_proxd_rtt_sample_v1 { |
---|
| 14103 | + uint8 id; /**< id for the sample - non-zero */ |
---|
| 14104 | + wl_proxd_rtt_sample_flags_t flags; |
---|
| 14105 | + wl_proxd_rssi_t rssi; |
---|
| 14106 | + wl_proxd_intvl_t rtt; /**< round trip time */ |
---|
| 14107 | + uint32 ratespec; |
---|
| 14108 | + wl_proxd_snr_t snr; |
---|
| 14109 | + wl_proxd_bitflips_t bitflips; |
---|
| 14110 | + wl_proxd_status_t status; |
---|
| 14111 | + int32 distance; |
---|
| 14112 | + wl_proxd_phy_error_t tof_phy_error; |
---|
| 14113 | + wl_proxd_phy_error_t tof_tgt_phy_error; /* target phy error bit map */ |
---|
| 14114 | + wl_proxd_snr_t tof_tgt_snr; |
---|
| 14115 | + wl_proxd_bitflips_t tof_tgt_bitflips; |
---|
| 14116 | + uint8 coreid; |
---|
| 14117 | + uint8 pad[3]; |
---|
| 14118 | +} wl_proxd_rtt_sample_v1_t; |
---|
7691 | 14119 | |
---|
7692 | | -/* aoa measurement result */ |
---|
| 14120 | +#define WL_PROXD_RTT_RESULT_VERSION_1 1 |
---|
| 14121 | +/** rtt measurement result */ |
---|
| 14122 | +typedef struct wl_proxd_rtt_result_v1 { |
---|
| 14123 | + wl_proxd_session_id_t sid; |
---|
| 14124 | + wl_proxd_result_flags_t flags; |
---|
| 14125 | + wl_proxd_status_t status; |
---|
| 14126 | + struct ether_addr peer; |
---|
| 14127 | + wl_proxd_session_state_t state; /**< current state */ |
---|
| 14128 | + union { |
---|
| 14129 | + wl_proxd_intvl_t retry_after; /* hint for errors */ |
---|
| 14130 | + wl_proxd_intvl_t burst_duration; /* burst duration */ |
---|
| 14131 | + } u; |
---|
| 14132 | + wl_proxd_rtt_sample_v1_t avg_rtt; |
---|
| 14133 | + uint32 avg_dist; /* 1/256m units */ |
---|
| 14134 | + uint16 sd_rtt; /* RTT standard deviation */ |
---|
| 14135 | + uint8 num_valid_rtt; /* valid rtt cnt */ |
---|
| 14136 | + uint8 num_ftm; /* actual num of ftm cnt (Configured) */ |
---|
| 14137 | + uint16 burst_num; /* in a session */ |
---|
| 14138 | + uint16 num_rtt; /* 0 if no detail */ |
---|
| 14139 | + uint16 num_meas; /* number of ftm frames seen OTA */ |
---|
| 14140 | + uint8 pad[2]; |
---|
| 14141 | + wl_proxd_rtt_sample_v1_t rtt[1]; /* variable */ |
---|
| 14142 | +} wl_proxd_rtt_result_v1_t; |
---|
| 14143 | + |
---|
| 14144 | +#define WL_PROXD_RTT_SAMPLE_VERSION_2 2 |
---|
| 14145 | +typedef struct wl_proxd_rtt_sample_v2 { |
---|
| 14146 | + uint16 version; |
---|
| 14147 | + uint16 length; |
---|
| 14148 | + uint8 id; /**< id for the sample - non-zero */ |
---|
| 14149 | + wl_proxd_rtt_sample_flags_t flags; |
---|
| 14150 | + wl_proxd_rssi_t rssi; |
---|
| 14151 | + wl_proxd_intvl_t rtt; /**< round trip time */ |
---|
| 14152 | + uint32 ratespec; |
---|
| 14153 | + wl_proxd_snr_t snr; |
---|
| 14154 | + wl_proxd_bitflips_t bitflips; |
---|
| 14155 | + wl_proxd_status_t status; |
---|
| 14156 | + int32 distance; |
---|
| 14157 | + wl_proxd_phy_error_t tof_phy_error; |
---|
| 14158 | + wl_proxd_phy_error_t tof_tgt_phy_error; /* target phy error bit map */ |
---|
| 14159 | + wl_proxd_snr_t tof_tgt_snr; |
---|
| 14160 | + wl_proxd_bitflips_t tof_tgt_bitflips; |
---|
| 14161 | + uint8 coreid; |
---|
| 14162 | + uint8 pad[3]; |
---|
| 14163 | + uint32 chanspec; |
---|
| 14164 | +} wl_proxd_rtt_sample_v2_t; |
---|
| 14165 | + |
---|
| 14166 | +#define WL_PROXD_RTT_RESULT_VERSION_2 2 |
---|
| 14167 | +/** rtt measurement result */ |
---|
| 14168 | +typedef struct wl_proxd_rtt_result_v2 { |
---|
| 14169 | + uint16 version; |
---|
| 14170 | + uint16 length; /* up to rtt[] */ |
---|
| 14171 | + wl_proxd_session_id_t sid; |
---|
| 14172 | + wl_proxd_result_flags_t flags; |
---|
| 14173 | + wl_proxd_status_t status; |
---|
| 14174 | + struct ether_addr peer; |
---|
| 14175 | + wl_proxd_session_state_t state; /**< current state */ |
---|
| 14176 | + union { |
---|
| 14177 | + wl_proxd_intvl_t retry_after; /* hint for errors */ |
---|
| 14178 | + wl_proxd_intvl_t burst_duration; /* burst duration */ |
---|
| 14179 | + } u; |
---|
| 14180 | + uint32 avg_dist; /* 1/256m units */ |
---|
| 14181 | + uint16 sd_rtt; /* RTT standard deviation */ |
---|
| 14182 | + uint8 num_valid_rtt; /* valid rtt cnt */ |
---|
| 14183 | + uint8 num_ftm; /* actual num of ftm cnt (Configured) */ |
---|
| 14184 | + uint16 burst_num; /* in a session */ |
---|
| 14185 | + uint16 num_rtt; /* 0 if no detail */ |
---|
| 14186 | + uint16 num_meas; /* number of ftm frames seen OTA */ |
---|
| 14187 | + uint8 pad[2]; |
---|
| 14188 | + wl_proxd_rtt_sample_v2_t rtt[1]; /* variable, first element is avg_rtt */ |
---|
| 14189 | +} wl_proxd_rtt_result_v2_t; |
---|
| 14190 | + |
---|
| 14191 | +/** aoa measurement result */ |
---|
7693 | 14192 | typedef struct wl_proxd_aoa_result { |
---|
7694 | | - wl_proxd_session_id_t sid; |
---|
7695 | | - wl_proxd_result_flags_t flags; |
---|
7696 | | - wl_proxd_status_t status; |
---|
7697 | | - struct ether_addr peer; |
---|
7698 | | - wl_proxd_session_state_t state; |
---|
7699 | | - uint16 burst_num; |
---|
7700 | | - uint8 pad[2]; |
---|
| 14193 | + wl_proxd_session_id_t sid; |
---|
| 14194 | + wl_proxd_result_flags_t flags; |
---|
| 14195 | + wl_proxd_status_t status; |
---|
| 14196 | + struct ether_addr peer; |
---|
| 14197 | + wl_proxd_session_state_t state; |
---|
| 14198 | + uint16 burst_num; |
---|
| 14199 | + uint8 pad[2]; |
---|
7701 | 14200 | /* wl_proxd_aoa_sample_t sample_avg; TBD */ |
---|
7702 | 14201 | } BWL_POST_PACKED_STRUCT wl_proxd_aoa_result_t; |
---|
| 14202 | +#include <packed_section_end.h> |
---|
7703 | 14203 | |
---|
7704 | | -/* global stats */ |
---|
| 14204 | +/** global stats */ |
---|
7705 | 14205 | typedef struct wl_proxd_counters { |
---|
7706 | | - uint32 tx; /* tx frame count */ |
---|
7707 | | - uint32 rx; /* rx frame count */ |
---|
7708 | | - uint32 burst; /* total number of burst */ |
---|
7709 | | - uint32 sessions; /* total number of sessions */ |
---|
| 14206 | + uint32 tx; /* tx frame count */ |
---|
| 14207 | + uint32 rx; /* rx frame count */ |
---|
| 14208 | + uint32 burst; /* total number of burst */ |
---|
| 14209 | + uint32 sessions; /* total number of sessions */ |
---|
7710 | 14210 | uint32 max_sessions; /* max concurrency */ |
---|
7711 | | - uint32 sched_fail; /* scheduling failures */ |
---|
7712 | | - uint32 timeouts; /* timeouts */ |
---|
7713 | | - uint32 protoerr; /* protocol errors */ |
---|
7714 | | - uint32 noack; /* tx w/o ack */ |
---|
7715 | | - uint32 txfail; /* any tx falure */ |
---|
7716 | | - uint32 lci_req_tx; /* tx LCI requests */ |
---|
7717 | | - uint32 lci_req_rx; /* rx LCI requests */ |
---|
7718 | | - uint32 lci_rep_tx; /* tx LCI reports */ |
---|
7719 | | - uint32 lci_rep_rx; /* rx LCI reports */ |
---|
| 14211 | + uint32 sched_fail; /* scheduling failures */ |
---|
| 14212 | + uint32 timeouts; /* timeouts */ |
---|
| 14213 | + uint32 protoerr; /* protocol errors */ |
---|
| 14214 | + uint32 noack; /* tx w/o ack */ |
---|
| 14215 | + uint32 txfail; /* any tx falure */ |
---|
| 14216 | + uint32 lci_req_tx; /* tx LCI requests */ |
---|
| 14217 | + uint32 lci_req_rx; /* rx LCI requests */ |
---|
| 14218 | + uint32 lci_rep_tx; /* tx LCI reports */ |
---|
| 14219 | + uint32 lci_rep_rx; /* rx LCI reports */ |
---|
7720 | 14220 | uint32 civic_req_tx; /* tx civic requests */ |
---|
7721 | 14221 | uint32 civic_req_rx; /* rx civic requests */ |
---|
7722 | 14222 | uint32 civic_rep_tx; /* tx civic reports */ |
---|
7723 | 14223 | uint32 civic_rep_rx; /* rx civic reports */ |
---|
7724 | | - uint32 rctx; /* ranging contexts created */ |
---|
7725 | | - uint32 rctx_done; /* count of ranging done */ |
---|
7726 | | - uint32 publish_err; /* availability publishing errors */ |
---|
7727 | | - uint32 on_chan; /* count of scheduler onchan */ |
---|
7728 | | - uint32 off_chan; /* count of scheduler offchan */ |
---|
| 14224 | + uint32 rctx; /* ranging contexts created */ |
---|
| 14225 | + uint32 rctx_done; /* count of ranging done */ |
---|
| 14226 | + uint32 publish_err; /* availability publishing errors */ |
---|
| 14227 | + uint32 on_chan; /* count of scheduler onchan */ |
---|
| 14228 | + uint32 off_chan; /* count of scheduler offchan */ |
---|
| 14229 | + uint32 tsf_lo; /* local tsf or session tsf */ |
---|
| 14230 | + uint32 tsf_hi; |
---|
| 14231 | + uint32 num_meas; |
---|
7729 | 14232 | } wl_proxd_counters_t; |
---|
7730 | 14233 | |
---|
7731 | 14234 | typedef struct wl_proxd_counters wl_proxd_session_counters_t; |
---|
.. | .. |
---|
7736 | 14239 | }; |
---|
7737 | 14240 | typedef int16 wl_proxd_caps_t; |
---|
7738 | 14241 | |
---|
7739 | | -/* method capabilities */ |
---|
| 14242 | +/** method capabilities */ |
---|
7740 | 14243 | enum { |
---|
7741 | 14244 | WL_PROXD_FTM_CAP_NONE = 0x0000, |
---|
7742 | 14245 | WL_PROXD_FTM_CAP_FTM1 = 0x0001 |
---|
7743 | 14246 | }; |
---|
7744 | 14247 | typedef uint16 wl_proxd_ftm_caps_t; |
---|
7745 | 14248 | |
---|
7746 | | -typedef struct BWL_PRE_PACKED_STRUCT wl_proxd_tlv_id_list { |
---|
| 14249 | +typedef struct wl_proxd_tlv_id_list { |
---|
7747 | 14250 | uint16 num_ids; |
---|
7748 | 14251 | uint16 ids[1]; |
---|
7749 | | -} BWL_POST_PACKED_STRUCT wl_proxd_tlv_id_list_t; |
---|
| 14252 | +} wl_proxd_tlv_id_list_t; |
---|
7750 | 14253 | |
---|
7751 | 14254 | typedef struct wl_proxd_session_id_list { |
---|
7752 | 14255 | uint16 num_ids; |
---|
7753 | 14256 | wl_proxd_session_id_t ids[1]; |
---|
7754 | 14257 | } wl_proxd_session_id_list_t; |
---|
7755 | 14258 | |
---|
| 14259 | +typedef struct wl_proxd_tpk { |
---|
| 14260 | + struct ether_addr peer; |
---|
| 14261 | + uint8 tpk[TPK_FTM_LEN]; |
---|
| 14262 | +} wl_proxd_tpk_t; |
---|
| 14263 | + |
---|
7756 | 14264 | /* tlvs returned for get_info on ftm method |
---|
7757 | | - * configuration: |
---|
7758 | | - * proxd flags |
---|
7759 | | - * event mask |
---|
7760 | | - * debug mask |
---|
7761 | | - * session defaults (session tlvs) |
---|
| 14265 | + * configuration: |
---|
| 14266 | + * proxd flags |
---|
| 14267 | + * event mask |
---|
| 14268 | + * debug mask |
---|
| 14269 | + * session defaults (session tlvs) |
---|
7762 | 14270 | * status tlv - not supported for ftm method |
---|
7763 | 14271 | * info tlv |
---|
7764 | 14272 | */ |
---|
.. | .. |
---|
7768 | 14276 | uint16 num_sessions; |
---|
7769 | 14277 | uint16 rx_max_burst; |
---|
7770 | 14278 | } wl_proxd_ftm_info_t; |
---|
| 14279 | + |
---|
| 14280 | +enum { |
---|
| 14281 | + WL_PROXD_WAIT_NONE = 0x0000, |
---|
| 14282 | + WL_PROXD_WAIT_KEY = 0x0001, |
---|
| 14283 | + WL_PROXD_WAIT_SCHED = 0x0002, |
---|
| 14284 | + WL_PROXD_WAIT_TSF = 0x0004 |
---|
| 14285 | +}; |
---|
| 14286 | +typedef int16 wl_proxd_wait_reason_t; |
---|
7771 | 14287 | |
---|
7772 | 14288 | /* tlvs returned for get_info on session |
---|
7773 | 14289 | * session config (tlvs) |
---|
.. | .. |
---|
7781 | 14297 | wl_proxd_session_state_t state; |
---|
7782 | 14298 | wl_proxd_status_t status; |
---|
7783 | 14299 | uint16 burst_num; |
---|
| 14300 | + wl_proxd_wait_reason_t wait_reason; |
---|
| 14301 | + uint32 meas_start_lo; /* sn tsf of 1st meas for cur/prev burst */ |
---|
| 14302 | + uint32 meas_start_hi; |
---|
7784 | 14303 | } wl_proxd_ftm_session_info_t; |
---|
7785 | 14304 | |
---|
7786 | 14305 | typedef struct wl_proxd_ftm_session_status { |
---|
.. | .. |
---|
7788 | 14307 | wl_proxd_session_state_t state; |
---|
7789 | 14308 | wl_proxd_status_t status; |
---|
7790 | 14309 | uint16 burst_num; |
---|
| 14310 | + uint16 pad; |
---|
7791 | 14311 | } wl_proxd_ftm_session_status_t; |
---|
7792 | 14312 | |
---|
7793 | | -/* rrm range request */ |
---|
| 14313 | +/** rrm range request */ |
---|
7794 | 14314 | typedef struct wl_proxd_range_req { |
---|
7795 | 14315 | uint16 num_repeat; |
---|
7796 | | - uint16 init_delay_range; /* in TUs */ |
---|
| 14316 | + uint16 init_delay_range; /**< in TUs */ |
---|
7797 | 14317 | uint8 pad; |
---|
7798 | | - uint8 num_nbr; /* number of (possible) neighbors */ |
---|
7799 | | - nbr_element_t nbr[1]; |
---|
| 14318 | + uint8 num_nbr; /**< number of (possible) neighbors */ |
---|
| 14319 | + nbr_element_t nbr[1]; |
---|
7800 | 14320 | } wl_proxd_range_req_t; |
---|
7801 | 14321 | |
---|
7802 | 14322 | #define WL_PROXD_LCI_LAT_OFF 0 |
---|
.. | .. |
---|
7840 | 14360 | #define WL_PROXD_LCI_VERSION(_lci) ((_lci)->data[15] >> 6) |
---|
7841 | 14361 | |
---|
7842 | 14362 | /* availability. advertising mechanism bss specific */ |
---|
7843 | | -/* availablity flags */ |
---|
| 14363 | +/** availablity flags */ |
---|
7844 | 14364 | enum { |
---|
7845 | 14365 | WL_PROXD_AVAIL_NONE = 0, |
---|
7846 | 14366 | WL_PROXD_AVAIL_NAN_PUBLISHED = 0x0001, |
---|
7847 | | - WL_PROXD_AVAIL_SCHEDULED = 0x0002 /* scheduled by proxd */ |
---|
| 14367 | + WL_PROXD_AVAIL_SCHEDULED = 0x0002 /**< scheduled by proxd */ |
---|
7848 | 14368 | }; |
---|
7849 | 14369 | typedef int16 wl_proxd_avail_flags_t; |
---|
7850 | 14370 | |
---|
7851 | | -/* time reference */ |
---|
| 14371 | +/** time reference */ |
---|
7852 | 14372 | enum { |
---|
7853 | 14373 | WL_PROXD_TREF_NONE = 0, |
---|
7854 | 14374 | WL_PROXD_TREF_DEV_TSF = 1, |
---|
.. | .. |
---|
7858 | 14378 | }; |
---|
7859 | 14379 | typedef int16 wl_proxd_time_ref_t; |
---|
7860 | 14380 | |
---|
7861 | | -/* proxd channel-time slot */ |
---|
| 14381 | +/** proxd channel-time slot */ |
---|
7862 | 14382 | typedef struct { |
---|
7863 | | - wl_proxd_intvl_t start; /* from ref */ |
---|
7864 | | - wl_proxd_intvl_t duration; /* from start */ |
---|
| 14383 | + wl_proxd_intvl_t start; /**< from ref */ |
---|
| 14384 | + wl_proxd_intvl_t duration; /**< from start */ |
---|
7865 | 14385 | uint32 chanspec; |
---|
7866 | 14386 | } wl_proxd_time_slot_t; |
---|
7867 | 14387 | |
---|
7868 | 14388 | typedef struct wl_proxd_avail24 { |
---|
7869 | | - wl_proxd_avail_flags_t flags; /* for query only */ |
---|
| 14389 | + wl_proxd_avail_flags_t flags; /**< for query only */ |
---|
7870 | 14390 | wl_proxd_time_ref_t time_ref; |
---|
7871 | | - uint16 max_slots; /* for query only */ |
---|
| 14391 | + uint16 max_slots; /**< for query only */ |
---|
7872 | 14392 | uint16 num_slots; |
---|
7873 | | - wl_proxd_time_slot_t slots[1]; /* ROM compat - not used */ |
---|
| 14393 | + wl_proxd_time_slot_t slots[1]; /**< ROM compat - not used */ |
---|
7874 | 14394 | wl_proxd_intvl_t repeat; |
---|
7875 | 14395 | wl_proxd_time_slot_t ts0[1]; |
---|
7876 | 14396 | } wl_proxd_avail24_t; |
---|
.. | .. |
---|
7882 | 14402 | (_num_slots) * sizeof(*WL_PROXD_AVAIL24_TIMESLOT(_avail24, 0))) |
---|
7883 | 14403 | |
---|
7884 | 14404 | typedef struct wl_proxd_avail { |
---|
7885 | | - wl_proxd_avail_flags_t flags; /* for query only */ |
---|
| 14405 | + wl_proxd_avail_flags_t flags; /**< for query only */ |
---|
7886 | 14406 | wl_proxd_time_ref_t time_ref; |
---|
7887 | | - uint16 max_slots; /* for query only */ |
---|
| 14407 | + uint16 max_slots; /**< for query only */ |
---|
7888 | 14408 | uint16 num_slots; |
---|
7889 | 14409 | wl_proxd_intvl_t repeat; |
---|
7890 | 14410 | wl_proxd_time_slot_t slots[1]; |
---|
.. | .. |
---|
7899 | 14419 | |
---|
7900 | 14420 | /* collect support TBD */ |
---|
7901 | 14421 | |
---|
7902 | | -/* debugging */ |
---|
| 14422 | +/** debugging */ |
---|
7903 | 14423 | enum { |
---|
7904 | 14424 | WL_PROXD_DEBUG_NONE = 0x00000000, |
---|
7905 | 14425 | WL_PROXD_DEBUG_LOG = 0x00000001, |
---|
7906 | 14426 | WL_PROXD_DEBUG_IOV = 0x00000002, |
---|
7907 | | - WL_PROXD_DEBUG_EVENT = 0x00000004, |
---|
7908 | | - WL_PROXD_DEBUG_SESSION = 0x00000008, |
---|
7909 | | - WL_PROXD_DEBUG_PROTO = 0x00000010, |
---|
7910 | | - WL_PROXD_DEBUG_SCHED = 0x00000020, |
---|
7911 | | - WL_PROXD_DEBUG_RANGING = 0x00000040, |
---|
| 14427 | + WL_PROXD_DEBUG_EVENT = 0x00000004, |
---|
| 14428 | + WL_PROXD_DEBUG_SESSION = 0x00000008, |
---|
| 14429 | + WL_PROXD_DEBUG_PROTO = 0x00000010, |
---|
| 14430 | + WL_PROXD_DEBUG_SCHED = 0x00000020, |
---|
| 14431 | + WL_PROXD_DEBUG_RANGING = 0x00000040, |
---|
| 14432 | + WL_PROXD_DEBUG_NAN = 0x00000080, |
---|
| 14433 | + WL_PROXD_DEBUG_PKT = 0x00000100, |
---|
| 14434 | + WL_PROXD_DEBUG_SEC = 0x00000200, |
---|
| 14435 | + WL_PROXD_DEBUG_EVENTLOG = 0x80000000, /* map/enable EVNET_LOG_TAG_PROXD_INFO */ |
---|
7912 | 14436 | WL_PROXD_DEBUG_ALL = 0xffffffff |
---|
7913 | 14437 | }; |
---|
7914 | 14438 | typedef uint32 wl_proxd_debug_mask_t; |
---|
7915 | 14439 | |
---|
7916 | | -/* tlv IDs - data length 4 bytes unless overridden by type, alignment 32 bits */ |
---|
| 14440 | +/** tlv IDs - data length 4 bytes unless overridden by type, alignment 32 bits */ |
---|
7917 | 14441 | enum { |
---|
7918 | | - WL_PROXD_TLV_ID_NONE = 0, |
---|
7919 | | - WL_PROXD_TLV_ID_METHOD = 1, |
---|
7920 | | - WL_PROXD_TLV_ID_FLAGS = 2, |
---|
7921 | | - WL_PROXD_TLV_ID_CHANSPEC = 3, /* note: uint32 */ |
---|
7922 | | - WL_PROXD_TLV_ID_TX_POWER = 4, |
---|
7923 | | - WL_PROXD_TLV_ID_RATESPEC = 5, |
---|
7924 | | - WL_PROXD_TLV_ID_BURST_DURATION = 6, /* intvl - length of burst */ |
---|
7925 | | - WL_PROXD_TLV_ID_BURST_PERIOD = 7, /* intvl - between bursts */ |
---|
7926 | | - WL_PROXD_TLV_ID_BURST_FTM_SEP = 8, /* intvl - between FTMs */ |
---|
7927 | | - WL_PROXD_TLV_ID_BURST_NUM_FTM = 9, /* uint16 - per burst */ |
---|
7928 | | - WL_PROXD_TLV_ID_NUM_BURST = 10, /* uint16 */ |
---|
7929 | | - WL_PROXD_TLV_ID_FTM_RETRIES = 11, /* uint16 at FTM level */ |
---|
7930 | | - WL_PROXD_TLV_ID_BSS_INDEX = 12, /* uint8 */ |
---|
7931 | | - WL_PROXD_TLV_ID_BSSID = 13, |
---|
7932 | | - WL_PROXD_TLV_ID_INIT_DELAY = 14, /* intvl - optional, non-standalone only */ |
---|
7933 | | - WL_PROXD_TLV_ID_BURST_TIMEOUT = 15, /* expect response within - intvl */ |
---|
7934 | | - WL_PROXD_TLV_ID_EVENT_MASK = 16, /* interested events - in/out */ |
---|
7935 | | - WL_PROXD_TLV_ID_FLAGS_MASK = 17, /* interested flags - in only */ |
---|
7936 | | - WL_PROXD_TLV_ID_PEER_MAC = 18, /* mac address of peer */ |
---|
7937 | | - WL_PROXD_TLV_ID_FTM_REQ = 19, /* dot11_ftm_req */ |
---|
7938 | | - WL_PROXD_TLV_ID_LCI_REQ = 20, |
---|
7939 | | - WL_PROXD_TLV_ID_LCI = 21, |
---|
| 14442 | + WL_PROXD_TLV_ID_NONE = 0, |
---|
| 14443 | + WL_PROXD_TLV_ID_METHOD = 1, |
---|
| 14444 | + WL_PROXD_TLV_ID_FLAGS = 2, |
---|
| 14445 | + WL_PROXD_TLV_ID_CHANSPEC = 3, /**< note: uint32 */ |
---|
| 14446 | + WL_PROXD_TLV_ID_TX_POWER = 4, |
---|
| 14447 | + WL_PROXD_TLV_ID_RATESPEC = 5, |
---|
| 14448 | + WL_PROXD_TLV_ID_BURST_DURATION = 6, /**< intvl - length of burst */ |
---|
| 14449 | + WL_PROXD_TLV_ID_BURST_PERIOD = 7, /**< intvl - between bursts */ |
---|
| 14450 | + WL_PROXD_TLV_ID_BURST_FTM_SEP = 8, /**< intvl - between FTMs */ |
---|
| 14451 | + WL_PROXD_TLV_ID_BURST_NUM_FTM = 9, /**< uint16 - per burst */ |
---|
| 14452 | + WL_PROXD_TLV_ID_NUM_BURST = 10, /**< uint16 */ |
---|
| 14453 | + WL_PROXD_TLV_ID_FTM_RETRIES = 11, /**< uint16 at FTM level */ |
---|
| 14454 | + WL_PROXD_TLV_ID_BSS_INDEX = 12, /**< uint8 */ |
---|
| 14455 | + WL_PROXD_TLV_ID_BSSID = 13, |
---|
| 14456 | + WL_PROXD_TLV_ID_INIT_DELAY = 14, /**< intvl - optional,non-standalone only */ |
---|
| 14457 | + WL_PROXD_TLV_ID_BURST_TIMEOUT = 15, /**< expect response within - intvl */ |
---|
| 14458 | + WL_PROXD_TLV_ID_EVENT_MASK = 16, /**< interested events - in/out */ |
---|
| 14459 | + WL_PROXD_TLV_ID_FLAGS_MASK = 17, /**< interested flags - in only */ |
---|
| 14460 | + WL_PROXD_TLV_ID_PEER_MAC = 18, /**< mac address of peer */ |
---|
| 14461 | + WL_PROXD_TLV_ID_FTM_REQ = 19, /**< dot11_ftm_req */ |
---|
| 14462 | + WL_PROXD_TLV_ID_LCI_REQ = 20, |
---|
| 14463 | + WL_PROXD_TLV_ID_LCI = 21, |
---|
7940 | 14464 | WL_PROXD_TLV_ID_CIVIC_REQ = 22, |
---|
7941 | 14465 | WL_PROXD_TLV_ID_CIVIC = 23, |
---|
7942 | | - WL_PROXD_TLV_ID_AVAIL24 = 24, /* ROM compatibility */ |
---|
7943 | | - WL_PROXD_TLV_ID_SESSION_FLAGS = 25, |
---|
7944 | | - WL_PROXD_TLV_ID_SESSION_FLAGS_MASK = 26, /* in only */ |
---|
7945 | | - WL_PROXD_TLV_ID_RX_MAX_BURST = 27, /* uint16 - limit bursts per session */ |
---|
7946 | | - WL_PROXD_TLV_ID_RANGING_INFO = 28, /* ranging info */ |
---|
7947 | | - WL_PROXD_TLV_ID_RANGING_FLAGS = 29, /* uint16 */ |
---|
7948 | | - WL_PROXD_TLV_ID_RANGING_FLAGS_MASK = 30, /* uint16, in only */ |
---|
7949 | | - WL_PROXD_TLV_ID_NAN_MAP_ID = 31, |
---|
7950 | | - WL_PROXD_TLV_ID_DEV_ADDR = 32, |
---|
7951 | | - WL_PROXD_TLV_ID_AVAIL = 33, /* wl_proxd_avail_t */ |
---|
7952 | | - WL_PROXD_TLV_ID_TLV_ID = 34, /* uint16 tlv-id */ |
---|
7953 | | - WL_PROXD_TLV_ID_FTM_REQ_RETRIES = 35, /* uint16 FTM request retries */ |
---|
| 14466 | + WL_PROXD_TLV_ID_AVAIL24 = 24, /**< ROM compatibility */ |
---|
| 14467 | + WL_PROXD_TLV_ID_SESSION_FLAGS = 25, |
---|
| 14468 | + WL_PROXD_TLV_ID_SESSION_FLAGS_MASK = 26, /**< in only */ |
---|
| 14469 | + WL_PROXD_TLV_ID_RX_MAX_BURST = 27, /**< uint16 - limit bursts per session */ |
---|
| 14470 | + WL_PROXD_TLV_ID_RANGING_INFO = 28, /**< ranging info */ |
---|
| 14471 | + WL_PROXD_TLV_ID_RANGING_FLAGS = 29, /**< uint16 */ |
---|
| 14472 | + WL_PROXD_TLV_ID_RANGING_FLAGS_MASK = 30, /**< uint16, in only */ |
---|
| 14473 | + WL_PROXD_TLV_ID_NAN_MAP_ID = 31, |
---|
| 14474 | + WL_PROXD_TLV_ID_DEV_ADDR = 32, |
---|
| 14475 | + WL_PROXD_TLV_ID_AVAIL = 33, /**< wl_proxd_avail_t */ |
---|
| 14476 | + WL_PROXD_TLV_ID_TLV_ID = 34, /* uint16 tlv-id */ |
---|
| 14477 | + WL_PROXD_TLV_ID_FTM_REQ_RETRIES = 35, /* uint16 FTM request retries */ |
---|
| 14478 | + WL_PROXD_TLV_ID_TPK = 36, /* 32byte TPK */ |
---|
| 14479 | + WL_PROXD_TLV_ID_RI_RR = 36, /* RI_RR */ |
---|
| 14480 | + WL_PROXD_TLV_ID_TUNE = 37, /* wl_proxd_pararms_tof_tune_t */ |
---|
| 14481 | + WL_PROXD_TLV_ID_CUR_ETHER_ADDR = 38, /* Source Address used for Tx */ |
---|
7954 | 14482 | |
---|
7955 | 14483 | /* output - 512 + x */ |
---|
7956 | | - WL_PROXD_TLV_ID_STATUS = 512, |
---|
7957 | | - WL_PROXD_TLV_ID_COUNTERS = 513, |
---|
7958 | | - WL_PROXD_TLV_ID_INFO = 514, |
---|
7959 | | - WL_PROXD_TLV_ID_RTT_RESULT = 515, |
---|
| 14484 | + WL_PROXD_TLV_ID_STATUS = 512, |
---|
| 14485 | + WL_PROXD_TLV_ID_COUNTERS = 513, |
---|
| 14486 | + WL_PROXD_TLV_ID_INFO = 514, |
---|
| 14487 | + WL_PROXD_TLV_ID_RTT_RESULT = 515, |
---|
7960 | 14488 | WL_PROXD_TLV_ID_AOA_RESULT = 516, |
---|
7961 | | - WL_PROXD_TLV_ID_SESSION_INFO = 517, |
---|
7962 | | - WL_PROXD_TLV_ID_SESSION_STATUS = 518, |
---|
7963 | | - WL_PROXD_TLV_ID_SESSION_ID_LIST = 519, |
---|
| 14489 | + WL_PROXD_TLV_ID_SESSION_INFO = 517, |
---|
| 14490 | + WL_PROXD_TLV_ID_SESSION_STATUS = 518, |
---|
| 14491 | + WL_PROXD_TLV_ID_SESSION_ID_LIST = 519, |
---|
| 14492 | + WL_PROXD_TLV_ID_RTT_RESULT_V2 = 520, |
---|
7964 | 14493 | |
---|
7965 | 14494 | /* debug tlvs can be added starting 1024 */ |
---|
7966 | | - WL_PROXD_TLV_ID_DEBUG_MASK = 1024, |
---|
7967 | | - WL_PROXD_TLV_ID_COLLECT = 1025, /* output only */ |
---|
7968 | | - WL_PROXD_TLV_ID_STRBUF = 1026, |
---|
| 14495 | + WL_PROXD_TLV_ID_DEBUG_MASK = 1024, |
---|
| 14496 | + WL_PROXD_TLV_ID_COLLECT = 1025, /**< output only */ |
---|
| 14497 | + WL_PROXD_TLV_ID_STRBUF = 1026, |
---|
| 14498 | + |
---|
| 14499 | + WL_PROXD_TLV_ID_COLLECT_HEADER = 1025, /* wl_proxd_collect_header_t */ |
---|
| 14500 | + WL_PROXD_TLV_ID_COLLECT_INFO = 1028, /* wl_proxd_collect_info_t */ |
---|
| 14501 | + WL_PROXD_TLV_ID_COLLECT_DATA = 1029, /* wl_proxd_collect_data_t */ |
---|
| 14502 | + WL_PROXD_TLV_ID_COLLECT_CHAN_DATA = 1030, /* wl_proxd_collect_data_t */ |
---|
| 14503 | + WL_PROXD_TLV_ID_MF_STATS_DATA = 1031, /* mf_stats_buffer */ |
---|
7969 | 14504 | |
---|
7970 | 14505 | WL_PROXD_TLV_ID_MAX |
---|
7971 | 14506 | }; |
---|
.. | .. |
---|
7976 | 14511 | uint8 data[1]; |
---|
7977 | 14512 | } wl_proxd_tlv_t; |
---|
7978 | 14513 | |
---|
7979 | | -/* proxd iovar - applies to proxd, method or session */ |
---|
| 14514 | +/** proxd iovar - applies to proxd, method or session */ |
---|
7980 | 14515 | typedef struct wl_proxd_iov { |
---|
7981 | | - uint16 version; |
---|
7982 | | - uint16 len; |
---|
7983 | | - wl_proxd_cmd_t cmd; |
---|
7984 | | - wl_proxd_method_t method; |
---|
7985 | | - wl_proxd_session_id_t sid; |
---|
7986 | | - uint8 pad[2]; |
---|
7987 | | - wl_proxd_tlv_t tlvs[1]; /* variable */ |
---|
| 14516 | + uint16 version; |
---|
| 14517 | + uint16 len; |
---|
| 14518 | + wl_proxd_cmd_t cmd; |
---|
| 14519 | + wl_proxd_method_t method; |
---|
| 14520 | + wl_proxd_session_id_t sid; |
---|
| 14521 | + uint8 PAD[2]; |
---|
| 14522 | + wl_proxd_tlv_t tlvs[1]; /**< variable */ |
---|
7988 | 14523 | } wl_proxd_iov_t; |
---|
7989 | 14524 | |
---|
7990 | 14525 | #define WL_PROXD_IOV_HDR_SIZE OFFSETOF(wl_proxd_iov_t, tlvs) |
---|
.. | .. |
---|
7993 | 14528 | * across needs more invasive changes unrelated to proxd |
---|
7994 | 14529 | */ |
---|
7995 | 14530 | enum { |
---|
7996 | | - WL_PROXD_EVENT_NONE = 0, /* not an event, reserved */ |
---|
7997 | | - WL_PROXD_EVENT_SESSION_CREATE = 1, |
---|
7998 | | - WL_PROXD_EVENT_SESSION_START = 2, |
---|
| 14531 | + WL_PROXD_EVENT_NONE = 0, /**< not an event, reserved */ |
---|
| 14532 | + WL_PROXD_EVENT_SESSION_CREATE = 1, |
---|
| 14533 | + WL_PROXD_EVENT_SESSION_START = 2, |
---|
7999 | 14534 | WL_PROXD_EVENT_FTM_REQ = 3, |
---|
8000 | 14535 | WL_PROXD_EVENT_BURST_START = 4, |
---|
8001 | 14536 | WL_PROXD_EVENT_BURST_END = 5, |
---|
8002 | 14537 | WL_PROXD_EVENT_SESSION_END = 6, |
---|
8003 | | - WL_PROXD_EVENT_SESSION_RESTART = 7, |
---|
8004 | | - WL_PROXD_EVENT_BURST_RESCHED = 8, /* burst rescheduled - e.g. partial TSF */ |
---|
8005 | | - WL_PROXD_EVENT_SESSION_DESTROY = 9, |
---|
8006 | | - WL_PROXD_EVENT_RANGE_REQ = 10, |
---|
| 14538 | + WL_PROXD_EVENT_SESSION_RESTART = 7, |
---|
| 14539 | + WL_PROXD_EVENT_BURST_RESCHED = 8, /**< burst rescheduled-e.g. partial TSF */ |
---|
| 14540 | + WL_PROXD_EVENT_SESSION_DESTROY = 9, |
---|
| 14541 | + WL_PROXD_EVENT_RANGE_REQ = 10, |
---|
8007 | 14542 | WL_PROXD_EVENT_FTM_FRAME = 11, |
---|
8008 | 14543 | WL_PROXD_EVENT_DELAY = 12, |
---|
8009 | | - WL_PROXD_EVENT_VS_INITIATOR_RPT = 13, /* (target) rx initiator-report */ |
---|
| 14544 | + WL_PROXD_EVENT_VS_INITIATOR_RPT = 13, /**< (target) rx initiator-report */ |
---|
8010 | 14545 | WL_PROXD_EVENT_RANGING = 14, |
---|
8011 | | - WL_PROXD_EVENT_LCI_MEAS_REP = 15, /* LCI measurement report */ |
---|
8012 | | - WL_PROXD_EVENT_CIVIC_MEAS_REP = 16, /* civic measurement report */ |
---|
| 14546 | + WL_PROXD_EVENT_LCI_MEAS_REP = 15, /* LCI measurement report */ |
---|
| 14547 | + WL_PROXD_EVENT_CIVIC_MEAS_REP = 16, /* civic measurement report */ |
---|
| 14548 | + WL_PROXD_EVENT_COLLECT = 17, |
---|
| 14549 | + WL_PROXD_EVENT_START_WAIT = 18, /* waiting to start */ |
---|
| 14550 | + WL_PROXD_EVENT_MF_STATS = 19, /* mf stats event */ |
---|
8013 | 14551 | |
---|
8014 | 14552 | WL_PROXD_EVENT_MAX |
---|
8015 | 14553 | }; |
---|
8016 | 14554 | typedef int16 wl_proxd_event_type_t; |
---|
8017 | 14555 | |
---|
8018 | | -/* proxd event mask - upto 32 events for now */ |
---|
| 14556 | +/** proxd event mask - upto 32 events for now */ |
---|
8019 | 14557 | typedef uint32 wl_proxd_event_mask_t; |
---|
8020 | 14558 | |
---|
8021 | 14559 | #define WL_PROXD_EVENT_MASK_ALL 0xfffffffe |
---|
.. | .. |
---|
8023 | 14561 | #define WL_PROXD_EVENT_ENABLED(_mask, _event_type) (\ |
---|
8024 | 14562 | ((_mask) & WL_PROXD_EVENT_MASK_EVENT(_event_type)) != 0) |
---|
8025 | 14563 | |
---|
8026 | | -/* proxd event - applies to proxd, method or session */ |
---|
| 14564 | +/** proxd event - applies to proxd, method or session */ |
---|
8027 | 14565 | typedef struct wl_proxd_event { |
---|
8028 | | - uint16 version; |
---|
8029 | | - uint16 len; |
---|
8030 | | - wl_proxd_event_type_t type; |
---|
8031 | | - wl_proxd_method_t method; |
---|
8032 | | - wl_proxd_session_id_t sid; |
---|
8033 | | - uint8 pad[2]; |
---|
8034 | | - wl_proxd_tlv_t tlvs[1]; /* variable */ |
---|
| 14566 | + uint16 version; |
---|
| 14567 | + uint16 len; |
---|
| 14568 | + wl_proxd_event_type_t type; |
---|
| 14569 | + wl_proxd_method_t method; |
---|
| 14570 | + wl_proxd_session_id_t sid; |
---|
| 14571 | + uint8 pad[2]; |
---|
| 14572 | + wl_proxd_tlv_t tlvs[1]; /**< variable */ |
---|
8035 | 14573 | } wl_proxd_event_t; |
---|
8036 | 14574 | |
---|
8037 | 14575 | enum { |
---|
.. | .. |
---|
8042 | 14580 | }; |
---|
8043 | 14581 | typedef int16 wl_proxd_ranging_state_t; |
---|
8044 | 14582 | |
---|
8045 | | -/* proxd ranging flags */ |
---|
| 14583 | +/** proxd ranging flags */ |
---|
8046 | 14584 | enum { |
---|
8047 | | - WL_PROXD_RANGING_FLAG_NONE = 0x0000, /* no flags */ |
---|
| 14585 | + WL_PROXD_RANGING_FLAG_NONE = 0x0000, /**< no flags */ |
---|
8048 | 14586 | WL_PROXD_RANGING_FLAG_DEL_SESSIONS_ON_STOP = 0x0001, |
---|
8049 | 14587 | WL_PROXD_RANGING_FLAG_ALL = 0xffff |
---|
8050 | 14588 | }; |
---|
.. | .. |
---|
8058 | 14596 | uint16 num_done; |
---|
8059 | 14597 | }; |
---|
8060 | 14598 | typedef struct wl_proxd_ranging_info wl_proxd_ranging_info_t; |
---|
8061 | | -#include <packed_section_end.h> |
---|
8062 | | -/* end proxd definitions */ |
---|
8063 | 14599 | |
---|
8064 | | -/* require strict packing */ |
---|
8065 | 14600 | #include <packed_section_start.h> |
---|
8066 | | -/* Data returned by the bssload_report iovar. |
---|
8067 | | - * This is also the WLC_E_BSS_LOAD event data. |
---|
8068 | | - */ |
---|
8069 | | -typedef BWL_PRE_PACKED_STRUCT struct wl_bssload { |
---|
8070 | | - uint16 sta_count; /* station count */ |
---|
8071 | | - uint16 aac; /* available admission capacity */ |
---|
8072 | | - uint8 chan_util; /* channel utilization */ |
---|
8073 | | -} BWL_POST_PACKED_STRUCT wl_bssload_t; |
---|
| 14601 | +/* Legacy platform i.e. 43342/43430 */ |
---|
| 14602 | +#define WL_PROXD_COLLECT_EVENT_DATA_VERSION_1 1 |
---|
| 14603 | +typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_collect_event_data_v1 { |
---|
| 14604 | + uint32 H_LB[K_TOF_COLLECT_H_SIZE_20MHZ]; |
---|
| 14605 | + uint32 H_RX[K_TOF_COLLECT_H_SIZE_20MHZ]; |
---|
| 14606 | + uint8 ri_rr[FTM_TPK_LEN]; |
---|
| 14607 | + wl_proxd_phy_error_t phy_err_mask; |
---|
| 14608 | +} BWL_POST_PACKED_STRUCT wl_proxd_collect_event_data_v1_t; |
---|
8074 | 14609 | |
---|
8075 | | -/* Maximum number of configurable BSS Load levels. The number of BSS Load |
---|
| 14610 | +/* Secured 2.0 supoorted devices i.e. 4364 */ |
---|
| 14611 | +#define WL_PROXD_COLLECT_EVENT_DATA_VERSION_2 2 |
---|
| 14612 | +typedef BWL_PRE_PACKED_STRUCT struct wl_proxd_collect_event_data_v2 { |
---|
| 14613 | + uint32 H_LB[K_TOF_COLLECT_H_SIZE_20MHZ]; |
---|
| 14614 | + uint32 H_RX[K_TOF_COLLECT_H_SIZE_20MHZ]; |
---|
| 14615 | + uint8 ri_rr[FTM_TPK_RI_RR_LEN_SECURE_2_0]; |
---|
| 14616 | + wl_proxd_phy_error_t phy_err_mask; |
---|
| 14617 | +} BWL_POST_PACKED_STRUCT wl_proxd_collect_event_data_v2_t; |
---|
| 14618 | +#include <packed_section_end.h> |
---|
| 14619 | + |
---|
| 14620 | +#define WL_PROXD_COLLECT_EVENT_DATA_VERSION_3 3 |
---|
| 14621 | +typedef struct wl_proxd_collect_event_data_v3 { |
---|
| 14622 | + uint16 version; |
---|
| 14623 | + uint16 length; |
---|
| 14624 | + uint32 H_LB[K_TOF_COLLECT_H_SIZE_20MHZ]; |
---|
| 14625 | + uint32 H_RX[K_TOF_COLLECT_H_SIZE_20MHZ]; |
---|
| 14626 | + uint8 ri_rr[FTM_TPK_RI_RR_LEN_SECURE_2_0]; |
---|
| 14627 | + wl_proxd_phy_error_t phy_err_mask; |
---|
| 14628 | +} wl_proxd_collect_event_data_v3_t; |
---|
| 14629 | + |
---|
| 14630 | +#define WL_PROXD_COLLECT_EVENT_DATA_VERSION_MAX WL_PROXD_COLLECT_EVENT_DATA_VERSION_3 |
---|
| 14631 | + |
---|
| 14632 | +/** Data returned by the bssload_report iovar. This is also the WLC_E_BSS_LOAD event data */ |
---|
| 14633 | +#include <packed_section_start.h> |
---|
| 14634 | +typedef BWL_PRE_PACKED_STRUCT struct wl_bssload { |
---|
| 14635 | + uint16 sta_count; /**< station count */ |
---|
| 14636 | + uint16 aac; /**< available admission capacity */ |
---|
| 14637 | + uint8 chan_util; /**< channel utilization */ |
---|
| 14638 | +} BWL_POST_PACKED_STRUCT wl_bssload_t; |
---|
| 14639 | +#include <packed_section_end.h> |
---|
| 14640 | + |
---|
| 14641 | +/** |
---|
| 14642 | + * Maximum number of configurable BSS Load levels. The number of BSS Load |
---|
8076 | 14643 | * ranges is always 1 more than the number of configured levels. eg. if |
---|
8077 | 14644 | * 3 levels of 10, 20, 30 are configured then this defines 4 load ranges: |
---|
8078 | 14645 | * 0-10, 11-20, 21-30, 31-255. A WLC_E_BSS_LOAD event is generated each time |
---|
.. | .. |
---|
8081 | 14648 | #define MAX_BSSLOAD_LEVELS 8 |
---|
8082 | 14649 | #define MAX_BSSLOAD_RANGES (MAX_BSSLOAD_LEVELS + 1) |
---|
8083 | 14650 | |
---|
8084 | | -/* BSS Load event notification configuration. */ |
---|
| 14651 | +/** BSS Load event notification configuration. */ |
---|
8085 | 14652 | typedef struct wl_bssload_cfg { |
---|
8086 | | - uint32 rate_limit_msec; /* # of events posted to application will be limited to |
---|
| 14653 | + uint32 rate_limit_msec; /**< # of events posted to application will be limited to |
---|
8087 | 14654 | * one per specified period (0 to disable rate limit). |
---|
8088 | 14655 | */ |
---|
8089 | | - uint8 num_util_levels; /* Number of entries in util_levels[] below */ |
---|
| 14656 | + uint8 num_util_levels; /**< Number of entries in util_levels[] below */ |
---|
8090 | 14657 | uint8 util_levels[MAX_BSSLOAD_LEVELS]; |
---|
8091 | | - /* Variable number of BSS Load utilization levels in |
---|
| 14658 | + /**< Variable number of BSS Load utilization levels in |
---|
8092 | 14659 | * low to high order. An event will be posted each time |
---|
8093 | 14660 | * a received beacon's BSS Load IE channel utilization |
---|
8094 | 14661 | * value crosses a level. |
---|
8095 | 14662 | */ |
---|
| 14663 | + uint8 PAD[3]; |
---|
8096 | 14664 | } wl_bssload_cfg_t; |
---|
8097 | 14665 | |
---|
8098 | | -/* Multiple roaming profile suport */ |
---|
| 14666 | +/** Multiple roaming profile suport */ |
---|
8099 | 14667 | #define WL_MAX_ROAM_PROF_BRACKETS 4 |
---|
8100 | 14668 | |
---|
8101 | | -#define WL_MAX_ROAM_PROF_VER 1 |
---|
| 14669 | +#define WL_ROAM_PROF_VER_0 0 |
---|
| 14670 | +#define WL_ROAM_PROF_VER_1 1 |
---|
| 14671 | +#define WL_ROAM_PROF_VER_2 2 |
---|
| 14672 | +#define WL_MAX_ROAM_PROF_VER WL_ROAM_PROF_VER_1 |
---|
8102 | 14673 | |
---|
8103 | 14674 | #define WL_ROAM_PROF_NONE (0 << 0) |
---|
8104 | 14675 | #define WL_ROAM_PROF_LAZY (1 << 0) |
---|
8105 | 14676 | #define WL_ROAM_PROF_NO_CI (1 << 1) |
---|
8106 | 14677 | #define WL_ROAM_PROF_SUSPEND (1 << 2) |
---|
8107 | 14678 | #define WL_ROAM_PROF_SYNC_DTIM (1 << 6) |
---|
8108 | | -#define WL_ROAM_PROF_DEFAULT (1 << 7) /* backward compatible single default profile */ |
---|
| 14679 | +#define WL_ROAM_PROF_DEFAULT (1 << 7) /**< backward compatible single default profile */ |
---|
8109 | 14680 | |
---|
8110 | | -#define WL_ROAM_DELTA_2G 20 /* default 2G roam delta in dBm when "cu == 0" */ |
---|
8111 | | -#define WL_ROAM_DELTA_5G 15 /* default 5G roam delta in dBm when "cu == 0" */ |
---|
8112 | | -#define WL_SCORE_DELTA_DEFAULT 20 /* default score delta in percentage when "cu != 0" */ |
---|
8113 | | - |
---|
8114 | | -#define WL_JOIN_PREF_RSSI_BOOST_MIN -70 |
---|
8115 | | -#define WL_ROAM_FULLSCAN_NTIMES 3 |
---|
8116 | | -#define WL_FULLROAM_PERIOD 70 |
---|
8117 | | -#define WL_ROAM_SCAN_PERIOD 10 |
---|
8118 | 14681 | #define WL_FACTOR_TABLE_MAX_LIMIT 5 |
---|
8119 | 14682 | |
---|
8120 | | -typedef struct wl_roam_prof { |
---|
8121 | | - int8 roam_flags; /* bit flags */ |
---|
8122 | | - int8 roam_trigger; /* RSSI trigger level per profile/RSSI bracket */ |
---|
| 14683 | +#define WL_CU_2G_ROAM_TRIGGER (-60) |
---|
| 14684 | +#define WL_CU_5G_ROAM_TRIGGER (-70) |
---|
| 14685 | + |
---|
| 14686 | +#define WL_CU_SCORE_DELTA_DEFAULT 20 |
---|
| 14687 | + |
---|
| 14688 | +#define WL_MAX_CHANNEL_USAGE 0x0FF |
---|
| 14689 | +#define WL_CU_PERCENTAGE_DISABLE 0 |
---|
| 14690 | +#define WL_CU_PERCENTAGE_DEFAULT 70 |
---|
| 14691 | +#define WL_CU_PERCENTAGE_MAX 100 |
---|
| 14692 | +#define WL_CU_CALC_DURATION_DEFAULT 10 /* seconds */ |
---|
| 14693 | +#define WL_CU_CALC_DURATION_MAX 60 /* seconds */ |
---|
| 14694 | + |
---|
| 14695 | +#define WL_ESTM_LOW_TRIGGER_DISABLE 0 |
---|
| 14696 | +#define WL_ESTM_LOW_TRIGGER_DEFAULT 5 /* Mbps */ |
---|
| 14697 | +#define WL_ESTM_LOW_TRIGGER_MAX 250 /* Mbps */ |
---|
| 14698 | +#define WL_ESTM_ROAM_DELTA_DEFAULT 10 |
---|
| 14699 | + |
---|
| 14700 | +typedef struct wl_roam_prof_v3 { |
---|
| 14701 | + uint8 roam_flags; /**< bit flags */ |
---|
| 14702 | + int8 roam_trigger; /**< RSSI trigger level per profile/RSSI bracket */ |
---|
8123 | 14703 | int8 rssi_lower; |
---|
8124 | 14704 | int8 roam_delta; |
---|
8125 | | - int8 rssi_boost_thresh; /* Min RSSI to qualify for RSSI boost */ |
---|
8126 | | - int8 rssi_boost_delta; /* RSSI boost for AP in the other band */ |
---|
8127 | | - uint16 nfscan; /* nuber of full scan to start with */ |
---|
| 14705 | + |
---|
| 14706 | + /* if channel_usage if zero, roam_delta is rssi delta required for new AP */ |
---|
| 14707 | + /* if channel_usage if non-zero, roam_delta is score delta(%) required for new AP */ |
---|
| 14708 | + int8 rssi_boost_thresh; /**< Min RSSI to qualify for RSSI boost */ |
---|
| 14709 | + int8 rssi_boost_delta; /**< RSSI boost for AP in the other band */ |
---|
| 14710 | + uint16 nfscan; /**< number of full scan to start with */ |
---|
8128 | 14711 | uint16 fullscan_period; |
---|
8129 | 14712 | uint16 init_scan_period; |
---|
8130 | 14713 | uint16 backoff_multiplier; |
---|
8131 | 14714 | uint16 max_scan_period; |
---|
8132 | | - uint8 channel_usage; |
---|
8133 | | - uint8 cu_avg_calc_dur; |
---|
8134 | | -} wl_roam_prof_t; |
---|
| 14715 | + uint8 channel_usage; |
---|
| 14716 | + uint8 cu_avg_calc_dur; |
---|
| 14717 | + uint16 estm_low_trigger; /**< ESTM low throughput roam trigger */ |
---|
| 14718 | + int8 estm_roam_delta; /**< ESTM low throughput roam delta */ |
---|
| 14719 | + uint8 pad; |
---|
| 14720 | +} wl_roam_prof_v3_t; |
---|
8135 | 14721 | |
---|
8136 | | -typedef struct wl_roam_prof_band { |
---|
8137 | | - uint32 band; /* Must be just one band */ |
---|
8138 | | - uint16 ver; /* version of this struct */ |
---|
8139 | | - uint16 len; /* length in bytes of this structure */ |
---|
8140 | | - wl_roam_prof_t roam_prof[WL_MAX_ROAM_PROF_BRACKETS]; |
---|
8141 | | -} wl_roam_prof_band_t; |
---|
| 14722 | +typedef struct wl_roam_prof_v2 { |
---|
| 14723 | + int8 roam_flags; /**< bit flags */ |
---|
| 14724 | + int8 roam_trigger; /**< RSSI trigger level per profile/RSSI bracket */ |
---|
| 14725 | + int8 rssi_lower; |
---|
| 14726 | + int8 roam_delta; |
---|
| 14727 | + |
---|
| 14728 | + /* if channel_usage if zero, roam_delta is rssi delta required for new AP */ |
---|
| 14729 | + /* if channel_usage if non-zero, roam_delta is score delta(%) required for new AP */ |
---|
| 14730 | + int8 rssi_boost_thresh; /**< Min RSSI to qualify for RSSI boost */ |
---|
| 14731 | + int8 rssi_boost_delta; /**< RSSI boost for AP in the other band */ |
---|
| 14732 | + uint16 nfscan; /**< number of full scan to start with */ |
---|
| 14733 | + uint16 fullscan_period; |
---|
| 14734 | + uint16 init_scan_period; |
---|
| 14735 | + uint16 backoff_multiplier; |
---|
| 14736 | + uint16 max_scan_period; |
---|
| 14737 | + uint8 channel_usage; |
---|
| 14738 | + uint8 cu_avg_calc_dur; |
---|
| 14739 | + uint8 pad[2]; |
---|
| 14740 | +} wl_roam_prof_v2_t; |
---|
| 14741 | + |
---|
| 14742 | +typedef struct wl_roam_prof_v1 { |
---|
| 14743 | + int8 roam_flags; /**< bit flags */ |
---|
| 14744 | + int8 roam_trigger; /**< RSSI trigger level per profile/RSSI bracket */ |
---|
| 14745 | + int8 rssi_lower; |
---|
| 14746 | + int8 roam_delta; |
---|
| 14747 | + |
---|
| 14748 | + /* if channel_usage if zero, roam_delta is rssi delta required for new AP */ |
---|
| 14749 | + /* if channel_usage if non-zero, roam_delta is score delta(%) required for new AP */ |
---|
| 14750 | + int8 rssi_boost_thresh; /**< Min RSSI to qualify for RSSI boost */ |
---|
| 14751 | + int8 rssi_boost_delta; /**< RSSI boost for AP in the other band */ |
---|
| 14752 | + uint16 nfscan; /**< number of full scan to start with */ |
---|
| 14753 | + uint16 fullscan_period; |
---|
| 14754 | + uint16 init_scan_period; |
---|
| 14755 | + uint16 backoff_multiplier; |
---|
| 14756 | + uint16 max_scan_period; |
---|
| 14757 | +} wl_roam_prof_v1_t; |
---|
| 14758 | + |
---|
| 14759 | +typedef struct wl_roam_prof_band_v3 { |
---|
| 14760 | + uint32 band; /**< Must be just one band */ |
---|
| 14761 | + uint16 ver; /**< version of this struct */ |
---|
| 14762 | + uint16 len; /**< length in bytes of this structure */ |
---|
| 14763 | + wl_roam_prof_v3_t roam_prof[WL_MAX_ROAM_PROF_BRACKETS]; |
---|
| 14764 | +} wl_roam_prof_band_v3_t; |
---|
| 14765 | + |
---|
| 14766 | +typedef struct wl_roam_prof_band_v2 { |
---|
| 14767 | + uint32 band; /**< Must be just one band */ |
---|
| 14768 | + uint16 ver; /**< version of this struct */ |
---|
| 14769 | + uint16 len; /**< length in bytes of this structure */ |
---|
| 14770 | + wl_roam_prof_v2_t roam_prof[WL_MAX_ROAM_PROF_BRACKETS]; |
---|
| 14771 | +} wl_roam_prof_band_v2_t; |
---|
| 14772 | + |
---|
| 14773 | +typedef struct wl_roam_prof_band_v1 { |
---|
| 14774 | + uint32 band; /**< Must be just one band */ |
---|
| 14775 | + uint16 ver; /**< version of this struct */ |
---|
| 14776 | + uint16 len; /**< length in bytes of this structure */ |
---|
| 14777 | + wl_roam_prof_v1_t roam_prof[WL_MAX_ROAM_PROF_BRACKETS]; |
---|
| 14778 | +} wl_roam_prof_band_v1_t; |
---|
| 14779 | + |
---|
| 14780 | +#define BSS_MAXTABLE_SIZE 10 |
---|
| 14781 | +#define WNM_BSS_SELECT_FACTOR_VERSION 1 |
---|
| 14782 | +typedef struct wnm_bss_select_factor_params { |
---|
| 14783 | + uint8 low; |
---|
| 14784 | + uint8 high; |
---|
| 14785 | + uint8 factor; |
---|
| 14786 | + uint8 pad; |
---|
| 14787 | +} wnm_bss_select_factor_params_t; |
---|
| 14788 | + |
---|
| 14789 | +#define WNM_BSS_SELECT_FIXED_SIZE OFFSETOF(wnm_bss_select_factor_cfg_t, params) |
---|
| 14790 | +typedef struct wnm_bss_select_factor_cfg { |
---|
| 14791 | + uint8 version; |
---|
| 14792 | + uint8 band; |
---|
| 14793 | + uint16 type; |
---|
| 14794 | + uint16 pad; |
---|
| 14795 | + uint16 count; |
---|
| 14796 | + wnm_bss_select_factor_params_t params[1]; |
---|
| 14797 | +} wnm_bss_select_factor_cfg_t; |
---|
| 14798 | + |
---|
| 14799 | +#define WNM_BSS_SELECT_WEIGHT_VERSION 1 |
---|
| 14800 | +typedef struct wnm_bss_select_weight_cfg { |
---|
| 14801 | + uint8 version; |
---|
| 14802 | + uint8 band; |
---|
| 14803 | + uint16 type; |
---|
| 14804 | + uint16 weight; /* weightage for each type between 0 to 100 */ |
---|
| 14805 | +} wnm_bss_select_weight_cfg_t; |
---|
| 14806 | + |
---|
| 14807 | +/* For branches before koala .. wbtext is part |
---|
| 14808 | + * of wnm need to use below type only |
---|
| 14809 | + */ |
---|
| 14810 | +typedef struct wnm_btm_default_score_cfg { |
---|
| 14811 | + uint32 default_score; /* default score */ |
---|
| 14812 | + uint8 band; |
---|
| 14813 | +} wnm_btm_default_score_cfg_t; |
---|
| 14814 | + |
---|
| 14815 | +/* For branches from koala and above .. wbtext is |
---|
| 14816 | + * seperate module..need to use below type only |
---|
| 14817 | + */ |
---|
| 14818 | +typedef struct wbtext_btm_default_score_cfg { |
---|
| 14819 | + uint32 default_score; /* default score */ |
---|
| 14820 | + uint8 band; |
---|
| 14821 | +} wbtext_btm_default_score_cfg_t; |
---|
| 14822 | + |
---|
| 14823 | +#define WNM_BSS_SELECT_TYPE_RSSI 0 |
---|
| 14824 | +#define WNM_BSS_SELECT_TYPE_CU 1 |
---|
| 14825 | +#define WNM_BSS_SELECT_TYPE_ESTM_DL 2 |
---|
| 14826 | + |
---|
| 14827 | +#define WNM_BSSLOAD_MONITOR_VERSION 1 |
---|
| 14828 | +typedef struct wnm_bssload_monitor_cfg { |
---|
| 14829 | + uint8 version; |
---|
| 14830 | + uint8 band; |
---|
| 14831 | + uint8 duration; /* duration between 1 to 20sec */ |
---|
| 14832 | +} wnm_bssload_monitor_cfg_t; |
---|
| 14833 | + |
---|
| 14834 | +#define WNM_ROAM_TRIGGER_VERSION 1 |
---|
| 14835 | +typedef struct wnm_roam_trigger_cfg { |
---|
| 14836 | + uint8 version; |
---|
| 14837 | + uint8 band; |
---|
| 14838 | + uint16 type; |
---|
| 14839 | + int16 trigger; /* trigger for each type in new roam algorithm */ |
---|
| 14840 | +} wnm_roam_trigger_cfg_t; |
---|
8142 | 14841 | |
---|
8143 | 14842 | /* Data structures for Interface Create/Remove */ |
---|
8144 | 14843 | |
---|
8145 | | -#define WL_INTERFACE_CREATE_VER (0) |
---|
| 14844 | +#define WL_INTERFACE_CREATE_VER_1 1 |
---|
| 14845 | +#define WL_INTERFACE_CREATE_VER_2 2 |
---|
| 14846 | +#define WL_INTERFACE_CREATE_VER_3 3 |
---|
8146 | 14847 | |
---|
8147 | 14848 | /* |
---|
8148 | 14849 | * The flags filed of the wl_interface_create is designed to be |
---|
.. | .. |
---|
8156 | 14857 | * be created is STA or AP. |
---|
8157 | 14858 | * 0 - Create a STA interface |
---|
8158 | 14859 | * 1 - Create an AP interface |
---|
| 14860 | + * NOTE: This Bit 0 is applicable for the WL_INTERFACE_CREATE_VER < 2 |
---|
8159 | 14861 | */ |
---|
8160 | 14862 | #define WL_INTERFACE_CREATE_STA (0 << 0) |
---|
8161 | 14863 | #define WL_INTERFACE_CREATE_AP (1 << 0) |
---|
| 14864 | + |
---|
| 14865 | +/* |
---|
| 14866 | + * From revision >= 2 Bit 0 of flags field will not used be for STA or AP interface creation. |
---|
| 14867 | + * "iftype" field shall be used for identifying the interface type. |
---|
| 14868 | + */ |
---|
| 14869 | +typedef enum wl_interface_type { |
---|
| 14870 | + WL_INTERFACE_TYPE_STA = 0, |
---|
| 14871 | + WL_INTERFACE_TYPE_AP = 1, |
---|
| 14872 | + WL_INTERFACE_TYPE_AWDL = 2, |
---|
| 14873 | + WL_INTERFACE_TYPE_NAN = 3, |
---|
| 14874 | + WL_INTERFACE_TYPE_P2P_GO = 4, |
---|
| 14875 | + WL_INTERFACE_TYPE_P2P_GC = 5, |
---|
| 14876 | + WL_INTERFACE_TYPE_P2P_DISC = 6, |
---|
| 14877 | + WL_INTERFACE_TYPE_IBSS = 7, |
---|
| 14878 | + WL_INTERFACE_TYPE_MAX |
---|
| 14879 | +} wl_interface_type_t; |
---|
8162 | 14880 | |
---|
8163 | 14881 | /* |
---|
8164 | 14882 | * Bit 1 of flags field is used to inform whether MAC is present in the |
---|
.. | .. |
---|
8169 | 14887 | #define WL_INTERFACE_MAC_DONT_USE (0 << 1) |
---|
8170 | 14888 | #define WL_INTERFACE_MAC_USE (1 << 1) |
---|
8171 | 14889 | |
---|
| 14890 | +/* |
---|
| 14891 | + * Bit 2 of flags field is used to inform whether core or wlc index |
---|
| 14892 | + * is present in the data structure or not. |
---|
| 14893 | + * 0 - Ignore wlc_index field |
---|
| 14894 | + * 1 - Use the wlc_index field |
---|
| 14895 | + */ |
---|
| 14896 | +#define WL_INTERFACE_WLC_INDEX_DONT_USE (0 << 2) |
---|
| 14897 | +#define WL_INTERFACE_WLC_INDEX_USE (1 << 2) |
---|
| 14898 | + |
---|
| 14899 | +/* |
---|
| 14900 | + * Bit 3 of flags field is used to create interface on the host requested interface index |
---|
| 14901 | + * 0 - Ignore if_index field |
---|
| 14902 | + * 1 - Use the if_index field |
---|
| 14903 | + */ |
---|
| 14904 | +#define WL_INTERFACE_IF_INDEX_USE (1 << 3) |
---|
| 14905 | + |
---|
| 14906 | +/* |
---|
| 14907 | + * Bit 4 of flags field is used to assign BSSID |
---|
| 14908 | + * 0 - Ignore bssid field |
---|
| 14909 | + * 1 - Use the bssid field |
---|
| 14910 | + */ |
---|
| 14911 | +#define WL_INTERFACE_BSSID_INDEX_USE (1 << 4) |
---|
| 14912 | + |
---|
8172 | 14913 | typedef struct wl_interface_create { |
---|
8173 | | - uint16 ver; /* version of this struct */ |
---|
8174 | | - uint32 flags; /* flags that defines the operation */ |
---|
8175 | | - struct ether_addr mac_addr; /* Optional Mac address */ |
---|
8176 | | -} wl_interface_create_t; |
---|
| 14914 | + uint16 ver; /**< version of this struct */ |
---|
| 14915 | + uint8 pad1[2]; /**< Padding bytes */ |
---|
| 14916 | + uint32 flags; /**< flags that defines the operation */ |
---|
| 14917 | + struct ether_addr mac_addr; /**< Optional Mac address */ |
---|
| 14918 | + uint8 pad2[2]; /**< Padding bytes */ |
---|
| 14919 | + uint32 wlc_index; /**< Optional wlc index */ |
---|
| 14920 | +} wl_interface_create_v1_t; |
---|
8177 | 14921 | |
---|
8178 | | -typedef struct wl_interface_info { |
---|
8179 | | - uint16 ver; /* version of this struct */ |
---|
8180 | | - struct ether_addr mac_addr; /* MAC address of the interface */ |
---|
8181 | | - char ifname[BCM_MSG_IFNAME_MAX]; /* name of interface */ |
---|
8182 | | - uint8 bsscfgidx; /* source bsscfg index */ |
---|
8183 | | -} wl_interface_info_t; |
---|
| 14922 | +typedef struct wl_interface_create_v2 { |
---|
| 14923 | + uint16 ver; /**< version of this struct */ |
---|
| 14924 | + uint8 pad1[2]; /**< Padding bytes */ |
---|
| 14925 | + uint32 flags; /**< flags that defines the operation */ |
---|
| 14926 | + struct ether_addr mac_addr; /**< Optional Mac address */ |
---|
| 14927 | + uint8 iftype; /**< Type of interface created */ |
---|
| 14928 | + uint8 pad2; /**< Padding bytes */ |
---|
| 14929 | + uint32 wlc_index; /**< Optional wlc index */ |
---|
| 14930 | +} wl_interface_create_v2_t; |
---|
8184 | 14931 | |
---|
8185 | | -/* no default structure packing */ |
---|
8186 | | -#include <packed_section_end.h> |
---|
| 14932 | +typedef struct wl_interface_create_v3 { |
---|
| 14933 | + uint16 ver; /**< version of this struct */ |
---|
| 14934 | + uint16 len; /**< length of whole structure including variable length */ |
---|
| 14935 | + uint16 fixed_len; /**< Fixed length of this structure excluding data[] */ |
---|
| 14936 | + uint8 iftype; /**< Type of interface created */ |
---|
| 14937 | + uint8 wlc_index; /**< Optional wlc index */ |
---|
| 14938 | + uint32 flags; /**< flags that defines the operation */ |
---|
| 14939 | + struct ether_addr mac_addr; /**< Optional Mac address */ |
---|
| 14940 | + struct ether_addr bssid; /**< Optional BSSID */ |
---|
| 14941 | + uint8 if_index; /**< interface index requested by Host */ |
---|
| 14942 | + uint8 pad[3]; /**< Padding bytes to ensure data[] is at 32 bit aligned */ |
---|
| 14943 | + uint8 data[]; /**< Optional application/Module specific data */ |
---|
| 14944 | +} wl_interface_create_v3_t; |
---|
| 14945 | + |
---|
| 14946 | +#define WL_INTERFACE_INFO_VER_1 1 |
---|
| 14947 | +#define WL_INTERFACE_INFO_VER_2 2 |
---|
| 14948 | + |
---|
| 14949 | +typedef struct wl_interface_info_v1 { |
---|
| 14950 | + uint16 ver; /**< version of this struct */ |
---|
| 14951 | + struct ether_addr mac_addr; /**< MAC address of the interface */ |
---|
| 14952 | + char ifname[BCM_MSG_IFNAME_MAX]; /**< name of interface */ |
---|
| 14953 | + uint8 bsscfgidx; /**< source bsscfg index */ |
---|
| 14954 | + uint8 PAD; |
---|
| 14955 | +} wl_interface_info_v1_t; |
---|
| 14956 | + |
---|
| 14957 | +typedef struct wl_interface_info_v2 { |
---|
| 14958 | + uint16 ver; /**< version of this struct */ |
---|
| 14959 | + uint16 length; /**< length of the whole structure */ |
---|
| 14960 | + struct ether_addr mac_addr; /**< MAC address of the interface */ |
---|
| 14961 | + uint8 bsscfgidx; /**< source bsscfg index */ |
---|
| 14962 | + uint8 if_index; /**< Interface index allocated by FW */ |
---|
| 14963 | + char ifname[BCM_MSG_IFNAME_MAX]; /**< name of interface */ |
---|
| 14964 | +} wl_interface_info_v2_t; |
---|
| 14965 | + |
---|
| 14966 | +#define PHY_RXIQEST_AVERAGING_DELAY 10 |
---|
| 14967 | + |
---|
| 14968 | +typedef struct wl_iqest_params { |
---|
| 14969 | + uint32 rxiq; |
---|
| 14970 | + uint8 niter; |
---|
| 14971 | + uint8 delay; |
---|
| 14972 | + uint8 PAD[2]; |
---|
| 14973 | +} wl_iqest_params_t; |
---|
| 14974 | + |
---|
| 14975 | +typedef struct wl_iqest_sweep_params { |
---|
| 14976 | + wl_iqest_params_t params; |
---|
| 14977 | + uint8 nchannels; |
---|
| 14978 | + uint8 channel[3]; /** variable */ |
---|
| 14979 | +} wl_iqest_sweep_params_t; |
---|
| 14980 | + |
---|
| 14981 | +typedef struct wl_iqest_value { |
---|
| 14982 | + uint8 channel; |
---|
| 14983 | + uint8 PAD[3]; |
---|
| 14984 | + uint32 rxiq; |
---|
| 14985 | +} wl_iqest_value_t; |
---|
| 14986 | + |
---|
| 14987 | +typedef struct wl_iqest_result { |
---|
| 14988 | + uint8 nvalues; |
---|
| 14989 | + uint8 PAD[3]; |
---|
| 14990 | + wl_iqest_value_t value[1]; |
---|
| 14991 | +} wl_iqest_result_t; |
---|
| 14992 | + |
---|
| 14993 | +#define WL_PRIO_ROAM_PROF_V1 (1u) |
---|
| 14994 | + |
---|
| 14995 | +typedef struct wl_prio_roam_prof_v1 { |
---|
| 14996 | + uint16 version; /* Version info */ |
---|
| 14997 | + uint16 length; /* byte length of this structure */ |
---|
| 14998 | + uint8 prio_roam_mode; /* Roam mode RCC/RCC+Full Scan */ |
---|
| 14999 | + uint8 PAD[3]; |
---|
| 15000 | +} wl_prio_roam_prof_v1_t; |
---|
| 15001 | + |
---|
| 15002 | +typedef enum wl_prio_roam_mode { |
---|
| 15003 | + PRIO_ROAM_MODE_OFF = 0, /* Prio_Roam feature disable */ |
---|
| 15004 | + PRIO_ROAM_MODE_RCC_ONLY = 1, /* Scan RCC list only */ |
---|
| 15005 | + PRIO_ROAM_MODE_RCC_FULLSCAN = 2, /* Scan RCC list + Full scan */ |
---|
| 15006 | + PRIO_ROAM_MODE_FULLSCAN_ONLY = 3 /* Full Scan only */ |
---|
| 15007 | +} wl_prio_roam_mode_t; |
---|
| 15008 | + |
---|
| 15009 | +/* BTCX AIBSS (Oxygen) Status */ |
---|
| 15010 | +/* MC2 strobing status */ |
---|
| 15011 | +typedef struct wlc_btc_aibss_info { |
---|
| 15012 | + uint32 prev_tsf_l; // Lower 32 bits of last read of TSF |
---|
| 15013 | + uint32 prev_tsf_h; // Higher 32 bits of last read of TSF |
---|
| 15014 | + uint32 last_btinfo; // Last read of BT info |
---|
| 15015 | + uint32 local_btinfo; // Local BT INFO BitMap |
---|
| 15016 | + uint8 bt_out_of_sync_cnt; // BT not in sync with strobe |
---|
| 15017 | + uint8 esco_off_cnt; // Count incremented when ESCO is off |
---|
| 15018 | + uint8 strobe_enabled; // Set only in AIBSS mode |
---|
| 15019 | + uint8 strobe_on; // strobe to BT is on for Oxygen |
---|
| 15020 | + uint8 local_bt_in_sync; // Sync status of local BT when strobe is on |
---|
| 15021 | + uint8 other_bt_in_sync; // Sync state of BT in other devices in AIBSS |
---|
| 15022 | + uint8 local_bt_is_master; // Local BT is master |
---|
| 15023 | + uint8 sco_prot_on; // eSCO Protection on in local device |
---|
| 15024 | + uint8 other_esco_present; // eSCO status in other devices in AIBSS |
---|
| 15025 | + uint8 rx_agg_change; // Indicates Rx Agg size needs to change |
---|
| 15026 | + uint8 rx_agg_modified; // Rx Agg size modified |
---|
| 15027 | + uint8 acl_grant_set; // ACL grants on for speeding up sync |
---|
| 15028 | + uint8 write_ie_err_cnt; // BTCX Ie write error cnt |
---|
| 15029 | + uint8 parse_ie_err_cnt; // BTCX IE parse error cnt |
---|
| 15030 | + uint8 wci2_fail_cnt; // WCI2 init failure cnt |
---|
| 15031 | + uint8 strobe_enable_err_cnt; // Strobe enable err cnt |
---|
| 15032 | + uint8 strobe_init_err_cnt; // Strobe init err cnt |
---|
| 15033 | + uint8 tsf_jump_cnt; // TSF jump cnt |
---|
| 15034 | + uint8 acl_grant_cnt; // ALC grant cnt |
---|
| 15035 | + uint8 pad1; |
---|
| 15036 | + uint16 ibss_tsf_shm; // SHM address of strobe TSF |
---|
| 15037 | + uint16 strobe_interval; /**< interval of the strobe */ |
---|
| 15038 | + uint32 strobe_missed_cnt; /**< missed strobe counter */ |
---|
| 15039 | +} wlc_btc_aibss_info_t; |
---|
| 15040 | + |
---|
| 15041 | +#define WLC_BTC_AIBSS_STATUS_VER 1 |
---|
| 15042 | +#define WLC_BTC_AIBSS_STATUS_LEN (sizeof(wlc_btc_aibss_status_t) - 2 * (sizeof(uint16))) |
---|
| 15043 | + |
---|
| 15044 | +typedef struct wlc_btc_aibss_status { |
---|
| 15045 | + uint16 version; // Version # |
---|
| 15046 | + uint16 len; // Length of the structure(excluding len & version) |
---|
| 15047 | + int32 mode; // Current value of btc_mode |
---|
| 15048 | + uint16 bth_period; // bt coex period. read from shm. |
---|
| 15049 | + uint16 agg_off_bm; // AGG OFF BM read from SHM |
---|
| 15050 | + uint8 bth_active; // bt active session |
---|
| 15051 | + uint8 pad[3]; |
---|
| 15052 | + wlc_btc_aibss_info_t aibss_info; // Structure definition above |
---|
| 15053 | +} wlc_btc_aibss_status_t; |
---|
8187 | 15054 | |
---|
8188 | 15055 | typedef enum { |
---|
8189 | 15056 | STATE_NONE = 0, |
---|
.. | .. |
---|
8241 | 15108 | uint8 passphrase_len; |
---|
8242 | 15109 | uint8 passphrase[TBOW_MAX_PASSPHRASE_LEN]; |
---|
8243 | 15110 | chanspec_t chanspec; |
---|
| 15111 | + uint8 PAD[2]; |
---|
| 15112 | + uint32 channel; |
---|
8244 | 15113 | } tbow_setup_netinfo_t; |
---|
8245 | 15114 | |
---|
8246 | 15115 | typedef enum tbow_ho_opmode { |
---|
.. | .. |
---|
8255 | 15124 | } tbow_ho_opmode_t; |
---|
8256 | 15125 | |
---|
8257 | 15126 | /* Beacon trim feature statistics */ |
---|
8258 | | -/* Configuration params */ |
---|
8259 | | -#define M_BCNTRIM_N (0) /* Enable/Disable Beacon Trim */ |
---|
8260 | | -#define M_BCNTRIM_TIMEND (1) /* Waiting time for TIM IE to end */ |
---|
8261 | | -#define M_BCNTRIM_TSFTLRN (2) /* TSF tolerance value (usecs) */ |
---|
8262 | | -/* PSM internal use */ |
---|
8263 | | -#define M_BCNTRIM_PREVBCNLEN (3) /* Beacon length excluding the TIM IE */ |
---|
8264 | | -#define M_BCNTRIM_N_COUNTER (4) /* PSM's local beacon trim counter */ |
---|
8265 | | -#define M_BCNTRIM_STATE (5) /* PSM's Beacon trim status register */ |
---|
8266 | | -#define M_BCNTRIM_TIMLEN (6) /* TIM IE Length */ |
---|
8267 | | -#define M_BCNTRIM_BMPCTL (7) /* Bitmap control word */ |
---|
8268 | | -#define M_BCNTRIM_TSF_L (8) /* Lower TSF word */ |
---|
8269 | | -#define M_BCNTRIM_TSF_ML (9) /* Lower middle TSF word */ |
---|
8270 | | -#define M_BCNTRIM_RSSI (10) /* Partial beacon RSSI */ |
---|
8271 | | -#define M_BCNTRIM_CHANNEL (11) /* Partial beacon channel */ |
---|
8272 | | -/* Trimming Counters */ |
---|
8273 | | -#define M_BCNTRIM_SBCNRXED (12) /* Self-BSSID beacon received */ |
---|
8274 | | -#define M_BCNTRIM_CANTRIM (13) /* Num of beacons which can be trimmed */ |
---|
8275 | | -#define M_BCNTRIM_TRIMMED (14) /* # beacons which were trimmed */ |
---|
8276 | | -#define M_BCNTRIM_BCNLENCNG (15) /* # beacons trimmed due to length change */ |
---|
8277 | | -#define M_BCNTRIM_TSFADJ (16) /* # beacons not trimmed due to large TSF delta */ |
---|
8278 | | -#define M_BCNTRIM_TIMNOTFOUND (17) /* # beacons not trimmed due to TIM missing */ |
---|
8279 | | -#define M_RXTSFTMRVAL_WD0 (18) |
---|
8280 | | -#define M_RXTSFTMRVAL_WD1 (19) |
---|
8281 | | -#define M_RXTSFTMRVAL_WD2 (20) |
---|
8282 | | -#define M_RXTSFTMRVAL_WD3 (21) |
---|
8283 | | -#define BCNTRIM_STATS_NUMPARAMS (22) /* 16 bit words */ |
---|
| 15127 | +/* configuration */ |
---|
| 15128 | +#define BCNTRIMST_PER 0 /* Number of beacons to trim (0: disable) */ |
---|
| 15129 | +#define BCNTRIMST_TIMEND 1 /* Number of bytes till TIM IE */ |
---|
| 15130 | +#define BCNTRIMST_TSFLMT 2 /* TSF tolerance value (usecs) */ |
---|
| 15131 | +/* internal use */ |
---|
| 15132 | +#define BCNTRIMST_CUR 3 /* PSM's local beacon trim counter */ |
---|
| 15133 | +#define BCNTRIMST_PREVLEN 4 /* Beacon length excluding the TIM IE */ |
---|
| 15134 | +#define BCNTRIMST_TIMLEN 5 /* TIM IE Length */ |
---|
| 15135 | +#define BCNTRIMST_RSSI 6 /* Partial beacon RSSI */ |
---|
| 15136 | +#define BCNTRIMST_CHAN 7 /* Partial beacon channel */ |
---|
| 15137 | +/* debug stat (off by default) */ |
---|
| 15138 | +#define BCNTRIMST_DUR 8 /* RX duration until beacon trimmed */ |
---|
| 15139 | +#define BCNTRIMST_RXMBSS 9 /* MYBSSID beacon received */ |
---|
| 15140 | +#define BCNTRIMST_CANTRIM 10 /* # beacons which were trimmed */ |
---|
| 15141 | +#define BCNTRIMST_LENCHG 11 /* # beacons not trimmed due to length change */ |
---|
| 15142 | +#define BCNTRIMST_TSFDRF 12 /* # beacons not trimmed due to large TSF delta */ |
---|
| 15143 | +#define BCNTRIMST_NOTIM 13 /* # beacons not trimmed due to TIM missing */ |
---|
8284 | 15144 | |
---|
| 15145 | +#define BCNTRIMST_NUM 14 |
---|
| 15146 | + |
---|
| 15147 | +#define WL_BCNTRIM_STATUS_VERSION_1 1 |
---|
| 15148 | +typedef struct wl_bcntrim_status_query_v1 { |
---|
| 15149 | + uint16 version; |
---|
| 15150 | + uint16 len; /* Total length includes fixed fields */ |
---|
| 15151 | + uint8 reset; /* reset after reading the stats */ |
---|
| 15152 | + uint8 pad[3]; /* 4-byte alignment */ |
---|
| 15153 | +} wl_bcntrim_status_query_v1_t; |
---|
| 15154 | + |
---|
| 15155 | +typedef struct wl_bcntrim_status_v1 { |
---|
| 15156 | + uint16 version; |
---|
| 15157 | + uint16 len; /* Total length includes fixed fields and variable data[] */ |
---|
| 15158 | + uint8 curr_slice_id; /* slice index of the interface */ |
---|
| 15159 | + uint8 applied_cfg; /* applied bcntrim N threshold */ |
---|
| 15160 | + uint8 pad[2]; /* 4-byte alignment */ |
---|
| 15161 | + uint32 fw_status; /* Bits representing bcntrim disable reason in FW */ |
---|
| 15162 | + uint32 total_disable_dur; /* total duration (msec) bcntrim remains |
---|
| 15163 | + disabled due to FW disable reasons |
---|
| 15164 | + */ |
---|
| 15165 | + uint32 data[]; /* variable length data containing stats */ |
---|
| 15166 | +} wl_bcntrim_status_v1_t; |
---|
| 15167 | + |
---|
| 15168 | +#define BCNTRIM_STATS_MAX 10 /* Total stats part of the status data[] */ |
---|
| 15169 | + |
---|
| 15170 | +/* Bits for FW status */ |
---|
| 15171 | +#define WL_BCNTRIM_DISABLE_HOST 0x1 /* Host disabled bcntrim through bcntrim IOVar */ |
---|
| 15172 | +#define WL_BCNTRIM_DISABLE_PHY_RATE 0x2 /* bcntrim disabled because beacon rx rate is |
---|
| 15173 | + * higher than phy_rate_thresh |
---|
| 15174 | + */ |
---|
| 15175 | +#define WL_BCNTRIM_DISABLE_QUIET_IE 0x4 /* bcntrim disable when Quiet IE present */ |
---|
| 15176 | +#define WL_BCNTRIM_DISABLE_QBSSLOAD_IE 0x8 /* bcntrim disable when QBSS Load IE present */ |
---|
| 15177 | +#define WL_BCNTRIM_DISABLE_OPERMODE_IE 0x10 /* bcntrim dsiable when opermode IE is present */ |
---|
| 15178 | +#define WL_BCNTRIM_DISABLE_CSA_IE 0x20 /* bcntrim dsiable when CSA IE is present */ |
---|
| 15179 | + |
---|
| 15180 | +#define BCNTRIM_DISABLE_THRESHOLD_TIME 1000 * 10 /* enable bcntrim after a threshold (10sec) |
---|
| 15181 | + * when disabled due to above mentioned IE's |
---|
| 15182 | + */ |
---|
| 15183 | +#define WL_BCNTRIM_CFG_VERSION_1 1 |
---|
| 15184 | +/* Common IOVAR struct */ |
---|
| 15185 | +typedef struct wl_bcntrim_cfg_v1 { |
---|
| 15186 | + uint16 version; |
---|
| 15187 | + uint16 len; /* Total length includes fixed fields and variable data[] */ |
---|
| 15188 | + uint16 subcmd_id; /* subcommand id */ |
---|
| 15189 | + uint16 pad; /* pad/reserved */ |
---|
| 15190 | + uint8 data[]; /* subcommand data; could be empty */ |
---|
| 15191 | +} wl_bcntrim_cfg_v1_t; |
---|
| 15192 | + |
---|
| 15193 | +/* subcommands ids */ |
---|
| 15194 | +enum { |
---|
| 15195 | + WL_BCNTRIM_CFG_SUBCMD_PHY_RATE_THRESH = 0, /* PHY rate threshold above |
---|
| 15196 | + which bcntrim is not applied |
---|
| 15197 | + */ |
---|
| 15198 | + WL_BCNTRIM_CFG_SUBCMD_OVERRIDE_DISABLE_MASK = 1, /* Override bcntrim disable reasons */ |
---|
| 15199 | + WL_BCNTRIM_CFG_SUBCMD_TSF_DRIFT_LIMIT = 2 /* TSF drift limit to consider bcntrim */ |
---|
| 15200 | +}; |
---|
| 15201 | + |
---|
| 15202 | +#define BCNTRIM_MAX_PHY_RATE 48 /* in 500Kbps */ |
---|
| 15203 | +#define BCNTRIM_MAX_TSF_DRIFT 65535 /* in usec */ |
---|
| 15204 | +#define WL_BCNTRIM_OVERRIDE_DISABLE_MASK \ |
---|
| 15205 | + (WL_BCNTRIM_DISABLE_QUIET_IE | WL_BCNTRIM_DISABLE_QBSSLOAD_IE) |
---|
| 15206 | + |
---|
| 15207 | +/* WL_BCNTRIM_CFG_SUBCMD_PHY_RATE_TRESH */ |
---|
| 15208 | +typedef struct wl_bcntrim_cfg_phy_rate_thresh { |
---|
| 15209 | + uint32 rate; /* beacon rate (in 500kbps units) */ |
---|
| 15210 | +} wl_bcntrim_cfg_phy_rate_thresh_t; |
---|
| 15211 | + |
---|
| 15212 | +/* WL_BCNTRIM_CFG_SUBCMD_OVERRIDE_DISABLE_MASK */ |
---|
| 15213 | +typedef struct wl_bcntrim_cfg_override_disable_mask { |
---|
| 15214 | + uint32 mask; /* bits representing individual disable reason to override */ |
---|
| 15215 | +} wl_bcntrim_cfg_override_disable_mask_t; |
---|
| 15216 | + |
---|
| 15217 | +/* WL_BCNTRIM_CFG_SUBCMD_TSF_DRIFT_LIMIT */ |
---|
| 15218 | +typedef struct wl_bcntrim_cfg_tsf_drift_limit { |
---|
| 15219 | + uint16 drift; /* tsf drift limit specified in usec */ |
---|
| 15220 | + uint8 pad[2]; /* 4-byte alignment */ |
---|
| 15221 | +} wl_bcntrim_cfg_tsf_drift_limit_t; |
---|
| 15222 | + |
---|
| 15223 | +/* -------------- TX Power Cap --------------- */ |
---|
8285 | 15224 | #define TXPWRCAP_MAX_NUM_CORES 8 |
---|
8286 | 15225 | #define TXPWRCAP_MAX_NUM_ANTENNAS (TXPWRCAP_MAX_NUM_CORES * 2) |
---|
| 15226 | + |
---|
| 15227 | +#define TXPWRCAP_MAX_NUM_CORES_V3 4 |
---|
| 15228 | +#define TXPWRCAP_MAX_NUM_ANTENNAS_V3 (TXPWRCAP_MAX_NUM_CORES_V3 * 2) |
---|
| 15229 | + |
---|
| 15230 | +#define TXPWRCAP_NUM_SUBBANDS 5 |
---|
| 15231 | +#define TXPWRCAP_MAX_NUM_SUBGRPS 10 |
---|
| 15232 | + |
---|
| 15233 | +/* IOVAR txcapconfig enum's */ |
---|
| 15234 | +#define TXPWRCAPCONFIG_WCI2 0u |
---|
| 15235 | +#define TXPWRCAPCONFIG_HOST 1u |
---|
| 15236 | +#define TXPWRCAPCONFIG_WCI2_AND_HOST 2u |
---|
| 15237 | +#define TXPWRCAPCONFIG_NONE 0xFFu |
---|
| 15238 | + |
---|
| 15239 | +/* IOVAR txcapstate enum's */ |
---|
| 15240 | +#define TXPWRCAPSTATE_LOW_CAP 0 |
---|
| 15241 | +#define TXPWRCAPSTATE_HIGH_CAP 1 |
---|
| 15242 | +#define TXPWRCAPSTATE_HOST_LOW_WCI2_LOW_CAP 0 |
---|
| 15243 | +#define TXPWRCAPSTATE_HOST_LOW_WCI2_HIGH_CAP 1 |
---|
| 15244 | +#define TXPWRCAPSTATE_HOST_HIGH_WCI2_LOW_CAP 2 |
---|
| 15245 | +#define TXPWRCAPSTATE_HOST_HIGH_WCI2_HIGH_CAP 3 |
---|
| 15246 | + |
---|
| 15247 | +/* IOVAR txcapconfig and txcapstate structure is shared: SET and GET */ |
---|
| 15248 | +#define TXPWRCAPCTL_VERSION 2 |
---|
| 15249 | +#define TXPWRCAPCTL_VERSION_3 3 |
---|
| 15250 | + |
---|
| 15251 | +typedef struct wl_txpwrcap_ctl { |
---|
| 15252 | + uint8 version; |
---|
| 15253 | + uint8 ctl[TXPWRCAP_NUM_SUBBANDS]; |
---|
| 15254 | +} wl_txpwrcap_ctl_t; |
---|
| 15255 | + |
---|
| 15256 | +typedef struct wl_txpwrcap_ctl_v3 { |
---|
| 15257 | + uint8 version; |
---|
| 15258 | + uint8 ctl[TXPWRCAP_MAX_NUM_SUBGRPS]; |
---|
| 15259 | +} wl_txpwrcap_ctl_v3_t; |
---|
| 15260 | + |
---|
| 15261 | +/* IOVAR txcapdump structure: GET only */ |
---|
| 15262 | +#define TXPWRCAP_DUMP_VERSION 2 |
---|
| 15263 | +typedef struct wl_txpwrcap_dump { |
---|
| 15264 | + uint8 version; |
---|
| 15265 | + uint8 pad0; |
---|
| 15266 | + uint8 current_country[2]; |
---|
| 15267 | + uint32 current_channel; |
---|
| 15268 | + uint8 config[TXPWRCAP_NUM_SUBBANDS]; |
---|
| 15269 | + uint8 state[TXPWRCAP_NUM_SUBBANDS]; |
---|
| 15270 | + uint8 high_cap_state_enabled; |
---|
| 15271 | + uint8 wci2_cell_status_last; |
---|
| 15272 | + uint8 download_present; |
---|
| 15273 | + uint8 num_subbands; |
---|
| 15274 | + uint8 num_antennas; |
---|
| 15275 | + uint8 num_antennas_per_core[TXPWRCAP_MAX_NUM_CORES]; |
---|
| 15276 | + uint8 num_cc_groups; |
---|
| 15277 | + uint8 current_country_cc_group_info_index; |
---|
| 15278 | + int8 low_cap[TXPWRCAP_MAX_NUM_ANTENNAS*TXPWRCAP_NUM_SUBBANDS]; |
---|
| 15279 | + int8 high_cap[TXPWRCAP_MAX_NUM_ANTENNAS*TXPWRCAP_NUM_SUBBANDS]; |
---|
| 15280 | + uint8 PAD[3]; |
---|
| 15281 | +} wl_txpwrcap_dump_t; |
---|
| 15282 | + |
---|
| 15283 | +typedef struct wl_txpwrcap_dump_v3 { |
---|
| 15284 | + uint8 version; |
---|
| 15285 | + uint8 pad0; |
---|
| 15286 | + uint8 current_country[2]; |
---|
| 15287 | + uint32 current_channel; |
---|
| 15288 | + uint8 config[TXPWRCAP_NUM_SUBBANDS]; |
---|
| 15289 | + uint8 state[TXPWRCAP_NUM_SUBBANDS]; |
---|
| 15290 | + uint8 high_cap_state_enabled; |
---|
| 15291 | + uint8 wci2_cell_status_last; |
---|
| 15292 | + uint8 download_present; |
---|
| 15293 | + uint8 num_subbands; |
---|
| 15294 | + uint8 num_antennas; |
---|
| 15295 | + uint8 num_antennas_per_core[TXPWRCAP_MAX_NUM_CORES]; |
---|
| 15296 | + uint8 num_cc_groups; |
---|
| 15297 | + uint8 current_country_cc_group_info_index; |
---|
| 15298 | + uint8 cap_states_per_cc_group; |
---|
| 15299 | + int8 host_low_wci2_low_cap[TXPWRCAP_MAX_NUM_ANTENNAS*TXPWRCAP_NUM_SUBBANDS]; |
---|
| 15300 | + int8 host_low_wci2_high_cap[TXPWRCAP_MAX_NUM_ANTENNAS*TXPWRCAP_NUM_SUBBANDS]; |
---|
| 15301 | + int8 host_high_wci2_low_cap[TXPWRCAP_MAX_NUM_ANTENNAS*TXPWRCAP_NUM_SUBBANDS]; |
---|
| 15302 | + int8 host_high_wci2_high_cap[TXPWRCAP_MAX_NUM_ANTENNAS*TXPWRCAP_NUM_SUBBANDS]; |
---|
| 15303 | + uint8 PAD[2]; |
---|
| 15304 | +} wl_txpwrcap_dump_v3_t; |
---|
| 15305 | + |
---|
| 15306 | +/* |
---|
| 15307 | +* Capability flag for wl_txpwrcap_tbl_v2_t and wl_txpwrcap_t |
---|
| 15308 | +* The index into pwrs will be: 0: onbody-cck, 1: onbody-ofdm, 2:offbody-cck, 3:offbody-ofdm |
---|
| 15309 | +* |
---|
| 15310 | +* For 5G power in SDB case as well as for non-SDB case, the value of flag will be: CAP_ONOFF_BODY |
---|
| 15311 | +* The index into pwrs will be: 0: onbody, 1: offbody-ofdm |
---|
| 15312 | +*/ |
---|
| 15313 | + |
---|
| 15314 | +#define CAP_ONOFF_BODY (0x1) /* on/off body only */ |
---|
| 15315 | +#define CAP_CCK_OFDM (0x2) /* cck/ofdm capability only */ |
---|
| 15316 | +#define CAP_LTE_CELL (0x4) /* cell on/off capability; required for iOS builds */ |
---|
| 15317 | +#define CAP_HEAD_BODY (0x8) /* head/body capability */ |
---|
| 15318 | +#define CAP_2G_DEPON_5G (0x10) /* 2G pwr caps depend on other slice 5G subband */ |
---|
| 15319 | +#define CAP_SISO_MIMO (0x20) /* Siso/Mimo Separate Power Caps */ |
---|
| 15320 | +#define CAP_ANT_TX (0x40) /* Separate Power Caps based on cell ant tx value */ |
---|
| 15321 | +#define CAP_ONOFF_BODY_CCK_OFDM (CAP_ONOFF_BODY | CAP_CCK_OFDM) |
---|
| 15322 | +#define CAP_TXPWR_ALL (CAP_ONOFF_BODY|CAP_CCK_OFDM|CAP_LTE_CELL|\ |
---|
| 15323 | + CAP_SISO_MIMO|CAP_HEAD_BODY|CAP_ANT_TX) |
---|
| 15324 | + |
---|
| 15325 | +#define TXHDR_SEC_MAX 5u /* Deprecated. Kept till removed in all branches */ |
---|
| 15326 | +#define TXPWRCAP_MAX_STATES 4u |
---|
| 15327 | +#define TXPWRCAP_MAX_STATES_V3 10u |
---|
| 15328 | +#define TXPWRCAP_CCKOFDM_ONOFFBODY_MAX_STATES 4u |
---|
| 15329 | +#define TXPWRCAP_ONOFFBODY_MAX_STATES 2u |
---|
| 15330 | +#define TXPWRCAP_ONOFFCELL_MAX_STATES 2u |
---|
| 15331 | + |
---|
| 15332 | +#define TXHDR_SEC_NONSDB_MAIN_2G 0 |
---|
| 15333 | +#define TXHDR_SEC_NONSDB_MAIN_5G 1 |
---|
| 15334 | +#define TXHDR_SEC_NONSDB_AUX_2G 2 |
---|
| 15335 | +#define TXHDR_SEC_NONSDB_AUX_5G 3 |
---|
| 15336 | +#define TXHDR_SEC_SDB_MAIN_2G 4 |
---|
| 15337 | +#define TXHDR_SEC_SDB_MAIN_5G 5 |
---|
| 15338 | +#define TXHDR_SEC_SDB_AUX_2G 6 |
---|
| 15339 | +#define TXHDR_SEC_SDB_AUX_5G 7 |
---|
| 15340 | +#define TXHDR_MAX_SECTION 8 |
---|
| 15341 | + |
---|
| 15342 | +#define WL_TXPWRCAP_MAX_SLICES 2 |
---|
| 15343 | +#define WL_TXPWRCAPDUMP_VER 4 |
---|
| 15344 | + |
---|
| 15345 | +#define WL_TXPWRCAP_VERSION_2 2 |
---|
| 15346 | +#define WL_TXPWRCAP_VERSION_3 3 |
---|
| 15347 | + |
---|
| 15348 | +typedef struct wl_txpwrcap { |
---|
| 15349 | + uint8 capability; |
---|
| 15350 | + uint8 num_cap_states; |
---|
| 15351 | + uint8 section; /* Index from above,eg. TXHDR_SEC_NONSDB */ |
---|
| 15352 | + int8 pwrs[][TXPWRCAP_NUM_SUBBANDS][TXPWRCAP_MAX_NUM_CORES]; |
---|
| 15353 | +} wl_txpwrcap_t; |
---|
| 15354 | + |
---|
| 15355 | +typedef struct { |
---|
| 15356 | + uint8 capability; |
---|
| 15357 | + uint8 num_cap_states; |
---|
| 15358 | + uint8 num_subgrps; |
---|
| 15359 | + uint8 section; /* Index from above,eg. TXHDR_SEC_NONSDB */ |
---|
| 15360 | + int8 pwrs[][TXPWRCAP_MAX_NUM_SUBGRPS][TXPWRCAP_MAX_NUM_ANTENNAS_V3]; |
---|
| 15361 | +} wl_txpwrcap_v2_t; |
---|
| 15362 | + |
---|
| 15363 | +#define TXPWRCAP_DUMP_VERSION_4 4 |
---|
| 15364 | +#define TXPWRCAP_DUMP_VERSION_5 5 |
---|
| 15365 | + |
---|
| 15366 | +typedef struct wl_txpwrcap_dump_v4 { |
---|
| 15367 | + uint8 version; |
---|
| 15368 | + uint8 num_pwrcap; |
---|
| 15369 | + uint8 current_country[2]; |
---|
| 15370 | + uint32 current_channel; |
---|
| 15371 | + uint8 download_present; |
---|
| 15372 | + uint8 num_cores; /* number cores on slice */ |
---|
| 15373 | + uint8 num_cc_groups; /* number cc groups */ |
---|
| 15374 | + uint8 current_country_cc_group_info_index; |
---|
| 15375 | + /* first power cap always exist |
---|
| 15376 | + * On main,-non-sdb follows by sdb2g and then sdb5g |
---|
| 15377 | + * On aux slice - aux2g then aux5g. |
---|
| 15378 | + */ |
---|
| 15379 | + wl_txpwrcap_t pwrcap; /* first power cap */ |
---|
| 15380 | +} wl_txpwrcap_dump_v4_t; |
---|
| 15381 | + |
---|
| 15382 | +typedef struct wl_txpwrcap_dump_v5 { |
---|
| 15383 | + uint8 version; |
---|
| 15384 | + uint8 num_pwrcap; |
---|
| 15385 | + uint8 current_country[2]; |
---|
| 15386 | + uint8 current_channel; |
---|
| 15387 | + uint8 high_cap_state_enabled; |
---|
| 15388 | + uint8 reserved[2]; |
---|
| 15389 | + uint8 download_present; |
---|
| 15390 | + uint8 num_ants; /* number antenna slice */ |
---|
| 15391 | + uint8 num_cc_groups; /* number cc groups */ |
---|
| 15392 | + uint8 current_country_cc_group_info_index; |
---|
| 15393 | + uint8 ant_tx; /* current value of ant_tx */ |
---|
| 15394 | + uint8 cell_status; /* current value of cell status */ |
---|
| 15395 | + int8 pwrcap[]; /* variable size power caps (wl_txpwrcap_v2_t) */ |
---|
| 15396 | +} wl_txpwrcap_dump_v5_t; |
---|
8287 | 15397 | |
---|
8288 | 15398 | typedef struct wl_txpwrcap_tbl { |
---|
8289 | 15399 | uint8 num_antennas_per_core[TXPWRCAP_MAX_NUM_CORES]; |
---|
.. | .. |
---|
8292 | 15402 | int8 pwrcap_cell_off[TXPWRCAP_MAX_NUM_ANTENNAS]; /* qdBm units */ |
---|
8293 | 15403 | } wl_txpwrcap_tbl_t; |
---|
8294 | 15404 | |
---|
8295 | | -/* -------------- dynamic BTCOEX --------------- */ |
---|
8296 | | -/* require strict packing */ |
---|
8297 | | -#include <packed_section_start.h> |
---|
| 15405 | +typedef struct wl_txpwrcap_tbl_v2 { |
---|
| 15406 | + uint8 version; |
---|
| 15407 | + uint8 length; /* size of entire structure, including the pwrs */ |
---|
| 15408 | + uint8 capability; /* capability bitmap */ |
---|
| 15409 | + uint8 num_cores; /* number of cores i.e. entries in each cap state row */ |
---|
| 15410 | + /* |
---|
| 15411 | + * pwrs array has TXPWRCAP_MAX_STATES rows - one for each cap state. |
---|
| 15412 | + * Each row has up to TXPWRCAP_MAX_NUM_CORES entries - one for each core. |
---|
| 15413 | + */ |
---|
| 15414 | + uint8 pwrs[][TXPWRCAP_MAX_NUM_CORES]; /* qdBm units */ |
---|
| 15415 | +} wl_txpwrcap_tbl_v2_t; |
---|
8298 | 15416 | |
---|
8299 | | -#define DCTL_TROWS 2 /* currently practical number of rows */ |
---|
8300 | | -#define DCTL_TROWS_MAX 4 /* 2 extra rows RFU */ |
---|
| 15417 | +typedef struct wl_txpwrcap_tbl_v3 { |
---|
| 15418 | + uint8 version; |
---|
| 15419 | + uint8 length; /* size of entire structure, including the pwrs */ |
---|
| 15420 | + uint8 capability; /* capability bitmap */ |
---|
| 15421 | + uint8 num_cores; /* number of cores */ |
---|
| 15422 | + uint8 num_antennas_per_core[TXPWRCAP_MAX_NUM_CORES_V3]; |
---|
| 15423 | + /* |
---|
| 15424 | + * pwrs array has TXPWRCAP_MAX_STATES rows - one for each cap state. |
---|
| 15425 | + * Each row has up to TXPWRCAP_MAX_NUM_ANTENNAS entries - for each antenna. |
---|
| 15426 | + * Included in the rows of powers are rows for fail safe. |
---|
| 15427 | + */ |
---|
| 15428 | + int8 pwrs[][TXPWRCAP_MAX_NUM_ANTENNAS_V3]; /* qdBm units */ |
---|
| 15429 | +} wl_txpwrcap_tbl_v3_t; |
---|
| 15430 | + |
---|
| 15431 | +/* ##### Ecounters section ##### */ |
---|
| 15432 | +#define ECOUNTERS_VERSION_1 1 |
---|
| 15433 | + |
---|
| 15434 | +/* Input structure for ecounters IOVAR */ |
---|
| 15435 | +typedef struct ecounters_config_request { |
---|
| 15436 | + uint16 version; /* config version */ |
---|
| 15437 | + uint16 set; /* Set where data will go. */ |
---|
| 15438 | + uint16 size; /* Size of the set. */ |
---|
| 15439 | + uint16 timeout; /* timeout in seconds. */ |
---|
| 15440 | + uint16 num_events; /* Number of events to report. */ |
---|
| 15441 | + uint16 ntypes; /* Number of entries in type array. */ |
---|
| 15442 | + uint16 type[1]; /* Statistics Types (tags) to retrieve. */ |
---|
| 15443 | +} ecounters_config_request_t; |
---|
| 15444 | + |
---|
| 15445 | +#define ECOUNTERS_EVENTMSGS_VERSION_1 1 |
---|
| 15446 | +#define ECOUNTERS_TRIGGER_CONFIG_VERSION_1 1 |
---|
| 15447 | + |
---|
| 15448 | +#define ECOUNTERS_EVENTMSGS_EXT_MASK_OFFSET \ |
---|
| 15449 | + OFFSETOF(ecounters_eventmsgs_ext_t, mask[0]) |
---|
| 15450 | + |
---|
| 15451 | +#define ECOUNTERS_TRIG_CONFIG_TYPE_OFFSET \ |
---|
| 15452 | + OFFSETOF(ecounters_trigger_config_t, type[0]) |
---|
| 15453 | + |
---|
| 15454 | +typedef struct ecounters_eventmsgs_ext { |
---|
| 15455 | + uint8 version; |
---|
| 15456 | + uint8 len; |
---|
| 15457 | + uint8 mask[1]; |
---|
| 15458 | +} ecounters_eventmsgs_ext_t; |
---|
| 15459 | + |
---|
| 15460 | +typedef struct ecounters_trigger_config { |
---|
| 15461 | + uint16 version; /* version */ |
---|
| 15462 | + uint16 set; /* set where data should go */ |
---|
| 15463 | + uint16 rsvd; /* reserved */ |
---|
| 15464 | + uint16 pad; /* pad/reserved */ |
---|
| 15465 | + uint16 ntypes; /* number of types/tags */ |
---|
| 15466 | + uint16 type[1]; /* list of types */ |
---|
| 15467 | +} ecounters_trigger_config_t; |
---|
| 15468 | + |
---|
| 15469 | +#define ECOUNTERS_TRIGGER_REASON_VERSION_1 1 |
---|
| 15470 | +typedef enum { |
---|
| 15471 | + /* Triggered due to timer based ecounters */ |
---|
| 15472 | + ECOUNTERS_TRIGGER_REASON_TIMER = 0, |
---|
| 15473 | + /* Triggered due to event based configuration */ |
---|
| 15474 | + ECOUNTERS_TRIGGER_REASON_EVENTS = 1, |
---|
| 15475 | + ECOUNTERS_TRIGGER_REASON_D2H_EVENTS = 2, |
---|
| 15476 | + ECOUNTERS_TRIGGER_REASON_H2D_EVENTS = 3, |
---|
| 15477 | + ECOUNTERS_TRIGGER_REASON_USER_EVENTS = 4, |
---|
| 15478 | + ECOUNTERS_TRIGGER_REASON_MAX = 5 |
---|
| 15479 | +} ecounters_trigger_reasons_list_t; |
---|
| 15480 | + |
---|
| 15481 | +typedef struct ecounters_trigger_reason { |
---|
| 15482 | + uint16 version; /* version */ |
---|
| 15483 | + uint16 trigger_reason; /* trigger reason */ |
---|
| 15484 | + uint32 sub_reason_code; /* sub reason code */ |
---|
| 15485 | + uint32 trigger_time_now; /* time in ms at trigger */ |
---|
| 15486 | + uint32 host_ref_time; /* host ref time */ |
---|
| 15487 | +} ecounters_trigger_reason_t; |
---|
| 15488 | + |
---|
| 15489 | +#define WL_LQM_VERSION_1 1 |
---|
| 15490 | + |
---|
| 15491 | +/* For wl_lqm_t flags field */ |
---|
| 15492 | +#define WL_LQM_CURRENT_BSS_VALID 0x1 |
---|
| 15493 | +#define WL_LQM_TARGET_BSS_VALID 0x2 |
---|
| 15494 | + |
---|
| 15495 | +#define WL_PERIODIC_COMPACT_CNTRS_VER_1 (1) |
---|
| 15496 | +#define WL_PERIODIC_TXBF_CNTRS_VER_1 (1) |
---|
| 15497 | +typedef struct { |
---|
| 15498 | + uint16 version; |
---|
| 15499 | + uint16 pad; |
---|
| 15500 | + /* taken from wl_wlc_cnt_t */ |
---|
| 15501 | + uint32 txfail; |
---|
| 15502 | + /* taken from wl_cnt_ge40mcst_v1_t */ |
---|
| 15503 | + uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, |
---|
| 15504 | + * Control Management (includes retransmissions) |
---|
| 15505 | + */ |
---|
| 15506 | + uint32 txrtsfrm; /**< number of RTS sent out by the MAC */ |
---|
| 15507 | + uint32 txctsfrm; /**< number of CTS sent out by the MAC */ |
---|
| 15508 | + uint32 txback; /**< blockack txcnt */ |
---|
| 15509 | + uint32 txucast; /**< number of unicast tx expecting response other than cts/cwcts */ |
---|
| 15510 | + uint32 txnoack; /**< dot11ACKFailureCount */ |
---|
| 15511 | + uint32 txframe; /**< tx data frames */ |
---|
| 15512 | + uint32 txretrans; /**< tx mac retransmits */ |
---|
| 15513 | + uint32 txpspoll; /**< Number of TX PS-poll */ |
---|
| 15514 | + |
---|
| 15515 | + uint32 rxrsptmout; /**< number of response timeouts for transmitted frames |
---|
| 15516 | + * expecting a response |
---|
| 15517 | + */ |
---|
| 15518 | + uint32 txrtsfail; /**< number of rts transmission failure that reach retry limit */ |
---|
| 15519 | + uint32 rxstrt; /**< number of received frames with a good PLCP */ |
---|
| 15520 | + uint32 rxbadplcp; /**< number of parity check of the PLCP header failed */ |
---|
| 15521 | + uint32 rxcrsglitch; /**< PHY was able to correlate the preamble but not the header */ |
---|
| 15522 | + uint32 rxnodelim; /**< number of no valid delimiter detected by ampdu parser */ |
---|
| 15523 | + uint32 bphy_badplcp; /**< number of bad PLCP reception on BPHY rate */ |
---|
| 15524 | + uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ |
---|
| 15525 | + uint32 rxbadfcs; /**< number of frames for which the CRC check failed in the MAC */ |
---|
| 15526 | + uint32 rxf0ovfl; /**< number of receive fifo 0 overflows */ |
---|
| 15527 | + uint32 rxf1ovfl; /**< number of receive fifo 0 overflows */ |
---|
| 15528 | + uint32 rxhlovfl; /**< number of length / header fifo overflows */ |
---|
| 15529 | + uint32 rxrtsucast; /**< number of unicast RTS addressed to the MAC (good FCS) */ |
---|
| 15530 | + uint32 rxctsucast; /**< number of unicast CTS addressed to the MAC (good FCS) */ |
---|
| 15531 | + uint32 rxackucast; /**< number of ucast ACKS received (good FCS) */ |
---|
| 15532 | + uint32 rxback; /**< blockack rxcnt */ |
---|
| 15533 | + uint32 rxbeaconmbss; /**< beacons received from member of BSS */ |
---|
| 15534 | + uint32 rxdtucastmbss; /**< number of received DATA frames with good FCS and matching RA */ |
---|
| 15535 | + uint32 rxbeaconobss; /**< beacons received from other BSS */ |
---|
| 15536 | + uint32 rxdtucastobss; /**< number of unicast frames addressed to the MAC from |
---|
| 15537 | + * other BSS (WDS FRAME) |
---|
| 15538 | + */ |
---|
| 15539 | + uint32 rxdtocast; /**< number of received DATA frames (good FCS and no matching RA) */ |
---|
| 15540 | + uint32 rxrtsocast; /**< number of received RTS not addressed to the MAC */ |
---|
| 15541 | + uint32 rxctsocast; /**< number of received CTS not addressed to the MAC */ |
---|
| 15542 | + uint32 rxdtmcast; /**< number of RX Data multicast frames received by the MAC */ |
---|
| 15543 | + uint32 rxmpdu_mu; /**< Number of MU MPDUs received */ |
---|
| 15544 | + uint32 rxtoolate; /**< receive too late */ |
---|
| 15545 | + uint32 rxframe; /**< rx data frames */ |
---|
| 15546 | + uint32 lqcm_report; /**< lqcm metric tx/rx idx */ |
---|
| 15547 | + uint32 tx_toss_cnt; /* number of tx packets tossed */ |
---|
| 15548 | + uint32 rx_toss_cnt; /* number of rx packets tossed */ |
---|
| 15549 | + uint32 last_tx_toss_rsn; /* reason because of which last tx pkt tossed */ |
---|
| 15550 | + uint32 last_rx_toss_rsn; /* reason because of which last rx pkt tossed */ |
---|
| 15551 | + uint32 txbcnfrm; /**< beacons transmitted */ |
---|
| 15552 | +} wl_periodic_compact_cntrs_v1_t; |
---|
| 15553 | + |
---|
| 15554 | +#define WL_PERIODIC_COMPACT_CNTRS_VER_2 (2) |
---|
| 15555 | +typedef struct { |
---|
| 15556 | + uint16 version; |
---|
| 15557 | + uint16 pad; |
---|
| 15558 | + /* taken from wl_wlc_cnt_t */ |
---|
| 15559 | + uint32 txfail; |
---|
| 15560 | + /* taken from wl_cnt_ge40mcst_v1_t */ |
---|
| 15561 | + uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, |
---|
| 15562 | + * Control Management (includes retransmissions) |
---|
| 15563 | + */ |
---|
| 15564 | + uint32 txrtsfrm; /**< number of RTS sent out by the MAC */ |
---|
| 15565 | + uint32 txctsfrm; /**< number of CTS sent out by the MAC */ |
---|
| 15566 | + uint32 txback; /**< blockack txcnt */ |
---|
| 15567 | + uint32 txucast; /**< number of unicast tx expecting response other than cts/cwcts */ |
---|
| 15568 | + uint32 txnoack; /**< dot11ACKFailureCount */ |
---|
| 15569 | + uint32 txframe; /**< tx data frames */ |
---|
| 15570 | + uint32 txretrans; /**< tx mac retransmits */ |
---|
| 15571 | + uint32 txpspoll; /**< Number of TX PS-poll */ |
---|
| 15572 | + |
---|
| 15573 | + uint32 rxrsptmout; /**< number of response timeouts for transmitted frames |
---|
| 15574 | + * expecting a response |
---|
| 15575 | + */ |
---|
| 15576 | + uint32 txrtsfail; /**< number of rts transmission failure that reach retry limit */ |
---|
| 15577 | + uint32 rxstrt; /**< number of received frames with a good PLCP */ |
---|
| 15578 | + uint32 rxbadplcp; /**< number of parity check of the PLCP header failed */ |
---|
| 15579 | + uint32 rxcrsglitch; /**< PHY was able to correlate the preamble but not the header */ |
---|
| 15580 | + uint32 rxnodelim; /**< number of no valid delimiter detected by ampdu parser */ |
---|
| 15581 | + uint32 bphy_badplcp; /**< number of bad PLCP reception on BPHY rate */ |
---|
| 15582 | + uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ |
---|
| 15583 | + uint32 rxbadfcs; /**< number of frames for which the CRC check failed in the MAC */ |
---|
| 15584 | + uint32 rxf0ovfl; /**< number of receive fifo 0 overflows */ |
---|
| 15585 | + uint32 rxf1ovfl; /**< number of receive fifo 0 overflows */ |
---|
| 15586 | + uint32 rxhlovfl; /**< number of length / header fifo overflows */ |
---|
| 15587 | + uint32 rxrtsucast; /**< number of unicast RTS addressed to the MAC (good FCS) */ |
---|
| 15588 | + uint32 rxctsucast; /**< number of unicast CTS addressed to the MAC (good FCS) */ |
---|
| 15589 | + uint32 rxackucast; /**< number of ucast ACKS received (good FCS) */ |
---|
| 15590 | + uint32 rxback; /**< blockack rxcnt */ |
---|
| 15591 | + uint32 rxbeaconmbss; /**< beacons received from member of BSS */ |
---|
| 15592 | + uint32 rxdtucastmbss; /**< number of received DATA frames with good FCS and matching RA */ |
---|
| 15593 | + uint32 rxbeaconobss; /**< beacons received from other BSS */ |
---|
| 15594 | + uint32 rxdtucastobss; /**< number of unicast frames addressed to the MAC from |
---|
| 15595 | + * other BSS (WDS FRAME) |
---|
| 15596 | + */ |
---|
| 15597 | + uint32 rxdtocast; /**< number of received DATA frames (good FCS and no matching RA) */ |
---|
| 15598 | + uint32 rxrtsocast; /**< number of received RTS not addressed to the MAC */ |
---|
| 15599 | + uint32 rxctsocast; /**< number of received CTS not addressed to the MAC */ |
---|
| 15600 | + uint32 rxdtmcast; /**< number of RX Data multicast frames received by the MAC */ |
---|
| 15601 | + uint32 rxmpdu_mu; /**< Number of MU MPDUs received */ |
---|
| 15602 | + uint32 rxtoolate; /**< receive too late */ |
---|
| 15603 | + uint32 rxframe; /**< rx data frames */ |
---|
| 15604 | + uint32 lqcm_report; /**< lqcm metric tx/rx idx */ |
---|
| 15605 | + uint32 tx_toss_cnt; /* number of tx packets tossed */ |
---|
| 15606 | + uint32 rx_toss_cnt; /* number of rx packets tossed */ |
---|
| 15607 | + uint32 last_tx_toss_rsn; /* reason because of which last tx pkt tossed */ |
---|
| 15608 | + uint32 last_rx_toss_rsn; /* reason because of which last rx pkt tossed */ |
---|
| 15609 | + uint32 txbcnfrm; /**< beacons transmitted */ |
---|
| 15610 | + uint32 rxretry; /* Number of rx packets received after retry */ |
---|
| 15611 | + uint32 rxdup; /* Number of dump packet. Indicates whether peer is receiving ack */ |
---|
| 15612 | + uint32 chswitch_cnt; /* Number of channel switches */ |
---|
| 15613 | + uint32 pm_dur; /* Total sleep time in PM, msecs */ |
---|
| 15614 | +} wl_periodic_compact_cntrs_v2_t; |
---|
| 15615 | + |
---|
| 15616 | +#define WL_PERIODIC_COMPACT_HE_CNTRS_VER_1 (1) |
---|
| 15617 | +typedef struct { |
---|
| 15618 | + uint16 version; |
---|
| 15619 | + uint16 len; |
---|
| 15620 | + uint32 he_rxtrig_rand; |
---|
| 15621 | + uint32 he_colormiss_cnt; |
---|
| 15622 | + uint32 he_txmtid_back; |
---|
| 15623 | + uint32 he_rxmtid_back; |
---|
| 15624 | + uint32 he_rxmsta_back; |
---|
| 15625 | + uint32 he_rxtrig_basic; |
---|
| 15626 | + uint32 he_rxtrig_murts; |
---|
| 15627 | + uint32 he_rxtrig_bsrp; |
---|
| 15628 | + uint32 he_rxdlmu; |
---|
| 15629 | + uint32 he_physu_rx; |
---|
| 15630 | + uint32 he_txtbppdu; |
---|
| 15631 | +} wl_compact_he_cnt_wlc_v1_t; |
---|
| 15632 | + |
---|
| 15633 | +typedef struct { |
---|
| 15634 | + uint16 version; |
---|
| 15635 | + uint16 coreup; |
---|
| 15636 | + uint32 txndpa; |
---|
| 15637 | + uint32 txndp; |
---|
| 15638 | + uint32 rxsf; |
---|
| 15639 | + uint32 txbfm; |
---|
| 15640 | + uint32 rxndpa_u; |
---|
| 15641 | + uint32 rxndpa_m; |
---|
| 15642 | + uint32 bferpt; |
---|
| 15643 | + uint32 rxbfpoll; |
---|
| 15644 | + uint32 txsf; |
---|
| 15645 | +} wl_periodic_txbf_cntrs_v1_t; |
---|
| 15646 | + |
---|
| 15647 | +typedef struct { |
---|
| 15648 | + struct ether_addr BSSID; |
---|
| 15649 | + chanspec_t chanspec; |
---|
| 15650 | + int32 rssi; |
---|
| 15651 | + int32 snr; |
---|
| 15652 | +} wl_rx_signal_metric_t; |
---|
| 15653 | + |
---|
| 15654 | +typedef struct { |
---|
| 15655 | + uint8 version; |
---|
| 15656 | + uint8 flags; |
---|
| 15657 | + uint16 pad; |
---|
| 15658 | + int32 noise_level; /* current noise level */ |
---|
| 15659 | + wl_rx_signal_metric_t current_bss; |
---|
| 15660 | + wl_rx_signal_metric_t target_bss; |
---|
| 15661 | +} wl_lqm_t; |
---|
| 15662 | + |
---|
| 15663 | +#define WL_PERIODIC_IF_STATE_VER_1 (1) |
---|
| 15664 | +typedef struct wl_if_state_compact { |
---|
| 15665 | + uint8 version; |
---|
| 15666 | + uint8 assoc_state; |
---|
| 15667 | + uint8 antenna_count; /**< number of valid antenna rssi */ |
---|
| 15668 | + int8 noise_level; /**< noise right after tx (in dBm) */ |
---|
| 15669 | + int8 snr; /* current noise level */ |
---|
| 15670 | + int8 rssi_sum; /**< summed rssi across all antennas */ |
---|
| 15671 | + uint16 pad16; |
---|
| 15672 | + int8 rssi_ant[WL_RSSI_ANT_MAX]; /**< rssi per antenna */ |
---|
| 15673 | + struct ether_addr BSSID; |
---|
| 15674 | + chanspec_t chanspec; |
---|
| 15675 | +} wl_if_state_compact_t; |
---|
| 15676 | + |
---|
| 15677 | +#define WL_EVENT_STATISTICS_VER_1 (1) |
---|
| 15678 | +/* Event based statistics ecounters */ |
---|
| 15679 | +typedef struct { |
---|
| 15680 | + uint16 version; |
---|
| 15681 | + uint16 pad; |
---|
| 15682 | + struct ether_addr BSSID; /* BSSID of the BSS */ |
---|
| 15683 | + uint32 txdeauthivalclass; |
---|
| 15684 | +} wl_event_based_statistics_v1_t; |
---|
| 15685 | + |
---|
| 15686 | +/* ##### Ecounters v2 section ##### */ |
---|
| 15687 | + |
---|
| 15688 | +#define ECOUNTERS_VERSION_2 2 |
---|
| 15689 | + |
---|
| 15690 | +/* Enumeration of various ecounters request types. This namespace is different from |
---|
| 15691 | + * global reportable stats namespace. |
---|
| 15692 | +*/ |
---|
| 15693 | +enum { |
---|
| 15694 | + WL_ECOUNTERS_XTLV_REPORT_REQ = 1 |
---|
| 15695 | +}; |
---|
| 15696 | + |
---|
| 15697 | +/* Input structure for ecounters IOVAR */ |
---|
| 15698 | +typedef struct ecounters_config_request_v2 { |
---|
| 15699 | + uint16 version; /* config version */ |
---|
| 15700 | + uint16 len; /* Length of this struct including variable len */ |
---|
| 15701 | + uint16 logset; /* Set where data will go. */ |
---|
| 15702 | + uint16 reporting_period; /* reporting_period */ |
---|
| 15703 | + uint16 num_reports; /* Number of timer expirations to report on */ |
---|
| 15704 | + uint8 pad[2]; /* Reserved for future use */ |
---|
| 15705 | + uint8 ecounters_xtlvs[]; /* Statistics Types (tags) to retrieve. */ |
---|
| 15706 | +} ecounters_config_request_v2_t; |
---|
| 15707 | + |
---|
| 15708 | +#define ECOUNTERS_STATS_TYPES_FLAG_SLICE 0x1 |
---|
| 15709 | +#define ECOUNTERS_STATS_TYPES_FLAG_IFACE 0x2 |
---|
| 15710 | +#define ECOUNTERS_STATS_TYPES_FLAG_GLOBAL 0x4 |
---|
| 15711 | +#define ECOUNTERS_STATS_TYPES_DEFAULT 0x8 |
---|
| 15712 | + |
---|
| 15713 | +/* Slice mask bits */ |
---|
| 15714 | +#define ECOUNTERS_STATS_TYPES_SLICE_MASK_SLICE0 0x1 |
---|
| 15715 | +#define ECOUNTERS_STATS_TYPES_SLICE_MASK_SLICE1 0x2 |
---|
| 15716 | + |
---|
| 15717 | +typedef struct ecounters_stats_types_report_req { |
---|
| 15718 | + /* flags: bit0 = slice, bit1 = iface, bit2 = global, |
---|
| 15719 | + * rest reserved |
---|
| 15720 | + */ |
---|
| 15721 | + uint16 flags; |
---|
| 15722 | + uint16 if_index; /* host interface index */ |
---|
| 15723 | + uint16 slice_mask; /* bit0 = slice0, bit1=slice1, rest reserved */ |
---|
| 15724 | + uint8 pad[2]; /* padding */ |
---|
| 15725 | + uint8 stats_types_req[]; /* XTLVs of requested types */ |
---|
| 15726 | +} ecounters_stats_types_report_req_t; |
---|
| 15727 | + |
---|
| 15728 | +/* ##### Ecounters_Eventmsgs v2 section ##### */ |
---|
| 15729 | + |
---|
| 15730 | +#define ECOUNTERS_EVENTMSGS_VERSION_2 2 |
---|
| 15731 | + |
---|
| 15732 | +typedef struct event_ecounters_config_request_v2 { |
---|
| 15733 | + uint16 version; /* config version */ |
---|
| 15734 | + uint16 len; /* Length of this struct including variable len */ |
---|
| 15735 | + uint16 logset; /* Set where data will go. */ |
---|
| 15736 | + uint16 event_id; /* Event id for which this config is meant for */ |
---|
| 15737 | + uint8 flags; /* Config flags */ |
---|
| 15738 | + uint8 pad[3]; /* Reserved for future use */ |
---|
| 15739 | + uint8 ecounters_xtlvs[]; /* Statistics Types (tags) to retrieve. */ |
---|
| 15740 | +} event_ecounters_config_request_v2_t; |
---|
| 15741 | + |
---|
| 15742 | +#define EVENT_ECOUNTERS_FLAGS_ADD (1 << 0) /* Add configuration for the event_id if set */ |
---|
| 15743 | +#define EVENT_ECOUNTERS_FLAGS_DEL (1 << 1) /* Delete configuration for event_id if set */ |
---|
| 15744 | +#define EVENT_ECOUNTERS_FLAGS_ANYIF (1 << 2) /* Interface filtering disable / off bit */ |
---|
| 15745 | +#define EVENT_ECOUNTERS_FLAGS_BE (1 << 3) /* If cleared report stats of |
---|
| 15746 | + * one event log buffer |
---|
| 15747 | + */ |
---|
| 15748 | +#define EVENT_ECOUNTERS_FLAGS_DEL_ALL (1 << 4) /* Delete all the configurations of |
---|
| 15749 | + * event ecounters if set |
---|
| 15750 | + */ |
---|
| 15751 | + |
---|
| 15752 | +#define EVENT_ECOUNTERS_FLAGS_BUS (1 << 5) /* Add configuration for the bus events */ |
---|
| 15753 | +#define EVENT_ECOUNTERS_FLAGS_BUS_H2D (1 << 6) /* Add configuration for the bus direction |
---|
| 15754 | + * 0 - D2H and 1 - H2D |
---|
| 15755 | + */ |
---|
| 15756 | + |
---|
| 15757 | +#define EVENT_ECOUNTERS_FLAGS_DELAYED_FLUSH (1 << 7) /* Flush only when half of the total size |
---|
| 15758 | + * of blocks gets filled. This is to avoid |
---|
| 15759 | + * many interrupts to host. |
---|
| 15760 | + */ |
---|
| 15761 | +#define EVENT_ECOUNTERS_FLAGS_USER (1 << 6) /* Add configuration for user defined events |
---|
| 15762 | + * Reuse the same flag as H2D |
---|
| 15763 | + */ |
---|
| 15764 | + |
---|
| 15765 | +/* Ecounters suspend resume */ |
---|
| 15766 | +#define ECOUNTERS_SUSPEND_VERSION_V1 1 |
---|
| 15767 | +/* To be used in populating suspend_mask and suspend_bitmap */ |
---|
| 15768 | +#define ECOUNTERS_SUSPEND_TIMER (1 << ECOUNTERS_TRIGGER_REASON_TIMER) |
---|
| 15769 | +#define ECOUNTERS_SUSPEND_EVENTS (1 << ECOUNTERS_TRIGGER_REASON_EVENTS) |
---|
| 15770 | + |
---|
| 15771 | +typedef struct ecounters_suspend { |
---|
| 15772 | + uint16 version; |
---|
| 15773 | + uint16 len; |
---|
| 15774 | + uint32 suspend_bitmap; /* type of ecounter reporting to be suspended */ |
---|
| 15775 | + uint32 suspend_mask; /* type of ecounter reporting to be suspended */ |
---|
| 15776 | +} ecounters_suspend_t; |
---|
| 15777 | + |
---|
| 15778 | +/* -------------- dynamic BTCOEX --------------- */ |
---|
| 15779 | +#define DCTL_TROWS 2 /**< currently practical number of rows */ |
---|
| 15780 | +#define DCTL_TROWS_MAX 4 /**< 2 extra rows RFU */ |
---|
8301 | 15781 | /* DYNCTL profile flags */ |
---|
8302 | | -#define DCTL_FLAGS_DYNCTL (1 << 0) /* 1 - enabled, 0 - legacy only */ |
---|
8303 | | -#define DCTL_FLAGS_DESENSE (1 << 1) /* auto desense is enabled */ |
---|
8304 | | -#define DCTL_FLAGS_MSWITCH (1 << 2) /* mode switching is enabled */ |
---|
| 15782 | +#define DCTL_FLAGS_DISABLED 0 /**< default value: all features disabled */ |
---|
| 15783 | +#define DCTL_FLAGS_DYNCTL (1 << 0) /**< 1 - enabled, 0 - legacy only */ |
---|
| 15784 | +#define DCTL_FLAGS_DESENSE (1 << 1) /**< auto desense is enabled */ |
---|
| 15785 | +#define DCTL_FLAGS_MSWITCH (1 << 2) /**< mode switching is enabled */ |
---|
| 15786 | +#define DCTL_FLAGS_PWRCTRL (1 << 3) /**< Tx power control is enabled */ |
---|
8305 | 15787 | /* for now AGG on/off is handled separately */ |
---|
8306 | | -#define DCTL_FLAGS_TX_AGG_OFF (1 << 3) /* TBD: allow TX agg Off */ |
---|
8307 | | -#define DCTL_FLAGS_RX_AGG_OFF (1 << 4) /* TBD: allow RX agg Off */ |
---|
| 15788 | +#define DCTL_FLAGS_TX_AGG_OFF (1 << 4) /**< TBD: allow TX agg Off */ |
---|
| 15789 | +#define DCTL_FLAGS_RX_AGG_OFF (1 << 5) /**< TBD: allow RX agg Off */ |
---|
8308 | 15790 | /* used for dry run testing only */ |
---|
8309 | | -#define DCTL_FLAGS_DRYRUN (1 << 7) /* Eenables dynctl dry run mode */ |
---|
| 15791 | +#define DCTL_FLAGS_DRYRUN (1 << 7) /**< Enables dynctl dry run mode */ |
---|
8310 | 15792 | #define IS_DYNCTL_ON(prof) ((prof->flags & DCTL_FLAGS_DYNCTL) != 0) |
---|
8311 | 15793 | #define IS_DESENSE_ON(prof) ((prof->flags & DCTL_FLAGS_DESENSE) != 0) |
---|
8312 | 15794 | #define IS_MSWITCH_ON(prof) ((prof->flags & DCTL_FLAGS_MSWITCH) != 0) |
---|
| 15795 | +#define IS_PWRCTRL_ON(prof) ((prof->flags & DCTL_FLAGS_PWRCTRL) != 0) |
---|
8313 | 15796 | /* desense level currently in use */ |
---|
8314 | 15797 | #define DESENSE_OFF 0 |
---|
8315 | 15798 | #define DFLT_DESENSE_MID 12 |
---|
8316 | 15799 | #define DFLT_DESENSE_HIGH 2 |
---|
8317 | 15800 | |
---|
8318 | | -/* |
---|
| 15801 | +/** |
---|
8319 | 15802 | * dynctl data points(a set of btpwr & wlrssi thresholds) |
---|
8320 | 15803 | * for mode & desense switching |
---|
8321 | 15804 | */ |
---|
8322 | 15805 | typedef struct btc_thr_data { |
---|
8323 | | - int8 mode; /* used by desense sw */ |
---|
8324 | | - int8 bt_pwr; /* BT tx power threshold */ |
---|
8325 | | - int8 bt_rssi; /* BT rssi threshold */ |
---|
| 15806 | + int8 mode; /**< used by desense sw */ |
---|
| 15807 | + int8 bt_pwr; /**< BT tx power threshold */ |
---|
| 15808 | + int8 bt_rssi; /**< BT rssi threshold */ |
---|
8326 | 15809 | /* wl rssi range when mode or desense change may be needed */ |
---|
8327 | 15810 | int8 wl_rssi_high; |
---|
8328 | 15811 | int8 wl_rssi_low; |
---|
.. | .. |
---|
8330 | 15813 | |
---|
8331 | 15814 | /* dynctl. profile data structure */ |
---|
8332 | 15815 | #define DCTL_PROFILE_VER 0x01 |
---|
| 15816 | +#include <packed_section_start.h> |
---|
8333 | 15817 | typedef BWL_PRE_PACKED_STRUCT struct dctl_prof { |
---|
8334 | | - uint8 version; /* dynctl profile version */ |
---|
| 15818 | + uint8 version; /**< dynctl profile version */ |
---|
8335 | 15819 | /* dynctl profile flags bit:0 - dynctl On, bit:1 dsns On, bit:2 mode sw On, */ |
---|
8336 | | - uint8 flags; /* bit[6:3] reserved, bit7 - Dryrun (sim) - On */ |
---|
8337 | | - /* wl desense levels to apply */ |
---|
| 15820 | + uint8 flags; /**< bit[6:3] reserved, bit7 - Dryrun (sim) - On */ |
---|
| 15821 | + /** wl desense levels to apply */ |
---|
8338 | 15822 | uint8 dflt_dsns_level; |
---|
8339 | 15823 | uint8 low_dsns_level; |
---|
8340 | 15824 | uint8 mid_dsns_level; |
---|
8341 | 15825 | uint8 high_dsns_level; |
---|
8342 | | - /* mode switching hysteresis in dBm */ |
---|
| 15826 | + /** mode switching hysteresis in dBm */ |
---|
8343 | 15827 | int8 msw_btrssi_hyster; |
---|
8344 | | - /* default btcoex mode */ |
---|
| 15828 | + /** default btcoex mode */ |
---|
8345 | 15829 | uint8 default_btc_mode; |
---|
8346 | | - /* num of active rows in mode switching table */ |
---|
| 15830 | + /** num of active rows in mode switching table */ |
---|
8347 | 15831 | uint8 msw_rows; |
---|
8348 | | - /* num of rows in desense table */ |
---|
| 15832 | + /** num of rows in desense table */ |
---|
8349 | 15833 | uint8 dsns_rows; |
---|
8350 | | - /* dynctl mode switching data table */ |
---|
| 15834 | + /** dynctl mode switching data table */ |
---|
8351 | 15835 | btc_thr_data_t msw_data[DCTL_TROWS_MAX]; |
---|
8352 | | - /* dynctl desense switching data table */ |
---|
| 15836 | + /** dynctl desense switching data table */ |
---|
8353 | 15837 | btc_thr_data_t dsns_data[DCTL_TROWS_MAX]; |
---|
8354 | 15838 | } BWL_POST_PACKED_STRUCT dctl_prof_t; |
---|
| 15839 | +#include <packed_section_end.h> |
---|
8355 | 15840 | |
---|
8356 | | -/* dynctl status info */ |
---|
| 15841 | +/** dynctl status info */ |
---|
| 15842 | +#include <packed_section_start.h> |
---|
8357 | 15843 | typedef BWL_PRE_PACKED_STRUCT struct dynctl_status { |
---|
8358 | | - bool sim_on; /* true if simulation is On */ |
---|
8359 | | - uint16 bt_pwr_shm; /* BT per/task power as read from ucode */ |
---|
8360 | | - int8 bt_pwr; /* BT pwr extracted & converted to dBm */ |
---|
8361 | | - int8 bt_rssi; /* BT rssi in dBm */ |
---|
8362 | | - int8 wl_rssi; /* last wl rssi reading used by btcoex */ |
---|
8363 | | - uint8 dsns_level; /* current desense level */ |
---|
8364 | | - uint8 btc_mode; /* current btcoex mode */ |
---|
| 15844 | + uint8 sim_on; /**< true if simulation is On */ |
---|
| 15845 | + uint16 bt_pwr_shm; /**< BT per/task power as read from ucode */ |
---|
| 15846 | + int8 bt_pwr; /**< BT pwr extracted & converted to dBm */ |
---|
| 15847 | + int8 bt_rssi; /**< BT rssi in dBm */ |
---|
| 15848 | + int8 wl_rssi; /**< last wl rssi reading used by btcoex */ |
---|
| 15849 | + uint8 dsns_level; /**< current desense level */ |
---|
| 15850 | + uint8 btc_mode; /**< current btcoex mode */ |
---|
8365 | 15851 | /* add more status items if needed, pad to 4 BB if needed */ |
---|
8366 | 15852 | } BWL_POST_PACKED_STRUCT dynctl_status_t; |
---|
| 15853 | +#include <packed_section_end.h> |
---|
8367 | 15854 | |
---|
8368 | | -/* dynctl simulation (dryrun data) */ |
---|
| 15855 | +/** dynctl simulation (dryrun data) */ |
---|
| 15856 | +#include <packed_section_start.h> |
---|
8369 | 15857 | typedef BWL_PRE_PACKED_STRUCT struct dynctl_sim { |
---|
8370 | | - bool sim_on; /* simulation mode on/off */ |
---|
8371 | | - int8 btpwr; /* simulated BT power in dBm */ |
---|
8372 | | - int8 btrssi; /* simulated BT rssi in dBm */ |
---|
8373 | | - int8 wlrssi; /* simulated WL rssi in dBm */ |
---|
| 15858 | + uint8 sim_on; /**< simulation mode on/off */ |
---|
| 15859 | + int8 btpwr; /**< simulated BT power in dBm */ |
---|
| 15860 | + int8 btrssi; /**< simulated BT rssi in dBm */ |
---|
| 15861 | + int8 wlrssi; /**< simulated WL rssi in dBm */ |
---|
8374 | 15862 | } BWL_POST_PACKED_STRUCT dynctl_sim_t; |
---|
8375 | 15863 | /* no default structure packing */ |
---|
8376 | 15864 | #include <packed_section_end.h> |
---|
8377 | 15865 | |
---|
8378 | | -/* PTK key maintained per SCB */ |
---|
| 15866 | +/** PTK key maintained per SCB */ |
---|
8379 | 15867 | #define RSN_TEMP_ENCR_KEY_LEN 16 |
---|
8380 | 15868 | typedef struct wpa_ptk { |
---|
8381 | | - uint8 kck[RSN_KCK_LENGTH]; /* EAPOL-Key Key Confirmation Key (KCK) */ |
---|
8382 | | - uint8 kek[RSN_KEK_LENGTH]; /* EAPOL-Key Key Encryption Key (KEK) */ |
---|
8383 | | - uint8 tk1[RSN_TEMP_ENCR_KEY_LEN]; /* Temporal Key 1 (TK1) */ |
---|
8384 | | - uint8 tk2[RSN_TEMP_ENCR_KEY_LEN]; /* Temporal Key 2 (TK2) */ |
---|
| 15869 | + uint8 kck[RSN_KCK_LENGTH]; /**< EAPOL-Key Key Confirmation Key (KCK) */ |
---|
| 15870 | + uint8 kek[RSN_KEK_LENGTH]; /**< EAPOL-Key Key Encryption Key (KEK) */ |
---|
| 15871 | + uint8 tk1[RSN_TEMP_ENCR_KEY_LEN]; /**< Temporal Key 1 (TK1) */ |
---|
| 15872 | + uint8 tk2[RSN_TEMP_ENCR_KEY_LEN]; /**< Temporal Key 2 (TK2) */ |
---|
8385 | 15873 | } wpa_ptk_t; |
---|
8386 | 15874 | |
---|
8387 | | -/* GTK key maintained per SCB */ |
---|
| 15875 | +/** GTK key maintained per SCB */ |
---|
8388 | 15876 | typedef struct wpa_gtk { |
---|
8389 | 15877 | uint32 idx; |
---|
8390 | 15878 | uint32 key_len; |
---|
8391 | 15879 | uint8 key[DOT11_MAX_KEY_SIZE]; |
---|
8392 | 15880 | } wpa_gtk_t; |
---|
8393 | 15881 | |
---|
8394 | | -/* FBT Auth Response Data structure */ |
---|
| 15882 | +/** FBT Auth Response Data structure */ |
---|
8395 | 15883 | typedef struct wlc_fbt_auth_resp { |
---|
8396 | | - uint8 macaddr[ETHER_ADDR_LEN]; /* station mac address */ |
---|
| 15884 | + uint8 macaddr[ETHER_ADDR_LEN]; /**< station mac address */ |
---|
8397 | 15885 | uint8 pad[2]; |
---|
8398 | 15886 | uint8 pmk_r1_name[WPA2_PMKID_LEN]; |
---|
8399 | | - wpa_ptk_t ptk; /* pairwise key */ |
---|
8400 | | - wpa_gtk_t gtk; /* group key */ |
---|
| 15887 | + wpa_ptk_t ptk; /**< pairwise key */ |
---|
| 15888 | + wpa_gtk_t gtk; /**< group key */ |
---|
8401 | 15889 | uint32 ie_len; |
---|
8402 | | - uint8 status; /* Status of parsing FBT authentication |
---|
| 15890 | + uint8 status; /**< Status of parsing FBT authentication |
---|
8403 | 15891 | Request in application |
---|
8404 | 15892 | */ |
---|
8405 | | - uint8 ies[1]; /* IEs contains MDIE, RSNIE, |
---|
| 15893 | + uint8 ies[1]; /**< IEs contains MDIE, RSNIE, |
---|
8406 | 15894 | FBTIE (ANonce, SNonce,R0KH-ID, R1KH-ID) |
---|
8407 | 15895 | */ |
---|
8408 | 15896 | } wlc_fbt_auth_resp_t; |
---|
8409 | 15897 | |
---|
8410 | | -/* FBT Action Response frame */ |
---|
| 15898 | +/** FBT Action Response frame */ |
---|
8411 | 15899 | typedef struct wlc_fbt_action_resp { |
---|
8412 | | - uint16 version; /* structure version */ |
---|
8413 | | - uint16 length; /* length of structure */ |
---|
8414 | | - uint8 macaddr[ETHER_ADDR_LEN]; /* station mac address */ |
---|
8415 | | - uint8 data_len; /* len of ie from Category */ |
---|
8416 | | - uint8 data[1]; /* data contains category, action, sta address, target ap, |
---|
| 15900 | + uint16 version; /**< structure version */ |
---|
| 15901 | + uint16 length; /**< length of structure */ |
---|
| 15902 | + uint8 macaddr[ETHER_ADDR_LEN]; /**< station mac address */ |
---|
| 15903 | + uint8 data_len; /**< len of ie from Category */ |
---|
| 15904 | + uint8 data[1]; /**< data contains category, action, sta address, target ap, |
---|
8417 | 15905 | status code,fbt response frame body |
---|
8418 | 15906 | */ |
---|
8419 | 15907 | } wlc_fbt_action_resp_t; |
---|
.. | .. |
---|
8424 | 15912 | typedef struct _wl_macdbg_pmac_param_t { |
---|
8425 | 15913 | char type[MACDBG_PMAC_OBJ_TYPE_LEN]; |
---|
8426 | 15914 | uint8 step; |
---|
8427 | | - uint8 num; |
---|
| 15915 | + uint8 w_en; |
---|
| 15916 | + uint16 num; |
---|
8428 | 15917 | uint32 bitmap; |
---|
8429 | | - bool addr_raw; |
---|
| 15918 | + uint8 addr_raw; |
---|
8430 | 15919 | uint8 addr_num; |
---|
8431 | 15920 | uint16 addr[MACDBG_PMAC_ADDR_INPUT_MAXNUM]; |
---|
| 15921 | + uint8 pad0[2]; |
---|
| 15922 | + uint32 w_val; |
---|
8432 | 15923 | } wl_macdbg_pmac_param_t; |
---|
8433 | 15924 | |
---|
8434 | | -/* IOVAR 'svmp_mem' parameter. Used to read/clear svmp memory */ |
---|
| 15925 | +/** IOVAR 'svmp_sampcol' parameter. Used to set and read SVMP_SAMPLE_COLLECT's setting */ |
---|
| 15926 | +typedef struct wl_svmp_sampcol_param { |
---|
| 15927 | + uint32 version; /* version */ |
---|
| 15928 | + uint8 enable; |
---|
| 15929 | + uint8 trigger_mode; /* SVMP_SAMPCOL_TRIGGER */ |
---|
| 15930 | + uint8 trigger_mode_s[2]; /* SVMP_SAMPCOL_PKTPROC */ |
---|
| 15931 | + uint8 data_samplerate; /* SVMP_SAMPCOL_SAMPLERATE */ |
---|
| 15932 | + uint8 data_sel_phy1; /* SVMP_SAMPCOL_PHY1MUX */ |
---|
| 15933 | + uint8 data_sel_rx1; /* SVMP_SAMPCOL_RX1MUX without iqCompOut */ |
---|
| 15934 | + uint8 data_sel_dualcap; /* SVMP_SAMPCOL_RX1MUX */ |
---|
| 15935 | + uint8 pack_mode; /* SVMP_SAMPCOL_PACK */ |
---|
| 15936 | + uint8 pack_order; |
---|
| 15937 | + uint8 pack_cfix_fmt; |
---|
| 15938 | + uint8 pack_1core_sel; |
---|
| 15939 | + uint16 waitcnt; |
---|
| 15940 | + uint16 caplen; |
---|
| 15941 | + uint32 buff_addr_start; /* in word-size (2-bytes) */ |
---|
| 15942 | + uint32 buff_addr_end; /* note: Tcl in byte-size, HW in vector-size (8-bytes) */ |
---|
| 15943 | + uint8 int2vasip; |
---|
| 15944 | + uint8 PAD; |
---|
| 15945 | + uint16 status; |
---|
| 15946 | +} wl_svmp_sampcol_t; |
---|
| 15947 | + |
---|
| 15948 | +#define WL_SVMP_SAMPCOL_PARAMS_VERSION 1 |
---|
| 15949 | + |
---|
| 15950 | +enum { |
---|
| 15951 | + SVMP_SAMPCOL_TRIGGER_PKTPROC_TRANSITION = 0, |
---|
| 15952 | + SVMP_SAMPCOL_TRIGGER_FORCE_IMMEDIATE, |
---|
| 15953 | + SVMP_SAMPCOL_TRIGGER_RADAR_DET |
---|
| 15954 | +}; |
---|
| 15955 | + |
---|
| 15956 | +enum { |
---|
| 15957 | + SVMP_SAMPCOL_PHY1MUX_GPIOOUT = 0, |
---|
| 15958 | + SVMP_SAMPCOL_PHY1MUX_FFT, |
---|
| 15959 | + SVMP_SAMPCOL_PHY1MUX_DBGHX, |
---|
| 15960 | + SVMP_SAMPCOL_PHY1MUX_RX1MUX |
---|
| 15961 | +}; |
---|
| 15962 | + |
---|
| 15963 | +enum { |
---|
| 15964 | + SVMP_SAMPCOL_RX1MUX_FARROWOUT = 4, |
---|
| 15965 | + SVMP_SAMPCOL_RX1MUX_IQCOMPOUT, |
---|
| 15966 | + SVMP_SAMPCOL_RX1MUX_DCFILTEROUT, |
---|
| 15967 | + SVMP_SAMPCOL_RX1MUX_RXFILTEROUT, |
---|
| 15968 | + SVMP_SAMPCOL_RX1MUX_ACIFILTEROUT |
---|
| 15969 | +}; |
---|
| 15970 | + |
---|
| 15971 | +enum { |
---|
| 15972 | + SVMP_SAMPCOL_SAMPLERATE_1XBW = 0, |
---|
| 15973 | + SVMP_SAMPCOL_SAMPLERATE_2XBW |
---|
| 15974 | +}; |
---|
| 15975 | + |
---|
| 15976 | +enum { |
---|
| 15977 | + SVMP_SAMPCOL_PACK_DUALCAP = 0, |
---|
| 15978 | + SVMP_SAMPCOL_PACK_4CORE, |
---|
| 15979 | + SVMP_SAMPCOL_PACK_2CORE, |
---|
| 15980 | + SVMP_SAMPCOL_PACK_1CORE |
---|
| 15981 | +}; |
---|
| 15982 | + |
---|
| 15983 | +enum { |
---|
| 15984 | + SVMP_SAMPCOL_PKTPROC_RESET = 0, |
---|
| 15985 | + SVMP_SAMPCOL_PKTPROC_CARRIER_SEARCH, |
---|
| 15986 | + SVMP_SAMPCOL_PKTPROC_WAIT_FOR_NB_PWR, |
---|
| 15987 | + SVMP_SAMPCOL_PKTPROC_WAIT_FOR_W1_PWR, |
---|
| 15988 | + SVMP_SAMPCOL_PKTPROC_WAIT_FOR_W2_PWR, |
---|
| 15989 | + SVMP_SAMPCOL_PKTPROC_OFDM_PHY, |
---|
| 15990 | + SVMP_SAMPCOL_PKTPROC_TIMING_SEARCH, |
---|
| 15991 | + SVMP_SAMPCOL_PKTPROC_CHAN_EST_1, |
---|
| 15992 | + SVMP_SAMPCOL_PKTPROC_LEG_SIG_DEC, |
---|
| 15993 | + SVMP_SAMPCOL_PKTPROC_SIG_DECODE_1, |
---|
| 15994 | + SVMP_SAMPCOL_PKTPROC_SIG_DECODE_2, |
---|
| 15995 | + SVMP_SAMPCOL_PKTPROC_HT_AGC, |
---|
| 15996 | + SVMP_SAMPCOL_PKTPROC_CHAN_EST_2, |
---|
| 15997 | + SVMP_SAMPCOL_PKTPROC_PAY_DECODE, |
---|
| 15998 | + SVMP_SAMPCOL_PKTPROC_DSSS_CCK_PHY, |
---|
| 15999 | + SVMP_SAMPCOL_PKTPROC_WAIT_ENERGY_DROP, |
---|
| 16000 | + SVMP_SAMPCOL_PKTPROC_WAIT_NCLKS, |
---|
| 16001 | + SVMP_SAMPCOL_PKTPROC_PAY_DEC_EXT, |
---|
| 16002 | + SVMP_SAMPCOL_PKTPROC_SIG_FAIL_DELAY, |
---|
| 16003 | + SVMP_SAMPCOL_PKTPROC_RIFS_SEARCH, |
---|
| 16004 | + SVMP_SAMPCOL_PKTPROC_BOARD_SWITCH_DIV_SEARCH, |
---|
| 16005 | + SVMP_SAMPCOL_PKTPROC_DSSS_CCK_BOARD_SWITCH_DIV_SEARCH, |
---|
| 16006 | + SVMP_SAMPCOL_PKTPROC_CHAN_EST_3, |
---|
| 16007 | + SVMP_SAMPCOL_PKTPROC_CHAN_EST_4, |
---|
| 16008 | + SVMP_SAMPCOL_PKTPROC_FINE_TIMING_SEARCH, |
---|
| 16009 | + SVMP_SAMPCOL_PKTPROC_SET_CLIP_GAIN, |
---|
| 16010 | + SVMP_SAMPCOL_PKTPROC_NAP, |
---|
| 16011 | + SVMP_SAMPCOL_PKTPROC_VHT_SIGA_DEC, |
---|
| 16012 | + SVMP_SAMPCOL_PKTPROC_VHT_SIGB_DEC, |
---|
| 16013 | + SVMP_SAMPCOL_PKTPROC_PKT_ABORT, |
---|
| 16014 | + SVMP_SAMPCOL_PKTPROC_DCCAL |
---|
| 16015 | +}; |
---|
| 16016 | + |
---|
| 16017 | +/** IOVAR 'svmp_mem' parameter. Used to read/clear svmp memory */ |
---|
8435 | 16018 | typedef struct svmp_mem { |
---|
8436 | | - uint32 addr; /* offset to read svmp memory from vasip base address */ |
---|
8437 | | - uint16 len; /* length in count of uint16's */ |
---|
8438 | | - uint16 val; /* set the range of addr/len with a value */ |
---|
| 16019 | + uint32 addr; /**< offset to read svmp memory from vasip base address */ |
---|
| 16020 | + uint16 len; /**< length in count of uint16's */ |
---|
| 16021 | + uint16 val; /**< set the range of addr/len with a value */ |
---|
8439 | 16022 | } svmp_mem_t; |
---|
8440 | 16023 | |
---|
8441 | 16024 | /** IOVAR 'mu_rate' parameter. read/set mu rate for upto four users */ |
---|
.. | .. |
---|
8443 | 16026 | typedef struct mu_rate { |
---|
8444 | 16027 | uint16 version; /**< version of the structure as defined by MU_RATE_CFG_VERSION */ |
---|
8445 | 16028 | uint16 length; /**< length of entire structure */ |
---|
8446 | | - bool auto_rate; /**< enable/disable auto rate */ |
---|
| 16029 | + uint8 auto_rate; /**< enable/disable auto rate */ |
---|
| 16030 | + uint8 PAD; |
---|
8447 | 16031 | uint16 rate_user[4]; /**< rate per each of four users, set to -1 for no change */ |
---|
8448 | 16032 | } mu_rate_t; |
---|
| 16033 | + |
---|
| 16034 | +/** IOVAR 'mu_group' parameter. Used to set and read MU group recommendation setting */ |
---|
| 16035 | +#define WL_MU_GROUP_AUTO_COMMAND -1 |
---|
| 16036 | +#define WL_MU_GROUP_PARAMS_VERSION 3 |
---|
| 16037 | +#define WL_MU_GROUP_METHOD_NAMELEN 64 |
---|
| 16038 | +#define WL_MU_GROUP_NGROUP_MAX 15 |
---|
| 16039 | +#define WL_MU_GROUP_NUSER_MAX 4 |
---|
| 16040 | +#define WL_MU_GROUP_METHOD_MIN 0 |
---|
| 16041 | +#define WL_MU_GROUP_NUMBER_AUTO_MIN 1 |
---|
| 16042 | +#define WL_MU_GROUP_NUMBER_AUTO_MAX 15 |
---|
| 16043 | +#define WL_MU_GROUP_NUMBER_FORCED_MAX 8 |
---|
| 16044 | +#define WL_MU_GROUP_METHOD_OLD 0 |
---|
| 16045 | +#define WL_MU_GROUP_MODE_AUTO 0 |
---|
| 16046 | +#define WL_MU_GROUP_MODE_FORCED 1 |
---|
| 16047 | +#define WL_MU_GROUP_FORCED_1GROUP 1 |
---|
| 16048 | +#define WL_MU_GROUP_ENTRY_EMPTY -1 |
---|
| 16049 | +typedef struct mu_group { |
---|
| 16050 | + uint32 version; /* version */ |
---|
| 16051 | + int16 forced; /* forced group recommendation */ |
---|
| 16052 | + int16 forced_group_mcs; /* forced group with mcs */ |
---|
| 16053 | + int16 forced_group_num; /* forced group number */ |
---|
| 16054 | + int16 group_option[WL_MU_GROUP_NGROUP_MAX][WL_MU_GROUP_NUSER_MAX]; |
---|
| 16055 | + /* set mode for forced grouping and read mode for auto grouping */ |
---|
| 16056 | + int16 group_GID[WL_MU_GROUP_NGROUP_MAX]; |
---|
| 16057 | + int16 group_method; /* methof for VASIP group recommendation */ |
---|
| 16058 | + int16 group_number; /* requested number for VASIP group recommendation */ |
---|
| 16059 | + int16 auto_group_num; /* exact number from VASIP group recommendation */ |
---|
| 16060 | + int8 group_method_name[WL_MU_GROUP_METHOD_NAMELEN]; |
---|
| 16061 | + uint8 PAD[2]; |
---|
| 16062 | +} mu_group_t; |
---|
| 16063 | + |
---|
| 16064 | +typedef struct mupkteng_sta { |
---|
| 16065 | + struct ether_addr ea; |
---|
| 16066 | + uint8 PAD[2]; |
---|
| 16067 | + int32 nrxchain; |
---|
| 16068 | + int32 idx; |
---|
| 16069 | +} mupkteng_sta_t; |
---|
| 16070 | + |
---|
| 16071 | +typedef struct mupkteng_client { |
---|
| 16072 | + int32 rspec; |
---|
| 16073 | + int32 idx; |
---|
| 16074 | + int32 flen; |
---|
| 16075 | + int32 nframes; |
---|
| 16076 | +} mupkteng_client_t; |
---|
| 16077 | + |
---|
| 16078 | +typedef struct mupkteng_tx { |
---|
| 16079 | + mupkteng_client_t client[8]; |
---|
| 16080 | + int32 nclients; |
---|
| 16081 | + int32 ntx; |
---|
| 16082 | +} mupkteng_tx_t; |
---|
| 16083 | + |
---|
| 16084 | +/* |
---|
| 16085 | + * MU Packet engine interface. |
---|
| 16086 | + * The following two definitions will go into |
---|
| 16087 | + * wlioctl_defs.h |
---|
| 16088 | + * when wl utility changes are merged to EAGLE TOB & Trunk |
---|
| 16089 | + */ |
---|
| 16090 | + |
---|
| 16091 | +#define WL_MUPKTENG_PER_TX_START 0x10 |
---|
| 16092 | +#define WL_MUPKTENG_PER_TX_STOP 0x20 |
---|
| 16093 | + |
---|
| 16094 | +/** IOVAR 'mu_policy' parameter. Used to configure MU admission control policies */ |
---|
| 16095 | +#define WL_MU_POLICY_PARAMS_VERSION 1 |
---|
| 16096 | +#define WL_MU_POLICY_SCHED_DEFAULT 60 |
---|
| 16097 | +#define WL_MU_POLICY_DISABLED 0 |
---|
| 16098 | +#define WL_MU_POLICY_ENABLED 1 |
---|
| 16099 | +#define WL_MU_POLICY_NRX_MIN 1 |
---|
| 16100 | +#define WL_MU_POLICY_NRX_MAX 2 |
---|
| 16101 | +typedef struct mu_policy { |
---|
| 16102 | + uint16 version; |
---|
| 16103 | + uint16 length; |
---|
| 16104 | + uint32 sched_timer; |
---|
| 16105 | + uint32 pfmon; |
---|
| 16106 | + uint32 pfmon_gpos; |
---|
| 16107 | + uint32 samebw; |
---|
| 16108 | + uint32 nrx; |
---|
| 16109 | + uint32 max_muclients; |
---|
| 16110 | +} mu_policy_t; |
---|
8449 | 16111 | |
---|
8450 | 16112 | #define WL_NAN_BAND_STR_SIZE 5 /* sizeof ("auto") */ |
---|
8451 | 16113 | |
---|
.. | .. |
---|
8458 | 16120 | NAN_BAND_INVALID = 0xFF |
---|
8459 | 16121 | }; |
---|
8460 | 16122 | |
---|
8461 | | -#if defined(WL_LINKSTAT) |
---|
8462 | | -typedef struct { |
---|
8463 | | - uint32 preamble; |
---|
8464 | | - uint32 nss; |
---|
8465 | | - uint32 bw; |
---|
8466 | | - uint32 rateMcsIdx; |
---|
8467 | | - uint32 reserved; |
---|
8468 | | - uint32 bitrate; |
---|
8469 | | -} wifi_rate; |
---|
8470 | | - |
---|
8471 | | -typedef struct { |
---|
8472 | | - uint16 version; |
---|
8473 | | - uint16 length; |
---|
8474 | | - uint32 tx_mpdu; |
---|
8475 | | - uint32 rx_mpdu; |
---|
8476 | | - uint32 mpdu_lost; |
---|
8477 | | - uint32 retries; |
---|
8478 | | - uint32 retries_short; |
---|
8479 | | - uint32 retries_long; |
---|
8480 | | - wifi_rate rate; |
---|
8481 | | -} wifi_rate_stat_t; |
---|
8482 | | - |
---|
8483 | | -typedef int32 wifi_radio; |
---|
8484 | | - |
---|
8485 | | -typedef struct { |
---|
8486 | | - uint16 version; |
---|
8487 | | - uint16 length; |
---|
8488 | | - wifi_radio radio; |
---|
8489 | | - uint32 on_time; |
---|
8490 | | - uint32 tx_time; |
---|
8491 | | - uint32 rx_time; |
---|
8492 | | - uint32 on_time_scan; |
---|
8493 | | - uint32 on_time_nbd; |
---|
8494 | | - uint32 on_time_gscan; |
---|
8495 | | - uint32 on_time_roam_scan; |
---|
8496 | | - uint32 on_time_pno_scan; |
---|
8497 | | - uint32 on_time_hs20; |
---|
8498 | | - uint32 num_channels; |
---|
8499 | | - uint8 channels[1]; |
---|
8500 | | -} wifi_radio_stat; |
---|
8501 | | -#endif /* WL_LINKSTAT */ |
---|
8502 | | - |
---|
8503 | | -#ifdef WL11ULB |
---|
| 16123 | +/* ifdef WL11ULB */ |
---|
8504 | 16124 | /* ULB Mode configured via "ulb_mode" IOVAR */ |
---|
8505 | 16125 | enum { |
---|
8506 | 16126 | ULB_MODE_DISABLED = 0, |
---|
.. | .. |
---|
8523 | 16143 | /* Add all other enums before this */ |
---|
8524 | 16144 | MAX_SUPP_ULB_BW |
---|
8525 | 16145 | } ulb_bw_type_t; |
---|
8526 | | -#endif /* WL11ULB */ |
---|
| 16146 | +/* endif WL11ULB */ |
---|
8527 | 16147 | |
---|
8528 | | -#if defined(WLRCC) |
---|
8529 | | -#define MAX_ROAM_CHANNEL 20 |
---|
| 16148 | +#define WL_MESH_IOCTL_VERSION 1 |
---|
| 16149 | +#define MESH_IOC_BUFSZ 512 /* sufficient ioc buff size for mesh */ |
---|
| 16150 | + |
---|
| 16151 | +#ifdef WLMESH |
---|
| 16152 | +typedef struct mesh_peer_info_ext { |
---|
| 16153 | + mesh_peer_info_t peer_info; |
---|
| 16154 | + uint8 pad1; |
---|
| 16155 | + uint16 local_aid; /* AID generated by *local* to peer */ |
---|
| 16156 | + uint32 entry_state; /* see MESH_PEER_ENTRY_STATE_ACTIVE etc; valid |
---|
| 16157 | + * ONLY for internal peering requests |
---|
| 16158 | + */ |
---|
| 16159 | + int8 rssi; |
---|
| 16160 | + uint8 pad2; |
---|
| 16161 | + struct ether_addr ea; /* peer ea */ |
---|
| 16162 | +} mesh_peer_info_ext_t; |
---|
| 16163 | + |
---|
| 16164 | +/* #ifdef WLMESH */ |
---|
| 16165 | +typedef struct mesh_peer_info_dump { |
---|
| 16166 | + uint32 buflen; |
---|
| 16167 | + uint32 version; |
---|
| 16168 | + uint16 count; /* number of results */ |
---|
| 16169 | + uint16 remaining; /* remaining rsults */ |
---|
| 16170 | + mesh_peer_info_ext_t mpi_ext[1]; |
---|
| 16171 | +} mesh_peer_info_dump_t; |
---|
| 16172 | +#define WL_MESH_PEER_RES_FIXED_SIZE (sizeof(mesh_peer_info_dump_t) - sizeof(mesh_peer_info_ext_t)) |
---|
| 16173 | + |
---|
| 16174 | +#endif /* WLMESH */ |
---|
| 16175 | +/* container for mesh iovtls & events */ |
---|
| 16176 | +typedef struct wl_mesh_ioc { |
---|
| 16177 | + uint16 version; /* interface command or event version */ |
---|
| 16178 | + uint16 id; /* mesh ioctl cmd ID */ |
---|
| 16179 | + uint16 len; /* total length of all tlv records in data[] */ |
---|
| 16180 | + uint16 pad; /* pad to be 32 bit aligment */ |
---|
| 16181 | + uint8 data[]; /* var len payload of bcm_xtlv_t type */ |
---|
| 16182 | +} wl_mesh_ioc_t; |
---|
| 16183 | + |
---|
| 16184 | +enum wl_mesh_cmds { |
---|
| 16185 | + WL_MESH_CMD_ENABLE = 1, |
---|
| 16186 | + WL_MESH_CMD_JOIN = 2, |
---|
| 16187 | + WL_MESH_CMD_PEER_STATUS = 3, |
---|
| 16188 | + WL_MESH_CMD_ADD_ROUTE = 4, |
---|
| 16189 | + WL_MESH_CMD_DEL_ROUTE = 5, |
---|
| 16190 | + WL_MESH_CMD_ADD_FILTER = 6, |
---|
| 16191 | + WL_MESH_CMD_ENAB_AL_METRIC = 7 |
---|
| 16192 | +}; |
---|
| 16193 | + |
---|
| 16194 | +enum wl_mesh_cmd_xtlv_id { |
---|
| 16195 | + WL_MESH_XTLV_ENABLE = 1, |
---|
| 16196 | + WL_MESH_XTLV_JOIN = 2, |
---|
| 16197 | + WL_MESH_XTLV_STATUS = 3, |
---|
| 16198 | + WL_MESH_XTLV_ADD_ROUTE = 4, |
---|
| 16199 | + WL_MESH_XTLV_DEL_ROUTE = 5, |
---|
| 16200 | + WL_MESH_XTLV_ADD_FILTER = 6, |
---|
| 16201 | + WL_MESH_XTLV_ENAB_AIRLINK = 7 |
---|
| 16202 | +}; |
---|
| 16203 | +/* endif WLMESH */ |
---|
| 16204 | + |
---|
| 16205 | +/* Fast BSS Transition parameter configuration */ |
---|
| 16206 | +#define FBT_PARAM_CURRENT_VERSION 0 |
---|
| 16207 | + |
---|
| 16208 | +typedef struct _wl_fbt_params { |
---|
| 16209 | + uint16 version; /* version of the structure |
---|
| 16210 | + * as defined by FBT_PARAM_CURRENT_VERSION |
---|
| 16211 | + */ |
---|
| 16212 | + uint16 length; /* length of the entire structure */ |
---|
| 16213 | + |
---|
| 16214 | + uint16 param_type; /* type of parameter defined below */ |
---|
| 16215 | + uint16 param_len; /* length of the param_value */ |
---|
| 16216 | + uint8 param_value[1]; /* variable length */ |
---|
| 16217 | +} wl_fbt_params_t; |
---|
| 16218 | + |
---|
| 16219 | +#define WL_FBT_PARAM_TYPE_RSNIE 0 |
---|
| 16220 | +#define WL_FBT_PARAM_TYPE_FTIE 0x1 |
---|
| 16221 | +#define WL_FBT_PARAM_TYPE_SNONCE 0x2 |
---|
| 16222 | +#define WL_FBT_PARAM_TYPE_MDE 0x3 |
---|
| 16223 | +#define WL_FBT_PARAM_TYPE_PMK_R0_NAME 0x4 |
---|
| 16224 | +#define WL_FBT_PARAM_TYPE_R0_KHID 0x5 |
---|
| 16225 | +#define WL_FBT_PARAM_TYPE_R1_KHID 0x6 |
---|
| 16226 | +#define WL_FBT_PARAM_TYPE_FIRST_INVALID 0x7 |
---|
| 16227 | + |
---|
| 16228 | +/* Assoc Mgr commands for fine control of assoc */ |
---|
| 16229 | +#define WL_ASSOC_MGR_CURRENT_VERSION 0x0 |
---|
8530 | 16230 | |
---|
8531 | 16231 | typedef struct { |
---|
8532 | | - int n; |
---|
| 16232 | + uint16 version; /* version of the structure as |
---|
| 16233 | + * defined by WL_ASSOC_MGR_CURRENT_VERSION |
---|
| 16234 | + */ |
---|
| 16235 | + uint16 length; /* length of the entire structure */ |
---|
| 16236 | + |
---|
| 16237 | + uint16 cmd; |
---|
| 16238 | + uint16 params; |
---|
| 16239 | +} wl_assoc_mgr_cmd_t; |
---|
| 16240 | + |
---|
| 16241 | +#define WL_ASSOC_MGR_CMD_PAUSE_ON_EVT 0 /* have assoc pause on certain events */ |
---|
| 16242 | +#define WL_ASSOC_MGR_CMD_ABORT_ASSOC 1 |
---|
| 16243 | + |
---|
| 16244 | +#define WL_ASSOC_MGR_PARAMS_EVENT_NONE 0 /* use this to resume as well as clear */ |
---|
| 16245 | +#define WL_ASSOC_MGR_PARAMS_PAUSE_EVENT_AUTH_RESP 1 |
---|
| 16246 | + |
---|
| 16247 | +#define WL_WINVER_STRUCT_VER_1 (1) |
---|
| 16248 | + |
---|
| 16249 | +typedef struct wl_winver { |
---|
| 16250 | + |
---|
| 16251 | + /* Version and length of this structure. Length includes all fields in wl_winver_t */ |
---|
| 16252 | + uint16 struct_version; |
---|
| 16253 | + uint16 struct_length; |
---|
| 16254 | + |
---|
| 16255 | + /* Windows operating system version info (Microsoft provided) */ |
---|
| 16256 | + struct { |
---|
| 16257 | + uint32 major_ver; |
---|
| 16258 | + uint32 minor_ver; |
---|
| 16259 | + uint32 build; |
---|
| 16260 | + } os_runtime; |
---|
| 16261 | + |
---|
| 16262 | + /* NDIS runtime version (Microsoft provided) */ |
---|
| 16263 | + struct { |
---|
| 16264 | + uint16 major_ver; |
---|
| 16265 | + uint16 minor_ver; |
---|
| 16266 | + } ndis_runtime; |
---|
| 16267 | + |
---|
| 16268 | + /* NDIS Driver version (Broadcom provided) */ |
---|
| 16269 | + struct { |
---|
| 16270 | + uint16 major_ver; |
---|
| 16271 | + uint16 minor_ver; |
---|
| 16272 | + } ndis_driver; |
---|
| 16273 | + |
---|
| 16274 | + /* WDI Upper Edge (UE) Driver version (Microsoft provided) */ |
---|
| 16275 | + struct { |
---|
| 16276 | + uint8 major_ver; |
---|
| 16277 | + uint8 minor_ver; |
---|
| 16278 | + uint8 suffix; |
---|
| 16279 | + } wdi_ue; |
---|
| 16280 | + |
---|
| 16281 | + /* WDI Lower Edge (LE) Driver version (Broadcom provided) */ |
---|
| 16282 | + struct { |
---|
| 16283 | + uint8 major_ver; |
---|
| 16284 | + uint8 minor_ver; |
---|
| 16285 | + uint8 suffix; |
---|
| 16286 | + } wdi_le; |
---|
| 16287 | + uint8 PAD[2]; |
---|
| 16288 | +} wl_winver_t; |
---|
| 16289 | + |
---|
| 16290 | +/* defined(WLRCC) || defined(ROAM_CHANNEL_CACHE) */ |
---|
| 16291 | +#define MAX_ROAM_CHANNEL 20 |
---|
| 16292 | +typedef struct { |
---|
| 16293 | + int32 n; |
---|
8533 | 16294 | chanspec_t channels[MAX_ROAM_CHANNEL]; |
---|
8534 | 16295 | } wl_roam_channel_list_t; |
---|
8535 | | -#endif |
---|
| 16296 | +/* endif RCC || ROAM_CHANNEL_CACHE */ |
---|
8536 | 16297 | |
---|
8537 | | -#ifdef MFP |
---|
8538 | 16298 | /* values for IOV_MFP arg */ |
---|
8539 | 16299 | enum { |
---|
8540 | 16300 | WL_MFP_NONE = 0, |
---|
8541 | 16301 | WL_MFP_CAPABLE, |
---|
8542 | 16302 | WL_MFP_REQUIRED |
---|
8543 | 16303 | }; |
---|
8544 | | -#endif /* MFP */ |
---|
| 16304 | + |
---|
| 16305 | +typedef enum { |
---|
| 16306 | + CHANSW_UNKNOWN = 0, /* channel switch due to unknown reason */ |
---|
| 16307 | + CHANSW_SCAN = 1, /* channel switch due to scan */ |
---|
| 16308 | + CHANSW_PHYCAL = 2, /* channel switch due to phy calibration */ |
---|
| 16309 | + CHANSW_INIT = 3, /* channel set at WLC up time */ |
---|
| 16310 | + CHANSW_ASSOC = 4, /* channel switch due to association */ |
---|
| 16311 | + CHANSW_ROAM = 5, /* channel switch due to roam */ |
---|
| 16312 | + CHANSW_MCHAN = 6, /* channel switch triggered by mchan module */ |
---|
| 16313 | + CHANSW_IOVAR = 7, /* channel switch due to IOVAR */ |
---|
| 16314 | + CHANSW_CSA_DFS = 8, /* channel switch due to chan switch announcement from AP */ |
---|
| 16315 | + CHANSW_APCS = 9, /* Channel switch from AP channel select module */ |
---|
| 16316 | + CHANSW_AWDL = 10, /* channel switch due to AWDL */ |
---|
| 16317 | + CHANSW_FBT = 11, /* Channel switch from FBT module for action frame response */ |
---|
| 16318 | + CHANSW_UPDBW = 12, /* channel switch at update bandwidth */ |
---|
| 16319 | + CHANSW_ULB = 13, /* channel switch at ULB */ |
---|
| 16320 | + CHANSW_LAST = 14 /* last channel switch reason */ |
---|
| 16321 | +} chansw_reason_t; |
---|
8545 | 16322 | |
---|
8546 | 16323 | /* |
---|
8547 | 16324 | * WOWL unassociated mode power svae pattern. |
---|
.. | .. |
---|
8551 | 16328 | uint16 sleep_interval; |
---|
8552 | 16329 | } wowl_radio_duty_cycle_t; |
---|
8553 | 16330 | |
---|
8554 | | -#define WLC_IOCTL_VERSION_PEER_RSSI 1 |
---|
8555 | | -#define WLC_IOCTL_CMD_PEER_RSSI_PEERS_CNT 1 |
---|
8556 | | -#define WLC_IOCTL_CMD_PEER_RSSI_PEER_REG 2 |
---|
8557 | | -#define WLC_IOCTL_CMD_PEER_RSSI_PEER_RSSI 3 |
---|
| 16331 | +typedef struct nd_ra_ol_limits { |
---|
| 16332 | + uint16 version; /* version of the iovar buffer */ |
---|
| 16333 | + uint16 type; /* type of data provided */ |
---|
| 16334 | + uint16 length; /* length of the entire structure */ |
---|
| 16335 | + uint16 pad1; /* pad union to 4 byte boundary */ |
---|
| 16336 | + union { |
---|
| 16337 | + struct { |
---|
| 16338 | + uint16 min_time; /* seconds, min time for RA offload hold */ |
---|
| 16339 | + uint16 lifetime_percent; |
---|
| 16340 | + /* percent, lifetime percentage for offload hold time */ |
---|
| 16341 | + } lifetime_relative; |
---|
| 16342 | + struct { |
---|
| 16343 | + uint16 hold_time; /* seconds, RA offload hold time */ |
---|
| 16344 | + uint16 pad2; /* unused */ |
---|
| 16345 | + } fixed; |
---|
| 16346 | + } limits; |
---|
| 16347 | +} nd_ra_ol_limits_t; |
---|
8558 | 16348 | |
---|
8559 | | -typedef struct wl_peer_rssi { |
---|
8560 | | - int32 version; |
---|
8561 | | - int32 cmd; |
---|
8562 | | - int32 max_cnt; |
---|
8563 | | - int32 cur_val; |
---|
8564 | | - struct ether_addr ea; |
---|
8565 | | -} wl_peer_rssi_t; |
---|
| 16349 | +#define ND_RA_OL_LIMITS_VER 1 |
---|
8566 | 16350 | |
---|
8567 | | -#define GPIO_WAKE_PAYLOAD_MAXSIZE 1024 |
---|
8568 | | -#define MAX_GPIO_WAKE_INT_SIZE (sizeof(wl_gpio_wake_int_t)+GPIO_WAKE_PAYLOAD_MAXSIZE-1) |
---|
| 16351 | +/* nd_ra_ol_limits sub-types */ |
---|
| 16352 | +#define ND_RA_OL_LIMITS_REL_TYPE 0 /* relative, percent of RA lifetime */ |
---|
| 16353 | +#define ND_RA_OL_LIMITS_FIXED_TYPE 1 /* fixed time */ |
---|
8569 | 16354 | |
---|
8570 | | -enum { |
---|
8571 | | - GPIO_WAKE_PROTO_TCP = 0, |
---|
8572 | | - GPIO_WAKE_PROTO_RAW, |
---|
8573 | | -}; |
---|
8574 | | - |
---|
8575 | | -typedef struct wl_gpio_wake_int_s { |
---|
8576 | | - uint8 enable; |
---|
8577 | | - uint8 proto; |
---|
8578 | | - uint8 idx; |
---|
8579 | | - uint16 data_len; |
---|
8580 | | - uint8 data[1]; |
---|
8581 | | -} wl_gpio_wake_int_t; |
---|
| 16355 | +/* buffer lengths for the different nd_ra_ol_limits types */ |
---|
| 16356 | +#define ND_RA_OL_LIMITS_REL_TYPE_LEN 12 |
---|
| 16357 | +#define ND_RA_OL_LIMITS_FIXED_TYPE_LEN 10 |
---|
8582 | 16358 | |
---|
8583 | 16359 | /* |
---|
8584 | | - * DHCP lease time renew offload definitions |
---|
| 16360 | + * Temperature Throttling control mode |
---|
| 16361 | + */ |
---|
| 16362 | +typedef struct wl_temp_control { |
---|
| 16363 | + uint8 enable; |
---|
| 16364 | + uint8 PAD; |
---|
| 16365 | + uint16 control_bit; |
---|
| 16366 | +} wl_temp_control_t; |
---|
| 16367 | + |
---|
| 16368 | +/* SensorHub Interworking mode */ |
---|
| 16369 | + |
---|
| 16370 | +#define SHUB_CONTROL_VERSION 1 |
---|
| 16371 | +#define SHUB_CONTROL_LEN 12 |
---|
| 16372 | + |
---|
| 16373 | +typedef struct { |
---|
| 16374 | + uint16 verison; |
---|
| 16375 | + uint16 length; |
---|
| 16376 | + uint16 cmd; |
---|
| 16377 | + uint16 op_mode; |
---|
| 16378 | + uint16 interval; |
---|
| 16379 | + uint16 enable; |
---|
| 16380 | +} shub_control_t; |
---|
| 16381 | + |
---|
| 16382 | +/* WLC_MAJOR_VER <= 5 */ |
---|
| 16383 | +/* Data structures for non-TLV format */ |
---|
| 16384 | + |
---|
| 16385 | +/* Data structures for rsdb caps */ |
---|
| 16386 | +/* |
---|
| 16387 | + * The flags field of the rsdb_caps_response is designed to be |
---|
| 16388 | + * a Bit Mask. As of now only Bit 0 is used as mentioned below. |
---|
| 16389 | + */ |
---|
| 16390 | + |
---|
| 16391 | +/* Bit-0 in flags is used to indicate if the cores can operate synchronously |
---|
| 16392 | +* i.e either as 2x2 MIMO or 2(1x1 SISO). This is true only for 4349 variants |
---|
| 16393 | +* 0 - device can operate only in rsdb mode (eg: 4364) |
---|
| 16394 | +* 1 - device can operate in both rsdb and mimo (eg : 4359 variants) |
---|
| 16395 | +*/ |
---|
| 16396 | + |
---|
| 16397 | +#define WL_RSDB_CAPS_VER 2 |
---|
| 16398 | +#define SYNCHRONOUS_OPERATION_TRUE (1 << 0) |
---|
| 16399 | +#define WL_RSDB_CAPS_FIXED_LEN OFFSETOF(rsdb_caps_response_t, num_chains) |
---|
| 16400 | + |
---|
| 16401 | +typedef struct rsdb_caps_response { |
---|
| 16402 | + uint8 ver; /* Version */ |
---|
| 16403 | + uint8 len; /* length of this structure excluding ver and len */ |
---|
| 16404 | + uint8 rsdb; /* TRUE for rsdb chip */ |
---|
| 16405 | + uint8 num_of_cores; /* no of d11 cores */ |
---|
| 16406 | + uint16 flags; /* Flags to indicate various capabilities */ |
---|
| 16407 | + uint8 num_chains[1]; /* Tx/Rx chains for each core */ |
---|
| 16408 | +} rsdb_caps_response_t; |
---|
| 16409 | + |
---|
| 16410 | +/* Data structures for rsdb bands */ |
---|
| 16411 | + |
---|
| 16412 | +#define WL_RSDB_BANDS_VER 2 |
---|
| 16413 | +#define WL_RSDB_BANDS_FIXED_LEN OFFSETOF(rsdb_bands_t, band) |
---|
| 16414 | + |
---|
| 16415 | +typedef struct rsdb_bands |
---|
| 16416 | +{ |
---|
| 16417 | + uint8 ver; |
---|
| 16418 | + uint8 len; |
---|
| 16419 | + uint16 num_cores; /* num of D11 cores */ |
---|
| 16420 | + int16 band[1]; /* The band operating on each of the d11 cores */ |
---|
| 16421 | +} rsdb_bands_t; |
---|
| 16422 | + |
---|
| 16423 | +/* rsdb config */ |
---|
| 16424 | + |
---|
| 16425 | +#define WL_RSDB_CONFIG_VER 3 |
---|
| 16426 | +#define ALLOW_SIB_PARALLEL_SCAN (1 << 0) |
---|
| 16427 | +#define MAX_BANDS 2 |
---|
| 16428 | + |
---|
| 16429 | +#define WL_RSDB_CONFIG_LEN sizeof(rsdb_config_t) |
---|
| 16430 | + |
---|
| 16431 | +typedef uint8 rsdb_opmode_t; |
---|
| 16432 | +typedef uint32 rsdb_flags_t; |
---|
| 16433 | + |
---|
| 16434 | +typedef enum rsdb_modes { |
---|
| 16435 | + WLC_SDB_MODE_NOSDB_MAIN = 1, /* 2X2 or MIMO mode (applicable only for 4355) */ |
---|
| 16436 | + WLC_SDB_MODE_NOSDB_AUX = 2, |
---|
| 16437 | + WLC_SDB_MODE_SDB_MAIN = 3, /* This is RSDB mode(default) applicable only for 4364 */ |
---|
| 16438 | + WLC_SDB_MODE_SDB_AUX = 4, |
---|
| 16439 | + WLC_SDB_MODE_SDB_AUTO = 5, /* Same as WLC_RSDB_MODE_RSDB(1+1) mode above */ |
---|
| 16440 | +} rsdb_modes_t; |
---|
| 16441 | + |
---|
| 16442 | +typedef struct rsdb_config { |
---|
| 16443 | + uint8 ver; |
---|
| 16444 | + uint8 len; |
---|
| 16445 | + uint16 reserved; |
---|
| 16446 | + rsdb_opmode_t non_infra_mode; |
---|
| 16447 | + rsdb_opmode_t infra_mode[MAX_BANDS]; |
---|
| 16448 | + rsdb_flags_t flags[MAX_BANDS]; |
---|
| 16449 | + rsdb_opmode_t current_mode; /* Valid only in GET, returns the current mode */ |
---|
| 16450 | + uint8 pad[3]; |
---|
| 16451 | +} rsdb_config_t; |
---|
| 16452 | + |
---|
| 16453 | +/* WLC_MAJOR_VER > =5 */ |
---|
| 16454 | +/* TLV definitions and data structures for rsdb subcmds */ |
---|
| 16455 | + |
---|
| 16456 | +enum wl_rsdb_cmd_ids { |
---|
| 16457 | + /* RSDB ioctls */ |
---|
| 16458 | + WL_RSDB_CMD_VER = 0, |
---|
| 16459 | + WL_RSDB_CMD_CAPS = 1, |
---|
| 16460 | + WL_RSDB_CMD_BANDS = 2, |
---|
| 16461 | + WL_RSDB_CMD_CONFIG = 3, |
---|
| 16462 | + /* Add before this !! */ |
---|
| 16463 | + WL_RSDB_CMD_LAST |
---|
| 16464 | +}; |
---|
| 16465 | +#define WL_RSDB_IOV_VERSION 0x1 |
---|
| 16466 | + |
---|
| 16467 | +typedef struct rsdb_caps_response_v1 { |
---|
| 16468 | + uint8 rsdb; /* TRUE for rsdb chip */ |
---|
| 16469 | + uint8 num_of_cores; /* no of d11 cores */ |
---|
| 16470 | + uint16 flags; /* Flags to indicate various capabilities */ |
---|
| 16471 | + uint8 num_chains[MAX_NUM_D11CORES]; /* Tx/Rx chains for each core */ |
---|
| 16472 | + uint8 band_cap[MAX_NUM_D11CORES]; /* band cap bitmask per slice */ |
---|
| 16473 | +} rsdb_caps_response_v1_t; |
---|
| 16474 | + |
---|
| 16475 | +typedef struct rsdb_bands_v1 |
---|
| 16476 | +{ |
---|
| 16477 | + uint8 num_cores; /* num of D11 cores */ |
---|
| 16478 | + uint8 pad; /* padding bytes for 4 byte alignment */ |
---|
| 16479 | + int8 band[MAX_NUM_D11CORES]; /* The band operating on each of the d11 cores */ |
---|
| 16480 | +} rsdb_bands_v1_t; |
---|
| 16481 | + |
---|
| 16482 | +typedef struct rsdb_config_xtlv { |
---|
| 16483 | + rsdb_opmode_t reserved1; /* Non_infra mode is no more applicable */ |
---|
| 16484 | + rsdb_opmode_t infra_mode[MAX_BANDS]; /* Target mode for Infra association */ |
---|
| 16485 | + uint8 pad; /* pad bytes for 4 byte alignment */ |
---|
| 16486 | + rsdb_flags_t flags[MAX_BANDS]; |
---|
| 16487 | + rsdb_opmode_t current_mode; /* GET only; has current mode of operation */ |
---|
| 16488 | + uint8 pad1[3]; |
---|
| 16489 | +} rsdb_config_xtlv_t; |
---|
| 16490 | + |
---|
| 16491 | +/* Definitions for slot_bss chanseq iovar */ |
---|
| 16492 | +#define WL_SLOT_BSS_VERSION 1 |
---|
| 16493 | + |
---|
| 16494 | +/* critical slots max size */ |
---|
| 16495 | +#define WL_SLOTTED_BSS_CS_BMP_CFG_MAX_SZ 128 /* arbitrary */ |
---|
| 16496 | + |
---|
| 16497 | +enum wl_slotted_bss_cmd_id { |
---|
| 16498 | + WL_SLOTTED_BSS_CMD_VER = 0, |
---|
| 16499 | + WL_SLOTTED_BSS_CMD_CHANSEQ = 1, |
---|
| 16500 | + WL_SLOTTED_BSS_CMD_CS_BMP = 2 /* critical slots bitmap */ |
---|
| 16501 | +}; |
---|
| 16502 | +typedef uint16 chan_seq_type_t; |
---|
| 16503 | +enum chan_seq_type { |
---|
| 16504 | + CHAN_SEQ_TYPE_AWDL = 1, |
---|
| 16505 | + CHAN_SEQ_TYPE_SLICE = 2, |
---|
| 16506 | + CHAN_SEQ_TYPE_NAN = 3 |
---|
| 16507 | +}; |
---|
| 16508 | +typedef uint8 sched_flag_t; |
---|
| 16509 | +enum sched_flag { |
---|
| 16510 | + NO_SDB_SCHED = 0x1, |
---|
| 16511 | + SDB_TDM_SCHED = 0x2, |
---|
| 16512 | + SDB_SPLIT_BAND_SCHED = 0x4, /* default mode for 4357 */ |
---|
| 16513 | + MAIN_ONLY = 0x8, |
---|
| 16514 | + AUX_ONLY = 0x10, |
---|
| 16515 | + SDB_DUAL_TIME = (MAIN_ONLY | AUX_ONLY), |
---|
| 16516 | + NO_SDB_MAIN_ONLY = (NO_SDB_SCHED | MAIN_ONLY), /* default mode for 4364 */ |
---|
| 16517 | + SDB_TDM_SCHED_MAIN = (SDB_TDM_SCHED | MAIN_ONLY), |
---|
| 16518 | + SDB_TDM_SCHED_AUX = (SDB_TDM_SCHED | AUX_ONLY), |
---|
| 16519 | + SDB_TDM_SCHED_DUAL_TIME = (SDB_TDM_SCHED | SDB_DUAL_TIME), |
---|
| 16520 | + SDB_SPLIT_BAND_SCHED_DUAL_TIME = (SDB_SPLIT_BAND_SCHED | SDB_DUAL_TIME) |
---|
| 16521 | +}; |
---|
| 16522 | + |
---|
| 16523 | +typedef struct chan_seq_tlv_data { |
---|
| 16524 | + uint32 flags; |
---|
| 16525 | + uint8 data[1]; |
---|
| 16526 | +} chan_seq_tlv_data_t; |
---|
| 16527 | + |
---|
| 16528 | +typedef struct chan_seq_tlv { |
---|
| 16529 | + chan_seq_type_t type; |
---|
| 16530 | + uint16 len; |
---|
| 16531 | + chan_seq_tlv_data_t chanseq_data[1]; |
---|
| 16532 | +} chan_seq_tlv_t; |
---|
| 16533 | + |
---|
| 16534 | +typedef struct sb_channel_sequence { |
---|
| 16535 | + sched_flag_t sched_flags; /* (sdb-tdm or sdb-sb or Dual-Time) */ |
---|
| 16536 | + uint8 num_seq; /* number of chan_seq_tlv following */ |
---|
| 16537 | + uint16 pad; |
---|
| 16538 | + chan_seq_tlv_t seq[1]; |
---|
| 16539 | +} sb_channel_sequence_t; |
---|
| 16540 | + |
---|
| 16541 | +typedef struct slice_chan_seq { |
---|
| 16542 | + uint8 slice_index; /* 0(Main) or 1 (Aux) */ |
---|
| 16543 | + uint8 num_chanspecs; |
---|
| 16544 | + uint8 dur; |
---|
| 16545 | + uint8 pad; |
---|
| 16546 | + chanspec_t chanspecs[1]; |
---|
| 16547 | +} slice_chan_seq_t; |
---|
| 16548 | + |
---|
| 16549 | +#define SLOT_BSS_SLICE_TYPE_DUR_MAX_RANGE 2u |
---|
| 16550 | +#define SLOTTED_BSS_AGGR_EN (1 << 0) /* Bitmap of mode */ |
---|
| 16551 | +#define SLOTTED_BSS_AGGR_LIMIT_DUR (1 << 1) /* Jira 49554 */ |
---|
| 16552 | + |
---|
| 16553 | +#define WL_SLICE_CHAN_SEQ_FIXED_LEN OFFSETOF(slice_chan_seq_t, chanspecs) |
---|
| 16554 | +/* Definitions for slotted_bss stats */ |
---|
| 16555 | +#define SBSS_STATS_VERSION 1 |
---|
| 16556 | +#define SBSS_STATS_CURRENT_VERSION SBSS_STATS_VERSION |
---|
| 16557 | + |
---|
| 16558 | +#define SBSS_MAX_CHAN_STATS 4 |
---|
| 16559 | + |
---|
| 16560 | +typedef struct sbss_core_stats { |
---|
| 16561 | + uint32 sb_slot_start; |
---|
| 16562 | + uint32 sb_slot_end; |
---|
| 16563 | + uint32 sb_slot_skip; |
---|
| 16564 | + uint32 mismatch_count; |
---|
| 16565 | +} sbss_core_stats_t; |
---|
| 16566 | + |
---|
| 16567 | +typedef struct sbss_chan_stats { |
---|
| 16568 | + chanspec_t chanspec; |
---|
| 16569 | + uint32 slot_start; |
---|
| 16570 | + uint32 slot_end; |
---|
| 16571 | + uint32 slot_skip; |
---|
| 16572 | +} sbss_chan_stats_t; |
---|
| 16573 | + |
---|
| 16574 | +typedef struct sbss_stats_v1 { |
---|
| 16575 | + uint16 version; |
---|
| 16576 | + uint16 length; |
---|
| 16577 | + sbss_core_stats_t corestats[MAX_NUM_D11CORES]; |
---|
| 16578 | + sbss_chan_stats_t sbss_chanstats[MAX_NUM_D11CORES][SBSS_MAX_CHAN_STATS]; |
---|
| 16579 | +} sbss_stats_t; |
---|
| 16580 | + |
---|
| 16581 | +/* slotted bss critical slots */ |
---|
| 16582 | +typedef struct wl_sbss_cs_bmp_s { |
---|
| 16583 | + uint8 bitmap_len; |
---|
| 16584 | + uint8 pad[3]; |
---|
| 16585 | + uint8 bitmap[]; |
---|
| 16586 | +} wl_sbss_cs_bmp_t; |
---|
| 16587 | + |
---|
| 16588 | +typedef struct sim_pm_params { |
---|
| 16589 | + uint32 enabled; |
---|
| 16590 | + uint16 cycle; |
---|
| 16591 | + uint16 up; |
---|
| 16592 | +} sim_pm_params_t; |
---|
| 16593 | + |
---|
| 16594 | +/* Digital napping status */ |
---|
| 16595 | +#define WL_NAP_STATUS_VERSION_1 1 |
---|
| 16596 | +typedef struct wl_nap_status_v1 { |
---|
| 16597 | + uint16 version; /* structure version */ |
---|
| 16598 | + uint16 len; /* length of returned data */ |
---|
| 16599 | + uint16 fw_status; /* bitmask of FW disable reasons */ |
---|
| 16600 | + uint8 hw_status; /* bitmask for actual HW state info */ |
---|
| 16601 | + uint8 slice_index; /* which slice this represents */ |
---|
| 16602 | + uint32 total_disable_dur; /* total time (ms) disabled for fw_status */ |
---|
| 16603 | +} wl_nap_status_v1_t; |
---|
| 16604 | + |
---|
| 16605 | +/* Bits for fw_status */ |
---|
| 16606 | +#define NAP_DISABLED_HOST 0x0001 /* Host has disabled through nap_enable */ |
---|
| 16607 | +#define NAP_DISABLED_RSSI 0x0002 /* Disabled because of nap_rssi_threshold */ |
---|
| 16608 | +#define NAP_DISABLED_SCAN 0x0004 /* Disabled because of scan */ |
---|
| 16609 | +#define NAP_DISABLED_ASSOC 0x0008 /* Disabled because of association */ |
---|
| 16610 | +#define NAP_DISABLED_LTE 0x0010 /* Disabled because of LTE */ |
---|
| 16611 | +#define NAP_DISABLED_ACI 0x0020 /* Disabled because of ACI mitigation */ |
---|
| 16612 | + |
---|
| 16613 | +/* Bits for hw_status */ |
---|
| 16614 | +#define NAP_HWCFG 0x01 /* State of NAP config bit in phy HW */ |
---|
| 16615 | +#define NAP_NOCLK 0x80 /* No clock to read HW (e.g. core down) */ |
---|
| 16616 | + |
---|
| 16617 | +/* ifdef WL_NATOE */ |
---|
| 16618 | +#define WL_NATOE_IOCTL_VERSION 1 |
---|
| 16619 | +#define WL_NATOE_IOC_BUFSZ 512 /* sufficient ioc buff size for natoe */ |
---|
| 16620 | +#define WL_NATOE_DBG_STATS_BUFSZ 2048 |
---|
| 16621 | +#define NATOE_FLAGS_ENAB_MASK 0x1 |
---|
| 16622 | +#define NATOE_FLAGS_ACTIVE_MASK 0x2 |
---|
| 16623 | +#define NATOE_FLAGS_PUBNW_MASK 0x4 |
---|
| 16624 | +#define NATOE_FLAGS_PVTNW_MASK 0x8 |
---|
| 16625 | +#define NATOE_FLAGS_ENAB_SHFT_MASK 0 |
---|
| 16626 | +#define NATOE_FLAGS_ACTIVE_SHFT_MASK 1 |
---|
| 16627 | +#define NATOE_FLAGS_PUBNW_SHFT_MASK 2 |
---|
| 16628 | +#define NATOE_FLAGS_PVTNW_SHFT_MASK 3 |
---|
| 16629 | +#define NATOE_FLAGS_PUB_NW_UP (1 << NATOE_FLAGS_PUBNW_SHFT_MASK) |
---|
| 16630 | +#define NATOE_FLAGS_PVT_NW_UP (1 << NATOE_FLAGS_PVTNW_SHFT_MASK) |
---|
| 16631 | + |
---|
| 16632 | +#define PCIE_FRWDPKT_STATS_VERSION 1 |
---|
| 16633 | + |
---|
| 16634 | +/* Module version is 1 for IGUANA */ |
---|
| 16635 | +#define WL_NATOE_MODULE_VER_1 1 |
---|
| 16636 | +/* Module version is 2 for Lemur */ |
---|
| 16637 | +#define WL_NATOE_MODULE_VER_2 2 |
---|
| 16638 | + |
---|
| 16639 | +/* WL_NATOE_CMD_MOD_VER */ |
---|
| 16640 | +typedef uint16 wl_natoe_ver_t; |
---|
| 16641 | +/* config natoe STA and AP IP's structure */ |
---|
| 16642 | +typedef struct { |
---|
| 16643 | + uint32 sta_ip; |
---|
| 16644 | + uint32 sta_netmask; |
---|
| 16645 | + uint32 sta_router_ip; |
---|
| 16646 | + uint32 sta_dnsip; |
---|
| 16647 | + uint32 ap_ip; |
---|
| 16648 | + uint32 ap_netmask; |
---|
| 16649 | +} wl_natoe_config_ips_t; |
---|
| 16650 | + |
---|
| 16651 | +/* natoe ports config structure */ |
---|
| 16652 | +typedef struct { |
---|
| 16653 | + uint16 start_port_num; |
---|
| 16654 | + uint16 no_of_ports; |
---|
| 16655 | +} wl_natoe_ports_config_t; |
---|
| 16656 | + |
---|
| 16657 | +/* natoe ports exception info */ |
---|
| 16658 | +typedef struct { |
---|
| 16659 | + uint16 sta_port_num; |
---|
| 16660 | + uint16 dst_port_num; /* for SIP type protocol, dst_port_num info can be ignored by FW */ |
---|
| 16661 | + uint32 ip; /* for SIP ip is APcli_ip and for port clash it is dst_ip */ |
---|
| 16662 | + uint8 entry_type; /* Create/Destroy */ |
---|
| 16663 | + uint8 pad[3]; |
---|
| 16664 | +} wl_natoe_exception_port_t; |
---|
| 16665 | + |
---|
| 16666 | +/* container for natoe ioctls & events */ |
---|
| 16667 | +typedef struct wl_natoe_ioc { |
---|
| 16668 | + uint16 version; /* interface command or event version */ |
---|
| 16669 | + uint16 id; /* natoe ioctl cmd ID */ |
---|
| 16670 | + uint16 len; /* total length of all tlv records in data[] */ |
---|
| 16671 | + uint16 pad; /* pad to be 32 bit aligment */ |
---|
| 16672 | + uint8 data[]; /* var len payload of bcm_xtlv_t type */ |
---|
| 16673 | +} wl_natoe_ioc_t; |
---|
| 16674 | + |
---|
| 16675 | +typedef struct wl_natoe_pool_stats_v1 { |
---|
| 16676 | + /* For debug purposes */ |
---|
| 16677 | + uint16 poolreorg_cnt; |
---|
| 16678 | + uint16 poolrevert_cnt; |
---|
| 16679 | + uint16 txfrag_state; |
---|
| 16680 | + uint16 rxfrag_state; |
---|
| 16681 | + uint16 txfrag_plen; |
---|
| 16682 | + uint16 rxfrag_plen; |
---|
| 16683 | + uint16 tx_pavail; |
---|
| 16684 | + uint16 rx_pavail; |
---|
| 16685 | + uint16 txmin_bkup_bufs; |
---|
| 16686 | + uint16 rxmin_bkup_bufs; |
---|
| 16687 | + uint16 pktpool_sbuf_alloc; |
---|
| 16688 | + uint16 pktpool_plen; |
---|
| 16689 | + uint16 pktpool_pavail; |
---|
| 16690 | + /* Peak shared buffer count in all iterations */ |
---|
| 16691 | + uint16 sbuf_peak; |
---|
| 16692 | + /* Peak shared buffer count in current D3 iteration */ |
---|
| 16693 | + uint16 sbuf_peak_cur; |
---|
| 16694 | +} wl_natoe_pool_stats_v1_t; |
---|
| 16695 | + |
---|
| 16696 | +typedef struct wl_natoe_arp_entry_v1 { |
---|
| 16697 | + struct ipv4_addr ip; |
---|
| 16698 | + struct ether_addr mac_addr; |
---|
| 16699 | + uint8 lifetime; |
---|
| 16700 | + uint8 flags; |
---|
| 16701 | +} wl_natoe_arp_entry_v1_t; |
---|
| 16702 | + |
---|
| 16703 | +typedef struct wl_natoe_dbg_arp_tbl_info_v1 { |
---|
| 16704 | + uint8 valid_arp_entries; |
---|
| 16705 | + uint8 PAD[3]; |
---|
| 16706 | + wl_natoe_arp_entry_v1_t arp_ent[]; |
---|
| 16707 | +} wl_natoe_dbg_arp_tbl_info_v1_t; |
---|
| 16708 | + |
---|
| 16709 | +typedef struct wl_natoe_skip_port_entry_v1 { |
---|
| 16710 | + struct ipv4_addr srcip; |
---|
| 16711 | + uint16 src_port; |
---|
| 16712 | + uint16 lifetime; |
---|
| 16713 | +} wl_natoe_skip_port_entry_v1_t; |
---|
| 16714 | + |
---|
| 16715 | +typedef struct wl_natoe_skip_port_info_v1 { |
---|
| 16716 | + uint8 valid_entries; |
---|
| 16717 | + uint8 PAD[3]; |
---|
| 16718 | + wl_natoe_skip_port_entry_v1_t skip_port_ent[]; |
---|
| 16719 | +} wl_natoe_skip_port_info_v1_t; |
---|
| 16720 | + |
---|
| 16721 | +typedef struct wl_natoe_dbg_stats_v1 { |
---|
| 16722 | + uint16 active_nat_entries; |
---|
| 16723 | + uint16 active_dns_entries; |
---|
| 16724 | + uint16 active_icmp_entries; |
---|
| 16725 | + uint16 valid_arp_entries; |
---|
| 16726 | + uint16 prev_nat_entries; |
---|
| 16727 | + uint16 prev_dns_entries; |
---|
| 16728 | + uint16 tcp_fast_reclaim_cnt; |
---|
| 16729 | + uint16 mcast_packets; |
---|
| 16730 | + uint16 bcast_packets; |
---|
| 16731 | + uint16 port_commands_rcvd; |
---|
| 16732 | + uint16 unsupported_prot; |
---|
| 16733 | + uint16 arp_req_sent; |
---|
| 16734 | + uint16 arp_rsp_rcvd; |
---|
| 16735 | + uint16 non_ether_frames; |
---|
| 16736 | + uint16 port_alloc_fail; |
---|
| 16737 | + uint16 srcip_tbl_full; |
---|
| 16738 | + uint16 dstip_tbl_full; |
---|
| 16739 | + uint16 nat_tbl_full; |
---|
| 16740 | + uint16 icmp_error_cnt; |
---|
| 16741 | + uint16 pkt_drops_resource; |
---|
| 16742 | + uint32 frwd_nat_pkt_cnt; |
---|
| 16743 | + uint32 reverse_nat_pkt_cnt; |
---|
| 16744 | + uint16 pub_nw_chspec; |
---|
| 16745 | + uint16 pvt_nw_chspec; |
---|
| 16746 | + uint8 pubnw_cfg_idx; |
---|
| 16747 | + uint8 pvtnw_cfg_idx; |
---|
| 16748 | + uint8 pubnw_cfg_ID; |
---|
| 16749 | + uint8 pvtnw_cfg_ID; |
---|
| 16750 | + uint16 natoe_flags; |
---|
| 16751 | +} wl_natoe_dbg_stats_v1_t; |
---|
| 16752 | + |
---|
| 16753 | +typedef struct wl_natoe_exception_port_inf_v1 { |
---|
| 16754 | + uint16 except_bmap_size; |
---|
| 16755 | + uint8 port_except_bmap[]; |
---|
| 16756 | +} wl_natoe_exception_port_inf_v1_t; |
---|
| 16757 | + |
---|
| 16758 | +typedef struct wl_natoe_dstnat_entry_v1 { |
---|
| 16759 | + struct ipv4_addr clientip; |
---|
| 16760 | + struct ether_addr client_mac_addr; |
---|
| 16761 | + uint16 client_listenport; |
---|
| 16762 | + uint8 opcode; |
---|
| 16763 | +} wl_natoe_dstnat_entry_v1_t; |
---|
| 16764 | + |
---|
| 16765 | +typedef struct wl_pcie_frwd_stats_v1 { |
---|
| 16766 | + uint16 version; |
---|
| 16767 | + uint16 len; |
---|
| 16768 | + uint16 frwd_txfrag_q_cnt; /* no. of txfrags in frwd_txfrag_list */ |
---|
| 16769 | + /* no. of outstanding lbufs in txpath on if0/ifx */ |
---|
| 16770 | + uint16 tx_frwd_n_lb_if0; |
---|
| 16771 | + uint16 tx_frwd_n_lb_ifx; |
---|
| 16772 | + /* no. of outstanding lfrags in txpath on if0/ifx */ |
---|
| 16773 | + uint16 tx_frwd_n_lf_if0; |
---|
| 16774 | + uint16 tx_frwd_n_lf_ifx; |
---|
| 16775 | + /* no. of pending frwd pkts dropped upon d3 entry */ |
---|
| 16776 | + uint16 tx_frwd_d3_drop_cnt; |
---|
| 16777 | + /* Total no. of lbufs frwded in txpath on if0/ifx */ |
---|
| 16778 | + uint32 tx_frwd_n_lb_if0_cnt; |
---|
| 16779 | + uint32 tx_frwd_n_lb_ifx_cnt; |
---|
| 16780 | + /* Total no. of lfrags frwded in txpath on if0/ifx */ |
---|
| 16781 | + uint32 tx_frwd_n_lf_if0_cnt; |
---|
| 16782 | + uint32 tx_frwd_n_lf_ifx_cnt; |
---|
| 16783 | + uint32 frwd_tx_drop_thr_cnt; /* no. of pkts dropped due to txfrag threshold */ |
---|
| 16784 | + uint32 frwd_tx_drop_err_cnt; /* no. of pkts dropped due to txfrags not avail / errors */ |
---|
| 16785 | +} wl_pcie_frwd_stats_v1_t; |
---|
| 16786 | + |
---|
| 16787 | +enum wl_natoe_cmds { |
---|
| 16788 | + WL_NATOE_CMD_MOD_VER = 0, |
---|
| 16789 | + WL_NATOE_CMD_ENABLE = 1, |
---|
| 16790 | + WL_NATOE_CMD_CONFIG_IPS = 2, |
---|
| 16791 | + WL_NATOE_CMD_CONFIG_PORTS = 3, |
---|
| 16792 | + WL_NATOE_CMD_DBG_STATS = 4, |
---|
| 16793 | + WL_NATOE_CMD_EXCEPTION_PORT = 5, |
---|
| 16794 | + WL_NATOE_CMD_SKIP_PORT = 6, |
---|
| 16795 | + WL_NATOE_CMD_TBL_CNT = 7, |
---|
| 16796 | + WL_NATOE_CMD_CONFIG_DSTNAT = 8, |
---|
| 16797 | + WL_NATOE_CMD_CTRL = 9 |
---|
| 16798 | +}; |
---|
| 16799 | + |
---|
| 16800 | +enum wl_natoe_cmd_xtlv_id { |
---|
| 16801 | + WL_NATOE_XTLV_MOD_VER = 0, |
---|
| 16802 | + WL_NATOE_XTLV_ENABLE = 1, |
---|
| 16803 | + WL_NATOE_XTLV_CONFIG_IPS = 2, |
---|
| 16804 | + WL_NATOE_XTLV_CONFIG_PORTS = 3, |
---|
| 16805 | + WL_NATOE_XTLV_DBG_STATS = 4, |
---|
| 16806 | + WL_NATOE_XTLV_EXCEPTION_PORT = 5, |
---|
| 16807 | + WL_NATOE_XTLV_SKIP_PORT = 6, |
---|
| 16808 | + WL_NATOE_XTLV_TBL_CNT = 7, |
---|
| 16809 | + WL_NATOE_XTLV_ARP_TBL = 8, |
---|
| 16810 | + WL_NATOE_XTLV_POOLREORG = 9, |
---|
| 16811 | + WL_NATOE_XTLV_CONFIG_DSTNAT = 10, |
---|
| 16812 | + WL_NATOE_XTLV_CTRL = 11 |
---|
| 16813 | +}; |
---|
| 16814 | + |
---|
| 16815 | +/* endif WL_NATOE */ |
---|
| 16816 | + |
---|
| 16817 | +enum wl_idauth_cmd_ids { |
---|
| 16818 | + WL_IDAUTH_CMD_CONFIG = 1, |
---|
| 16819 | + WL_IDAUTH_CMD_PEER_INFO = 2, |
---|
| 16820 | + WL_IDAUTH_CMD_COUNTERS = 3, |
---|
| 16821 | + WL_IDAUTH_CMD_LAST |
---|
| 16822 | +}; |
---|
| 16823 | +enum wl_idauth_xtlv_id { |
---|
| 16824 | + WL_IDAUTH_XTLV_AUTH_ENAB = 0x1, |
---|
| 16825 | + WL_IDAUTH_XTLV_GTK_ROTATION = 0x2, |
---|
| 16826 | + WL_IDAUTH_XTLV_EAPOL_COUNT = 0x3, |
---|
| 16827 | + WL_IDAUTH_XTLV_EAPOL_INTRVL = 0x4, |
---|
| 16828 | + WL_IDAUTH_XTLV_BLKLIST_COUNT = 0x5, |
---|
| 16829 | + WL_IDAUTH_XTLV_BLKLIST_AGE = 0x6, |
---|
| 16830 | + WL_IDAUTH_XTLV_PEERS_INFO = 0x7, |
---|
| 16831 | + WL_IDAUTH_XTLV_COUNTERS = 0x8 |
---|
| 16832 | +}; |
---|
| 16833 | +enum wl_idauth_stats { |
---|
| 16834 | + WL_AUTH_PEER_STATE_AUTHORISED = 0x01, |
---|
| 16835 | + WL_AUTH_PEER_STATE_BLACKLISTED = 0x02, |
---|
| 16836 | + WL_AUTH_PEER_STATE_4WAY_HS_ONGOING = 0x03, |
---|
| 16837 | + WL_AUTH_PEER_STATE_LAST |
---|
| 16838 | +}; |
---|
| 16839 | +typedef struct { |
---|
| 16840 | + uint16 state; /* Peer State: Authorised or Blacklisted */ |
---|
| 16841 | + struct ether_addr peer_addr; /* peer Address */ |
---|
| 16842 | + uint32 blklist_end_time; /* Time of blacklist end */ |
---|
| 16843 | +} auth_peer_t; |
---|
| 16844 | +typedef struct wl_idauth_counters { |
---|
| 16845 | + uint32 auth_reqs; /* No of auth req recvd */ |
---|
| 16846 | + uint32 mic_fail; /* No of mic fails */ |
---|
| 16847 | + uint32 four_way_hs_fail; /* No of 4-way handshake fails */ |
---|
| 16848 | +} wl_idauth_counters_t; |
---|
| 16849 | + |
---|
| 16850 | +#define WLC_UTRACE_LEN (1024u * 4u) // default length |
---|
| 16851 | +#define WLC_UTRACE_LEN_AUX (1024u * 3u) // reduced length to fit smaller AUX BM |
---|
| 16852 | +#define WLC_UTRACE_READ_END 0 |
---|
| 16853 | +#define WLC_UTRACE_MORE_DATA 1 |
---|
| 16854 | +typedef struct wl_utrace_capture_args_v1 { |
---|
| 16855 | + uint32 length; |
---|
| 16856 | + uint32 flag; |
---|
| 16857 | +} wl_utrace_capture_args_v1_t; |
---|
| 16858 | + |
---|
| 16859 | +#define UTRACE_CAPTURE_VER_2 2 |
---|
| 16860 | +typedef struct wl_utrace_capture_args_v2 { |
---|
| 16861 | + /* structure control */ |
---|
| 16862 | + uint16 version; /**< structure version */ |
---|
| 16863 | + uint16 length; /**< length of the response */ |
---|
| 16864 | + uint32 flag; /* Indicates if there is more data or not */ |
---|
| 16865 | +} wl_utrace_capture_args_v2_t; |
---|
| 16866 | + |
---|
| 16867 | +/* Signal read end. */ |
---|
| 16868 | +#define WLC_REGVAL_READ_END 0 |
---|
| 16869 | +/* Signal more data pending. */ |
---|
| 16870 | +#define WLC_REGVAL_MORE_DATA 1 |
---|
| 16871 | +/* Internal read state. */ |
---|
| 16872 | +#define WLC_REGVAL_READ_CONTINUE 2 |
---|
| 16873 | + |
---|
| 16874 | +#define WLC_REGVAL_DUMP_PHYREG 0 |
---|
| 16875 | +#define WLC_REGVAL_DUMP_RADREG 1 |
---|
| 16876 | + |
---|
| 16877 | +#define PHYREGVAL_CAPTURE_BUFFER_LEN 2048 |
---|
| 16878 | + |
---|
| 16879 | +typedef struct wl_regval_capture_args { |
---|
| 16880 | + uint32 control_flag; /* Carries status information. */ |
---|
| 16881 | +} wl_regval_capture_args_t; |
---|
| 16882 | + |
---|
| 16883 | +/* XTLV IDs for the Health Check "hc" iovar top level container */ |
---|
| 16884 | +enum { |
---|
| 16885 | + WL_HC_XTLV_ID_CAT_HC = 1, /* category for HC as a whole */ |
---|
| 16886 | + WL_HC_XTLV_ID_CAT_DATAPATH_TX = 2, /* Datapath Tx */ |
---|
| 16887 | + WL_HC_XTLV_ID_CAT_DATAPATH_RX = 3, /* Datapath Rx */ |
---|
| 16888 | + WL_HC_XTLV_ID_CAT_SCAN = 4, /* Scan */ |
---|
| 16889 | + WL_HC_XTLV_ID_CAT_EVENTMASK = 5, /* Health Check event mask. */ |
---|
| 16890 | +}; |
---|
| 16891 | + |
---|
| 16892 | +/* Health Check: Common XTLV IDs for sub-elements in the top level container |
---|
| 16893 | + * Number starts at 0x8000 to be out of the way for category specific IDs. |
---|
| 16894 | + */ |
---|
| 16895 | +enum { |
---|
| 16896 | + WL_HC_XTLV_ID_ERR = 0x8000, /* for sub-command err return */ |
---|
| 16897 | + WL_HC_XTLV_ID_IDLIST = 0x8001, /* container for uint16 IDs */ |
---|
| 16898 | +}; |
---|
| 16899 | + |
---|
| 16900 | +/* Health Check: Datapath TX IDs */ |
---|
| 16901 | +enum { |
---|
| 16902 | + WL_HC_TX_XTLV_ID_VAL_STALL_THRESHOLD = 1, /* stall_threshold */ |
---|
| 16903 | + WL_HC_TX_XTLV_ID_VAL_STALL_SAMPLE_SIZE = 2, /* stall_sample_size */ |
---|
| 16904 | + WL_HC_TX_XTLV_ID_VAL_STALL_TIMEOUT = 3, /* stall_timeout */ |
---|
| 16905 | + WL_HC_TX_XTLV_ID_VAL_STALL_FORCE = 4, /* stall_force */ |
---|
| 16906 | + WL_HC_TX_XTLV_ID_VAL_STALL_EXCLUDE = 5, /* stall_exclude */ |
---|
| 16907 | + WL_HC_TX_XTLV_ID_VAL_FC_TIMEOUT = 6, /* flow ctl timeout */ |
---|
| 16908 | + WL_HC_TX_XTLV_ID_VAL_FC_FORCE = 7, /* flow ctl force failure */ |
---|
| 16909 | + WL_HC_TX_XTLV_ID_VAL_DELAY_TO_TRAP = 8, /* delay threshold for forced trap */ |
---|
| 16910 | + WL_HC_TX_XTLV_ID_VAL_DELAY_TO_RPT = 9, /* delay threshold for event log report */ |
---|
| 16911 | + WL_HC_TX_XTLV_ID_VAL_FAILURE_TO_RPT = 10, /* threshold for consecutive TX failures */ |
---|
| 16912 | +}; |
---|
| 16913 | + |
---|
| 16914 | +/* Health Check: Datapath RX IDs */ |
---|
| 16915 | +enum { |
---|
| 16916 | + WL_HC_RX_XTLV_ID_VAL_DMA_STALL_TIMEOUT = 1, /* dma_stall_timeout */ |
---|
| 16917 | + WL_HC_RX_XTLV_ID_VAL_DMA_STALL_FORCE = 2, /* dma_stall test trigger */ |
---|
| 16918 | + WL_HC_RX_XTLV_ID_VAL_STALL_THRESHOLD = 3, /* stall_threshold */ |
---|
| 16919 | + WL_HC_RX_XTLV_ID_VAL_STALL_SAMPLE_SIZE = 4, /* stall_sample_size */ |
---|
| 16920 | + WL_HC_RX_XTLV_ID_VAL_STALL_FORCE = 5, /* stall test trigger */ |
---|
| 16921 | +}; |
---|
| 16922 | + |
---|
| 16923 | +/* Health Check: Datapath SCAN IDs */ |
---|
| 16924 | +enum { |
---|
| 16925 | + WL_HC_XTLV_ID_VAL_SCAN_STALL_THRESHOLD = 1, /* scan stall threshold */ |
---|
| 16926 | +}; |
---|
| 16927 | + |
---|
| 16928 | +/* Health check: PHY IDs */ |
---|
| 16929 | +/* Needed for iguana 13.35 branch */ |
---|
| 16930 | +typedef enum { |
---|
| 16931 | + PHY_HC_DD_ALL = 0, |
---|
| 16932 | + PHY_HC_DD_TEMPSENSE = 1, |
---|
| 16933 | + PHY_HC_DD_VCOCAL = 2, |
---|
| 16934 | + PHY_HC_DD_RX = 3, |
---|
| 16935 | + PHY_HC_DD_TX = 4, |
---|
| 16936 | + PHY_HC_DD_LAST /* This must be the last entry */ |
---|
| 16937 | +} phy_hc_dd_type_t; |
---|
| 16938 | + |
---|
| 16939 | +typedef enum { |
---|
| 16940 | + PHY_HC_DD_TEMP_FAIL = 0, |
---|
| 16941 | + PHY_HC_DD_VCO_FAIL = 1, |
---|
| 16942 | + PHY_HC_DD_RXDSN_FAIL = 2, |
---|
| 16943 | + PHY_HC_DD_TXPOW_FAIL = 3, |
---|
| 16944 | + PHY_HC_DD_END /* This must be the last entry */ |
---|
| 16945 | +} phy_hc_dd_type_v2_t; |
---|
| 16946 | + |
---|
| 16947 | +/* IDs of Health Check report structures for sub types of health checks within WL */ |
---|
| 16948 | +typedef enum wl_hc_dd_type { |
---|
| 16949 | + WL_HC_DD_PCIE = 0, /* PCIe */ |
---|
| 16950 | + WL_HC_DD_RX_DMA_STALL = 1, /* RX DMA stall check */ |
---|
| 16951 | + WL_HC_DD_RX_STALL = 2, /* RX stall check */ |
---|
| 16952 | + WL_HC_DD_TX_STALL = 3, /* TX stall check */ |
---|
| 16953 | + WL_HC_DD_SCAN_STALL = 4, /* SCAN stall check */ |
---|
| 16954 | + WL_HC_DD_PHY = 5, /* PHY health check */ |
---|
| 16955 | + WL_HC_DD_REINIT = 6, /* Reinit due to other reasons */ |
---|
| 16956 | + WL_HC_DD_TXQ_STALL = 7, /* TXQ stall */ |
---|
| 16957 | + WL_HC_DD_MAX |
---|
| 16958 | +} wl_hc_dd_type_t; |
---|
| 16959 | + |
---|
| 16960 | +/* |
---|
| 16961 | + * Health Check report structures for sub types of health checks within WL |
---|
| 16962 | + */ |
---|
| 16963 | + |
---|
| 16964 | +/* Health Check report structure for Rx DMA Stall check */ |
---|
| 16965 | +typedef struct { |
---|
| 16966 | + uint16 type; |
---|
| 16967 | + uint16 length; |
---|
| 16968 | + uint16 timeout; |
---|
| 16969 | + uint16 stalled_dma_bitmap; |
---|
| 16970 | +} wl_rx_dma_hc_info_t; |
---|
| 16971 | + |
---|
| 16972 | +/* Health Check report structure for Tx packet failure check */ |
---|
| 16973 | +typedef struct { |
---|
| 16974 | + uint16 type; |
---|
| 16975 | + uint16 length; |
---|
| 16976 | + uint32 stall_bitmap; |
---|
| 16977 | + uint32 stall_bitmap1; |
---|
| 16978 | + uint32 failure_ac; |
---|
| 16979 | + uint32 threshold; |
---|
| 16980 | + uint32 tx_all; |
---|
| 16981 | + uint32 tx_failure_all; |
---|
| 16982 | +} wl_tx_hc_info_t; |
---|
| 16983 | + |
---|
| 16984 | +/* Health Check report structure for Rx dropped packet failure check */ |
---|
| 16985 | +typedef struct { |
---|
| 16986 | + uint16 type; |
---|
| 16987 | + uint16 length; |
---|
| 16988 | + uint32 bsscfg_idx; |
---|
| 16989 | + uint32 rx_hc_pkts; |
---|
| 16990 | + uint32 rx_hc_dropped_all; |
---|
| 16991 | + uint32 rx_hc_alert_th; |
---|
| 16992 | +} wl_rx_hc_info_t; |
---|
| 16993 | + |
---|
| 16994 | +/* HE top level command IDs */ |
---|
| 16995 | +enum { |
---|
| 16996 | + WL_HE_CMD_ENAB = 0, |
---|
| 16997 | + WL_HE_CMD_FEATURES = 1, |
---|
| 16998 | + WL_HE_CMD_TWT_SETUP = 2, |
---|
| 16999 | + WL_HE_CMD_TWT_TEARDOWN = 3, |
---|
| 17000 | + WL_HE_CMD_TWT_INFO = 4, |
---|
| 17001 | + WL_HE_CMD_BSSCOLOR = 5, |
---|
| 17002 | + WL_HE_CMD_PARTIAL_BSSCOLOR = 6, |
---|
| 17003 | + WL_HE_CMD_CAP = 7, |
---|
| 17004 | + WL_HE_CMD_STAID = 8, |
---|
| 17005 | + WL_HE_CMD_RTSDURTHRESH = 10, |
---|
| 17006 | + WL_HE_CMD_PEDURATION = 11, |
---|
| 17007 | + WL_HE_CMD_TESTBED_MODE = 12, |
---|
| 17008 | + WL_HE_CMD_OMI = 13, |
---|
| 17009 | + WL_HE_CMD_MAC_PAD_DUR = 14, |
---|
| 17010 | + WL_HE_CMD_MUEDCA = 15, |
---|
| 17011 | + WL_HE_CMD_MACCAP = 16, |
---|
| 17012 | + WL_HE_CMD_PHYCAP = 17, |
---|
| 17013 | + WL_HE_CMD_DISPLAY = 18, |
---|
| 17014 | + WL_HE_CMD_ACTION = 19, |
---|
| 17015 | + WL_HE_CMD_OFDMATX = 20, |
---|
| 17016 | + WL_HE_CMD_20IN80_MODE = 21, |
---|
| 17017 | + WL_HE_CMD_SMPS = 22, |
---|
| 17018 | + WL_HE_CMD_PPETHRESH = 23, |
---|
| 17019 | +#ifdef WL11AX_TESTBED |
---|
| 17020 | + WL_HE_CMD_HTC_OMI_EN = 24, |
---|
| 17021 | + WL_HE_CMD_ERSU_EN = 25, |
---|
| 17022 | + WL_HE_CMD_PREPUNCRX_EN = 26, |
---|
| 17023 | + WL_HE_CMD_MIMOCAP_EN = 27, |
---|
| 17024 | +#endif // endif |
---|
| 17025 | + WL_HE_CMD_MUEDCA_OPT = 28, |
---|
| 17026 | + WL_HE_CMD_LAST |
---|
| 17027 | +}; |
---|
| 17028 | + |
---|
| 17029 | +/* TWT top level command IDs */ |
---|
| 17030 | +enum { |
---|
| 17031 | + WL_TWT_CMD_ENAB = 0, |
---|
| 17032 | + WL_TWT_CMD_SETUP = 1, |
---|
| 17033 | + WL_TWT_CMD_TEARDOWN = 2, |
---|
| 17034 | + WL_TWT_CMD_INFO = 3, |
---|
| 17035 | + WL_TWT_CMD_AUTOSCHED = 4, |
---|
| 17036 | + WL_TWT_CMD_STATS = 5, |
---|
| 17037 | + WL_TWT_CMD_EARLY_TERM_TIME = 6, |
---|
| 17038 | + WL_TWT_CMD_RESP_CONFIG = 7, |
---|
| 17039 | + WL_TWT_CMD_SPPS_ENAB = 8, |
---|
| 17040 | + WL_TWT_CMD_FEATURES = 9, |
---|
| 17041 | + WL_TWT_CMD_LAST |
---|
| 17042 | +}; |
---|
| 17043 | + |
---|
| 17044 | +/* TODO: Remove the follwoing after mering TWT changes to trunk */ |
---|
| 17045 | +#define WL_TWT_CMD_DEF_IN_WLIOCTL 1 |
---|
| 17046 | + |
---|
| 17047 | +#define WL_HEB_VER_1 1 |
---|
| 17048 | + |
---|
| 17049 | +/* HEB top level command IDs */ |
---|
| 17050 | +enum { |
---|
| 17051 | + WL_HEB_CMD_ENAB = 0, |
---|
| 17052 | + WL_HEB_CMD_NUM_HEB = 1, |
---|
| 17053 | + WL_HEB_CMD_COUNTERS = 2, |
---|
| 17054 | + WL_HEB_CMD_CLEAR_COUNTERS = 3, |
---|
| 17055 | + WL_HEB_CMD_CONFIG = 4, |
---|
| 17056 | + WL_HEB_CMD_STATUS = 5, |
---|
| 17057 | + WL_HEB_CMD_LAST |
---|
| 17058 | +}; |
---|
| 17059 | + |
---|
| 17060 | +/* HEB counters structures */ |
---|
| 17061 | +typedef struct wl_heb_int_cnt_v1 { |
---|
| 17062 | + uint16 pre_event; |
---|
| 17063 | + uint16 start_event; |
---|
| 17064 | + uint16 end_event; |
---|
| 17065 | + uint16 missed; |
---|
| 17066 | +} wl_heb_int_cnt_v1_t; |
---|
| 17067 | + |
---|
| 17068 | +typedef struct wl_heb_cnt_v1 { |
---|
| 17069 | + /* structure control */ |
---|
| 17070 | + uint16 version; /* structure version */ |
---|
| 17071 | + uint16 length; /* data length (starting after this field) */ |
---|
| 17072 | + wl_heb_int_cnt_v1_t heb_int_cnt[1]; |
---|
| 17073 | +} wl_heb_cnt_v1_t; |
---|
| 17074 | + |
---|
| 17075 | +// struct for configuring HEB |
---|
| 17076 | +typedef struct wl_config_heb_fill_v1 { |
---|
| 17077 | + uint16 version; /* structure version */ |
---|
| 17078 | + uint16 length; /* data length (starting after this field) */ |
---|
| 17079 | + uint32 duration; |
---|
| 17080 | + uint32 periodicity; |
---|
| 17081 | + uint16 heb_idx; |
---|
| 17082 | + uint16 preeventtime; |
---|
| 17083 | + uint8 count; |
---|
| 17084 | + uint8 PAD[3]; |
---|
| 17085 | +} wl_config_heb_fill_v1_t; |
---|
| 17086 | + |
---|
| 17087 | +typedef struct wl_heb_blk_params_v1 { |
---|
| 17088 | + /* Don't change the order of following elements. This is as per the HEB HW spec */ |
---|
| 17089 | + uint32 event_int_val_l; |
---|
| 17090 | + uint32 event_int_val_h; |
---|
| 17091 | + uint32 param2; |
---|
| 17092 | + uint32 param3; |
---|
| 17093 | + uint32 pre_event_intmsk_bmp; |
---|
| 17094 | + uint32 start_event_intmsk_bmp; |
---|
| 17095 | + uint32 end_event_intmsk_bmp; |
---|
| 17096 | + uint32 event_driver_info; |
---|
| 17097 | + uint16 param1; |
---|
| 17098 | + uint8 event_count; |
---|
| 17099 | + uint8 noa_invert; |
---|
| 17100 | +} wl_heb_blk_params_v1_t; |
---|
| 17101 | + |
---|
| 17102 | +typedef struct wl_heb_int_status_v1 { |
---|
| 17103 | + uint32 heb_idx; |
---|
| 17104 | + wl_heb_blk_params_v1_t blk_params; |
---|
| 17105 | +} wl_heb_reg_status_v1_t; |
---|
| 17106 | + |
---|
| 17107 | +typedef struct wl_heb_status_v1 { |
---|
| 17108 | + uint16 version; /* structure version */ |
---|
| 17109 | + uint16 length; /* data length (starting after this field) */ |
---|
| 17110 | + wl_heb_reg_status_v1_t heb_status[1]; |
---|
| 17111 | +} wl_heb_status_v1_t; |
---|
| 17112 | + |
---|
| 17113 | +/* TWT Setup descriptor */ |
---|
| 17114 | +typedef struct wl_twt_sdesc { |
---|
| 17115 | + /* Setup Command. */ |
---|
| 17116 | + uint8 setup_cmd; /* See TWT_SETUP_CMD_XXXX in 802.11ah.h */ |
---|
| 17117 | + uint8 flow_flags; /* Flow attributes. See WL_TWT_FLOW_FLAG_XXXX below */ |
---|
| 17118 | + uint8 flow_id; /* must be between 0 and 7. Set 0xFF for auto assignment */ |
---|
| 17119 | + uint8 wake_type; /* See WL_TWT_TIME_TYPE_XXXX below */ |
---|
| 17120 | + uint32 wake_time_h; /* target wake time - BSS TSF (us) */ |
---|
| 17121 | + uint32 wake_time_l; |
---|
| 17122 | + uint32 wake_dur; /* target wake duration in unit of microseconds */ |
---|
| 17123 | + uint32 wake_int; /* target wake interval */ |
---|
| 17124 | + uint32 btwt_persistence; /* Broadcast TWT Persistence */ |
---|
| 17125 | + uint32 wake_int_max; /* max wake interval(uS) for TWT */ |
---|
| 17126 | + uint8 duty_cycle_min; /* min duty cycle for TWT(Percentage) */ |
---|
| 17127 | + uint8 pad; |
---|
| 17128 | + uint8 bid; /* must be between 0 and 31. Set 0xFF for auto assignment */ |
---|
| 17129 | + uint8 channel; /* Twt channel - Not used for now */ |
---|
| 17130 | + uint8 negotiation_type; /* Negotiation Type: See macros TWT_NEGO_TYPE_X */ |
---|
| 17131 | + uint8 frame_recomm; /* frame recommendation for broadcast TWTs - Not used for now */ |
---|
| 17132 | + /* deprecated - to be removed */ |
---|
| 17133 | + uint16 li; |
---|
| 17134 | + |
---|
| 17135 | +} wl_twt_sdesc_t; |
---|
| 17136 | + |
---|
| 17137 | +/* Flow flags */ |
---|
| 17138 | +/* [TODO] : below flags are to be applied with corresponding wl param parsing |
---|
| 17139 | +#define WL_TWT_FLOW_FLAG_UNANNOUNCED (1u << 0u) |
---|
| 17140 | +#define WL_TWT_FLOW_FLAG_TRIGGER (1u << 1u) |
---|
| 17141 | +#define WL_TWT_FLOW_FLAG_REQUEST (1u << 2u) |
---|
| 17142 | +#define WL_TWT_FLOW_FLAG_PROTECT (1u << 3u) |
---|
| 17143 | +#define WL_TWT_FLOW_FLAG_RESPONDER_PM (1u << 4u) |
---|
| 17144 | +#define WL_TWT_FLOW_FLAG_UNSOLICITED (1u << 5u) |
---|
| 17145 | + |
---|
| 17146 | +#define WL_TWT_FLOW_FLAG_BROADCAST (1u << 5u) |
---|
| 17147 | +#define WL_TWT_FLOW_FLAG_WAKE_TBTT_NEGO (1u << 6u) |
---|
| 17148 | +#define WL_TWT_FLOW_FLAG_IMPLICIT (1u << 7u) |
---|
| 17149 | +*/ |
---|
| 17150 | +#define WL_TWT_FLOW_FLAG_BROADCAST (1 << 0) |
---|
| 17151 | +#define WL_TWT_FLOW_FLAG_IMPLICIT (1 << 1) |
---|
| 17152 | +#define WL_TWT_FLOW_FLAG_UNANNOUNCED (1 << 2) |
---|
| 17153 | +#define WL_TWT_FLOW_FLAG_TRIGGER (1 << 3) |
---|
| 17154 | +#define WL_TWT_FLOW_FLAG_WAKE_TBTT_NEGO (1 << 4) |
---|
| 17155 | +#define WL_TWT_FLOW_FLAG_REQUEST (1 << 5) |
---|
| 17156 | + |
---|
| 17157 | +#define WL_TWT_FLOW_FLAG_PROTECT (1u << 0u) |
---|
| 17158 | +#define WL_TWT_FLOW_FLAG_RESPONDER_PM (1u << 6u) |
---|
| 17159 | +#define WL_TWT_FLOW_FLAG_UNSOLICITED (1u << 7u) |
---|
| 17160 | + |
---|
| 17161 | +/* Flow id */ |
---|
| 17162 | +#define WL_TWT_FLOW_ID_FID 0x07u /* flow id */ |
---|
| 17163 | +#define WL_TWT_FLOW_ID_GID_MASK 0x70u /* group id - broadcast TWT only */ |
---|
| 17164 | +#define WL_TWT_FLOW_ID_GID_SHIFT 4u |
---|
| 17165 | + |
---|
| 17166 | +#define WL_TWT_INV_BCAST_ID 0xFFu |
---|
| 17167 | +#define WL_TWT_INV_FLOW_ID 0xFFu |
---|
| 17168 | + |
---|
| 17169 | +/* auto flow_id */ |
---|
| 17170 | +#define WL_TWT_SETUP_FLOW_ID_AUTO 0xFFu |
---|
| 17171 | +/* auto broadcast ID */ |
---|
| 17172 | +#define WL_TWT_SETUP_BCAST_ID_AUTO 0xFFu |
---|
| 17173 | +/* Infinite persistence for broadcast schedule */ |
---|
| 17174 | +#define WL_TWT_INFINITE_BTWT_PERSIST 0xFFFFFFFFu |
---|
| 17175 | + |
---|
| 17176 | +#define WL_TWT_STATS_MAX_BTWT 4u |
---|
| 17177 | +#define WL_TWT_STATS_MAX_ITWT 4u |
---|
| 17178 | + |
---|
| 17179 | +/* Wake type */ |
---|
| 17180 | +/* TODO: not yet finalized */ |
---|
| 17181 | +#define WL_TWT_TIME_TYPE_BSS 0u /* The time specified in wake_time_h/l is |
---|
| 17182 | + * the BSS TSF time. |
---|
| 17183 | + */ |
---|
| 17184 | +#define WL_TWT_TIME_TYPE_OFFSET 1u /* The time specified in wake_time_h/l is an offset |
---|
| 17185 | + * of the TSF time when the iovar is processed. |
---|
| 17186 | + */ |
---|
| 17187 | +#define WL_TWT_TIME_TYPE_AUTO 2u /* The target wake time is chosen internally by the FW */ |
---|
| 17188 | + |
---|
| 17189 | +#define WL_TWT_SETUP_VER 0u |
---|
| 17190 | + |
---|
| 17191 | +/* HE TWT Setup command */ |
---|
| 17192 | +typedef struct wl_twt_setup { |
---|
| 17193 | + /* structure control */ |
---|
| 17194 | + uint16 version; /* structure version */ |
---|
| 17195 | + uint16 length; /* data length (starting after this field) */ |
---|
| 17196 | + /* peer address */ |
---|
| 17197 | + struct ether_addr peer; /* leave it all 0s' for AP */ |
---|
| 17198 | + uint8 pad[2]; |
---|
| 17199 | + /* setup descriptor */ |
---|
| 17200 | + wl_twt_sdesc_t desc; |
---|
| 17201 | + |
---|
| 17202 | + /* deprecated - to be removed */ |
---|
| 17203 | + uint16 dialog; |
---|
| 17204 | + uint8 pad1[2]; |
---|
| 17205 | +} wl_twt_setup_t; |
---|
| 17206 | + |
---|
| 17207 | +/* deprecated -to be removed */ |
---|
| 17208 | +#define WL_TWT_DIALOG_TOKEN_AUTO 0xFFFF |
---|
| 17209 | + |
---|
| 17210 | +#define WL_TWT_TEARDOWN_VER 0u |
---|
| 17211 | + |
---|
| 17212 | +/* twt teardown descriptor */ |
---|
| 17213 | +typedef struct wl_twt_teardesc { |
---|
| 17214 | + uint8 negotiation_type; |
---|
| 17215 | + uint8 flow_id; /* must be between 0 and 7 */ |
---|
| 17216 | + uint8 bid; /* must be between 0 and 31 */ |
---|
| 17217 | + uint8 alltwt; /* all twt teardown - 0 or 1 */ |
---|
| 17218 | +} wl_twt_teardesc_t; |
---|
| 17219 | + |
---|
| 17220 | +/* HE TWT Teardown command */ |
---|
| 17221 | +typedef struct wl_twt_teardown { |
---|
| 17222 | + /* structure control */ |
---|
| 17223 | + uint16 version; /* structure version */ |
---|
| 17224 | + uint16 length; /* data length (starting after this field) */ |
---|
| 17225 | + /* peer address */ |
---|
| 17226 | + struct ether_addr peer; /* leave it all 0s' for AP */ |
---|
| 17227 | + wl_twt_teardesc_t teardesc; /* Teardown descriptor */ |
---|
| 17228 | + |
---|
| 17229 | + /* deprecated - to be removed */ |
---|
| 17230 | + uint8 flow_flags; |
---|
| 17231 | + uint8 flow_id; |
---|
| 17232 | + uint8 bid; |
---|
| 17233 | + uint8 pad; |
---|
| 17234 | +} wl_twt_teardown_t; |
---|
| 17235 | + |
---|
| 17236 | +/* twt information descriptor */ |
---|
| 17237 | +typedef struct wl_twt_infodesc { |
---|
| 17238 | + uint8 flow_flags; /* See WL_TWT_INFO_FLAG_XXX below */ |
---|
| 17239 | + uint8 flow_id; |
---|
| 17240 | + uint8 pad[2]; |
---|
| 17241 | + uint32 next_twt_h; |
---|
| 17242 | + uint32 next_twt_l; |
---|
| 17243 | + /* deprecated - to be removed */ |
---|
| 17244 | + uint8 wake_type; |
---|
| 17245 | + uint8 pad1[3]; |
---|
| 17246 | +} wl_twt_infodesc_t; |
---|
| 17247 | + |
---|
| 17248 | +/* Flow flags */ |
---|
| 17249 | +#define WL_TWT_INFO_FLAG_ALL_TWT (1u << 0u) /* All TWT */ |
---|
| 17250 | +#define WL_TWT_INFO_FLAG_RESUME (1u << 1u) /* 1 is TWT Resume, 0 is TWT Suspend */ |
---|
| 17251 | + |
---|
| 17252 | +/* deprecated - to be removed */ |
---|
| 17253 | +#define WL_TWT_INFO_FLAG_RESP_REQ (1 << 0) /* Response Requested */ |
---|
| 17254 | +#define WL_TWT_INFO_FLAG_NEXT_TWT_REQ (1 << 1) /* Next TWT Request */ |
---|
| 17255 | +#define WL_TWT_INFO_FLAG_BTWT_RESCHED (1 << 2) /* Broadcast Reschedule */ |
---|
| 17256 | +typedef wl_twt_infodesc_t wl_twt_idesc_t; |
---|
| 17257 | + |
---|
| 17258 | +#define WL_TWT_INFO_VER 0u |
---|
| 17259 | + |
---|
| 17260 | +/* HE TWT Information command */ |
---|
| 17261 | +typedef struct wl_twt_info { |
---|
| 17262 | + /* structure control */ |
---|
| 17263 | + uint16 version; /* structure version */ |
---|
| 17264 | + uint16 length; /* data length (starting after this field) */ |
---|
| 17265 | + /* peer address */ |
---|
| 17266 | + struct ether_addr peer; /* leave it all 0s' for AP */ |
---|
| 17267 | + uint8 pad[2]; |
---|
| 17268 | + wl_twt_infodesc_t infodesc; /* information descriptor */ |
---|
| 17269 | + /* deprecated - to be removed */ |
---|
| 17270 | + wl_twt_idesc_t desc; |
---|
| 17271 | +} wl_twt_info_t; |
---|
| 17272 | + |
---|
| 17273 | +#define WL_TWT_PEER_STATS_VERSION_1 1u |
---|
| 17274 | +typedef struct wl_twt_peer_stats_v1 { |
---|
| 17275 | + uint16 version; |
---|
| 17276 | + uint16 length; |
---|
| 17277 | + struct ether_addr peer; |
---|
| 17278 | + uint8 PAD[2]; |
---|
| 17279 | + uint8 id; |
---|
| 17280 | + uint8 flow_flags; |
---|
| 17281 | + uint8 PAD[2]; |
---|
| 17282 | + uint32 sp_seq; /* sequence number of the service period */ |
---|
| 17283 | + uint32 tx_ucast_pkts; |
---|
| 17284 | + uint32 tx_pkts_min; |
---|
| 17285 | + uint32 tx_pkts_max; |
---|
| 17286 | + uint32 tx_pkts_avg; |
---|
| 17287 | + uint32 tx_failures; |
---|
| 17288 | + uint32 rx_ucast_pkts; |
---|
| 17289 | + uint32 rx_pkts_min; |
---|
| 17290 | + uint32 rx_pkts_max; |
---|
| 17291 | + uint32 rx_pkts_avg; |
---|
| 17292 | + uint32 rx_pkts_retried; |
---|
| 17293 | +} wl_twt_peer_stats_v1_t; |
---|
| 17294 | + |
---|
| 17295 | +#define WL_TWT_STATS_VERSION_1 1 |
---|
| 17296 | +typedef struct wl_twt_stats_v1 { |
---|
| 17297 | + uint16 version; |
---|
| 17298 | + uint16 length; |
---|
| 17299 | + uint32 num_stats; /* number of peer stats in the peer_stats_list */ |
---|
| 17300 | + wl_twt_peer_stats_v1_t peer_stats_list[]; |
---|
| 17301 | +} wl_twt_stats_v1_t; |
---|
| 17302 | + |
---|
| 17303 | +#define WL_TWT_STATS_CMD_VERSION_1 1 |
---|
| 17304 | +#define WL_TWT_STATS_CMD_FLAGS_RESET (1u << 0u) |
---|
| 17305 | +/* HE TWT stats command */ |
---|
| 17306 | +typedef struct wl_twt_stats_cmd_v1 { |
---|
| 17307 | + uint16 version; |
---|
| 17308 | + uint16 length; |
---|
| 17309 | + struct ether_addr peer; |
---|
| 17310 | + uint8 PAD[2]; |
---|
| 17311 | + uint16 flags; /* see WL_TWT_STATS_CMD_FLAGS */ |
---|
| 17312 | + uint8 num_fid; |
---|
| 17313 | + uint8 num_bid; |
---|
| 17314 | + uint8 fid_list[WL_TWT_STATS_MAX_ITWT]; |
---|
| 17315 | + uint8 bid_list[WL_TWT_STATS_MAX_BTWT]; |
---|
| 17316 | +} wl_twt_stats_cmd_v1_t; |
---|
| 17317 | + |
---|
| 17318 | +#define WL_TWT_RESP_CFG_VER 0u |
---|
| 17319 | + |
---|
| 17320 | +#define WL_TWT_CMD_RESP_CFG_TYPE_ALTERNATE 0u |
---|
| 17321 | +#define WL_TWT_CMD_RESP_CFG_TYPE_DICTATE 1u |
---|
| 17322 | +/* HE TWT resp command */ |
---|
| 17323 | +typedef struct wl_twt_resp_cfg { |
---|
| 17324 | + /* structure control */ |
---|
| 17325 | + uint16 version; /* Structure version */ |
---|
| 17326 | + uint16 length; /* Data length (starting after this field) */ |
---|
| 17327 | + uint8 dc_max; /* Max supported duty cycle for single TWT */ |
---|
| 17328 | + uint8 resp_type; /* Resp. type(Alt/dict) if duty cycle>max duty cycle */ |
---|
| 17329 | +} wl_twt_resp_cfg_t; |
---|
| 17330 | + |
---|
| 17331 | +/* Current version for wlc_clm_power_limits_req_t structure and flags */ |
---|
| 17332 | +#define WLC_CLM_POWER_LIMITS_REQ_VERSION 1 |
---|
| 17333 | +/* "clm_power_limits" iovar request structure */ |
---|
| 17334 | +typedef struct wlc_clm_power_limits_req { |
---|
| 17335 | + /* Input. Structure and flags version */ |
---|
| 17336 | + uint32 version; |
---|
| 17337 | + /* Full length of buffer (includes this structure and space for TLV-encoded PPR) */ |
---|
| 17338 | + uint32 buflen; |
---|
| 17339 | + /* Input. Flags (see WLC_CLM_POWER_LIMITS_INPUT_FLAG_... below) */ |
---|
| 17340 | + uint32 input_flags; |
---|
| 17341 | + /* Input. CC of region whose data is being requested */ |
---|
| 17342 | + char cc[WLC_CNTRY_BUF_SZ]; |
---|
| 17343 | + /* Input. Channel/subchannel in chanspec_t format */ |
---|
| 17344 | + uint32 chanspec; |
---|
| 17345 | + /* Subchannel encoded as clm_limits_type_t */ |
---|
| 17346 | + uint32 clm_subchannel; |
---|
| 17347 | + /* Input. 0-based antenna index */ |
---|
| 17348 | + uint32 antenna_idx; |
---|
| 17349 | + /* Output. General flags (see WLC_CLM_POWER_LIMITS_OUTPUT_FLAG_... below) */ |
---|
| 17350 | + uint32 output_flags; |
---|
| 17351 | + /* Output. 2.4G country flags, encoded as clm_flags_t enum */ |
---|
| 17352 | + uint32 clm_country_flags_2g; |
---|
| 17353 | + /* Output. 5G country flags, encoded as clm_flags_t enum */ |
---|
| 17354 | + uint32 clm_country_flags_5g; |
---|
| 17355 | + /* Output. Length of TLV-encoded PPR data that follows this structure */ |
---|
| 17356 | + uint32 ppr_tlv_size; |
---|
| 17357 | + /* Output. Beginning of buffer for TLV-encoded PPR data */ |
---|
| 17358 | + uint8 ppr_tlv[1]; |
---|
| 17359 | +} wlc_clm_power_limits_req_t; |
---|
| 17360 | + |
---|
| 17361 | +/* Input. Do not apply SAR limits */ |
---|
| 17362 | +#define WLC_CLM_POWER_LIMITS_INPUT_FLAG_NO_SAR 0x00000001 |
---|
| 17363 | +/* Input. Do not apply board limits */ |
---|
| 17364 | +#define WLC_CLM_POWER_LIMITS_INPUT_FLAG_NO_BOARD 0x00000002 |
---|
| 17365 | +/* Output. Limits taken from product-specific country data */ |
---|
| 17366 | +#define WLC_CLM_POWER_LIMITS_OUTPUT_FLAG_PRODUCT_LIMITS 0x00000001 |
---|
| 17367 | +/* Output. Limits taken from product-specific worldwide data */ |
---|
| 17368 | +#define WLC_CLM_POWER_LIMITS_OUTPUT_FLAG_WORLDWIDE_LIMITS 0x00000002 |
---|
| 17369 | +/* Output. Limits taken from country-default (all-product) data */ |
---|
| 17370 | +#define WLC_CLM_POWER_LIMITS_OUTPUT_FLAG_DEFAULT_COUNTRY_LIMITS 0x00000004 |
---|
| 17371 | + |
---|
| 17372 | +#define WL_MBO_IOV_MAJOR_VER 1 |
---|
| 17373 | +#define WL_MBO_IOV_MINOR_VER 1 |
---|
| 17374 | +#define WL_MBO_IOV_MAJOR_VER_SHIFT 8 |
---|
| 17375 | +#define WL_MBO_IOV_VERSION \ |
---|
| 17376 | + ((WL_MBO_IOV_MAJOR_VER << WL_MBO_IOV_MAJOR_VER_SHIFT)| WL_MBO_IOV_MINOR_VER) |
---|
| 17377 | + |
---|
| 17378 | +#define MBO_MAX_CHAN_PREF_ENTRIES 16 |
---|
| 17379 | + |
---|
| 17380 | +enum wl_mbo_cmd_ids { |
---|
| 17381 | + WL_MBO_CMD_ADD_CHAN_PREF = 1, |
---|
| 17382 | + WL_MBO_CMD_DEL_CHAN_PREF = 2, |
---|
| 17383 | + WL_MBO_CMD_LIST_CHAN_PREF = 3, |
---|
| 17384 | + WL_MBO_CMD_CELLULAR_DATA_CAP = 4, |
---|
| 17385 | + WL_MBO_CMD_DUMP_COUNTERS = 5, |
---|
| 17386 | + WL_MBO_CMD_CLEAR_COUNTERS = 6, |
---|
| 17387 | + WL_MBO_CMD_FORCE_ASSOC = 7, |
---|
| 17388 | + WL_MBO_CMD_BSSTRANS_REJECT = 8, |
---|
| 17389 | + WL_MBO_CMD_SEND_NOTIF = 9, |
---|
| 17390 | + /* Unused command, This enum no can be use |
---|
| 17391 | + * for next new command |
---|
| 17392 | + */ |
---|
| 17393 | + WL_MBO_CMD_CLEAR_CHAN_PREF = 10, |
---|
| 17394 | + WL_MBO_CMD_NBR_INFO_CACHE = 11, |
---|
| 17395 | + WL_MBO_CMD_ANQPO_SUPPORT = 12, |
---|
| 17396 | + WL_MBO_CMD_DBG_EVENT_CHECK = 13, |
---|
| 17397 | + WL_MBO_CMD_EVENT_MASK = 14, |
---|
| 17398 | + WL_MBO_CMD_ASSOC_DISALLOWED = 15, |
---|
| 17399 | + WL_MBO_CMD_CELLULAR_DATA_PREF = 16, |
---|
| 17400 | + /* Add before this !! */ |
---|
| 17401 | + WL_MBO_CMD_LAST |
---|
| 17402 | +}; |
---|
| 17403 | + |
---|
| 17404 | +enum wl_mbo_xtlv_id { |
---|
| 17405 | + WL_MBO_XTLV_OPCLASS = 0x1, |
---|
| 17406 | + WL_MBO_XTLV_CHAN = 0x2, |
---|
| 17407 | + WL_MBO_XTLV_PREFERENCE = 0x3, |
---|
| 17408 | + WL_MBO_XTLV_REASON_CODE = 0x4, |
---|
| 17409 | + WL_MBO_XTLV_CELL_DATA_CAP = 0x5, |
---|
| 17410 | + WL_MBO_XTLV_COUNTERS = 0x6, |
---|
| 17411 | + WL_MBO_XTLV_ENABLE = 0x7, |
---|
| 17412 | + WL_MBO_XTLV_SUB_ELEM_TYPE = 0x8, |
---|
| 17413 | + WL_MBO_XTLV_BTQ_TRIG_START_OFFSET = 0x9, |
---|
| 17414 | + WL_MBO_XTLV_BTQ_TRIG_RSSI_DELTA = 0xa, |
---|
| 17415 | + WL_MBO_XTLV_ANQP_CELL_SUPP = 0xb, |
---|
| 17416 | + WL_MBO_XTLV_BIT_MASK = 0xc, |
---|
| 17417 | + WL_MBO_XTLV_ASSOC_DISALLOWED = 0xd, |
---|
| 17418 | + WL_MBO_XTLV_CELLULAR_DATA_PREF = 0xe |
---|
| 17419 | +}; |
---|
| 17420 | + |
---|
| 17421 | +/* event bit mask flags for MBO */ |
---|
| 17422 | +#define MBO_EVT_BIT_MASK_CELLULAR_SWITCH 0x0001 /* Evt bit mask to enab cellular switch */ |
---|
| 17423 | +#define MBO_EVT_BIT_MASK_BTM_REQ_RCVD 0x0002 /* Evt bit mask to enab BTM req rcvd */ |
---|
| 17424 | + |
---|
| 17425 | +/* masks for values in assoc_disallowed */ |
---|
| 17426 | +#define WL_MBO_ASSOC_DISALLOWED_MASK 0xff00 |
---|
| 17427 | +#define WL_MBO_ASSOC_DISALLOWED_SHIFT 8 |
---|
| 17428 | +#define WL_MBO_ASSOC_DISALLOWED_RC_MASK 0xff |
---|
| 17429 | + |
---|
| 17430 | +typedef struct wl_mbo_counters { |
---|
| 17431 | + /* No of transition req recvd */ |
---|
| 17432 | + uint16 trans_req_rcvd; |
---|
| 17433 | + /* No of transition req with disassoc imminent */ |
---|
| 17434 | + uint16 trans_req_disassoc; |
---|
| 17435 | + /* No of transition req with BSS Termination */ |
---|
| 17436 | + uint16 trans_req_bss_term; |
---|
| 17437 | + /* No of trans req w/ unspecified reason */ |
---|
| 17438 | + uint16 trans_resn_unspec; |
---|
| 17439 | + /* No of trans req w/ reason frame loss */ |
---|
| 17440 | + uint16 trans_resn_frm_loss; |
---|
| 17441 | + /* No of trans req w/ reason traffic delay */ |
---|
| 17442 | + uint16 trans_resn_traffic_delay; |
---|
| 17443 | + /* No of trans req w/ reason insufficient buffer */ |
---|
| 17444 | + uint16 trans_resn_insuff_bw; |
---|
| 17445 | + /* No of trans req w/ reason load balance */ |
---|
| 17446 | + uint16 trans_resn_load_bal; |
---|
| 17447 | + /* No of trans req w/ reason low rssi */ |
---|
| 17448 | + uint16 trans_resn_low_rssi; |
---|
| 17449 | + /* No of trans req w/ reason excessive retransmission */ |
---|
| 17450 | + uint16 trans_resn_xcess_retransmn; |
---|
| 17451 | + /* No of trans req w/ reason gray zone */ |
---|
| 17452 | + uint16 trans_resn_gray_zone; |
---|
| 17453 | + /* No of trans req w/ reason switch to premium AP */ |
---|
| 17454 | + uint16 trans_resn_prem_ap_sw; |
---|
| 17455 | + /* No of transition rejection sent */ |
---|
| 17456 | + uint16 trans_rejn_sent; |
---|
| 17457 | + /* No of trans rejn reason excessive frame loss */ |
---|
| 17458 | + uint16 trans_rejn_xcess_frm_loss; |
---|
| 17459 | + /* No of trans rejn reason excessive traffic delay */ |
---|
| 17460 | + uint16 trans_rejn_xcess_traffic_delay; |
---|
| 17461 | + /* No of trans rejn reason insufficient QoS capability */ |
---|
| 17462 | + uint16 trans_rejn_insuffic_qos_cap; |
---|
| 17463 | + /* No of trans rejn reason low RSSI */ |
---|
| 17464 | + uint16 trans_rejn_low_rssi; |
---|
| 17465 | + /* No of trans rejn reason high interference */ |
---|
| 17466 | + uint16 trans_rejn_high_interference; |
---|
| 17467 | + /* No of trans rejn reason service unavilable */ |
---|
| 17468 | + uint16 trans_rejn_service_unavail; |
---|
| 17469 | + /* No of beacon request rcvd */ |
---|
| 17470 | + uint16 bcn_req_rcvd; |
---|
| 17471 | + /* No of beacon report sent */ |
---|
| 17472 | + uint16 bcn_rep_sent; |
---|
| 17473 | + /* No of null beacon report sent */ |
---|
| 17474 | + uint16 null_bcn_rep_sent; |
---|
| 17475 | + /* No of wifi to cell switch */ |
---|
| 17476 | + uint16 wifi_to_cell; |
---|
| 17477 | +} wl_mbo_counters_t; |
---|
| 17478 | + |
---|
| 17479 | +#define WL_FILS_IOV_MAJOR_VER 1 |
---|
| 17480 | +#define WL_FILS_IOV_MINOR_VER 1 |
---|
| 17481 | +#define WL_FILS_IOV_MAJOR_VER_SHIFT 8 |
---|
| 17482 | +#define WL_FILS_IOV_VERSION \ |
---|
| 17483 | + ((WL_FILS_IOV_MAJOR_VER << WL_FILS_IOV_MAJOR_VER_SHIFT)| WL_FILS_IOV_MINOR_VER) |
---|
| 17484 | + |
---|
| 17485 | +enum wl_fils_cmd_ids { |
---|
| 17486 | + WL_FILS_CMD_ADD_IND_IE = 1, |
---|
| 17487 | + WL_FILS_CMD_ADD_AUTH_DATA = 2, /* Deprecated, kept to prevent ROM invalidation */ |
---|
| 17488 | + WL_FILS_CMD_ADD_HLP_IE = 3, |
---|
| 17489 | + WL_FILS_CMD_ADD_CONNECT_PARAMS = 4, |
---|
| 17490 | + WL_FILS_CMD_GET_CONNECT_PARAMS = 5, |
---|
| 17491 | + /* Add before this !! */ |
---|
| 17492 | + WL_FILS_CMD_LAST |
---|
| 17493 | +}; |
---|
| 17494 | + |
---|
| 17495 | +enum wl_fils_xtlv_id { |
---|
| 17496 | + WL_FILS_XTLV_IND_IE = 0x1, |
---|
| 17497 | + WL_FILS_XTLV_AUTH_DATA = 0x2, /* Deprecated, kept to prevent ROM invalidation */ |
---|
| 17498 | + WL_FILS_XTLV_HLP_IE = 0x3, |
---|
| 17499 | + WL_FILS_XTLV_ERP_USERNAME = 0x4, |
---|
| 17500 | + WL_FILS_XTLV_ERP_REALM = 0x5, |
---|
| 17501 | + WL_FILS_XTLV_ERP_RRK = 0x6, |
---|
| 17502 | + WL_FILS_XTLV_ERP_NEXT_SEQ_NUM = 0x7, |
---|
| 17503 | + WL_FILS_XTLV_KEK = 0x8, |
---|
| 17504 | + WL_FILS_XTLV_PMK = 0x9, |
---|
| 17505 | + WL_FILS_XTLV_TK = 0xa, |
---|
| 17506 | + WL_FILS_XTLV_PMKID = 0xb |
---|
| 17507 | +}; |
---|
| 17508 | + |
---|
| 17509 | +#define WL_OCE_IOV_MAJOR_VER 1 |
---|
| 17510 | +#define WL_OCE_IOV_MINOR_VER 1 |
---|
| 17511 | +#define WL_OCE_IOV_MAJOR_VER_SHIFT 8 |
---|
| 17512 | +#define WL_OCE_IOV_VERSION \ |
---|
| 17513 | + ((WL_OCE_IOV_MAJOR_VER << WL_OCE_IOV_MAJOR_VER_SHIFT)| WL_OCE_IOV_MINOR_VER) |
---|
| 17514 | + |
---|
| 17515 | +enum wl_oce_cmd_ids { |
---|
| 17516 | + WL_OCE_CMD_ENABLE = 1, |
---|
| 17517 | + WL_OCE_CMD_PROBE_DEF_TIME = 2, |
---|
| 17518 | + WL_OCE_CMD_FD_TX_PERIOD = 3, |
---|
| 17519 | + WL_OCE_CMD_FD_TX_DURATION = 4, |
---|
| 17520 | + WL_OCE_CMD_RSSI_TH = 5, |
---|
| 17521 | + WL_OCE_CMD_RWAN_LINKS = 6, |
---|
| 17522 | + WL_OCE_CMD_CU_TRIGGER = 7, |
---|
| 17523 | + /* Add before this !! */ |
---|
| 17524 | + WL_OCE_CMD_LAST |
---|
| 17525 | +}; |
---|
| 17526 | + |
---|
| 17527 | +enum wl_oce_xtlv_id { |
---|
| 17528 | + WL_OCE_XTLV_ENABLE = 0x1, |
---|
| 17529 | + WL_OCE_XTLV_PROBE_DEF_TIME = 0x2, |
---|
| 17530 | + WL_OCE_XTLV_FD_TX_PERIOD = 0x3, |
---|
| 17531 | + WL_OCE_XTLV_FD_TX_DURATION = 0x4, |
---|
| 17532 | + WL_OCE_XTLV_RSSI_TH = 0x5, |
---|
| 17533 | + WL_OCE_XTLV_RWAN_LINKS = 0x6, |
---|
| 17534 | + WL_OCE_XTLV_CU_TRIGGER = 0x7 |
---|
| 17535 | +}; |
---|
| 17536 | + |
---|
| 17537 | +#define WL_ESP_IOV_MAJOR_VER 1 |
---|
| 17538 | +#define WL_ESP_IOV_MINOR_VER 1 |
---|
| 17539 | +#define WL_ESP_IOV_MAJOR_VER_SHIFT 8 |
---|
| 17540 | +#define WL_ESP_IOV_VERSION \ |
---|
| 17541 | + ((WL_ESP_IOV_MAJOR_VER << WL_ESP_IOV_MAJOR_VER_SHIFT)| WL_ESP_IOV_MINOR_VER) |
---|
| 17542 | + |
---|
| 17543 | +enum wl_esp_cmd_ids { |
---|
| 17544 | + WL_ESP_CMD_ENABLE = 1, |
---|
| 17545 | + WL_ESP_CMD_STATIC = 2, |
---|
| 17546 | + /* Add before this !! */ |
---|
| 17547 | + WL_ESP_CMD_LAST |
---|
| 17548 | +}; |
---|
| 17549 | + |
---|
| 17550 | +enum wl_esp_xtlv_id { |
---|
| 17551 | + WL_ESP_XTLV_ENABLE = 0x1, |
---|
| 17552 | + WL_ESP_XTLV_STATIC_AC = 0x2, /* access category */ |
---|
| 17553 | + WL_ESP_XTLV_STATIC_TYPE = 0x3, /* data type */ |
---|
| 17554 | + WL_ESP_XTLV_STATIC_VAL = 0x4 |
---|
| 17555 | +}; |
---|
| 17556 | + |
---|
| 17557 | +/* otpread command */ |
---|
| 17558 | +#define WL_OTPREAD_VER 1 |
---|
| 17559 | + |
---|
| 17560 | +typedef struct { |
---|
| 17561 | + uint16 version; /* cmd structure version */ |
---|
| 17562 | + uint16 cmd_len; /* cmd struct len */ |
---|
| 17563 | + uint32 rdmode; /* otp read mode */ |
---|
| 17564 | + uint32 rdoffset; /* byte offset into otp to start read */ |
---|
| 17565 | + uint32 rdsize; /* number of bytes to read */ |
---|
| 17566 | +} wl_otpread_cmd_t; |
---|
| 17567 | + |
---|
| 17568 | +/* "otpecc_rows" command */ |
---|
| 17569 | +typedef struct { |
---|
| 17570 | + uint16 version; /* version of this structure */ |
---|
| 17571 | + uint16 len; /* len in bytes of this structure */ |
---|
| 17572 | + uint32 cmdtype; /* command type : 0 : read row data, 1 : ECC lock */ |
---|
| 17573 | + uint32 rowoffset; /* start row offset */ |
---|
| 17574 | + uint32 numrows; /* number of rows */ |
---|
| 17575 | + uint8 rowdata[]; /* read rows data */ |
---|
| 17576 | +} wl_otpecc_rows_t; |
---|
| 17577 | + |
---|
| 17578 | +#define WL_OTPECC_ROWS_VER 1 |
---|
| 17579 | + |
---|
| 17580 | +#define WL_OTPECC_ROWS_CMD_READ 0 |
---|
| 17581 | +#define WL_OTPECC_ROWS_CMD_LOCK 1 |
---|
| 17582 | + |
---|
| 17583 | +#define WL_OTPECC_ARGIDX_CMDTYPE 0 /* command type */ |
---|
| 17584 | +#define WL_OTPECC_ARGIDX_ROWOFFSET 1 /* start row offset */ |
---|
| 17585 | +#define WL_OTPECC_ARGIDX_NUMROWS 2 /* number of rows */ |
---|
| 17586 | + |
---|
| 17587 | +/* "otpeccrows" raw data size per row */ |
---|
| 17588 | +#define WL_ECCDUMP_ROW_SIZE_BYTE 6 /* 4 bytes row data + 2 bytes ECC status */ |
---|
| 17589 | +#define WL_ECCDUMP_ROW_SIZE_WORD 3 |
---|
| 17590 | + |
---|
| 17591 | +/* otpECCstatus */ |
---|
| 17592 | +#define OTP_ECC_ENAB_SHIFT 13 |
---|
| 17593 | +#define OTP_ECC_ENAB_MASK 0x7 |
---|
| 17594 | +#define OTP_ECC_CORR_ST_SHIFT 12 |
---|
| 17595 | +#define OTP_ECC_CORR_ST_MASK 0x1 |
---|
| 17596 | +#define OTP_ECC_DBL_ERR_SHIFT 11 |
---|
| 17597 | +#define OTP_ECC_DBL_ERR_MASK 0x1 |
---|
| 17598 | +#define OTP_ECC_DED_ST_SHIFT 10 |
---|
| 17599 | +#define OTP_ECC_DED_ST_MASK 0x1 |
---|
| 17600 | +#define OTP_ECC_SEC_ST_SHIFT 9 |
---|
| 17601 | +#define OTP_ECC_SEC_ST_MASK 0x1 |
---|
| 17602 | +#define OTP_ECC_DATA_SHIFT 0 |
---|
| 17603 | +#define OTP_ECC_DATA_MASK 0x7f |
---|
| 17604 | + |
---|
| 17605 | +/* OTP_ECC_CORR_ST field */ |
---|
| 17606 | +#define OTP_ECC_MODE 1 |
---|
| 17607 | +#define OTP_NO_ECC_MODE 0 |
---|
| 17608 | + |
---|
| 17609 | +/* OTP_ECC_ENAB field (bit15:13) : |
---|
| 17610 | + * When 2 or 3 bits are set, |
---|
| 17611 | + * it indicates that OTP ECC is enabled on the last row read. |
---|
| 17612 | + * Otherwise, ECC is disabled |
---|
| 17613 | + */ |
---|
| 17614 | +#define OTP_ECC_ENAB(val) \ |
---|
| 17615 | + (bcm_bitcount((uint8 *)&(val), sizeof(uint8)) > 1) |
---|
| 17616 | + |
---|
| 17617 | +#define WL_LEAKY_AP_STATS_GT_TYPE 0 |
---|
| 17618 | +#define WL_LEAKY_AP_STATS_PKT_TYPE 1 |
---|
| 17619 | +typedef struct wlc_leaked_infra_guard_marker { |
---|
| 17620 | + /* type field for this TLV: WL_LEAKY_AP_STATS_GT_TYPE */ |
---|
| 17621 | + uint16 type; |
---|
| 17622 | + /* length field for this TLV */ |
---|
| 17623 | + uint16 len; |
---|
| 17624 | + /* guard sample sequence number; Updated by 1 on every guard sample */ |
---|
| 17625 | + uint32 seq_number; |
---|
| 17626 | + /* Guard time start time (tsf; PS indicated and acked) */ |
---|
| 17627 | + uint32 start_time; |
---|
| 17628 | + /* tsf timestamp for the GT end event */ |
---|
| 17629 | + uint32 gt_tsf_l; |
---|
| 17630 | + /* Guard time period in ms */ |
---|
| 17631 | + uint16 guard_duration; |
---|
| 17632 | + /* Number PPDUs in the notification */ |
---|
| 17633 | + uint16 num_pkts; |
---|
| 17634 | + /* Flags to indicate some states see below */ |
---|
| 17635 | + uint8 flag; |
---|
| 17636 | + /* pad for 32-bit alignment */ |
---|
| 17637 | + uint8 reserved[3]; |
---|
| 17638 | +} wlc_leaked_infra_guard_marker_t; |
---|
| 17639 | + |
---|
| 17640 | +/* Flag information */ |
---|
| 17641 | +#define WL_LEAKED_GUARD_TIME_NONE 0 /* Not in any guard time */ |
---|
| 17642 | +#define WL_LEAKED_GUARD_TIME_FRTS (0x01 << 0) /* Normal FRTS power save */ |
---|
| 17643 | +#define WL_LEAKED_GUARD_TIME_SCAN (0x01 << 1) /* Channel switch due to scanning */ |
---|
| 17644 | +#define WL_LEAKED_GUARD_TIME_AWDL_PSF (0x01 << 2) /* Channel switch due to AWDL PSF */ |
---|
| 17645 | +#define WL_LEAKED_GUARD_TIME_AWDL_AW (0x01 << 3) /* Channel switch due to AWDL AW */ |
---|
| 17646 | +#define WL_LEAKED_GUARD_TIME_INFRA_STA (0x01 << 4) /* generic type infra sta channel switch */ |
---|
| 17647 | +#define WL_LEAKED_GUARD_TIME_TERMINATED (0x01 << 7) /* indicate a GT is terminated early */ |
---|
| 17648 | + |
---|
| 17649 | +typedef struct wlc_leaked_infra_packet_stat { |
---|
| 17650 | + uint16 type; /* type field for this TLV: WL_LEAKY_AP_STATS_PKT_TYPE */ |
---|
| 17651 | + uint16 len; /* length field for this TLV */ |
---|
| 17652 | + uint16 ppdu_len_bytes; /* PPDU packet length in bytes */ |
---|
| 17653 | + uint16 num_mpdus; /* number of the MPDUs in the PPDU */ |
---|
| 17654 | + uint32 ppdu_time; /* PPDU arrival time at the begining of the guard time */ |
---|
| 17655 | + uint32 rate; /* PPDU packet rate; Received packet's data rate */ |
---|
| 17656 | + uint16 seq_number; /* sequence number */ |
---|
| 17657 | + int8 rssi; /* RSSI */ |
---|
| 17658 | + uint8 tid; /* tid */ |
---|
| 17659 | +} wlc_leaked_infra_packet_stat_t; |
---|
| 17660 | + |
---|
| 17661 | +/* Wake timer structure definition */ |
---|
| 17662 | +#define WAKE_TIMER_VERSION 1 |
---|
| 17663 | +#define WAKE_TIMER_NOLIMIT 0xFFFF |
---|
| 17664 | + |
---|
| 17665 | +typedef struct wake_timer { |
---|
| 17666 | + uint16 ver; |
---|
| 17667 | + uint16 len; |
---|
| 17668 | + uint16 limit; /* number of events to deliver |
---|
| 17669 | + * 0-disable, 0xffff-indefinite, num_events otherwise |
---|
| 17670 | + */ |
---|
| 17671 | + uint16 count; /* number of events delivered since enable (get only) */ |
---|
| 17672 | + uint16 period; /* timeout/period in milliseconds */ |
---|
| 17673 | +} wake_timer_t; |
---|
| 17674 | + |
---|
| 17675 | +typedef struct wl_desense_restage_gain { |
---|
| 17676 | + uint16 version; |
---|
| 17677 | + uint16 length; |
---|
| 17678 | + uint32 band; |
---|
| 17679 | + uint8 num_cores; |
---|
| 17680 | + uint8 desense_array[WL_TX_CHAINS_MAX]; |
---|
| 17681 | + uint8 PAD[3]; |
---|
| 17682 | +} wl_desense_restage_gain_t; |
---|
| 17683 | + |
---|
| 17684 | +#define MAX_UCM_CHAINS 5 |
---|
| 17685 | +#define MAX_UCM_PROFILES 10 |
---|
| 17686 | +#define UCM_PROFILE_VERSION_1 1 |
---|
| 17687 | + |
---|
| 17688 | +/* UCM per chain attribute struct */ |
---|
| 17689 | +typedef struct wlc_btcx_chain_attr { |
---|
| 17690 | + uint16 length; /* chain attr length, version is same as profile version */ |
---|
| 17691 | + int8 desense_level; /* per chain desense level */ |
---|
| 17692 | + int8 ack_pwr_strong_rssi; /* per chain ack power at strong rssi */ |
---|
| 17693 | + int8 ack_pwr_weak_rssi; /* per chain ack power at weak rssi */ |
---|
| 17694 | + int8 tx_pwr_strong_rssi; /* per chain tx power at strong rssi */ |
---|
| 17695 | + int8 tx_pwr_weak_rssi; /* per chain tx power at weak rssi */ |
---|
| 17696 | + uint8 PAD[1]; /* additional bytes for alignment */ |
---|
| 17697 | +} wlc_btcx_chain_attr_t; |
---|
| 17698 | + |
---|
| 17699 | +typedef struct wlc_btcx_profile_v1 { |
---|
| 17700 | + uint16 version; /* UCM profile version */ |
---|
| 17701 | + uint16 length; /* profile size */ |
---|
| 17702 | + uint16 fixed_length; /* size of the fixed portion of the profile */ |
---|
| 17703 | + uint8 init; /* profile initialized or not */ |
---|
| 17704 | + uint8 chain_attr_count; /* Number of elements in chain_attr array */ |
---|
| 17705 | + uint8 profile_index; /* profile index */ |
---|
| 17706 | + uint8 mode_strong_wl_bt; /* Mode under strong WLAN and BT RSSI */ |
---|
| 17707 | + uint8 mode_weak_wl; /* Mode under weak WLAN RSSI */ |
---|
| 17708 | + uint8 mode_weak_bt; /* Mode under weak BT RSSI */ |
---|
| 17709 | + uint8 mode_weak_wl_bt; /* Mode under weak BT and WLAN RSSI */ |
---|
| 17710 | + int8 mode_wl_hi_lo_rssi_thresh; /* Strong to weak WLAN RSSI threshold for mode selection */ |
---|
| 17711 | + int8 mode_wl_lo_hi_rssi_thresh; /* Weak to strong WLAN RSSI threshold for mode selection */ |
---|
| 17712 | + int8 mode_bt_hi_lo_rssi_thresh; /* Strong to weak BT RSSI threshold for mode selection */ |
---|
| 17713 | + int8 mode_bt_lo_hi_rssi_thresh; /* Weak to strong BT RSSI threshold for mode selection */ |
---|
| 17714 | + int8 desense_wl_hi_lo_rssi_thresh; /* Strong to weak RSSI threshold for desense */ |
---|
| 17715 | + int8 desense_wl_lo_hi_rssi_thresh; /* Weak to strong RSSI threshold for desense */ |
---|
| 17716 | + int8 ack_pwr_wl_hi_lo_rssi_thresh; /* Strong to weak RSSI threshold for ACK power */ |
---|
| 17717 | + int8 ack_pwr_wl_lo_hi_rssi_thresh; /* Weak to strong RSSI threshold for ACK power */ |
---|
| 17718 | + int8 tx_pwr_wl_hi_lo_rssi_thresh; /* Strong to weak RSSI threshold for Tx power */ |
---|
| 17719 | + int8 tx_pwr_wl_lo_hi_rssi_thresh; /* Weak to strong RSSI threshold for Tx power */ |
---|
| 17720 | + uint8 PAD[1]; /* additional bytes for 4 byte alignment */ |
---|
| 17721 | + wlc_btcx_chain_attr_t chain_attr[]; /* variable length array with chain attributes */ |
---|
| 17722 | +} wlc_btcx_profile_v1_t; |
---|
| 17723 | + |
---|
| 17724 | +#define SSSR_D11_RESET_SEQ_STEPS 5 |
---|
| 17725 | +#define SSSR_REG_INFO_VER 0 |
---|
| 17726 | +#define SSSR_REG_INFO_VER_1 1 |
---|
| 17727 | + |
---|
| 17728 | +typedef struct sssr_reg_info_v0 { |
---|
| 17729 | + uint16 version; |
---|
| 17730 | + uint16 length; /* length of the structure validated at host */ |
---|
| 17731 | + struct { |
---|
| 17732 | + struct { |
---|
| 17733 | + uint32 pmuintmask0; |
---|
| 17734 | + uint32 pmuintmask1; |
---|
| 17735 | + uint32 resreqtimer; |
---|
| 17736 | + uint32 macresreqtimer; |
---|
| 17737 | + uint32 macresreqtimer1; |
---|
| 17738 | + } base_regs; |
---|
| 17739 | + } pmu_regs; |
---|
| 17740 | + struct { |
---|
| 17741 | + struct { |
---|
| 17742 | + uint32 intmask; |
---|
| 17743 | + uint32 powerctrl; |
---|
| 17744 | + uint32 clockcontrolstatus; |
---|
| 17745 | + uint32 powerctrl_mask; |
---|
| 17746 | + } base_regs; |
---|
| 17747 | + } chipcommon_regs; |
---|
| 17748 | + struct { |
---|
| 17749 | + struct { |
---|
| 17750 | + uint32 clockcontrolstatus; |
---|
| 17751 | + uint32 clockcontrolstatus_val; |
---|
| 17752 | + } base_regs; |
---|
| 17753 | + struct { |
---|
| 17754 | + uint32 resetctrl; |
---|
| 17755 | + uint32 itopoobb; |
---|
| 17756 | + } wrapper_regs; |
---|
| 17757 | + } arm_regs; |
---|
| 17758 | + struct { |
---|
| 17759 | + struct { |
---|
| 17760 | + uint32 ltrstate; |
---|
| 17761 | + uint32 clockcontrolstatus; |
---|
| 17762 | + uint32 clockcontrolstatus_val; |
---|
| 17763 | + } base_regs; |
---|
| 17764 | + struct { |
---|
| 17765 | + uint32 itopoobb; |
---|
| 17766 | + } wrapper_regs; |
---|
| 17767 | + } pcie_regs; |
---|
| 17768 | + struct { |
---|
| 17769 | + struct { |
---|
| 17770 | + uint32 ioctrl; |
---|
| 17771 | + } wrapper_regs; |
---|
| 17772 | + uint32 vasip_sr_addr; |
---|
| 17773 | + uint32 vasip_sr_size; |
---|
| 17774 | + } vasip_regs; |
---|
| 17775 | + struct { |
---|
| 17776 | + struct { |
---|
| 17777 | + uint32 xmtaddress; |
---|
| 17778 | + uint32 xmtdata; |
---|
| 17779 | + uint32 clockcontrolstatus; |
---|
| 17780 | + uint32 clockcontrolstatus_val; |
---|
| 17781 | + } base_regs; |
---|
| 17782 | + struct { |
---|
| 17783 | + uint32 resetctrl; |
---|
| 17784 | + uint32 itopoobb; |
---|
| 17785 | + uint32 ioctrl; |
---|
| 17786 | + uint32 ioctrl_resetseq_val[SSSR_D11_RESET_SEQ_STEPS]; |
---|
| 17787 | + } wrapper_regs; |
---|
| 17788 | + uint32 sr_size; |
---|
| 17789 | + } mac_regs[MAX_NUM_D11CORES]; |
---|
| 17790 | +} sssr_reg_info_v0_t; |
---|
| 17791 | + |
---|
| 17792 | +typedef struct sssr_reg_info_v1 { |
---|
| 17793 | + uint16 version; |
---|
| 17794 | + uint16 length; /* length of the structure validated at host */ |
---|
| 17795 | + struct { |
---|
| 17796 | + struct { |
---|
| 17797 | + uint32 pmuintmask0; |
---|
| 17798 | + uint32 pmuintmask1; |
---|
| 17799 | + uint32 resreqtimer; |
---|
| 17800 | + uint32 macresreqtimer; |
---|
| 17801 | + uint32 macresreqtimer1; |
---|
| 17802 | + } base_regs; |
---|
| 17803 | + } pmu_regs; |
---|
| 17804 | + struct { |
---|
| 17805 | + struct { |
---|
| 17806 | + uint32 intmask; |
---|
| 17807 | + uint32 powerctrl; |
---|
| 17808 | + uint32 clockcontrolstatus; |
---|
| 17809 | + uint32 powerctrl_mask; |
---|
| 17810 | + } base_regs; |
---|
| 17811 | + } chipcommon_regs; |
---|
| 17812 | + struct { |
---|
| 17813 | + struct { |
---|
| 17814 | + uint32 clockcontrolstatus; |
---|
| 17815 | + uint32 clockcontrolstatus_val; |
---|
| 17816 | + } base_regs; |
---|
| 17817 | + struct { |
---|
| 17818 | + uint32 resetctrl; |
---|
| 17819 | + uint32 itopoobb; |
---|
| 17820 | + } wrapper_regs; |
---|
| 17821 | + } arm_regs; |
---|
| 17822 | + struct { |
---|
| 17823 | + struct { |
---|
| 17824 | + uint32 ltrstate; |
---|
| 17825 | + uint32 clockcontrolstatus; |
---|
| 17826 | + uint32 clockcontrolstatus_val; |
---|
| 17827 | + } base_regs; |
---|
| 17828 | + struct { |
---|
| 17829 | + uint32 itopoobb; |
---|
| 17830 | + } wrapper_regs; |
---|
| 17831 | + } pcie_regs; |
---|
| 17832 | + struct { |
---|
| 17833 | + struct { |
---|
| 17834 | + uint32 ioctrl; |
---|
| 17835 | + } wrapper_regs; |
---|
| 17836 | + uint32 vasip_sr_addr; |
---|
| 17837 | + uint32 vasip_sr_size; |
---|
| 17838 | + } vasip_regs; |
---|
| 17839 | + struct { |
---|
| 17840 | + struct { |
---|
| 17841 | + uint32 xmtaddress; |
---|
| 17842 | + uint32 xmtdata; |
---|
| 17843 | + uint32 clockcontrolstatus; |
---|
| 17844 | + uint32 clockcontrolstatus_val; |
---|
| 17845 | + } base_regs; |
---|
| 17846 | + struct { |
---|
| 17847 | + uint32 resetctrl; |
---|
| 17848 | + uint32 itopoobb; |
---|
| 17849 | + uint32 ioctrl; |
---|
| 17850 | + uint32 ioctrl_resetseq_val[SSSR_D11_RESET_SEQ_STEPS]; |
---|
| 17851 | + } wrapper_regs; |
---|
| 17852 | + uint32 sr_size; |
---|
| 17853 | + } mac_regs[MAX_NUM_D11CORES]; |
---|
| 17854 | + struct { |
---|
| 17855 | + uint32 dig_sr_addr; |
---|
| 17856 | + uint32 dig_sr_size; |
---|
| 17857 | + } dig_mem_info; |
---|
| 17858 | +} sssr_reg_info_v1_t; |
---|
| 17859 | + |
---|
| 17860 | +#ifndef SSSR_REG_INFO_HAS_ALIAS |
---|
| 17861 | +typedef sssr_reg_info_v0_t sssr_reg_info_t; |
---|
| 17862 | +#endif // endif |
---|
| 17863 | + |
---|
| 17864 | +/* ADaptive Power Save(ADPS) structure definition */ |
---|
| 17865 | +#define WL_ADPS_IOV_MAJOR_VER 1 |
---|
| 17866 | +#define WL_ADPS_IOV_MINOR_VER 0 |
---|
| 17867 | +#define WL_ADPS_IOV_MAJOR_VER_SHIFT 8 |
---|
| 17868 | +#define WL_ADPS_IOV_VER \ |
---|
| 17869 | + ((WL_ADPS_IOV_MAJOR_VER << WL_ADPS_IOV_MAJOR_VER_SHIFT) | WL_ADPS_IOV_MINOR_VER) |
---|
| 17870 | + |
---|
| 17871 | +#define ADPS_NUM_DIR 2 |
---|
| 17872 | +#define ADPS_RX 0 |
---|
| 17873 | +#define ADPS_TX 1 |
---|
| 17874 | + |
---|
| 17875 | +#define WL_ADPS_IOV_MODE 0x0001 |
---|
| 17876 | +#define WL_ADPS_IOV_RSSI 0x0002 |
---|
| 17877 | +#define WL_ADPS_IOV_DUMP 0x0003 |
---|
| 17878 | +#define WL_ADPS_IOV_DUMP_CLEAR 0x0004 |
---|
| 17879 | +#define WL_ADPS_IOV_SUSPEND 0x0005 |
---|
| 17880 | + |
---|
| 17881 | +#define ADPS_SUMMARY_STEP_NUM 2 |
---|
| 17882 | +#define ADPS_SUMMARY_STEP_LOW 0 |
---|
| 17883 | +#define ADPS_SUMMARY_STEP_HIGH 1 |
---|
| 17884 | + |
---|
| 17885 | +#define ADPS_SUB_IOV_VERSION_1 1 |
---|
| 17886 | +#define ADPS_SUB_IOV_VERSION_2 2 |
---|
| 17887 | + |
---|
| 17888 | +/* suspend/resume ADPS by wl/private command from host */ |
---|
| 17889 | +#define ADPS_RESUME 0u |
---|
| 17890 | +#define ADPS_SUSPEND 1u |
---|
| 17891 | + |
---|
| 17892 | +typedef struct wl_adps_params_v1 { |
---|
| 17893 | + uint16 version; |
---|
| 17894 | + uint16 length; |
---|
| 17895 | + uint8 band; /* band - 2G or 5G */ |
---|
| 17896 | + uint8 mode; /* operation mode, default = 0 (ADPS disable) */ |
---|
| 17897 | + uint16 padding; |
---|
| 17898 | +} wl_adps_params_v1_t; |
---|
| 17899 | + |
---|
| 17900 | +typedef struct wl_adps_rssi { |
---|
| 17901 | + int32 thresh_hi; /* rssi threshold to resume ADPS operation */ |
---|
| 17902 | + int32 thresh_lo; /* rssi threshold to suspend ADPS operation */ |
---|
| 17903 | +} wl_adps_rssi_t; |
---|
| 17904 | + |
---|
| 17905 | +typedef struct wl_adps_rssi_params_v1 { |
---|
| 17906 | + uint16 version; |
---|
| 17907 | + uint16 length; |
---|
| 17908 | + uint8 band; |
---|
| 17909 | + uint8 padding[3]; |
---|
| 17910 | + wl_adps_rssi_t rssi; |
---|
| 17911 | +} wl_adps_rssi_params_v1_t; |
---|
| 17912 | + |
---|
| 17913 | +typedef struct adps_stat_elem { |
---|
| 17914 | + uint32 duration; /* each step duration time (mSec) */ |
---|
| 17915 | + uint32 counts; /* each step hit count number */ |
---|
| 17916 | +} adps_stat_elem_t; |
---|
| 17917 | + |
---|
| 17918 | +typedef struct wl_adps_dump_summary_v1 { |
---|
| 17919 | + uint16 version; |
---|
| 17920 | + uint16 length; |
---|
| 17921 | + uint8 mode; /* operation mode: On/Off */ |
---|
| 17922 | + uint8 flags; /* restrict flags */ |
---|
| 17923 | + uint8 current_step; /* current step */ |
---|
| 17924 | + uint8 padding; |
---|
| 17925 | + adps_stat_elem_t stat[ADPS_SUMMARY_STEP_NUM]; /* statistics */ |
---|
| 17926 | +} wl_adps_dump_summary_v1_t; |
---|
| 17927 | + |
---|
| 17928 | +typedef struct wl_adps_dump_summary_v2 { |
---|
| 17929 | + uint16 version; |
---|
| 17930 | + uint16 length; |
---|
| 17931 | + uint8 mode; /* operation mode: On/Off */ |
---|
| 17932 | + uint8 current_step; /* current step */ |
---|
| 17933 | + uint8 padding[2]; |
---|
| 17934 | + uint32 flags; /* restrict flags */ |
---|
| 17935 | + adps_stat_elem_t stat[ADPS_SUMMARY_STEP_NUM]; /* statistics */ |
---|
| 17936 | +} wl_adps_dump_summary_v2_t; |
---|
| 17937 | + |
---|
| 17938 | +typedef struct wl_adps_suspend_v1 { |
---|
| 17939 | + uint16 version; |
---|
| 17940 | + uint16 length; |
---|
| 17941 | + uint8 suspend; /* 1: suspend 0: resume */ |
---|
| 17942 | + uint8 padding[3]; |
---|
| 17943 | +} wl_adps_suspend_v1_t; |
---|
| 17944 | + |
---|
| 17945 | +typedef struct wlc_btc_2gchain_dis { |
---|
| 17946 | + uint16 ver; |
---|
| 17947 | + uint16 len; |
---|
| 17948 | + uint8 chain_dis; |
---|
| 17949 | + uint8 flag; |
---|
| 17950 | +} wlc_btc_2gchain_dis_t; |
---|
| 17951 | + |
---|
| 17952 | +#define WLC_BTC_2GCHAIN_DIS_REASSOC 0x1 |
---|
| 17953 | +#define WLC_BTC_2GCHAIN_DIS_VER1 0x1 |
---|
| 17954 | +#define WLC_BTC_2GCHAIN_DIS_VER1_LEN 6 |
---|
| 17955 | + |
---|
| 17956 | +/* --- BTCX WiFi Protection (btc_wifi_prot iovar) --- */ |
---|
| 17957 | + |
---|
| 17958 | +/* Current iovar structure version: 1 */ |
---|
| 17959 | +#define WL_BTC_WIFI_PROT_VER_1 1 |
---|
| 17960 | + |
---|
| 17961 | +typedef struct wl_btc_wifi_prot_v1 { |
---|
| 17962 | + uint16 ver; /* version */ |
---|
| 17963 | + uint16 len; /* total length */ |
---|
| 17964 | + uint8 data[]; /* bcm_xtlv_t payload */ |
---|
| 17965 | +} wl_btc_wifi_prot_v1_t; |
---|
| 17966 | + |
---|
| 17967 | +/* Xtlv tags (protection type) and data */ |
---|
| 17968 | +#define WL_BTC_WIFI_PROT_M1_M4 1 |
---|
| 17969 | +typedef struct wl_btc_wifi_prot_m1_m4 { |
---|
| 17970 | + uint32 enable; /* enable/disable m1-m4 protection */ |
---|
| 17971 | + uint32 timeout; /* maximum timeout in ms (0: default) */ |
---|
| 17972 | +} wl_btc_wifi_prot_m1_m4_t; |
---|
| 17973 | + |
---|
| 17974 | +#define WL_BTC_WIFI_PROT_ENABLE 1 |
---|
| 17975 | +#define WL_BTC_WIFI_PROT__DISABLE 0 |
---|
| 17976 | + |
---|
| 17977 | +/* --- End BTCX WiFi Protection --- */ |
---|
| 17978 | + |
---|
| 17979 | +/* --- BTCX ULMU disable (btc_ulmu_config iovar) --- */ |
---|
| 17980 | + |
---|
| 17981 | +/* Version number */ |
---|
| 17982 | +#define WL_BTC_ULMU_CONFIG_VER_1 1 |
---|
| 17983 | +typedef struct wl_btc_ulmu_config_v1 { |
---|
| 17984 | + uint16 version; /* btc_ulmu_config version */ |
---|
| 17985 | + uint16 len; /* Total length */ |
---|
| 17986 | + uint32 ulmu_bt_task_bm; /* BT Task bimtap for ULMU disable */ |
---|
| 17987 | + uint32 ulmu_bt_period_th; /* BT period thresh for ULMU disable */ |
---|
| 17988 | +} wl_btc_ulmu_config_v1_t; |
---|
| 17989 | + |
---|
| 17990 | +/* --- End BTCX ULMU config --- */ |
---|
| 17991 | +enum wl_rpsnoa_cmd_ids { |
---|
| 17992 | + WL_RPSNOA_CMD_ENABLE = 1, |
---|
| 17993 | + WL_RPSNOA_CMD_STATUS, |
---|
| 17994 | + WL_RPSNOA_CMD_PARAMS, |
---|
| 17995 | + WL_RPSNOA_CMD_LAST |
---|
| 17996 | +}; |
---|
| 17997 | + |
---|
| 17998 | +typedef struct rpsnoa_cmnhdr { |
---|
| 17999 | + uint16 ver; /* cmd structure version */ |
---|
| 18000 | + uint16 len; /* cmd structure len */ |
---|
| 18001 | + uint32 subcmd; |
---|
| 18002 | + uint32 cnt; |
---|
| 18003 | +} rpsnoa_cmnhdr_t; |
---|
| 18004 | + |
---|
| 18005 | +typedef struct rpsnoa_data { |
---|
| 18006 | + int16 band; |
---|
| 18007 | + int16 value; |
---|
| 18008 | +} rpsnoa_data_t; |
---|
| 18009 | + |
---|
| 18010 | +typedef struct rpsnoa_stats { |
---|
| 18011 | + int16 band; |
---|
| 18012 | + int16 state; |
---|
| 18013 | + uint32 sleep_dur; |
---|
| 18014 | + uint32 sleep_avail_dur; |
---|
| 18015 | + uint32 last_pps; |
---|
| 18016 | +} rpsnoa_stats_t; |
---|
| 18017 | + |
---|
| 18018 | +typedef struct rpsnoa_param { |
---|
| 18019 | + uint16 band; |
---|
| 18020 | + uint8 level; |
---|
| 18021 | + uint8 stas_assoc_check; |
---|
| 18022 | + uint32 pps; |
---|
| 18023 | + uint32 quiet_time; |
---|
| 18024 | +} rpsnoa_param_t; |
---|
| 18025 | + |
---|
| 18026 | +typedef struct rpsnoa_iovar { |
---|
| 18027 | + rpsnoa_cmnhdr_t hdr; |
---|
| 18028 | + rpsnoa_data_t data[1]; |
---|
| 18029 | +} rpsnoa_iovar_t; |
---|
| 18030 | + |
---|
| 18031 | +typedef struct rpsnoa_iovar_status { |
---|
| 18032 | + rpsnoa_cmnhdr_t hdr; |
---|
| 18033 | + rpsnoa_stats_t stats[1]; |
---|
| 18034 | +} rpsnoa_iovar_status_t; |
---|
| 18035 | + |
---|
| 18036 | +typedef struct rpsnoa_iovar_params { |
---|
| 18037 | + rpsnoa_cmnhdr_t hdr; |
---|
| 18038 | + rpsnoa_param_t param[1]; |
---|
| 18039 | +} rpsnoa_iovar_params_t; |
---|
| 18040 | + |
---|
| 18041 | +/* Per-interface reportable stats types */ |
---|
| 18042 | +enum wl_ifstats_xtlv_id { |
---|
| 18043 | + /* global */ |
---|
| 18044 | + WL_IFSTATS_XTLV_SLICE_INDEX = 1, |
---|
| 18045 | + WL_IFSTATS_XTLV_IF_INDEX = 2, |
---|
| 18046 | + WL_IFSTATS_XTLV_MAC_ADDR = 3, |
---|
| 18047 | + WL_IFSTATS_XTLV_REPORT_CMD = 4, /* Comes in an iovar */ |
---|
| 18048 | + WL_IFSTATS_XTLV_BUS_PCIE = 5, |
---|
| 18049 | + |
---|
| 18050 | + /* Report data across all SCBs using ecounters */ |
---|
| 18051 | + /* STA_info ecounters */ |
---|
| 18052 | + WL_IFSTATS_XTLV_WL_STA_INFO_ECOUNTERS = 0x100, |
---|
| 18053 | + /* For AMPDU stat sub-types requested in a different format */ |
---|
| 18054 | + /* these could be sum and report stats across slices. OR |
---|
| 18055 | + * report sub-types in pairs so host can sum and add. |
---|
| 18056 | + * Information sent here is across slices, therefore global |
---|
| 18057 | + */ |
---|
| 18058 | + WL_IFSTATS_XTLV_TX_AMPDU_STATS = 0x101, |
---|
| 18059 | + WL_IFSTATS_XTLV_RX_AMPDU_STATS = 0x102, |
---|
| 18060 | + /* scb ecounter statistics */ |
---|
| 18061 | + WL_IFSTATS_XTLV_SCB_ECOUNTERS = 0x103, |
---|
| 18062 | + /* Global NAN stats */ |
---|
| 18063 | + WL_IFSTATS_XTLV_NAN_STATS = 0x104, |
---|
| 18064 | + |
---|
| 18065 | + /* Per-slice information |
---|
| 18066 | + * Per-interface reporting could also include slice specific data |
---|
| 18067 | + */ |
---|
| 18068 | + /* xtlv container for reporting */ |
---|
| 18069 | + WL_IFSTATS_XTLV_WL_SLICE = 0x301, |
---|
| 18070 | + /* Per-slice AMPDU stats */ |
---|
| 18071 | + WL_IFSTATS_XTLV_WL_SLICE_TX_AMPDU_DUMP = 0x302, |
---|
| 18072 | + WL_IFSTATS_XTLV_WL_SLICE_RX_AMPDU_DUMP = 0x303, |
---|
| 18073 | + /* Per-slice BTCOEX stats */ |
---|
| 18074 | + WL_IFSTATS_XTLV_WL_SLICE_BTCOEX = 0x304, |
---|
| 18075 | + /* V11_WLCNTRS used in ecounters */ |
---|
| 18076 | + WL_IFSTATS_XTLV_WL_SLICE_V11_WLCNTRS = 0x305, |
---|
| 18077 | + /* V30_WLCNTRS Used in ecounters */ |
---|
| 18078 | + WL_IFSTATS_XTLV_WL_SLICE_V30_WLCNTRS = 0x306, |
---|
| 18079 | + /* phy,ucode,scan pwrstats */ |
---|
| 18080 | + WL_IFSTATS_XTLV_WL_SLICE_PWRSTATS_PHY = 0x307, |
---|
| 18081 | + WL_IFSTATS_XTLV_WL_SLICE_PWRSTATS_SCAN = 0x308, |
---|
| 18082 | + WL_IFSTATS_XTLV_WL_SLICE_PWRSTATS_WAKE_V2 = 0x309, |
---|
| 18083 | + /* Per-slice LTECOEX stats */ |
---|
| 18084 | + WL_IFSTATS_XTLV_WL_SLICE_LTECOEX = 0x30A, |
---|
| 18085 | + /* TVPM ecounters */ |
---|
| 18086 | + WL_IFSTATS_XTLV_WL_SLICE_TVPM = 0x30B, |
---|
| 18087 | + /* TDMTX ecounters */ |
---|
| 18088 | + WL_IFSTATS_XTLV_WL_SLICE_TDMTX = 0x30C, |
---|
| 18089 | + /* Slice specific state capture in periodic fasion */ |
---|
| 18090 | + WL_SLICESTATS_XTLV_PERIODIC_STATE = 0x30D, |
---|
| 18091 | + /* Per-slice BTCOEX task duration stats */ |
---|
| 18092 | + WL_IFSTATS_XTLV_WL_SLICE_BTCOEX_TSKDUR_STATS = 0x30E, |
---|
| 18093 | + /* Per-interface */ |
---|
| 18094 | + /* XTLV container for reporting */ |
---|
| 18095 | + WL_IFSTATS_XTLV_IF = 0x501, |
---|
| 18096 | + /* Generic stats applicable to all IFs */ |
---|
| 18097 | + WL_IFSTATS_XTLV_GENERIC = 0x502, |
---|
| 18098 | + /* Infra specific */ |
---|
| 18099 | + WL_IFSTATS_XTLV_INFRA_SPECIFIC = 0x503, |
---|
| 18100 | + /* MGT counters infra and softAP */ |
---|
| 18101 | + WL_IFSTATS_XTLV_MGT_CNT = 0x504, |
---|
| 18102 | + /* AMPDU stats on per-IF */ |
---|
| 18103 | + WL_IFSTATS_XTLV_AMPDU_DUMP = 0x505, |
---|
| 18104 | + WL_IFSTATS_XTLV_IF_SPECIFIC = 0x506, |
---|
| 18105 | + WL_IFSTATS_XTLV_WL_PWRSTATS_AWDL = 0x507, |
---|
| 18106 | + WL_IFSTATS_XTLV_IF_LQM = 0x508, |
---|
| 18107 | + /* Interface specific state capture in periodic fashion */ |
---|
| 18108 | + WL_IFSTATS_XTLV_IF_PERIODIC_STATE = 0x509, |
---|
| 18109 | + /* Event statistics on per-IF */ |
---|
| 18110 | + WL_IFSTATS_XTLV_IF_EVENT_STATS = 0x50A, |
---|
| 18111 | + /* ecounters for nan */ |
---|
| 18112 | + /* nan slot stats */ |
---|
| 18113 | + WL_IFSTATS_XTLV_NAN_SLOT_STATS = 0x601 |
---|
| 18114 | +}; |
---|
| 18115 | + |
---|
| 18116 | +/* current version of wl_stats_report_t structure for request */ |
---|
| 18117 | +#define WL_STATS_REPORT_REQUEST_VERSION_V2 2 |
---|
| 18118 | + |
---|
| 18119 | +/* current version of wl_stats_report_t structure for response */ |
---|
| 18120 | +#define WL_STATS_REPORT_RESPONSE_VERSION_V2 2 |
---|
| 18121 | + |
---|
| 18122 | +/** Top structure of if_counters IOVar buffer */ |
---|
| 18123 | +typedef struct wl_stats_report { |
---|
| 18124 | + uint16 version; /**< see version definitions above */ |
---|
| 18125 | + uint16 length; /**< length of data including all paddings. */ |
---|
| 18126 | + uint8 data []; /**< variable length payload: |
---|
| 18127 | + * 1 or more bcm_xtlv_t type of tuples. |
---|
| 18128 | + * each tuple is padded to multiple of 4 bytes. |
---|
| 18129 | + * 'length' field of this structure includes all paddings. |
---|
| 18130 | + */ |
---|
| 18131 | +} wl_stats_report_t; |
---|
| 18132 | + |
---|
| 18133 | +/* interface specific mgt count */ |
---|
| 18134 | +#define WL_MGT_STATS_VERSION_V1 1 |
---|
| 18135 | +/* Associated stats type: WL_IFSTATS_MGT_CNT */ |
---|
| 18136 | +typedef struct { |
---|
| 18137 | + uint16 version; |
---|
| 18138 | + uint16 length; |
---|
| 18139 | + |
---|
| 18140 | + /* detailed control/management frames */ |
---|
| 18141 | + uint32 txnull; |
---|
| 18142 | + uint32 rxnull; |
---|
| 18143 | + uint32 txqosnull; |
---|
| 18144 | + uint32 rxqosnull; |
---|
| 18145 | + uint32 txassocreq; |
---|
| 18146 | + uint32 rxassocreq; |
---|
| 18147 | + uint32 txreassocreq; |
---|
| 18148 | + uint32 rxreassocreq; |
---|
| 18149 | + uint32 txdisassoc; |
---|
| 18150 | + uint32 rxdisassoc; |
---|
| 18151 | + uint32 txassocrsp; |
---|
| 18152 | + uint32 rxassocrsp; |
---|
| 18153 | + uint32 txreassocrsp; |
---|
| 18154 | + uint32 rxreassocrsp; |
---|
| 18155 | + uint32 txauth; |
---|
| 18156 | + uint32 rxauth; |
---|
| 18157 | + uint32 txdeauth; |
---|
| 18158 | + uint32 rxdeauth; |
---|
| 18159 | + uint32 txprobereq; |
---|
| 18160 | + uint32 rxprobereq; |
---|
| 18161 | + uint32 txprobersp; |
---|
| 18162 | + uint32 rxprobersp; |
---|
| 18163 | + uint32 txaction; |
---|
| 18164 | + uint32 rxaction; |
---|
| 18165 | + uint32 txpspoll; |
---|
| 18166 | + uint32 rxpspoll; |
---|
| 18167 | +} wl_if_mgt_stats_t; |
---|
| 18168 | + |
---|
| 18169 | +#define WL_INFRA_STATS_VERSION_V1 1 |
---|
| 18170 | +/* Associated stats type: WL_IFSTATS_INFRA_SPECIFIC */ |
---|
| 18171 | +typedef struct wl_infra_stats { |
---|
| 18172 | + uint16 version; /**< version of the structure */ |
---|
| 18173 | + uint16 length; |
---|
| 18174 | + uint32 rxbeaconmbss; |
---|
| 18175 | + uint32 tbtt; |
---|
| 18176 | +} wl_if_infra_stats_t; |
---|
| 18177 | + |
---|
| 18178 | +#define LTECOEX_STATS_VER 1 |
---|
| 18179 | + |
---|
| 18180 | +typedef struct wlc_ltecoex_stats { |
---|
| 18181 | + uint16 version; /**< WL_IFSTATS_XTLV_WL_SLICE_LTECOEX */ |
---|
| 18182 | + uint16 len; /* Length of wl_ltecx_stats structure */ |
---|
| 18183 | + uint8 slice_index; /* Slice unit of wl_ltecx_stats structure */ |
---|
| 18184 | + uint8 pad[3]; /* Padding */ |
---|
| 18185 | + /* LTE noise based eCounters Bins |
---|
| 18186 | + cumulative the wl_cnt_wlc_t and wl_ctl_mgt_cnt_t |
---|
| 18187 | + counter information based on LTE Coex interference level |
---|
| 18188 | + */ |
---|
| 18189 | + uint32 txframe_no_LTE; /* txframe counter in no LTE Coex case */ |
---|
| 18190 | + uint32 rxframe_no_LTE; /* rxframe counter in no LTE Coex case */ |
---|
| 18191 | + uint32 rxrtry_no_LTE; /* rxrtry counter in no LTE Coex case */ |
---|
| 18192 | + uint32 txretrans_no_LTE; /* txretrans counter in no LTE Coex case */ |
---|
| 18193 | + uint32 txnocts_no_LTE; /* txnocts counter in no LTE Coex case */ |
---|
| 18194 | + uint32 txrts_no_LTE; /* txrts counter in no LTE Coex case */ |
---|
| 18195 | + uint32 txdeauth_no_LTE; /* txdeauth counter in no LTE Coex case */ |
---|
| 18196 | + uint32 txassocreq_no_LTE; /* txassocreq counter in no LTE Coex case */ |
---|
| 18197 | + uint32 txassocrsp_no_LTE; /* txassocrsp counter in no LTE Coex case */ |
---|
| 18198 | + uint32 txreassocreq_no_LTE; /* txreassocreq counter in no LTE Coex case */ |
---|
| 18199 | + uint32 txreassocrsp_no_LTE; /* txreassocrsp counter in no LTE Coex case */ |
---|
| 18200 | + uint32 txframe_light_LTE; /* txframe counter in light LTE Coex case */ |
---|
| 18201 | + uint32 txretrans_light_LTE; /* txretrans counter in light LTE Coex case */ |
---|
| 18202 | + uint32 rxframe_light_LTE; /* rxframe counter in light LTE Coex case */ |
---|
| 18203 | + uint32 rxrtry_light_LTE; /* rxrtry counter in light LTE Coex case */ |
---|
| 18204 | + uint32 txnocts_light_LTE; /* txnocts counter in light LTE Coex case */ |
---|
| 18205 | + uint32 txrts_light_LTE; /* txrts counter in light LTE Coex case */ |
---|
| 18206 | + uint32 txdeauth_light_LTE; /* txdeauth counter in light LTE Coex case */ |
---|
| 18207 | + uint32 txassocreq_light_LTE; /* txassocreq counter in light LTE Coex case */ |
---|
| 18208 | + uint32 txassocrsp_light_LTE; /* txassocrsp counter in light LTE Coex case */ |
---|
| 18209 | + uint32 txreassocreq_light_LTE; /* txreassocreq counter in light LTE Coex case */ |
---|
| 18210 | + uint32 txreassocrsp_light_LTE; /* txreassocrsp counter in light LTE Coex case */ |
---|
| 18211 | + uint32 txframe_heavy_LTE; /* txframe counter in heavy LTE Coex case */ |
---|
| 18212 | + uint32 txretrans_heavy_LTE; /* txretrans counter in heavy LTE Coex case */ |
---|
| 18213 | + uint32 rxframe_heavy_LTE; /* rxframe counter in heavy LTE Coex case */ |
---|
| 18214 | + uint32 rxrtry_heavy_LTE; /* rxrtry counter in heavy LTE Coex case */ |
---|
| 18215 | + uint32 txnocts_heavy_LTE; /* txnocts counter in heavy LTE Coex case */ |
---|
| 18216 | + uint32 txrts_heavy_LTE; /* txrts counter in heavy LTE Coex case */ |
---|
| 18217 | + uint32 txdeauth_heavy_LTE; /* txdeauth counter in heavy LTE Coex case */ |
---|
| 18218 | + uint32 txassocreq_heavy_LTE; /* txassocreq counter in heavy LTE Coex case */ |
---|
| 18219 | + uint32 txassocrsp_heavy_LTE; /* txassocrsp counter in heavy LTE Coex case */ |
---|
| 18220 | + uint32 txreassocreq_heavy_LTE; /* txreassocreq counter in heavy LTE Coex case */ |
---|
| 18221 | + uint32 txreassocrsp_heavy_LTE; /* txreassocrsp counter in heavy LTE Coex case */ |
---|
| 18222 | + |
---|
| 18223 | + /* LTE specific ecounters */ |
---|
| 18224 | + uint16 type4_txinhi_dur; /* Duration of tx inhibit(in ms) due to Type4 */ |
---|
| 18225 | + uint16 type4_nonzero_cnt; /* Counts of none zero Type4 msg */ |
---|
| 18226 | + uint16 type4_timeout_cnt; /* Counts of Type4 timeout */ |
---|
| 18227 | + uint16 rx_pri_dur; /* Duration of wlan_rx_pri assertions */ |
---|
| 18228 | + uint16 rx_pri_cnt; /* Count of wlan_rx_pri assertions */ |
---|
| 18229 | + uint16 type6_dur; /* duration of LTE Tx power limiting assertions */ |
---|
| 18230 | + uint16 type6_cnt; /* Count of LTE Tx power limiting assertions */ |
---|
| 18231 | + uint16 ts_prot_frm_cnt; /* count of WLAN protection frames triggered by LTE coex */ |
---|
| 18232 | + uint16 ts_gr_cnt; /* count of intervals granted to WLAN in timesharing */ |
---|
| 18233 | + uint16 ts_gr_dur; /* duration granted to WLAN in timesharing */ |
---|
| 18234 | +} wlc_ltecoex_stats_t; |
---|
| 18235 | + |
---|
| 18236 | +#define CSA_EVT_CSA_RXED (1 << 0) |
---|
| 18237 | +#define CSA_EVT_CSA_TIMEOUT (1 << 1) |
---|
| 18238 | +#define CSA_EVT_FROM_INFRA (1 << 2) |
---|
| 18239 | +typedef struct csa_event_data { |
---|
| 18240 | + chanspec_t chan_old; |
---|
| 18241 | + dot11_ext_csa_ie_t ecsa; |
---|
| 18242 | + dot11_mesh_csp_ie_t mcsp; |
---|
| 18243 | + dot11_wide_bw_chan_switch_ie_t wbcs; |
---|
| 18244 | + uint8 flags; |
---|
| 18245 | + uint8 pad[3]; |
---|
| 18246 | +} csa_event_data_t; |
---|
| 18247 | + |
---|
| 18248 | +/* ifdef (WL_ASSOC_BCN_RPT) */ |
---|
| 18249 | +enum wl_bcn_report_cmd_id { |
---|
| 18250 | + WL_BCN_RPT_CMD_VER = 0, |
---|
| 18251 | + WL_BCN_RPT_CMD_CONFIG = 1, |
---|
| 18252 | + WL_BCN_RPT_CMD_VENDOR_IE = 2, |
---|
| 18253 | + WL_BCN_RPT_CMD_LAST |
---|
| 18254 | +}; |
---|
| 18255 | + |
---|
| 18256 | +/* beacon report specific macros */ |
---|
| 18257 | +#define WL_BCN_RPT_CCX_IE_OVERRIDE (1u << 0) |
---|
| 18258 | + |
---|
| 18259 | +/* beacon report specific macros */ |
---|
| 18260 | +#define WL_BCN_RPT_ASSOC_SCAN_UNSOLICITED_MODE (1u << 1) |
---|
| 18261 | +#define WL_BCN_RPT_ASSOC_SCAN_SOLICITED_MODE (1u << 2) |
---|
| 18262 | +#define WL_BCN_RPT_ASSOC_SCAN_MODE_SHIFT (1) |
---|
| 18263 | +#define WL_BCN_RPT_ASSOC_SCAN_MODE_MASK (WL_BCN_RPT_ASSOC_SCAN_UNSOLICITED_MODE |\ |
---|
| 18264 | + WL_BCN_RPT_ASSOC_SCAN_SOLICITED_MODE) |
---|
| 18265 | +#define WL_BCN_RPT_ASSOC_SCAN_MODE_MAX (WL_BCN_RPT_ASSOC_SCAN_MODE_MASK >> \ |
---|
| 18266 | + WL_BCN_RPT_ASSOC_SCAN_MODE_SHIFT) |
---|
| 18267 | +/* beacon report mode specific macro */ |
---|
| 18268 | +#define WL_BCN_RPT_ASSOC_SCAN_MODE_DEFAULT WL_BCN_RPT_ASSOC_SCAN_UNSOLICITED_MODE |
---|
| 18269 | + |
---|
| 18270 | +/* beacon report timeout config specific macros */ |
---|
| 18271 | +#define WL_BCN_RPT_ASSOC_SCAN_CACHE_TIMEOUT_DEFAULT (120000) |
---|
| 18272 | +#define WL_BCN_RPT_ASSOC_SCAN_CACHE_TIMEOUT_MIN (60000) |
---|
| 18273 | +#define WL_BCN_RPT_ASSOC_SCAN_CACHE_TIMEOUT_MAX (0xFFFFFFFF) |
---|
| 18274 | + |
---|
| 18275 | +/* beacon report cache count specific macros */ |
---|
| 18276 | +#define WL_BCN_RPT_ASSOC_SCAN_CACHE_COUNT_MIN (0) |
---|
| 18277 | +#define WL_BCN_RPT_ASSOC_SCAN_CACHE_COUNT_MAX (8) |
---|
| 18278 | +#define WL_BCN_RPT_ASSOC_SCAN_CACHE_COUNT_DEFAULT (WL_BCN_RPT_ASSOC_SCAN_CACHE_COUNT_MAX) |
---|
| 18279 | + |
---|
| 18280 | +#define WL_BCN_REPORT_CMD_VERSION 1 |
---|
| 18281 | +struct wl_bcn_report_cfg { |
---|
| 18282 | + uint32 flags; /**< Flags that defines the operation/setting information */ |
---|
| 18283 | + uint32 scan_cache_timeout; /**< scan cache timeout value in millisec */ |
---|
| 18284 | + uint32 scan_cache_timer_pend; /**< Read only pending time for timer expiry in millisec */ |
---|
| 18285 | + uint8 scan_cache_cnt; /**< scan cache count */ |
---|
| 18286 | +}; |
---|
| 18287 | + |
---|
| 18288 | +/* endif (WL_ASSOC_BCN_RPT) */ |
---|
| 18289 | + |
---|
| 18290 | +/* Thermal, Voltage, and Power Mitigation */ |
---|
| 18291 | +#define TVPM_REQ_VERSION_1 1 |
---|
| 18292 | +#define TVPM_REQ_CURRENT_VERSION TVPM_REQ_VERSION_1 |
---|
| 18293 | + |
---|
| 18294 | +/* tvpm iovar data */ |
---|
| 18295 | +typedef struct { |
---|
| 18296 | + uint16 version; /* TVPM request version */ |
---|
| 18297 | + uint16 length; /* Length of the entire structure */ |
---|
| 18298 | + |
---|
| 18299 | + uint16 req_type; /* Request type: wl_tvpm_req_type_t */ |
---|
| 18300 | + uint16 req_len; /* Length of the following value */ |
---|
| 18301 | + uint8 value[]; /* Variable length data depending on req_type */ |
---|
| 18302 | +} wl_tvpm_req_t; |
---|
| 18303 | + |
---|
| 18304 | +/* tvpm iovar request types */ |
---|
| 18305 | +typedef enum { |
---|
| 18306 | + WL_TVPM_REQ_CLTM_INDEX, /* req_value: uint32, range 1...100 */ |
---|
| 18307 | + WL_TVPM_REQ_PPM_INDEX, /* req_value: uint32, range 1...100 */ |
---|
| 18308 | + WL_TVPM_REQ_ENABLE, /* req_value: uint32, range 0...1 */ |
---|
| 18309 | + WL_TVPM_REQ_STATUS, /* req_value: none */ |
---|
| 18310 | + WL_TVPM_REQ_PERIOD, /* req_value: int32, range {-1,1-10} */ |
---|
| 18311 | + WL_TVPM_REQ_SETVAL, |
---|
| 18312 | + WL_TVPM_REQ_MAX |
---|
| 18313 | +} wl_tvpm_req_type_t; |
---|
| 18314 | + |
---|
| 18315 | +/* structure for data returned by request type WL_TVPM_REQ_STATUS */ |
---|
| 18316 | +typedef struct wl_tvpm_status { |
---|
| 18317 | + uint16 enable; /* whether TVPM is enabled */ |
---|
| 18318 | + uint16 tx_dutycycle; /* a percentage: 1-100 */ |
---|
| 18319 | + int16 tx_power_backoff; /* 0...-6 */ |
---|
| 18320 | + uint16 num_active_chains; /* 1...3 */ |
---|
| 18321 | + int16 temp; /* local temperature in degrees C */ |
---|
| 18322 | + uint8 vbat; /* local voltage in units of 0.1V */ |
---|
| 18323 | + uint8 pad; |
---|
| 18324 | +} wl_tvpm_status_t; |
---|
| 18325 | + |
---|
| 18326 | +/* TVPM ecounters */ |
---|
| 18327 | +typedef struct wl_tvpm_ecounters_t { |
---|
| 18328 | + uint16 version; /* version field */ |
---|
| 18329 | + uint16 length; /* byte length in wl_tvpm_ecounters_t starting at version */ |
---|
| 18330 | + uint16 tx_dutycycle; /* a percentage: 1-100 */ |
---|
| 18331 | + int16 tx_power_backoff; /* 0...-6 */ |
---|
| 18332 | + uint16 num_active_chains; /* 1...3 */ |
---|
| 18333 | + int16 temp; /* local temperature */ |
---|
| 18334 | + uint8 vbat; /* local voltage */ |
---|
| 18335 | + uint8 cltm; /* CLTM index */ |
---|
| 18336 | + uint8 ppm; /* PPM index */ |
---|
| 18337 | + uint8 pad; /* pad to align to uint16 */ |
---|
| 18338 | +} wl_tvpm_ecounters_t; |
---|
| 18339 | + |
---|
| 18340 | +#define TDMTX_ECOUNTERS_VERSION_V1 1 |
---|
| 18341 | +#define TDMTX_ECOUNTERS_VERSION_V2 2 |
---|
| 18342 | + |
---|
| 18343 | +/* TDMTX ecounters */ |
---|
| 18344 | +typedef struct wl_tdmtx_ecounters_v1 { |
---|
| 18345 | + uint16 version; /* version field */ |
---|
| 18346 | + uint16 length; /* byte length in wl_tdmtx_ecounters_t starting at version */ |
---|
| 18347 | + uint32 txa_on; /* TXA on requests */ |
---|
| 18348 | + uint32 txa_tmcnt; /* Total number of TXA timeout */ |
---|
| 18349 | + uint32 por_on; /* TXA POR requests */ |
---|
| 18350 | + uint32 txpuen; /* Path enable requests */ |
---|
| 18351 | + uint32 txpudis; /* Total number of times Tx path is muted on the slice */ |
---|
| 18352 | + uint32 txpri_on; /* Total number of times Tx priority was obtained by the slice */ |
---|
| 18353 | + uint32 txdefer; /* Total number of times Tx was deferred by the slice */ |
---|
| 18354 | + uint32 txmute; /* Total number of times active Tx muted on the slice */ |
---|
| 18355 | + uint32 actpwrboff; /* Total number of times TX power is backed off by the slice */ |
---|
| 18356 | + uint32 txa_dur; /* Total time txa on */ |
---|
| 18357 | + uint32 txpri_dur; /* Total time TXPri */ |
---|
| 18358 | + uint32 txdefer_dur; /* Total time txdefer */ |
---|
| 18359 | +} wl_tdmtx_ecounters_v1_t; |
---|
| 18360 | + |
---|
| 18361 | +/* TDMTX ecounters for version 2 */ |
---|
| 18362 | +typedef struct wl_tdmtx_ecounters_v2 { |
---|
| 18363 | + uint16 version; /* version field */ |
---|
| 18364 | + uint16 length; /* byte length in wl_tdmtx_ecounters_t starting at version */ |
---|
| 18365 | + uint32 txa_on; /* TXA on requests */ |
---|
| 18366 | + uint32 txa_tmcnt; /* Total number of TXA timeout */ |
---|
| 18367 | + uint32 porhi_on; /* TXA PORHI requests */ |
---|
| 18368 | + uint32 porlo_on; /* TXA PORLO requests */ |
---|
| 18369 | + uint32 txpuen; /* Path enable requests */ |
---|
| 18370 | + uint32 txpudis; /* Total number of times Tx path is muted on the slice */ |
---|
| 18371 | + uint32 txpri_on; /* Total number of times Tx priority was obtained by the slice */ |
---|
| 18372 | + uint32 txdefer; /* Total number of times Tx was deferred by the slice */ |
---|
| 18373 | + uint32 txmute; /* Total number of times active Tx muted on the slice */ |
---|
| 18374 | + uint32 actpwrboff; /* Total number of times TX power is backed off by the slice */ |
---|
| 18375 | + uint32 txa_dur; /* Total time txa on */ |
---|
| 18376 | + uint32 txpri_dur; /* Total time TXPri */ |
---|
| 18377 | + uint32 txdefer_dur; /* Total time txdefer */ |
---|
| 18378 | +} wl_tdmtx_ecounters_v2_t; |
---|
| 18379 | + |
---|
| 18380 | +/* Note: if this struct is changing update wl_scb_ecounters_vX_t version, |
---|
| 18381 | + * as this struct is sent as payload in wl_scb_ecounters_vX_t |
---|
| 18382 | + */ |
---|
| 18383 | +typedef struct wlc_scb_stats_v1 { |
---|
| 18384 | + uint32 tx_pkts; /* num of packets transmitted (ucast) */ |
---|
| 18385 | + uint32 tx_failures; /* num of packets failed */ |
---|
| 18386 | + uint32 rx_ucast_pkts; /* num of unicast packets received */ |
---|
| 18387 | + uint32 rx_mcast_pkts; /* num of multicast packets received */ |
---|
| 18388 | + uint32 tx_rate; /* Rate of last successful tx frame */ |
---|
| 18389 | + uint32 rx_rate; /* Rate of last successful rx frame */ |
---|
| 18390 | + uint32 rx_decrypt_succeeds; /* num of packets decrypted successfully */ |
---|
| 18391 | + uint32 rx_decrypt_failures; /* num of packets decrypted unsuccessfully */ |
---|
| 18392 | + uint32 tx_mcast_pkts; /* num of mcast pkts txed */ |
---|
| 18393 | + uint64 tx_ucast_bytes; /* data bytes txed (ucast) */ |
---|
| 18394 | + uint64 tx_mcast_bytes; /* data bytes txed (mcast) */ |
---|
| 18395 | + uint64 rx_ucast_bytes; /* data bytes recvd ucast */ |
---|
| 18396 | + uint64 rx_mcast_bytes; /* data bytes recvd mcast */ |
---|
| 18397 | + uint32 tx_pkts_retried; /* num of packets where a retry was necessary */ |
---|
| 18398 | + uint32 tx_pkts_retry_exhausted; /* num of packets where a retry was exhausted */ |
---|
| 18399 | + uint32 tx_rate_mgmt; /* Rate of last transmitted management frame */ |
---|
| 18400 | + uint32 tx_rate_fallback; /* last used lowest fallback TX rate */ |
---|
| 18401 | + uint32 rx_pkts_retried; /* # rx with retry bit set */ |
---|
| 18402 | + uint32 tx_pkts_total; /* total num of tx pkts */ |
---|
| 18403 | + uint32 tx_pkts_retries; /* total num of tx retries */ |
---|
| 18404 | + uint32 tx_pkts_fw_total; /* total num of tx pkts generated from fw */ |
---|
| 18405 | + uint32 tx_pkts_fw_retries; /* num of fw generated tx pkts retried */ |
---|
| 18406 | + uint32 tx_pkts_fw_retry_exhausted; /* num of fw generated tx pkts where retry exhausted */ |
---|
| 18407 | +} wlc_scb_stats_v1_t; |
---|
| 18408 | + |
---|
| 18409 | +/* ecounters for scb stats |
---|
| 18410 | + * XTLV ID: WL_IFSTATS_XTLV_SCB_ECOUNTERS |
---|
| 18411 | + */ |
---|
| 18412 | + |
---|
| 18413 | +#define WL_SCB_ECOUNTERS_VERSION_1 1 |
---|
| 18414 | +#define WL_SCB_ECOUNTERS_VERSION_2 2 |
---|
| 18415 | + |
---|
| 18416 | +typedef struct wl_scb_ecounters_v1 { |
---|
| 18417 | + uint16 version; /* version field */ |
---|
| 18418 | + uint16 length; /* struct length starting from version */ |
---|
| 18419 | + uint32 chanspec; /* current chanspec where scb is operating */ |
---|
| 18420 | + struct ether_addr ea; /* peer ndi or sta ea */ |
---|
| 18421 | + uint8 peer_type; /* peer type */ |
---|
| 18422 | + uint8 pad; |
---|
| 18423 | + |
---|
| 18424 | + /* scb tx and rx stats */ |
---|
| 18425 | + wlc_scb_stats_v1_t stats; |
---|
| 18426 | +} wl_scb_ecounters_v1_t; |
---|
| 18427 | + |
---|
| 18428 | +typedef struct wl_scb_ecounters_v2 { |
---|
| 18429 | + uint16 version; /* version field */ |
---|
| 18430 | + uint16 length; /* struct length starting from version */ |
---|
| 18431 | + uint32 chanspec; /* current chanspec where scb is operating */ |
---|
| 18432 | + struct ether_addr ea; /* peer ndi or sta ea */ |
---|
| 18433 | + uint8 peer_type; /* peer type */ |
---|
| 18434 | + uint8 pad; |
---|
| 18435 | + |
---|
| 18436 | + /* scb tx and rx stats */ |
---|
| 18437 | + uint16 tx_rate; /* Rate(in Mbps) of last successful tx frame */ |
---|
| 18438 | + uint16 rx_rate; /* Rate(in Mbps) of last successful rx frame */ |
---|
| 18439 | + uint16 tx_rate_fallback; /* last used lowest fallback TX rate(in Mbps) */ |
---|
| 18440 | + uint16 pad1; |
---|
| 18441 | + uint32 rx_decrypt_succeeds; /* num of packets decrypted successfully */ |
---|
| 18442 | + uint32 rx_decrypt_failures; /* num of packets decrypted unsuccessfully */ |
---|
| 18443 | + uint32 rx_pkts_retried; /* # rx with retry bit set */ |
---|
| 18444 | + uint32 tx_pkts_retries; /* total num of tx retries */ |
---|
| 18445 | + uint32 tx_failures; /* num of packets failed */ |
---|
| 18446 | + uint32 tx_pkts_total; /* total num of tx pkts */ |
---|
| 18447 | + int8 rssi[WL_STA_ANT_MAX]; /* average rssi per antenna of data frames */ |
---|
| 18448 | +} wl_scb_ecounters_v2_t; |
---|
| 18449 | + |
---|
| 18450 | +/* ecounters for nan slot stats |
---|
| 18451 | + * XTLV ID: WL_IFSTATS_XTLV_NAN_SLOT_STATS |
---|
| 18452 | + */ |
---|
| 18453 | + |
---|
| 18454 | +#define WL_NAN_SLOT_ECOUNTERS_VERSION_1 1 |
---|
| 18455 | + |
---|
| 18456 | +typedef struct wl_nan_slot_ecounters_v1 { |
---|
| 18457 | + uint16 version; /* version field */ |
---|
| 18458 | + uint16 length; /* struct length starting from version */ |
---|
| 18459 | + uint32 chan[NAN_MAX_BANDS]; /* cur nan slot chanspec of both bands */ |
---|
| 18460 | + uint16 cur_slot_idx; /* cur nan slot index */ |
---|
| 18461 | + uint16 pad; |
---|
| 18462 | + nan_sched_stats_t sched; /* sched stats */ |
---|
| 18463 | + wl_nan_mac_stats_t mac; /* mac stats */ |
---|
| 18464 | +} wl_nan_slot_ecounters_v1_t; |
---|
| 18465 | +/* |
---|
| 18466 | + * BT log definitions |
---|
8585 | 18467 | */ |
---|
8586 | 18468 | |
---|
8587 | 18469 | /* common iovar struct */ |
---|
8588 | | -typedef struct wl_dltro { |
---|
8589 | | - uint8 subcmd_id; /* subcommand id */ |
---|
8590 | | - uint8 pad; |
---|
| 18470 | +typedef struct wl_btl { |
---|
| 18471 | + uint16 subcmd_id; /* subcommand id */ |
---|
8591 | 18472 | uint16 len; /* total length of data[] */ |
---|
8592 | | - uint8 data[1]; /* subcommand data */ |
---|
8593 | | -} wl_dltro_t; |
---|
| 18473 | + uint8 data[2]; /* subcommand data, variable length */ |
---|
| 18474 | +} wl_btl_t; |
---|
8594 | 18475 | |
---|
| 18476 | +/* subcommand ids */ |
---|
| 18477 | +#define WL_BTL_SUBCMD_ENABLE 0 /* enable/disable logging */ |
---|
| 18478 | +#define WL_BTL_SUBCMD_STATS 1 /* statistics */ |
---|
8595 | 18479 | |
---|
8596 | | -/* Subcommand ids */ |
---|
8597 | | -#define WL_DLTRO_SUBCMD_CONNECT 0 /* DLTRO connection info */ |
---|
8598 | | -#define WL_DLTRO_SUBCMD_PARAM 1 /* DLTRO parameter info */ |
---|
8599 | | -#define WL_DLTRO_SUBCMD_MAX_DLTRO 2 /* Max DLTRO supported */ |
---|
| 18480 | +/* WL_BTL_SUBCMD_ENABLE data */ |
---|
| 18481 | +typedef struct wl_blt_enable { |
---|
| 18482 | + uint8 enable; /* 1 - enable, 0 - disable */ |
---|
| 18483 | + uint8 pad[3]; /* 4-byte struct alignment */ |
---|
| 18484 | +} wl_btl_enable_t; |
---|
8600 | 18485 | |
---|
8601 | | -/* WL_DLTRO_SUBCMD_CONNECT subcommand data |
---|
8602 | | - * Invoke with unique 'index' for each DLTRO connection |
---|
| 18486 | +/* WL_BTL_SUBCMD_STATS data */ |
---|
| 18487 | +typedef struct wl_blt_stats { |
---|
| 18488 | + uint32 bt_interrupt; /* num BT interrupts */ |
---|
| 18489 | + uint32 config_req; /* num CONFIG_REQ */ |
---|
| 18490 | + uint32 config_res_success; /* num CONFIG_RES successful */ |
---|
| 18491 | + uint32 config_res_fail; /* num CONFIG_RES failed */ |
---|
| 18492 | + uint32 log_req; /* num LOG_REQ */ |
---|
| 18493 | + uint32 log_res_success; /* num LOG_RES successful */ |
---|
| 18494 | + uint32 log_res_fail; /* num LOG_RES failed */ |
---|
| 18495 | + uint32 indirect_read_fail; /* num indirect read fail */ |
---|
| 18496 | + uint32 indirect_write_fail; /* num indirect write fail */ |
---|
| 18497 | + uint32 dma_fail; /* num DMA failed */ |
---|
| 18498 | + uint32 min_log_req_duration; /* min log request duration in usec */ |
---|
| 18499 | + uint32 max_log_req_duration; /* max log request duration in usec */ |
---|
| 18500 | + uint16 mem_dump_req; /* num mem dump requests */ |
---|
| 18501 | + uint16 mem_dump_success; /* num mem dumps successful */ |
---|
| 18502 | + uint16 mem_dump_fail; /* num mem dumps failed */ |
---|
| 18503 | + uint16 bt_wake_success; /* num BT wakes successful */ |
---|
| 18504 | + uint16 bt_wake_fail; /* num BT wakes failed */ |
---|
| 18505 | + uint16 mem_dump_req_interrupt; /* num MEM_DUMP_REQ interrupt */ |
---|
| 18506 | + uint16 mem_dump_res_interrupt; /* num MEM_DUMP_RES interrupt */ |
---|
| 18507 | + uint16 mem_dump_res_timeout; /* num MEM_DUMP_RES timeout */ |
---|
| 18508 | + uint16 mem_dump_proc_no_bt_ready; /* num proceed if no BT ready */ |
---|
| 18509 | + uint16 mem_dump_proc_no_bt_response; /* num proceed if no BT response */ |
---|
| 18510 | + uint16 mem_dump_proc_no_bt_clock; /* num proceed if no BT clock */ |
---|
| 18511 | + uint16 pad; /* alignment */ |
---|
| 18512 | + uint32 last_failed_region; /* start addr of last failed region */ |
---|
| 18513 | + uint32 min_mem_dump_duration; /* min mem dump duration in usec */ |
---|
| 18514 | + uint32 max_mem_dump_duration; /* max mem dump duration in usec */ |
---|
| 18515 | +} wl_btl_stats_t; |
---|
| 18516 | + |
---|
| 18517 | +/* IOV AWD DATA */ |
---|
| 18518 | + |
---|
| 18519 | +/* AWD DATA structures */ |
---|
| 18520 | +typedef struct { |
---|
| 18521 | + uint8 version; /* Extended trap version info */ |
---|
| 18522 | + uint8 reserved; /* currently unused */ |
---|
| 18523 | + uint16 length; /* Length of data excluding this header */ |
---|
| 18524 | + uint8 data[]; /* this data is TLV of tags */ |
---|
| 18525 | +} awd_data_v1_t; |
---|
| 18526 | + |
---|
| 18527 | +/* AWD TAG structure */ |
---|
| 18528 | +typedef struct { |
---|
| 18529 | + uint8 tagid; /* one of AWD DATA TAGs numbers */ |
---|
| 18530 | + uint8 length; /* the data size represented by this field must be aligned to 32 bits */ |
---|
| 18531 | + uint8 data[]; /* variable size, defined by length field */ |
---|
| 18532 | +} awd_tag_data_v1_t; |
---|
| 18533 | + |
---|
| 18534 | +/* IOV ETD DATA */ |
---|
| 18535 | + |
---|
| 18536 | +/* ETD DATA structures */ |
---|
| 18537 | +typedef struct { |
---|
| 18538 | + uint8 version; /* Extended trap version info */ |
---|
| 18539 | + uint8 reserved; /* currently unused */ |
---|
| 18540 | + uint16 length; /* Length of data excluding this header */ |
---|
| 18541 | + uint8 data[]; /* this data is TLV of tags */ |
---|
| 18542 | +} etd_data_v1_t; |
---|
| 18543 | + |
---|
| 18544 | +/* ETD TAG structure */ |
---|
| 18545 | +typedef struct { |
---|
| 18546 | + uint8 tagid; /* one of ETD DATA TAGs numbers */ |
---|
| 18547 | + uint8 length; /* the data size represented by this field must be aligned to 32 bits */ |
---|
| 18548 | + uint8 data[]; /* variable size, defined by length field */ |
---|
| 18549 | +} etd_tag_data_v1_t; |
---|
| 18550 | + |
---|
| 18551 | +/* ETD information structures associated with ETD_DATA_Tags */ |
---|
| 18552 | +/* ETD_JOIN_CLASSIFICATION_INFO 10 */ |
---|
| 18553 | +typedef struct { |
---|
| 18554 | + uint8 assoc_type; /* assoc type */ |
---|
| 18555 | + uint8 assoc_state; /* current state of assoc state machine */ |
---|
| 18556 | + uint8 wpa_state; /* wpa->state */ |
---|
| 18557 | + uint8 wsec_portopen; /* shows if security port is open */ |
---|
| 18558 | + uint8 total_attempts_num; /* total number of join attempts (bss_retries) */ |
---|
| 18559 | + uint8 num_of_targets; /* up to 3, in current design */ |
---|
| 18560 | + uint8 reserved [2]; /* padding to get 32 bits alignment */ |
---|
| 18561 | + uint32 wsec; /* bsscfg->wsec */ |
---|
| 18562 | + uint32 wpa_auth; /* bsscfg->WPA_auth */ |
---|
| 18563 | + uint32 time_to_join; /* time duration to process WLC_SET_SSID request (ms) */ |
---|
| 18564 | +} join_classification_info_v1_t; |
---|
| 18565 | + |
---|
| 18566 | +/* ETD_JOIN_TARGET_CLASSIFICATION_INFO 11 */ |
---|
| 18567 | +typedef struct { |
---|
| 18568 | + int8 rssi; /* RSSI on current channel */ |
---|
| 18569 | + uint8 cca; /* CCA on current channel */ |
---|
| 18570 | + uint8 channel; /* current channel */ |
---|
| 18571 | + uint8 num_of_attempts; /* (bss_retries) up to 5 */ |
---|
| 18572 | + uint8 oui[3]; /* the first three octets of the AP's address */ |
---|
| 18573 | + uint8 reserved; /* padding to get 32 bits alignment */ |
---|
| 18574 | + uint32 time_duration; /* time duration of current attempt (ms) */ |
---|
| 18575 | +} join_target_classification_info_v1_t; |
---|
| 18576 | + |
---|
| 18577 | +/* ETD_ASSOC_STATE 12 */ |
---|
| 18578 | +typedef struct { |
---|
| 18579 | + uint8 assoc_state; /* assoc type */ |
---|
| 18580 | + uint8 reserved [3]; /* padding to get 32 bits alignment */ |
---|
| 18581 | +} join_assoc_state_v1_t; |
---|
| 18582 | + |
---|
| 18583 | +/* ETD_CHANNEL 13 tag */ |
---|
| 18584 | +typedef struct { |
---|
| 18585 | + uint8 channel; /* last attempt channel */ |
---|
| 18586 | + uint8 reserved [3]; /* padding to get 32 bits alignment */ |
---|
| 18587 | +} join_channel_v1_t; |
---|
| 18588 | + |
---|
| 18589 | +/* ETD_TOTAL_NUM_OF_JOIN_ATTEMPTS 14 */ |
---|
| 18590 | +typedef struct { |
---|
| 18591 | + uint8 total_attempts_num; /* total number of join attempts (bss_retries) */ |
---|
| 18592 | + uint8 reserved [3]; /* padding to get 32 bits alignment */ |
---|
| 18593 | +} join_total_attempts_num_v1_t; |
---|
| 18594 | + |
---|
| 18595 | +/* IOV_ROAM_CACHE structures */ |
---|
| 18596 | + |
---|
| 18597 | +enum wl_rmc_report_cmd_id { |
---|
| 18598 | + WL_RMC_RPT_CMD_VER = 0, |
---|
| 18599 | + WL_RMC_RPT_CMD_DATA = 1, |
---|
| 18600 | + WL_RMC_RPT_CMD_LAST |
---|
| 18601 | +}; |
---|
| 18602 | + |
---|
| 18603 | +enum wl_rmc_report_xtlv_id { |
---|
| 18604 | + WL_RMC_RPT_XTLV_VER = 0x0, |
---|
| 18605 | + WL_RMC_RPT_XTLV_BSS_INFO = 0x1, |
---|
| 18606 | + WL_RMC_RPT_XTLV_CANDIDATE_INFO = 0x2 |
---|
| 18607 | +}; |
---|
| 18608 | + |
---|
| 18609 | +/* WL_RMC_RPT_XTLV_BSS_INFO */ |
---|
| 18610 | +typedef struct { |
---|
| 18611 | + int16 rssi; /* current BSS RSSI */ |
---|
| 18612 | + uint8 reason; /* reason code for last full scan */ |
---|
| 18613 | + uint8 status; /* last status code for not roaming */ |
---|
| 18614 | + uint32 fullscan_count; /* number of full scans performed on current BSS */ |
---|
| 18615 | + uint32 time_full_scan; /* delta time (in ms) between cur time and full scan timestamp */ |
---|
| 18616 | +} rmc_bss_info_v1_t; |
---|
| 18617 | + |
---|
| 18618 | +/* WL_RMC_RPT_XTLV_CANDIDATE_INFO */ |
---|
| 18619 | +typedef struct { |
---|
| 18620 | + int16 rssi; /* last seen rssi */ |
---|
| 18621 | + uint16 ctl_channel; /* channel */ |
---|
| 18622 | + uint32 time_last_seen; /* delta time (in ms) between cur time and last seen timestamp */ |
---|
| 18623 | + uint16 bss_load; /* BSS load */ |
---|
| 18624 | + uint8 bssid [6]; /* padding to get 32 bits alignment */ |
---|
| 18625 | +} rmc_candidate_info_v1_t; |
---|
| 18626 | + |
---|
| 18627 | +#define WL_FILTER_IE_VERSION 1 |
---|
| 18628 | +enum wl_filter_ie_options { |
---|
| 18629 | + WL_FILTER_IE_CLEAR = 0, /* allow element id in packet.For suboption */ |
---|
| 18630 | + WL_FILTER_IE_SET = 1, /* filter element id in packet.For suboption */ |
---|
| 18631 | + WL_FILTER_IE_LIST = 2, /* list element ID's.Set as option */ |
---|
| 18632 | + WL_FILTER_IE_CLEAR_ALL = 3, /* clear all the element.Set as option */ |
---|
| 18633 | + WL_FILTER_IE_CHECK_SUB_OPTION = 4 /* check for suboptions.Set only as option */ |
---|
| 18634 | +}; |
---|
| 18635 | + |
---|
| 18636 | +typedef struct wl_filter_ie_tlv { |
---|
| 18637 | + uint16 id; |
---|
| 18638 | + uint16 len; /* sub option length + pattern length */ |
---|
| 18639 | + uint8 data[]; /* sub option + pattern matching(OUI,type,sub-type) */ |
---|
| 18640 | +} wl_filter_ie_tlv_t; |
---|
| 18641 | + |
---|
| 18642 | +typedef struct wl_filter_ie_iov { |
---|
| 18643 | + uint16 version; /* Structure version */ |
---|
| 18644 | + uint16 len; /* Total length of the structure */ |
---|
| 18645 | + uint16 fixed_length; /* Total length of fixed fields */ |
---|
| 18646 | + uint8 option; /* Filter action - check for suboption */ |
---|
| 18647 | + uint8 pad[1]; /* Align to 4 bytes */ |
---|
| 18648 | + uint32 pktflag; /* frame type */ |
---|
| 18649 | + uint8 tlvs[]; /* variable data (zero in for list ,clearall) */ |
---|
| 18650 | +} wl_filter_ie_iov_v1_t; |
---|
| 18651 | + |
---|
| 18652 | +/* Event aggregation config */ |
---|
| 18653 | +#define EVENT_AGGR_CFG_VERSION 1 |
---|
| 18654 | +#define EVENT_AGGR_DISABLED 0x0 |
---|
| 18655 | +#define EVENT_AGGR_ENABLED 0x1 |
---|
| 18656 | + |
---|
| 18657 | +#define EVENT_AGGR_BUFSIZE_MAX 1512 |
---|
| 18658 | +#define EVENT_AGGR_BUFSIZE_MIN 512 |
---|
| 18659 | + |
---|
| 18660 | +#define EVENT_AGGR_FLUSH_TIMEOUT_DEFAULT 100 |
---|
| 18661 | +#define EVENT_AGGR_FLUSH_TIMEOUT_MAX 2000 |
---|
| 18662 | +#define EVENT_AGGR_NUM_EVENTS_FLUSH 5 |
---|
| 18663 | +typedef struct event_aggr_config { |
---|
| 18664 | + uint16 version; |
---|
| 18665 | + uint16 len; |
---|
| 18666 | + uint16 flags; /* bit 0 to enable/disable the feature */ |
---|
| 18667 | + uint16 bufsize; /* Aggregate buffer size */ |
---|
| 18668 | + uint16 flush_timeout; /* Timeout for event flush */ |
---|
| 18669 | + uint16 num_events_flush; /* Number of events aggregated before flush */ |
---|
| 18670 | +} event_aggr_config_t; |
---|
| 18671 | + |
---|
| 18672 | +#ifndef WL_TDMTX_TYPEDEF_HAS_ALIAS |
---|
| 18673 | +typedef tdmtx_cnt_v1_t tdmtx_cnt_t; |
---|
| 18674 | +typedef tdmtx_cnt_shm_v1_t tdmtx_cnt_shm_t; |
---|
| 18675 | +typedef wl_tdmtx_ecounters_v1_t wl_tdmtx_ecounters_t; |
---|
| 18676 | +#define WL_CNT_TDMTX_STRUCT_SZ (sizeof(tdmtx_cnt_t)) |
---|
| 18677 | +#define WL_CNT_TDMTX_SHM_SZ (sizeof(tdmtx_cnt_shm_t)) |
---|
| 18678 | +#endif // endif |
---|
| 18679 | + |
---|
| 18680 | +/** chanctxt related statistics */ |
---|
| 18681 | +#define CHANCTXT_STATS_VERSION_1 1 |
---|
| 18682 | +#define CHANCTXT_STATS_CURRENT_VERSION CHANCTXT_STATS_VERSION_1 |
---|
| 18683 | +typedef struct wlc_chanctxt_stats { |
---|
| 18684 | + uint32 excursionq_end_miss; |
---|
| 18685 | + uint32 activeq_end_miss; |
---|
| 18686 | + uint32 no_chanctxt_count; |
---|
| 18687 | + uint32 txqueue_end_incomplete; |
---|
| 18688 | + uint32 txqueue_start_incomplete; |
---|
| 18689 | +} wlc_chanctxt_stats_core_t; |
---|
| 18690 | + |
---|
| 18691 | +typedef struct chanctxt_stats { |
---|
| 18692 | + uint16 version; |
---|
| 18693 | + uint16 length; |
---|
| 18694 | + wlc_chanctxt_stats_core_t corestats[MAX_NUM_D11CORES]; |
---|
| 18695 | +} wlc_chanctxt_stats_t; |
---|
| 18696 | + |
---|
| 18697 | +typedef struct wl_txdc_ioc { |
---|
| 18698 | + uint8 ver; |
---|
| 18699 | + uint8 id; /* ID of the sub-command */ |
---|
| 18700 | + uint16 len; /* total length of all data[] */ |
---|
| 18701 | + uint8 data[]; /* var len payload */ |
---|
| 18702 | +} wl_txdc_ioc_t; |
---|
| 18703 | + |
---|
| 18704 | +/* |
---|
| 18705 | + * iovar subcommand ids |
---|
8603 | 18706 | */ |
---|
8604 | | -typedef struct wl_dltro_connect { |
---|
8605 | | - uint8 index; /* DLTRO connection index, 0 to max-1 */ |
---|
8606 | | - uint8 ip_addr_type; /* 0 - IPv4, 1 - IPv6 */ |
---|
8607 | | - uint8 offload_type; /* 0 - Client, 1 - Server */ |
---|
8608 | | - uint8 pad; |
---|
8609 | | - uint32 tid; /* Transaction id */ |
---|
8610 | | - uint32 timer_val; /* DHCP lease time remaining */ |
---|
8611 | | - uint32 time_before_expiry; /* Time before expiry for DHCP lease renewal */ |
---|
8612 | | - uint32 len; /* Length of the variable data */ |
---|
8613 | | - uint8 data[1]; /* Variable length field containing DLTRO packet */ |
---|
8614 | | -} wl_dltro_connect_t; |
---|
| 18707 | +enum { |
---|
| 18708 | + IOV_TXDC_ENB = 1, |
---|
| 18709 | + IOV_TXDC_MODE = 2, |
---|
| 18710 | + IOV_TXDC_DUMP = 3, |
---|
| 18711 | + IOV_TXDC_LAST |
---|
| 18712 | +}; |
---|
8615 | 18713 | |
---|
8616 | | -/* WL_DLTRO_SUBCMD_PARAM subcommand data |
---|
8617 | | - * Invoke with unique 'index' for each DLTRO connection |
---|
| 18714 | +/* WL_NAN_XTLV_SLOT_STATS */ |
---|
| 18715 | +/* WL_NAN_EVENT_SLOT_START, WL_NAN_EVENT_SLOT_END */ |
---|
| 18716 | +typedef struct nan_slot_event_data { |
---|
| 18717 | + uint32 cur_slot_idx; /* current idx in channel schedule */ |
---|
| 18718 | + uint32 fw_time; /* target current time in microseconds */ |
---|
| 18719 | + uint32 band; /* current band (2G/5G) for which the event is received */ |
---|
| 18720 | +} nan_slot_event_data_t; |
---|
| 18721 | + |
---|
| 18722 | +/* SAE (Simultaneous Authentication of Equals) error codes. |
---|
| 18723 | + * These error codes are local. |
---|
8618 | 18724 | */ |
---|
8619 | | -typedef struct wl_dltro_param { |
---|
8620 | | - uint8 index; /* DLTRO connection index, 0 to max-1 */ |
---|
8621 | | - uint8 retry; /* Number of retries */ |
---|
8622 | | -} wl_dltro_param_t; |
---|
8623 | 18725 | |
---|
8624 | | -/* WL_DLTRO_SUBCMD_PARAM subcommand data to GET configured info for specific index */ |
---|
8625 | | -typedef struct wl_dltro_get_param { |
---|
8626 | | - uint8 index; /* DLTRO connection index, 0 to max-1 */ |
---|
8627 | | -} wl_dltro_get_param_t; |
---|
| 18726 | +#define WL_SAE_E_BASE -3072 |
---|
8628 | 18727 | |
---|
8629 | | -/* WL_DLTRO_SUBCMD_MAX_DLTRO subcommand data */ |
---|
8630 | | -typedef struct wl_dltro_max_dltro { |
---|
8631 | | - uint8 max; /* Max DLTRO supported */ |
---|
8632 | | -} wl_dltro_max_dltro_t; |
---|
| 18728 | +/* SAE status codes are reserved from -3072 to -4095 (1K) */ |
---|
8633 | 18729 | |
---|
8634 | | -#ifdef WL_OLDPPR |
---|
8635 | | -/* sslpnphy specifics */ |
---|
8636 | | -#define WL_TX_POWER_MCS20_SISO_FIRST_SSN 12 /* Index for first 20MHz MCS SISO rate */ |
---|
8637 | | -#define WL_TX_POWER_MCS40_SISO_FIRST_SSN 28 /* Index for first 40MHz MCS SISO rate */ |
---|
| 18730 | +enum WL_SAE_E_STATUS_CODES { |
---|
| 18731 | + WL_SAE_E_AUTH_FAILURE = -3072, |
---|
| 18732 | + /* Discard silently */ |
---|
| 18733 | + WL_SAE_E_AUTH_DISCARD = -3073, |
---|
| 18734 | + /* Authentication in progress */ |
---|
| 18735 | + WL_SAE_E_AUTH_CONTINUE = -3074, |
---|
| 18736 | + /* Invalid scalar/elt */ |
---|
| 18737 | + WL_SAE_E_AUTH_COMMIT_INVALID = -3075, |
---|
| 18738 | + /* Invalid confirm token */ |
---|
| 18739 | + WL_SAE_E_AUTH_CONFIRM_INVALID = -3076, |
---|
| 18740 | + /* Peer scalar validation failure */ |
---|
| 18741 | + WL_SAE_E_CRYPTO_SCALAR_VALIDATION = -3077, |
---|
| 18742 | + /* Peer element prime validation failure */ |
---|
| 18743 | + WL_SAE_E_CRYPTO_ELE_PRIME_VALIDATION = -3078, |
---|
| 18744 | + /* Peer element is not on the curve */ |
---|
| 18745 | + WL_SAE_E_CRYPTO_ELE_NOT_ON_CURVE = -3079, |
---|
| 18746 | + /* Generic EC error (eliptic curve related) */ |
---|
| 18747 | + WL_SAE_E_CRYPTO_EC_ERROR = -3080, |
---|
| 18748 | + /* Both local and peer mac addrs are same */ |
---|
| 18749 | + WL_SAE_E_CRYPTO_EQUAL_MACADDRS = -3081, |
---|
| 18750 | + /* Loop exceeded in deriving the scalar */ |
---|
| 18751 | + WL_SAE_E_CRYPTO_SCALAR_ITER_EXCEEDED = -3082, |
---|
| 18752 | + /* ECC group is unsupported */ |
---|
| 18753 | + WL_SAE_E_CRYPTO_UNSUPPORTED_GROUP = -3083, |
---|
| 18754 | + /* Exceeded the hunting-and-pecking counter */ |
---|
| 18755 | + WL_SAE_E_CRYPTO_PWE_COUNTER_EXCEEDED = -3084, |
---|
| 18756 | + /* SAE crypto component is not initialized */ |
---|
| 18757 | + WL_SAE_E_CRYPTO_NOT_INITED = -3085, |
---|
| 18758 | + /* bn_get has failed */ |
---|
| 18759 | + WL_SAE_E_CRYPTO_BN_GET_ERROR = -3086, |
---|
| 18760 | + /* bn_set has failed */ |
---|
| 18761 | + WL_SAE_E_CRYPTO_BN_SET_ERROR = -3087, |
---|
| 18762 | + /* PMK is not computed yet */ |
---|
| 18763 | + WL_SAE_E_CRYPTO_PMK_UNAVAILABLE = -3088, |
---|
| 18764 | + /* Peer confirm did not match */ |
---|
| 18765 | + WL_SAE_E_CRYPTO_CONFIRM_MISMATCH = -3089, |
---|
| 18766 | + /* Element K is at infinity no the curve */ |
---|
| 18767 | + WL_SAE_E_CRYPTO_KEY_AT_INFINITY = -3090, |
---|
| 18768 | + /* SAE Crypto private data magic number mismatch */ |
---|
| 18769 | + WL_SAE_E_CRYPTO_PRIV_MAGIC_MISMATCH = -3091 |
---|
| 18770 | +}; |
---|
8638 | 18771 | |
---|
8639 | | -/* TX Power index defines */ |
---|
8640 | | -typedef struct cck { |
---|
8641 | | - uint8 s1x2[WL_NUM_RATES_CCK]; /* Legacy CCK to 2 Tx Chain */ |
---|
8642 | | - uint8 s1x3[WL_NUM_RATES_CCK]; /* Legacy CCK to 3 Tx Chain */ |
---|
8643 | | -} cck_t; |
---|
| 18772 | +/* Block Channel */ |
---|
| 18773 | +#define WL_BLOCK_CHANNEL_VER_1 1u |
---|
8644 | 18774 | |
---|
8645 | | -typedef struct ofdm { |
---|
8646 | | - uint8 s1x1[WL_NUM_RATES_OFDM]; /* Legacy OFDM to 1 Tx Chain */ |
---|
8647 | | - uint8 s1x2[WL_NUM_RATES_OFDM]; /* Legacy OFDM to 2 Tx Chain */ |
---|
8648 | | - uint8 s1x3[WL_NUM_RATES_OFDM]; /* Legacy OFDM to 3 Tx Chain */ |
---|
8649 | | -} ofdm_t; |
---|
| 18775 | +typedef struct wl_block_ch_v1 { |
---|
| 18776 | + uint16 version; |
---|
| 18777 | + uint16 len; |
---|
| 18778 | + uint32 band; /* Band select */ |
---|
| 18779 | + uint8 channel_num; /* The number of block channels in the selected band */ |
---|
| 18780 | + uint8 padding[3]; |
---|
| 18781 | + uint8 channel[]; /* Channel to block, Variable Length */ |
---|
| 18782 | +} wl_block_ch_v1_t; |
---|
8650 | 18783 | |
---|
8651 | | -typedef struct stbc { |
---|
8652 | | - uint8 s2x2[WL_NUM_RATES_MCS_1STREAM]; /* STBC 20MHz to 2 Tx Chain */ |
---|
8653 | | - uint8 s2x3[WL_NUM_RATES_MCS_1STREAM]; /* STBC 20MHz to 3 Tx Chain */ |
---|
8654 | | - uint8 u40_s2x2[WL_NUM_RATES_MCS_1STREAM]; /* STBC 40MHz to 2 Tx Chain */ |
---|
8655 | | - uint8 u40_s2x3[WL_NUM_RATES_MCS_1STREAM]; /* STBC 40MHz to 3 Tx Chain */ |
---|
8656 | | - uint8 ul20_s2x2[WL_NUM_RATES_MCS_1STREAM]; /* STBC 20in40MHz to 2 Tx Chain */ |
---|
8657 | | - uint8 ul20_s2x3[WL_NUM_RATES_MCS_1STREAM]; /* STBC 20in40MHz to 3 Tx Chain */ |
---|
8658 | | -} stbc_t; |
---|
| 18784 | +typedef struct dma_wl_addr_region { |
---|
| 18785 | + uint32 addr_low; |
---|
| 18786 | + uint32 addr_high; |
---|
| 18787 | +} dma_wl_addr_region_t; |
---|
8659 | 18788 | |
---|
8660 | | -typedef struct n2x2 { |
---|
8661 | | - uint8 siso[WL_NUM_RATES_MCS_1STREAM]; /* SISO MCS 0-7 */ |
---|
8662 | | - uint8 cdd[WL_NUM_RATES_MCS_1STREAM]; /* CDD MCS 0-7 */ |
---|
8663 | | - uint8 stbc[WL_NUM_RATES_MCS_1STREAM]; /* STBC MCS 0-7 */ |
---|
8664 | | - uint8 sdm[WL_NUM_RATES_MCS_1STREAM]; /* MCS 8-15 */ |
---|
8665 | | -} n2x2_t; |
---|
| 18789 | +#define WL_ROAMSTATS_IOV_VERSION 1 |
---|
8666 | 18790 | |
---|
8667 | | -typedef struct n3x3 { |
---|
8668 | | - uint8 s1x1[WL_NUM_RATES_MCS_1STREAM]; /* 1 Nsts to 1 Tx Chain */ |
---|
8669 | | - uint8 s1x2[WL_NUM_RATES_MCS_1STREAM]; /* 1 Nsts to 2 Tx Chain */ |
---|
8670 | | - uint8 s2x2[WL_NUM_RATES_MCS_1STREAM]; /* 2 Nsts to 2 Tx Chain */ |
---|
8671 | | - uint8 s3x3[WL_NUM_RATES_MCS_1STREAM]; /* 3 Nsts to 3 Tx Chain */ |
---|
8672 | | -} n3x3_t; |
---|
| 18791 | +#define MAX_PREV_ROAM_EVENTS 16u |
---|
8673 | 18792 | |
---|
8674 | | -typedef struct n3x3a { |
---|
8675 | | - uint8 u20s1x3[WL_NUM_RATES_MCS_1STREAM]; /* 20 MHz 1 Nsts to 3 Tx Chain */ |
---|
8676 | | - uint8 u20s2x3[WL_NUM_RATES_MCS_1STREAM]; /* 20 MHz 2 Nsts to 3 Tx Chain */ |
---|
8677 | | - uint8 u40s1x3[WL_NUM_RATES_MCS_1STREAM]; /* 40 MHz 1 Nsts to 3 Tx Chain */ |
---|
8678 | | - uint8 u40s2x3[WL_NUM_RATES_MCS_1STREAM]; /* 40 MHz 2 Nsts to 3 Tx Chain */ |
---|
8679 | | - uint8 ul20s1x3[WL_NUM_RATES_MCS_1STREAM]; /* 20ul 1 Nsts to 3 Tx Chain */ |
---|
8680 | | - uint8 ul20s2x3[WL_NUM_RATES_MCS_1STREAM]; /* 20ul 2 Nsts to 3 Tx Chain */ |
---|
8681 | | -} n3x3a_t; |
---|
| 18793 | +#define ROAMSTATS_UNKNOWN_CNT 0xFFFFu |
---|
8682 | 18794 | |
---|
8683 | | -#define WL_NUM_2x2_ELEMENTS 4 |
---|
8684 | | -#define WL_NUM_3x3_ELEMENTS 6 |
---|
| 18795 | +/* roaming statistics counter structures */ |
---|
| 18796 | +typedef struct wlc_assoc_roamstats_event_msg_v1 { |
---|
| 18797 | + uint32 event_type; /* Message (see below) */ |
---|
| 18798 | + uint32 status; /* Status code (see below) */ |
---|
| 18799 | + uint32 reason; /* Reason code (if applicable) */ |
---|
| 18800 | + uint32 timestamp; /* Timestamp of event */ |
---|
| 18801 | +} wlc_assoc_roamstats_event_msg_v1_t; |
---|
8685 | 18802 | |
---|
8686 | | -typedef struct txppr { |
---|
8687 | | - /* start of 20MHz tx power limits */ |
---|
8688 | | - uint8 cck[WL_NUM_RATES_CCK]; /* Legacy CCK/DSSS */ |
---|
8689 | | - uint8 ofdm[WL_NUM_RATES_OFDM]; /* 20 MHz Legacy OFDM transmission */ |
---|
8690 | | - uint8 ofdm_cdd[WL_NUM_RATES_OFDM]; /* 20 MHz Legacy OFDM CDD transmission */ |
---|
8691 | | - union { |
---|
8692 | | - struct n2x2 n; /* nphy MCS rates */ |
---|
8693 | | - struct n3x3 ht; /* htphy MCS rates */ |
---|
8694 | | - } u20; |
---|
8695 | | - /* start of 40MHz tx power limits */ |
---|
8696 | | - uint8 ofdm_40[WL_NUM_RATES_OFDM]; /* 40 MHz Legacy OFDM transmission */ |
---|
8697 | | - uint8 ofdm_40_cdd[WL_NUM_RATES_OFDM]; /* 40 MHz Legacy OFDM CDD transmission */ |
---|
8698 | | - union { |
---|
8699 | | - struct n2x2 n; |
---|
8700 | | - struct n3x3 ht; |
---|
8701 | | - } u40; |
---|
8702 | | - /* MCS32 tx power limits */ |
---|
8703 | | - uint8 mcs32; |
---|
8704 | | - /* start of 20in40MHz tx power limits */ |
---|
8705 | | - uint8 cck_20ul[WL_NUM_RATES_CCK]; /* 20 in 40MHz Legacy CCK/DSSS */ |
---|
8706 | | - uint8 ofdm_20ul[WL_NUM_RATES_OFDM]; /* 20 in 40MHz Legacy OFDM transmission */ |
---|
8707 | | - uint8 ofdm_20ul_cdd[WL_NUM_RATES_OFDM]; /* 20 in 40MHz Legacy OFDM CDD transmission */ |
---|
8708 | | - n3x3_t ht20ul; /* 20 in 40MHz MCS rates */ |
---|
8709 | | - n3x3a_t ht; /* 1 & 2 Nsts to 3 Tx chain rates */ |
---|
8710 | | - cck_t cck_cdd; /* 20 MHz CCK CDD 2 and 3 Tx chains */ |
---|
8711 | | - cck_t cck_20ul_cdd; /* 20 in 40MHz CCK CDD 2 and 3 Tx chains */ |
---|
8712 | | -} txppr_t; |
---|
| 18803 | +enum wl_roamstats_cmd_id { |
---|
| 18804 | + WL_ROAMSTATS_XTLV_CMD_VER = 0, |
---|
| 18805 | + WL_ROAMSTATS_XTLV_CMD_RESET = 1, |
---|
| 18806 | + WL_ROAMSTATS_XTLV_CMD_STATUS = 2, |
---|
| 18807 | + WL_ROAMSTATS_XTLV_CMD_LAST /* Keep this at the end */ |
---|
| 18808 | +}; |
---|
8713 | 18809 | |
---|
8714 | | -/* SROM 8 TX Power defines */ |
---|
8715 | | -/* 20MHz */ |
---|
8716 | | -#define WL_TX_POWER_CCK_FIRST OFFSETOF(txppr_t, cck) /* CCK */ |
---|
8717 | | -#define WL_TX_POWER_CCK_CDD_S1x2_FIRST OFFSETOF(txppr_t, cck_cdd.s1x2) /* CCK CDD 1x2 rate */ |
---|
8718 | | -#define WL_TX_POWER_CCK_CDD_S1x3_FIRST OFFSETOF(txppr_t, cck_cdd.s1x3) /* CCK CDD 1x3 rate */ |
---|
8719 | | -#define WL_TX_POWER_OFDM20_FIRST OFFSETOF(txppr_t, ofdm) /* OFDM SISO */ |
---|
8720 | | -#define WL_TX_POWER_OFDM20_CDD_FIRST OFFSETOF(txppr_t, ofdm_cdd) /* OFDM CDD rate */ |
---|
8721 | | -#define WL_TX_POWER_MCS20_SISO_FIRST OFFSETOF(txppr_t, u20.n.siso) /* MCS SISO rate */ |
---|
8722 | | -#define WL_TX_POWER_MCS20_CDD_FIRST OFFSETOF(txppr_t, u20.n.cdd) /* MCS CDD rate */ |
---|
8723 | | -#define WL_TX_POWER_MCS20_STBC_FIRST OFFSETOF(txppr_t, u20.n.stbc) /* MCS STBC rate */ |
---|
8724 | | -#define WL_TX_POWER_MCS20_SDM_FIRST OFFSETOF(txppr_t, u20.n.sdm) /* MCS SDM rate */ |
---|
| 18810 | +enum wl_roamstats_xtlv_id { |
---|
| 18811 | + WL_ROAMSTATS_XTLV_VER = 0x0, |
---|
| 18812 | + WL_ROAMSTATS_XTLV_COUNTER_INFO = 0x1, |
---|
| 18813 | + WL_ROAMSTATS_XTLV_PREV_ROAM_EVENTS = 0x2, |
---|
| 18814 | + WL_ROAMSTATS_XTLV_REASON_INFO = 0x3 |
---|
| 18815 | +}; |
---|
8725 | 18816 | |
---|
8726 | | -#define WL_TX_POWER_20_S1x1_FIRST OFFSETOF(txppr_t, u20.ht.s1x1) /* MCS 0-7 rate */ |
---|
8727 | | -#define WL_TX_POWER_20_S1x2_FIRST OFFSETOF(txppr_t, u20.ht.s1x2) /* MCS 0-7 rate */ |
---|
8728 | | -#define WL_TX_POWER_20_S1x3_FIRST OFFSETOF(txppr_t, ht.u20s1x3) /* MCS 0-7 rate */ |
---|
8729 | | -#define WL_TX_POWER_20_S2x2_FIRST OFFSETOF(txppr_t, u20.ht.s2x2) /* MCS 8-15 rate */ |
---|
8730 | | -#define WL_TX_POWER_20_S2x3_FIRST OFFSETOF(txppr_t, ht.u20s2x3) /* MCS 8-15 rate */ |
---|
8731 | | -#define WL_TX_POWER_20_S3x3_FIRST OFFSETOF(txppr_t, u20.ht.s3x3) /* MCS 16-23 rate */ |
---|
| 18817 | +/* WL_ROAMSTATS_XTLV_COUNTER_INFO */ |
---|
| 18818 | +typedef struct { |
---|
| 18819 | + uint32 initial_assoc_time; |
---|
| 18820 | + uint32 prev_roam_time; |
---|
| 18821 | + uint32 host_access_time; |
---|
| 18822 | + uint16 roam_success_cnt; |
---|
| 18823 | + uint16 roam_fail_cnt; |
---|
| 18824 | + uint16 roam_attempt_cnt; |
---|
| 18825 | + uint16 max_roam_target_cnt; |
---|
| 18826 | + uint16 min_roam_target_cnt; |
---|
| 18827 | + uint16 max_cached_ch_cnt; |
---|
| 18828 | + uint16 min_cached_ch_cnt; |
---|
| 18829 | + uint16 partial_roam_scan_cnt; |
---|
| 18830 | + uint16 full_roam_scan_cnt; |
---|
| 18831 | +} roamstats_counter_info_v1_t; |
---|
8732 | 18832 | |
---|
8733 | | -/* 40MHz */ |
---|
8734 | | -#define WL_TX_POWER_OFDM40_FIRST OFFSETOF(txppr_t, ofdm_40) /* OFDM SISO rate */ |
---|
8735 | | -#define WL_TX_POWER_OFDM40_CDD_FIRST OFFSETOF(txppr_t, ofdm_40_cdd) /* OFDM CDD rate */ |
---|
8736 | | -#define WL_TX_POWER_MCS40_SISO_FIRST OFFSETOF(txppr_t, u40.n.siso) /* MCS SISO rate */ |
---|
8737 | | -#define WL_TX_POWER_MCS40_CDD_FIRST OFFSETOF(txppr_t, u40.n.cdd) /* MCS CDD rate */ |
---|
8738 | | -#define WL_TX_POWER_MCS40_STBC_FIRST OFFSETOF(txppr_t, u40.n.stbc) /* MCS STBC rate */ |
---|
8739 | | -#define WL_TX_POWER_MCS40_SDM_FIRST OFFSETOF(txppr_t, u40.n.sdm) /* MCS SDM rate */ |
---|
| 18833 | +/* WL_ROAMSTATS_XTLV_PREV_ROAM_EVENTS */ |
---|
| 18834 | +typedef struct { |
---|
| 18835 | + uint16 max; |
---|
| 18836 | + uint16 pos; |
---|
| 18837 | + wlc_assoc_roamstats_event_msg_v1_t roam_event[]; |
---|
| 18838 | +} roamstats_prev_roam_events_v1_t; |
---|
8740 | 18839 | |
---|
8741 | | -#define WL_TX_POWER_40_S1x1_FIRST OFFSETOF(txppr_t, u40.ht.s1x1) /* MCS 0-7 rate */ |
---|
8742 | | -#define WL_TX_POWER_40_S1x2_FIRST OFFSETOF(txppr_t, u40.ht.s1x2) /* MCS 0-7 rate */ |
---|
8743 | | -#define WL_TX_POWER_40_S1x3_FIRST OFFSETOF(txppr_t, ht.u40s1x3) /* MCS 0-7 rate */ |
---|
8744 | | -#define WL_TX_POWER_40_S2x2_FIRST OFFSETOF(txppr_t, u40.ht.s2x2) /* MCS 8-15 rate */ |
---|
8745 | | -#define WL_TX_POWER_40_S2x3_FIRST OFFSETOF(txppr_t, ht.u40s2x3) /* MCS 8-15 rate */ |
---|
8746 | | -#define WL_TX_POWER_40_S3x3_FIRST OFFSETOF(txppr_t, u40.ht.s3x3) /* MCS 16-23 rate */ |
---|
8747 | | -#define WL_TX_POWER_MCS_32 OFFSETOF(txppr_t, mcs32) /* MCS 32 rate */ |
---|
| 18840 | +/* WL_ROAMSTATS_XTLV_REASON_INFO */ |
---|
| 18841 | +typedef struct { |
---|
| 18842 | + uint16 max; |
---|
| 18843 | + uint16 reason_cnt[]; |
---|
| 18844 | +} roamstats_reason_info_v1_t; |
---|
8748 | 18845 | |
---|
8749 | | -/* 20 in 40MHz */ |
---|
8750 | | -#define WL_TX_POWER_20UL_CCK_FIRST OFFSETOF(txppr_t, cck_20ul) |
---|
8751 | | -/* CCK CDD 20in40 1x2 rate */ |
---|
8752 | | -#define WL_TX_POWER_CCK_20U_CDD_S1x2_FIRST OFFSETOF(txppr_t, cck_20ul_cdd.s1x2) |
---|
8753 | | -/* CCK CDD 20in40 1x3 rate */ |
---|
8754 | | -#define WL_TX_POWER_CCK_20U_CDD_S1x3_FIRST OFFSETOF(txppr_t, cck_20ul_cdd.s1x3) |
---|
8755 | | -#define WL_TX_POWER_20UL_OFDM_FIRST OFFSETOF(txppr_t, ofdm_20ul) |
---|
8756 | | -#define WL_TX_POWER_20UL_OFDM_CDD_FIRST OFFSETOF(txppr_t, ofdm_20ul_cdd) |
---|
8757 | | -#define WL_TX_POWER_20UL_S1x1_FIRST OFFSETOF(txppr_t, ht20ul.s1x1) /* MCS 0-7 rate */ |
---|
8758 | | -#define WL_TX_POWER_20UL_S1x2_FIRST OFFSETOF(txppr_t, ht20ul.s1x2) /* MCS 0-7 rate */ |
---|
8759 | | -#define WL_TX_POWER_20UL_S1x3_FIRST OFFSETOF(txppr_t, ht.ul20s1x3) /* MCS 0-7 rate */ |
---|
8760 | | -#define WL_TX_POWER_20UL_S2x2_FIRST OFFSETOF(txppr_t, ht20ul.s2x2) /* MCS 8-15 rate */ |
---|
8761 | | -#define WL_TX_POWER_20UL_S2x3_FIRST OFFSETOF(txppr_t, ht.ul20s2x3) /* MCS 8-15 rate */ |
---|
8762 | | -#define WL_TX_POWER_20UL_S3x3_FIRST OFFSETOF(txppr_t, ht20ul.s3x3) /* MCS 16-23 rate */ |
---|
| 18846 | +#ifdef HEALTH_CHECK_WLIOCTL |
---|
| 18847 | +/* Health check status format: |
---|
| 18848 | + * reporting status size = uint32 |
---|
| 18849 | + * 8 LSB bits are reserved for: WARN (0), ERROR (1), and other levels |
---|
| 18850 | + * MSB 24 bits are reserved for client to fill in its specific status |
---|
| 18851 | + */ |
---|
| 18852 | +#define HEALTH_CHECK_STATUS_OK 0 |
---|
| 18853 | +/* Bit positions. */ |
---|
| 18854 | +#define HEALTH_CHECK_STATUS_WARN 0x1 |
---|
| 18855 | +#define HEALTH_CHECK_STATUS_ERROR 0x2 |
---|
| 18856 | +#define HEALTH_CHECK_STATUS_TRAP 0x4 |
---|
| 18857 | +#define HEALTH_CHECK_STATUS_NOEVENT 0x8 |
---|
8763 | 18858 | |
---|
| 18859 | +/* Indication that required information is populated in log buffers */ |
---|
| 18860 | +#define HEALTH_CHECK_STATUS_INFO_LOG_BUF 0x80 |
---|
| 18861 | +#define HEALTH_CHECK_STATUS_MASK (0xFF) |
---|
8764 | 18862 | |
---|
8765 | | -#endif /* WL_OLDPPR */ |
---|
| 18863 | +#define HEALTH_CHECK_STATUS_MSB_SHIFT 8 |
---|
| 18864 | +#endif /* HEALTH_CHECK_WLIOCTL */ |
---|
8766 | 18865 | |
---|
| 18866 | +/** receive signal reporting module interface */ |
---|
| 18867 | + |
---|
| 18868 | +#define WL_RXSIG_IOV_MAJOR_VER (1u) |
---|
| 18869 | +#define WL_RXSIG_IOV_MINOR_VER (1u) |
---|
| 18870 | +#define WL_RXSIG_IOV_MAJOR_VER_SHIFT (8u) |
---|
| 18871 | +#define WL_RXSIG_IOV_VERSION \ |
---|
| 18872 | + ((WL_RXSIG_IOV_MAJOR_VER << WL_RXSIG_IOV_MAJOR_VER_SHIFT) | WL_RXSIG_IOV_MINOR_VER) |
---|
| 18873 | +#define WL_RXSIG_IOV_GET_MAJOR(x) (x >> WL_RXSIG_IOV_MAJOR_VER_SHIFT) |
---|
| 18874 | +#define WL_RXSIG_IOV_GET_MINOR(x) (x & 0xFF) |
---|
| 18875 | + |
---|
| 18876 | +enum wl_rxsig_cmd_rssi_mode { |
---|
| 18877 | + WL_RXSIG_MODE_DB = 0x0, |
---|
| 18878 | + WL_RXSIG_MODE_QDB = 0x1, |
---|
| 18879 | + WL_RXSIG_MODE_LAST |
---|
| 18880 | +}; |
---|
| 18881 | + |
---|
| 18882 | +/* structure defs for 'wl rxsig [cmd]' iovars */ |
---|
| 18883 | +enum wl_rxsig_iov_v1 { |
---|
| 18884 | + WL_RXSIG_CMD_RSSI = 0x1, /**< combined rssi moving avg */ |
---|
| 18885 | + WL_RXSIG_CMD_SNR = 0x2, /**< combined snr moving avg */ |
---|
| 18886 | + WL_RXSIG_CMD_RSSIANT = 0x3, /**< rssi moving avg per-ant */ |
---|
| 18887 | + WL_RXSIG_CMD_SNRANT = 0x4, /**< snr moving avg per-snr */ |
---|
| 18888 | + WL_RXSIG_CMD_SMPLWIN = 0x5, /**< config for sampling window size */ |
---|
| 18889 | + WL_RXSIG_CMD_SMPLGRP = 0x7, /**< config for grouping of pkt type */ |
---|
| 18890 | + WL_RXSIG_CMD_STA_MA = 0x8, |
---|
| 18891 | + WL_RXSIG_CMD_MAMODE = 0x9, |
---|
| 18892 | + WL_RXSIG_CMD_MADIV = 0xa, |
---|
| 18893 | + WL_RXSIG_CMD_DUMP = 0xb, |
---|
| 18894 | + WL_RXSIG_CMD_DUMPWIN = 0xc, |
---|
| 18895 | + WL_RXSIG_CMD_TOTAL |
---|
| 18896 | +}; |
---|
| 18897 | + |
---|
| 18898 | +struct wl_rxsig_cfg_v1 { |
---|
| 18899 | + uint16 version; |
---|
| 18900 | + chanspec_t chan; /**< chanspec info for querying stats */ |
---|
| 18901 | + uint8 pmac[ETHER_ADDR_LEN]; /**< peer(link) mac address */ |
---|
| 18902 | +}; |
---|
| 18903 | + |
---|
| 18904 | +struct wl_rxsig_iov_rssi_v1 { |
---|
| 18905 | + int8 rssi; |
---|
| 18906 | + uint8 rssi_qdb; |
---|
| 18907 | + uint8 pad[2]; |
---|
| 18908 | +}; |
---|
| 18909 | + |
---|
| 18910 | +struct wl_rxsig_iov_snr_v1 { |
---|
| 18911 | + int16 snr; |
---|
| 18912 | + uint16 pad; |
---|
| 18913 | +}; |
---|
| 18914 | + |
---|
| 18915 | +struct wl_rxsig_iov_rssi_ant_v1 { |
---|
| 18916 | + int8 deci[WL_RSSI_ANT_MAX]; |
---|
| 18917 | + uint8 frac[WL_RSSI_ANT_MAX]; |
---|
| 18918 | + uint8 rssi_mode; /**< MODE_DB or MODE_QDB */ |
---|
| 18919 | + uint8 num_of_ant; /**< total number of ants */ |
---|
| 18920 | + uint8 pad[2]; /**< padding for 32bit align */ |
---|
| 18921 | +}; |
---|
| 18922 | + |
---|
| 18923 | +#ifdef BCM_SDC |
---|
| 18924 | + |
---|
| 18925 | +#define SDC_TRIGGER_CONFIG_VER_1 1 |
---|
| 18926 | +typedef struct { |
---|
| 18927 | + uint16 version; |
---|
| 18928 | + uint16 type; |
---|
| 18929 | + uint8 activate; |
---|
| 18930 | + uint8 pad; |
---|
| 18931 | +} sdc_trigger_cfg_t; |
---|
| 18932 | + |
---|
| 18933 | +typedef enum sdc_trigger_types { |
---|
| 18934 | + SDC_TYPE_STA_ONBOARD_DEBUG = 1, |
---|
| 18935 | +#ifdef SDC_TEST |
---|
| 18936 | + /* |
---|
| 18937 | + * This is for test purpose only. Don't assign specific value. |
---|
| 18938 | + * Keep at the end |
---|
| 18939 | + */ |
---|
| 18940 | + SDC_TYPE_TEST1, |
---|
| 18941 | + SDC_TYPE_TEST2, |
---|
| 18942 | + SDC_TYPE_TEST3, |
---|
| 18943 | +#endif /* SDC_TEST */ |
---|
| 18944 | + SDC_TYPE_MAX_TRIGGER |
---|
| 18945 | +} sdc_trigger_types_t; |
---|
| 18946 | + |
---|
| 18947 | +#endif /* BCM_SDC */ |
---|
| 18948 | + |
---|
| 18949 | +typedef struct wl_avs_info_v1 { |
---|
| 18950 | + uint16 version; /* Structure version */ |
---|
| 18951 | + uint16 equ_version; /* Equation Version */ |
---|
| 18952 | + uint32 RO; /* RO in OTP */ |
---|
| 18953 | + uint32 equ_csr; /* Equated CSR */ |
---|
| 18954 | + uint32 read_csr; /* Read Back CSR */ |
---|
| 18955 | + uint32 aging; /* aging setting in nvram */ |
---|
| 18956 | +} wl_avs_info_v1_t; |
---|
| 18957 | + |
---|
| 18958 | +#define WL_AVS_INFO_VER_1 1 |
---|
| 18959 | + |
---|
| 18960 | +/* bitmap for clm_flags iovar */ |
---|
| 18961 | +#define WL_CLM_TXBF 0x01 /**< Flag for Tx beam forming */ |
---|
| 18962 | +#define WL_CLM_RED_EU 0x02 /* Flag for EU RED */ |
---|
| 18963 | +#define WL_CLM_EDCRS_EU 0x04 /**< Use EU post-2015 energy detect */ |
---|
| 18964 | +#define WL_CLM_DFS_TPC 0x08 /**< Flag for DFS TPC */ |
---|
| 18965 | +#define WL_CLM_RADAR_TYPE_EU 0x10 /**< Flag for EU */ |
---|
| 18966 | +#define WL_CLM_DFS_FCC WL_CLM_DFS_TPC /**< Flag for DFS FCC */ |
---|
| 18967 | +#define WL_CLM_DFS_EU (WL_CLM_DFS_TPC | WL_CLM_RADAR_TYPE_EU) /**< Flag for DFS EU */ |
---|
| 18968 | + |
---|
| 18969 | +/* SC (scan core) command IDs */ |
---|
| 18970 | +enum wl_sc_cmd { |
---|
| 18971 | + WL_SC_CMD_DBG = 0, |
---|
| 18972 | + WL_SC_CMD_CNX = 1, |
---|
| 18973 | + WL_SC_CMD_LAST |
---|
| 18974 | +}; |
---|
| 18975 | + |
---|
| 18976 | +#define WSEC_MAX_SAE_PASSWORD_LEN 128 |
---|
| 18977 | + |
---|
| 18978 | +typedef struct { |
---|
| 18979 | + ushort password_len; /* octets in key material */ |
---|
| 18980 | + uint8 password[WSEC_MAX_SAE_PASSWORD_LEN]; /* maximum key len for SAE passphrase */ |
---|
| 18981 | +} wsec_sae_password_t; |
---|
| 18982 | + |
---|
| 18983 | +/** Statistic related to dongle sleep while in wowl. */ |
---|
| 18984 | +typedef struct wl_sleep_stats { |
---|
| 18985 | + uint32 cpu_wakes; /** Number of times the CPU has woken up from sleep. */ |
---|
| 18986 | + uint32 cpu_up_us; /** CPU active time in us */ |
---|
| 18987 | + uint32 total_time_ms; /** Total measured time in ms */ |
---|
| 18988 | + uint32 dtim; /** Number of DTIM processed */ |
---|
| 18989 | + uint32 tx_packets; /** Number of packets sent */ |
---|
| 18990 | + uint32 tx_bytes; /** Number of bytes sent */ |
---|
| 18991 | + uint32 tx_us; /** Time radio spent doing TX. */ |
---|
| 18992 | + uint32 rx_packets; /** Number of packets received */ |
---|
| 18993 | + uint32 rx_bytes; /** Number of bytes received */ |
---|
| 18994 | + uint32 rx_us; /** Time radio spent doing RX. */ |
---|
| 18995 | + uint32 idle_us; /** Time radio spent idle. */ |
---|
| 18996 | + uint32 arp_resp_cnt; /** Number of ARP replies sent */ |
---|
| 18997 | + uint32 tcpka_ack_cnt; /** Number of TCP KeepAlive Acks sent */ |
---|
| 18998 | + uint32 grp_key_renew_cnt; /** Number of group key renewals */ |
---|
| 18999 | +} wl_sleep_stats_t; |
---|
| 19000 | + |
---|
| 19001 | +/* NSC defintions */ |
---|
| 19002 | +#include <packed_section_start.h> |
---|
| 19003 | +typedef BWL_PRE_PACKED_STRUCT struct nsc_af_body { |
---|
| 19004 | + uint8 type; /* should be 0x7f */ |
---|
| 19005 | + uint8 oui[DOT11_OUI_LEN]; /* just like it says */ |
---|
| 19006 | + uint8 subtype; /* 221, 0xdd: proprietary ie */ |
---|
| 19007 | + uint8 ielen; /* */ |
---|
| 19008 | + uint8 data[1]; /* variable */ |
---|
| 19009 | +} BWL_POST_PACKED_STRUCT nsc_af_body_t; |
---|
| 19010 | +#include <packed_section_end.h> |
---|
| 19011 | + |
---|
| 19012 | +#define NSC_SUBTYPES_MAX 8 |
---|
| 19013 | +#define NSC_SUBTYPES_EOL 0xff |
---|
| 19014 | + |
---|
| 19015 | +/* Aloe constants */ |
---|
| 19016 | +#define WL_ALOE_AF_TYPE (0x7) |
---|
| 19017 | +#define WL_ALOE_CMD_PERIODIC (0x01) |
---|
| 19018 | +#define WL_ALOE_CMD_ONESHOT (0x02) |
---|
| 19019 | +#define WL_ALOE_HASHTABLE_SZ (508) /**< Max number of hash entries */ |
---|
| 19020 | +#define WL_ALOE_HASH_SZ (8) /**< eight byte hash size */ |
---|
| 19021 | +#define WL_ALOE_AF_CACHE_SZ (8) /** Mac Number of cached AF. */ |
---|
| 19022 | + |
---|
| 19023 | +/** ALOE configuration */ |
---|
| 19024 | +typedef struct wl_aloe_cfg { |
---|
| 19025 | + /** ALOE major version number to be able to receive. */ |
---|
| 19026 | + uint8 major; |
---|
| 19027 | + /** ALOE minor version number to be able to receive. */ |
---|
| 19028 | + uint8 minor; |
---|
| 19029 | + /** Bitfield of the command to be able to receive. |
---|
| 19030 | + * BWL_ALOE_CMD_PERIODIC and/or BWL_ALOE_CMD_ONESHOT. |
---|
| 19031 | + */ |
---|
| 19032 | + uint8 command; |
---|
| 19033 | + /** BSSID to receive the Aloe frame sent on. */ |
---|
| 19034 | + struct ether_addr BSSID; |
---|
| 19035 | +} wl_aloe_cfg_t; |
---|
| 19036 | + |
---|
| 19037 | +/** ALOE periodic action frame */ |
---|
| 19038 | +typedef struct wl_aloe_periodic_af { |
---|
| 19039 | + /** Tx interval, in ms. */ |
---|
| 19040 | + uint32 tx_int; |
---|
| 19041 | + /** Number of AF to send during a phase. |
---|
| 19042 | + * Phase duration is defined as tx_cnt * tx_int ms. |
---|
| 19043 | + */ |
---|
| 19044 | + uint32 tx_cnt; |
---|
| 19045 | + /** Interphase space, defined as muted TX periods during which no AF is sent. |
---|
| 19046 | + * Interphase duration is defined as idle_cnt * tx_int ms. |
---|
| 19047 | + */ |
---|
| 19048 | + uint32 idle_cnt; |
---|
| 19049 | + /** Start of the RX window as a number of tx interval |
---|
| 19050 | + * The RX window starts at rx_start * tx_int ms after the |
---|
| 19051 | + * beginning of a given phase. |
---|
| 19052 | + */ |
---|
| 19053 | + uint32 rx_start; |
---|
| 19054 | + /** Number of tx_inteval the listening window lasts |
---|
| 19055 | + * A RX window lasts for rx_cnt * tx_int ms. |
---|
| 19056 | + */ |
---|
| 19057 | + uint32 rx_cnt; |
---|
| 19058 | + wl_af_params_t af; |
---|
| 19059 | +} wl_aloe_periodic_af_t; |
---|
| 19060 | + |
---|
| 19061 | +/** |
---|
| 19062 | + * @brief Aloe's action frame format. |
---|
| 19063 | + */ |
---|
| 19064 | +typedef struct wl_aloe_af { |
---|
| 19065 | + /** Vendor specific: 0x7f */ |
---|
| 19066 | + uint8 category; |
---|
| 19067 | + /** 00-22-aa */ |
---|
| 19068 | + uint8 oui[3]; |
---|
| 19069 | + /** 7 */ |
---|
| 19070 | + uint8 subtype; |
---|
| 19071 | + uint8 PAD0; |
---|
| 19072 | + /** ALOE Major version number */ |
---|
| 19073 | + uint8 major; |
---|
| 19074 | + /** ALOE Minor version number */ |
---|
| 19075 | + uint8 minor; |
---|
| 19076 | + /** Periodic or single shot */ |
---|
| 19077 | + uint8 command; |
---|
| 19078 | + uint8 PAD1; |
---|
| 19079 | + /** Authentication hash */ |
---|
| 19080 | + uint8 hash[8]; |
---|
| 19081 | + /** Aloe payload */ |
---|
| 19082 | + uint8 data[]; |
---|
| 19083 | +} wl_aloe_af_t; |
---|
| 19084 | + |
---|
| 19085 | +typedef struct wl_aloe_stats { |
---|
| 19086 | + uint32 tx_af_total; /** Counter for the total number of AF sent. */ |
---|
| 19087 | + /** Number of AF not sent because the previous TX is still pending */ |
---|
| 19088 | + /** Data is held in the AF data legacy buffer */ |
---|
| 19089 | + uint32 tx_af_aborted; |
---|
| 19090 | + uint32 tx_af_failed; /** Number of TX AF that failed for a reason */ |
---|
| 19091 | + uint32 rx_af; /** Received ALOE Action frames. */ |
---|
| 19092 | + uint32 rx_af_filtered; /** Received and filtered out Aloe AF. */ |
---|
| 19093 | + /** Action frame received but dropped as the host is not asleep yet. */ |
---|
| 19094 | + uint32 rx_dropped; |
---|
| 19095 | + uint32 cache_cnt; |
---|
| 19096 | +} wl_aloe_stats_t; |
---|
| 19097 | + |
---|
| 19098 | +/* pkteng_ru_fill enum definitions */ |
---|
| 19099 | +#define PKTENG_RU_FILL_VERSION 1 |
---|
| 19100 | +#define PKTENG_RU_FILL_LENGTH 32 |
---|
| 19101 | + |
---|
| 19102 | +/* Packet length in bytes */ |
---|
| 19103 | +#define PKT_LEN_TRIG_PROFILE_DEFAULT 100 |
---|
| 19104 | +#define PKT_LEN_TRIG_PROFILE_0 650 |
---|
| 19105 | +#define PKT_LEN_TRIG_PROFILE_1 600 |
---|
| 19106 | +#define PKT_LEN_TRIG_PROFILE_2 4000 |
---|
| 19107 | +#define PKT_LEN_TRIG_PROFILE_3 4000 |
---|
| 19108 | +#define PKT_LEN_TRIG_PROFILE_4 3000 |
---|
| 19109 | +#define PKT_LEN_TRIG_PROFILE_5 3000 |
---|
| 19110 | + |
---|
| 19111 | +/* RU Allocation value */ |
---|
| 19112 | +#define RU26_5 5 |
---|
| 19113 | +#define RU242_61 61 |
---|
| 19114 | + |
---|
| 19115 | +/* MAC Broadcast address individual Octet */ |
---|
| 19116 | +#define BCAST_ADDR_OCTET 0xff |
---|
| 19117 | + |
---|
| 19118 | +#define ONE_SHOT_TRIGGER_TX 255 /* To send one shot trigger frame */ |
---|
| 19119 | +#define TRIG_PERIOD_MAX 255 /* Max period */ |
---|
| 19120 | +#define TRIG_PROFILES 6 /* Packet profiles to compute cmn and usr info params */ |
---|
| 19121 | +#define HE_TRIG_FRM_NUSERINFO 1 /* Default number of user info fields */ |
---|
| 19122 | +#define TRIG_TX_MIN_IP_ARGS 1 |
---|
| 19123 | +#define TRIG_TX_MAX_IP_ARGS 4 |
---|
| 19124 | + |
---|
| 19125 | +#define HE_TRIG_NON_HT_PPDU 0 |
---|
| 19126 | +#define HE_TRIG_VHT_PPDU 1 |
---|
| 19127 | + |
---|
| 19128 | +typedef struct { |
---|
| 19129 | + uint8 ru_alloc_val; /* ru allocation index number */ |
---|
| 19130 | + uint8 mcs_val; /* mcs allocated value */ |
---|
| 19131 | + uint8 nss_val; /* num of spatial streams */ |
---|
| 19132 | + uint32 num_bytes; /* approx num of bytes to calculate other required params */ |
---|
| 19133 | +} pkteng_reduced_t; |
---|
| 19134 | + |
---|
| 19135 | +/* Generic BW defintions */ |
---|
| 19136 | +enum { |
---|
| 19137 | + BW_20MHz = 0, |
---|
| 19138 | + BW_40MHz = 1, |
---|
| 19139 | + BW_80MHz = 2, |
---|
| 19140 | + BW_160MHz = 3 |
---|
| 19141 | +}; |
---|
| 19142 | + |
---|
| 19143 | +/* Generic MCS */ |
---|
| 19144 | +enum { |
---|
| 19145 | + MCS_0 = 0, |
---|
| 19146 | + MCS_1 = 1, |
---|
| 19147 | + MCS_2 = 2, |
---|
| 19148 | + MCS_3 = 3, |
---|
| 19149 | + MCS_4 = 4, |
---|
| 19150 | + MCS_5 = 5, |
---|
| 19151 | + MCS_6 = 6, |
---|
| 19152 | + MCS_7 = 7, |
---|
| 19153 | + MCS_8 = 8, |
---|
| 19154 | + MCS_9 = 9, |
---|
| 19155 | + MCS_10 = 10, |
---|
| 19156 | + MCS_11 = 11 |
---|
| 19157 | +}; |
---|
| 19158 | + |
---|
| 19159 | +/* Spatial streams */ |
---|
| 19160 | +enum { |
---|
| 19161 | + NSS1 = 1, |
---|
| 19162 | + NSS2 = 2 |
---|
| 19163 | +}; |
---|
| 19164 | + |
---|
| 19165 | +/* HE-LTF Symbols index */ |
---|
| 19166 | +enum { |
---|
| 19167 | + NUM_HE_LTF_SYM0 = 0, |
---|
| 19168 | + NUM_HE_LTF_SYM1 = 1, |
---|
| 19169 | + NUM_HE_LTF_SYM2 = 2, |
---|
| 19170 | + NUM_HE_LTF_SYM4 = 4, |
---|
| 19171 | + NUM_HE_LTF_SYM5 = 5, |
---|
| 19172 | + NUM_HE_LTF_SYM6 = 6 |
---|
| 19173 | +}; |
---|
| 19174 | + |
---|
| 19175 | +/* Status of STBC encoding in the solicited HE TBPPDUs */ |
---|
| 19176 | +enum { |
---|
| 19177 | + STBC_DIS = 0, /* Disabled */ |
---|
| 19178 | + STBC_EN = 1 /* Enabled */ |
---|
| 19179 | +}; |
---|
| 19180 | + |
---|
| 19181 | +/* pe_category, PE dur supported */ |
---|
| 19182 | +enum { |
---|
| 19183 | + PE0 = 0, |
---|
| 19184 | + PE8 = 1, |
---|
| 19185 | + PE16 = 2 |
---|
| 19186 | +}; |
---|
| 19187 | + |
---|
| 19188 | +/* Dual carrier modulation in solicited HE TBPPDU */ |
---|
| 19189 | +enum { |
---|
| 19190 | + DCM_DIS = 0, /* Disabled */ |
---|
| 19191 | + DCM_EN = 1, /* Enabled */ |
---|
| 19192 | +}; |
---|
| 19193 | + |
---|
| 19194 | +enum { |
---|
| 19195 | + TRIG_TX_DIS = 0, /* Fake trigger frame TX */ |
---|
| 19196 | + TRIG_TX_EN = 1 /* Enable trigger frame transmission */ |
---|
| 19197 | +}; |
---|
| 19198 | + |
---|
| 19199 | +/* UL FEC Coding Type */ |
---|
| 19200 | +enum { |
---|
| 19201 | + CODING_BCC = 0, /* BCC Coding */ |
---|
| 19202 | + CODING_LDPC = 1 /* LDPC coding */ |
---|
| 19203 | +}; |
---|
| 19204 | + |
---|
| 19205 | +/* MU-MIMO LTF Mode subfield encoding */ |
---|
| 19206 | +enum { |
---|
| 19207 | + MUMIMO_LTF_0 = 0, /* HE single stream pilot HE-LTF mode */ |
---|
| 19208 | + MUMIMO_LTF_1 = 1 /* HE masked HE-LTF sequence mode */ |
---|
| 19209 | +}; |
---|
8767 | 19210 | #endif /* _wlioctl_h_ */ |
---|