2 * Copyright (c) 2013 Eugene Krasnikov <k.eugene.e@gmail.com>
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 /*---------------------------------------------------------------------------
21 API VERSIONING INFORMATION
23 The RIVA API is versioned as MAJOR.MINOR.VERSION.REVISION
24 The MAJOR is incremented for major product/architecture changes
25 (and then MINOR/VERSION/REVISION are zeroed)
26 The MINOR is incremented for minor product/architecture changes
27 (and then VERSION/REVISION are zeroed)
28 The VERSION is incremented if a significant API change occurs
29 (and then REVISION is zeroed)
30 The REVISION is incremented if an insignificant API change occurs
31 or if a new API is added
32 All values are in the range 0..255 (ie they are 8-bit values)
33 ---------------------------------------------------------------------------*/
34 #define WCN36XX_HAL_VER_MAJOR 1
35 #define WCN36XX_HAL_VER_MINOR 4
36 #define WCN36XX_HAL_VER_VERSION 1
37 #define WCN36XX_HAL_VER_REVISION 2
39 /* This is to force compiler to use the maximum of an int ( 4 bytes ) */
40 #define WCN36XX_HAL_MAX_ENUM_SIZE 0x7FFFFFFF
41 #define WCN36XX_HAL_MSG_TYPE_MAX_ENUM_SIZE 0x7FFF
43 /* Max no. of transmit categories */
44 #define STACFG_MAX_TC 8
46 /* The maximum value of access category */
47 #define WCN36XX_HAL_MAX_AC 4
49 #define WCN36XX_HAL_IPV4_ADDR_LEN 4
51 #define WCN36XX_HAL_STA_INVALID_IDX 0xFF
52 #define WCN36XX_HAL_BSS_INVALID_IDX 0xFF
54 /* Default Beacon template size */
55 #define BEACON_TEMPLATE_SIZE 0x180
57 /* Minimum PVM size that the FW expects. See comment in smd.c for details. */
58 #define TIM_MIN_PVM_SIZE 6
60 /* Param Change Bitmap sent to HAL */
61 #define PARAM_BCN_INTERVAL_CHANGED (1 << 0)
62 #define PARAM_SHORT_PREAMBLE_CHANGED (1 << 1)
63 #define PARAM_SHORT_SLOT_TIME_CHANGED (1 << 2)
64 #define PARAM_llACOEXIST_CHANGED (1 << 3)
65 #define PARAM_llBCOEXIST_CHANGED (1 << 4)
66 #define PARAM_llGCOEXIST_CHANGED (1 << 5)
67 #define PARAM_HT20MHZCOEXIST_CHANGED (1<<6)
68 #define PARAM_NON_GF_DEVICES_PRESENT_CHANGED (1<<7)
69 #define PARAM_RIFS_MODE_CHANGED (1<<8)
70 #define PARAM_LSIG_TXOP_FULL_SUPPORT_CHANGED (1<<9)
71 #define PARAM_OBSS_MODE_CHANGED (1<<10)
72 #define PARAM_BEACON_UPDATE_MASK \
73 (PARAM_BCN_INTERVAL_CHANGED | \
74 PARAM_SHORT_PREAMBLE_CHANGED | \
75 PARAM_SHORT_SLOT_TIME_CHANGED | \
76 PARAM_llACOEXIST_CHANGED | \
77 PARAM_llBCOEXIST_CHANGED | \
78 PARAM_llGCOEXIST_CHANGED | \
79 PARAM_HT20MHZCOEXIST_CHANGED | \
80 PARAM_NON_GF_DEVICES_PRESENT_CHANGED | \
81 PARAM_RIFS_MODE_CHANGED | \
82 PARAM_LSIG_TXOP_FULL_SUPPORT_CHANGED | \
83 PARAM_OBSS_MODE_CHANGED)
85 /* dump command response Buffer size */
86 #define DUMPCMD_RSP_BUFFER 100
88 /* version string max length (including NULL) */
89 #define WCN36XX_HAL_VERSION_LENGTH 64
91 /* message types for messages exchanged between WDI and HAL */
92 enum wcn36xx_hal_host_msg_type {
94 WCN36XX_HAL_START_REQ = 0,
95 WCN36XX_HAL_START_RSP = 1,
96 WCN36XX_HAL_STOP_REQ = 2,
97 WCN36XX_HAL_STOP_RSP = 3,
100 WCN36XX_HAL_INIT_SCAN_REQ = 4,
101 WCN36XX_HAL_INIT_SCAN_RSP = 5,
102 WCN36XX_HAL_START_SCAN_REQ = 6,
103 WCN36XX_HAL_START_SCAN_RSP = 7,
104 WCN36XX_HAL_END_SCAN_REQ = 8,
105 WCN36XX_HAL_END_SCAN_RSP = 9,
106 WCN36XX_HAL_FINISH_SCAN_REQ = 10,
107 WCN36XX_HAL_FINISH_SCAN_RSP = 11,
109 /* HW STA configuration/deconfiguration */
110 WCN36XX_HAL_CONFIG_STA_REQ = 12,
111 WCN36XX_HAL_CONFIG_STA_RSP = 13,
112 WCN36XX_HAL_DELETE_STA_REQ = 14,
113 WCN36XX_HAL_DELETE_STA_RSP = 15,
114 WCN36XX_HAL_CONFIG_BSS_REQ = 16,
115 WCN36XX_HAL_CONFIG_BSS_RSP = 17,
116 WCN36XX_HAL_DELETE_BSS_REQ = 18,
117 WCN36XX_HAL_DELETE_BSS_RSP = 19,
119 /* Infra STA asscoiation */
120 WCN36XX_HAL_JOIN_REQ = 20,
121 WCN36XX_HAL_JOIN_RSP = 21,
122 WCN36XX_HAL_POST_ASSOC_REQ = 22,
123 WCN36XX_HAL_POST_ASSOC_RSP = 23,
126 WCN36XX_HAL_SET_BSSKEY_REQ = 24,
127 WCN36XX_HAL_SET_BSSKEY_RSP = 25,
128 WCN36XX_HAL_SET_STAKEY_REQ = 26,
129 WCN36XX_HAL_SET_STAKEY_RSP = 27,
130 WCN36XX_HAL_RMV_BSSKEY_REQ = 28,
131 WCN36XX_HAL_RMV_BSSKEY_RSP = 29,
132 WCN36XX_HAL_RMV_STAKEY_REQ = 30,
133 WCN36XX_HAL_RMV_STAKEY_RSP = 31,
136 WCN36XX_HAL_ADD_TS_REQ = 32,
137 WCN36XX_HAL_ADD_TS_RSP = 33,
138 WCN36XX_HAL_DEL_TS_REQ = 34,
139 WCN36XX_HAL_DEL_TS_RSP = 35,
140 WCN36XX_HAL_UPD_EDCA_PARAMS_REQ = 36,
141 WCN36XX_HAL_UPD_EDCA_PARAMS_RSP = 37,
142 WCN36XX_HAL_ADD_BA_REQ = 38,
143 WCN36XX_HAL_ADD_BA_RSP = 39,
144 WCN36XX_HAL_DEL_BA_REQ = 40,
145 WCN36XX_HAL_DEL_BA_RSP = 41,
147 WCN36XX_HAL_CH_SWITCH_REQ = 42,
148 WCN36XX_HAL_CH_SWITCH_RSP = 43,
149 WCN36XX_HAL_SET_LINK_ST_REQ = 44,
150 WCN36XX_HAL_SET_LINK_ST_RSP = 45,
151 WCN36XX_HAL_GET_STATS_REQ = 46,
152 WCN36XX_HAL_GET_STATS_RSP = 47,
153 WCN36XX_HAL_UPDATE_CFG_REQ = 48,
154 WCN36XX_HAL_UPDATE_CFG_RSP = 49,
156 WCN36XX_HAL_MISSED_BEACON_IND = 50,
157 WCN36XX_HAL_UNKNOWN_ADDR2_FRAME_RX_IND = 51,
158 WCN36XX_HAL_MIC_FAILURE_IND = 52,
159 WCN36XX_HAL_FATAL_ERROR_IND = 53,
160 WCN36XX_HAL_SET_KEYDONE_MSG = 54,
163 WCN36XX_HAL_DOWNLOAD_NV_REQ = 55,
164 WCN36XX_HAL_DOWNLOAD_NV_RSP = 56,
166 WCN36XX_HAL_ADD_BA_SESSION_REQ = 57,
167 WCN36XX_HAL_ADD_BA_SESSION_RSP = 58,
168 WCN36XX_HAL_TRIGGER_BA_REQ = 59,
169 WCN36XX_HAL_TRIGGER_BA_RSP = 60,
170 WCN36XX_HAL_UPDATE_BEACON_REQ = 61,
171 WCN36XX_HAL_UPDATE_BEACON_RSP = 62,
172 WCN36XX_HAL_SEND_BEACON_REQ = 63,
173 WCN36XX_HAL_SEND_BEACON_RSP = 64,
175 WCN36XX_HAL_SET_BCASTKEY_REQ = 65,
176 WCN36XX_HAL_SET_BCASTKEY_RSP = 66,
177 WCN36XX_HAL_DELETE_STA_CONTEXT_IND = 67,
178 WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ = 68,
179 WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_RSP = 69,
181 /* PTT interface support */
182 WCN36XX_HAL_PROCESS_PTT_REQ = 70,
183 WCN36XX_HAL_PROCESS_PTT_RSP = 71,
185 /* BTAMP related events */
186 WCN36XX_HAL_SIGNAL_BTAMP_EVENT_REQ = 72,
187 WCN36XX_HAL_SIGNAL_BTAMP_EVENT_RSP = 73,
188 WCN36XX_HAL_TL_HAL_FLUSH_AC_REQ = 74,
189 WCN36XX_HAL_TL_HAL_FLUSH_AC_RSP = 75,
191 WCN36XX_HAL_ENTER_IMPS_REQ = 76,
192 WCN36XX_HAL_EXIT_IMPS_REQ = 77,
193 WCN36XX_HAL_ENTER_BMPS_REQ = 78,
194 WCN36XX_HAL_EXIT_BMPS_REQ = 79,
195 WCN36XX_HAL_ENTER_UAPSD_REQ = 80,
196 WCN36XX_HAL_EXIT_UAPSD_REQ = 81,
197 WCN36XX_HAL_UPDATE_UAPSD_PARAM_REQ = 82,
198 WCN36XX_HAL_CONFIGURE_RXP_FILTER_REQ = 83,
199 WCN36XX_HAL_ADD_BCN_FILTER_REQ = 84,
200 WCN36XX_HAL_REM_BCN_FILTER_REQ = 85,
201 WCN36XX_HAL_ADD_WOWL_BCAST_PTRN = 86,
202 WCN36XX_HAL_DEL_WOWL_BCAST_PTRN = 87,
203 WCN36XX_HAL_ENTER_WOWL_REQ = 88,
204 WCN36XX_HAL_EXIT_WOWL_REQ = 89,
205 WCN36XX_HAL_HOST_OFFLOAD_REQ = 90,
206 WCN36XX_HAL_SET_RSSI_THRESH_REQ = 91,
207 WCN36XX_HAL_GET_RSSI_REQ = 92,
208 WCN36XX_HAL_SET_UAPSD_AC_PARAMS_REQ = 93,
209 WCN36XX_HAL_CONFIGURE_APPS_CPU_WAKEUP_STATE_REQ = 94,
211 WCN36XX_HAL_ENTER_IMPS_RSP = 95,
212 WCN36XX_HAL_EXIT_IMPS_RSP = 96,
213 WCN36XX_HAL_ENTER_BMPS_RSP = 97,
214 WCN36XX_HAL_EXIT_BMPS_RSP = 98,
215 WCN36XX_HAL_ENTER_UAPSD_RSP = 99,
216 WCN36XX_HAL_EXIT_UAPSD_RSP = 100,
217 WCN36XX_HAL_SET_UAPSD_AC_PARAMS_RSP = 101,
218 WCN36XX_HAL_UPDATE_UAPSD_PARAM_RSP = 102,
219 WCN36XX_HAL_CONFIGURE_RXP_FILTER_RSP = 103,
220 WCN36XX_HAL_ADD_BCN_FILTER_RSP = 104,
221 WCN36XX_HAL_REM_BCN_FILTER_RSP = 105,
222 WCN36XX_HAL_SET_RSSI_THRESH_RSP = 106,
223 WCN36XX_HAL_HOST_OFFLOAD_RSP = 107,
224 WCN36XX_HAL_ADD_WOWL_BCAST_PTRN_RSP = 108,
225 WCN36XX_HAL_DEL_WOWL_BCAST_PTRN_RSP = 109,
226 WCN36XX_HAL_ENTER_WOWL_RSP = 110,
227 WCN36XX_HAL_EXIT_WOWL_RSP = 111,
228 WCN36XX_HAL_RSSI_NOTIFICATION_IND = 112,
229 WCN36XX_HAL_GET_RSSI_RSP = 113,
230 WCN36XX_HAL_CONFIGURE_APPS_CPU_WAKEUP_STATE_RSP = 114,
232 /* 11k related events */
233 WCN36XX_HAL_SET_MAX_TX_POWER_REQ = 115,
234 WCN36XX_HAL_SET_MAX_TX_POWER_RSP = 116,
236 /* 11R related msgs */
237 WCN36XX_HAL_AGGR_ADD_TS_REQ = 117,
238 WCN36XX_HAL_AGGR_ADD_TS_RSP = 118,
240 /* P2P WLAN_FEATURE_P2P */
241 WCN36XX_HAL_SET_P2P_GONOA_REQ = 119,
242 WCN36XX_HAL_SET_P2P_GONOA_RSP = 120,
244 /* WLAN Dump commands */
245 WCN36XX_HAL_DUMP_COMMAND_REQ = 121,
246 WCN36XX_HAL_DUMP_COMMAND_RSP = 122,
248 /* OEM_DATA FEATURE SUPPORT */
249 WCN36XX_HAL_START_OEM_DATA_REQ = 123,
250 WCN36XX_HAL_START_OEM_DATA_RSP = 124,
252 /* ADD SELF STA REQ and RSP */
253 WCN36XX_HAL_ADD_STA_SELF_REQ = 125,
254 WCN36XX_HAL_ADD_STA_SELF_RSP = 126,
256 /* DEL SELF STA SUPPORT */
257 WCN36XX_HAL_DEL_STA_SELF_REQ = 127,
258 WCN36XX_HAL_DEL_STA_SELF_RSP = 128,
260 /* Coex Indication */
261 WCN36XX_HAL_COEX_IND = 129,
263 /* Tx Complete Indication */
264 WCN36XX_HAL_OTA_TX_COMPL_IND = 130,
266 /* Host Suspend/resume messages */
267 WCN36XX_HAL_HOST_SUSPEND_IND = 131,
268 WCN36XX_HAL_HOST_RESUME_REQ = 132,
269 WCN36XX_HAL_HOST_RESUME_RSP = 133,
271 WCN36XX_HAL_SET_TX_POWER_REQ = 134,
272 WCN36XX_HAL_SET_TX_POWER_RSP = 135,
273 WCN36XX_HAL_GET_TX_POWER_REQ = 136,
274 WCN36XX_HAL_GET_TX_POWER_RSP = 137,
276 WCN36XX_HAL_P2P_NOA_ATTR_IND = 138,
278 WCN36XX_HAL_ENABLE_RADAR_DETECT_REQ = 139,
279 WCN36XX_HAL_ENABLE_RADAR_DETECT_RSP = 140,
280 WCN36XX_HAL_GET_TPC_REPORT_REQ = 141,
281 WCN36XX_HAL_GET_TPC_REPORT_RSP = 142,
282 WCN36XX_HAL_RADAR_DETECT_IND = 143,
283 WCN36XX_HAL_RADAR_DETECT_INTR_IND = 144,
284 WCN36XX_HAL_KEEP_ALIVE_REQ = 145,
285 WCN36XX_HAL_KEEP_ALIVE_RSP = 146,
288 WCN36XX_HAL_SET_PREF_NETWORK_REQ = 147,
289 WCN36XX_HAL_SET_PREF_NETWORK_RSP = 148,
290 WCN36XX_HAL_SET_RSSI_FILTER_REQ = 149,
291 WCN36XX_HAL_SET_RSSI_FILTER_RSP = 150,
292 WCN36XX_HAL_UPDATE_SCAN_PARAM_REQ = 151,
293 WCN36XX_HAL_UPDATE_SCAN_PARAM_RSP = 152,
294 WCN36XX_HAL_PREF_NETW_FOUND_IND = 153,
296 WCN36XX_HAL_SET_TX_PER_TRACKING_REQ = 154,
297 WCN36XX_HAL_SET_TX_PER_TRACKING_RSP = 155,
298 WCN36XX_HAL_TX_PER_HIT_IND = 156,
300 WCN36XX_HAL_8023_MULTICAST_LIST_REQ = 157,
301 WCN36XX_HAL_8023_MULTICAST_LIST_RSP = 158,
303 WCN36XX_HAL_SET_PACKET_FILTER_REQ = 159,
304 WCN36XX_HAL_SET_PACKET_FILTER_RSP = 160,
305 WCN36XX_HAL_PACKET_FILTER_MATCH_COUNT_REQ = 161,
306 WCN36XX_HAL_PACKET_FILTER_MATCH_COUNT_RSP = 162,
307 WCN36XX_HAL_CLEAR_PACKET_FILTER_REQ = 163,
308 WCN36XX_HAL_CLEAR_PACKET_FILTER_RSP = 164,
311 * This is temp fix. Should be removed once Host and Riva code is
314 WCN36XX_HAL_INIT_SCAN_CON_REQ = 165,
316 WCN36XX_HAL_SET_POWER_PARAMS_REQ = 166,
317 WCN36XX_HAL_SET_POWER_PARAMS_RSP = 167,
319 WCN36XX_HAL_TSM_STATS_REQ = 168,
320 WCN36XX_HAL_TSM_STATS_RSP = 169,
322 /* wake reason indication (WOW) */
323 WCN36XX_HAL_WAKE_REASON_IND = 170,
325 /* GTK offload support */
326 WCN36XX_HAL_GTK_OFFLOAD_REQ = 171,
327 WCN36XX_HAL_GTK_OFFLOAD_RSP = 172,
328 WCN36XX_HAL_GTK_OFFLOAD_GETINFO_REQ = 173,
329 WCN36XX_HAL_GTK_OFFLOAD_GETINFO_RSP = 174,
331 WCN36XX_HAL_FEATURE_CAPS_EXCHANGE_REQ = 175,
332 WCN36XX_HAL_FEATURE_CAPS_EXCHANGE_RSP = 176,
333 WCN36XX_HAL_EXCLUDE_UNENCRYPTED_IND = 177,
335 WCN36XX_HAL_SET_THERMAL_MITIGATION_REQ = 178,
336 WCN36XX_HAL_SET_THERMAL_MITIGATION_RSP = 179,
338 WCN36XX_HAL_UPDATE_VHT_OP_MODE_REQ = 182,
339 WCN36XX_HAL_UPDATE_VHT_OP_MODE_RSP = 183,
341 WCN36XX_HAL_P2P_NOA_START_IND = 184,
343 WCN36XX_HAL_GET_ROAM_RSSI_REQ = 185,
344 WCN36XX_HAL_GET_ROAM_RSSI_RSP = 186,
346 WCN36XX_HAL_CLASS_B_STATS_IND = 187,
347 WCN36XX_HAL_DEL_BA_IND = 188,
348 WCN36XX_HAL_DHCP_START_IND = 189,
349 WCN36XX_HAL_DHCP_STOP_IND = 190,
351 WCN36XX_HAL_AVOID_FREQ_RANGE_IND = 233,
353 WCN36XX_HAL_MSG_MAX = WCN36XX_HAL_MSG_TYPE_MAX_ENUM_SIZE
356 /* Enumeration for Version */
357 enum wcn36xx_hal_host_msg_version {
358 WCN36XX_HAL_MSG_VERSION0 = 0,
359 WCN36XX_HAL_MSG_VERSION1 = 1,
360 /* define as 2 bytes data */
361 WCN36XX_HAL_MSG_WCNSS_CTRL_VERSION = 0x7FFF,
362 WCN36XX_HAL_MSG_VERSION_MAX_FIELD = WCN36XX_HAL_MSG_WCNSS_CTRL_VERSION
366 DRIVER_TYPE_PRODUCTION = 0,
369 DRIVER_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
372 enum wcn36xx_hal_stop_type {
373 HAL_STOP_TYPE_SYS_RESET,
374 HAL_STOP_TYPE_SYS_DEEP_SLEEP,
375 HAL_STOP_TYPE_RF_KILL,
376 HAL_STOP_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
379 enum wcn36xx_hal_sys_mode {
383 HAL_SYS_MODE_PROMISC,
384 HAL_SYS_MODE_SUSPEND_LINK,
385 HAL_SYS_MODE_ROAM_SCAN,
386 HAL_SYS_MODE_ROAM_SUSPEND_LINK,
387 HAL_SYS_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
390 enum phy_chan_bond_state {
391 /* 20MHz IF bandwidth centered on IF carrier */
392 PHY_SINGLE_CHANNEL_CENTERED = 0,
394 /* 40MHz IF bandwidth with lower 20MHz supporting the primary channel */
395 PHY_DOUBLE_CHANNEL_LOW_PRIMARY = 1,
397 /* 40MHz IF bandwidth centered on IF carrier */
398 PHY_DOUBLE_CHANNEL_CENTERED = 2,
400 /* 40MHz IF bandwidth with higher 20MHz supporting the primary ch */
401 PHY_DOUBLE_CHANNEL_HIGH_PRIMARY = 3,
403 /* 20/40MHZ offset LOW 40/80MHZ offset CENTERED */
404 PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED = 4,
406 /* 20/40MHZ offset CENTERED 40/80MHZ offset CENTERED */
407 PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED = 5,
409 /* 20/40MHZ offset HIGH 40/80MHZ offset CENTERED */
410 PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED = 6,
412 /* 20/40MHZ offset LOW 40/80MHZ offset LOW */
413 PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW = 7,
415 /* 20/40MHZ offset HIGH 40/80MHZ offset LOW */
416 PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW = 8,
418 /* 20/40MHZ offset LOW 40/80MHZ offset HIGH */
419 PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH = 9,
421 /* 20/40MHZ offset-HIGH 40/80MHZ offset HIGH */
422 PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH = 10,
424 PHY_CHANNEL_BONDING_STATE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
427 /* Spatial Multiplexing(SM) Power Save mode */
428 enum wcn36xx_hal_ht_mimo_state {
429 /* Static SM Power Save mode */
430 WCN36XX_HAL_HT_MIMO_PS_STATIC = 0,
432 /* Dynamic SM Power Save mode */
433 WCN36XX_HAL_HT_MIMO_PS_DYNAMIC = 1,
436 WCN36XX_HAL_HT_MIMO_PS_NA = 2,
438 /* SM Power Save disabled */
439 WCN36XX_HAL_HT_MIMO_PS_NO_LIMIT = 3,
441 WCN36XX_HAL_HT_MIMO_PS_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
444 /* each station added has a rate mode which specifies the sta attributes */
454 STA_INVALID_RATE_MODE = WCN36XX_HAL_MAX_ENUM_SIZE
458 #define WCN36XX_HAL_NUM_DSSS_RATES 4
460 /* 6,9,12,18,24,36,48,54 */
461 #define WCN36XX_HAL_NUM_OFDM_RATES 8
464 #define WCN36XX_HAL_NUM_POLARIS_RATES 3
466 #define WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET 16
468 enum wcn36xx_hal_bss_type {
469 WCN36XX_HAL_INFRASTRUCTURE_MODE,
471 /* Added for softAP support */
472 WCN36XX_HAL_INFRA_AP_MODE,
474 WCN36XX_HAL_IBSS_MODE,
476 /* Added for BT-AMP support */
477 WCN36XX_HAL_BTAMP_STA_MODE,
479 /* Added for BT-AMP support */
480 WCN36XX_HAL_BTAMP_AP_MODE,
482 WCN36XX_HAL_AUTO_MODE,
484 WCN36XX_HAL_DONOT_USE_BSS_TYPE = WCN36XX_HAL_MAX_ENUM_SIZE
487 enum wcn36xx_hal_nw_type {
488 WCN36XX_HAL_11A_NW_TYPE,
489 WCN36XX_HAL_11B_NW_TYPE,
490 WCN36XX_HAL_11G_NW_TYPE,
491 WCN36XX_HAL_11N_NW_TYPE,
492 WCN36XX_HAL_DONOT_USE_NW_TYPE = WCN36XX_HAL_MAX_ENUM_SIZE
495 #define WCN36XX_HAL_MAC_RATESET_EID_MAX 12
497 enum wcn36xx_hal_ht_operating_mode {
499 WCN36XX_HAL_HT_OP_MODE_PURE,
501 /* Overlap Legacy device present, protection is optional */
502 WCN36XX_HAL_HT_OP_MODE_OVERLAP_LEGACY,
504 /* No legacy device, but 20 MHz HT present */
505 WCN36XX_HAL_HT_OP_MODE_NO_LEGACY_20MHZ_HT,
507 /* Protection is required */
508 WCN36XX_HAL_HT_OP_MODE_MIXED,
510 WCN36XX_HAL_HT_OP_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
513 /* Encryption type enum used with peer */
516 WCN36XX_HAL_ED_WEP40,
517 WCN36XX_HAL_ED_WEP104,
521 WCN36XX_HAL_ED_AES_128_CMAC,
522 WCN36XX_HAL_ED_NOT_IMPLEMENTED = WCN36XX_HAL_MAX_ENUM_SIZE
525 #define WLAN_MAX_KEY_RSC_LEN 16
526 #define WLAN_WAPI_KEY_RSC_LEN 16
528 /* MAX key length when ULA is used */
529 #define WCN36XX_HAL_MAC_MAX_KEY_LENGTH 32
530 #define WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS 4
533 * Enum to specify whether key is used for TX only, RX only or both.
535 enum ani_key_direction {
539 WCN36XX_HAL_TX_DEFAULT,
540 WCN36XX_HAL_DONOT_USE_KEY_DIRECTION = WCN36XX_HAL_MAX_ENUM_SIZE
544 WCN36XX_HAL_WEP_STATIC,
545 WCN36XX_HAL_WEP_DYNAMIC,
546 WCN36XX_HAL_WEP_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
549 enum wcn36xx_hal_link_state {
551 WCN36XX_HAL_LINK_IDLE_STATE = 0,
552 WCN36XX_HAL_LINK_PREASSOC_STATE = 1,
553 WCN36XX_HAL_LINK_POSTASSOC_STATE = 2,
554 WCN36XX_HAL_LINK_AP_STATE = 3,
555 WCN36XX_HAL_LINK_IBSS_STATE = 4,
558 WCN36XX_HAL_LINK_BTAMP_PREASSOC_STATE = 5,
559 WCN36XX_HAL_LINK_BTAMP_POSTASSOC_STATE = 6,
560 WCN36XX_HAL_LINK_BTAMP_AP_STATE = 7,
561 WCN36XX_HAL_LINK_BTAMP_STA_STATE = 8,
563 /* Reserved for HAL Internal Use */
564 WCN36XX_HAL_LINK_LEARN_STATE = 9,
565 WCN36XX_HAL_LINK_SCAN_STATE = 10,
566 WCN36XX_HAL_LINK_FINISH_SCAN_STATE = 11,
567 WCN36XX_HAL_LINK_INIT_CAL_STATE = 12,
568 WCN36XX_HAL_LINK_FINISH_CAL_STATE = 13,
569 WCN36XX_HAL_LINK_LISTEN_STATE = 14,
571 WCN36XX_HAL_LINK_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
574 enum wcn36xx_hal_stats_mask {
575 HAL_SUMMARY_STATS_INFO = 0x00000001,
576 HAL_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
577 HAL_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
578 HAL_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
579 HAL_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
580 HAL_PER_STA_STATS_INFO = 0x00000020
583 /* BT-AMP events type */
584 enum bt_amp_event_type {
585 BTAMP_EVENT_CONNECTION_START,
586 BTAMP_EVENT_CONNECTION_STOP,
587 BTAMP_EVENT_CONNECTION_TERMINATED,
589 /* This and beyond are invalid values */
590 BTAMP_EVENT_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
595 PE_SUMMARY_STATS_INFO = 0x00000001,
596 PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
597 PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
598 PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
599 PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
600 PE_PER_STA_STATS_INFO = 0x00000020,
602 /* This and beyond are invalid values */
603 PE_STATS_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
607 * Configuration Parameter IDs
609 #define WCN36XX_HAL_CFG_STA_ID 0
610 #define WCN36XX_HAL_CFG_CURRENT_TX_ANTENNA 1
611 #define WCN36XX_HAL_CFG_CURRENT_RX_ANTENNA 2
612 #define WCN36XX_HAL_CFG_LOW_GAIN_OVERRIDE 3
613 #define WCN36XX_HAL_CFG_POWER_STATE_PER_CHAIN 4
614 #define WCN36XX_HAL_CFG_CAL_PERIOD 5
615 #define WCN36XX_HAL_CFG_CAL_CONTROL 6
616 #define WCN36XX_HAL_CFG_PROXIMITY 7
617 #define WCN36XX_HAL_CFG_NETWORK_DENSITY 8
618 #define WCN36XX_HAL_CFG_MAX_MEDIUM_TIME 9
619 #define WCN36XX_HAL_CFG_MAX_MPDUS_IN_AMPDU 10
620 #define WCN36XX_HAL_CFG_RTS_THRESHOLD 11
621 #define WCN36XX_HAL_CFG_SHORT_RETRY_LIMIT 12
622 #define WCN36XX_HAL_CFG_LONG_RETRY_LIMIT 13
623 #define WCN36XX_HAL_CFG_FRAGMENTATION_THRESHOLD 14
624 #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_ZERO 15
625 #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_ONE 16
626 #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_TWO 17
627 #define WCN36XX_HAL_CFG_FIXED_RATE 18
628 #define WCN36XX_HAL_CFG_RETRYRATE_POLICY 19
629 #define WCN36XX_HAL_CFG_RETRYRATE_SECONDARY 20
630 #define WCN36XX_HAL_CFG_RETRYRATE_TERTIARY 21
631 #define WCN36XX_HAL_CFG_FORCE_POLICY_PROTECTION 22
632 #define WCN36XX_HAL_CFG_FIXED_RATE_MULTICAST_24GHZ 23
633 #define WCN36XX_HAL_CFG_FIXED_RATE_MULTICAST_5GHZ 24
634 #define WCN36XX_HAL_CFG_DEFAULT_RATE_INDEX_24GHZ 25
635 #define WCN36XX_HAL_CFG_DEFAULT_RATE_INDEX_5GHZ 26
636 #define WCN36XX_HAL_CFG_MAX_BA_SESSIONS 27
637 #define WCN36XX_HAL_CFG_PS_DATA_INACTIVITY_TIMEOUT 28
638 #define WCN36XX_HAL_CFG_PS_ENABLE_BCN_FILTER 29
639 #define WCN36XX_HAL_CFG_PS_ENABLE_RSSI_MONITOR 30
640 #define WCN36XX_HAL_CFG_NUM_BEACON_PER_RSSI_AVERAGE 31
641 #define WCN36XX_HAL_CFG_STATS_PERIOD 32
642 #define WCN36XX_HAL_CFG_CFP_MAX_DURATION 33
643 #define WCN36XX_HAL_CFG_FRAME_TRANS_ENABLED 34
644 #define WCN36XX_HAL_CFG_DTIM_PERIOD 35
645 #define WCN36XX_HAL_CFG_EDCA_WMM_ACBK 36
646 #define WCN36XX_HAL_CFG_EDCA_WMM_ACBE 37
647 #define WCN36XX_HAL_CFG_EDCA_WMM_ACVO 38
648 #define WCN36XX_HAL_CFG_EDCA_WMM_ACVI 39
649 #define WCN36XX_HAL_CFG_BA_THRESHOLD_HIGH 40
650 #define WCN36XX_HAL_CFG_MAX_BA_BUFFERS 41
651 #define WCN36XX_HAL_CFG_RPE_POLLING_THRESHOLD 42
652 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG 43
653 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG 44
654 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG 45
655 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG 46
656 #define WCN36XX_HAL_CFG_NO_OF_ONCHIP_REORDER_SESSIONS 47
657 #define WCN36XX_HAL_CFG_PS_LISTEN_INTERVAL 48
658 #define WCN36XX_HAL_CFG_PS_HEART_BEAT_THRESHOLD 49
659 #define WCN36XX_HAL_CFG_PS_NTH_BEACON_FILTER 50
660 #define WCN36XX_HAL_CFG_PS_MAX_PS_POLL 51
661 #define WCN36XX_HAL_CFG_PS_MIN_RSSI_THRESHOLD 52
662 #define WCN36XX_HAL_CFG_PS_RSSI_FILTER_PERIOD 53
663 #define WCN36XX_HAL_CFG_PS_BROADCAST_FRAME_FILTER_ENABLE 54
664 #define WCN36XX_HAL_CFG_PS_IGNORE_DTIM 55
665 #define WCN36XX_HAL_CFG_PS_ENABLE_BCN_EARLY_TERM 56
666 #define WCN36XX_HAL_CFG_DYNAMIC_PS_POLL_VALUE 57
667 #define WCN36XX_HAL_CFG_PS_NULLDATA_AP_RESP_TIMEOUT 58
668 #define WCN36XX_HAL_CFG_TELE_BCN_WAKEUP_EN 59
669 #define WCN36XX_HAL_CFG_TELE_BCN_TRANS_LI 60
670 #define WCN36XX_HAL_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS 61
671 #define WCN36XX_HAL_CFG_TELE_BCN_MAX_LI 62
672 #define WCN36XX_HAL_CFG_TELE_BCN_MAX_LI_IDLE_BCNS 63
673 #define WCN36XX_HAL_CFG_TX_PWR_CTRL_ENABLE 64
674 #define WCN36XX_HAL_CFG_VALID_RADAR_CHANNEL_LIST 65
675 #define WCN36XX_HAL_CFG_TX_POWER_24_20 66
676 #define WCN36XX_HAL_CFG_TX_POWER_24_40 67
677 #define WCN36XX_HAL_CFG_TX_POWER_50_20 68
678 #define WCN36XX_HAL_CFG_TX_POWER_50_40 69
679 #define WCN36XX_HAL_CFG_MCAST_BCAST_FILTER_SETTING 70
680 #define WCN36XX_HAL_CFG_BCN_EARLY_TERM_WAKEUP_INTERVAL 71
681 #define WCN36XX_HAL_CFG_MAX_TX_POWER_2_4 72
682 #define WCN36XX_HAL_CFG_MAX_TX_POWER_5 73
683 #define WCN36XX_HAL_CFG_INFRA_STA_KEEP_ALIVE_PERIOD 74
684 #define WCN36XX_HAL_CFG_ENABLE_CLOSE_LOOP 75
685 #define WCN36XX_HAL_CFG_BTC_EXECUTION_MODE 76
686 #define WCN36XX_HAL_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK 77
687 #define WCN36XX_HAL_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS 78
688 #define WCN36XX_HAL_CFG_PS_TX_INACTIVITY_TIMEOUT 79
689 #define WCN36XX_HAL_CFG_WCNSS_API_VERSION 80
690 #define WCN36XX_HAL_CFG_AP_KEEPALIVE_TIMEOUT 81
691 #define WCN36XX_HAL_CFG_GO_KEEPALIVE_TIMEOUT 82
692 #define WCN36XX_HAL_CFG_ENABLE_MC_ADDR_LIST 83
693 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_INQ_BT 84
694 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_PAGE_BT 85
695 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_CONN_BT 86
696 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_LE_BT 87
697 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_INQ_WLAN 88
698 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_PAGE_WLAN 89
699 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_CONN_WLAN 90
700 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_LE_WLAN 91
701 #define WCN36XX_HAL_CFG_BTC_DYN_MAX_LEN_BT 92
702 #define WCN36XX_HAL_CFG_BTC_DYN_MAX_LEN_WLAN 93
703 #define WCN36XX_HAL_CFG_BTC_MAX_SCO_BLOCK_PERC 94
704 #define WCN36XX_HAL_CFG_BTC_DHCP_PROT_ON_A2DP 95
705 #define WCN36XX_HAL_CFG_BTC_DHCP_PROT_ON_SCO 96
706 #define WCN36XX_HAL_CFG_ENABLE_UNICAST_FILTER 97
707 #define WCN36XX_HAL_CFG_MAX_ASSOC_LIMIT 98
708 #define WCN36XX_HAL_CFG_ENABLE_LPWR_IMG_TRANSITION 99
709 #define WCN36XX_HAL_CFG_ENABLE_MCC_ADAPTIVE_SCHEDULER 100
710 #define WCN36XX_HAL_CFG_ENABLE_DETECT_PS_SUPPORT 101
711 #define WCN36XX_HAL_CFG_AP_LINK_MONITOR_TIMEOUT 102
712 #define WCN36XX_HAL_CFG_BTC_DWELL_TIME_MULTIPLIER 103
713 #define WCN36XX_HAL_CFG_ENABLE_TDLS_OXYGEN_MODE 104
714 #define WCN36XX_HAL_CFG_MAX_PARAMS 105
716 /* Message definitons - All the messages below need to be packed */
718 /* Definition for HAL API Version. */
719 struct wcnss_wlan_version {
726 /* Definition for Encryption Keys */
727 struct wcn36xx_hal_keys {
730 /* 0 for multicast */
733 enum ani_key_direction direction;
735 /* Usage is unknown */
736 u8 rsc[WLAN_MAX_KEY_RSC_LEN];
738 /* =1 for authenticator,=0 for supplicant */
742 u8 key[WCN36XX_HAL_MAC_MAX_KEY_LENGTH];
746 * set_sta_key_params Moving here since it is shared by
747 * configbss/setstakey msgs
749 struct wcn36xx_hal_set_sta_key_params {
753 /* Encryption Type used with peer */
754 enum ani_ed_type enc_type;
756 /* STATIC/DYNAMIC - valid only for WEP */
757 enum ani_wep_type wep_type;
759 /* Default WEP key, valid only for static WEP, must between 0 and 3. */
762 /* valid only for non-static WEP encyrptions */
763 struct wcn36xx_hal_keys key[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS];
766 * Control for Replay Count, 1= Single TID based replay count on Tx
767 * 0 = Per TID based replay count on TX
773 /* 4-byte control message header used by HAL*/
774 struct wcn36xx_hal_msg_header {
775 enum wcn36xx_hal_host_msg_type msg_type:16;
776 enum wcn36xx_hal_host_msg_version msg_version:16;
780 /* Config format required by HAL for each CFG item*/
781 struct wcn36xx_hal_cfg {
782 /* Cfg Id. The Id required by HAL is exported by HAL
783 * in shared header file between UMAC and HAL.*/
786 /* Length of the Cfg. This parameter is used to go to next cfg
787 * in the TLV format.*/
790 /* Padding bytes for unaligned address's */
793 /* Reserve bytes for making cfgVal to align address */
796 /* Following the uCfgLen field there should be a 'uCfgLen' bytes
797 * containing the uCfgValue ; u8 uCfgValue[uCfgLen] */
800 struct wcn36xx_hal_mac_start_parameters {
801 /* Drive Type - Production or FTM etc */
802 enum driver_type type;
804 /* Length of the config buffer */
807 /* Following this there is a TLV formatted buffer of length
808 * "len" bytes containing all config values.
809 * The TLV is expected to be formatted like this:
810 * 0 15 31 31+CFG_LEN-1 length-1
811 * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......|
815 struct wcn36xx_hal_mac_start_req_msg {
816 /* config buffer must start in TLV format just here */
817 struct wcn36xx_hal_msg_header header;
818 struct wcn36xx_hal_mac_start_parameters params;
821 struct wcn36xx_hal_mac_start_rsp_params {
822 /* success or failure */
825 /* Max number of STA supported by the device */
828 /* Max number of BSS supported by the device */
832 struct wcnss_wlan_version version;
834 /* CRM build information */
835 u8 crm_version[WCN36XX_HAL_VERSION_LENGTH];
837 /* hardware/chipset/misc version information */
838 u8 wlan_version[WCN36XX_HAL_VERSION_LENGTH];
842 struct wcn36xx_hal_mac_start_rsp_msg {
843 struct wcn36xx_hal_msg_header header;
844 struct wcn36xx_hal_mac_start_rsp_params start_rsp_params;
847 struct wcn36xx_hal_mac_stop_req_params {
848 /* The reason for which the device is being stopped */
849 enum wcn36xx_hal_stop_type reason;
853 struct wcn36xx_hal_mac_stop_req_msg {
854 struct wcn36xx_hal_msg_header header;
855 struct wcn36xx_hal_mac_stop_req_params stop_req_params;
858 struct wcn36xx_hal_mac_stop_rsp_msg {
859 struct wcn36xx_hal_msg_header header;
861 /* success or failure */
865 struct wcn36xx_hal_update_cfg_req_msg {
867 * Note: The length specified in tHalUpdateCfgReqMsg messages should be
868 * header.msgLen = sizeof(tHalUpdateCfgReqMsg) + uConfigBufferLen
870 struct wcn36xx_hal_msg_header header;
872 /* Length of the config buffer. Allows UMAC to update multiple CFGs */
876 * Following this there is a TLV formatted buffer of length
877 * "uConfigBufferLen" bytes containing all config values.
878 * The TLV is expected to be formatted like this:
879 * 0 15 31 31+CFG_LEN-1 length-1
880 * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......|
885 struct wcn36xx_hal_update_cfg_rsp_msg {
886 struct wcn36xx_hal_msg_header header;
888 /* success or failure */
893 /* Frame control field format (2 bytes) */
894 struct wcn36xx_hal_mac_frame_ctl {
896 #ifndef ANI_LITTLE_BIT_ENDIAN
930 /* Sequence control field */
931 struct wcn36xx_hal_mac_seq_ctl {
937 /* Management header format */
938 struct wcn36xx_hal_mac_mgmt_hdr {
939 struct wcn36xx_hal_mac_frame_ctl fc;
945 struct wcn36xx_hal_mac_seq_ctl seqControl;
948 /* FIXME: pronto v1 apparently has 4 */
949 #define WCN36XX_HAL_NUM_BSSID 2
951 /* Scan Entry to hold active BSS idx's */
952 struct wcn36xx_hal_scan_entry {
953 u8 bss_index[WCN36XX_HAL_NUM_BSSID];
957 struct wcn36xx_hal_init_scan_req_msg {
958 struct wcn36xx_hal_msg_header header;
962 enum wcn36xx_hal_sys_mode mode;
964 /* BSSID of the BSS */
967 /* Whether BSS needs to be notified */
970 /* Kind of frame to be used for notifying the BSS (Data Null, QoS
971 * Null, or CTS to Self). Must always be a valid frame type. */
974 /* UMAC has the option of passing the MAC frame to be used for
975 * notifying the BSS. If non-zero, HAL will use the MAC frame
976 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
977 * appropriate MAC frame based on frameType. */
980 /* Following the framelength there is a MAC frame buffer if
981 * frameLength is non-zero. */
982 struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
984 /* Entry to hold number of active BSS idx's */
985 struct wcn36xx_hal_scan_entry scan_entry;
988 struct wcn36xx_hal_init_scan_con_req_msg {
989 struct wcn36xx_hal_msg_header header;
993 enum wcn36xx_hal_sys_mode mode;
995 /* BSSID of the BSS */
998 /* Whether BSS needs to be notified */
1001 /* Kind of frame to be used for notifying the BSS (Data Null, QoS
1002 * Null, or CTS to Self). Must always be a valid frame type. */
1005 /* UMAC has the option of passing the MAC frame to be used for
1006 * notifying the BSS. If non-zero, HAL will use the MAC frame
1007 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
1008 * appropriate MAC frame based on frameType. */
1011 /* Following the framelength there is a MAC frame buffer if
1012 * frameLength is non-zero. */
1013 struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
1015 /* Entry to hold number of active BSS idx's */
1016 struct wcn36xx_hal_scan_entry scan_entry;
1018 /* Single NoA usage in Scanning */
1021 /* Indicates the scan duration (in ms) */
1026 struct wcn36xx_hal_init_scan_rsp_msg {
1027 struct wcn36xx_hal_msg_header header;
1029 /* success or failure */
1034 struct wcn36xx_hal_start_scan_req_msg {
1035 struct wcn36xx_hal_msg_header header;
1037 /* Indicates the channel to scan */
1041 struct wcn36xx_hal_start_rsp_msg {
1042 struct wcn36xx_hal_msg_header header;
1044 /* success or failure */
1052 struct wcn36xx_hal_end_scan_req_msg {
1053 struct wcn36xx_hal_msg_header header;
1055 /* Indicates the channel to stop scanning. Not used really. But
1056 * retained for symmetry with "start Scan" message. It can also
1057 * help in error check if needed. */
1061 struct wcn36xx_hal_end_scan_rsp_msg {
1062 struct wcn36xx_hal_msg_header header;
1064 /* success or failure */
1068 struct wcn36xx_hal_finish_scan_req_msg {
1069 struct wcn36xx_hal_msg_header header;
1071 /* Identifies the operational state of the AP/STA
1072 * LEARN - AP Role SCAN - STA Role */
1073 enum wcn36xx_hal_sys_mode mode;
1075 /* Operating channel to tune to. */
1078 /* Channel Bonding state If 20/40 MHz is operational, this will
1079 * indicate the 40 MHz extension channel in combination with the
1080 * control channel */
1081 enum phy_chan_bond_state cb_state;
1083 /* BSSID of the BSS */
1086 /* Whether BSS needs to be notified */
1089 /* Kind of frame to be used for notifying the BSS (Data Null, QoS
1090 * Null, or CTS to Self). Must always be a valid frame type. */
1093 /* UMAC has the option of passing the MAC frame to be used for
1094 * notifying the BSS. If non-zero, HAL will use the MAC frame
1095 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
1096 * appropriate MAC frame based on frameType. */
1099 /* Following the framelength there is a MAC frame buffer if
1100 * frameLength is non-zero. */
1101 struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
1103 /* Entry to hold number of active BSS idx's */
1104 struct wcn36xx_hal_scan_entry scan_entry;
1108 struct wcn36xx_hal_finish_scan_rsp_msg {
1109 struct wcn36xx_hal_msg_header header;
1111 /* success or failure */
1116 enum wcn36xx_hal_rate_index {
1117 HW_RATE_INDEX_1MBPS = 0x82,
1118 HW_RATE_INDEX_2MBPS = 0x84,
1119 HW_RATE_INDEX_5_5MBPS = 0x8B,
1120 HW_RATE_INDEX_6MBPS = 0x0C,
1121 HW_RATE_INDEX_9MBPS = 0x12,
1122 HW_RATE_INDEX_11MBPS = 0x96,
1123 HW_RATE_INDEX_12MBPS = 0x18,
1124 HW_RATE_INDEX_18MBPS = 0x24,
1125 HW_RATE_INDEX_24MBPS = 0x30,
1126 HW_RATE_INDEX_36MBPS = 0x48,
1127 HW_RATE_INDEX_48MBPS = 0x60,
1128 HW_RATE_INDEX_54MBPS = 0x6C
1131 struct wcn36xx_hal_supported_rates {
1133 * For Self STA Entry: this represents Self Mode.
1134 * For Peer Stations, this represents the mode of the peer.
1137 * --this mode is updated when PE adds the Self Entry.
1139 * -- OR when PE sends 'ADD_BSS' message and station context in BSS
1140 * is used to indicate the mode of the AP.
1144 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry
1145 * for that BSS is used to indicate the self mode of the AP.
1147 * -- OR when a station is associated, PE sends 'ADD_STA' message
1148 * with this mode updated.
1151 enum sta_rate_mode op_rate_mode;
1153 /* 11b, 11a and aniLegacyRates are IE rates which gives rate in
1154 * unit of 500Kbps */
1155 u16 dsss_rates[WCN36XX_HAL_NUM_DSSS_RATES];
1156 u16 ofdm_rates[WCN36XX_HAL_NUM_OFDM_RATES];
1157 u16 legacy_rates[WCN36XX_HAL_NUM_POLARIS_RATES];
1160 /* Taurus only supports 26 Titan Rates(no ESF/concat Rates will be
1161 * supported) First 26 bits are reserved for those Titan rates and
1162 * the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are
1164 /* Titan and Taurus Rates */
1165 u32 enhanced_rate_bitmap;
1168 * 0-76 bits used, remaining reserved
1169 * bits 0-15 and 32 should be set.
1171 u8 supported_mcs_set[WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET];
1174 * RX Highest Supported Data Rate defines the highest data
1175 * rate that the STA is able to receive, in unites of 1Mbps.
1176 * This value is derived from "Supported MCS Set field" inside
1177 * the HT capability element.
1179 u16 rx_highest_data_rate;
1183 struct wcn36xx_hal_config_sta_params {
1187 /* ASSOC ID, as assigned by UMAC */
1190 /* STA entry Type: 0 - Self, 1 - Other/Peer, 2 - BSSID, 3 - BCAST */
1193 /* Short Preamble Supported. */
1194 u8 short_preamble_supported;
1196 /* MAC Address of STA */
1199 /* Listen interval of the STA */
1200 u16 listen_interval;
1202 /* Support for 11e/WMM */
1205 /* 11n HT capable STA */
1208 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1209 u8 tx_channel_width_set;
1211 /* RIFS mode 0 - NA, 1 - Allowed */
1214 /* L-SIG TXOP Protection mechanism
1215 0 - No Support, 1 - Supported
1216 SG - there is global field */
1217 u8 lsig_txop_protection;
1219 /* Max Ampdu Size supported by STA. TPE programming.
1220 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k */
1223 /* Max Ampdu density. Used by RA. 3 : 0~7 : 2^(11nAMPDUdensity -4) */
1224 u8 max_ampdu_density;
1226 /* Max AMSDU size 1 : 3839 bytes, 0 : 7935 bytes */
1229 /* Short GI support for 40Mhz packets */
1232 /* Short GI support for 20Mhz packets */
1235 /* TODO move this parameter to the end for 3680 */
1236 /* These rates are the intersection of peer and self capabilities. */
1237 struct wcn36xx_hal_supported_rates supported_rates;
1239 /* Robust Management Frame (RMF) enabled/disabled */
1242 /* The unicast encryption type in the association */
1245 /* HAL should update the existing STA entry, if this flag is set. UMAC
1246 will set this flag in case of RE-ASSOC, where we want to reuse the
1247 old STA ID. 0 = Add, 1 = Update */
1250 /* U-APSD Flags: 1b per AC. Encoded as follows:
1251 b7 b6 b5 b4 b3 b2 b1 b0 =
1252 X X X X BE BK VI VO */
1258 /* 11n Green Field preamble support
1259 0 - Not supported, 1 - Supported */
1260 u8 green_field_capable;
1262 /* MIMO Power Save mode */
1263 enum wcn36xx_hal_ht_mimo_state mimo_ps;
1265 /* Delayed BA Support */
1266 u8 delayed_ba_support;
1268 /* Max AMPDU duration in 32us */
1269 u8 max_ampdu_duration;
1271 /* HT STA should set it to 1 if it is enabled in BSS. HT STA should
1272 * set it to 0 if AP does not support it. This indication is sent
1273 * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
1275 u8 dsss_cck_mode_40mhz;
1277 /* Valid STA Idx when action=Update. Set to 0xFF when invalid!
1278 * Retained for backward compalibity with existing HAL code */
1281 /* BSSID of BSS to which station is associated. Set to 0xFF when
1282 * invalid. Retained for backward compalibity with existing HAL
1288 /* TODO add this parameter for 3680. */
1289 /* Reserved to align next field on a dword boundary */
1293 struct wcn36xx_hal_config_sta_req_msg {
1294 struct wcn36xx_hal_msg_header header;
1295 struct wcn36xx_hal_config_sta_params sta_params;
1298 struct wcn36xx_hal_config_sta_params_v1 {
1302 /* ASSOC ID, as assigned by UMAC */
1305 /* STA entry Type: 0 - Self, 1 - Other/Peer, 2 - BSSID, 3 - BCAST */
1308 /* Short Preamble Supported. */
1309 u8 short_preamble_supported;
1311 /* MAC Address of STA */
1314 /* Listen interval of the STA */
1315 u16 listen_interval;
1317 /* Support for 11e/WMM */
1320 /* 11n HT capable STA */
1323 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1324 u8 tx_channel_width_set;
1326 /* RIFS mode 0 - NA, 1 - Allowed */
1329 /* L-SIG TXOP Protection mechanism
1330 0 - No Support, 1 - Supported
1331 SG - there is global field */
1332 u8 lsig_txop_protection;
1334 /* Max Ampdu Size supported by STA. TPE programming.
1335 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k */
1338 /* Max Ampdu density. Used by RA. 3 : 0~7 : 2^(11nAMPDUdensity -4) */
1339 u8 max_ampdu_density;
1341 /* Max AMSDU size 1 : 3839 bytes, 0 : 7935 bytes */
1344 /* Short GI support for 40Mhz packets */
1347 /* Short GI support for 20Mhz packets */
1350 /* Robust Management Frame (RMF) enabled/disabled */
1353 /* The unicast encryption type in the association */
1356 /* HAL should update the existing STA entry, if this flag is set. UMAC
1357 will set this flag in case of RE-ASSOC, where we want to reuse the
1358 old STA ID. 0 = Add, 1 = Update */
1361 /* U-APSD Flags: 1b per AC. Encoded as follows:
1362 b7 b6 b5 b4 b3 b2 b1 b0 =
1363 X X X X BE BK VI VO */
1369 /* 11n Green Field preamble support
1370 0 - Not supported, 1 - Supported */
1371 u8 green_field_capable;
1373 /* MIMO Power Save mode */
1374 enum wcn36xx_hal_ht_mimo_state mimo_ps;
1376 /* Delayed BA Support */
1377 u8 delayed_ba_support;
1379 /* Max AMPDU duration in 32us */
1380 u8 max_ampdu_duration;
1382 /* HT STA should set it to 1 if it is enabled in BSS. HT STA should
1383 * set it to 0 if AP does not support it. This indication is sent
1384 * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
1386 u8 dsss_cck_mode_40mhz;
1388 /* Valid STA Idx when action=Update. Set to 0xFF when invalid!
1389 * Retained for backward compalibity with existing HAL code */
1392 /* BSSID of BSS to which station is associated. Set to 0xFF when
1393 * invalid. Retained for backward compalibity with existing HAL
1399 /* Reserved to align next field on a dword boundary */
1402 /* These rates are the intersection of peer and self capabilities. */
1403 struct wcn36xx_hal_supported_rates supported_rates;
1406 struct wcn36xx_hal_config_sta_req_msg_v1 {
1407 struct wcn36xx_hal_msg_header header;
1408 struct wcn36xx_hal_config_sta_params_v1 sta_params;
1411 struct config_sta_rsp_params {
1412 /* success or failure */
1415 /* Station index; valid only when 'status' field value SUCCESS */
1418 /* BSSID Index of BSS to which the station is associated */
1421 /* DPU Index for PTK */
1424 /* DPU Index for GTK */
1427 /* DPU Index for IGTK */
1428 u8 bcast_mgmt_dpu_idx;
1430 /* PTK DPU signature */
1433 /* GTK DPU isignature */
1436 /* IGTK DPU signature */
1443 struct wcn36xx_hal_config_sta_rsp_msg {
1444 struct wcn36xx_hal_msg_header header;
1446 struct config_sta_rsp_params params;
1449 /* Delete STA Request message */
1450 struct wcn36xx_hal_delete_sta_req_msg {
1451 struct wcn36xx_hal_msg_header header;
1453 /* Index of STA to delete */
1458 /* Delete STA Response message */
1459 struct wcn36xx_hal_delete_sta_rsp_msg {
1460 struct wcn36xx_hal_msg_header header;
1462 /* success or failure */
1465 /* Index of STA deleted */
1469 /* 12 Bytes long because this structure can be used to represent rate and
1470 * extended rate set IEs. The parser assume this to be at least 12 */
1471 struct wcn36xx_hal_rate_set {
1473 u8 rate[WCN36XX_HAL_MAC_RATESET_EID_MAX];
1476 /* access category record */
1477 struct wcn36xx_hal_aci_aifsn {
1478 #ifndef ANI_LITTLE_BIT_ENDIAN
1491 /* contention window size */
1492 struct wcn36xx_hal_mac_cw {
1493 #ifndef ANI_LITTLE_BIT_ENDIAN
1502 struct wcn36xx_hal_edca_param_record {
1503 struct wcn36xx_hal_aci_aifsn aci;
1504 struct wcn36xx_hal_mac_cw cw;
1508 struct wcn36xx_hal_mac_ssid {
1513 /* Concurrency role. These are generic IDs that identify the various roles
1514 * in the software system. */
1515 enum wcn36xx_hal_con_mode {
1516 WCN36XX_HAL_STA_MODE = 0,
1518 /* to support softAp mode . This is misleading.
1519 It means AP MODE only. */
1520 WCN36XX_HAL_STA_SAP_MODE = 1,
1522 WCN36XX_HAL_P2P_CLIENT_MODE,
1523 WCN36XX_HAL_P2P_GO_MODE,
1524 WCN36XX_HAL_MONITOR_MODE,
1527 /* This is a bit pattern to be set for each mode
1530 * bit 2 - p2p client mode
1531 * bit 3 - p2p go mode */
1532 enum wcn36xx_hal_concurrency_mode {
1536 /* to support sta, softAp mode . This means STA+AP mode */
1541 HAL_MAX_CONCURRENCY_PERSONA = 4
1544 struct wcn36xx_hal_config_bss_params {
1548 /* Self Mac Address */
1549 u8 self_mac_addr[ETH_ALEN];
1552 enum wcn36xx_hal_bss_type bss_type;
1554 /* Operational Mode: AP =0, STA = 1 */
1558 enum wcn36xx_hal_nw_type nw_type;
1560 /* Used to classify PURE_11G/11G_MIXED to program MTU */
1561 u8 short_slot_time_supported;
1563 /* Co-exist with 11a STA */
1566 /* Co-exist with 11b STA */
1569 /* Co-exist with 11g STA */
1572 /* Coexistence with 11n STA */
1575 /* Non GF coexist flag */
1576 u8 lln_non_gf_coexist;
1578 /* TXOP protection support */
1579 u8 lsig_tx_op_protection_full_support;
1584 /* Beacon Interval in TU */
1585 u16 beacon_interval;
1590 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1591 u8 tx_channel_width_set;
1593 /* Operating channel */
1596 /* Extension channel for channel bonding */
1599 /* Reserved to align next field on a dword boundary */
1602 /* TODO move sta to the end for 3680 */
1603 /* Context of the station being added in HW
1604 * Add a STA entry for "itself" -
1606 * On AP - Add the AP itself in an "STA context"
1608 * On STA - Add the AP to which this STA is joining in an
1611 struct wcn36xx_hal_config_sta_params sta;
1612 /* SSID of the BSS */
1613 struct wcn36xx_hal_mac_ssid ssid;
1615 /* HAL should update the existing BSS entry, if this flag is set.
1616 * UMAC will set this flag in case of reassoc, where we want to
1617 * resue the the old BSSID and still return success 0 = Add, 1 =
1622 struct wcn36xx_hal_rate_set rateset;
1624 /* Enable/Disable HT capabilities of the BSS */
1627 /* Enable/Disable OBSS protection */
1628 u8 obss_prot_enabled;
1630 /* RMF enabled/disabled */
1633 /* HT Operating Mode operating mode of the 802.11n STA */
1634 enum wcn36xx_hal_ht_operating_mode ht_oper_mode;
1636 /* Dual CTS Protection: 0 - Unused, 1 - Used */
1637 u8 dual_cts_protection;
1639 /* Probe Response Max retries */
1640 u8 max_probe_resp_retry_limit;
1642 /* To Enable Hidden ssid */
1645 /* To Enable Disable FW Proxy Probe Resp */
1646 u8 proxy_probe_resp;
1648 /* Boolean to indicate if EDCA params are valid. UMAC might not
1649 * have valid EDCA params or might not desire to apply EDCA params
1650 * during config BSS. 0 implies Not Valid ; Non-Zero implies
1652 u8 edca_params_valid;
1654 /* EDCA Parameters for Best Effort Access Category */
1655 struct wcn36xx_hal_edca_param_record acbe;
1657 /* EDCA Parameters forBackground Access Category */
1658 struct wcn36xx_hal_edca_param_record acbk;
1660 /* EDCA Parameters for Video Access Category */
1661 struct wcn36xx_hal_edca_param_record acvi;
1663 /* EDCA Parameters for Voice Access Category */
1664 struct wcn36xx_hal_edca_param_record acvo;
1666 /* Ext Bss Config Msg if set */
1667 u8 ext_set_sta_key_param_valid;
1669 /* SetStaKeyParams for ext bss msg */
1670 struct wcn36xx_hal_set_sta_key_params ext_set_sta_key_param;
1672 /* Persona for the BSS can be STA,AP,GO,CLIENT value same as enum
1673 * wcn36xx_hal_con_mode */
1674 u8 wcn36xx_hal_persona;
1676 u8 spectrum_mgt_enable;
1678 /* HAL fills in the tx power used for mgmt frames in txMgmtPower */
1681 /* maxTxPower has max power to be used after applying the power
1682 * constraint if any */
1686 struct wcn36xx_hal_config_bss_req_msg {
1687 struct wcn36xx_hal_msg_header header;
1688 struct wcn36xx_hal_config_bss_params bss_params;
1691 struct wcn36xx_hal_config_bss_params_v1 {
1695 /* Self Mac Address */
1696 u8 self_mac_addr[ETH_ALEN];
1699 enum wcn36xx_hal_bss_type bss_type;
1701 /* Operational Mode: AP =0, STA = 1 */
1705 enum wcn36xx_hal_nw_type nw_type;
1707 /* Used to classify PURE_11G/11G_MIXED to program MTU */
1708 u8 short_slot_time_supported;
1710 /* Co-exist with 11a STA */
1713 /* Co-exist with 11b STA */
1716 /* Co-exist with 11g STA */
1719 /* Coexistence with 11n STA */
1722 /* Non GF coexist flag */
1723 u8 lln_non_gf_coexist;
1725 /* TXOP protection support */
1726 u8 lsig_tx_op_protection_full_support;
1731 /* Beacon Interval in TU */
1732 u16 beacon_interval;
1737 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1738 u8 tx_channel_width_set;
1740 /* Operating channel */
1743 /* Extension channel for channel bonding */
1746 /* Reserved to align next field on a dword boundary */
1749 /* SSID of the BSS */
1750 struct wcn36xx_hal_mac_ssid ssid;
1752 /* HAL should update the existing BSS entry, if this flag is set.
1753 * UMAC will set this flag in case of reassoc, where we want to
1754 * resue the the old BSSID and still return success 0 = Add, 1 =
1759 struct wcn36xx_hal_rate_set rateset;
1761 /* Enable/Disable HT capabilities of the BSS */
1764 /* Enable/Disable OBSS protection */
1765 u8 obss_prot_enabled;
1767 /* RMF enabled/disabled */
1770 /* HT Operating Mode operating mode of the 802.11n STA */
1771 enum wcn36xx_hal_ht_operating_mode ht_oper_mode;
1773 /* Dual CTS Protection: 0 - Unused, 1 - Used */
1774 u8 dual_cts_protection;
1776 /* Probe Response Max retries */
1777 u8 max_probe_resp_retry_limit;
1779 /* To Enable Hidden ssid */
1782 /* To Enable Disable FW Proxy Probe Resp */
1783 u8 proxy_probe_resp;
1785 /* Boolean to indicate if EDCA params are valid. UMAC might not
1786 * have valid EDCA params or might not desire to apply EDCA params
1787 * during config BSS. 0 implies Not Valid ; Non-Zero implies
1789 u8 edca_params_valid;
1791 /* EDCA Parameters for Best Effort Access Category */
1792 struct wcn36xx_hal_edca_param_record acbe;
1794 /* EDCA Parameters forBackground Access Category */
1795 struct wcn36xx_hal_edca_param_record acbk;
1797 /* EDCA Parameters for Video Access Category */
1798 struct wcn36xx_hal_edca_param_record acvi;
1800 /* EDCA Parameters for Voice Access Category */
1801 struct wcn36xx_hal_edca_param_record acvo;
1803 /* Ext Bss Config Msg if set */
1804 u8 ext_set_sta_key_param_valid;
1806 /* SetStaKeyParams for ext bss msg */
1807 struct wcn36xx_hal_set_sta_key_params ext_set_sta_key_param;
1809 /* Persona for the BSS can be STA,AP,GO,CLIENT value same as enum
1810 * wcn36xx_hal_con_mode */
1811 u8 wcn36xx_hal_persona;
1813 u8 spectrum_mgt_enable;
1815 /* HAL fills in the tx power used for mgmt frames in txMgmtPower */
1818 /* maxTxPower has max power to be used after applying the power
1819 * constraint if any */
1822 /* Context of the station being added in HW
1823 * Add a STA entry for "itself" -
1825 * On AP - Add the AP itself in an "STA context"
1827 * On STA - Add the AP to which this STA is joining in an
1830 struct wcn36xx_hal_config_sta_params_v1 sta;
1833 struct wcn36xx_hal_config_bss_req_msg_v1 {
1834 struct wcn36xx_hal_msg_header header;
1835 struct wcn36xx_hal_config_bss_params_v1 bss_params;
1838 struct wcn36xx_hal_config_bss_rsp_params {
1839 /* Success or Failure */
1842 /* BSS index allocated by HAL */
1845 /* DPU descriptor index for PTK */
1848 /* PTK DPU signature */
1849 u8 ucast_dpu_signature;
1851 /* DPU descriptor index for GTK */
1852 u8 bcast_dpu_desc_indx;
1854 /* GTK DPU signature */
1855 u8 bcast_dpu_signature;
1857 /* DPU descriptor for IGTK */
1858 u8 mgmt_dpu_desc_index;
1860 /* IGTK DPU signature */
1861 u8 mgmt_dpu_signature;
1863 /* Station Index for BSS entry */
1866 /* Self station index for this BSS */
1867 u8 bss_self_sta_index;
1869 /* Bcast station for buffering bcast frames in AP role */
1870 u8 bss_bcast_sta_idx;
1872 /* MAC Address of STA(PEER/SELF) in staContext of configBSSReq */
1875 /* HAL fills in the tx power used for mgmt frames in this field. */
1880 struct wcn36xx_hal_config_bss_rsp_msg {
1881 struct wcn36xx_hal_msg_header header;
1882 struct wcn36xx_hal_config_bss_rsp_params bss_rsp_params;
1885 struct wcn36xx_hal_delete_bss_req_msg {
1886 struct wcn36xx_hal_msg_header header;
1888 /* BSS index to be deleted */
1893 struct wcn36xx_hal_delete_bss_rsp_msg {
1894 struct wcn36xx_hal_msg_header header;
1896 /* Success or Failure */
1899 /* BSS index that has been deleted */
1904 struct wcn36xx_hal_join_req_msg {
1905 struct wcn36xx_hal_msg_header header;
1907 /* Indicates the BSSID to which STA is going to associate */
1910 /* Indicates the channel to switch to. */
1914 u8 self_sta_mac_addr[ETH_ALEN];
1916 /* Local power constraint */
1917 u8 local_power_constraint;
1919 /* Secondary channel offset */
1920 enum phy_chan_bond_state secondary_channel_offset;
1923 enum wcn36xx_hal_link_state link_state;
1929 struct wcn36xx_hal_join_rsp_msg {
1930 struct wcn36xx_hal_msg_header header;
1932 /* success or failure */
1935 /* HAL fills in the tx power used for mgmt frames in this field */
1939 struct post_assoc_req_msg {
1940 struct wcn36xx_hal_msg_header header;
1942 struct wcn36xx_hal_config_sta_params sta_params;
1943 struct wcn36xx_hal_config_bss_params bss_params;
1946 struct post_assoc_rsp_msg {
1947 struct wcn36xx_hal_msg_header header;
1948 struct config_sta_rsp_params sta_rsp_params;
1949 struct wcn36xx_hal_config_bss_rsp_params bss_rsp_params;
1952 /* This is used to create a set of WEP keys for a given BSS. */
1953 struct wcn36xx_hal_set_bss_key_req_msg {
1954 struct wcn36xx_hal_msg_header header;
1956 /* BSS Index of the BSS */
1959 /* Encryption Type used with peer */
1960 enum ani_ed_type enc_type;
1962 /* Number of keys */
1965 /* Array of keys. */
1966 struct wcn36xx_hal_keys keys[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS];
1968 /* Control for Replay Count, 1= Single TID based replay count on Tx
1969 * 0 = Per TID based replay count on TX */
1973 /* tagged version of set bss key */
1974 struct wcn36xx_hal_set_bss_key_req_msg_tagged {
1975 struct wcn36xx_hal_set_bss_key_req_msg Msg;
1979 struct wcn36xx_hal_set_bss_key_rsp_msg {
1980 struct wcn36xx_hal_msg_header header;
1982 /* success or failure */
1987 * This is used configure the key information on a given station.
1988 * When the sec_type is WEP40 or WEP104, the def_wep_idx is used to locate
1989 * a preconfigured key from a BSS the station assoicated with; otherwise
1990 * a new key descriptor is created based on the key field.
1992 struct wcn36xx_hal_set_sta_key_req_msg {
1993 struct wcn36xx_hal_msg_header header;
1994 struct wcn36xx_hal_set_sta_key_params set_sta_key_params;
1997 struct wcn36xx_hal_set_sta_key_rsp_msg {
1998 struct wcn36xx_hal_msg_header header;
2000 /* success or failure */
2004 struct wcn36xx_hal_remove_bss_key_req_msg {
2005 struct wcn36xx_hal_msg_header header;
2007 /* BSS Index of the BSS */
2010 /* Encryption Type used with peer */
2011 enum ani_ed_type enc_type;
2016 /* STATIC/DYNAMIC. Used in Nullifying in Key Descriptors for
2017 * Static/Dynamic keys */
2018 enum ani_wep_type wep_type;
2021 struct wcn36xx_hal_remove_bss_key_rsp_msg {
2022 struct wcn36xx_hal_msg_header header;
2024 /* success or failure */
2029 * This is used by PE to Remove the key information on a given station.
2031 struct wcn36xx_hal_remove_sta_key_req_msg {
2032 struct wcn36xx_hal_msg_header header;
2037 /* Encryption Type used with peer */
2038 enum ani_ed_type enc_type;
2043 /* Whether to invalidate the Broadcast key or Unicast key. In case
2044 * of WEP, the same key is used for both broadcast and unicast. */
2049 struct wcn36xx_hal_remove_sta_key_rsp_msg {
2050 struct wcn36xx_hal_msg_header header;
2052 /*success or failure */
2057 #ifdef FEATURE_OEM_DATA_SUPPORT
2059 #ifndef OEM_DATA_REQ_SIZE
2060 #define OEM_DATA_REQ_SIZE 134
2063 #ifndef OEM_DATA_RSP_SIZE
2064 #define OEM_DATA_RSP_SIZE 1968
2067 struct start_oem_data_req_msg {
2068 struct wcn36xx_hal_msg_header header;
2071 tSirMacAddr self_mac_addr;
2072 u8 oem_data_req[OEM_DATA_REQ_SIZE];
2076 struct start_oem_data_rsp_msg {
2077 struct wcn36xx_hal_msg_header header;
2079 u8 oem_data_rsp[OEM_DATA_RSP_SIZE];
2084 struct wcn36xx_hal_switch_channel_req_msg {
2085 struct wcn36xx_hal_msg_header header;
2087 /* Channel number */
2090 /* Local power constraint */
2091 u8 local_power_constraint;
2093 /* Secondary channel offset */
2094 enum phy_chan_bond_state secondary_channel_offset;
2096 /* HAL fills in the tx power used for mgmt frames in this field. */
2103 u8 self_sta_mac_addr[ETH_ALEN];
2105 /* VO WIFI comment: BSSID needed to identify session. As the
2106 * request has power constraints, this should be applied only to
2107 * that session Since MTU timing and EDCA are sessionized, this
2108 * struct needs to be sessionized and bssid needs to be out of the
2109 * VOWifi feature flag V IMP: Keep bssId field at the end of this
2110 * msg. It is used to mantain backward compatbility by way of
2111 * ignoring if using new host/old FW or old host/new FW since it is
2112 * at the end of this struct
2117 struct wcn36xx_hal_switch_channel_rsp_msg {
2118 struct wcn36xx_hal_msg_header header;
2123 /* Channel number - same as in request */
2126 /* HAL fills in the tx power used for mgmt frames in this field */
2129 /* BSSID needed to identify session - same as in request */
2134 struct update_edca_params_req_msg {
2135 struct wcn36xx_hal_msg_header header;
2141 struct wcn36xx_hal_edca_param_record acbe;
2144 struct wcn36xx_hal_edca_param_record acbk;
2147 struct wcn36xx_hal_edca_param_record acvi;
2150 struct wcn36xx_hal_edca_param_record acvo;
2153 struct update_edca_params_rsp_msg {
2154 struct wcn36xx_hal_msg_header header;
2156 /* success or failure */
2160 struct dpu_stats_params {
2161 /* Index of STA to which the statistics */
2164 /* Encryption mode */
2177 u16 un_decryptable_cnt;
2178 u32 decrypt_err_cnt;
2182 struct wcn36xx_hal_stats_req_msg {
2183 struct wcn36xx_hal_msg_header header;
2185 /* Valid STA Idx for per STA stats request */
2188 /* Categories of stats requested as specified in eHalStatsMask */
2192 struct ani_summary_stats_info {
2193 /* Total number of packets(per AC) that were successfully
2194 * transmitted with retries */
2197 /* The number of MSDU packets and MMPDU frames per AC that the
2198 * 802.11 station successfully transmitted after more than one
2199 * retransmission attempt */
2200 u32 multiple_retry_cnt[4];
2202 /* Total number of packets(per AC) that were successfully
2203 * transmitted (with and without retries, including multi-cast,
2207 /* Total number of packets that were successfully received (after
2208 * appropriate filter rules including multi-cast, broadcast) */
2211 /* Total number of duplicate frames received successfully */
2214 /* Total number packets(per AC) failed to transmit */
2217 /* Total number of RTS/CTS sequence failures for transmission of a
2221 /* Total number packets failed transmit because of no ACK from the
2225 /* Total number of RTS/CTS sequence success for transmission of a
2229 /* The sum of the receive error count and dropped-receive-buffer
2230 * error count. HAL will provide this as a sum of (FCS error) +
2231 * (Fail get BD/PDU in HW) */
2235 * The receive error count. HAL will provide the RxP FCS error
2236 * global counter. */
2239 /* The sum of the transmit-directed byte count, transmit-multicast
2240 * byte count and transmit-broadcast byte count. HAL will sum TPE
2241 * UC/MC/BCAST global counters to provide this. */
2245 /* defines tx_rate_flags */
2248 HAL_TX_RATE_LEGACY = 0x1,
2251 HAL_TX_RATE_HT20 = 0x2,
2254 HAL_TX_RATE_HT40 = 0x4,
2256 /* Rate with Short guard interval */
2257 HAL_TX_RATE_SGI = 0x8,
2259 /* Rate with Long guard interval */
2260 HAL_TX_RATE_LGI = 0x10
2263 struct ani_global_class_a_stats_info {
2264 /* The number of MPDU frames received by the 802.11 station for
2265 * MSDU packets or MMPDU frames */
2268 /* The number of MPDU frames received by the 802.11 station for
2269 * MSDU packets or MMPDU frames when a promiscuous packet filter
2271 u32 promiscuous_rx_frag_cnt;
2273 /* The receiver input sensitivity referenced to a FER of 8% at an
2274 * MPDU length of 1024 bytes at the antenna connector. Each element
2275 * of the array shall correspond to a supported rate and the order
2276 * shall be the same as the supporteRates parameter. */
2277 u32 rx_input_sensitivity;
2279 /* The maximum transmit power in dBm upto one decimal. for eg: if
2280 * it is 10.5dBm, the value would be 105 */
2283 /* Number of times the receiver failed to synchronize with the
2284 * incoming signal after detecting the sync in the preamble of the
2285 * transmitted PLCP protocol data unit. */
2288 /* Legacy transmit rate, in units of 500 kbit/sec, for the most
2289 * recently transmitted frame */
2292 /* mcs index for HT20 and HT40 rates */
2295 /* to differentiate between HT20 and HT40 rates; short and long
2300 struct ani_global_security_stats {
2301 /* The number of unencrypted received MPDU frames that the MAC
2302 * layer discarded when the IEEE 802.11 dot11ExcludeUnencrypted
2303 * management information base (MIB) object is enabled */
2304 u32 rx_wep_unencrypted_frm_cnt;
2306 /* The number of received MSDU packets that that the 802.11 station
2307 * discarded because of MIC failures */
2308 u32 rx_mic_fail_cnt;
2310 /* The number of encrypted MPDU frames that the 802.11 station
2311 * failed to decrypt because of a TKIP ICV error */
2314 /* The number of received MPDU frames that the 802.11 discarded
2315 * because of an invalid AES-CCMP format */
2316 u32 aes_ccmp_format_err;
2318 /* The number of received MPDU frames that the 802.11 station
2319 * discarded because of the AES-CCMP replay protection procedure */
2320 u32 aes_ccmp_replay_cnt;
2322 /* The number of received MPDU frames that the 802.11 station
2323 * discarded because of errors detected by the AES-CCMP decryption
2325 u32 aes_ccmp_decrpt_err;
2327 /* The number of encrypted MPDU frames received for which a WEP
2328 * decryption key was not available on the 802.11 station */
2329 u32 wep_undecryptable_cnt;
2331 /* The number of encrypted MPDU frames that the 802.11 station
2332 * failed to decrypt because of a WEP ICV error */
2335 /* The number of received encrypted packets that the 802.11 station
2336 * successfully decrypted */
2337 u32 rx_decrypt_succ_cnt;
2339 /* The number of encrypted packets that the 802.11 station failed
2341 u32 rx_decrypt_fail_cnt;
2344 struct ani_global_class_b_stats_info {
2345 struct ani_global_security_stats uc_stats;
2346 struct ani_global_security_stats mc_bc_stats;
2349 struct ani_global_class_c_stats_info {
2350 /* This counter shall be incremented for a received A-MSDU frame
2351 * with the stations MAC address in the address 1 field or an
2352 * A-MSDU frame with a group address in the address 1 field */
2355 /* This counter shall be incremented when the MAC receives an AMPDU
2359 /* This counter shall be incremented when a Frame is transmitted
2360 * only on the primary channel */
2363 /* This counter shall be incremented when a Frame is received only
2364 * on the primary channel */
2367 /* This counter shall be incremented by the number of MPDUs
2368 * received in the A-MPDU when an A-MPDU is received */
2369 u32 rx_mpdu_in_ampdu_cnt;
2371 /* This counter shall be incremented when an MPDU delimiter has a
2372 * CRC error when this is the first CRC error in the received AMPDU
2373 * or when the previous delimiter has been decoded correctly */
2374 u32 ampdu_delimiter_crc_err;
2377 struct ani_per_sta_stats_info {
2378 /* The number of MPDU frames that the 802.11 station transmitted
2379 * and acknowledged through a received 802.11 ACK frame */
2382 /* This counter shall be incremented when an A-MPDU is transmitted */
2385 /* This counter shall increment by the number of MPDUs in the AMPDU
2386 * when an A-MPDU is transmitted */
2387 u32 tx_mpdu_in_ampdu_cnt;
2390 struct wcn36xx_hal_stats_rsp_msg {
2391 struct wcn36xx_hal_msg_header header;
2393 /* Success or Failure */
2399 /* Categories of STATS being returned as per eHalStatsMask */
2402 /* message type is same as the request type */
2405 /* length of the entire request, includes the pStatsBuf length too */
2409 struct wcn36xx_hal_set_link_state_req_msg {
2410 struct wcn36xx_hal_msg_header header;
2413 enum wcn36xx_hal_link_state state;
2414 u8 self_mac_addr[ETH_ALEN];
2418 struct set_link_state_rsp_msg {
2419 struct wcn36xx_hal_msg_header header;
2421 /* success or failure */
2426 struct wcn36xx_hal_ts_info_tfc {
2427 #ifndef ANI_LITTLE_BIT_ENDIAN
2448 /* Flag to schedule the traffic type */
2449 struct wcn36xx_hal_ts_info_sch {
2450 #ifndef ANI_LITTLE_BIT_ENDIAN
2459 /* Traffic and scheduling info */
2460 struct wcn36xx_hal_ts_info {
2461 struct wcn36xx_hal_ts_info_tfc traffic;
2462 struct wcn36xx_hal_ts_info_sch schedule;
2465 /* Information elements */
2466 struct wcn36xx_hal_tspec_ie {
2469 struct wcn36xx_hal_ts_info ts_info;
2472 u32 min_svc_interval;
2473 u32 max_svc_interval;
2475 u32 suspend_interval;
2487 struct add_ts_req_msg {
2488 struct wcn36xx_hal_msg_header header;
2493 /* TSPEC handler uniquely identifying a TSPEC for a STA in a BSS */
2496 /* To program TPE with required parameters */
2497 struct wcn36xx_hal_tspec_ie tspec;
2499 /* U-APSD Flags: 1b per AC. Encoded as follows:
2500 b7 b6 b5 b4 b3 b2 b1 b0 =
2501 X X X X BE BK VI VO */
2504 /* These parameters are for all the access categories */
2506 /* Service Interval */
2507 u32 service_interval[WCN36XX_HAL_MAX_AC];
2509 /* Suspend Interval */
2510 u32 suspend_interval[WCN36XX_HAL_MAX_AC];
2512 /* Delay Interval */
2513 u32 delay_interval[WCN36XX_HAL_MAX_AC];
2516 struct add_rs_rsp_msg {
2517 struct wcn36xx_hal_msg_header header;
2519 /* success or failure */
2523 struct del_ts_req_msg {
2524 struct wcn36xx_hal_msg_header header;
2529 /* TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS */
2532 /* To lookup station id using the mac address */
2536 struct del_ts_rsp_msg {
2537 struct wcn36xx_hal_msg_header header;
2539 /* success or failure */
2543 /* End of TSpec Parameters */
2545 /* Start of BLOCK ACK related Parameters */
2547 struct wcn36xx_hal_add_ba_session_req_msg {
2548 struct wcn36xx_hal_msg_header header;
2553 /* Peer MAC Address */
2554 u8 mac_addr[ETH_ALEN];
2556 /* ADDBA Action Frame dialog token
2557 HAL will not interpret this object */
2560 /* TID for which the BA is being setup
2561 This identifies the TC or TS of interest */
2564 /* 0 - Delayed BA (Not supported)
2568 /* Indicates the number of buffers for this TID (baTID)
2569 NOTE - This is the requested buffer size. When this
2570 is processed by HAL and subsequently by HDD, it is
2571 possible that HDD may change this buffer size. Any
2572 change in the buffer size should be noted by PE and
2573 advertized appropriately in the ADDBA response */
2576 /* BA timeout in TU's 0 means no timeout will occur */
2579 /* b0..b3 - Fragment Number - Always set to 0
2580 b4..b15 - Starting Sequence Number of first MSDU
2581 for which this BA is setup */
2590 struct wcn36xx_hal_add_ba_session_rsp_msg {
2591 struct wcn36xx_hal_msg_header header;
2593 /* success or failure */
2599 /* TID for which the BA session has been setup */
2602 /* BA Buffer Size allocated for the current BA session */
2607 /* Reordering Window buffer */
2610 /* Station Index to id the sta */
2613 /* Starting Sequence Number */
2617 struct wcn36xx_hal_add_ba_req_msg {
2618 struct wcn36xx_hal_msg_header header;
2623 /* Reorder Window Size */
2625 /* Old FW 1.2.2.4 does not support this*/
2626 #ifdef FEATURE_ON_CHIP_REORDERING
2627 u8 reordering_done_on_chip;
2631 struct wcn36xx_hal_add_ba_rsp_msg {
2632 struct wcn36xx_hal_msg_header header;
2634 /* success or failure */
2641 struct add_ba_info {
2643 u16 starting_seq_num:12;
2647 struct wcn36xx_hal_trigger_ba_rsp_candidate {
2648 u8 sta_addr[ETH_ALEN];
2649 struct add_ba_info ba_info[STACFG_MAX_TC];
2652 struct wcn36xx_hal_trigger_ba_req_candidate {
2657 struct wcn36xx_hal_trigger_ba_req_msg {
2658 struct wcn36xx_hal_msg_header header;
2663 /* baCandidateCnt is followed by trigger BA
2664 * Candidate List(tTriggerBaCandidate)
2670 struct wcn36xx_hal_trigger_ba_rsp_msg {
2671 struct wcn36xx_hal_msg_header header;
2673 /* TO SUPPORT BT-AMP */
2676 /* success or failure */
2679 /* baCandidateCnt is followed by trigger BA
2680 * Rsp Candidate List(tTriggerRspBaCandidate)
2685 struct wcn36xx_hal_del_ba_req_msg {
2686 struct wcn36xx_hal_msg_header header;
2691 /* TID for which the BA session is being deleted */
2700 struct wcn36xx_hal_del_ba_rsp_msg {
2701 struct wcn36xx_hal_msg_header header;
2703 /* success or failure */
2707 struct tsm_stats_req_msg {
2708 struct wcn36xx_hal_msg_header header;
2716 struct tsm_stats_rsp_msg {
2717 struct wcn36xx_hal_msg_header header;
2719 /*success or failure */
2722 /* Uplink Packet Queue delay */
2723 u16 uplink_pkt_queue_delay;
2725 /* Uplink Packet Queue delay histogram */
2726 u16 uplink_pkt_queue_delay_hist[4];
2728 /* Uplink Packet Transmit delay */
2729 u32 uplink_pkt_tx_delay;
2731 /* Uplink Packet loss */
2732 u16 uplink_pkt_loss;
2734 /* Uplink Packet count */
2735 u16 uplink_pkt_count;
2744 struct set_key_done_msg {
2745 struct wcn36xx_hal_msg_header header;
2747 /*bssid of the keys */
2752 struct wcn36xx_hal_nv_img_download_req_msg {
2753 /* Note: The length specified in wcn36xx_hal_nv_img_download_req_msg
2754 * messages should be
2755 * header.len = sizeof(wcn36xx_hal_nv_img_download_req_msg) +
2756 * nv_img_buffer_size */
2757 struct wcn36xx_hal_msg_header header;
2759 /* Fragment sequence number of the NV Image. Note that NV Image
2760 * might not fit into one message due to size limitation of the SMD
2761 * channel FIFO. UMAC can hence choose to chop the NV blob into
2762 * multiple fragments starting with seqeunce number 0, 1, 2 etc.
2763 * The last fragment MUST be indicated by marking the
2764 * isLastFragment field to 1. Note that all the NV blobs would be
2765 * concatenated together by HAL without any padding bytes in
2769 /* Is this the last fragment? When set to 1 it indicates that no
2770 * more fragments will be sent by UMAC and HAL can concatenate all
2771 * the NV blobs rcvd & proceed with the parsing. HAL would generate
2772 * a WCN36XX_HAL_DOWNLOAD_NV_RSP to the WCN36XX_HAL_DOWNLOAD_NV_REQ
2773 * after it receives each fragment */
2776 /* NV Image size (number of bytes) */
2777 u32 nv_img_buffer_size;
2779 /* Following the 'nv_img_buffer_size', there should be
2780 * nv_img_buffer_size bytes of NV Image i.e.
2781 * u8[nv_img_buffer_size] */
2784 struct wcn36xx_hal_nv_img_download_rsp_msg {
2785 struct wcn36xx_hal_msg_header header;
2787 /* Success or Failure. HAL would generate a
2788 * WCN36XX_HAL_DOWNLOAD_NV_RSP after each fragment */
2792 struct wcn36xx_hal_nv_store_ind {
2793 /* Note: The length specified in tHalNvStoreInd messages should be
2794 * header.msgLen = sizeof(tHalNvStoreInd) + nvBlobSize */
2795 struct wcn36xx_hal_msg_header header;
2800 /* Size of NV Blob */
2803 /* Following the 'nvBlobSize', there should be nvBlobSize bytes of
2804 * NV blob i.e. u8[nvBlobSize] */
2807 /* End of Block Ack Related Parameters */
2809 #define WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE 6
2811 /* Definition for MIC failure indication MAC reports this each time a MIC
2812 * failure occures on Rx TKIP packet
2814 struct mic_failure_ind_msg {
2815 struct wcn36xx_hal_msg_header header;
2819 /* address used to compute MIC */
2820 u8 src_addr[ETH_ALEN];
2822 /* transmitter address */
2823 u8 ta_addr[ETH_ALEN];
2825 u8 dst_addr[ETH_ALEN];
2829 /* first byte of IV */
2832 /* second byte of IV */
2835 /* sequence number */
2836 u8 tsc[WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE];
2838 /* receive address */
2839 u8 rx_addr[ETH_ALEN];
2842 struct update_vht_op_mode_req_msg {
2843 struct wcn36xx_hal_msg_header header;
2849 struct update_vht_op_mode_params_rsp_msg {
2850 struct wcn36xx_hal_msg_header header;
2855 struct update_beacon_req_msg {
2856 struct wcn36xx_hal_msg_header header;
2860 /* shortPreamble mode. HAL should update all the STA rates when it
2861 * receives this message */
2864 /* short Slot time. */
2867 /* Beacon Interval */
2868 u16 beacon_interval;
2870 /* Protection related */
2875 u8 lln_non_gf_coexist;
2876 u8 lsig_tx_op_protection_full_support;
2879 u16 param_change_bitmap;
2882 struct update_beacon_rsp_msg {
2883 struct wcn36xx_hal_msg_header header;
2887 struct wcn36xx_hal_send_beacon_req_msg {
2888 struct wcn36xx_hal_msg_header header;
2890 /* length of the template + 6. Only qcom knows why */
2893 /* length of the template. */
2897 u8 beacon[BEACON_TEMPLATE_SIZE - sizeof(u32)];
2901 /* TIM IE offset from the beginning of the template. */
2904 /* P2P IE offset from the begining of the template */
2908 struct send_beacon_rsp_msg {
2909 struct wcn36xx_hal_msg_header header;
2913 struct enable_radar_req_msg {
2914 struct wcn36xx_hal_msg_header header;
2920 struct enable_radar_rsp_msg {
2921 struct wcn36xx_hal_msg_header header;
2923 /* Link Parameters */
2926 /* success or failure */
2930 struct radar_detect_intr_ind_msg {
2931 struct wcn36xx_hal_msg_header header;
2933 u8 radar_det_channel;
2936 struct radar_detect_ind_msg {
2937 struct wcn36xx_hal_msg_header header;
2939 /* channel number in which the RADAR detected */
2942 /* RADAR pulse width in usecond */
2943 u16 radar_pulse_width;
2945 /* Number of RADAR pulses */
2946 u16 num_radar_pulse;
2949 struct wcn36xx_hal_get_tpc_report_req_msg {
2950 struct wcn36xx_hal_msg_header header;
2957 struct wcn36xx_hal_get_tpc_report_rsp_msg {
2958 struct wcn36xx_hal_msg_header header;
2960 /* success or failure */
2964 struct wcn36xx_hal_send_probe_resp_req_msg {
2965 struct wcn36xx_hal_msg_header header;
2967 u8 probe_resp_template[BEACON_TEMPLATE_SIZE];
2968 u32 probe_resp_template_len;
2969 u32 proxy_probe_req_valid_ie_bmap[8];
2973 struct send_probe_resp_rsp_msg {
2974 struct wcn36xx_hal_msg_header header;
2976 /* success or failure */
2980 struct send_unknown_frame_rx_ind_msg {
2981 struct wcn36xx_hal_msg_header header;
2983 /* success or failure */
2987 struct wcn36xx_hal_delete_sta_context_ind_msg {
2988 struct wcn36xx_hal_msg_header header;
2993 /* TO SUPPORT BT-AMP */
2996 /* HAL copies bssid from the sta table. */
2999 /* To unify the keepalive / unknown A2 / tim-based disa */
3003 struct indicate_del_sta {
3004 struct wcn36xx_hal_msg_header header;
3012 struct bt_amp_event_msg {
3013 struct wcn36xx_hal_msg_header header;
3015 enum bt_amp_event_type btAmpEventType;
3018 struct bt_amp_event_rsp {
3019 struct wcn36xx_hal_msg_header header;
3021 /* success or failure */
3025 struct tl_hal_flush_ac_req_msg {
3026 struct wcn36xx_hal_msg_header header;
3028 /* Station Index. originates from HAL */
3031 /* TID for which the transmit queue is being flushed */
3035 struct tl_hal_flush_ac_rsp_msg {
3036 struct wcn36xx_hal_msg_header header;
3038 /* Station Index. originates from HAL */
3041 /* TID for which the transmit queue is being flushed */
3044 /* success or failure */
3048 struct wcn36xx_hal_enter_imps_req_msg {
3049 struct wcn36xx_hal_msg_header header;
3052 struct wcn36xx_hal_exit_imps_req {
3053 struct wcn36xx_hal_msg_header header;
3056 struct wcn36xx_hal_enter_bmps_req_msg {
3057 struct wcn36xx_hal_msg_header header;
3061 /* TBTT value derived from the last beacon */
3062 #ifndef BUILD_QWPTTSTATIC
3067 /* DTIM period given to HAL during association may not be valid, if
3068 * association is based on ProbeRsp instead of beacon. */
3071 /* For CCX and 11R Roaming */
3072 u32 rssi_filter_period;
3074 u32 num_beacon_per_rssi_average;
3075 u8 rssi_filter_enable;
3078 struct wcn36xx_hal_exit_bmps_req_msg {
3079 struct wcn36xx_hal_msg_header header;
3085 struct wcn36xx_hal_missed_beacon_ind_msg {
3086 struct wcn36xx_hal_msg_header header;
3091 /* Beacon Filtering data structures */
3093 /* The above structure would be followed by multiple of below mentioned
3096 struct beacon_filter_ie {
3098 u8 check_ie_presence;
3105 struct wcn36xx_hal_add_bcn_filter_req_msg {
3106 struct wcn36xx_hal_msg_header header;
3108 u16 capability_info;
3109 u16 capability_mask;
3110 u16 beacon_interval;
3116 struct wcn36xx_hal_rem_bcn_filter_req {
3117 struct wcn36xx_hal_msg_header header;
3123 #define WCN36XX_HAL_IPV4_ARP_REPLY_OFFLOAD 0
3124 #define WCN36XX_HAL_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3125 #define WCN36XX_HAL_IPV6_NS_OFFLOAD 2
3126 #define WCN36XX_HAL_IPV6_ADDR_LEN 16
3127 #define WCN36XX_HAL_OFFLOAD_DISABLE 0
3128 #define WCN36XX_HAL_OFFLOAD_ENABLE 1
3129 #define WCN36XX_HAL_OFFLOAD_BCAST_FILTER_ENABLE 0x2
3130 #define WCN36XX_HAL_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE \
3131 (HAL_OFFLOAD_ENABLE|HAL_OFFLOAD_BCAST_FILTER_ENABLE)
3133 struct wcn36xx_hal_ns_offload_params {
3134 u8 src_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
3135 u8 self_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
3137 /* Only support 2 possible Network Advertisement IPv6 address */
3138 u8 target_ipv6_addr1[WCN36XX_HAL_IPV6_ADDR_LEN];
3139 u8 target_ipv6_addr2[WCN36XX_HAL_IPV6_ADDR_LEN];
3141 u8 self_addr[ETH_ALEN];
3142 u8 src_ipv6_addr_valid:1;
3143 u8 target_ipv6_addr1_valid:1;
3144 u8 target_ipv6_addr2_valid:1;
3147 /* make it DWORD aligned */
3150 /* slot index for this offload */
3155 struct wcn36xx_hal_host_offload_req {
3158 /* enable or disable */
3162 u8 host_ipv4_addr[4];
3163 u8 host_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
3167 struct wcn36xx_hal_host_offload_req_msg {
3168 struct wcn36xx_hal_msg_header header;
3169 struct wcn36xx_hal_host_offload_req host_offload_params;
3170 struct wcn36xx_hal_ns_offload_params ns_offload_params;
3174 #define WCN36XX_HAL_KEEP_ALIVE_NULL_PKT 1
3175 #define WCN36XX_HAL_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3177 /* Enable or disable keep alive */
3178 #define WCN36XX_HAL_KEEP_ALIVE_DISABLE 0
3179 #define WCN36XX_HAL_KEEP_ALIVE_ENABLE 1
3180 #define WCN36XX_KEEP_ALIVE_TIME_PERIOD 30 /* unit: s */
3182 /* Keep Alive request. */
3183 struct wcn36xx_hal_keep_alive_req_msg {
3184 struct wcn36xx_hal_msg_header header;
3188 u8 host_ipv4_addr[WCN36XX_HAL_IPV4_ADDR_LEN];
3189 u8 dest_ipv4_addr[WCN36XX_HAL_IPV4_ADDR_LEN];
3190 u8 dest_addr[ETH_ALEN];
3194 struct wcn36xx_hal_rssi_threshold_req_msg {
3195 struct wcn36xx_hal_msg_header header;
3200 u8 thres1_pos_notify:1;
3201 u8 thres1_neg_notify:1;
3202 u8 thres2_pos_notify:1;
3203 u8 thres2_neg_notify:1;
3204 u8 thres3_pos_notify:1;
3205 u8 thres3_neg_notify:1;
3209 struct wcn36xx_hal_enter_uapsd_req_msg {
3210 struct wcn36xx_hal_msg_header header;
3223 struct wcn36xx_hal_exit_uapsd_req_msg {
3224 struct wcn36xx_hal_msg_header header;
3228 #define WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE 128
3229 #define WCN36XX_HAL_WOWL_BCAST_MAX_NUM_PATTERNS 16
3231 struct wcn36xx_hal_wowl_add_bcast_ptrn_req_msg {
3232 struct wcn36xx_hal_msg_header header;
3237 /* Pattern byte offset from beginning of the 802.11 packet to start
3238 * of the wake-up pattern */
3241 /* Non-Zero Pattern size */
3245 u8 pattern[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
3247 /* Non-zero pattern mask size */
3251 u8 mask[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
3254 u8 extra[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
3256 /* Extra pattern mask */
3257 u8 mask_extra[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
3262 struct wcn36xx_hal_wow_del_bcast_ptrn_req_msg {
3263 struct wcn36xx_hal_msg_header header;
3265 /* Pattern ID of the wakeup pattern to be deleted */
3270 struct wcn36xx_hal_wowl_enter_req_msg {
3271 struct wcn36xx_hal_msg_header header;
3273 /* Enables/disables magic packet filtering */
3274 u8 magic_packet_enable;
3277 u8 magic_pattern[ETH_ALEN];
3279 /* Enables/disables packet pattern filtering in firmware. Enabling
3280 * this flag enables broadcast pattern matching in Firmware. If
3281 * unicast pattern matching is also desired,
3282 * ucUcastPatternFilteringEnable flag must be set tot true as well
3284 u8 pattern_filtering_enable;
3286 /* Enables/disables unicast packet pattern filtering. This flag
3287 * specifies whether we want to do pattern match on unicast packets
3288 * as well and not just broadcast packets. This flag has no effect
3289 * if the ucPatternFilteringEnable (main controlling flag) is set
3292 u8 ucast_pattern_filtering_enable;
3294 /* This configuration is valid only when magicPktEnable=1. It
3295 * requests hardware to wake up when it receives the Channel Switch
3298 u8 wow_channel_switch_receive;
3300 /* This configuration is valid only when magicPktEnable=1. It
3301 * requests hardware to wake up when it receives the
3302 * Deauthentication Frame.
3304 u8 wow_deauth_receive;
3306 /* This configuration is valid only when magicPktEnable=1. It
3307 * requests hardware to wake up when it receives the Disassociation
3310 u8 wow_disassoc_receive;
3312 /* This configuration is valid only when magicPktEnable=1. It
3313 * requests hardware to wake up when it has missed consecutive
3314 * beacons. This is a hardware register configuration (NOT a
3315 * firmware configuration).
3317 u8 wow_max_missed_beacons;
3319 /* This configuration is valid only when magicPktEnable=1. This is
3320 * a timeout value in units of microsec. It requests hardware to
3321 * unconditionally wake up after it has stayed in WoWLAN mode for
3322 * some time. Set 0 to disable this feature.
3326 /* This configuration directs the WoW packet filtering to look for
3327 * EAP-ID requests embedded in EAPOL frames and use this as a wake
3330 u8 wow_eap_id_request_enable;
3332 /* This configuration directs the WoW packet filtering to look for
3333 * EAPOL-4WAY requests and use this as a wake source.
3335 u8 wow_eapol_4way_enable;
3337 /* This configuration allows a host wakeup on an network scan
3340 u8 wow_net_scan_offload_match;
3342 /* This configuration allows a host wakeup on any GTK rekeying
3345 u8 wow_gtk_rekey_error;
3347 /* This configuration allows a host wakeup on BSS connection loss.
3349 u8 wow_bss_connection_loss;
3354 struct wcn36xx_hal_wowl_exit_req_msg {
3355 struct wcn36xx_hal_msg_header header;
3360 struct wcn36xx_hal_get_rssi_req_msg {
3361 struct wcn36xx_hal_msg_header header;
3364 struct wcn36xx_hal_get_roam_rssi_req_msg {
3365 struct wcn36xx_hal_msg_header header;
3367 /* Valid STA Idx for per STA stats request */
3371 struct wcn36xx_hal_set_uapsd_ac_params_req_msg {
3372 struct wcn36xx_hal_msg_header header;
3377 /* Access Category */
3383 /* Service Interval */
3384 u32 service_interval;
3386 /* Suspend Interval */
3387 u32 suspend_interval;
3389 /* Delay Interval */
3393 struct wcn36xx_hal_configure_rxp_filter_req_msg {
3394 struct wcn36xx_hal_msg_header header;
3396 u8 set_mcst_bcst_filter_setting;
3397 u8 set_mcst_bcst_filter;
3400 struct wcn36xx_hal_enter_imps_rsp_msg {
3401 struct wcn36xx_hal_msg_header header;
3403 /* success or failure */
3407 struct wcn36xx_hal_exit_imps_rsp_msg {
3408 struct wcn36xx_hal_msg_header header;
3410 /* success or failure */
3414 struct wcn36xx_hal_enter_bmps_rsp_msg {
3415 struct wcn36xx_hal_msg_header header;
3417 /* success or failure */
3423 struct wcn36xx_hal_exit_bmps_rsp_msg {
3424 struct wcn36xx_hal_msg_header header;
3426 /* success or failure */
3432 struct wcn36xx_hal_enter_uapsd_rsp_msg {
3433 struct wcn36xx_hal_msg_header header;
3435 /* success or failure */
3441 struct wcn36xx_hal_exit_uapsd_rsp_msg {
3442 struct wcn36xx_hal_msg_header header;
3444 /* success or failure */
3450 struct wcn36xx_hal_rssi_notification_ind_msg {
3451 struct wcn36xx_hal_msg_header header;
3453 u32 rssi_thres1_pos_cross:1;
3454 u32 rssi_thres1_neg_cross:1;
3455 u32 rssi_thres2_pos_cross:1;
3456 u32 rssi_thres2_neg_cross:1;
3457 u32 rssi_thres3_pos_cross:1;
3458 u32 rssi_thres3_neg_cross:1;
3464 struct wcn36xx_hal_get_rssio_rsp_msg {
3465 struct wcn36xx_hal_msg_header header;
3467 /* success or failure */
3473 struct wcn36xx_hal_get_roam_rssi_rsp_msg {
3474 struct wcn36xx_hal_msg_header header;
3476 /* success or failure */
3483 struct wcn36xx_hal_wowl_enter_rsp_msg {
3484 struct wcn36xx_hal_msg_header header;
3486 /* success or failure */
3491 struct wcn36xx_hal_wowl_exit_rsp_msg {
3492 struct wcn36xx_hal_msg_header header;
3494 /* success or failure */
3499 struct wcn36xx_hal_add_bcn_filter_rsp_msg {
3500 struct wcn36xx_hal_msg_header header;
3502 /* success or failure */
3506 struct wcn36xx_hal_rem_bcn_filter_rsp_msg {
3507 struct wcn36xx_hal_msg_header header;
3509 /* success or failure */
3513 struct wcn36xx_hal_add_wowl_bcast_ptrn_rsp_msg {
3514 struct wcn36xx_hal_msg_header header;
3516 /* success or failure */
3521 struct wcn36xx_hal_del_wowl_bcast_ptrn_rsp_msg {
3522 struct wcn36xx_hal_msg_header header;
3524 /* success or failure */
3529 struct wcn36xx_hal_host_offload_rsp_msg {
3530 struct wcn36xx_hal_msg_header header;
3532 /* success or failure */
3536 struct wcn36xx_hal_keep_alive_rsp_msg {
3537 struct wcn36xx_hal_msg_header header;
3539 /* success or failure */
3543 struct wcn36xx_hal_set_rssi_thresh_rsp_msg {
3544 struct wcn36xx_hal_msg_header header;
3546 /* success or failure */
3550 struct wcn36xx_hal_set_uapsd_ac_params_rsp_msg {
3551 struct wcn36xx_hal_msg_header header;
3553 /* success or failure */
3557 struct wcn36xx_hal_configure_rxp_filter_rsp_msg {
3558 struct wcn36xx_hal_msg_header header;
3560 /* success or failure */
3564 struct set_max_tx_pwr_req {
3565 struct wcn36xx_hal_msg_header header;
3567 /* BSSID is needed to identify which session issued this request.
3568 * As the request has power constraints, this should be applied
3569 * only to that session */
3572 u8 self_addr[ETH_ALEN];
3574 /* In request, power == MaxTx power to be used. */
3578 struct set_max_tx_pwr_rsp_msg {
3579 struct wcn36xx_hal_msg_header header;
3581 /* power == tx power used for management frames */
3584 /* success or failure */
3588 struct set_tx_pwr_req_msg {
3589 struct wcn36xx_hal_msg_header header;
3591 /* TX Power in milli watts */
3597 struct set_tx_pwr_rsp_msg {
3598 struct wcn36xx_hal_msg_header header;
3600 /* success or failure */
3604 struct get_tx_pwr_req_msg {
3605 struct wcn36xx_hal_msg_header header;
3610 struct get_tx_pwr_rsp_msg {
3611 struct wcn36xx_hal_msg_header header;
3613 /* success or failure */
3616 /* TX Power in milli watts */
3620 struct set_p2p_gonoa_req_msg {
3621 struct wcn36xx_hal_msg_header header;
3628 u32 single_noa_duration;
3632 struct set_p2p_gonoa_rsp_msg {
3633 struct wcn36xx_hal_msg_header header;
3635 /* success or failure */
3639 struct wcn36xx_hal_add_sta_self_req {
3640 struct wcn36xx_hal_msg_header header;
3642 u8 self_addr[ETH_ALEN];
3646 struct wcn36xx_hal_add_sta_self_rsp_msg {
3647 struct wcn36xx_hal_msg_header header;
3649 /* success or failure */
3652 /* Self STA Index */
3655 /* DPU Index (IGTK, PTK, GTK all same) */
3662 struct wcn36xx_hal_del_sta_self_req_msg {
3663 struct wcn36xx_hal_msg_header header;
3665 u8 self_addr[ETH_ALEN];
3668 struct wcn36xx_hal_del_sta_self_rsp_msg {
3669 struct wcn36xx_hal_msg_header header;
3671 /*success or failure */
3674 u8 self_addr[ETH_ALEN];
3677 struct aggr_add_ts_req {
3678 struct wcn36xx_hal_msg_header header;
3683 /* TSPEC handler uniquely identifying a TSPEC for a STA in a BSS.
3684 * This will carry the bitmap with the bit positions representing
3688 /* Tspec info per AC To program TPE with required parameters */
3689 struct wcn36xx_hal_tspec_ie tspec[WCN36XX_HAL_MAX_AC];
3691 /* U-APSD Flags: 1b per AC. Encoded as follows:
3692 b7 b6 b5 b4 b3 b2 b1 b0 =
3693 X X X X BE BK VI VO */
3696 /* These parameters are for all the access categories */
3698 /* Service Interval */
3699 u32 service_interval[WCN36XX_HAL_MAX_AC];
3701 /* Suspend Interval */
3702 u32 suspend_interval[WCN36XX_HAL_MAX_AC];
3704 /* Delay Interval */
3705 u32 delay_interval[WCN36XX_HAL_MAX_AC];
3708 struct aggr_add_ts_rsp_msg {
3709 struct wcn36xx_hal_msg_header header;
3711 /* success or failure */
3714 /* FIXME PRIMA for future use for 11R */
3718 struct wcn36xx_hal_configure_apps_cpu_wakeup_state_req_msg {
3719 struct wcn36xx_hal_msg_header header;
3721 u8 is_apps_cpu_awake;
3724 struct wcn36xx_hal_configure_apps_cpu_wakeup_state_rsp_msg {
3725 struct wcn36xx_hal_msg_header header;
3727 /* success or failure */
3731 struct wcn36xx_hal_dump_cmd_req_msg {
3732 struct wcn36xx_hal_msg_header header;
3741 struct wcn36xx_hal_dump_cmd_rsp_msg {
3742 struct wcn36xx_hal_msg_header header;
3744 /* success or failure */
3747 /* Length of the responce message */
3750 /* FIXME: Currently considering the the responce will be less than
3752 u8 rsp_buffer[DUMPCMD_RSP_BUFFER];
3755 #define WLAN_COEX_IND_DATA_SIZE (4)
3756 #define WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3757 #define WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
3759 struct coex_ind_msg {
3760 struct wcn36xx_hal_msg_header header;
3762 /* Coex Indication Type */
3765 /* Coex Indication Data */
3766 u32 data[WLAN_COEX_IND_DATA_SIZE];
3769 struct wcn36xx_hal_tx_compl_ind_msg {
3770 struct wcn36xx_hal_msg_header header;
3772 /* Tx Complete Indication Success or Failure */
3776 struct wcn36xx_hal_wlan_host_suspend_ind_msg {
3777 struct wcn36xx_hal_msg_header header;
3779 u32 configured_mcst_bcst_filter_setting;
3780 u32 active_session_count;
3783 struct wcn36xx_hal_wlan_exclude_unencrpted_ind_msg {
3784 struct wcn36xx_hal_msg_header header;
3786 u8 dot11_exclude_unencrypted;
3790 struct noa_attr_ind_msg {
3791 struct wcn36xx_hal_msg_header header;
3797 u16 noa1_interval_count;
3803 u16 noa2_interval_count;
3807 u32 noa2_start_time;
3812 struct noa_start_ind_msg {
3813 struct wcn36xx_hal_msg_header header;
3819 struct wcn36xx_hal_wlan_host_resume_req_msg {
3820 struct wcn36xx_hal_msg_header header;
3822 u8 configured_mcst_bcst_filter_setting;
3825 struct wcn36xx_hal_host_resume_rsp_msg {
3826 struct wcn36xx_hal_msg_header header;
3828 /* success or failure */
3832 struct wcn36xx_hal_del_ba_ind_msg {
3833 struct wcn36xx_hal_msg_header header;
3837 /* Peer MAC Address, whose BA session has timed out */
3838 u8 peer_addr[ETH_ALEN];
3840 /* TID for which a BA session timeout is being triggered */
3851 /* TO SUPPORT BT-AMP */
3857 /* Max number of channels that a network can be found on */
3858 #define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS 26
3860 /* Max number of channels that a network can be found on */
3861 #define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX 60
3863 /* Maximum numbers of networks supported by PNO */
3864 #define WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS 16
3866 /* The number of scan time intervals that can be programmed into PNO */
3867 #define WCN36XX_HAL_PNO_MAX_SCAN_TIMERS 10
3869 /* Maximum size of the probe template */
3870 #define WCN36XX_HAL_PNO_MAX_PROBE_SIZE 450
3872 /* Type of PNO enabling:
3874 * Immediate - scanning will start immediately and PNO procedure will be
3875 * repeated based on timer
3877 * Suspend - scanning will start at suspend
3879 * Resume - scanning will start on system resume
3883 PNO_MODE_ON_SUSPEND,
3885 PNO_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
3888 /* Authentication type */
3891 AUTH_TYPE_OPEN_SYSTEM = 1,
3893 /* Upper layer authentication types */
3895 AUTH_TYPE_WPA_PSK = 3,
3898 AUTH_TYPE_RSN_PSK = 5,
3899 AUTH_TYPE_FT_RSN = 6,
3900 AUTH_TYPE_FT_RSN_PSK = 7,
3901 AUTH_TYPE_WAPI_WAI_CERTIFICATE = 8,
3902 AUTH_TYPE_WAPI_WAI_PSK = 9,
3904 AUTH_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
3907 /* Encryption type */
3916 ED_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
3919 /* SSID broadcast type */
3920 enum ssid_bcast_type {
3925 BCAST_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
3928 /* The network description for which PNO will have to look for */
3929 struct network_type {
3930 /* SSID of the BSS */
3931 struct wcn36xx_hal_mac_ssid ssid;
3933 /* Authentication type for the network */
3934 enum auth_type authentication;
3936 /* Encryption type for the network */
3937 enum ed_type encryption;
3939 /* Indicate the channel on which the Network can be found 0 - if
3942 u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];
3944 /* Indicates the RSSI threshold for the network to be considered */
3949 /* How much it should wait */
3952 /* How many times it should repeat that wait value 0 - keep using
3953 * this timer until PNO is disabled */
3956 /* e.g: 2 3 4 0 - it will wait 2s between consecutive scans for 3
3957 * times - after that it will wait 4s between consecutive scans
3961 /* The network parameters to be sent to the PNO algorithm */
3962 struct scan_timers_type {
3963 /* set to 0 if you wish for PNO to use its default telescopic timer */
3966 /* A set value represents the amount of time that PNO will wait
3967 * between two consecutive scan procedures If the desired is for a
3968 * uniform timer that fires always at the exact same interval - one
3969 * single value is to be set If there is a desire for a more
3970 * complex - telescopic like timer multiple values can be set -
3971 * once PNO reaches the end of the array it will continue scanning
3972 * at intervals presented by the last value */
3973 struct scan_timer values[WCN36XX_HAL_PNO_MAX_SCAN_TIMERS];
3976 /* Preferred network list request */
3977 struct set_pref_netw_list_req {
3978 struct wcn36xx_hal_msg_header header;
3983 /* Immediate, On Suspend, On Resume */
3986 /* Number of networks sent for PNO */
3989 /* The networks that PNO needs to look for */
3990 struct network_type networks[WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS];
3992 /* The scan timers required for PNO */
3993 struct scan_timers_type scan_timers;
3995 /* Probe template for 2.4GHz band */
3996 u16 band_24g_probe_size;
3997 u8 band_24g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
3999 /* Probe template for 5GHz band */
4000 u16 band_5g_probe_size;
4001 u8 band_5g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
4004 /* The network description for which PNO will have to look for */
4005 struct network_type_new {
4006 /* SSID of the BSS */
4007 struct wcn36xx_hal_mac_ssid ssid;
4009 /* Authentication type for the network */
4010 enum auth_type authentication;
4012 /* Encryption type for the network */
4013 enum ed_type encryption;
4015 /* SSID broadcast type, normal, hidden or unknown */
4016 enum ssid_bcast_type bcast_network_type;
4018 /* Indicate the channel on which the Network can be found 0 - if
4021 u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];
4023 /* Indicates the RSSI threshold for the network to be considered */
4027 /* Preferred network list request new */
4028 struct set_pref_netw_list_req_new {
4029 struct wcn36xx_hal_msg_header header;
4034 /* Immediate, On Suspend, On Resume */
4037 /* Number of networks sent for PNO */
4040 /* The networks that PNO needs to look for */
4041 struct network_type_new networks[WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS];
4043 /* The scan timers required for PNO */
4044 struct scan_timers_type scan_timers;
4046 /* Probe template for 2.4GHz band */
4047 u16 band_24g_probe_size;
4048 u8 band_24g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
4050 /* Probe template for 5GHz band */
4051 u16 band_5g_probe_size;
4052 u8 band_5g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
4055 /* Preferred network list response */
4056 struct set_pref_netw_list_resp {
4057 struct wcn36xx_hal_msg_header header;
4059 /* status of the request - just to indicate that PNO has
4060 * acknowledged the request and will start scanning */
4064 /* Preferred network found indication */
4065 struct pref_netw_found_ind {
4067 struct wcn36xx_hal_msg_header header;
4069 /* Network that was found with the highest RSSI */
4070 struct wcn36xx_hal_mac_ssid ssid;
4072 /* Indicates the RSSI */
4076 /* RSSI Filter request */
4077 struct set_rssi_filter_req {
4078 struct wcn36xx_hal_msg_header header;
4080 /* RSSI Threshold */
4084 /* Set RSSI filter resp */
4085 struct set_rssi_filter_resp {
4086 struct wcn36xx_hal_msg_header header;
4088 /* status of the request */
4092 /* Update scan params - sent from host to PNO to be used during PNO
4094 struct wcn36xx_hal_update_scan_params_req {
4096 struct wcn36xx_hal_msg_header header;
4098 /* Host setting for 11d */
4101 /* Lets PNO know that host has determined the regulatory domain */
4104 /* Channels on which PNO is allowed to scan */
4106 u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];
4108 /* Minimum channel time */
4109 u16 active_min_ch_time;
4111 /* Maximum channel time */
4112 u16 active_max_ch_time;
4114 /* Minimum channel time */
4115 u16 passive_min_ch_time;
4117 /* Maximum channel time */
4118 u16 passive_max_ch_time;
4121 enum phy_chan_bond_state state;
4124 /* Update scan params - sent from host to PNO to be used during PNO
4126 struct wcn36xx_hal_update_scan_params_req_ex {
4128 struct wcn36xx_hal_msg_header header;
4130 /* Host setting for 11d */
4133 /* Lets PNO know that host has determined the regulatory domain */
4136 /* Channels on which PNO is allowed to scan */
4138 u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX];
4140 /* Minimum channel time */
4141 u16 active_min_ch_time;
4143 /* Maximum channel time */
4144 u16 active_max_ch_time;
4146 /* Minimum channel time */
4147 u16 passive_min_ch_time;
4149 /* Maximum channel time */
4150 u16 passive_max_ch_time;
4153 enum phy_chan_bond_state state;
4156 /* Update scan params - sent from host to PNO to be used during PNO
4158 struct wcn36xx_hal_update_scan_params_resp {
4160 struct wcn36xx_hal_msg_header header;
4162 /* status of the request */
4166 struct wcn36xx_hal_set_tx_per_tracking_req_msg {
4167 struct wcn36xx_hal_msg_header header;
4169 /* 0: disable, 1:enable */
4170 u8 tx_per_tracking_enable;
4172 /* Check period, unit is sec. */
4173 u8 tx_per_tracking_period;
4175 /* (Fail TX packet)/(Total TX packet) ratio, the unit is 10%. */
4176 u8 tx_per_tracking_ratio;
4178 /* A watermark of check number, once the tx packet exceed this
4179 * number, we do the check, default is 5 */
4180 u32 tx_per_tracking_watermark;
4183 struct wcn36xx_hal_set_tx_per_tracking_rsp_msg {
4184 struct wcn36xx_hal_msg_header header;
4186 /* success or failure */
4191 struct tx_per_hit_ind_msg {
4192 struct wcn36xx_hal_msg_header header;
4195 /* Packet Filtering Definitions Begin */
4196 #define WCN36XX_HAL_PROTOCOL_DATA_LEN 8
4197 #define WCN36XX_HAL_MAX_NUM_MULTICAST_ADDRESS 240
4198 #define WCN36XX_HAL_MAX_NUM_FILTERS 20
4199 #define WCN36XX_HAL_MAX_CMP_PER_FILTER 10
4201 enum wcn36xx_hal_receive_packet_filter_type {
4202 HAL_RCV_FILTER_TYPE_INVALID,
4203 HAL_RCV_FILTER_TYPE_FILTER_PKT,
4204 HAL_RCV_FILTER_TYPE_BUFFER_PKT,
4205 HAL_RCV_FILTER_TYPE_MAX_ENUM_SIZE
4208 enum wcn36xx_hal_rcv_pkt_flt_protocol_type {
4209 HAL_FILTER_PROTO_TYPE_INVALID,
4210 HAL_FILTER_PROTO_TYPE_MAC,
4211 HAL_FILTER_PROTO_TYPE_ARP,
4212 HAL_FILTER_PROTO_TYPE_IPV4,
4213 HAL_FILTER_PROTO_TYPE_IPV6,
4214 HAL_FILTER_PROTO_TYPE_UDP,
4215 HAL_FILTER_PROTO_TYPE_MAX
4218 enum wcn36xx_hal_rcv_pkt_flt_cmp_flag_type {
4219 HAL_FILTER_CMP_TYPE_INVALID,
4220 HAL_FILTER_CMP_TYPE_EQUAL,
4221 HAL_FILTER_CMP_TYPE_MASK_EQUAL,
4222 HAL_FILTER_CMP_TYPE_NOT_EQUAL,
4223 HAL_FILTER_CMP_TYPE_MAX
4226 struct wcn36xx_hal_rcv_pkt_filter_params {
4230 /* Length of the data to compare */
4233 /* from start of the respective frame header */
4236 /* Reserved field */
4239 /* Data to compare */
4240 u8 compare_data[WCN36XX_HAL_PROTOCOL_DATA_LEN];
4242 /* Mask to be applied on the received packet data before compare */
4243 u8 data_mask[WCN36XX_HAL_PROTOCOL_DATA_LEN];
4246 struct wcn36xx_hal_sessionized_rcv_pkt_filter_cfg_type {
4252 struct wcn36xx_hal_rcv_pkt_filter_params params[1];
4255 struct wcn36xx_hal_set_rcv_pkt_filter_req_msg {
4256 struct wcn36xx_hal_msg_header header;
4262 struct wcn36xx_hal_rcv_pkt_filter_params params[1];
4265 struct wcn36xx_hal_rcv_flt_mc_addr_list_type {
4266 /* from start of the respective frame header */
4270 u8 mc_addr[WCN36XX_HAL_MAX_NUM_MULTICAST_ADDRESS][ETH_ALEN];
4274 struct wcn36xx_hal_set_pkt_filter_rsp_msg {
4275 struct wcn36xx_hal_msg_header header;
4277 /* success or failure */
4283 struct wcn36xx_hal_rcv_flt_pkt_match_cnt_req_msg {
4284 struct wcn36xx_hal_msg_header header;
4289 struct wcn36xx_hal_rcv_flt_pkt_match_cnt {
4294 struct wcn36xx_hal_rcv_flt_pkt_match_cnt_rsp_msg {
4295 struct wcn36xx_hal_msg_header header;
4297 /* Success or Failure */
4301 struct wcn36xx_hal_rcv_flt_pkt_match_cnt
4302 matches[WCN36XX_HAL_MAX_NUM_FILTERS];
4306 struct wcn36xx_hal_rcv_flt_pkt_clear_param {
4307 /* only valid for response message */
4313 struct wcn36xx_hal_rcv_flt_pkt_clear_req_msg {
4314 struct wcn36xx_hal_msg_header header;
4315 struct wcn36xx_hal_rcv_flt_pkt_clear_param param;
4318 struct wcn36xx_hal_rcv_flt_pkt_clear_rsp_msg {
4319 struct wcn36xx_hal_msg_header header;
4320 struct wcn36xx_hal_rcv_flt_pkt_clear_param param;
4323 struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_req_msg {
4324 struct wcn36xx_hal_msg_header header;
4325 struct wcn36xx_hal_rcv_flt_mc_addr_list_type mc_addr_list;
4328 struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_rsp_msg {
4329 struct wcn36xx_hal_msg_header header;
4334 /* Packet Filtering Definitions End */
4336 struct wcn36xx_hal_set_power_params_req_msg {
4337 struct wcn36xx_hal_msg_header header;
4345 /* Listen Interval */
4346 u32 listen_interval;
4348 /* Broadcast Multicast Filter */
4349 u32 bcast_mcast_filter;
4351 /* Beacon Early Termination */
4354 /* Beacon Early Termination Interval */
4358 struct wcn36xx_hal_set_power_params_resp {
4360 struct wcn36xx_hal_msg_header header;
4362 /* status of the request */
4366 /* Capability bitmap exchange definitions and macros starts */
4368 enum place_holder_in_cap_bitmap {
4372 SLM_SESSIONIZATION = 3,
4376 P2P_GO_NOA_DECOUPLE_INIT_SCAN = 7,
4377 WLANACTIVE_OFFLOAD = 8,
4381 BCN_MISS_OFFLOAD = 12,
4383 STA_ADVANCED_PWRSAVE = 14,
4392 WLAN_ROAM_SCAN_OFFLOAD = 23,
4393 SPECULATIVE_PS_POLL = 24,
4395 IBSS_HEARTBEAT_OFFLOAD = 26,
4396 WLAN_SCAN_OFFLOAD = 27,
4397 WLAN_PERIODIC_TX_PTRN = 28,
4401 EXTENDED_NSOFFLOAD_SLOT = 32,
4403 HT40_OBSS_SCAN = 34,
4404 UPDATE_CHANNEL_LIST = 35,
4405 WLAN_MCADDR_FLT = 36,
4408 TDLS_SCAN_COEXISTENCE = 39,
4409 LINK_LAYER_STATS_MEAS = 40,
4412 DYNAMIC_WMM_PS = 43,
4413 MAC_SPOOFED_SCAN = 44,
4414 BMU_ERROR_GENERIC_RECOVERY = 45,
4417 WPS_PRBRSP_TMPL = 48,
4418 BCN_IE_FLT_DELTA = 49,
4419 TDLS_OFF_CHANNEL = 51,
4421 MGMT_FRAME_LOGGING = 53,
4422 ENHANCED_TXBD_COMPLETION = 54,
4423 LOGGING_ENHANCEMENT = 55,
4424 EXT_SCAN_ENHANCED = 56,
4425 MEMORY_DUMP_SUPPORTED = 57,
4426 PER_PKT_STATS_SUPPORTED = 58,
4429 ANTENNA_DIVERSITY_SELECTION = 62,
4431 MAX_FEATURE_SUPPORTED = 128,
4434 #define WCN36XX_HAL_CAPS_SIZE 4
4436 struct wcn36xx_hal_feat_caps_msg {
4438 struct wcn36xx_hal_msg_header header;
4440 u32 feat_caps[WCN36XX_HAL_CAPS_SIZE];
4443 /* status codes to help debug rekey failures */
4444 enum gtk_rekey_status {
4445 WCN36XX_HAL_GTK_REKEY_STATUS_SUCCESS = 0,
4447 /* rekey detected, but not handled */
4448 WCN36XX_HAL_GTK_REKEY_STATUS_NOT_HANDLED = 1,
4450 /* MIC check error on M1 */
4451 WCN36XX_HAL_GTK_REKEY_STATUS_MIC_ERROR = 2,
4453 /* decryption error on M1 */
4454 WCN36XX_HAL_GTK_REKEY_STATUS_DECRYPT_ERROR = 3,
4456 /* M1 replay detected */
4457 WCN36XX_HAL_GTK_REKEY_STATUS_REPLAY_ERROR = 4,
4459 /* missing GTK key descriptor in M1 */
4460 WCN36XX_HAL_GTK_REKEY_STATUS_MISSING_KDE = 5,
4462 /* missing iGTK key descriptor in M1 */
4463 WCN36XX_HAL_GTK_REKEY_STATUS_MISSING_IGTK_KDE = 6,
4465 /* key installation error */
4466 WCN36XX_HAL_GTK_REKEY_STATUS_INSTALL_ERROR = 7,
4468 /* iGTK key installation error */
4469 WCN36XX_HAL_GTK_REKEY_STATUS_IGTK_INSTALL_ERROR = 8,
4471 /* GTK rekey M2 response TX error */
4472 WCN36XX_HAL_GTK_REKEY_STATUS_RESP_TX_ERROR = 9,
4474 /* non-specific general error */
4475 WCN36XX_HAL_GTK_REKEY_STATUS_GEN_ERROR = 255
4478 /* wake reason types */
4479 enum wake_reason_type {
4480 WCN36XX_HAL_WAKE_REASON_NONE = 0,
4482 /* magic packet match */
4483 WCN36XX_HAL_WAKE_REASON_MAGIC_PACKET = 1,
4485 /* host defined pattern match */
4486 WCN36XX_HAL_WAKE_REASON_PATTERN_MATCH = 2,
4488 /* EAP-ID frame detected */
4489 WCN36XX_HAL_WAKE_REASON_EAPID_PACKET = 3,
4491 /* start of EAPOL 4-way handshake detected */
4492 WCN36XX_HAL_WAKE_REASON_EAPOL4WAY_PACKET = 4,
4494 /* network scan offload match */
4495 WCN36XX_HAL_WAKE_REASON_NETSCAN_OFFL_MATCH = 5,
4497 /* GTK rekey status wakeup (see status) */
4498 WCN36XX_HAL_WAKE_REASON_GTK_REKEY_STATUS = 6,
4500 /* BSS connection lost */
4501 WCN36XX_HAL_WAKE_REASON_BSS_CONN_LOST = 7,
4505 Wake Packet which is saved at tWakeReasonParams.DataStart
4506 This data is sent for any wake reasons that involve a packet-based wakeup :
4508 WCN36XX_HAL_WAKE_REASON_TYPE_MAGIC_PACKET
4509 WCN36XX_HAL_WAKE_REASON_TYPE_PATTERN_MATCH
4510 WCN36XX_HAL_WAKE_REASON_TYPE_EAPID_PACKET
4511 WCN36XX_HAL_WAKE_REASON_TYPE_EAPOL4WAY_PACKET
4512 WCN36XX_HAL_WAKE_REASON_TYPE_GTK_REKEY_STATUS
4514 The information is provided to the host for auditing and debug purposes
4518 /* Wake reason indication */
4519 struct wcn36xx_hal_wake_reason_ind {
4520 struct wcn36xx_hal_msg_header header;
4522 /* see tWakeReasonType */
4525 /* argument specific to the reason type */
4528 /* length of optional data stored in this message, in case HAL
4529 * truncates the data (i.e. data packets) this length will be less
4530 * than the actual length */
4531 u32 stored_data_len;
4533 /* actual length of data */
4534 u32 actual_data_len;
4536 /* variable length start of data (length == storedDataLen) see
4537 * specific wake type */
4544 #define WCN36XX_HAL_GTK_KEK_BYTES 16
4545 #define WCN36XX_HAL_GTK_KCK_BYTES 16
4547 #define WCN36XX_HAL_GTK_OFFLOAD_FLAGS_DISABLE (1 << 0)
4549 #define GTK_SET_BSS_KEY_TAG 0x1234AA55
4551 struct wcn36xx_hal_gtk_offload_req_msg {
4552 struct wcn36xx_hal_msg_header header;
4554 /* optional flags */
4557 /* Key confirmation key */
4558 u8 kck[WCN36XX_HAL_GTK_KCK_BYTES];
4560 /* key encryption key */
4561 u8 kek[WCN36XX_HAL_GTK_KEK_BYTES];
4563 /* replay counter */
4564 u64 key_replay_counter;
4569 struct wcn36xx_hal_gtk_offload_rsp_msg {
4570 struct wcn36xx_hal_msg_header header;
4572 /* success or failure */
4578 struct wcn36xx_hal_gtk_offload_get_info_req_msg {
4579 struct wcn36xx_hal_msg_header header;
4583 struct wcn36xx_hal_gtk_offload_get_info_rsp_msg {
4584 struct wcn36xx_hal_msg_header header;
4586 /* success or failure */
4589 /* last rekey status when the rekey was offloaded */
4590 u32 last_rekey_status;
4592 /* current replay counter value */
4593 u64 key_replay_counter;
4595 /* total rekey attempts */
4596 u32 total_rekey_count;
4598 /* successful GTK rekeys */
4599 u32 gtk_rekey_count;
4601 /* successful iGTK rekeys */
4602 u32 igtk_rekey_count;
4608 /* Indicates the device mode which indicates about the DHCP activity */
4614 struct dhcp_ind_status {
4615 struct wcn36xx_hal_msg_header header;
4617 /* success or failure */
4622 * Thermal Mitigation mode of operation.
4624 * WCN36XX_HAL_THERMAL_MITIGATION_MODE_0 - Based on AMPDU disabling aggregation
4626 * WCN36XX_HAL_THERMAL_MITIGATION_MODE_1 - Based on AMPDU disabling aggregation
4627 * and reducing transmit power
4629 * WCN36XX_HAL_THERMAL_MITIGATION_MODE_2 - Not supported */
4630 enum wcn36xx_hal_thermal_mitigation_mode_type {
4631 HAL_THERMAL_MITIGATION_MODE_INVALID = -1,
4632 HAL_THERMAL_MITIGATION_MODE_0,
4633 HAL_THERMAL_MITIGATION_MODE_1,
4634 HAL_THERMAL_MITIGATION_MODE_2,
4635 HAL_THERMAL_MITIGATION_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
4640 * Thermal Mitigation level.
4641 * Note the levels are incremental i.e WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_2 =
4642 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_0 +
4643 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_1
4645 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_0 - lowest level of thermal mitigation.
4646 * This level indicates normal mode of operation
4648 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_1 - 1st level of thermal mitigation
4650 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_2 - 2nd level of thermal mitigation
4652 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_3 - 3rd level of thermal mitigation
4654 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_4 - 4th level of thermal mitigation
4656 enum wcn36xx_hal_thermal_mitigation_level_type {
4657 HAL_THERMAL_MITIGATION_LEVEL_INVALID = -1,
4658 HAL_THERMAL_MITIGATION_LEVEL_0,
4659 HAL_THERMAL_MITIGATION_LEVEL_1,
4660 HAL_THERMAL_MITIGATION_LEVEL_2,
4661 HAL_THERMAL_MITIGATION_LEVEL_3,
4662 HAL_THERMAL_MITIGATION_LEVEL_4,
4663 HAL_THERMAL_MITIGATION_LEVEL_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
4667 /* WCN36XX_HAL_SET_THERMAL_MITIGATION_REQ */
4668 struct set_thermal_mitigation_req_msg {
4669 struct wcn36xx_hal_msg_header header;
4671 /* Thermal Mitigation Operation Mode */
4672 enum wcn36xx_hal_thermal_mitigation_mode_type mode;
4674 /* Thermal Mitigation Level */
4675 enum wcn36xx_hal_thermal_mitigation_level_type level;
4678 struct set_thermal_mitigation_resp {
4680 struct wcn36xx_hal_msg_header header;
4682 /* status of the request */
4686 /* Per STA Class B Statistics. Class B statistics are STA TX/RX stats
4687 * provided to FW from Host via periodic messages */
4688 struct stats_class_b_ind {
4689 struct wcn36xx_hal_msg_header header;
4691 /* Duration over which this stats was collected */
4697 u32 tx_bytes_pushed;
4698 u32 tx_packets_pushed;
4702 u32 rx_packets_rcvd;
4706 #endif /* _HAL_H_ */