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_PRINT_REG_INFO_IND = 259,
355 WCN36XX_HAL_MSG_MAX = WCN36XX_HAL_MSG_TYPE_MAX_ENUM_SIZE
358 /* Enumeration for Version */
359 enum wcn36xx_hal_host_msg_version {
360 WCN36XX_HAL_MSG_VERSION0 = 0,
361 WCN36XX_HAL_MSG_VERSION1 = 1,
362 /* define as 2 bytes data */
363 WCN36XX_HAL_MSG_WCNSS_CTRL_VERSION = 0x7FFF,
364 WCN36XX_HAL_MSG_VERSION_MAX_FIELD = WCN36XX_HAL_MSG_WCNSS_CTRL_VERSION
368 DRIVER_TYPE_PRODUCTION = 0,
371 DRIVER_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
374 enum wcn36xx_hal_stop_type {
375 HAL_STOP_TYPE_SYS_RESET,
376 HAL_STOP_TYPE_SYS_DEEP_SLEEP,
377 HAL_STOP_TYPE_RF_KILL,
378 HAL_STOP_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
381 enum wcn36xx_hal_sys_mode {
385 HAL_SYS_MODE_PROMISC,
386 HAL_SYS_MODE_SUSPEND_LINK,
387 HAL_SYS_MODE_ROAM_SCAN,
388 HAL_SYS_MODE_ROAM_SUSPEND_LINK,
389 HAL_SYS_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
392 enum phy_chan_bond_state {
393 /* 20MHz IF bandwidth centered on IF carrier */
394 PHY_SINGLE_CHANNEL_CENTERED = 0,
396 /* 40MHz IF bandwidth with lower 20MHz supporting the primary channel */
397 PHY_DOUBLE_CHANNEL_LOW_PRIMARY = 1,
399 /* 40MHz IF bandwidth centered on IF carrier */
400 PHY_DOUBLE_CHANNEL_CENTERED = 2,
402 /* 40MHz IF bandwidth with higher 20MHz supporting the primary ch */
403 PHY_DOUBLE_CHANNEL_HIGH_PRIMARY = 3,
405 /* 20/40MHZ offset LOW 40/80MHZ offset CENTERED */
406 PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED = 4,
408 /* 20/40MHZ offset CENTERED 40/80MHZ offset CENTERED */
409 PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED = 5,
411 /* 20/40MHZ offset HIGH 40/80MHZ offset CENTERED */
412 PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED = 6,
414 /* 20/40MHZ offset LOW 40/80MHZ offset LOW */
415 PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW = 7,
417 /* 20/40MHZ offset HIGH 40/80MHZ offset LOW */
418 PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW = 8,
420 /* 20/40MHZ offset LOW 40/80MHZ offset HIGH */
421 PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH = 9,
423 /* 20/40MHZ offset-HIGH 40/80MHZ offset HIGH */
424 PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH = 10,
426 PHY_CHANNEL_BONDING_STATE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
429 /* Spatial Multiplexing(SM) Power Save mode */
430 enum wcn36xx_hal_ht_mimo_state {
431 /* Static SM Power Save mode */
432 WCN36XX_HAL_HT_MIMO_PS_STATIC = 0,
434 /* Dynamic SM Power Save mode */
435 WCN36XX_HAL_HT_MIMO_PS_DYNAMIC = 1,
438 WCN36XX_HAL_HT_MIMO_PS_NA = 2,
440 /* SM Power Save disabled */
441 WCN36XX_HAL_HT_MIMO_PS_NO_LIMIT = 3,
443 WCN36XX_HAL_HT_MIMO_PS_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
446 /* each station added has a rate mode which specifies the sta attributes */
456 STA_INVALID_RATE_MODE = WCN36XX_HAL_MAX_ENUM_SIZE
460 #define WCN36XX_HAL_NUM_DSSS_RATES 4
462 /* 6,9,12,18,24,36,48,54 */
463 #define WCN36XX_HAL_NUM_OFDM_RATES 8
466 #define WCN36XX_HAL_NUM_POLARIS_RATES 3
468 #define WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET 16
470 enum wcn36xx_hal_bss_type {
471 WCN36XX_HAL_INFRASTRUCTURE_MODE,
473 /* Added for softAP support */
474 WCN36XX_HAL_INFRA_AP_MODE,
476 WCN36XX_HAL_IBSS_MODE,
478 /* Added for BT-AMP support */
479 WCN36XX_HAL_BTAMP_STA_MODE,
481 /* Added for BT-AMP support */
482 WCN36XX_HAL_BTAMP_AP_MODE,
484 WCN36XX_HAL_AUTO_MODE,
486 WCN36XX_HAL_DONOT_USE_BSS_TYPE = WCN36XX_HAL_MAX_ENUM_SIZE
489 enum wcn36xx_hal_nw_type {
490 WCN36XX_HAL_11A_NW_TYPE,
491 WCN36XX_HAL_11B_NW_TYPE,
492 WCN36XX_HAL_11G_NW_TYPE,
493 WCN36XX_HAL_11N_NW_TYPE,
494 WCN36XX_HAL_DONOT_USE_NW_TYPE = WCN36XX_HAL_MAX_ENUM_SIZE
497 #define WCN36XX_HAL_MAC_RATESET_EID_MAX 12
499 enum wcn36xx_hal_ht_operating_mode {
501 WCN36XX_HAL_HT_OP_MODE_PURE,
503 /* Overlap Legacy device present, protection is optional */
504 WCN36XX_HAL_HT_OP_MODE_OVERLAP_LEGACY,
506 /* No legacy device, but 20 MHz HT present */
507 WCN36XX_HAL_HT_OP_MODE_NO_LEGACY_20MHZ_HT,
509 /* Protection is required */
510 WCN36XX_HAL_HT_OP_MODE_MIXED,
512 WCN36XX_HAL_HT_OP_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
515 /* Encryption type enum used with peer */
518 WCN36XX_HAL_ED_WEP40,
519 WCN36XX_HAL_ED_WEP104,
523 WCN36XX_HAL_ED_AES_128_CMAC,
524 WCN36XX_HAL_ED_NOT_IMPLEMENTED = WCN36XX_HAL_MAX_ENUM_SIZE
527 #define WLAN_MAX_KEY_RSC_LEN 16
528 #define WLAN_WAPI_KEY_RSC_LEN 16
530 /* MAX key length when ULA is used */
531 #define WCN36XX_HAL_MAC_MAX_KEY_LENGTH 32
532 #define WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS 4
535 * Enum to specify whether key is used for TX only, RX only or both.
537 enum ani_key_direction {
541 WCN36XX_HAL_TX_DEFAULT,
542 WCN36XX_HAL_DONOT_USE_KEY_DIRECTION = WCN36XX_HAL_MAX_ENUM_SIZE
546 WCN36XX_HAL_WEP_STATIC,
547 WCN36XX_HAL_WEP_DYNAMIC,
548 WCN36XX_HAL_WEP_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
551 enum wcn36xx_hal_link_state {
553 WCN36XX_HAL_LINK_IDLE_STATE = 0,
554 WCN36XX_HAL_LINK_PREASSOC_STATE = 1,
555 WCN36XX_HAL_LINK_POSTASSOC_STATE = 2,
556 WCN36XX_HAL_LINK_AP_STATE = 3,
557 WCN36XX_HAL_LINK_IBSS_STATE = 4,
560 WCN36XX_HAL_LINK_BTAMP_PREASSOC_STATE = 5,
561 WCN36XX_HAL_LINK_BTAMP_POSTASSOC_STATE = 6,
562 WCN36XX_HAL_LINK_BTAMP_AP_STATE = 7,
563 WCN36XX_HAL_LINK_BTAMP_STA_STATE = 8,
565 /* Reserved for HAL Internal Use */
566 WCN36XX_HAL_LINK_LEARN_STATE = 9,
567 WCN36XX_HAL_LINK_SCAN_STATE = 10,
568 WCN36XX_HAL_LINK_FINISH_SCAN_STATE = 11,
569 WCN36XX_HAL_LINK_INIT_CAL_STATE = 12,
570 WCN36XX_HAL_LINK_FINISH_CAL_STATE = 13,
571 WCN36XX_HAL_LINK_LISTEN_STATE = 14,
573 WCN36XX_HAL_LINK_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
576 enum wcn36xx_hal_stats_mask {
577 HAL_SUMMARY_STATS_INFO = 0x00000001,
578 HAL_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
579 HAL_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
580 HAL_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
581 HAL_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
582 HAL_PER_STA_STATS_INFO = 0x00000020
585 /* BT-AMP events type */
586 enum bt_amp_event_type {
587 BTAMP_EVENT_CONNECTION_START,
588 BTAMP_EVENT_CONNECTION_STOP,
589 BTAMP_EVENT_CONNECTION_TERMINATED,
591 /* This and beyond are invalid values */
592 BTAMP_EVENT_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
597 PE_SUMMARY_STATS_INFO = 0x00000001,
598 PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
599 PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
600 PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
601 PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
602 PE_PER_STA_STATS_INFO = 0x00000020,
604 /* This and beyond are invalid values */
605 PE_STATS_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
609 * Configuration Parameter IDs
611 #define WCN36XX_HAL_CFG_STA_ID 0
612 #define WCN36XX_HAL_CFG_CURRENT_TX_ANTENNA 1
613 #define WCN36XX_HAL_CFG_CURRENT_RX_ANTENNA 2
614 #define WCN36XX_HAL_CFG_LOW_GAIN_OVERRIDE 3
615 #define WCN36XX_HAL_CFG_POWER_STATE_PER_CHAIN 4
616 #define WCN36XX_HAL_CFG_CAL_PERIOD 5
617 #define WCN36XX_HAL_CFG_CAL_CONTROL 6
618 #define WCN36XX_HAL_CFG_PROXIMITY 7
619 #define WCN36XX_HAL_CFG_NETWORK_DENSITY 8
620 #define WCN36XX_HAL_CFG_MAX_MEDIUM_TIME 9
621 #define WCN36XX_HAL_CFG_MAX_MPDUS_IN_AMPDU 10
622 #define WCN36XX_HAL_CFG_RTS_THRESHOLD 11
623 #define WCN36XX_HAL_CFG_SHORT_RETRY_LIMIT 12
624 #define WCN36XX_HAL_CFG_LONG_RETRY_LIMIT 13
625 #define WCN36XX_HAL_CFG_FRAGMENTATION_THRESHOLD 14
626 #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_ZERO 15
627 #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_ONE 16
628 #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_TWO 17
629 #define WCN36XX_HAL_CFG_FIXED_RATE 18
630 #define WCN36XX_HAL_CFG_RETRYRATE_POLICY 19
631 #define WCN36XX_HAL_CFG_RETRYRATE_SECONDARY 20
632 #define WCN36XX_HAL_CFG_RETRYRATE_TERTIARY 21
633 #define WCN36XX_HAL_CFG_FORCE_POLICY_PROTECTION 22
634 #define WCN36XX_HAL_CFG_FIXED_RATE_MULTICAST_24GHZ 23
635 #define WCN36XX_HAL_CFG_FIXED_RATE_MULTICAST_5GHZ 24
636 #define WCN36XX_HAL_CFG_DEFAULT_RATE_INDEX_24GHZ 25
637 #define WCN36XX_HAL_CFG_DEFAULT_RATE_INDEX_5GHZ 26
638 #define WCN36XX_HAL_CFG_MAX_BA_SESSIONS 27
639 #define WCN36XX_HAL_CFG_PS_DATA_INACTIVITY_TIMEOUT 28
640 #define WCN36XX_HAL_CFG_PS_ENABLE_BCN_FILTER 29
641 #define WCN36XX_HAL_CFG_PS_ENABLE_RSSI_MONITOR 30
642 #define WCN36XX_HAL_CFG_NUM_BEACON_PER_RSSI_AVERAGE 31
643 #define WCN36XX_HAL_CFG_STATS_PERIOD 32
644 #define WCN36XX_HAL_CFG_CFP_MAX_DURATION 33
645 #define WCN36XX_HAL_CFG_FRAME_TRANS_ENABLED 34
646 #define WCN36XX_HAL_CFG_DTIM_PERIOD 35
647 #define WCN36XX_HAL_CFG_EDCA_WMM_ACBK 36
648 #define WCN36XX_HAL_CFG_EDCA_WMM_ACBE 37
649 #define WCN36XX_HAL_CFG_EDCA_WMM_ACVO 38
650 #define WCN36XX_HAL_CFG_EDCA_WMM_ACVI 39
651 #define WCN36XX_HAL_CFG_BA_THRESHOLD_HIGH 40
652 #define WCN36XX_HAL_CFG_MAX_BA_BUFFERS 41
653 #define WCN36XX_HAL_CFG_RPE_POLLING_THRESHOLD 42
654 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG 43
655 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG 44
656 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG 45
657 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG 46
658 #define WCN36XX_HAL_CFG_NO_OF_ONCHIP_REORDER_SESSIONS 47
659 #define WCN36XX_HAL_CFG_PS_LISTEN_INTERVAL 48
660 #define WCN36XX_HAL_CFG_PS_HEART_BEAT_THRESHOLD 49
661 #define WCN36XX_HAL_CFG_PS_NTH_BEACON_FILTER 50
662 #define WCN36XX_HAL_CFG_PS_MAX_PS_POLL 51
663 #define WCN36XX_HAL_CFG_PS_MIN_RSSI_THRESHOLD 52
664 #define WCN36XX_HAL_CFG_PS_RSSI_FILTER_PERIOD 53
665 #define WCN36XX_HAL_CFG_PS_BROADCAST_FRAME_FILTER_ENABLE 54
666 #define WCN36XX_HAL_CFG_PS_IGNORE_DTIM 55
667 #define WCN36XX_HAL_CFG_PS_ENABLE_BCN_EARLY_TERM 56
668 #define WCN36XX_HAL_CFG_DYNAMIC_PS_POLL_VALUE 57
669 #define WCN36XX_HAL_CFG_PS_NULLDATA_AP_RESP_TIMEOUT 58
670 #define WCN36XX_HAL_CFG_TELE_BCN_WAKEUP_EN 59
671 #define WCN36XX_HAL_CFG_TELE_BCN_TRANS_LI 60
672 #define WCN36XX_HAL_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS 61
673 #define WCN36XX_HAL_CFG_TELE_BCN_MAX_LI 62
674 #define WCN36XX_HAL_CFG_TELE_BCN_MAX_LI_IDLE_BCNS 63
675 #define WCN36XX_HAL_CFG_TX_PWR_CTRL_ENABLE 64
676 #define WCN36XX_HAL_CFG_VALID_RADAR_CHANNEL_LIST 65
677 #define WCN36XX_HAL_CFG_TX_POWER_24_20 66
678 #define WCN36XX_HAL_CFG_TX_POWER_24_40 67
679 #define WCN36XX_HAL_CFG_TX_POWER_50_20 68
680 #define WCN36XX_HAL_CFG_TX_POWER_50_40 69
681 #define WCN36XX_HAL_CFG_MCAST_BCAST_FILTER_SETTING 70
682 #define WCN36XX_HAL_CFG_BCN_EARLY_TERM_WAKEUP_INTERVAL 71
683 #define WCN36XX_HAL_CFG_MAX_TX_POWER_2_4 72
684 #define WCN36XX_HAL_CFG_MAX_TX_POWER_5 73
685 #define WCN36XX_HAL_CFG_INFRA_STA_KEEP_ALIVE_PERIOD 74
686 #define WCN36XX_HAL_CFG_ENABLE_CLOSE_LOOP 75
687 #define WCN36XX_HAL_CFG_BTC_EXECUTION_MODE 76
688 #define WCN36XX_HAL_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK 77
689 #define WCN36XX_HAL_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS 78
690 #define WCN36XX_HAL_CFG_PS_TX_INACTIVITY_TIMEOUT 79
691 #define WCN36XX_HAL_CFG_WCNSS_API_VERSION 80
692 #define WCN36XX_HAL_CFG_AP_KEEPALIVE_TIMEOUT 81
693 #define WCN36XX_HAL_CFG_GO_KEEPALIVE_TIMEOUT 82
694 #define WCN36XX_HAL_CFG_ENABLE_MC_ADDR_LIST 83
695 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_INQ_BT 84
696 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_PAGE_BT 85
697 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_CONN_BT 86
698 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_LE_BT 87
699 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_INQ_WLAN 88
700 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_PAGE_WLAN 89
701 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_CONN_WLAN 90
702 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_LE_WLAN 91
703 #define WCN36XX_HAL_CFG_BTC_DYN_MAX_LEN_BT 92
704 #define WCN36XX_HAL_CFG_BTC_DYN_MAX_LEN_WLAN 93
705 #define WCN36XX_HAL_CFG_BTC_MAX_SCO_BLOCK_PERC 94
706 #define WCN36XX_HAL_CFG_BTC_DHCP_PROT_ON_A2DP 95
707 #define WCN36XX_HAL_CFG_BTC_DHCP_PROT_ON_SCO 96
708 #define WCN36XX_HAL_CFG_ENABLE_UNICAST_FILTER 97
709 #define WCN36XX_HAL_CFG_MAX_ASSOC_LIMIT 98
710 #define WCN36XX_HAL_CFG_ENABLE_LPWR_IMG_TRANSITION 99
711 #define WCN36XX_HAL_CFG_ENABLE_MCC_ADAPTIVE_SCHEDULER 100
712 #define WCN36XX_HAL_CFG_ENABLE_DETECT_PS_SUPPORT 101
713 #define WCN36XX_HAL_CFG_AP_LINK_MONITOR_TIMEOUT 102
714 #define WCN36XX_HAL_CFG_BTC_DWELL_TIME_MULTIPLIER 103
715 #define WCN36XX_HAL_CFG_ENABLE_TDLS_OXYGEN_MODE 104
716 #define WCN36XX_HAL_CFG_MAX_PARAMS 105
718 /* Message definitons - All the messages below need to be packed */
720 /* Definition for HAL API Version. */
721 struct wcnss_wlan_version {
728 /* Definition for Encryption Keys */
729 struct wcn36xx_hal_keys {
732 /* 0 for multicast */
735 enum ani_key_direction direction;
737 /* Usage is unknown */
738 u8 rsc[WLAN_MAX_KEY_RSC_LEN];
740 /* =1 for authenticator,=0 for supplicant */
744 u8 key[WCN36XX_HAL_MAC_MAX_KEY_LENGTH];
748 * set_sta_key_params Moving here since it is shared by
749 * configbss/setstakey msgs
751 struct wcn36xx_hal_set_sta_key_params {
755 /* Encryption Type used with peer */
756 enum ani_ed_type enc_type;
758 /* STATIC/DYNAMIC - valid only for WEP */
759 enum ani_wep_type wep_type;
761 /* Default WEP key, valid only for static WEP, must between 0 and 3. */
764 /* valid only for non-static WEP encyrptions */
765 struct wcn36xx_hal_keys key[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS];
768 * Control for Replay Count, 1= Single TID based replay count on Tx
769 * 0 = Per TID based replay count on TX
775 /* 4-byte control message header used by HAL*/
776 struct wcn36xx_hal_msg_header {
777 enum wcn36xx_hal_host_msg_type msg_type:16;
778 enum wcn36xx_hal_host_msg_version msg_version:16;
782 /* Config format required by HAL for each CFG item*/
783 struct wcn36xx_hal_cfg {
784 /* Cfg Id. The Id required by HAL is exported by HAL
785 * in shared header file between UMAC and HAL.*/
788 /* Length of the Cfg. This parameter is used to go to next cfg
789 * in the TLV format.*/
792 /* Padding bytes for unaligned address's */
795 /* Reserve bytes for making cfgVal to align address */
798 /* Following the uCfgLen field there should be a 'uCfgLen' bytes
799 * containing the uCfgValue ; u8 uCfgValue[uCfgLen] */
802 struct wcn36xx_hal_mac_start_parameters {
803 /* Drive Type - Production or FTM etc */
804 enum driver_type type;
806 /* Length of the config buffer */
809 /* Following this there is a TLV formatted buffer of length
810 * "len" bytes containing all config values.
811 * The TLV is expected to be formatted like this:
812 * 0 15 31 31+CFG_LEN-1 length-1
813 * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......|
817 struct wcn36xx_hal_mac_start_req_msg {
818 /* config buffer must start in TLV format just here */
819 struct wcn36xx_hal_msg_header header;
820 struct wcn36xx_hal_mac_start_parameters params;
823 struct wcn36xx_hal_mac_start_rsp_params {
824 /* success or failure */
827 /* Max number of STA supported by the device */
830 /* Max number of BSS supported by the device */
834 struct wcnss_wlan_version version;
836 /* CRM build information */
837 u8 crm_version[WCN36XX_HAL_VERSION_LENGTH];
839 /* hardware/chipset/misc version information */
840 u8 wlan_version[WCN36XX_HAL_VERSION_LENGTH];
844 struct wcn36xx_hal_mac_start_rsp_msg {
845 struct wcn36xx_hal_msg_header header;
846 struct wcn36xx_hal_mac_start_rsp_params start_rsp_params;
849 struct wcn36xx_hal_mac_stop_req_params {
850 /* The reason for which the device is being stopped */
851 enum wcn36xx_hal_stop_type reason;
855 struct wcn36xx_hal_mac_stop_req_msg {
856 struct wcn36xx_hal_msg_header header;
857 struct wcn36xx_hal_mac_stop_req_params stop_req_params;
860 struct wcn36xx_hal_mac_stop_rsp_msg {
861 struct wcn36xx_hal_msg_header header;
863 /* success or failure */
867 struct wcn36xx_hal_update_cfg_req_msg {
869 * Note: The length specified in tHalUpdateCfgReqMsg messages should be
870 * header.msgLen = sizeof(tHalUpdateCfgReqMsg) + uConfigBufferLen
872 struct wcn36xx_hal_msg_header header;
874 /* Length of the config buffer. Allows UMAC to update multiple CFGs */
878 * Following this there is a TLV formatted buffer of length
879 * "uConfigBufferLen" bytes containing all config values.
880 * The TLV is expected to be formatted like this:
881 * 0 15 31 31+CFG_LEN-1 length-1
882 * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......|
887 struct wcn36xx_hal_update_cfg_rsp_msg {
888 struct wcn36xx_hal_msg_header header;
890 /* success or failure */
895 /* Frame control field format (2 bytes) */
896 struct wcn36xx_hal_mac_frame_ctl {
898 #ifndef ANI_LITTLE_BIT_ENDIAN
932 /* Sequence control field */
933 struct wcn36xx_hal_mac_seq_ctl {
939 /* Management header format */
940 struct wcn36xx_hal_mac_mgmt_hdr {
941 struct wcn36xx_hal_mac_frame_ctl fc;
947 struct wcn36xx_hal_mac_seq_ctl seqControl;
950 /* FIXME: pronto v1 apparently has 4 */
951 #define WCN36XX_HAL_NUM_BSSID 2
953 /* Scan Entry to hold active BSS idx's */
954 struct wcn36xx_hal_scan_entry {
955 u8 bss_index[WCN36XX_HAL_NUM_BSSID];
959 struct wcn36xx_hal_init_scan_req_msg {
960 struct wcn36xx_hal_msg_header header;
964 enum wcn36xx_hal_sys_mode mode;
966 /* BSSID of the BSS */
969 /* Whether BSS needs to be notified */
972 /* Kind of frame to be used for notifying the BSS (Data Null, QoS
973 * Null, or CTS to Self). Must always be a valid frame type. */
976 /* UMAC has the option of passing the MAC frame to be used for
977 * notifying the BSS. If non-zero, HAL will use the MAC frame
978 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
979 * appropriate MAC frame based on frameType. */
982 /* Following the framelength there is a MAC frame buffer if
983 * frameLength is non-zero. */
984 struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
986 /* Entry to hold number of active BSS idx's */
987 struct wcn36xx_hal_scan_entry scan_entry;
990 struct wcn36xx_hal_init_scan_con_req_msg {
991 struct wcn36xx_hal_msg_header header;
995 enum wcn36xx_hal_sys_mode mode;
997 /* BSSID of the BSS */
1000 /* Whether BSS needs to be notified */
1003 /* Kind of frame to be used for notifying the BSS (Data Null, QoS
1004 * Null, or CTS to Self). Must always be a valid frame type. */
1007 /* UMAC has the option of passing the MAC frame to be used for
1008 * notifying the BSS. If non-zero, HAL will use the MAC frame
1009 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
1010 * appropriate MAC frame based on frameType. */
1013 /* Following the framelength there is a MAC frame buffer if
1014 * frameLength is non-zero. */
1015 struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
1017 /* Entry to hold number of active BSS idx's */
1018 struct wcn36xx_hal_scan_entry scan_entry;
1020 /* Single NoA usage in Scanning */
1023 /* Indicates the scan duration (in ms) */
1028 struct wcn36xx_hal_init_scan_rsp_msg {
1029 struct wcn36xx_hal_msg_header header;
1031 /* success or failure */
1036 struct wcn36xx_hal_start_scan_req_msg {
1037 struct wcn36xx_hal_msg_header header;
1039 /* Indicates the channel to scan */
1043 struct wcn36xx_hal_start_rsp_msg {
1044 struct wcn36xx_hal_msg_header header;
1046 /* success or failure */
1054 struct wcn36xx_hal_end_scan_req_msg {
1055 struct wcn36xx_hal_msg_header header;
1057 /* Indicates the channel to stop scanning. Not used really. But
1058 * retained for symmetry with "start Scan" message. It can also
1059 * help in error check if needed. */
1063 struct wcn36xx_hal_end_scan_rsp_msg {
1064 struct wcn36xx_hal_msg_header header;
1066 /* success or failure */
1070 struct wcn36xx_hal_finish_scan_req_msg {
1071 struct wcn36xx_hal_msg_header header;
1073 /* Identifies the operational state of the AP/STA
1074 * LEARN - AP Role SCAN - STA Role */
1075 enum wcn36xx_hal_sys_mode mode;
1077 /* Operating channel to tune to. */
1080 /* Channel Bonding state If 20/40 MHz is operational, this will
1081 * indicate the 40 MHz extension channel in combination with the
1082 * control channel */
1083 enum phy_chan_bond_state cb_state;
1085 /* BSSID of the BSS */
1088 /* Whether BSS needs to be notified */
1091 /* Kind of frame to be used for notifying the BSS (Data Null, QoS
1092 * Null, or CTS to Self). Must always be a valid frame type. */
1095 /* UMAC has the option of passing the MAC frame to be used for
1096 * notifying the BSS. If non-zero, HAL will use the MAC frame
1097 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
1098 * appropriate MAC frame based on frameType. */
1101 /* Following the framelength there is a MAC frame buffer if
1102 * frameLength is non-zero. */
1103 struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
1105 /* Entry to hold number of active BSS idx's */
1106 struct wcn36xx_hal_scan_entry scan_entry;
1110 struct wcn36xx_hal_finish_scan_rsp_msg {
1111 struct wcn36xx_hal_msg_header header;
1113 /* success or failure */
1118 enum wcn36xx_hal_rate_index {
1119 HW_RATE_INDEX_1MBPS = 0x82,
1120 HW_RATE_INDEX_2MBPS = 0x84,
1121 HW_RATE_INDEX_5_5MBPS = 0x8B,
1122 HW_RATE_INDEX_6MBPS = 0x0C,
1123 HW_RATE_INDEX_9MBPS = 0x12,
1124 HW_RATE_INDEX_11MBPS = 0x96,
1125 HW_RATE_INDEX_12MBPS = 0x18,
1126 HW_RATE_INDEX_18MBPS = 0x24,
1127 HW_RATE_INDEX_24MBPS = 0x30,
1128 HW_RATE_INDEX_36MBPS = 0x48,
1129 HW_RATE_INDEX_48MBPS = 0x60,
1130 HW_RATE_INDEX_54MBPS = 0x6C
1133 struct wcn36xx_hal_supported_rates {
1135 * For Self STA Entry: this represents Self Mode.
1136 * For Peer Stations, this represents the mode of the peer.
1139 * --this mode is updated when PE adds the Self Entry.
1141 * -- OR when PE sends 'ADD_BSS' message and station context in BSS
1142 * is used to indicate the mode of the AP.
1146 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry
1147 * for that BSS is used to indicate the self mode of the AP.
1149 * -- OR when a station is associated, PE sends 'ADD_STA' message
1150 * with this mode updated.
1153 enum sta_rate_mode op_rate_mode;
1155 /* 11b, 11a and aniLegacyRates are IE rates which gives rate in
1156 * unit of 500Kbps */
1157 u16 dsss_rates[WCN36XX_HAL_NUM_DSSS_RATES];
1158 u16 ofdm_rates[WCN36XX_HAL_NUM_OFDM_RATES];
1159 u16 legacy_rates[WCN36XX_HAL_NUM_POLARIS_RATES];
1162 /* Taurus only supports 26 Titan Rates(no ESF/concat Rates will be
1163 * supported) First 26 bits are reserved for those Titan rates and
1164 * the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are
1166 /* Titan and Taurus Rates */
1167 u32 enhanced_rate_bitmap;
1170 * 0-76 bits used, remaining reserved
1171 * bits 0-15 and 32 should be set.
1173 u8 supported_mcs_set[WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET];
1176 * RX Highest Supported Data Rate defines the highest data
1177 * rate that the STA is able to receive, in unites of 1Mbps.
1178 * This value is derived from "Supported MCS Set field" inside
1179 * the HT capability element.
1181 u16 rx_highest_data_rate;
1185 struct wcn36xx_hal_config_sta_params {
1189 /* ASSOC ID, as assigned by UMAC */
1192 /* STA entry Type: 0 - Self, 1 - Other/Peer, 2 - BSSID, 3 - BCAST */
1195 /* Short Preamble Supported. */
1196 u8 short_preamble_supported;
1198 /* MAC Address of STA */
1201 /* Listen interval of the STA */
1202 u16 listen_interval;
1204 /* Support for 11e/WMM */
1207 /* 11n HT capable STA */
1210 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1211 u8 tx_channel_width_set;
1213 /* RIFS mode 0 - NA, 1 - Allowed */
1216 /* L-SIG TXOP Protection mechanism
1217 0 - No Support, 1 - Supported
1218 SG - there is global field */
1219 u8 lsig_txop_protection;
1221 /* Max Ampdu Size supported by STA. TPE programming.
1222 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k */
1225 /* Max Ampdu density. Used by RA. 3 : 0~7 : 2^(11nAMPDUdensity -4) */
1226 u8 max_ampdu_density;
1228 /* Max AMSDU size 1 : 3839 bytes, 0 : 7935 bytes */
1231 /* Short GI support for 40Mhz packets */
1234 /* Short GI support for 20Mhz packets */
1237 /* TODO move this parameter to the end for 3680 */
1238 /* These rates are the intersection of peer and self capabilities. */
1239 struct wcn36xx_hal_supported_rates supported_rates;
1241 /* Robust Management Frame (RMF) enabled/disabled */
1244 /* The unicast encryption type in the association */
1247 /* HAL should update the existing STA entry, if this flag is set. UMAC
1248 will set this flag in case of RE-ASSOC, where we want to reuse the
1249 old STA ID. 0 = Add, 1 = Update */
1252 /* U-APSD Flags: 1b per AC. Encoded as follows:
1253 b7 b6 b5 b4 b3 b2 b1 b0 =
1254 X X X X BE BK VI VO */
1260 /* 11n Green Field preamble support
1261 0 - Not supported, 1 - Supported */
1262 u8 green_field_capable;
1264 /* MIMO Power Save mode */
1265 enum wcn36xx_hal_ht_mimo_state mimo_ps;
1267 /* Delayed BA Support */
1268 u8 delayed_ba_support;
1270 /* Max AMPDU duration in 32us */
1271 u8 max_ampdu_duration;
1273 /* HT STA should set it to 1 if it is enabled in BSS. HT STA should
1274 * set it to 0 if AP does not support it. This indication is sent
1275 * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
1277 u8 dsss_cck_mode_40mhz;
1279 /* Valid STA Idx when action=Update. Set to 0xFF when invalid!
1280 * Retained for backward compalibity with existing HAL code */
1283 /* BSSID of BSS to which station is associated. Set to 0xFF when
1284 * invalid. Retained for backward compalibity with existing HAL
1290 /* TODO add this parameter for 3680. */
1291 /* Reserved to align next field on a dword boundary */
1295 struct wcn36xx_hal_config_sta_req_msg {
1296 struct wcn36xx_hal_msg_header header;
1297 struct wcn36xx_hal_config_sta_params sta_params;
1300 struct wcn36xx_hal_config_sta_params_v1 {
1304 /* ASSOC ID, as assigned by UMAC */
1307 /* STA entry Type: 0 - Self, 1 - Other/Peer, 2 - BSSID, 3 - BCAST */
1310 /* Short Preamble Supported. */
1311 u8 short_preamble_supported;
1313 /* MAC Address of STA */
1316 /* Listen interval of the STA */
1317 u16 listen_interval;
1319 /* Support for 11e/WMM */
1322 /* 11n HT capable STA */
1325 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1326 u8 tx_channel_width_set;
1328 /* RIFS mode 0 - NA, 1 - Allowed */
1331 /* L-SIG TXOP Protection mechanism
1332 0 - No Support, 1 - Supported
1333 SG - there is global field */
1334 u8 lsig_txop_protection;
1336 /* Max Ampdu Size supported by STA. TPE programming.
1337 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k */
1340 /* Max Ampdu density. Used by RA. 3 : 0~7 : 2^(11nAMPDUdensity -4) */
1341 u8 max_ampdu_density;
1343 /* Max AMSDU size 1 : 3839 bytes, 0 : 7935 bytes */
1346 /* Short GI support for 40Mhz packets */
1349 /* Short GI support for 20Mhz packets */
1352 /* Robust Management Frame (RMF) enabled/disabled */
1355 /* The unicast encryption type in the association */
1358 /* HAL should update the existing STA entry, if this flag is set. UMAC
1359 will set this flag in case of RE-ASSOC, where we want to reuse the
1360 old STA ID. 0 = Add, 1 = Update */
1363 /* U-APSD Flags: 1b per AC. Encoded as follows:
1364 b7 b6 b5 b4 b3 b2 b1 b0 =
1365 X X X X BE BK VI VO */
1371 /* 11n Green Field preamble support
1372 0 - Not supported, 1 - Supported */
1373 u8 green_field_capable;
1375 /* MIMO Power Save mode */
1376 enum wcn36xx_hal_ht_mimo_state mimo_ps;
1378 /* Delayed BA Support */
1379 u8 delayed_ba_support;
1381 /* Max AMPDU duration in 32us */
1382 u8 max_ampdu_duration;
1384 /* HT STA should set it to 1 if it is enabled in BSS. HT STA should
1385 * set it to 0 if AP does not support it. This indication is sent
1386 * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
1388 u8 dsss_cck_mode_40mhz;
1390 /* Valid STA Idx when action=Update. Set to 0xFF when invalid!
1391 * Retained for backward compalibity with existing HAL code */
1394 /* BSSID of BSS to which station is associated. Set to 0xFF when
1395 * invalid. Retained for backward compalibity with existing HAL
1401 /* Reserved to align next field on a dword boundary */
1404 /* These rates are the intersection of peer and self capabilities. */
1405 struct wcn36xx_hal_supported_rates supported_rates;
1408 struct wcn36xx_hal_config_sta_req_msg_v1 {
1409 struct wcn36xx_hal_msg_header header;
1410 struct wcn36xx_hal_config_sta_params_v1 sta_params;
1413 struct config_sta_rsp_params {
1414 /* success or failure */
1417 /* Station index; valid only when 'status' field value SUCCESS */
1420 /* BSSID Index of BSS to which the station is associated */
1423 /* DPU Index for PTK */
1426 /* DPU Index for GTK */
1429 /* DPU Index for IGTK */
1430 u8 bcast_mgmt_dpu_idx;
1432 /* PTK DPU signature */
1435 /* GTK DPU isignature */
1438 /* IGTK DPU signature */
1445 struct wcn36xx_hal_config_sta_rsp_msg {
1446 struct wcn36xx_hal_msg_header header;
1448 struct config_sta_rsp_params params;
1451 /* Delete STA Request message */
1452 struct wcn36xx_hal_delete_sta_req_msg {
1453 struct wcn36xx_hal_msg_header header;
1455 /* Index of STA to delete */
1460 /* Delete STA Response message */
1461 struct wcn36xx_hal_delete_sta_rsp_msg {
1462 struct wcn36xx_hal_msg_header header;
1464 /* success or failure */
1467 /* Index of STA deleted */
1471 /* 12 Bytes long because this structure can be used to represent rate and
1472 * extended rate set IEs. The parser assume this to be at least 12 */
1473 struct wcn36xx_hal_rate_set {
1475 u8 rate[WCN36XX_HAL_MAC_RATESET_EID_MAX];
1478 /* access category record */
1479 struct wcn36xx_hal_aci_aifsn {
1480 #ifndef ANI_LITTLE_BIT_ENDIAN
1493 /* contention window size */
1494 struct wcn36xx_hal_mac_cw {
1495 #ifndef ANI_LITTLE_BIT_ENDIAN
1504 struct wcn36xx_hal_edca_param_record {
1505 struct wcn36xx_hal_aci_aifsn aci;
1506 struct wcn36xx_hal_mac_cw cw;
1510 struct wcn36xx_hal_mac_ssid {
1515 /* Concurrency role. These are generic IDs that identify the various roles
1516 * in the software system. */
1517 enum wcn36xx_hal_con_mode {
1518 WCN36XX_HAL_STA_MODE = 0,
1520 /* to support softAp mode . This is misleading.
1521 It means AP MODE only. */
1522 WCN36XX_HAL_STA_SAP_MODE = 1,
1524 WCN36XX_HAL_P2P_CLIENT_MODE,
1525 WCN36XX_HAL_P2P_GO_MODE,
1526 WCN36XX_HAL_MONITOR_MODE,
1529 /* This is a bit pattern to be set for each mode
1532 * bit 2 - p2p client mode
1533 * bit 3 - p2p go mode */
1534 enum wcn36xx_hal_concurrency_mode {
1538 /* to support sta, softAp mode . This means STA+AP mode */
1543 HAL_MAX_CONCURRENCY_PERSONA = 4
1546 struct wcn36xx_hal_config_bss_params {
1550 /* Self Mac Address */
1551 u8 self_mac_addr[ETH_ALEN];
1554 enum wcn36xx_hal_bss_type bss_type;
1556 /* Operational Mode: AP =0, STA = 1 */
1560 enum wcn36xx_hal_nw_type nw_type;
1562 /* Used to classify PURE_11G/11G_MIXED to program MTU */
1563 u8 short_slot_time_supported;
1565 /* Co-exist with 11a STA */
1568 /* Co-exist with 11b STA */
1571 /* Co-exist with 11g STA */
1574 /* Coexistence with 11n STA */
1577 /* Non GF coexist flag */
1578 u8 lln_non_gf_coexist;
1580 /* TXOP protection support */
1581 u8 lsig_tx_op_protection_full_support;
1586 /* Beacon Interval in TU */
1587 u16 beacon_interval;
1592 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1593 u8 tx_channel_width_set;
1595 /* Operating channel */
1598 /* Extension channel for channel bonding */
1601 /* Reserved to align next field on a dword boundary */
1604 /* TODO move sta to the end for 3680 */
1605 /* Context of the station being added in HW
1606 * Add a STA entry for "itself" -
1608 * On AP - Add the AP itself in an "STA context"
1610 * On STA - Add the AP to which this STA is joining in an
1613 struct wcn36xx_hal_config_sta_params sta;
1614 /* SSID of the BSS */
1615 struct wcn36xx_hal_mac_ssid ssid;
1617 /* HAL should update the existing BSS entry, if this flag is set.
1618 * UMAC will set this flag in case of reassoc, where we want to
1619 * resue the the old BSSID and still return success 0 = Add, 1 =
1624 struct wcn36xx_hal_rate_set rateset;
1626 /* Enable/Disable HT capabilities of the BSS */
1629 /* Enable/Disable OBSS protection */
1630 u8 obss_prot_enabled;
1632 /* RMF enabled/disabled */
1635 /* HT Operating Mode operating mode of the 802.11n STA */
1636 enum wcn36xx_hal_ht_operating_mode ht_oper_mode;
1638 /* Dual CTS Protection: 0 - Unused, 1 - Used */
1639 u8 dual_cts_protection;
1641 /* Probe Response Max retries */
1642 u8 max_probe_resp_retry_limit;
1644 /* To Enable Hidden ssid */
1647 /* To Enable Disable FW Proxy Probe Resp */
1648 u8 proxy_probe_resp;
1650 /* Boolean to indicate if EDCA params are valid. UMAC might not
1651 * have valid EDCA params or might not desire to apply EDCA params
1652 * during config BSS. 0 implies Not Valid ; Non-Zero implies
1654 u8 edca_params_valid;
1656 /* EDCA Parameters for Best Effort Access Category */
1657 struct wcn36xx_hal_edca_param_record acbe;
1659 /* EDCA Parameters forBackground Access Category */
1660 struct wcn36xx_hal_edca_param_record acbk;
1662 /* EDCA Parameters for Video Access Category */
1663 struct wcn36xx_hal_edca_param_record acvi;
1665 /* EDCA Parameters for Voice Access Category */
1666 struct wcn36xx_hal_edca_param_record acvo;
1668 /* Ext Bss Config Msg if set */
1669 u8 ext_set_sta_key_param_valid;
1671 /* SetStaKeyParams for ext bss msg */
1672 struct wcn36xx_hal_set_sta_key_params ext_set_sta_key_param;
1674 /* Persona for the BSS can be STA,AP,GO,CLIENT value same as enum
1675 * wcn36xx_hal_con_mode */
1676 u8 wcn36xx_hal_persona;
1678 u8 spectrum_mgt_enable;
1680 /* HAL fills in the tx power used for mgmt frames in txMgmtPower */
1683 /* maxTxPower has max power to be used after applying the power
1684 * constraint if any */
1688 struct wcn36xx_hal_config_bss_req_msg {
1689 struct wcn36xx_hal_msg_header header;
1690 struct wcn36xx_hal_config_bss_params bss_params;
1693 struct wcn36xx_hal_config_bss_params_v1 {
1697 /* Self Mac Address */
1698 u8 self_mac_addr[ETH_ALEN];
1701 enum wcn36xx_hal_bss_type bss_type;
1703 /* Operational Mode: AP =0, STA = 1 */
1707 enum wcn36xx_hal_nw_type nw_type;
1709 /* Used to classify PURE_11G/11G_MIXED to program MTU */
1710 u8 short_slot_time_supported;
1712 /* Co-exist with 11a STA */
1715 /* Co-exist with 11b STA */
1718 /* Co-exist with 11g STA */
1721 /* Coexistence with 11n STA */
1724 /* Non GF coexist flag */
1725 u8 lln_non_gf_coexist;
1727 /* TXOP protection support */
1728 u8 lsig_tx_op_protection_full_support;
1733 /* Beacon Interval in TU */
1734 u16 beacon_interval;
1739 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1740 u8 tx_channel_width_set;
1742 /* Operating channel */
1745 /* Extension channel for channel bonding */
1748 /* Reserved to align next field on a dword boundary */
1751 /* SSID of the BSS */
1752 struct wcn36xx_hal_mac_ssid ssid;
1754 /* HAL should update the existing BSS entry, if this flag is set.
1755 * UMAC will set this flag in case of reassoc, where we want to
1756 * resue the the old BSSID and still return success 0 = Add, 1 =
1761 struct wcn36xx_hal_rate_set rateset;
1763 /* Enable/Disable HT capabilities of the BSS */
1766 /* Enable/Disable OBSS protection */
1767 u8 obss_prot_enabled;
1769 /* RMF enabled/disabled */
1772 /* HT Operating Mode operating mode of the 802.11n STA */
1773 enum wcn36xx_hal_ht_operating_mode ht_oper_mode;
1775 /* Dual CTS Protection: 0 - Unused, 1 - Used */
1776 u8 dual_cts_protection;
1778 /* Probe Response Max retries */
1779 u8 max_probe_resp_retry_limit;
1781 /* To Enable Hidden ssid */
1784 /* To Enable Disable FW Proxy Probe Resp */
1785 u8 proxy_probe_resp;
1787 /* Boolean to indicate if EDCA params are valid. UMAC might not
1788 * have valid EDCA params or might not desire to apply EDCA params
1789 * during config BSS. 0 implies Not Valid ; Non-Zero implies
1791 u8 edca_params_valid;
1793 /* EDCA Parameters for Best Effort Access Category */
1794 struct wcn36xx_hal_edca_param_record acbe;
1796 /* EDCA Parameters forBackground Access Category */
1797 struct wcn36xx_hal_edca_param_record acbk;
1799 /* EDCA Parameters for Video Access Category */
1800 struct wcn36xx_hal_edca_param_record acvi;
1802 /* EDCA Parameters for Voice Access Category */
1803 struct wcn36xx_hal_edca_param_record acvo;
1805 /* Ext Bss Config Msg if set */
1806 u8 ext_set_sta_key_param_valid;
1808 /* SetStaKeyParams for ext bss msg */
1809 struct wcn36xx_hal_set_sta_key_params ext_set_sta_key_param;
1811 /* Persona for the BSS can be STA,AP,GO,CLIENT value same as enum
1812 * wcn36xx_hal_con_mode */
1813 u8 wcn36xx_hal_persona;
1815 u8 spectrum_mgt_enable;
1817 /* HAL fills in the tx power used for mgmt frames in txMgmtPower */
1820 /* maxTxPower has max power to be used after applying the power
1821 * constraint if any */
1824 /* Context of the station being added in HW
1825 * Add a STA entry for "itself" -
1827 * On AP - Add the AP itself in an "STA context"
1829 * On STA - Add the AP to which this STA is joining in an
1832 struct wcn36xx_hal_config_sta_params_v1 sta;
1835 struct wcn36xx_hal_config_bss_req_msg_v1 {
1836 struct wcn36xx_hal_msg_header header;
1837 struct wcn36xx_hal_config_bss_params_v1 bss_params;
1840 struct wcn36xx_hal_config_bss_rsp_params {
1841 /* Success or Failure */
1844 /* BSS index allocated by HAL */
1847 /* DPU descriptor index for PTK */
1850 /* PTK DPU signature */
1851 u8 ucast_dpu_signature;
1853 /* DPU descriptor index for GTK */
1854 u8 bcast_dpu_desc_indx;
1856 /* GTK DPU signature */
1857 u8 bcast_dpu_signature;
1859 /* DPU descriptor for IGTK */
1860 u8 mgmt_dpu_desc_index;
1862 /* IGTK DPU signature */
1863 u8 mgmt_dpu_signature;
1865 /* Station Index for BSS entry */
1868 /* Self station index for this BSS */
1869 u8 bss_self_sta_index;
1871 /* Bcast station for buffering bcast frames in AP role */
1872 u8 bss_bcast_sta_idx;
1874 /* MAC Address of STA(PEER/SELF) in staContext of configBSSReq */
1877 /* HAL fills in the tx power used for mgmt frames in this field. */
1882 struct wcn36xx_hal_config_bss_rsp_msg {
1883 struct wcn36xx_hal_msg_header header;
1884 struct wcn36xx_hal_config_bss_rsp_params bss_rsp_params;
1887 struct wcn36xx_hal_delete_bss_req_msg {
1888 struct wcn36xx_hal_msg_header header;
1890 /* BSS index to be deleted */
1895 struct wcn36xx_hal_delete_bss_rsp_msg {
1896 struct wcn36xx_hal_msg_header header;
1898 /* Success or Failure */
1901 /* BSS index that has been deleted */
1906 struct wcn36xx_hal_join_req_msg {
1907 struct wcn36xx_hal_msg_header header;
1909 /* Indicates the BSSID to which STA is going to associate */
1912 /* Indicates the channel to switch to. */
1916 u8 self_sta_mac_addr[ETH_ALEN];
1918 /* Local power constraint */
1919 u8 local_power_constraint;
1921 /* Secondary channel offset */
1922 enum phy_chan_bond_state secondary_channel_offset;
1925 enum wcn36xx_hal_link_state link_state;
1931 struct wcn36xx_hal_join_rsp_msg {
1932 struct wcn36xx_hal_msg_header header;
1934 /* success or failure */
1937 /* HAL fills in the tx power used for mgmt frames in this field */
1941 struct post_assoc_req_msg {
1942 struct wcn36xx_hal_msg_header header;
1944 struct wcn36xx_hal_config_sta_params sta_params;
1945 struct wcn36xx_hal_config_bss_params bss_params;
1948 struct post_assoc_rsp_msg {
1949 struct wcn36xx_hal_msg_header header;
1950 struct config_sta_rsp_params sta_rsp_params;
1951 struct wcn36xx_hal_config_bss_rsp_params bss_rsp_params;
1954 /* This is used to create a set of WEP keys for a given BSS. */
1955 struct wcn36xx_hal_set_bss_key_req_msg {
1956 struct wcn36xx_hal_msg_header header;
1958 /* BSS Index of the BSS */
1961 /* Encryption Type used with peer */
1962 enum ani_ed_type enc_type;
1964 /* Number of keys */
1967 /* Array of keys. */
1968 struct wcn36xx_hal_keys keys[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS];
1970 /* Control for Replay Count, 1= Single TID based replay count on Tx
1971 * 0 = Per TID based replay count on TX */
1975 /* tagged version of set bss key */
1976 struct wcn36xx_hal_set_bss_key_req_msg_tagged {
1977 struct wcn36xx_hal_set_bss_key_req_msg Msg;
1981 struct wcn36xx_hal_set_bss_key_rsp_msg {
1982 struct wcn36xx_hal_msg_header header;
1984 /* success or failure */
1989 * This is used configure the key information on a given station.
1990 * When the sec_type is WEP40 or WEP104, the def_wep_idx is used to locate
1991 * a preconfigured key from a BSS the station assoicated with; otherwise
1992 * a new key descriptor is created based on the key field.
1994 struct wcn36xx_hal_set_sta_key_req_msg {
1995 struct wcn36xx_hal_msg_header header;
1996 struct wcn36xx_hal_set_sta_key_params set_sta_key_params;
1999 struct wcn36xx_hal_set_sta_key_rsp_msg {
2000 struct wcn36xx_hal_msg_header header;
2002 /* success or failure */
2006 struct wcn36xx_hal_remove_bss_key_req_msg {
2007 struct wcn36xx_hal_msg_header header;
2009 /* BSS Index of the BSS */
2012 /* Encryption Type used with peer */
2013 enum ani_ed_type enc_type;
2018 /* STATIC/DYNAMIC. Used in Nullifying in Key Descriptors for
2019 * Static/Dynamic keys */
2020 enum ani_wep_type wep_type;
2023 struct wcn36xx_hal_remove_bss_key_rsp_msg {
2024 struct wcn36xx_hal_msg_header header;
2026 /* success or failure */
2031 * This is used by PE to Remove the key information on a given station.
2033 struct wcn36xx_hal_remove_sta_key_req_msg {
2034 struct wcn36xx_hal_msg_header header;
2039 /* Encryption Type used with peer */
2040 enum ani_ed_type enc_type;
2045 /* Whether to invalidate the Broadcast key or Unicast key. In case
2046 * of WEP, the same key is used for both broadcast and unicast. */
2051 struct wcn36xx_hal_remove_sta_key_rsp_msg {
2052 struct wcn36xx_hal_msg_header header;
2054 /*success or failure */
2059 #ifdef FEATURE_OEM_DATA_SUPPORT
2061 #ifndef OEM_DATA_REQ_SIZE
2062 #define OEM_DATA_REQ_SIZE 134
2065 #ifndef OEM_DATA_RSP_SIZE
2066 #define OEM_DATA_RSP_SIZE 1968
2069 struct start_oem_data_req_msg {
2070 struct wcn36xx_hal_msg_header header;
2073 tSirMacAddr self_mac_addr;
2074 u8 oem_data_req[OEM_DATA_REQ_SIZE];
2078 struct start_oem_data_rsp_msg {
2079 struct wcn36xx_hal_msg_header header;
2081 u8 oem_data_rsp[OEM_DATA_RSP_SIZE];
2086 struct wcn36xx_hal_switch_channel_req_msg {
2087 struct wcn36xx_hal_msg_header header;
2089 /* Channel number */
2092 /* Local power constraint */
2093 u8 local_power_constraint;
2095 /* Secondary channel offset */
2096 enum phy_chan_bond_state secondary_channel_offset;
2098 /* HAL fills in the tx power used for mgmt frames in this field. */
2105 u8 self_sta_mac_addr[ETH_ALEN];
2107 /* VO WIFI comment: BSSID needed to identify session. As the
2108 * request has power constraints, this should be applied only to
2109 * that session Since MTU timing and EDCA are sessionized, this
2110 * struct needs to be sessionized and bssid needs to be out of the
2111 * VOWifi feature flag V IMP: Keep bssId field at the end of this
2112 * msg. It is used to mantain backward compatbility by way of
2113 * ignoring if using new host/old FW or old host/new FW since it is
2114 * at the end of this struct
2119 struct wcn36xx_hal_switch_channel_rsp_msg {
2120 struct wcn36xx_hal_msg_header header;
2125 /* Channel number - same as in request */
2128 /* HAL fills in the tx power used for mgmt frames in this field */
2131 /* BSSID needed to identify session - same as in request */
2136 struct update_edca_params_req_msg {
2137 struct wcn36xx_hal_msg_header header;
2143 struct wcn36xx_hal_edca_param_record acbe;
2146 struct wcn36xx_hal_edca_param_record acbk;
2149 struct wcn36xx_hal_edca_param_record acvi;
2152 struct wcn36xx_hal_edca_param_record acvo;
2155 struct update_edca_params_rsp_msg {
2156 struct wcn36xx_hal_msg_header header;
2158 /* success or failure */
2162 struct dpu_stats_params {
2163 /* Index of STA to which the statistics */
2166 /* Encryption mode */
2179 u16 un_decryptable_cnt;
2180 u32 decrypt_err_cnt;
2184 struct wcn36xx_hal_stats_req_msg {
2185 struct wcn36xx_hal_msg_header header;
2187 /* Valid STA Idx for per STA stats request */
2190 /* Categories of stats requested as specified in eHalStatsMask */
2194 struct ani_summary_stats_info {
2195 /* Total number of packets(per AC) that were successfully
2196 * transmitted with retries */
2199 /* The number of MSDU packets and MMPDU frames per AC that the
2200 * 802.11 station successfully transmitted after more than one
2201 * retransmission attempt */
2202 u32 multiple_retry_cnt[4];
2204 /* Total number of packets(per AC) that were successfully
2205 * transmitted (with and without retries, including multi-cast,
2209 /* Total number of packets that were successfully received (after
2210 * appropriate filter rules including multi-cast, broadcast) */
2213 /* Total number of duplicate frames received successfully */
2216 /* Total number packets(per AC) failed to transmit */
2219 /* Total number of RTS/CTS sequence failures for transmission of a
2223 /* Total number packets failed transmit because of no ACK from the
2227 /* Total number of RTS/CTS sequence success for transmission of a
2231 /* The sum of the receive error count and dropped-receive-buffer
2232 * error count. HAL will provide this as a sum of (FCS error) +
2233 * (Fail get BD/PDU in HW) */
2237 * The receive error count. HAL will provide the RxP FCS error
2238 * global counter. */
2241 /* The sum of the transmit-directed byte count, transmit-multicast
2242 * byte count and transmit-broadcast byte count. HAL will sum TPE
2243 * UC/MC/BCAST global counters to provide this. */
2247 /* defines tx_rate_flags */
2250 HAL_TX_RATE_LEGACY = 0x1,
2253 HAL_TX_RATE_HT20 = 0x2,
2256 HAL_TX_RATE_HT40 = 0x4,
2258 /* Rate with Short guard interval */
2259 HAL_TX_RATE_SGI = 0x8,
2261 /* Rate with Long guard interval */
2262 HAL_TX_RATE_LGI = 0x10
2265 struct ani_global_class_a_stats_info {
2266 /* The number of MPDU frames received by the 802.11 station for
2267 * MSDU packets or MMPDU frames */
2270 /* The number of MPDU frames received by the 802.11 station for
2271 * MSDU packets or MMPDU frames when a promiscuous packet filter
2273 u32 promiscuous_rx_frag_cnt;
2275 /* The receiver input sensitivity referenced to a FER of 8% at an
2276 * MPDU length of 1024 bytes at the antenna connector. Each element
2277 * of the array shall correspond to a supported rate and the order
2278 * shall be the same as the supporteRates parameter. */
2279 u32 rx_input_sensitivity;
2281 /* The maximum transmit power in dBm upto one decimal. for eg: if
2282 * it is 10.5dBm, the value would be 105 */
2285 /* Number of times the receiver failed to synchronize with the
2286 * incoming signal after detecting the sync in the preamble of the
2287 * transmitted PLCP protocol data unit. */
2290 /* Legacy transmit rate, in units of 500 kbit/sec, for the most
2291 * recently transmitted frame */
2294 /* mcs index for HT20 and HT40 rates */
2297 /* to differentiate between HT20 and HT40 rates; short and long
2302 struct ani_global_security_stats {
2303 /* The number of unencrypted received MPDU frames that the MAC
2304 * layer discarded when the IEEE 802.11 dot11ExcludeUnencrypted
2305 * management information base (MIB) object is enabled */
2306 u32 rx_wep_unencrypted_frm_cnt;
2308 /* The number of received MSDU packets that that the 802.11 station
2309 * discarded because of MIC failures */
2310 u32 rx_mic_fail_cnt;
2312 /* The number of encrypted MPDU frames that the 802.11 station
2313 * failed to decrypt because of a TKIP ICV error */
2316 /* The number of received MPDU frames that the 802.11 discarded
2317 * because of an invalid AES-CCMP format */
2318 u32 aes_ccmp_format_err;
2320 /* The number of received MPDU frames that the 802.11 station
2321 * discarded because of the AES-CCMP replay protection procedure */
2322 u32 aes_ccmp_replay_cnt;
2324 /* The number of received MPDU frames that the 802.11 station
2325 * discarded because of errors detected by the AES-CCMP decryption
2327 u32 aes_ccmp_decrpt_err;
2329 /* The number of encrypted MPDU frames received for which a WEP
2330 * decryption key was not available on the 802.11 station */
2331 u32 wep_undecryptable_cnt;
2333 /* The number of encrypted MPDU frames that the 802.11 station
2334 * failed to decrypt because of a WEP ICV error */
2337 /* The number of received encrypted packets that the 802.11 station
2338 * successfully decrypted */
2339 u32 rx_decrypt_succ_cnt;
2341 /* The number of encrypted packets that the 802.11 station failed
2343 u32 rx_decrypt_fail_cnt;
2346 struct ani_global_class_b_stats_info {
2347 struct ani_global_security_stats uc_stats;
2348 struct ani_global_security_stats mc_bc_stats;
2351 struct ani_global_class_c_stats_info {
2352 /* This counter shall be incremented for a received A-MSDU frame
2353 * with the stations MAC address in the address 1 field or an
2354 * A-MSDU frame with a group address in the address 1 field */
2357 /* This counter shall be incremented when the MAC receives an AMPDU
2361 /* This counter shall be incremented when a Frame is transmitted
2362 * only on the primary channel */
2365 /* This counter shall be incremented when a Frame is received only
2366 * on the primary channel */
2369 /* This counter shall be incremented by the number of MPDUs
2370 * received in the A-MPDU when an A-MPDU is received */
2371 u32 rx_mpdu_in_ampdu_cnt;
2373 /* This counter shall be incremented when an MPDU delimiter has a
2374 * CRC error when this is the first CRC error in the received AMPDU
2375 * or when the previous delimiter has been decoded correctly */
2376 u32 ampdu_delimiter_crc_err;
2379 struct ani_per_sta_stats_info {
2380 /* The number of MPDU frames that the 802.11 station transmitted
2381 * and acknowledged through a received 802.11 ACK frame */
2384 /* This counter shall be incremented when an A-MPDU is transmitted */
2387 /* This counter shall increment by the number of MPDUs in the AMPDU
2388 * when an A-MPDU is transmitted */
2389 u32 tx_mpdu_in_ampdu_cnt;
2392 struct wcn36xx_hal_stats_rsp_msg {
2393 struct wcn36xx_hal_msg_header header;
2395 /* Success or Failure */
2401 /* Categories of STATS being returned as per eHalStatsMask */
2404 /* message type is same as the request type */
2407 /* length of the entire request, includes the pStatsBuf length too */
2411 struct wcn36xx_hal_set_link_state_req_msg {
2412 struct wcn36xx_hal_msg_header header;
2415 enum wcn36xx_hal_link_state state;
2416 u8 self_mac_addr[ETH_ALEN];
2420 struct set_link_state_rsp_msg {
2421 struct wcn36xx_hal_msg_header header;
2423 /* success or failure */
2428 struct wcn36xx_hal_ts_info_tfc {
2429 #ifndef ANI_LITTLE_BIT_ENDIAN
2450 /* Flag to schedule the traffic type */
2451 struct wcn36xx_hal_ts_info_sch {
2452 #ifndef ANI_LITTLE_BIT_ENDIAN
2461 /* Traffic and scheduling info */
2462 struct wcn36xx_hal_ts_info {
2463 struct wcn36xx_hal_ts_info_tfc traffic;
2464 struct wcn36xx_hal_ts_info_sch schedule;
2467 /* Information elements */
2468 struct wcn36xx_hal_tspec_ie {
2471 struct wcn36xx_hal_ts_info ts_info;
2474 u32 min_svc_interval;
2475 u32 max_svc_interval;
2477 u32 suspend_interval;
2489 struct add_ts_req_msg {
2490 struct wcn36xx_hal_msg_header header;
2495 /* TSPEC handler uniquely identifying a TSPEC for a STA in a BSS */
2498 /* To program TPE with required parameters */
2499 struct wcn36xx_hal_tspec_ie tspec;
2501 /* U-APSD Flags: 1b per AC. Encoded as follows:
2502 b7 b6 b5 b4 b3 b2 b1 b0 =
2503 X X X X BE BK VI VO */
2506 /* These parameters are for all the access categories */
2508 /* Service Interval */
2509 u32 service_interval[WCN36XX_HAL_MAX_AC];
2511 /* Suspend Interval */
2512 u32 suspend_interval[WCN36XX_HAL_MAX_AC];
2514 /* Delay Interval */
2515 u32 delay_interval[WCN36XX_HAL_MAX_AC];
2518 struct add_rs_rsp_msg {
2519 struct wcn36xx_hal_msg_header header;
2521 /* success or failure */
2525 struct del_ts_req_msg {
2526 struct wcn36xx_hal_msg_header header;
2531 /* TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS */
2534 /* To lookup station id using the mac address */
2538 struct del_ts_rsp_msg {
2539 struct wcn36xx_hal_msg_header header;
2541 /* success or failure */
2545 /* End of TSpec Parameters */
2547 /* Start of BLOCK ACK related Parameters */
2549 struct wcn36xx_hal_add_ba_session_req_msg {
2550 struct wcn36xx_hal_msg_header header;
2555 /* Peer MAC Address */
2556 u8 mac_addr[ETH_ALEN];
2558 /* ADDBA Action Frame dialog token
2559 HAL will not interpret this object */
2562 /* TID for which the BA is being setup
2563 This identifies the TC or TS of interest */
2566 /* 0 - Delayed BA (Not supported)
2570 /* Indicates the number of buffers for this TID (baTID)
2571 NOTE - This is the requested buffer size. When this
2572 is processed by HAL and subsequently by HDD, it is
2573 possible that HDD may change this buffer size. Any
2574 change in the buffer size should be noted by PE and
2575 advertized appropriately in the ADDBA response */
2578 /* BA timeout in TU's 0 means no timeout will occur */
2581 /* b0..b3 - Fragment Number - Always set to 0
2582 b4..b15 - Starting Sequence Number of first MSDU
2583 for which this BA is setup */
2592 struct wcn36xx_hal_add_ba_session_rsp_msg {
2593 struct wcn36xx_hal_msg_header header;
2595 /* success or failure */
2601 /* TID for which the BA session has been setup */
2604 /* BA Buffer Size allocated for the current BA session */
2609 /* Reordering Window buffer */
2612 /* Station Index to id the sta */
2615 /* Starting Sequence Number */
2619 struct wcn36xx_hal_add_ba_req_msg {
2620 struct wcn36xx_hal_msg_header header;
2625 /* Reorder Window Size */
2627 /* Old FW 1.2.2.4 does not support this*/
2628 #ifdef FEATURE_ON_CHIP_REORDERING
2629 u8 reordering_done_on_chip;
2633 struct wcn36xx_hal_add_ba_rsp_msg {
2634 struct wcn36xx_hal_msg_header header;
2636 /* success or failure */
2643 struct add_ba_info {
2645 u16 starting_seq_num:12;
2649 struct wcn36xx_hal_trigger_ba_rsp_candidate {
2650 u8 sta_addr[ETH_ALEN];
2651 struct add_ba_info ba_info[STACFG_MAX_TC];
2654 struct wcn36xx_hal_trigger_ba_req_candidate {
2659 struct wcn36xx_hal_trigger_ba_req_msg {
2660 struct wcn36xx_hal_msg_header header;
2665 /* baCandidateCnt is followed by trigger BA
2666 * Candidate List(tTriggerBaCandidate)
2672 struct wcn36xx_hal_trigger_ba_rsp_msg {
2673 struct wcn36xx_hal_msg_header header;
2675 /* TO SUPPORT BT-AMP */
2678 /* success or failure */
2681 /* baCandidateCnt is followed by trigger BA
2682 * Rsp Candidate List(tTriggerRspBaCandidate)
2687 struct wcn36xx_hal_del_ba_req_msg {
2688 struct wcn36xx_hal_msg_header header;
2693 /* TID for which the BA session is being deleted */
2702 struct wcn36xx_hal_del_ba_rsp_msg {
2703 struct wcn36xx_hal_msg_header header;
2705 /* success or failure */
2709 struct tsm_stats_req_msg {
2710 struct wcn36xx_hal_msg_header header;
2718 struct tsm_stats_rsp_msg {
2719 struct wcn36xx_hal_msg_header header;
2721 /*success or failure */
2724 /* Uplink Packet Queue delay */
2725 u16 uplink_pkt_queue_delay;
2727 /* Uplink Packet Queue delay histogram */
2728 u16 uplink_pkt_queue_delay_hist[4];
2730 /* Uplink Packet Transmit delay */
2731 u32 uplink_pkt_tx_delay;
2733 /* Uplink Packet loss */
2734 u16 uplink_pkt_loss;
2736 /* Uplink Packet count */
2737 u16 uplink_pkt_count;
2746 struct set_key_done_msg {
2747 struct wcn36xx_hal_msg_header header;
2749 /*bssid of the keys */
2754 struct wcn36xx_hal_nv_img_download_req_msg {
2755 /* Note: The length specified in wcn36xx_hal_nv_img_download_req_msg
2756 * messages should be
2757 * header.len = sizeof(wcn36xx_hal_nv_img_download_req_msg) +
2758 * nv_img_buffer_size */
2759 struct wcn36xx_hal_msg_header header;
2761 /* Fragment sequence number of the NV Image. Note that NV Image
2762 * might not fit into one message due to size limitation of the SMD
2763 * channel FIFO. UMAC can hence choose to chop the NV blob into
2764 * multiple fragments starting with seqeunce number 0, 1, 2 etc.
2765 * The last fragment MUST be indicated by marking the
2766 * isLastFragment field to 1. Note that all the NV blobs would be
2767 * concatenated together by HAL without any padding bytes in
2771 /* Is this the last fragment? When set to 1 it indicates that no
2772 * more fragments will be sent by UMAC and HAL can concatenate all
2773 * the NV blobs rcvd & proceed with the parsing. HAL would generate
2774 * a WCN36XX_HAL_DOWNLOAD_NV_RSP to the WCN36XX_HAL_DOWNLOAD_NV_REQ
2775 * after it receives each fragment */
2778 /* NV Image size (number of bytes) */
2779 u32 nv_img_buffer_size;
2781 /* Following the 'nv_img_buffer_size', there should be
2782 * nv_img_buffer_size bytes of NV Image i.e.
2783 * u8[nv_img_buffer_size] */
2786 struct wcn36xx_hal_nv_img_download_rsp_msg {
2787 struct wcn36xx_hal_msg_header header;
2789 /* Success or Failure. HAL would generate a
2790 * WCN36XX_HAL_DOWNLOAD_NV_RSP after each fragment */
2794 struct wcn36xx_hal_nv_store_ind {
2795 /* Note: The length specified in tHalNvStoreInd messages should be
2796 * header.msgLen = sizeof(tHalNvStoreInd) + nvBlobSize */
2797 struct wcn36xx_hal_msg_header header;
2802 /* Size of NV Blob */
2805 /* Following the 'nvBlobSize', there should be nvBlobSize bytes of
2806 * NV blob i.e. u8[nvBlobSize] */
2809 /* End of Block Ack Related Parameters */
2811 #define WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE 6
2813 /* Definition for MIC failure indication MAC reports this each time a MIC
2814 * failure occures on Rx TKIP packet
2816 struct mic_failure_ind_msg {
2817 struct wcn36xx_hal_msg_header header;
2821 /* address used to compute MIC */
2822 u8 src_addr[ETH_ALEN];
2824 /* transmitter address */
2825 u8 ta_addr[ETH_ALEN];
2827 u8 dst_addr[ETH_ALEN];
2831 /* first byte of IV */
2834 /* second byte of IV */
2837 /* sequence number */
2838 u8 tsc[WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE];
2840 /* receive address */
2841 u8 rx_addr[ETH_ALEN];
2844 struct update_vht_op_mode_req_msg {
2845 struct wcn36xx_hal_msg_header header;
2851 struct update_vht_op_mode_params_rsp_msg {
2852 struct wcn36xx_hal_msg_header header;
2857 struct update_beacon_req_msg {
2858 struct wcn36xx_hal_msg_header header;
2862 /* shortPreamble mode. HAL should update all the STA rates when it
2863 * receives this message */
2866 /* short Slot time. */
2869 /* Beacon Interval */
2870 u16 beacon_interval;
2872 /* Protection related */
2877 u8 lln_non_gf_coexist;
2878 u8 lsig_tx_op_protection_full_support;
2881 u16 param_change_bitmap;
2884 struct update_beacon_rsp_msg {
2885 struct wcn36xx_hal_msg_header header;
2889 struct wcn36xx_hal_send_beacon_req_msg {
2890 struct wcn36xx_hal_msg_header header;
2892 /* length of the template + 6. Only qcom knows why */
2895 /* length of the template. */
2899 u8 beacon[BEACON_TEMPLATE_SIZE - sizeof(u32)];
2903 /* TIM IE offset from the beginning of the template. */
2906 /* P2P IE offset from the begining of the template */
2910 struct send_beacon_rsp_msg {
2911 struct wcn36xx_hal_msg_header header;
2915 struct enable_radar_req_msg {
2916 struct wcn36xx_hal_msg_header header;
2922 struct enable_radar_rsp_msg {
2923 struct wcn36xx_hal_msg_header header;
2925 /* Link Parameters */
2928 /* success or failure */
2932 struct radar_detect_intr_ind_msg {
2933 struct wcn36xx_hal_msg_header header;
2935 u8 radar_det_channel;
2938 struct radar_detect_ind_msg {
2939 struct wcn36xx_hal_msg_header header;
2941 /* channel number in which the RADAR detected */
2944 /* RADAR pulse width in usecond */
2945 u16 radar_pulse_width;
2947 /* Number of RADAR pulses */
2948 u16 num_radar_pulse;
2951 struct wcn36xx_hal_get_tpc_report_req_msg {
2952 struct wcn36xx_hal_msg_header header;
2959 struct wcn36xx_hal_get_tpc_report_rsp_msg {
2960 struct wcn36xx_hal_msg_header header;
2962 /* success or failure */
2966 struct wcn36xx_hal_send_probe_resp_req_msg {
2967 struct wcn36xx_hal_msg_header header;
2969 u8 probe_resp_template[BEACON_TEMPLATE_SIZE];
2970 u32 probe_resp_template_len;
2971 u32 proxy_probe_req_valid_ie_bmap[8];
2975 struct send_probe_resp_rsp_msg {
2976 struct wcn36xx_hal_msg_header header;
2978 /* success or failure */
2982 struct send_unknown_frame_rx_ind_msg {
2983 struct wcn36xx_hal_msg_header header;
2985 /* success or failure */
2989 struct wcn36xx_hal_delete_sta_context_ind_msg {
2990 struct wcn36xx_hal_msg_header header;
2995 /* TO SUPPORT BT-AMP */
2998 /* HAL copies bssid from the sta table. */
3001 /* To unify the keepalive / unknown A2 / tim-based disa */
3005 struct indicate_del_sta {
3006 struct wcn36xx_hal_msg_header header;
3014 struct bt_amp_event_msg {
3015 struct wcn36xx_hal_msg_header header;
3017 enum bt_amp_event_type btAmpEventType;
3020 struct bt_amp_event_rsp {
3021 struct wcn36xx_hal_msg_header header;
3023 /* success or failure */
3027 struct tl_hal_flush_ac_req_msg {
3028 struct wcn36xx_hal_msg_header header;
3030 /* Station Index. originates from HAL */
3033 /* TID for which the transmit queue is being flushed */
3037 struct tl_hal_flush_ac_rsp_msg {
3038 struct wcn36xx_hal_msg_header header;
3040 /* Station Index. originates from HAL */
3043 /* TID for which the transmit queue is being flushed */
3046 /* success or failure */
3050 struct wcn36xx_hal_enter_imps_req_msg {
3051 struct wcn36xx_hal_msg_header header;
3054 struct wcn36xx_hal_exit_imps_req {
3055 struct wcn36xx_hal_msg_header header;
3058 struct wcn36xx_hal_enter_bmps_req_msg {
3059 struct wcn36xx_hal_msg_header header;
3063 /* TBTT value derived from the last beacon */
3064 #ifndef BUILD_QWPTTSTATIC
3069 /* DTIM period given to HAL during association may not be valid, if
3070 * association is based on ProbeRsp instead of beacon. */
3073 /* For CCX and 11R Roaming */
3074 u32 rssi_filter_period;
3076 u32 num_beacon_per_rssi_average;
3077 u8 rssi_filter_enable;
3080 struct wcn36xx_hal_exit_bmps_req_msg {
3081 struct wcn36xx_hal_msg_header header;
3087 struct wcn36xx_hal_missed_beacon_ind_msg {
3088 struct wcn36xx_hal_msg_header header;
3093 /* Beacon Filtering data structures */
3095 /* The above structure would be followed by multiple of below mentioned
3098 struct beacon_filter_ie {
3100 u8 check_ie_presence;
3107 struct wcn36xx_hal_add_bcn_filter_req_msg {
3108 struct wcn36xx_hal_msg_header header;
3110 u16 capability_info;
3111 u16 capability_mask;
3112 u16 beacon_interval;
3118 struct wcn36xx_hal_rem_bcn_filter_req {
3119 struct wcn36xx_hal_msg_header header;
3125 #define WCN36XX_HAL_IPV4_ARP_REPLY_OFFLOAD 0
3126 #define WCN36XX_HAL_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3127 #define WCN36XX_HAL_IPV6_NS_OFFLOAD 2
3128 #define WCN36XX_HAL_IPV6_ADDR_LEN 16
3129 #define WCN36XX_HAL_OFFLOAD_DISABLE 0
3130 #define WCN36XX_HAL_OFFLOAD_ENABLE 1
3131 #define WCN36XX_HAL_OFFLOAD_BCAST_FILTER_ENABLE 0x2
3132 #define WCN36XX_HAL_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE \
3133 (HAL_OFFLOAD_ENABLE|HAL_OFFLOAD_BCAST_FILTER_ENABLE)
3135 struct wcn36xx_hal_ns_offload_params {
3136 u8 src_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
3137 u8 self_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
3139 /* Only support 2 possible Network Advertisement IPv6 address */
3140 u8 target_ipv6_addr1[WCN36XX_HAL_IPV6_ADDR_LEN];
3141 u8 target_ipv6_addr2[WCN36XX_HAL_IPV6_ADDR_LEN];
3143 u8 self_addr[ETH_ALEN];
3144 u8 src_ipv6_addr_valid:1;
3145 u8 target_ipv6_addr1_valid:1;
3146 u8 target_ipv6_addr2_valid:1;
3149 /* make it DWORD aligned */
3152 /* slot index for this offload */
3157 struct wcn36xx_hal_host_offload_req {
3160 /* enable or disable */
3164 u8 host_ipv4_addr[4];
3165 u8 host_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
3169 struct wcn36xx_hal_host_offload_req_msg {
3170 struct wcn36xx_hal_msg_header header;
3171 struct wcn36xx_hal_host_offload_req host_offload_params;
3172 struct wcn36xx_hal_ns_offload_params ns_offload_params;
3176 #define WCN36XX_HAL_KEEP_ALIVE_NULL_PKT 1
3177 #define WCN36XX_HAL_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3179 /* Enable or disable keep alive */
3180 #define WCN36XX_HAL_KEEP_ALIVE_DISABLE 0
3181 #define WCN36XX_HAL_KEEP_ALIVE_ENABLE 1
3182 #define WCN36XX_KEEP_ALIVE_TIME_PERIOD 30 /* unit: s */
3184 /* Keep Alive request. */
3185 struct wcn36xx_hal_keep_alive_req_msg {
3186 struct wcn36xx_hal_msg_header header;
3190 u8 host_ipv4_addr[WCN36XX_HAL_IPV4_ADDR_LEN];
3191 u8 dest_ipv4_addr[WCN36XX_HAL_IPV4_ADDR_LEN];
3192 u8 dest_addr[ETH_ALEN];
3196 struct wcn36xx_hal_rssi_threshold_req_msg {
3197 struct wcn36xx_hal_msg_header header;
3202 u8 thres1_pos_notify:1;
3203 u8 thres1_neg_notify:1;
3204 u8 thres2_pos_notify:1;
3205 u8 thres2_neg_notify:1;
3206 u8 thres3_pos_notify:1;
3207 u8 thres3_neg_notify:1;
3211 struct wcn36xx_hal_enter_uapsd_req_msg {
3212 struct wcn36xx_hal_msg_header header;
3225 struct wcn36xx_hal_exit_uapsd_req_msg {
3226 struct wcn36xx_hal_msg_header header;
3230 #define WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE 128
3231 #define WCN36XX_HAL_WOWL_BCAST_MAX_NUM_PATTERNS 16
3233 struct wcn36xx_hal_wowl_add_bcast_ptrn_req_msg {
3234 struct wcn36xx_hal_msg_header header;
3239 /* Pattern byte offset from beginning of the 802.11 packet to start
3240 * of the wake-up pattern */
3243 /* Non-Zero Pattern size */
3247 u8 pattern[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
3249 /* Non-zero pattern mask size */
3253 u8 mask[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
3256 u8 extra[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
3258 /* Extra pattern mask */
3259 u8 mask_extra[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
3264 struct wcn36xx_hal_wow_del_bcast_ptrn_req_msg {
3265 struct wcn36xx_hal_msg_header header;
3267 /* Pattern ID of the wakeup pattern to be deleted */
3272 struct wcn36xx_hal_wowl_enter_req_msg {
3273 struct wcn36xx_hal_msg_header header;
3275 /* Enables/disables magic packet filtering */
3276 u8 magic_packet_enable;
3279 u8 magic_pattern[ETH_ALEN];
3281 /* Enables/disables packet pattern filtering in firmware. Enabling
3282 * this flag enables broadcast pattern matching in Firmware. If
3283 * unicast pattern matching is also desired,
3284 * ucUcastPatternFilteringEnable flag must be set tot true as well
3286 u8 pattern_filtering_enable;
3288 /* Enables/disables unicast packet pattern filtering. This flag
3289 * specifies whether we want to do pattern match on unicast packets
3290 * as well and not just broadcast packets. This flag has no effect
3291 * if the ucPatternFilteringEnable (main controlling flag) is set
3294 u8 ucast_pattern_filtering_enable;
3296 /* This configuration is valid only when magicPktEnable=1. It
3297 * requests hardware to wake up when it receives the Channel Switch
3300 u8 wow_channel_switch_receive;
3302 /* This configuration is valid only when magicPktEnable=1. It
3303 * requests hardware to wake up when it receives the
3304 * Deauthentication Frame.
3306 u8 wow_deauth_receive;
3308 /* This configuration is valid only when magicPktEnable=1. It
3309 * requests hardware to wake up when it receives the Disassociation
3312 u8 wow_disassoc_receive;
3314 /* This configuration is valid only when magicPktEnable=1. It
3315 * requests hardware to wake up when it has missed consecutive
3316 * beacons. This is a hardware register configuration (NOT a
3317 * firmware configuration).
3319 u8 wow_max_missed_beacons;
3321 /* This configuration is valid only when magicPktEnable=1. This is
3322 * a timeout value in units of microsec. It requests hardware to
3323 * unconditionally wake up after it has stayed in WoWLAN mode for
3324 * some time. Set 0 to disable this feature.
3328 /* This configuration directs the WoW packet filtering to look for
3329 * EAP-ID requests embedded in EAPOL frames and use this as a wake
3332 u8 wow_eap_id_request_enable;
3334 /* This configuration directs the WoW packet filtering to look for
3335 * EAPOL-4WAY requests and use this as a wake source.
3337 u8 wow_eapol_4way_enable;
3339 /* This configuration allows a host wakeup on an network scan
3342 u8 wow_net_scan_offload_match;
3344 /* This configuration allows a host wakeup on any GTK rekeying
3347 u8 wow_gtk_rekey_error;
3349 /* This configuration allows a host wakeup on BSS connection loss.
3351 u8 wow_bss_connection_loss;
3356 struct wcn36xx_hal_wowl_exit_req_msg {
3357 struct wcn36xx_hal_msg_header header;
3362 struct wcn36xx_hal_get_rssi_req_msg {
3363 struct wcn36xx_hal_msg_header header;
3366 struct wcn36xx_hal_get_roam_rssi_req_msg {
3367 struct wcn36xx_hal_msg_header header;
3369 /* Valid STA Idx for per STA stats request */
3373 struct wcn36xx_hal_set_uapsd_ac_params_req_msg {
3374 struct wcn36xx_hal_msg_header header;
3379 /* Access Category */
3385 /* Service Interval */
3386 u32 service_interval;
3388 /* Suspend Interval */
3389 u32 suspend_interval;
3391 /* Delay Interval */
3395 struct wcn36xx_hal_configure_rxp_filter_req_msg {
3396 struct wcn36xx_hal_msg_header header;
3398 u8 set_mcst_bcst_filter_setting;
3399 u8 set_mcst_bcst_filter;
3402 struct wcn36xx_hal_enter_imps_rsp_msg {
3403 struct wcn36xx_hal_msg_header header;
3405 /* success or failure */
3409 struct wcn36xx_hal_exit_imps_rsp_msg {
3410 struct wcn36xx_hal_msg_header header;
3412 /* success or failure */
3416 struct wcn36xx_hal_enter_bmps_rsp_msg {
3417 struct wcn36xx_hal_msg_header header;
3419 /* success or failure */
3425 struct wcn36xx_hal_exit_bmps_rsp_msg {
3426 struct wcn36xx_hal_msg_header header;
3428 /* success or failure */
3434 struct wcn36xx_hal_enter_uapsd_rsp_msg {
3435 struct wcn36xx_hal_msg_header header;
3437 /* success or failure */
3443 struct wcn36xx_hal_exit_uapsd_rsp_msg {
3444 struct wcn36xx_hal_msg_header header;
3446 /* success or failure */
3452 struct wcn36xx_hal_rssi_notification_ind_msg {
3453 struct wcn36xx_hal_msg_header header;
3455 u32 rssi_thres1_pos_cross:1;
3456 u32 rssi_thres1_neg_cross:1;
3457 u32 rssi_thres2_pos_cross:1;
3458 u32 rssi_thres2_neg_cross:1;
3459 u32 rssi_thres3_pos_cross:1;
3460 u32 rssi_thres3_neg_cross:1;
3466 struct wcn36xx_hal_get_rssio_rsp_msg {
3467 struct wcn36xx_hal_msg_header header;
3469 /* success or failure */
3475 struct wcn36xx_hal_get_roam_rssi_rsp_msg {
3476 struct wcn36xx_hal_msg_header header;
3478 /* success or failure */
3485 struct wcn36xx_hal_wowl_enter_rsp_msg {
3486 struct wcn36xx_hal_msg_header header;
3488 /* success or failure */
3493 struct wcn36xx_hal_wowl_exit_rsp_msg {
3494 struct wcn36xx_hal_msg_header header;
3496 /* success or failure */
3501 struct wcn36xx_hal_add_bcn_filter_rsp_msg {
3502 struct wcn36xx_hal_msg_header header;
3504 /* success or failure */
3508 struct wcn36xx_hal_rem_bcn_filter_rsp_msg {
3509 struct wcn36xx_hal_msg_header header;
3511 /* success or failure */
3515 struct wcn36xx_hal_add_wowl_bcast_ptrn_rsp_msg {
3516 struct wcn36xx_hal_msg_header header;
3518 /* success or failure */
3523 struct wcn36xx_hal_del_wowl_bcast_ptrn_rsp_msg {
3524 struct wcn36xx_hal_msg_header header;
3526 /* success or failure */
3531 struct wcn36xx_hal_host_offload_rsp_msg {
3532 struct wcn36xx_hal_msg_header header;
3534 /* success or failure */
3538 struct wcn36xx_hal_keep_alive_rsp_msg {
3539 struct wcn36xx_hal_msg_header header;
3541 /* success or failure */
3545 struct wcn36xx_hal_set_rssi_thresh_rsp_msg {
3546 struct wcn36xx_hal_msg_header header;
3548 /* success or failure */
3552 struct wcn36xx_hal_set_uapsd_ac_params_rsp_msg {
3553 struct wcn36xx_hal_msg_header header;
3555 /* success or failure */
3559 struct wcn36xx_hal_configure_rxp_filter_rsp_msg {
3560 struct wcn36xx_hal_msg_header header;
3562 /* success or failure */
3566 struct set_max_tx_pwr_req {
3567 struct wcn36xx_hal_msg_header header;
3569 /* BSSID is needed to identify which session issued this request.
3570 * As the request has power constraints, this should be applied
3571 * only to that session */
3574 u8 self_addr[ETH_ALEN];
3576 /* In request, power == MaxTx power to be used. */
3580 struct set_max_tx_pwr_rsp_msg {
3581 struct wcn36xx_hal_msg_header header;
3583 /* power == tx power used for management frames */
3586 /* success or failure */
3590 struct set_tx_pwr_req_msg {
3591 struct wcn36xx_hal_msg_header header;
3593 /* TX Power in milli watts */
3599 struct set_tx_pwr_rsp_msg {
3600 struct wcn36xx_hal_msg_header header;
3602 /* success or failure */
3606 struct get_tx_pwr_req_msg {
3607 struct wcn36xx_hal_msg_header header;
3612 struct get_tx_pwr_rsp_msg {
3613 struct wcn36xx_hal_msg_header header;
3615 /* success or failure */
3618 /* TX Power in milli watts */
3622 struct set_p2p_gonoa_req_msg {
3623 struct wcn36xx_hal_msg_header header;
3630 u32 single_noa_duration;
3634 struct set_p2p_gonoa_rsp_msg {
3635 struct wcn36xx_hal_msg_header header;
3637 /* success or failure */
3641 struct wcn36xx_hal_add_sta_self_req {
3642 struct wcn36xx_hal_msg_header header;
3644 u8 self_addr[ETH_ALEN];
3648 struct wcn36xx_hal_add_sta_self_rsp_msg {
3649 struct wcn36xx_hal_msg_header header;
3651 /* success or failure */
3654 /* Self STA Index */
3657 /* DPU Index (IGTK, PTK, GTK all same) */
3664 struct wcn36xx_hal_del_sta_self_req_msg {
3665 struct wcn36xx_hal_msg_header header;
3667 u8 self_addr[ETH_ALEN];
3670 struct wcn36xx_hal_del_sta_self_rsp_msg {
3671 struct wcn36xx_hal_msg_header header;
3673 /*success or failure */
3676 u8 self_addr[ETH_ALEN];
3679 struct aggr_add_ts_req {
3680 struct wcn36xx_hal_msg_header header;
3685 /* TSPEC handler uniquely identifying a TSPEC for a STA in a BSS.
3686 * This will carry the bitmap with the bit positions representing
3690 /* Tspec info per AC To program TPE with required parameters */
3691 struct wcn36xx_hal_tspec_ie tspec[WCN36XX_HAL_MAX_AC];
3693 /* U-APSD Flags: 1b per AC. Encoded as follows:
3694 b7 b6 b5 b4 b3 b2 b1 b0 =
3695 X X X X BE BK VI VO */
3698 /* These parameters are for all the access categories */
3700 /* Service Interval */
3701 u32 service_interval[WCN36XX_HAL_MAX_AC];
3703 /* Suspend Interval */
3704 u32 suspend_interval[WCN36XX_HAL_MAX_AC];
3706 /* Delay Interval */
3707 u32 delay_interval[WCN36XX_HAL_MAX_AC];
3710 struct aggr_add_ts_rsp_msg {
3711 struct wcn36xx_hal_msg_header header;
3713 /* success or failure */
3716 /* FIXME PRIMA for future use for 11R */
3720 struct wcn36xx_hal_configure_apps_cpu_wakeup_state_req_msg {
3721 struct wcn36xx_hal_msg_header header;
3723 u8 is_apps_cpu_awake;
3726 struct wcn36xx_hal_configure_apps_cpu_wakeup_state_rsp_msg {
3727 struct wcn36xx_hal_msg_header header;
3729 /* success or failure */
3733 struct wcn36xx_hal_dump_cmd_req_msg {
3734 struct wcn36xx_hal_msg_header header;
3743 struct wcn36xx_hal_dump_cmd_rsp_msg {
3744 struct wcn36xx_hal_msg_header header;
3746 /* success or failure */
3749 /* Length of the responce message */
3752 /* FIXME: Currently considering the the responce will be less than
3754 u8 rsp_buffer[DUMPCMD_RSP_BUFFER];
3757 #define WLAN_COEX_IND_DATA_SIZE (4)
3758 #define WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3759 #define WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
3761 struct coex_ind_msg {
3762 struct wcn36xx_hal_msg_header header;
3764 /* Coex Indication Type */
3767 /* Coex Indication Data */
3768 u32 data[WLAN_COEX_IND_DATA_SIZE];
3771 struct wcn36xx_hal_tx_compl_ind_msg {
3772 struct wcn36xx_hal_msg_header header;
3774 /* Tx Complete Indication Success or Failure */
3778 struct wcn36xx_hal_wlan_host_suspend_ind_msg {
3779 struct wcn36xx_hal_msg_header header;
3781 u32 configured_mcst_bcst_filter_setting;
3782 u32 active_session_count;
3785 struct wcn36xx_hal_wlan_exclude_unencrpted_ind_msg {
3786 struct wcn36xx_hal_msg_header header;
3788 u8 dot11_exclude_unencrypted;
3792 struct noa_attr_ind_msg {
3793 struct wcn36xx_hal_msg_header header;
3799 u16 noa1_interval_count;
3805 u16 noa2_interval_count;
3809 u32 noa2_start_time;
3814 struct noa_start_ind_msg {
3815 struct wcn36xx_hal_msg_header header;
3821 struct wcn36xx_hal_wlan_host_resume_req_msg {
3822 struct wcn36xx_hal_msg_header header;
3824 u8 configured_mcst_bcst_filter_setting;
3827 struct wcn36xx_hal_host_resume_rsp_msg {
3828 struct wcn36xx_hal_msg_header header;
3830 /* success or failure */
3834 struct wcn36xx_hal_del_ba_ind_msg {
3835 struct wcn36xx_hal_msg_header header;
3839 /* Peer MAC Address, whose BA session has timed out */
3840 u8 peer_addr[ETH_ALEN];
3842 /* TID for which a BA session timeout is being triggered */
3853 /* TO SUPPORT BT-AMP */
3859 /* Max number of channels that a network can be found on */
3860 #define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS 26
3862 /* Max number of channels that a network can be found on */
3863 #define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX 60
3865 /* Maximum numbers of networks supported by PNO */
3866 #define WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS 16
3868 /* The number of scan time intervals that can be programmed into PNO */
3869 #define WCN36XX_HAL_PNO_MAX_SCAN_TIMERS 10
3871 /* Maximum size of the probe template */
3872 #define WCN36XX_HAL_PNO_MAX_PROBE_SIZE 450
3874 /* Type of PNO enabling:
3876 * Immediate - scanning will start immediately and PNO procedure will be
3877 * repeated based on timer
3879 * Suspend - scanning will start at suspend
3881 * Resume - scanning will start on system resume
3885 PNO_MODE_ON_SUSPEND,
3887 PNO_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
3890 /* Authentication type */
3893 AUTH_TYPE_OPEN_SYSTEM = 1,
3895 /* Upper layer authentication types */
3897 AUTH_TYPE_WPA_PSK = 3,
3900 AUTH_TYPE_RSN_PSK = 5,
3901 AUTH_TYPE_FT_RSN = 6,
3902 AUTH_TYPE_FT_RSN_PSK = 7,
3903 AUTH_TYPE_WAPI_WAI_CERTIFICATE = 8,
3904 AUTH_TYPE_WAPI_WAI_PSK = 9,
3906 AUTH_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
3909 /* Encryption type */
3918 ED_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
3921 /* SSID broadcast type */
3922 enum ssid_bcast_type {
3927 BCAST_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
3930 /* The network description for which PNO will have to look for */
3931 struct network_type {
3932 /* SSID of the BSS */
3933 struct wcn36xx_hal_mac_ssid ssid;
3935 /* Authentication type for the network */
3936 enum auth_type authentication;
3938 /* Encryption type for the network */
3939 enum ed_type encryption;
3941 /* Indicate the channel on which the Network can be found 0 - if
3944 u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];
3946 /* Indicates the RSSI threshold for the network to be considered */
3951 /* How much it should wait */
3954 /* How many times it should repeat that wait value 0 - keep using
3955 * this timer until PNO is disabled */
3958 /* e.g: 2 3 4 0 - it will wait 2s between consecutive scans for 3
3959 * times - after that it will wait 4s between consecutive scans
3963 /* The network parameters to be sent to the PNO algorithm */
3964 struct scan_timers_type {
3965 /* set to 0 if you wish for PNO to use its default telescopic timer */
3968 /* A set value represents the amount of time that PNO will wait
3969 * between two consecutive scan procedures If the desired is for a
3970 * uniform timer that fires always at the exact same interval - one
3971 * single value is to be set If there is a desire for a more
3972 * complex - telescopic like timer multiple values can be set -
3973 * once PNO reaches the end of the array it will continue scanning
3974 * at intervals presented by the last value */
3975 struct scan_timer values[WCN36XX_HAL_PNO_MAX_SCAN_TIMERS];
3978 /* Preferred network list request */
3979 struct set_pref_netw_list_req {
3980 struct wcn36xx_hal_msg_header header;
3985 /* Immediate, On Suspend, On Resume */
3988 /* Number of networks sent for PNO */
3991 /* The networks that PNO needs to look for */
3992 struct network_type networks[WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS];
3994 /* The scan timers required for PNO */
3995 struct scan_timers_type scan_timers;
3997 /* Probe template for 2.4GHz band */
3998 u16 band_24g_probe_size;
3999 u8 band_24g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
4001 /* Probe template for 5GHz band */
4002 u16 band_5g_probe_size;
4003 u8 band_5g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
4006 /* The network description for which PNO will have to look for */
4007 struct network_type_new {
4008 /* SSID of the BSS */
4009 struct wcn36xx_hal_mac_ssid ssid;
4011 /* Authentication type for the network */
4012 enum auth_type authentication;
4014 /* Encryption type for the network */
4015 enum ed_type encryption;
4017 /* SSID broadcast type, normal, hidden or unknown */
4018 enum ssid_bcast_type bcast_network_type;
4020 /* Indicate the channel on which the Network can be found 0 - if
4023 u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];
4025 /* Indicates the RSSI threshold for the network to be considered */
4029 /* Preferred network list request new */
4030 struct set_pref_netw_list_req_new {
4031 struct wcn36xx_hal_msg_header header;
4036 /* Immediate, On Suspend, On Resume */
4039 /* Number of networks sent for PNO */
4042 /* The networks that PNO needs to look for */
4043 struct network_type_new networks[WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS];
4045 /* The scan timers required for PNO */
4046 struct scan_timers_type scan_timers;
4048 /* Probe template for 2.4GHz band */
4049 u16 band_24g_probe_size;
4050 u8 band_24g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
4052 /* Probe template for 5GHz band */
4053 u16 band_5g_probe_size;
4054 u8 band_5g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
4057 /* Preferred network list response */
4058 struct set_pref_netw_list_resp {
4059 struct wcn36xx_hal_msg_header header;
4061 /* status of the request - just to indicate that PNO has
4062 * acknowledged the request and will start scanning */
4066 /* Preferred network found indication */
4067 struct pref_netw_found_ind {
4069 struct wcn36xx_hal_msg_header header;
4071 /* Network that was found with the highest RSSI */
4072 struct wcn36xx_hal_mac_ssid ssid;
4074 /* Indicates the RSSI */
4078 /* RSSI Filter request */
4079 struct set_rssi_filter_req {
4080 struct wcn36xx_hal_msg_header header;
4082 /* RSSI Threshold */
4086 /* Set RSSI filter resp */
4087 struct set_rssi_filter_resp {
4088 struct wcn36xx_hal_msg_header header;
4090 /* status of the request */
4094 /* Update scan params - sent from host to PNO to be used during PNO
4096 struct wcn36xx_hal_update_scan_params_req {
4098 struct wcn36xx_hal_msg_header header;
4100 /* Host setting for 11d */
4103 /* Lets PNO know that host has determined the regulatory domain */
4106 /* Channels on which PNO is allowed to scan */
4108 u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];
4110 /* Minimum channel time */
4111 u16 active_min_ch_time;
4113 /* Maximum channel time */
4114 u16 active_max_ch_time;
4116 /* Minimum channel time */
4117 u16 passive_min_ch_time;
4119 /* Maximum channel time */
4120 u16 passive_max_ch_time;
4123 enum phy_chan_bond_state state;
4126 /* Update scan params - sent from host to PNO to be used during PNO
4128 struct wcn36xx_hal_update_scan_params_req_ex {
4130 struct wcn36xx_hal_msg_header header;
4132 /* Host setting for 11d */
4135 /* Lets PNO know that host has determined the regulatory domain */
4138 /* Channels on which PNO is allowed to scan */
4140 u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX];
4142 /* Minimum channel time */
4143 u16 active_min_ch_time;
4145 /* Maximum channel time */
4146 u16 active_max_ch_time;
4148 /* Minimum channel time */
4149 u16 passive_min_ch_time;
4151 /* Maximum channel time */
4152 u16 passive_max_ch_time;
4155 enum phy_chan_bond_state state;
4158 /* Update scan params - sent from host to PNO to be used during PNO
4160 struct wcn36xx_hal_update_scan_params_resp {
4162 struct wcn36xx_hal_msg_header header;
4164 /* status of the request */
4168 struct wcn36xx_hal_set_tx_per_tracking_req_msg {
4169 struct wcn36xx_hal_msg_header header;
4171 /* 0: disable, 1:enable */
4172 u8 tx_per_tracking_enable;
4174 /* Check period, unit is sec. */
4175 u8 tx_per_tracking_period;
4177 /* (Fail TX packet)/(Total TX packet) ratio, the unit is 10%. */
4178 u8 tx_per_tracking_ratio;
4180 /* A watermark of check number, once the tx packet exceed this
4181 * number, we do the check, default is 5 */
4182 u32 tx_per_tracking_watermark;
4185 struct wcn36xx_hal_set_tx_per_tracking_rsp_msg {
4186 struct wcn36xx_hal_msg_header header;
4188 /* success or failure */
4193 struct tx_per_hit_ind_msg {
4194 struct wcn36xx_hal_msg_header header;
4197 /* Packet Filtering Definitions Begin */
4198 #define WCN36XX_HAL_PROTOCOL_DATA_LEN 8
4199 #define WCN36XX_HAL_MAX_NUM_MULTICAST_ADDRESS 240
4200 #define WCN36XX_HAL_MAX_NUM_FILTERS 20
4201 #define WCN36XX_HAL_MAX_CMP_PER_FILTER 10
4203 enum wcn36xx_hal_receive_packet_filter_type {
4204 HAL_RCV_FILTER_TYPE_INVALID,
4205 HAL_RCV_FILTER_TYPE_FILTER_PKT,
4206 HAL_RCV_FILTER_TYPE_BUFFER_PKT,
4207 HAL_RCV_FILTER_TYPE_MAX_ENUM_SIZE
4210 enum wcn36xx_hal_rcv_pkt_flt_protocol_type {
4211 HAL_FILTER_PROTO_TYPE_INVALID,
4212 HAL_FILTER_PROTO_TYPE_MAC,
4213 HAL_FILTER_PROTO_TYPE_ARP,
4214 HAL_FILTER_PROTO_TYPE_IPV4,
4215 HAL_FILTER_PROTO_TYPE_IPV6,
4216 HAL_FILTER_PROTO_TYPE_UDP,
4217 HAL_FILTER_PROTO_TYPE_MAX
4220 enum wcn36xx_hal_rcv_pkt_flt_cmp_flag_type {
4221 HAL_FILTER_CMP_TYPE_INVALID,
4222 HAL_FILTER_CMP_TYPE_EQUAL,
4223 HAL_FILTER_CMP_TYPE_MASK_EQUAL,
4224 HAL_FILTER_CMP_TYPE_NOT_EQUAL,
4225 HAL_FILTER_CMP_TYPE_MAX
4228 struct wcn36xx_hal_rcv_pkt_filter_params {
4232 /* Length of the data to compare */
4235 /* from start of the respective frame header */
4238 /* Reserved field */
4241 /* Data to compare */
4242 u8 compare_data[WCN36XX_HAL_PROTOCOL_DATA_LEN];
4244 /* Mask to be applied on the received packet data before compare */
4245 u8 data_mask[WCN36XX_HAL_PROTOCOL_DATA_LEN];
4248 struct wcn36xx_hal_sessionized_rcv_pkt_filter_cfg_type {
4254 struct wcn36xx_hal_rcv_pkt_filter_params params[1];
4257 struct wcn36xx_hal_set_rcv_pkt_filter_req_msg {
4258 struct wcn36xx_hal_msg_header header;
4264 struct wcn36xx_hal_rcv_pkt_filter_params params[1];
4267 struct wcn36xx_hal_rcv_flt_mc_addr_list_type {
4268 /* from start of the respective frame header */
4272 u8 mc_addr[WCN36XX_HAL_MAX_NUM_MULTICAST_ADDRESS][ETH_ALEN];
4276 struct wcn36xx_hal_set_pkt_filter_rsp_msg {
4277 struct wcn36xx_hal_msg_header header;
4279 /* success or failure */
4285 struct wcn36xx_hal_rcv_flt_pkt_match_cnt_req_msg {
4286 struct wcn36xx_hal_msg_header header;
4291 struct wcn36xx_hal_rcv_flt_pkt_match_cnt {
4296 struct wcn36xx_hal_rcv_flt_pkt_match_cnt_rsp_msg {
4297 struct wcn36xx_hal_msg_header header;
4299 /* Success or Failure */
4303 struct wcn36xx_hal_rcv_flt_pkt_match_cnt
4304 matches[WCN36XX_HAL_MAX_NUM_FILTERS];
4308 struct wcn36xx_hal_rcv_flt_pkt_clear_param {
4309 /* only valid for response message */
4315 struct wcn36xx_hal_rcv_flt_pkt_clear_req_msg {
4316 struct wcn36xx_hal_msg_header header;
4317 struct wcn36xx_hal_rcv_flt_pkt_clear_param param;
4320 struct wcn36xx_hal_rcv_flt_pkt_clear_rsp_msg {
4321 struct wcn36xx_hal_msg_header header;
4322 struct wcn36xx_hal_rcv_flt_pkt_clear_param param;
4325 struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_req_msg {
4326 struct wcn36xx_hal_msg_header header;
4327 struct wcn36xx_hal_rcv_flt_mc_addr_list_type mc_addr_list;
4330 struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_rsp_msg {
4331 struct wcn36xx_hal_msg_header header;
4336 /* Packet Filtering Definitions End */
4338 struct wcn36xx_hal_set_power_params_req_msg {
4339 struct wcn36xx_hal_msg_header header;
4347 /* Listen Interval */
4348 u32 listen_interval;
4350 /* Broadcast Multicast Filter */
4351 u32 bcast_mcast_filter;
4353 /* Beacon Early Termination */
4356 /* Beacon Early Termination Interval */
4360 struct wcn36xx_hal_set_power_params_resp {
4362 struct wcn36xx_hal_msg_header header;
4364 /* status of the request */
4368 /* Capability bitmap exchange definitions and macros starts */
4370 enum place_holder_in_cap_bitmap {
4374 SLM_SESSIONIZATION = 3,
4378 P2P_GO_NOA_DECOUPLE_INIT_SCAN = 7,
4379 WLANACTIVE_OFFLOAD = 8,
4383 BCN_MISS_OFFLOAD = 12,
4385 STA_ADVANCED_PWRSAVE = 14,
4394 WLAN_ROAM_SCAN_OFFLOAD = 23,
4395 SPECULATIVE_PS_POLL = 24,
4397 IBSS_HEARTBEAT_OFFLOAD = 26,
4398 WLAN_SCAN_OFFLOAD = 27,
4399 WLAN_PERIODIC_TX_PTRN = 28,
4403 EXTENDED_NSOFFLOAD_SLOT = 32,
4405 HT40_OBSS_SCAN = 34,
4406 UPDATE_CHANNEL_LIST = 35,
4407 WLAN_MCADDR_FLT = 36,
4410 TDLS_SCAN_COEXISTENCE = 39,
4411 LINK_LAYER_STATS_MEAS = 40,
4414 DYNAMIC_WMM_PS = 43,
4415 MAC_SPOOFED_SCAN = 44,
4416 BMU_ERROR_GENERIC_RECOVERY = 45,
4419 WPS_PRBRSP_TMPL = 48,
4420 BCN_IE_FLT_DELTA = 49,
4421 TDLS_OFF_CHANNEL = 51,
4423 MGMT_FRAME_LOGGING = 53,
4424 ENHANCED_TXBD_COMPLETION = 54,
4425 LOGGING_ENHANCEMENT = 55,
4426 EXT_SCAN_ENHANCED = 56,
4427 MEMORY_DUMP_SUPPORTED = 57,
4428 PER_PKT_STATS_SUPPORTED = 58,
4431 ANTENNA_DIVERSITY_SELECTION = 62,
4433 MAX_FEATURE_SUPPORTED = 128,
4436 #define WCN36XX_HAL_CAPS_SIZE 4
4438 struct wcn36xx_hal_feat_caps_msg {
4440 struct wcn36xx_hal_msg_header header;
4442 u32 feat_caps[WCN36XX_HAL_CAPS_SIZE];
4445 /* status codes to help debug rekey failures */
4446 enum gtk_rekey_status {
4447 WCN36XX_HAL_GTK_REKEY_STATUS_SUCCESS = 0,
4449 /* rekey detected, but not handled */
4450 WCN36XX_HAL_GTK_REKEY_STATUS_NOT_HANDLED = 1,
4452 /* MIC check error on M1 */
4453 WCN36XX_HAL_GTK_REKEY_STATUS_MIC_ERROR = 2,
4455 /* decryption error on M1 */
4456 WCN36XX_HAL_GTK_REKEY_STATUS_DECRYPT_ERROR = 3,
4458 /* M1 replay detected */
4459 WCN36XX_HAL_GTK_REKEY_STATUS_REPLAY_ERROR = 4,
4461 /* missing GTK key descriptor in M1 */
4462 WCN36XX_HAL_GTK_REKEY_STATUS_MISSING_KDE = 5,
4464 /* missing iGTK key descriptor in M1 */
4465 WCN36XX_HAL_GTK_REKEY_STATUS_MISSING_IGTK_KDE = 6,
4467 /* key installation error */
4468 WCN36XX_HAL_GTK_REKEY_STATUS_INSTALL_ERROR = 7,
4470 /* iGTK key installation error */
4471 WCN36XX_HAL_GTK_REKEY_STATUS_IGTK_INSTALL_ERROR = 8,
4473 /* GTK rekey M2 response TX error */
4474 WCN36XX_HAL_GTK_REKEY_STATUS_RESP_TX_ERROR = 9,
4476 /* non-specific general error */
4477 WCN36XX_HAL_GTK_REKEY_STATUS_GEN_ERROR = 255
4480 /* wake reason types */
4481 enum wake_reason_type {
4482 WCN36XX_HAL_WAKE_REASON_NONE = 0,
4484 /* magic packet match */
4485 WCN36XX_HAL_WAKE_REASON_MAGIC_PACKET = 1,
4487 /* host defined pattern match */
4488 WCN36XX_HAL_WAKE_REASON_PATTERN_MATCH = 2,
4490 /* EAP-ID frame detected */
4491 WCN36XX_HAL_WAKE_REASON_EAPID_PACKET = 3,
4493 /* start of EAPOL 4-way handshake detected */
4494 WCN36XX_HAL_WAKE_REASON_EAPOL4WAY_PACKET = 4,
4496 /* network scan offload match */
4497 WCN36XX_HAL_WAKE_REASON_NETSCAN_OFFL_MATCH = 5,
4499 /* GTK rekey status wakeup (see status) */
4500 WCN36XX_HAL_WAKE_REASON_GTK_REKEY_STATUS = 6,
4502 /* BSS connection lost */
4503 WCN36XX_HAL_WAKE_REASON_BSS_CONN_LOST = 7,
4507 Wake Packet which is saved at tWakeReasonParams.DataStart
4508 This data is sent for any wake reasons that involve a packet-based wakeup :
4510 WCN36XX_HAL_WAKE_REASON_TYPE_MAGIC_PACKET
4511 WCN36XX_HAL_WAKE_REASON_TYPE_PATTERN_MATCH
4512 WCN36XX_HAL_WAKE_REASON_TYPE_EAPID_PACKET
4513 WCN36XX_HAL_WAKE_REASON_TYPE_EAPOL4WAY_PACKET
4514 WCN36XX_HAL_WAKE_REASON_TYPE_GTK_REKEY_STATUS
4516 The information is provided to the host for auditing and debug purposes
4520 /* Wake reason indication */
4521 struct wcn36xx_hal_wake_reason_ind {
4522 struct wcn36xx_hal_msg_header header;
4524 /* see tWakeReasonType */
4527 /* argument specific to the reason type */
4530 /* length of optional data stored in this message, in case HAL
4531 * truncates the data (i.e. data packets) this length will be less
4532 * than the actual length */
4533 u32 stored_data_len;
4535 /* actual length of data */
4536 u32 actual_data_len;
4538 /* variable length start of data (length == storedDataLen) see
4539 * specific wake type */
4546 #define WCN36XX_HAL_GTK_KEK_BYTES 16
4547 #define WCN36XX_HAL_GTK_KCK_BYTES 16
4549 #define WCN36XX_HAL_GTK_OFFLOAD_FLAGS_DISABLE (1 << 0)
4551 #define GTK_SET_BSS_KEY_TAG 0x1234AA55
4553 struct wcn36xx_hal_gtk_offload_req_msg {
4554 struct wcn36xx_hal_msg_header header;
4556 /* optional flags */
4559 /* Key confirmation key */
4560 u8 kck[WCN36XX_HAL_GTK_KCK_BYTES];
4562 /* key encryption key */
4563 u8 kek[WCN36XX_HAL_GTK_KEK_BYTES];
4565 /* replay counter */
4566 u64 key_replay_counter;
4571 struct wcn36xx_hal_gtk_offload_rsp_msg {
4572 struct wcn36xx_hal_msg_header header;
4574 /* success or failure */
4580 struct wcn36xx_hal_gtk_offload_get_info_req_msg {
4581 struct wcn36xx_hal_msg_header header;
4585 struct wcn36xx_hal_gtk_offload_get_info_rsp_msg {
4586 struct wcn36xx_hal_msg_header header;
4588 /* success or failure */
4591 /* last rekey status when the rekey was offloaded */
4592 u32 last_rekey_status;
4594 /* current replay counter value */
4595 u64 key_replay_counter;
4597 /* total rekey attempts */
4598 u32 total_rekey_count;
4600 /* successful GTK rekeys */
4601 u32 gtk_rekey_count;
4603 /* successful iGTK rekeys */
4604 u32 igtk_rekey_count;
4610 /* Indicates the device mode which indicates about the DHCP activity */
4616 struct dhcp_ind_status {
4617 struct wcn36xx_hal_msg_header header;
4619 /* success or failure */
4624 * Thermal Mitigation mode of operation.
4626 * WCN36XX_HAL_THERMAL_MITIGATION_MODE_0 - Based on AMPDU disabling aggregation
4628 * WCN36XX_HAL_THERMAL_MITIGATION_MODE_1 - Based on AMPDU disabling aggregation
4629 * and reducing transmit power
4631 * WCN36XX_HAL_THERMAL_MITIGATION_MODE_2 - Not supported */
4632 enum wcn36xx_hal_thermal_mitigation_mode_type {
4633 HAL_THERMAL_MITIGATION_MODE_INVALID = -1,
4634 HAL_THERMAL_MITIGATION_MODE_0,
4635 HAL_THERMAL_MITIGATION_MODE_1,
4636 HAL_THERMAL_MITIGATION_MODE_2,
4637 HAL_THERMAL_MITIGATION_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
4642 * Thermal Mitigation level.
4643 * Note the levels are incremental i.e WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_2 =
4644 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_0 +
4645 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_1
4647 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_0 - lowest level of thermal mitigation.
4648 * This level indicates normal mode of operation
4650 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_1 - 1st level of thermal mitigation
4652 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_2 - 2nd level of thermal mitigation
4654 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_3 - 3rd level of thermal mitigation
4656 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_4 - 4th level of thermal mitigation
4658 enum wcn36xx_hal_thermal_mitigation_level_type {
4659 HAL_THERMAL_MITIGATION_LEVEL_INVALID = -1,
4660 HAL_THERMAL_MITIGATION_LEVEL_0,
4661 HAL_THERMAL_MITIGATION_LEVEL_1,
4662 HAL_THERMAL_MITIGATION_LEVEL_2,
4663 HAL_THERMAL_MITIGATION_LEVEL_3,
4664 HAL_THERMAL_MITIGATION_LEVEL_4,
4665 HAL_THERMAL_MITIGATION_LEVEL_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
4669 /* WCN36XX_HAL_SET_THERMAL_MITIGATION_REQ */
4670 struct set_thermal_mitigation_req_msg {
4671 struct wcn36xx_hal_msg_header header;
4673 /* Thermal Mitigation Operation Mode */
4674 enum wcn36xx_hal_thermal_mitigation_mode_type mode;
4676 /* Thermal Mitigation Level */
4677 enum wcn36xx_hal_thermal_mitigation_level_type level;
4680 struct set_thermal_mitigation_resp {
4682 struct wcn36xx_hal_msg_header header;
4684 /* status of the request */
4688 /* Per STA Class B Statistics. Class B statistics are STA TX/RX stats
4689 * provided to FW from Host via periodic messages */
4690 struct stats_class_b_ind {
4691 struct wcn36xx_hal_msg_header header;
4693 /* Duration over which this stats was collected */
4699 u32 tx_bytes_pushed;
4700 u32 tx_packets_pushed;
4704 u32 rx_packets_rcvd;
4708 /* WCN36XX_HAL_PRINT_REG_INFO_IND */
4709 struct wcn36xx_hal_print_reg_info_ind {
4710 struct wcn36xx_hal_msg_header header;
4722 #endif /* _HAL_H_ */