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 /* How many frames until we start a-mpdu TX session */
92 #define WCN36XX_AMPDU_START_THRESH 20
94 #define WCN36XX_MAX_SCAN_SSIDS 9
95 #define WCN36XX_MAX_SCAN_IE_LEN 500
97 /* message types for messages exchanged between WDI and HAL */
98 enum wcn36xx_hal_host_msg_type {
100 WCN36XX_HAL_START_REQ = 0,
101 WCN36XX_HAL_START_RSP = 1,
102 WCN36XX_HAL_STOP_REQ = 2,
103 WCN36XX_HAL_STOP_RSP = 3,
106 WCN36XX_HAL_INIT_SCAN_REQ = 4,
107 WCN36XX_HAL_INIT_SCAN_RSP = 5,
108 WCN36XX_HAL_START_SCAN_REQ = 6,
109 WCN36XX_HAL_START_SCAN_RSP = 7,
110 WCN36XX_HAL_END_SCAN_REQ = 8,
111 WCN36XX_HAL_END_SCAN_RSP = 9,
112 WCN36XX_HAL_FINISH_SCAN_REQ = 10,
113 WCN36XX_HAL_FINISH_SCAN_RSP = 11,
115 /* HW STA configuration/deconfiguration */
116 WCN36XX_HAL_CONFIG_STA_REQ = 12,
117 WCN36XX_HAL_CONFIG_STA_RSP = 13,
118 WCN36XX_HAL_DELETE_STA_REQ = 14,
119 WCN36XX_HAL_DELETE_STA_RSP = 15,
120 WCN36XX_HAL_CONFIG_BSS_REQ = 16,
121 WCN36XX_HAL_CONFIG_BSS_RSP = 17,
122 WCN36XX_HAL_DELETE_BSS_REQ = 18,
123 WCN36XX_HAL_DELETE_BSS_RSP = 19,
125 /* Infra STA asscoiation */
126 WCN36XX_HAL_JOIN_REQ = 20,
127 WCN36XX_HAL_JOIN_RSP = 21,
128 WCN36XX_HAL_POST_ASSOC_REQ = 22,
129 WCN36XX_HAL_POST_ASSOC_RSP = 23,
132 WCN36XX_HAL_SET_BSSKEY_REQ = 24,
133 WCN36XX_HAL_SET_BSSKEY_RSP = 25,
134 WCN36XX_HAL_SET_STAKEY_REQ = 26,
135 WCN36XX_HAL_SET_STAKEY_RSP = 27,
136 WCN36XX_HAL_RMV_BSSKEY_REQ = 28,
137 WCN36XX_HAL_RMV_BSSKEY_RSP = 29,
138 WCN36XX_HAL_RMV_STAKEY_REQ = 30,
139 WCN36XX_HAL_RMV_STAKEY_RSP = 31,
142 WCN36XX_HAL_ADD_TS_REQ = 32,
143 WCN36XX_HAL_ADD_TS_RSP = 33,
144 WCN36XX_HAL_DEL_TS_REQ = 34,
145 WCN36XX_HAL_DEL_TS_RSP = 35,
146 WCN36XX_HAL_UPD_EDCA_PARAMS_REQ = 36,
147 WCN36XX_HAL_UPD_EDCA_PARAMS_RSP = 37,
148 WCN36XX_HAL_ADD_BA_REQ = 38,
149 WCN36XX_HAL_ADD_BA_RSP = 39,
150 WCN36XX_HAL_DEL_BA_REQ = 40,
151 WCN36XX_HAL_DEL_BA_RSP = 41,
153 WCN36XX_HAL_CH_SWITCH_REQ = 42,
154 WCN36XX_HAL_CH_SWITCH_RSP = 43,
155 WCN36XX_HAL_SET_LINK_ST_REQ = 44,
156 WCN36XX_HAL_SET_LINK_ST_RSP = 45,
157 WCN36XX_HAL_GET_STATS_REQ = 46,
158 WCN36XX_HAL_GET_STATS_RSP = 47,
159 WCN36XX_HAL_UPDATE_CFG_REQ = 48,
160 WCN36XX_HAL_UPDATE_CFG_RSP = 49,
162 WCN36XX_HAL_MISSED_BEACON_IND = 50,
163 WCN36XX_HAL_UNKNOWN_ADDR2_FRAME_RX_IND = 51,
164 WCN36XX_HAL_MIC_FAILURE_IND = 52,
165 WCN36XX_HAL_FATAL_ERROR_IND = 53,
166 WCN36XX_HAL_SET_KEYDONE_MSG = 54,
169 WCN36XX_HAL_DOWNLOAD_NV_REQ = 55,
170 WCN36XX_HAL_DOWNLOAD_NV_RSP = 56,
172 WCN36XX_HAL_ADD_BA_SESSION_REQ = 57,
173 WCN36XX_HAL_ADD_BA_SESSION_RSP = 58,
174 WCN36XX_HAL_TRIGGER_BA_REQ = 59,
175 WCN36XX_HAL_TRIGGER_BA_RSP = 60,
176 WCN36XX_HAL_UPDATE_BEACON_REQ = 61,
177 WCN36XX_HAL_UPDATE_BEACON_RSP = 62,
178 WCN36XX_HAL_SEND_BEACON_REQ = 63,
179 WCN36XX_HAL_SEND_BEACON_RSP = 64,
181 WCN36XX_HAL_SET_BCASTKEY_REQ = 65,
182 WCN36XX_HAL_SET_BCASTKEY_RSP = 66,
183 WCN36XX_HAL_DELETE_STA_CONTEXT_IND = 67,
184 WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ = 68,
185 WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_RSP = 69,
187 /* PTT interface support */
188 WCN36XX_HAL_PROCESS_PTT_REQ = 70,
189 WCN36XX_HAL_PROCESS_PTT_RSP = 71,
191 /* BTAMP related events */
192 WCN36XX_HAL_SIGNAL_BTAMP_EVENT_REQ = 72,
193 WCN36XX_HAL_SIGNAL_BTAMP_EVENT_RSP = 73,
194 WCN36XX_HAL_TL_HAL_FLUSH_AC_REQ = 74,
195 WCN36XX_HAL_TL_HAL_FLUSH_AC_RSP = 75,
197 WCN36XX_HAL_ENTER_IMPS_REQ = 76,
198 WCN36XX_HAL_EXIT_IMPS_REQ = 77,
199 WCN36XX_HAL_ENTER_BMPS_REQ = 78,
200 WCN36XX_HAL_EXIT_BMPS_REQ = 79,
201 WCN36XX_HAL_ENTER_UAPSD_REQ = 80,
202 WCN36XX_HAL_EXIT_UAPSD_REQ = 81,
203 WCN36XX_HAL_UPDATE_UAPSD_PARAM_REQ = 82,
204 WCN36XX_HAL_CONFIGURE_RXP_FILTER_REQ = 83,
205 WCN36XX_HAL_ADD_BCN_FILTER_REQ = 84,
206 WCN36XX_HAL_REM_BCN_FILTER_REQ = 85,
207 WCN36XX_HAL_ADD_WOWL_BCAST_PTRN = 86,
208 WCN36XX_HAL_DEL_WOWL_BCAST_PTRN = 87,
209 WCN36XX_HAL_ENTER_WOWL_REQ = 88,
210 WCN36XX_HAL_EXIT_WOWL_REQ = 89,
211 WCN36XX_HAL_HOST_OFFLOAD_REQ = 90,
212 WCN36XX_HAL_SET_RSSI_THRESH_REQ = 91,
213 WCN36XX_HAL_GET_RSSI_REQ = 92,
214 WCN36XX_HAL_SET_UAPSD_AC_PARAMS_REQ = 93,
215 WCN36XX_HAL_CONFIGURE_APPS_CPU_WAKEUP_STATE_REQ = 94,
217 WCN36XX_HAL_ENTER_IMPS_RSP = 95,
218 WCN36XX_HAL_EXIT_IMPS_RSP = 96,
219 WCN36XX_HAL_ENTER_BMPS_RSP = 97,
220 WCN36XX_HAL_EXIT_BMPS_RSP = 98,
221 WCN36XX_HAL_ENTER_UAPSD_RSP = 99,
222 WCN36XX_HAL_EXIT_UAPSD_RSP = 100,
223 WCN36XX_HAL_SET_UAPSD_AC_PARAMS_RSP = 101,
224 WCN36XX_HAL_UPDATE_UAPSD_PARAM_RSP = 102,
225 WCN36XX_HAL_CONFIGURE_RXP_FILTER_RSP = 103,
226 WCN36XX_HAL_ADD_BCN_FILTER_RSP = 104,
227 WCN36XX_HAL_REM_BCN_FILTER_RSP = 105,
228 WCN36XX_HAL_SET_RSSI_THRESH_RSP = 106,
229 WCN36XX_HAL_HOST_OFFLOAD_RSP = 107,
230 WCN36XX_HAL_ADD_WOWL_BCAST_PTRN_RSP = 108,
231 WCN36XX_HAL_DEL_WOWL_BCAST_PTRN_RSP = 109,
232 WCN36XX_HAL_ENTER_WOWL_RSP = 110,
233 WCN36XX_HAL_EXIT_WOWL_RSP = 111,
234 WCN36XX_HAL_RSSI_NOTIFICATION_IND = 112,
235 WCN36XX_HAL_GET_RSSI_RSP = 113,
236 WCN36XX_HAL_CONFIGURE_APPS_CPU_WAKEUP_STATE_RSP = 114,
238 /* 11k related events */
239 WCN36XX_HAL_SET_MAX_TX_POWER_REQ = 115,
240 WCN36XX_HAL_SET_MAX_TX_POWER_RSP = 116,
242 /* 11R related msgs */
243 WCN36XX_HAL_AGGR_ADD_TS_REQ = 117,
244 WCN36XX_HAL_AGGR_ADD_TS_RSP = 118,
246 /* P2P WLAN_FEATURE_P2P */
247 WCN36XX_HAL_SET_P2P_GONOA_REQ = 119,
248 WCN36XX_HAL_SET_P2P_GONOA_RSP = 120,
250 /* WLAN Dump commands */
251 WCN36XX_HAL_DUMP_COMMAND_REQ = 121,
252 WCN36XX_HAL_DUMP_COMMAND_RSP = 122,
254 /* OEM_DATA FEATURE SUPPORT */
255 WCN36XX_HAL_START_OEM_DATA_REQ = 123,
256 WCN36XX_HAL_START_OEM_DATA_RSP = 124,
258 /* ADD SELF STA REQ and RSP */
259 WCN36XX_HAL_ADD_STA_SELF_REQ = 125,
260 WCN36XX_HAL_ADD_STA_SELF_RSP = 126,
262 /* DEL SELF STA SUPPORT */
263 WCN36XX_HAL_DEL_STA_SELF_REQ = 127,
264 WCN36XX_HAL_DEL_STA_SELF_RSP = 128,
266 /* Coex Indication */
267 WCN36XX_HAL_COEX_IND = 129,
269 /* Tx Complete Indication */
270 WCN36XX_HAL_OTA_TX_COMPL_IND = 130,
272 /* Host Suspend/resume messages */
273 WCN36XX_HAL_HOST_SUSPEND_IND = 131,
274 WCN36XX_HAL_HOST_RESUME_REQ = 132,
275 WCN36XX_HAL_HOST_RESUME_RSP = 133,
277 WCN36XX_HAL_SET_TX_POWER_REQ = 134,
278 WCN36XX_HAL_SET_TX_POWER_RSP = 135,
279 WCN36XX_HAL_GET_TX_POWER_REQ = 136,
280 WCN36XX_HAL_GET_TX_POWER_RSP = 137,
282 WCN36XX_HAL_P2P_NOA_ATTR_IND = 138,
284 WCN36XX_HAL_ENABLE_RADAR_DETECT_REQ = 139,
285 WCN36XX_HAL_ENABLE_RADAR_DETECT_RSP = 140,
286 WCN36XX_HAL_GET_TPC_REPORT_REQ = 141,
287 WCN36XX_HAL_GET_TPC_REPORT_RSP = 142,
288 WCN36XX_HAL_RADAR_DETECT_IND = 143,
289 WCN36XX_HAL_RADAR_DETECT_INTR_IND = 144,
290 WCN36XX_HAL_KEEP_ALIVE_REQ = 145,
291 WCN36XX_HAL_KEEP_ALIVE_RSP = 146,
294 WCN36XX_HAL_SET_PREF_NETWORK_REQ = 147,
295 WCN36XX_HAL_SET_PREF_NETWORK_RSP = 148,
296 WCN36XX_HAL_SET_RSSI_FILTER_REQ = 149,
297 WCN36XX_HAL_SET_RSSI_FILTER_RSP = 150,
298 WCN36XX_HAL_UPDATE_SCAN_PARAM_REQ = 151,
299 WCN36XX_HAL_UPDATE_SCAN_PARAM_RSP = 152,
300 WCN36XX_HAL_PREF_NETW_FOUND_IND = 153,
302 WCN36XX_HAL_SET_TX_PER_TRACKING_REQ = 154,
303 WCN36XX_HAL_SET_TX_PER_TRACKING_RSP = 155,
304 WCN36XX_HAL_TX_PER_HIT_IND = 156,
306 WCN36XX_HAL_8023_MULTICAST_LIST_REQ = 157,
307 WCN36XX_HAL_8023_MULTICAST_LIST_RSP = 158,
309 WCN36XX_HAL_SET_PACKET_FILTER_REQ = 159,
310 WCN36XX_HAL_SET_PACKET_FILTER_RSP = 160,
311 WCN36XX_HAL_PACKET_FILTER_MATCH_COUNT_REQ = 161,
312 WCN36XX_HAL_PACKET_FILTER_MATCH_COUNT_RSP = 162,
313 WCN36XX_HAL_CLEAR_PACKET_FILTER_REQ = 163,
314 WCN36XX_HAL_CLEAR_PACKET_FILTER_RSP = 164,
317 * This is temp fix. Should be removed once Host and Riva code is
320 WCN36XX_HAL_INIT_SCAN_CON_REQ = 165,
322 WCN36XX_HAL_SET_POWER_PARAMS_REQ = 166,
323 WCN36XX_HAL_SET_POWER_PARAMS_RSP = 167,
325 WCN36XX_HAL_TSM_STATS_REQ = 168,
326 WCN36XX_HAL_TSM_STATS_RSP = 169,
328 /* wake reason indication (WOW) */
329 WCN36XX_HAL_WAKE_REASON_IND = 170,
331 /* GTK offload support */
332 WCN36XX_HAL_GTK_OFFLOAD_REQ = 171,
333 WCN36XX_HAL_GTK_OFFLOAD_RSP = 172,
334 WCN36XX_HAL_GTK_OFFLOAD_GETINFO_REQ = 173,
335 WCN36XX_HAL_GTK_OFFLOAD_GETINFO_RSP = 174,
337 WCN36XX_HAL_FEATURE_CAPS_EXCHANGE_REQ = 175,
338 WCN36XX_HAL_FEATURE_CAPS_EXCHANGE_RSP = 176,
339 WCN36XX_HAL_EXCLUDE_UNENCRYPTED_IND = 177,
341 WCN36XX_HAL_SET_THERMAL_MITIGATION_REQ = 178,
342 WCN36XX_HAL_SET_THERMAL_MITIGATION_RSP = 179,
344 WCN36XX_HAL_UPDATE_VHT_OP_MODE_REQ = 182,
345 WCN36XX_HAL_UPDATE_VHT_OP_MODE_RSP = 183,
347 WCN36XX_HAL_P2P_NOA_START_IND = 184,
349 WCN36XX_HAL_GET_ROAM_RSSI_REQ = 185,
350 WCN36XX_HAL_GET_ROAM_RSSI_RSP = 186,
352 WCN36XX_HAL_CLASS_B_STATS_IND = 187,
353 WCN36XX_HAL_DEL_BA_IND = 188,
354 WCN36XX_HAL_DHCP_START_IND = 189,
355 WCN36XX_HAL_DHCP_STOP_IND = 190,
357 /* Scan Offload(hw) APIs */
358 WCN36XX_HAL_START_SCAN_OFFLOAD_REQ = 204,
359 WCN36XX_HAL_START_SCAN_OFFLOAD_RSP = 205,
360 WCN36XX_HAL_STOP_SCAN_OFFLOAD_REQ = 206,
361 WCN36XX_HAL_STOP_SCAN_OFFLOAD_RSP = 207,
362 WCN36XX_HAL_SCAN_OFFLOAD_IND = 210,
364 WCN36XX_HAL_AVOID_FREQ_RANGE_IND = 233,
366 WCN36XX_HAL_PRINT_REG_INFO_IND = 259,
368 WCN36XX_HAL_MSG_MAX = WCN36XX_HAL_MSG_TYPE_MAX_ENUM_SIZE
371 /* Enumeration for Version */
372 enum wcn36xx_hal_host_msg_version {
373 WCN36XX_HAL_MSG_VERSION0 = 0,
374 WCN36XX_HAL_MSG_VERSION1 = 1,
375 /* define as 2 bytes data */
376 WCN36XX_HAL_MSG_WCNSS_CTRL_VERSION = 0x7FFF,
377 WCN36XX_HAL_MSG_VERSION_MAX_FIELD = WCN36XX_HAL_MSG_WCNSS_CTRL_VERSION
381 DRIVER_TYPE_PRODUCTION = 0,
384 DRIVER_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
387 enum wcn36xx_hal_stop_type {
388 HAL_STOP_TYPE_SYS_RESET,
389 HAL_STOP_TYPE_SYS_DEEP_SLEEP,
390 HAL_STOP_TYPE_RF_KILL,
391 HAL_STOP_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
394 enum wcn36xx_hal_sys_mode {
398 HAL_SYS_MODE_PROMISC,
399 HAL_SYS_MODE_SUSPEND_LINK,
400 HAL_SYS_MODE_ROAM_SCAN,
401 HAL_SYS_MODE_ROAM_SUSPEND_LINK,
402 HAL_SYS_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
405 enum phy_chan_bond_state {
406 /* 20MHz IF bandwidth centered on IF carrier */
407 PHY_SINGLE_CHANNEL_CENTERED = 0,
409 /* 40MHz IF bandwidth with lower 20MHz supporting the primary channel */
410 PHY_DOUBLE_CHANNEL_LOW_PRIMARY = 1,
412 /* 40MHz IF bandwidth centered on IF carrier */
413 PHY_DOUBLE_CHANNEL_CENTERED = 2,
415 /* 40MHz IF bandwidth with higher 20MHz supporting the primary ch */
416 PHY_DOUBLE_CHANNEL_HIGH_PRIMARY = 3,
418 /* 20/40MHZ offset LOW 40/80MHZ offset CENTERED */
419 PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED = 4,
421 /* 20/40MHZ offset CENTERED 40/80MHZ offset CENTERED */
422 PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED = 5,
424 /* 20/40MHZ offset HIGH 40/80MHZ offset CENTERED */
425 PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED = 6,
427 /* 20/40MHZ offset LOW 40/80MHZ offset LOW */
428 PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW = 7,
430 /* 20/40MHZ offset HIGH 40/80MHZ offset LOW */
431 PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW = 8,
433 /* 20/40MHZ offset LOW 40/80MHZ offset HIGH */
434 PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH = 9,
436 /* 20/40MHZ offset-HIGH 40/80MHZ offset HIGH */
437 PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH = 10,
439 PHY_CHANNEL_BONDING_STATE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
442 /* Spatial Multiplexing(SM) Power Save mode */
443 enum wcn36xx_hal_ht_mimo_state {
444 /* Static SM Power Save mode */
445 WCN36XX_HAL_HT_MIMO_PS_STATIC = 0,
447 /* Dynamic SM Power Save mode */
448 WCN36XX_HAL_HT_MIMO_PS_DYNAMIC = 1,
451 WCN36XX_HAL_HT_MIMO_PS_NA = 2,
453 /* SM Power Save disabled */
454 WCN36XX_HAL_HT_MIMO_PS_NO_LIMIT = 3,
456 WCN36XX_HAL_HT_MIMO_PS_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
459 /* each station added has a rate mode which specifies the sta attributes */
469 STA_INVALID_RATE_MODE = WCN36XX_HAL_MAX_ENUM_SIZE
473 #define WCN36XX_HAL_NUM_DSSS_RATES 4
475 /* 6,9,12,18,24,36,48,54 */
476 #define WCN36XX_HAL_NUM_OFDM_RATES 8
479 #define WCN36XX_HAL_NUM_POLARIS_RATES 3
481 #define WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET 16
483 enum wcn36xx_hal_bss_type {
484 WCN36XX_HAL_INFRASTRUCTURE_MODE,
486 /* Added for softAP support */
487 WCN36XX_HAL_INFRA_AP_MODE,
489 WCN36XX_HAL_IBSS_MODE,
491 /* Added for BT-AMP support */
492 WCN36XX_HAL_BTAMP_STA_MODE,
494 /* Added for BT-AMP support */
495 WCN36XX_HAL_BTAMP_AP_MODE,
497 WCN36XX_HAL_AUTO_MODE,
499 WCN36XX_HAL_DONOT_USE_BSS_TYPE = WCN36XX_HAL_MAX_ENUM_SIZE
502 enum wcn36xx_hal_nw_type {
503 WCN36XX_HAL_11A_NW_TYPE,
504 WCN36XX_HAL_11B_NW_TYPE,
505 WCN36XX_HAL_11G_NW_TYPE,
506 WCN36XX_HAL_11N_NW_TYPE,
507 WCN36XX_HAL_DONOT_USE_NW_TYPE = WCN36XX_HAL_MAX_ENUM_SIZE
510 #define WCN36XX_HAL_MAC_RATESET_EID_MAX 12
512 enum wcn36xx_hal_ht_operating_mode {
514 WCN36XX_HAL_HT_OP_MODE_PURE,
516 /* Overlap Legacy device present, protection is optional */
517 WCN36XX_HAL_HT_OP_MODE_OVERLAP_LEGACY,
519 /* No legacy device, but 20 MHz HT present */
520 WCN36XX_HAL_HT_OP_MODE_NO_LEGACY_20MHZ_HT,
522 /* Protection is required */
523 WCN36XX_HAL_HT_OP_MODE_MIXED,
525 WCN36XX_HAL_HT_OP_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
528 /* Encryption type enum used with peer */
531 WCN36XX_HAL_ED_WEP40,
532 WCN36XX_HAL_ED_WEP104,
536 WCN36XX_HAL_ED_AES_128_CMAC,
537 WCN36XX_HAL_ED_NOT_IMPLEMENTED = WCN36XX_HAL_MAX_ENUM_SIZE
540 #define WLAN_MAX_KEY_RSC_LEN 16
541 #define WLAN_WAPI_KEY_RSC_LEN 16
543 /* MAX key length when ULA is used */
544 #define WCN36XX_HAL_MAC_MAX_KEY_LENGTH 32
545 #define WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS 4
548 * Enum to specify whether key is used for TX only, RX only or both.
550 enum ani_key_direction {
554 WCN36XX_HAL_TX_DEFAULT,
555 WCN36XX_HAL_DONOT_USE_KEY_DIRECTION = WCN36XX_HAL_MAX_ENUM_SIZE
559 WCN36XX_HAL_WEP_STATIC,
560 WCN36XX_HAL_WEP_DYNAMIC,
561 WCN36XX_HAL_WEP_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
564 enum wcn36xx_hal_link_state {
566 WCN36XX_HAL_LINK_IDLE_STATE = 0,
567 WCN36XX_HAL_LINK_PREASSOC_STATE = 1,
568 WCN36XX_HAL_LINK_POSTASSOC_STATE = 2,
569 WCN36XX_HAL_LINK_AP_STATE = 3,
570 WCN36XX_HAL_LINK_IBSS_STATE = 4,
573 WCN36XX_HAL_LINK_BTAMP_PREASSOC_STATE = 5,
574 WCN36XX_HAL_LINK_BTAMP_POSTASSOC_STATE = 6,
575 WCN36XX_HAL_LINK_BTAMP_AP_STATE = 7,
576 WCN36XX_HAL_LINK_BTAMP_STA_STATE = 8,
578 /* Reserved for HAL Internal Use */
579 WCN36XX_HAL_LINK_LEARN_STATE = 9,
580 WCN36XX_HAL_LINK_SCAN_STATE = 10,
581 WCN36XX_HAL_LINK_FINISH_SCAN_STATE = 11,
582 WCN36XX_HAL_LINK_INIT_CAL_STATE = 12,
583 WCN36XX_HAL_LINK_FINISH_CAL_STATE = 13,
584 WCN36XX_HAL_LINK_LISTEN_STATE = 14,
586 WCN36XX_HAL_LINK_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
589 enum wcn36xx_hal_stats_mask {
590 HAL_SUMMARY_STATS_INFO = 0x00000001,
591 HAL_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
592 HAL_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
593 HAL_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
594 HAL_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
595 HAL_PER_STA_STATS_INFO = 0x00000020
598 /* BT-AMP events type */
599 enum bt_amp_event_type {
600 BTAMP_EVENT_CONNECTION_START,
601 BTAMP_EVENT_CONNECTION_STOP,
602 BTAMP_EVENT_CONNECTION_TERMINATED,
604 /* This and beyond are invalid values */
605 BTAMP_EVENT_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
610 PE_SUMMARY_STATS_INFO = 0x00000001,
611 PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
612 PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
613 PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
614 PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
615 PE_PER_STA_STATS_INFO = 0x00000020,
617 /* This and beyond are invalid values */
618 PE_STATS_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
622 * Configuration Parameter IDs
624 #define WCN36XX_HAL_CFG_STA_ID 0
625 #define WCN36XX_HAL_CFG_CURRENT_TX_ANTENNA 1
626 #define WCN36XX_HAL_CFG_CURRENT_RX_ANTENNA 2
627 #define WCN36XX_HAL_CFG_LOW_GAIN_OVERRIDE 3
628 #define WCN36XX_HAL_CFG_POWER_STATE_PER_CHAIN 4
629 #define WCN36XX_HAL_CFG_CAL_PERIOD 5
630 #define WCN36XX_HAL_CFG_CAL_CONTROL 6
631 #define WCN36XX_HAL_CFG_PROXIMITY 7
632 #define WCN36XX_HAL_CFG_NETWORK_DENSITY 8
633 #define WCN36XX_HAL_CFG_MAX_MEDIUM_TIME 9
634 #define WCN36XX_HAL_CFG_MAX_MPDUS_IN_AMPDU 10
635 #define WCN36XX_HAL_CFG_RTS_THRESHOLD 11
636 #define WCN36XX_HAL_CFG_SHORT_RETRY_LIMIT 12
637 #define WCN36XX_HAL_CFG_LONG_RETRY_LIMIT 13
638 #define WCN36XX_HAL_CFG_FRAGMENTATION_THRESHOLD 14
639 #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_ZERO 15
640 #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_ONE 16
641 #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_TWO 17
642 #define WCN36XX_HAL_CFG_FIXED_RATE 18
643 #define WCN36XX_HAL_CFG_RETRYRATE_POLICY 19
644 #define WCN36XX_HAL_CFG_RETRYRATE_SECONDARY 20
645 #define WCN36XX_HAL_CFG_RETRYRATE_TERTIARY 21
646 #define WCN36XX_HAL_CFG_FORCE_POLICY_PROTECTION 22
647 #define WCN36XX_HAL_CFG_FIXED_RATE_MULTICAST_24GHZ 23
648 #define WCN36XX_HAL_CFG_FIXED_RATE_MULTICAST_5GHZ 24
649 #define WCN36XX_HAL_CFG_DEFAULT_RATE_INDEX_24GHZ 25
650 #define WCN36XX_HAL_CFG_DEFAULT_RATE_INDEX_5GHZ 26
651 #define WCN36XX_HAL_CFG_MAX_BA_SESSIONS 27
652 #define WCN36XX_HAL_CFG_PS_DATA_INACTIVITY_TIMEOUT 28
653 #define WCN36XX_HAL_CFG_PS_ENABLE_BCN_FILTER 29
654 #define WCN36XX_HAL_CFG_PS_ENABLE_RSSI_MONITOR 30
655 #define WCN36XX_HAL_CFG_NUM_BEACON_PER_RSSI_AVERAGE 31
656 #define WCN36XX_HAL_CFG_STATS_PERIOD 32
657 #define WCN36XX_HAL_CFG_CFP_MAX_DURATION 33
658 #define WCN36XX_HAL_CFG_FRAME_TRANS_ENABLED 34
659 #define WCN36XX_HAL_CFG_DTIM_PERIOD 35
660 #define WCN36XX_HAL_CFG_EDCA_WMM_ACBK 36
661 #define WCN36XX_HAL_CFG_EDCA_WMM_ACBE 37
662 #define WCN36XX_HAL_CFG_EDCA_WMM_ACVO 38
663 #define WCN36XX_HAL_CFG_EDCA_WMM_ACVI 39
664 #define WCN36XX_HAL_CFG_BA_THRESHOLD_HIGH 40
665 #define WCN36XX_HAL_CFG_MAX_BA_BUFFERS 41
666 #define WCN36XX_HAL_CFG_RPE_POLLING_THRESHOLD 42
667 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG 43
668 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG 44
669 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG 45
670 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG 46
671 #define WCN36XX_HAL_CFG_NO_OF_ONCHIP_REORDER_SESSIONS 47
672 #define WCN36XX_HAL_CFG_PS_LISTEN_INTERVAL 48
673 #define WCN36XX_HAL_CFG_PS_HEART_BEAT_THRESHOLD 49
674 #define WCN36XX_HAL_CFG_PS_NTH_BEACON_FILTER 50
675 #define WCN36XX_HAL_CFG_PS_MAX_PS_POLL 51
676 #define WCN36XX_HAL_CFG_PS_MIN_RSSI_THRESHOLD 52
677 #define WCN36XX_HAL_CFG_PS_RSSI_FILTER_PERIOD 53
678 #define WCN36XX_HAL_CFG_PS_BROADCAST_FRAME_FILTER_ENABLE 54
679 #define WCN36XX_HAL_CFG_PS_IGNORE_DTIM 55
680 #define WCN36XX_HAL_CFG_PS_ENABLE_BCN_EARLY_TERM 56
681 #define WCN36XX_HAL_CFG_DYNAMIC_PS_POLL_VALUE 57
682 #define WCN36XX_HAL_CFG_PS_NULLDATA_AP_RESP_TIMEOUT 58
683 #define WCN36XX_HAL_CFG_TELE_BCN_WAKEUP_EN 59
684 #define WCN36XX_HAL_CFG_TELE_BCN_TRANS_LI 60
685 #define WCN36XX_HAL_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS 61
686 #define WCN36XX_HAL_CFG_TELE_BCN_MAX_LI 62
687 #define WCN36XX_HAL_CFG_TELE_BCN_MAX_LI_IDLE_BCNS 63
688 #define WCN36XX_HAL_CFG_TX_PWR_CTRL_ENABLE 64
689 #define WCN36XX_HAL_CFG_VALID_RADAR_CHANNEL_LIST 65
690 #define WCN36XX_HAL_CFG_TX_POWER_24_20 66
691 #define WCN36XX_HAL_CFG_TX_POWER_24_40 67
692 #define WCN36XX_HAL_CFG_TX_POWER_50_20 68
693 #define WCN36XX_HAL_CFG_TX_POWER_50_40 69
694 #define WCN36XX_HAL_CFG_MCAST_BCAST_FILTER_SETTING 70
695 #define WCN36XX_HAL_CFG_BCN_EARLY_TERM_WAKEUP_INTERVAL 71
696 #define WCN36XX_HAL_CFG_MAX_TX_POWER_2_4 72
697 #define WCN36XX_HAL_CFG_MAX_TX_POWER_5 73
698 #define WCN36XX_HAL_CFG_INFRA_STA_KEEP_ALIVE_PERIOD 74
699 #define WCN36XX_HAL_CFG_ENABLE_CLOSE_LOOP 75
700 #define WCN36XX_HAL_CFG_BTC_EXECUTION_MODE 76
701 #define WCN36XX_HAL_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK 77
702 #define WCN36XX_HAL_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS 78
703 #define WCN36XX_HAL_CFG_PS_TX_INACTIVITY_TIMEOUT 79
704 #define WCN36XX_HAL_CFG_WCNSS_API_VERSION 80
705 #define WCN36XX_HAL_CFG_AP_KEEPALIVE_TIMEOUT 81
706 #define WCN36XX_HAL_CFG_GO_KEEPALIVE_TIMEOUT 82
707 #define WCN36XX_HAL_CFG_ENABLE_MC_ADDR_LIST 83
708 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_INQ_BT 84
709 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_PAGE_BT 85
710 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_CONN_BT 86
711 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_LE_BT 87
712 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_INQ_WLAN 88
713 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_PAGE_WLAN 89
714 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_CONN_WLAN 90
715 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_LE_WLAN 91
716 #define WCN36XX_HAL_CFG_BTC_DYN_MAX_LEN_BT 92
717 #define WCN36XX_HAL_CFG_BTC_DYN_MAX_LEN_WLAN 93
718 #define WCN36XX_HAL_CFG_BTC_MAX_SCO_BLOCK_PERC 94
719 #define WCN36XX_HAL_CFG_BTC_DHCP_PROT_ON_A2DP 95
720 #define WCN36XX_HAL_CFG_BTC_DHCP_PROT_ON_SCO 96
721 #define WCN36XX_HAL_CFG_ENABLE_UNICAST_FILTER 97
722 #define WCN36XX_HAL_CFG_MAX_ASSOC_LIMIT 98
723 #define WCN36XX_HAL_CFG_ENABLE_LPWR_IMG_TRANSITION 99
724 #define WCN36XX_HAL_CFG_ENABLE_MCC_ADAPTIVE_SCHEDULER 100
725 #define WCN36XX_HAL_CFG_ENABLE_DETECT_PS_SUPPORT 101
726 #define WCN36XX_HAL_CFG_AP_LINK_MONITOR_TIMEOUT 102
727 #define WCN36XX_HAL_CFG_BTC_DWELL_TIME_MULTIPLIER 103
728 #define WCN36XX_HAL_CFG_ENABLE_TDLS_OXYGEN_MODE 104
729 #define WCN36XX_HAL_CFG_MAX_PARAMS 105
731 /* Message definitons - All the messages below need to be packed */
733 /* Definition for HAL API Version. */
734 struct wcnss_wlan_version {
741 /* Definition for Encryption Keys */
742 struct wcn36xx_hal_keys {
745 /* 0 for multicast */
748 enum ani_key_direction direction;
750 /* Usage is unknown */
751 u8 rsc[WLAN_MAX_KEY_RSC_LEN];
753 /* =1 for authenticator,=0 for supplicant */
757 u8 key[WCN36XX_HAL_MAC_MAX_KEY_LENGTH];
761 * set_sta_key_params Moving here since it is shared by
762 * configbss/setstakey msgs
764 struct wcn36xx_hal_set_sta_key_params {
768 /* Encryption Type used with peer */
769 enum ani_ed_type enc_type;
771 /* STATIC/DYNAMIC - valid only for WEP */
772 enum ani_wep_type wep_type;
774 /* Default WEP key, valid only for static WEP, must between 0 and 3. */
777 /* valid only for non-static WEP encyrptions */
778 struct wcn36xx_hal_keys key[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS];
781 * Control for Replay Count, 1= Single TID based replay count on Tx
782 * 0 = Per TID based replay count on TX
788 /* 4-byte control message header used by HAL*/
789 struct wcn36xx_hal_msg_header {
790 enum wcn36xx_hal_host_msg_type msg_type:16;
791 enum wcn36xx_hal_host_msg_version msg_version:16;
795 /* Config format required by HAL for each CFG item*/
796 struct wcn36xx_hal_cfg {
797 /* Cfg Id. The Id required by HAL is exported by HAL
798 * in shared header file between UMAC and HAL.*/
801 /* Length of the Cfg. This parameter is used to go to next cfg
802 * in the TLV format.*/
805 /* Padding bytes for unaligned address's */
808 /* Reserve bytes for making cfgVal to align address */
811 /* Following the uCfgLen field there should be a 'uCfgLen' bytes
812 * containing the uCfgValue ; u8 uCfgValue[uCfgLen] */
815 struct wcn36xx_hal_mac_start_parameters {
816 /* Drive Type - Production or FTM etc */
817 enum driver_type type;
819 /* Length of the config buffer */
822 /* Following this there is a TLV formatted buffer of length
823 * "len" bytes containing all config values.
824 * The TLV is expected to be formatted like this:
825 * 0 15 31 31+CFG_LEN-1 length-1
826 * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......|
830 struct wcn36xx_hal_mac_start_req_msg {
831 /* config buffer must start in TLV format just here */
832 struct wcn36xx_hal_msg_header header;
833 struct wcn36xx_hal_mac_start_parameters params;
836 struct wcn36xx_hal_mac_start_rsp_params {
837 /* success or failure */
840 /* Max number of STA supported by the device */
843 /* Max number of BSS supported by the device */
847 struct wcnss_wlan_version version;
849 /* CRM build information */
850 u8 crm_version[WCN36XX_HAL_VERSION_LENGTH];
852 /* hardware/chipset/misc version information */
853 u8 wlan_version[WCN36XX_HAL_VERSION_LENGTH];
857 struct wcn36xx_hal_mac_start_rsp_msg {
858 struct wcn36xx_hal_msg_header header;
859 struct wcn36xx_hal_mac_start_rsp_params start_rsp_params;
862 struct wcn36xx_hal_mac_stop_req_params {
863 /* The reason for which the device is being stopped */
864 enum wcn36xx_hal_stop_type reason;
868 struct wcn36xx_hal_mac_stop_req_msg {
869 struct wcn36xx_hal_msg_header header;
870 struct wcn36xx_hal_mac_stop_req_params stop_req_params;
873 struct wcn36xx_hal_mac_stop_rsp_msg {
874 struct wcn36xx_hal_msg_header header;
876 /* success or failure */
880 struct wcn36xx_hal_update_cfg_req_msg {
882 * Note: The length specified in tHalUpdateCfgReqMsg messages should be
883 * header.msgLen = sizeof(tHalUpdateCfgReqMsg) + uConfigBufferLen
885 struct wcn36xx_hal_msg_header header;
887 /* Length of the config buffer. Allows UMAC to update multiple CFGs */
891 * Following this there is a TLV formatted buffer of length
892 * "uConfigBufferLen" bytes containing all config values.
893 * The TLV is expected to be formatted like this:
894 * 0 15 31 31+CFG_LEN-1 length-1
895 * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......|
900 struct wcn36xx_hal_update_cfg_rsp_msg {
901 struct wcn36xx_hal_msg_header header;
903 /* success or failure */
908 /* Frame control field format (2 bytes) */
909 struct wcn36xx_hal_mac_frame_ctl {
911 #ifndef ANI_LITTLE_BIT_ENDIAN
945 /* Sequence control field */
946 struct wcn36xx_hal_mac_seq_ctl {
952 /* Management header format */
953 struct wcn36xx_hal_mac_mgmt_hdr {
954 struct wcn36xx_hal_mac_frame_ctl fc;
960 struct wcn36xx_hal_mac_seq_ctl seqControl;
963 /* FIXME: pronto v1 apparently has 4 */
964 #define WCN36XX_HAL_NUM_BSSID 2
966 /* Scan Entry to hold active BSS idx's */
967 struct wcn36xx_hal_scan_entry {
968 u8 bss_index[WCN36XX_HAL_NUM_BSSID];
972 struct wcn36xx_hal_init_scan_req_msg {
973 struct wcn36xx_hal_msg_header header;
977 enum wcn36xx_hal_sys_mode mode;
979 /* BSSID of the BSS */
982 /* Whether BSS needs to be notified */
985 /* Kind of frame to be used for notifying the BSS (Data Null, QoS
986 * Null, or CTS to Self). Must always be a valid frame type. */
989 /* UMAC has the option of passing the MAC frame to be used for
990 * notifying the BSS. If non-zero, HAL will use the MAC frame
991 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
992 * appropriate MAC frame based on frameType. */
995 /* Following the framelength there is a MAC frame buffer if
996 * frameLength is non-zero. */
997 struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
999 /* Entry to hold number of active BSS idx's */
1000 struct wcn36xx_hal_scan_entry scan_entry;
1003 struct wcn36xx_hal_init_scan_con_req_msg {
1004 struct wcn36xx_hal_msg_header header;
1008 enum wcn36xx_hal_sys_mode mode;
1010 /* BSSID of the BSS */
1013 /* Whether BSS needs to be notified */
1016 /* Kind of frame to be used for notifying the BSS (Data Null, QoS
1017 * Null, or CTS to Self). Must always be a valid frame type. */
1020 /* UMAC has the option of passing the MAC frame to be used for
1021 * notifying the BSS. If non-zero, HAL will use the MAC frame
1022 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
1023 * appropriate MAC frame based on frameType. */
1026 /* Following the framelength there is a MAC frame buffer if
1027 * frameLength is non-zero. */
1028 struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
1030 /* Entry to hold number of active BSS idx's */
1031 struct wcn36xx_hal_scan_entry scan_entry;
1033 /* Single NoA usage in Scanning */
1036 /* Indicates the scan duration (in ms) */
1041 struct wcn36xx_hal_init_scan_rsp_msg {
1042 struct wcn36xx_hal_msg_header header;
1044 /* success or failure */
1049 struct wcn36xx_hal_start_scan_req_msg {
1050 struct wcn36xx_hal_msg_header header;
1052 /* Indicates the channel to scan */
1056 struct wcn36xx_hal_start_rsp_msg {
1057 struct wcn36xx_hal_msg_header header;
1059 /* success or failure */
1067 struct wcn36xx_hal_end_scan_req_msg {
1068 struct wcn36xx_hal_msg_header header;
1070 /* Indicates the channel to stop scanning. Not used really. But
1071 * retained for symmetry with "start Scan" message. It can also
1072 * help in error check if needed. */
1076 struct wcn36xx_hal_end_scan_rsp_msg {
1077 struct wcn36xx_hal_msg_header header;
1079 /* success or failure */
1083 struct wcn36xx_hal_finish_scan_req_msg {
1084 struct wcn36xx_hal_msg_header header;
1086 /* Identifies the operational state of the AP/STA
1087 * LEARN - AP Role SCAN - STA Role */
1088 enum wcn36xx_hal_sys_mode mode;
1090 /* Operating channel to tune to. */
1093 /* Channel Bonding state If 20/40 MHz is operational, this will
1094 * indicate the 40 MHz extension channel in combination with the
1095 * control channel */
1096 enum phy_chan_bond_state cb_state;
1098 /* BSSID of the BSS */
1101 /* Whether BSS needs to be notified */
1104 /* Kind of frame to be used for notifying the BSS (Data Null, QoS
1105 * Null, or CTS to Self). Must always be a valid frame type. */
1108 /* UMAC has the option of passing the MAC frame to be used for
1109 * notifying the BSS. If non-zero, HAL will use the MAC frame
1110 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
1111 * appropriate MAC frame based on frameType. */
1114 /* Following the framelength there is a MAC frame buffer if
1115 * frameLength is non-zero. */
1116 struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
1118 /* Entry to hold number of active BSS idx's */
1119 struct wcn36xx_hal_scan_entry scan_entry;
1123 struct wcn36xx_hal_finish_scan_rsp_msg {
1124 struct wcn36xx_hal_msg_header header;
1126 /* success or failure */
1131 enum wcn36xx_hal_scan_type {
1132 WCN36XX_HAL_SCAN_TYPE_PASSIVE = 0x00,
1133 WCN36XX_HAL_SCAN_TYPE_ACTIVE = WCN36XX_HAL_MAX_ENUM_SIZE
1136 struct wcn36xx_hal_mac_ssid {
1141 struct wcn36xx_hal_start_scan_offload_req_msg {
1142 struct wcn36xx_hal_msg_header header;
1144 /* BSSIDs hot list */
1146 u8 bssids[4][ETH_ALEN];
1148 /* Directed probe-requests will be sent for listed SSIDs (max 10)*/
1150 struct wcn36xx_hal_mac_ssid ssids[10];
1152 /* Report AP with hidden ssid */
1155 /* Self MAC address */
1159 enum wcn36xx_hal_bss_type bss_type;
1162 enum wcn36xx_hal_scan_type scan_type;
1164 /* Minimum scanning time on each channel (ms) */
1167 /* Maximum scanning time on each channel */
1170 /* Is a p2p search */
1173 /* Channels to scan */
1179 u8 ie[WCN36XX_MAX_SCAN_IE_LEN];
1182 struct wcn36xx_hal_start_scan_offload_rsp_msg {
1183 struct wcn36xx_hal_msg_header header;
1185 /* success or failure */
1189 enum wcn36xx_hal_scan_offload_ind_type {
1190 /* Scan has been started */
1191 WCN36XX_HAL_SCAN_IND_STARTED = 0x01,
1192 /* Scan has been completed */
1193 WCN36XX_HAL_SCAN_IND_COMPLETED = 0x02,
1194 /* Moved to foreign channel */
1195 WCN36XX_HAL_SCAN_IND_FOREIGN_CHANNEL = 0x08,
1196 /* scan request has been dequeued */
1197 WCN36XX_HAL_SCAN_IND_DEQUEUED = 0x10,
1198 /* preempted by other high priority scan */
1199 WCN36XX_HAL_SCAN_IND_PREEMPTED = 0x20,
1200 /* scan start failed */
1201 WCN36XX_HAL_SCAN_IND_FAILED = 0x40,
1203 WCN36XX_HAL_SCAN_IND_RESTARTED = 0x80,
1204 WCN36XX_HAL_SCAN_IND_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
1207 struct wcn36xx_hal_scan_offload_ind {
1208 struct wcn36xx_hal_msg_header header;
1215 struct wcn36xx_hal_stop_scan_offload_req_msg {
1216 struct wcn36xx_hal_msg_header header;
1219 struct wcn36xx_hal_stop_scan_offload_rsp_msg {
1220 struct wcn36xx_hal_msg_header header;
1222 /* success or failure */
1226 enum wcn36xx_hal_rate_index {
1227 HW_RATE_INDEX_1MBPS = 0x82,
1228 HW_RATE_INDEX_2MBPS = 0x84,
1229 HW_RATE_INDEX_5_5MBPS = 0x8B,
1230 HW_RATE_INDEX_6MBPS = 0x0C,
1231 HW_RATE_INDEX_9MBPS = 0x12,
1232 HW_RATE_INDEX_11MBPS = 0x96,
1233 HW_RATE_INDEX_12MBPS = 0x18,
1234 HW_RATE_INDEX_18MBPS = 0x24,
1235 HW_RATE_INDEX_24MBPS = 0x30,
1236 HW_RATE_INDEX_36MBPS = 0x48,
1237 HW_RATE_INDEX_48MBPS = 0x60,
1238 HW_RATE_INDEX_54MBPS = 0x6C
1241 struct wcn36xx_hal_supported_rates {
1243 * For Self STA Entry: this represents Self Mode.
1244 * For Peer Stations, this represents the mode of the peer.
1247 * --this mode is updated when PE adds the Self Entry.
1249 * -- OR when PE sends 'ADD_BSS' message and station context in BSS
1250 * is used to indicate the mode of the AP.
1254 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry
1255 * for that BSS is used to indicate the self mode of the AP.
1257 * -- OR when a station is associated, PE sends 'ADD_STA' message
1258 * with this mode updated.
1261 enum sta_rate_mode op_rate_mode;
1263 /* 11b, 11a and aniLegacyRates are IE rates which gives rate in
1264 * unit of 500Kbps */
1265 u16 dsss_rates[WCN36XX_HAL_NUM_DSSS_RATES];
1266 u16 ofdm_rates[WCN36XX_HAL_NUM_OFDM_RATES];
1267 u16 legacy_rates[WCN36XX_HAL_NUM_POLARIS_RATES];
1270 /* Taurus only supports 26 Titan Rates(no ESF/concat Rates will be
1271 * supported) First 26 bits are reserved for those Titan rates and
1272 * the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are
1274 /* Titan and Taurus Rates */
1275 u32 enhanced_rate_bitmap;
1278 * 0-76 bits used, remaining reserved
1279 * bits 0-15 and 32 should be set.
1281 u8 supported_mcs_set[WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET];
1284 * RX Highest Supported Data Rate defines the highest data
1285 * rate that the STA is able to receive, in unites of 1Mbps.
1286 * This value is derived from "Supported MCS Set field" inside
1287 * the HT capability element.
1289 u16 rx_highest_data_rate;
1293 struct wcn36xx_hal_config_sta_params {
1297 /* ASSOC ID, as assigned by UMAC */
1300 /* STA entry Type: 0 - Self, 1 - Other/Peer, 2 - BSSID, 3 - BCAST */
1303 /* Short Preamble Supported. */
1304 u8 short_preamble_supported;
1306 /* MAC Address of STA */
1309 /* Listen interval of the STA */
1310 u16 listen_interval;
1312 /* Support for 11e/WMM */
1315 /* 11n HT capable STA */
1318 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1319 u8 tx_channel_width_set;
1321 /* RIFS mode 0 - NA, 1 - Allowed */
1324 /* L-SIG TXOP Protection mechanism
1325 0 - No Support, 1 - Supported
1326 SG - there is global field */
1327 u8 lsig_txop_protection;
1329 /* Max Ampdu Size supported by STA. TPE programming.
1330 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k */
1333 /* Max Ampdu density. Used by RA. 3 : 0~7 : 2^(11nAMPDUdensity -4) */
1334 u8 max_ampdu_density;
1336 /* Max AMSDU size 1 : 3839 bytes, 0 : 7935 bytes */
1339 /* Short GI support for 40Mhz packets */
1342 /* Short GI support for 20Mhz packets */
1345 /* TODO move this parameter to the end for 3680 */
1346 /* These rates are the intersection of peer and self capabilities. */
1347 struct wcn36xx_hal_supported_rates supported_rates;
1349 /* Robust Management Frame (RMF) enabled/disabled */
1352 /* The unicast encryption type in the association */
1355 /* HAL should update the existing STA entry, if this flag is set. UMAC
1356 will set this flag in case of RE-ASSOC, where we want to reuse the
1357 old STA ID. 0 = Add, 1 = Update */
1360 /* U-APSD Flags: 1b per AC. Encoded as follows:
1361 b7 b6 b5 b4 b3 b2 b1 b0 =
1362 X X X X BE BK VI VO */
1368 /* 11n Green Field preamble support
1369 0 - Not supported, 1 - Supported */
1370 u8 green_field_capable;
1372 /* MIMO Power Save mode */
1373 enum wcn36xx_hal_ht_mimo_state mimo_ps;
1375 /* Delayed BA Support */
1376 u8 delayed_ba_support;
1378 /* Max AMPDU duration in 32us */
1379 u8 max_ampdu_duration;
1381 /* HT STA should set it to 1 if it is enabled in BSS. HT STA should
1382 * set it to 0 if AP does not support it. This indication is sent
1383 * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
1385 u8 dsss_cck_mode_40mhz;
1387 /* Valid STA Idx when action=Update. Set to 0xFF when invalid!
1388 * Retained for backward compalibity with existing HAL code */
1391 /* BSSID of BSS to which station is associated. Set to 0xFF when
1392 * invalid. Retained for backward compalibity with existing HAL
1398 /* TODO add this parameter for 3680. */
1399 /* Reserved to align next field on a dword boundary */
1403 struct wcn36xx_hal_config_sta_req_msg {
1404 struct wcn36xx_hal_msg_header header;
1405 struct wcn36xx_hal_config_sta_params sta_params;
1408 struct wcn36xx_hal_config_sta_params_v1 {
1412 /* ASSOC ID, as assigned by UMAC */
1415 /* STA entry Type: 0 - Self, 1 - Other/Peer, 2 - BSSID, 3 - BCAST */
1418 /* Short Preamble Supported. */
1419 u8 short_preamble_supported;
1421 /* MAC Address of STA */
1424 /* Listen interval of the STA */
1425 u16 listen_interval;
1427 /* Support for 11e/WMM */
1430 /* 11n HT capable STA */
1433 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1434 u8 tx_channel_width_set;
1436 /* RIFS mode 0 - NA, 1 - Allowed */
1439 /* L-SIG TXOP Protection mechanism
1440 0 - No Support, 1 - Supported
1441 SG - there is global field */
1442 u8 lsig_txop_protection;
1444 /* Max Ampdu Size supported by STA. TPE programming.
1445 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k */
1448 /* Max Ampdu density. Used by RA. 3 : 0~7 : 2^(11nAMPDUdensity -4) */
1449 u8 max_ampdu_density;
1451 /* Max AMSDU size 1 : 3839 bytes, 0 : 7935 bytes */
1454 /* Short GI support for 40Mhz packets */
1457 /* Short GI support for 20Mhz packets */
1460 /* Robust Management Frame (RMF) enabled/disabled */
1463 /* The unicast encryption type in the association */
1466 /* HAL should update the existing STA entry, if this flag is set. UMAC
1467 will set this flag in case of RE-ASSOC, where we want to reuse the
1468 old STA ID. 0 = Add, 1 = Update */
1471 /* U-APSD Flags: 1b per AC. Encoded as follows:
1472 b7 b6 b5 b4 b3 b2 b1 b0 =
1473 X X X X BE BK VI VO */
1479 /* 11n Green Field preamble support
1480 0 - Not supported, 1 - Supported */
1481 u8 green_field_capable;
1483 /* MIMO Power Save mode */
1484 enum wcn36xx_hal_ht_mimo_state mimo_ps;
1486 /* Delayed BA Support */
1487 u8 delayed_ba_support;
1489 /* Max AMPDU duration in 32us */
1490 u8 max_ampdu_duration;
1492 /* HT STA should set it to 1 if it is enabled in BSS. HT STA should
1493 * set it to 0 if AP does not support it. This indication is sent
1494 * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
1496 u8 dsss_cck_mode_40mhz;
1498 /* Valid STA Idx when action=Update. Set to 0xFF when invalid!
1499 * Retained for backward compalibity with existing HAL code */
1502 /* BSSID of BSS to which station is associated. Set to 0xFF when
1503 * invalid. Retained for backward compalibity with existing HAL
1509 /* Reserved to align next field on a dword boundary */
1512 /* These rates are the intersection of peer and self capabilities. */
1513 struct wcn36xx_hal_supported_rates supported_rates;
1516 struct wcn36xx_hal_config_sta_req_msg_v1 {
1517 struct wcn36xx_hal_msg_header header;
1518 struct wcn36xx_hal_config_sta_params_v1 sta_params;
1521 struct config_sta_rsp_params {
1522 /* success or failure */
1525 /* Station index; valid only when 'status' field value SUCCESS */
1528 /* BSSID Index of BSS to which the station is associated */
1531 /* DPU Index for PTK */
1534 /* DPU Index for GTK */
1537 /* DPU Index for IGTK */
1538 u8 bcast_mgmt_dpu_idx;
1540 /* PTK DPU signature */
1543 /* GTK DPU isignature */
1546 /* IGTK DPU signature */
1553 struct wcn36xx_hal_config_sta_rsp_msg {
1554 struct wcn36xx_hal_msg_header header;
1556 struct config_sta_rsp_params params;
1559 /* Delete STA Request message */
1560 struct wcn36xx_hal_delete_sta_req_msg {
1561 struct wcn36xx_hal_msg_header header;
1563 /* Index of STA to delete */
1568 /* Delete STA Response message */
1569 struct wcn36xx_hal_delete_sta_rsp_msg {
1570 struct wcn36xx_hal_msg_header header;
1572 /* success or failure */
1575 /* Index of STA deleted */
1579 /* 12 Bytes long because this structure can be used to represent rate and
1580 * extended rate set IEs. The parser assume this to be at least 12 */
1581 struct wcn36xx_hal_rate_set {
1583 u8 rate[WCN36XX_HAL_MAC_RATESET_EID_MAX];
1586 /* access category record */
1587 struct wcn36xx_hal_aci_aifsn {
1588 #ifndef ANI_LITTLE_BIT_ENDIAN
1601 /* contention window size */
1602 struct wcn36xx_hal_mac_cw {
1603 #ifndef ANI_LITTLE_BIT_ENDIAN
1612 struct wcn36xx_hal_edca_param_record {
1613 struct wcn36xx_hal_aci_aifsn aci;
1614 struct wcn36xx_hal_mac_cw cw;
1618 /* Concurrency role. These are generic IDs that identify the various roles
1619 * in the software system. */
1620 enum wcn36xx_hal_con_mode {
1621 WCN36XX_HAL_STA_MODE = 0,
1623 /* to support softAp mode . This is misleading.
1624 It means AP MODE only. */
1625 WCN36XX_HAL_STA_SAP_MODE = 1,
1627 WCN36XX_HAL_P2P_CLIENT_MODE,
1628 WCN36XX_HAL_P2P_GO_MODE,
1629 WCN36XX_HAL_MONITOR_MODE,
1632 /* This is a bit pattern to be set for each mode
1635 * bit 2 - p2p client mode
1636 * bit 3 - p2p go mode */
1637 enum wcn36xx_hal_concurrency_mode {
1641 /* to support sta, softAp mode . This means STA+AP mode */
1646 HAL_MAX_CONCURRENCY_PERSONA = 4
1649 struct wcn36xx_hal_config_bss_params {
1653 /* Self Mac Address */
1654 u8 self_mac_addr[ETH_ALEN];
1657 enum wcn36xx_hal_bss_type bss_type;
1659 /* Operational Mode: AP =0, STA = 1 */
1663 enum wcn36xx_hal_nw_type nw_type;
1665 /* Used to classify PURE_11G/11G_MIXED to program MTU */
1666 u8 short_slot_time_supported;
1668 /* Co-exist with 11a STA */
1671 /* Co-exist with 11b STA */
1674 /* Co-exist with 11g STA */
1677 /* Coexistence with 11n STA */
1680 /* Non GF coexist flag */
1681 u8 lln_non_gf_coexist;
1683 /* TXOP protection support */
1684 u8 lsig_tx_op_protection_full_support;
1689 /* Beacon Interval in TU */
1690 u16 beacon_interval;
1695 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1696 u8 tx_channel_width_set;
1698 /* Operating channel */
1701 /* Extension channel for channel bonding */
1704 /* Reserved to align next field on a dword boundary */
1707 /* TODO move sta to the end for 3680 */
1708 /* Context of the station being added in HW
1709 * Add a STA entry for "itself" -
1711 * On AP - Add the AP itself in an "STA context"
1713 * On STA - Add the AP to which this STA is joining in an
1716 struct wcn36xx_hal_config_sta_params sta;
1717 /* SSID of the BSS */
1718 struct wcn36xx_hal_mac_ssid ssid;
1720 /* HAL should update the existing BSS entry, if this flag is set.
1721 * UMAC will set this flag in case of reassoc, where we want to
1722 * resue the the old BSSID and still return success 0 = Add, 1 =
1727 struct wcn36xx_hal_rate_set rateset;
1729 /* Enable/Disable HT capabilities of the BSS */
1732 /* Enable/Disable OBSS protection */
1733 u8 obss_prot_enabled;
1735 /* RMF enabled/disabled */
1738 /* HT Operating Mode operating mode of the 802.11n STA */
1739 enum wcn36xx_hal_ht_operating_mode ht_oper_mode;
1741 /* Dual CTS Protection: 0 - Unused, 1 - Used */
1742 u8 dual_cts_protection;
1744 /* Probe Response Max retries */
1745 u8 max_probe_resp_retry_limit;
1747 /* To Enable Hidden ssid */
1750 /* To Enable Disable FW Proxy Probe Resp */
1751 u8 proxy_probe_resp;
1753 /* Boolean to indicate if EDCA params are valid. UMAC might not
1754 * have valid EDCA params or might not desire to apply EDCA params
1755 * during config BSS. 0 implies Not Valid ; Non-Zero implies
1757 u8 edca_params_valid;
1759 /* EDCA Parameters for Best Effort Access Category */
1760 struct wcn36xx_hal_edca_param_record acbe;
1762 /* EDCA Parameters forBackground Access Category */
1763 struct wcn36xx_hal_edca_param_record acbk;
1765 /* EDCA Parameters for Video Access Category */
1766 struct wcn36xx_hal_edca_param_record acvi;
1768 /* EDCA Parameters for Voice Access Category */
1769 struct wcn36xx_hal_edca_param_record acvo;
1771 /* Ext Bss Config Msg if set */
1772 u8 ext_set_sta_key_param_valid;
1774 /* SetStaKeyParams for ext bss msg */
1775 struct wcn36xx_hal_set_sta_key_params ext_set_sta_key_param;
1777 /* Persona for the BSS can be STA,AP,GO,CLIENT value same as enum
1778 * wcn36xx_hal_con_mode */
1779 u8 wcn36xx_hal_persona;
1781 u8 spectrum_mgt_enable;
1783 /* HAL fills in the tx power used for mgmt frames in txMgmtPower */
1786 /* maxTxPower has max power to be used after applying the power
1787 * constraint if any */
1791 struct wcn36xx_hal_config_bss_req_msg {
1792 struct wcn36xx_hal_msg_header header;
1793 struct wcn36xx_hal_config_bss_params bss_params;
1796 struct wcn36xx_hal_config_bss_params_v1 {
1800 /* Self Mac Address */
1801 u8 self_mac_addr[ETH_ALEN];
1804 enum wcn36xx_hal_bss_type bss_type;
1806 /* Operational Mode: AP =0, STA = 1 */
1810 enum wcn36xx_hal_nw_type nw_type;
1812 /* Used to classify PURE_11G/11G_MIXED to program MTU */
1813 u8 short_slot_time_supported;
1815 /* Co-exist with 11a STA */
1818 /* Co-exist with 11b STA */
1821 /* Co-exist with 11g STA */
1824 /* Coexistence with 11n STA */
1827 /* Non GF coexist flag */
1828 u8 lln_non_gf_coexist;
1830 /* TXOP protection support */
1831 u8 lsig_tx_op_protection_full_support;
1836 /* Beacon Interval in TU */
1837 u16 beacon_interval;
1842 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1843 u8 tx_channel_width_set;
1845 /* Operating channel */
1848 /* Extension channel for channel bonding */
1851 /* Reserved to align next field on a dword boundary */
1854 /* SSID of the BSS */
1855 struct wcn36xx_hal_mac_ssid ssid;
1857 /* HAL should update the existing BSS entry, if this flag is set.
1858 * UMAC will set this flag in case of reassoc, where we want to
1859 * resue the the old BSSID and still return success 0 = Add, 1 =
1864 struct wcn36xx_hal_rate_set rateset;
1866 /* Enable/Disable HT capabilities of the BSS */
1869 /* Enable/Disable OBSS protection */
1870 u8 obss_prot_enabled;
1872 /* RMF enabled/disabled */
1875 /* HT Operating Mode operating mode of the 802.11n STA */
1876 enum wcn36xx_hal_ht_operating_mode ht_oper_mode;
1878 /* Dual CTS Protection: 0 - Unused, 1 - Used */
1879 u8 dual_cts_protection;
1881 /* Probe Response Max retries */
1882 u8 max_probe_resp_retry_limit;
1884 /* To Enable Hidden ssid */
1887 /* To Enable Disable FW Proxy Probe Resp */
1888 u8 proxy_probe_resp;
1890 /* Boolean to indicate if EDCA params are valid. UMAC might not
1891 * have valid EDCA params or might not desire to apply EDCA params
1892 * during config BSS. 0 implies Not Valid ; Non-Zero implies
1894 u8 edca_params_valid;
1896 /* EDCA Parameters for Best Effort Access Category */
1897 struct wcn36xx_hal_edca_param_record acbe;
1899 /* EDCA Parameters forBackground Access Category */
1900 struct wcn36xx_hal_edca_param_record acbk;
1902 /* EDCA Parameters for Video Access Category */
1903 struct wcn36xx_hal_edca_param_record acvi;
1905 /* EDCA Parameters for Voice Access Category */
1906 struct wcn36xx_hal_edca_param_record acvo;
1908 /* Ext Bss Config Msg if set */
1909 u8 ext_set_sta_key_param_valid;
1911 /* SetStaKeyParams for ext bss msg */
1912 struct wcn36xx_hal_set_sta_key_params ext_set_sta_key_param;
1914 /* Persona for the BSS can be STA,AP,GO,CLIENT value same as enum
1915 * wcn36xx_hal_con_mode */
1916 u8 wcn36xx_hal_persona;
1918 u8 spectrum_mgt_enable;
1920 /* HAL fills in the tx power used for mgmt frames in txMgmtPower */
1923 /* maxTxPower has max power to be used after applying the power
1924 * constraint if any */
1927 /* Context of the station being added in HW
1928 * Add a STA entry for "itself" -
1930 * On AP - Add the AP itself in an "STA context"
1932 * On STA - Add the AP to which this STA is joining in an
1935 struct wcn36xx_hal_config_sta_params_v1 sta;
1938 struct wcn36xx_hal_config_bss_req_msg_v1 {
1939 struct wcn36xx_hal_msg_header header;
1940 struct wcn36xx_hal_config_bss_params_v1 bss_params;
1943 struct wcn36xx_hal_config_bss_rsp_params {
1944 /* Success or Failure */
1947 /* BSS index allocated by HAL */
1950 /* DPU descriptor index for PTK */
1953 /* PTK DPU signature */
1954 u8 ucast_dpu_signature;
1956 /* DPU descriptor index for GTK */
1957 u8 bcast_dpu_desc_indx;
1959 /* GTK DPU signature */
1960 u8 bcast_dpu_signature;
1962 /* DPU descriptor for IGTK */
1963 u8 mgmt_dpu_desc_index;
1965 /* IGTK DPU signature */
1966 u8 mgmt_dpu_signature;
1968 /* Station Index for BSS entry */
1971 /* Self station index for this BSS */
1972 u8 bss_self_sta_index;
1974 /* Bcast station for buffering bcast frames in AP role */
1975 u8 bss_bcast_sta_idx;
1977 /* MAC Address of STA(PEER/SELF) in staContext of configBSSReq */
1980 /* HAL fills in the tx power used for mgmt frames in this field. */
1985 struct wcn36xx_hal_config_bss_rsp_msg {
1986 struct wcn36xx_hal_msg_header header;
1987 struct wcn36xx_hal_config_bss_rsp_params bss_rsp_params;
1990 struct wcn36xx_hal_delete_bss_req_msg {
1991 struct wcn36xx_hal_msg_header header;
1993 /* BSS index to be deleted */
1998 struct wcn36xx_hal_delete_bss_rsp_msg {
1999 struct wcn36xx_hal_msg_header header;
2001 /* Success or Failure */
2004 /* BSS index that has been deleted */
2009 struct wcn36xx_hal_join_req_msg {
2010 struct wcn36xx_hal_msg_header header;
2012 /* Indicates the BSSID to which STA is going to associate */
2015 /* Indicates the channel to switch to. */
2019 u8 self_sta_mac_addr[ETH_ALEN];
2021 /* Local power constraint */
2022 u8 local_power_constraint;
2024 /* Secondary channel offset */
2025 enum phy_chan_bond_state secondary_channel_offset;
2028 enum wcn36xx_hal_link_state link_state;
2034 struct wcn36xx_hal_join_rsp_msg {
2035 struct wcn36xx_hal_msg_header header;
2037 /* success or failure */
2040 /* HAL fills in the tx power used for mgmt frames in this field */
2044 struct post_assoc_req_msg {
2045 struct wcn36xx_hal_msg_header header;
2047 struct wcn36xx_hal_config_sta_params sta_params;
2048 struct wcn36xx_hal_config_bss_params bss_params;
2051 struct post_assoc_rsp_msg {
2052 struct wcn36xx_hal_msg_header header;
2053 struct config_sta_rsp_params sta_rsp_params;
2054 struct wcn36xx_hal_config_bss_rsp_params bss_rsp_params;
2057 /* This is used to create a set of WEP keys for a given BSS. */
2058 struct wcn36xx_hal_set_bss_key_req_msg {
2059 struct wcn36xx_hal_msg_header header;
2061 /* BSS Index of the BSS */
2064 /* Encryption Type used with peer */
2065 enum ani_ed_type enc_type;
2067 /* Number of keys */
2070 /* Array of keys. */
2071 struct wcn36xx_hal_keys keys[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS];
2073 /* Control for Replay Count, 1= Single TID based replay count on Tx
2074 * 0 = Per TID based replay count on TX */
2078 /* tagged version of set bss key */
2079 struct wcn36xx_hal_set_bss_key_req_msg_tagged {
2080 struct wcn36xx_hal_set_bss_key_req_msg Msg;
2084 struct wcn36xx_hal_set_bss_key_rsp_msg {
2085 struct wcn36xx_hal_msg_header header;
2087 /* success or failure */
2092 * This is used configure the key information on a given station.
2093 * When the sec_type is WEP40 or WEP104, the def_wep_idx is used to locate
2094 * a preconfigured key from a BSS the station assoicated with; otherwise
2095 * a new key descriptor is created based on the key field.
2097 struct wcn36xx_hal_set_sta_key_req_msg {
2098 struct wcn36xx_hal_msg_header header;
2099 struct wcn36xx_hal_set_sta_key_params set_sta_key_params;
2102 struct wcn36xx_hal_set_sta_key_rsp_msg {
2103 struct wcn36xx_hal_msg_header header;
2105 /* success or failure */
2109 struct wcn36xx_hal_remove_bss_key_req_msg {
2110 struct wcn36xx_hal_msg_header header;
2112 /* BSS Index of the BSS */
2115 /* Encryption Type used with peer */
2116 enum ani_ed_type enc_type;
2121 /* STATIC/DYNAMIC. Used in Nullifying in Key Descriptors for
2122 * Static/Dynamic keys */
2123 enum ani_wep_type wep_type;
2126 struct wcn36xx_hal_remove_bss_key_rsp_msg {
2127 struct wcn36xx_hal_msg_header header;
2129 /* success or failure */
2134 * This is used by PE to Remove the key information on a given station.
2136 struct wcn36xx_hal_remove_sta_key_req_msg {
2137 struct wcn36xx_hal_msg_header header;
2142 /* Encryption Type used with peer */
2143 enum ani_ed_type enc_type;
2148 /* Whether to invalidate the Broadcast key or Unicast key. In case
2149 * of WEP, the same key is used for both broadcast and unicast. */
2154 struct wcn36xx_hal_remove_sta_key_rsp_msg {
2155 struct wcn36xx_hal_msg_header header;
2157 /*success or failure */
2162 #ifdef FEATURE_OEM_DATA_SUPPORT
2164 #ifndef OEM_DATA_REQ_SIZE
2165 #define OEM_DATA_REQ_SIZE 134
2168 #ifndef OEM_DATA_RSP_SIZE
2169 #define OEM_DATA_RSP_SIZE 1968
2172 struct start_oem_data_req_msg {
2173 struct wcn36xx_hal_msg_header header;
2176 tSirMacAddr self_mac_addr;
2177 u8 oem_data_req[OEM_DATA_REQ_SIZE];
2181 struct start_oem_data_rsp_msg {
2182 struct wcn36xx_hal_msg_header header;
2184 u8 oem_data_rsp[OEM_DATA_RSP_SIZE];
2189 struct wcn36xx_hal_switch_channel_req_msg {
2190 struct wcn36xx_hal_msg_header header;
2192 /* Channel number */
2195 /* Local power constraint */
2196 u8 local_power_constraint;
2198 /* Secondary channel offset */
2199 enum phy_chan_bond_state secondary_channel_offset;
2201 /* HAL fills in the tx power used for mgmt frames in this field. */
2208 u8 self_sta_mac_addr[ETH_ALEN];
2210 /* VO WIFI comment: BSSID needed to identify session. As the
2211 * request has power constraints, this should be applied only to
2212 * that session Since MTU timing and EDCA are sessionized, this
2213 * struct needs to be sessionized and bssid needs to be out of the
2214 * VOWifi feature flag V IMP: Keep bssId field at the end of this
2215 * msg. It is used to mantain backward compatbility by way of
2216 * ignoring if using new host/old FW or old host/new FW since it is
2217 * at the end of this struct
2222 struct wcn36xx_hal_switch_channel_rsp_msg {
2223 struct wcn36xx_hal_msg_header header;
2228 /* Channel number - same as in request */
2231 /* HAL fills in the tx power used for mgmt frames in this field */
2234 /* BSSID needed to identify session - same as in request */
2239 struct update_edca_params_req_msg {
2240 struct wcn36xx_hal_msg_header header;
2246 struct wcn36xx_hal_edca_param_record acbe;
2249 struct wcn36xx_hal_edca_param_record acbk;
2252 struct wcn36xx_hal_edca_param_record acvi;
2255 struct wcn36xx_hal_edca_param_record acvo;
2258 struct update_edca_params_rsp_msg {
2259 struct wcn36xx_hal_msg_header header;
2261 /* success or failure */
2265 struct dpu_stats_params {
2266 /* Index of STA to which the statistics */
2269 /* Encryption mode */
2282 u16 un_decryptable_cnt;
2283 u32 decrypt_err_cnt;
2287 struct wcn36xx_hal_stats_req_msg {
2288 struct wcn36xx_hal_msg_header header;
2290 /* Valid STA Idx for per STA stats request */
2293 /* Categories of stats requested as specified in eHalStatsMask */
2297 struct ani_summary_stats_info {
2298 /* Total number of packets(per AC) that were successfully
2299 * transmitted with retries */
2302 /* The number of MSDU packets and MMPDU frames per AC that the
2303 * 802.11 station successfully transmitted after more than one
2304 * retransmission attempt */
2305 u32 multiple_retry_cnt[4];
2307 /* Total number of packets(per AC) that were successfully
2308 * transmitted (with and without retries, including multi-cast,
2312 /* Total number of packets that were successfully received (after
2313 * appropriate filter rules including multi-cast, broadcast) */
2316 /* Total number of duplicate frames received successfully */
2319 /* Total number packets(per AC) failed to transmit */
2322 /* Total number of RTS/CTS sequence failures for transmission of a
2326 /* Total number packets failed transmit because of no ACK from the
2330 /* Total number of RTS/CTS sequence success for transmission of a
2334 /* The sum of the receive error count and dropped-receive-buffer
2335 * error count. HAL will provide this as a sum of (FCS error) +
2336 * (Fail get BD/PDU in HW) */
2340 * The receive error count. HAL will provide the RxP FCS error
2341 * global counter. */
2344 /* The sum of the transmit-directed byte count, transmit-multicast
2345 * byte count and transmit-broadcast byte count. HAL will sum TPE
2346 * UC/MC/BCAST global counters to provide this. */
2350 /* defines tx_rate_flags */
2353 HAL_TX_RATE_LEGACY = 0x1,
2356 HAL_TX_RATE_HT20 = 0x2,
2359 HAL_TX_RATE_HT40 = 0x4,
2361 /* Rate with Short guard interval */
2362 HAL_TX_RATE_SGI = 0x8,
2364 /* Rate with Long guard interval */
2365 HAL_TX_RATE_LGI = 0x10
2368 struct ani_global_class_a_stats_info {
2369 /* The number of MPDU frames received by the 802.11 station for
2370 * MSDU packets or MMPDU frames */
2373 /* The number of MPDU frames received by the 802.11 station for
2374 * MSDU packets or MMPDU frames when a promiscuous packet filter
2376 u32 promiscuous_rx_frag_cnt;
2378 /* The receiver input sensitivity referenced to a FER of 8% at an
2379 * MPDU length of 1024 bytes at the antenna connector. Each element
2380 * of the array shall correspond to a supported rate and the order
2381 * shall be the same as the supporteRates parameter. */
2382 u32 rx_input_sensitivity;
2384 /* The maximum transmit power in dBm upto one decimal. for eg: if
2385 * it is 10.5dBm, the value would be 105 */
2388 /* Number of times the receiver failed to synchronize with the
2389 * incoming signal after detecting the sync in the preamble of the
2390 * transmitted PLCP protocol data unit. */
2393 /* Legacy transmit rate, in units of 500 kbit/sec, for the most
2394 * recently transmitted frame */
2397 /* mcs index for HT20 and HT40 rates */
2400 /* to differentiate between HT20 and HT40 rates; short and long
2405 struct ani_global_security_stats {
2406 /* The number of unencrypted received MPDU frames that the MAC
2407 * layer discarded when the IEEE 802.11 dot11ExcludeUnencrypted
2408 * management information base (MIB) object is enabled */
2409 u32 rx_wep_unencrypted_frm_cnt;
2411 /* The number of received MSDU packets that that the 802.11 station
2412 * discarded because of MIC failures */
2413 u32 rx_mic_fail_cnt;
2415 /* The number of encrypted MPDU frames that the 802.11 station
2416 * failed to decrypt because of a TKIP ICV error */
2419 /* The number of received MPDU frames that the 802.11 discarded
2420 * because of an invalid AES-CCMP format */
2421 u32 aes_ccmp_format_err;
2423 /* The number of received MPDU frames that the 802.11 station
2424 * discarded because of the AES-CCMP replay protection procedure */
2425 u32 aes_ccmp_replay_cnt;
2427 /* The number of received MPDU frames that the 802.11 station
2428 * discarded because of errors detected by the AES-CCMP decryption
2430 u32 aes_ccmp_decrpt_err;
2432 /* The number of encrypted MPDU frames received for which a WEP
2433 * decryption key was not available on the 802.11 station */
2434 u32 wep_undecryptable_cnt;
2436 /* The number of encrypted MPDU frames that the 802.11 station
2437 * failed to decrypt because of a WEP ICV error */
2440 /* The number of received encrypted packets that the 802.11 station
2441 * successfully decrypted */
2442 u32 rx_decrypt_succ_cnt;
2444 /* The number of encrypted packets that the 802.11 station failed
2446 u32 rx_decrypt_fail_cnt;
2449 struct ani_global_class_b_stats_info {
2450 struct ani_global_security_stats uc_stats;
2451 struct ani_global_security_stats mc_bc_stats;
2454 struct ani_global_class_c_stats_info {
2455 /* This counter shall be incremented for a received A-MSDU frame
2456 * with the stations MAC address in the address 1 field or an
2457 * A-MSDU frame with a group address in the address 1 field */
2460 /* This counter shall be incremented when the MAC receives an AMPDU
2464 /* This counter shall be incremented when a Frame is transmitted
2465 * only on the primary channel */
2468 /* This counter shall be incremented when a Frame is received only
2469 * on the primary channel */
2472 /* This counter shall be incremented by the number of MPDUs
2473 * received in the A-MPDU when an A-MPDU is received */
2474 u32 rx_mpdu_in_ampdu_cnt;
2476 /* This counter shall be incremented when an MPDU delimiter has a
2477 * CRC error when this is the first CRC error in the received AMPDU
2478 * or when the previous delimiter has been decoded correctly */
2479 u32 ampdu_delimiter_crc_err;
2482 struct ani_per_sta_stats_info {
2483 /* The number of MPDU frames that the 802.11 station transmitted
2484 * and acknowledged through a received 802.11 ACK frame */
2487 /* This counter shall be incremented when an A-MPDU is transmitted */
2490 /* This counter shall increment by the number of MPDUs in the AMPDU
2491 * when an A-MPDU is transmitted */
2492 u32 tx_mpdu_in_ampdu_cnt;
2495 struct wcn36xx_hal_stats_rsp_msg {
2496 struct wcn36xx_hal_msg_header header;
2498 /* Success or Failure */
2504 /* Categories of STATS being returned as per eHalStatsMask */
2507 /* message type is same as the request type */
2510 /* length of the entire request, includes the pStatsBuf length too */
2514 struct wcn36xx_hal_set_link_state_req_msg {
2515 struct wcn36xx_hal_msg_header header;
2518 enum wcn36xx_hal_link_state state;
2519 u8 self_mac_addr[ETH_ALEN];
2523 struct set_link_state_rsp_msg {
2524 struct wcn36xx_hal_msg_header header;
2526 /* success or failure */
2531 struct wcn36xx_hal_ts_info_tfc {
2532 #ifndef ANI_LITTLE_BIT_ENDIAN
2553 /* Flag to schedule the traffic type */
2554 struct wcn36xx_hal_ts_info_sch {
2555 #ifndef ANI_LITTLE_BIT_ENDIAN
2564 /* Traffic and scheduling info */
2565 struct wcn36xx_hal_ts_info {
2566 struct wcn36xx_hal_ts_info_tfc traffic;
2567 struct wcn36xx_hal_ts_info_sch schedule;
2570 /* Information elements */
2571 struct wcn36xx_hal_tspec_ie {
2574 struct wcn36xx_hal_ts_info ts_info;
2577 u32 min_svc_interval;
2578 u32 max_svc_interval;
2580 u32 suspend_interval;
2592 struct add_ts_req_msg {
2593 struct wcn36xx_hal_msg_header header;
2598 /* TSPEC handler uniquely identifying a TSPEC for a STA in a BSS */
2601 /* To program TPE with required parameters */
2602 struct wcn36xx_hal_tspec_ie tspec;
2604 /* U-APSD Flags: 1b per AC. Encoded as follows:
2605 b7 b6 b5 b4 b3 b2 b1 b0 =
2606 X X X X BE BK VI VO */
2609 /* These parameters are for all the access categories */
2611 /* Service Interval */
2612 u32 service_interval[WCN36XX_HAL_MAX_AC];
2614 /* Suspend Interval */
2615 u32 suspend_interval[WCN36XX_HAL_MAX_AC];
2617 /* Delay Interval */
2618 u32 delay_interval[WCN36XX_HAL_MAX_AC];
2621 struct add_rs_rsp_msg {
2622 struct wcn36xx_hal_msg_header header;
2624 /* success or failure */
2628 struct del_ts_req_msg {
2629 struct wcn36xx_hal_msg_header header;
2634 /* TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS */
2637 /* To lookup station id using the mac address */
2641 struct del_ts_rsp_msg {
2642 struct wcn36xx_hal_msg_header header;
2644 /* success or failure */
2648 /* End of TSpec Parameters */
2650 /* Start of BLOCK ACK related Parameters */
2652 struct wcn36xx_hal_add_ba_session_req_msg {
2653 struct wcn36xx_hal_msg_header header;
2658 /* Peer MAC Address */
2659 u8 mac_addr[ETH_ALEN];
2661 /* ADDBA Action Frame dialog token
2662 HAL will not interpret this object */
2665 /* TID for which the BA is being setup
2666 This identifies the TC or TS of interest */
2669 /* 0 - Delayed BA (Not supported)
2673 /* Indicates the number of buffers for this TID (baTID)
2674 NOTE - This is the requested buffer size. When this
2675 is processed by HAL and subsequently by HDD, it is
2676 possible that HDD may change this buffer size. Any
2677 change in the buffer size should be noted by PE and
2678 advertized appropriately in the ADDBA response */
2681 /* BA timeout in TU's 0 means no timeout will occur */
2684 /* b0..b3 - Fragment Number - Always set to 0
2685 b4..b15 - Starting Sequence Number of first MSDU
2686 for which this BA is setup */
2695 struct wcn36xx_hal_add_ba_session_rsp_msg {
2696 struct wcn36xx_hal_msg_header header;
2698 /* success or failure */
2704 /* TID for which the BA session has been setup */
2707 /* BA Buffer Size allocated for the current BA session */
2712 /* Reordering Window buffer */
2715 /* Station Index to id the sta */
2718 /* Starting Sequence Number */
2722 struct wcn36xx_hal_add_ba_req_msg {
2723 struct wcn36xx_hal_msg_header header;
2728 /* Reorder Window Size */
2730 /* Old FW 1.2.2.4 does not support this*/
2731 #ifdef FEATURE_ON_CHIP_REORDERING
2732 u8 reordering_done_on_chip;
2736 struct wcn36xx_hal_add_ba_rsp_msg {
2737 struct wcn36xx_hal_msg_header header;
2739 /* success or failure */
2746 struct add_ba_info {
2748 u16 starting_seq_num:12;
2752 struct wcn36xx_hal_trigger_ba_rsp_candidate {
2753 u8 sta_addr[ETH_ALEN];
2754 struct add_ba_info ba_info[STACFG_MAX_TC];
2757 struct wcn36xx_hal_trigger_ba_req_candidate {
2762 struct wcn36xx_hal_trigger_ba_req_msg {
2763 struct wcn36xx_hal_msg_header header;
2768 /* baCandidateCnt is followed by trigger BA
2769 * Candidate List(tTriggerBaCandidate)
2775 struct wcn36xx_hal_trigger_ba_rsp_msg {
2776 struct wcn36xx_hal_msg_header header;
2778 /* TO SUPPORT BT-AMP */
2781 /* success or failure */
2784 /* baCandidateCnt is followed by trigger BA
2785 * Rsp Candidate List(tTriggerRspBaCandidate)
2790 struct wcn36xx_hal_del_ba_req_msg {
2791 struct wcn36xx_hal_msg_header header;
2796 /* TID for which the BA session is being deleted */
2805 struct wcn36xx_hal_del_ba_rsp_msg {
2806 struct wcn36xx_hal_msg_header header;
2808 /* success or failure */
2812 struct tsm_stats_req_msg {
2813 struct wcn36xx_hal_msg_header header;
2821 struct tsm_stats_rsp_msg {
2822 struct wcn36xx_hal_msg_header header;
2824 /*success or failure */
2827 /* Uplink Packet Queue delay */
2828 u16 uplink_pkt_queue_delay;
2830 /* Uplink Packet Queue delay histogram */
2831 u16 uplink_pkt_queue_delay_hist[4];
2833 /* Uplink Packet Transmit delay */
2834 u32 uplink_pkt_tx_delay;
2836 /* Uplink Packet loss */
2837 u16 uplink_pkt_loss;
2839 /* Uplink Packet count */
2840 u16 uplink_pkt_count;
2849 struct set_key_done_msg {
2850 struct wcn36xx_hal_msg_header header;
2852 /*bssid of the keys */
2857 struct wcn36xx_hal_nv_img_download_req_msg {
2858 /* Note: The length specified in wcn36xx_hal_nv_img_download_req_msg
2859 * messages should be
2860 * header.len = sizeof(wcn36xx_hal_nv_img_download_req_msg) +
2861 * nv_img_buffer_size */
2862 struct wcn36xx_hal_msg_header header;
2864 /* Fragment sequence number of the NV Image. Note that NV Image
2865 * might not fit into one message due to size limitation of the SMD
2866 * channel FIFO. UMAC can hence choose to chop the NV blob into
2867 * multiple fragments starting with seqeunce number 0, 1, 2 etc.
2868 * The last fragment MUST be indicated by marking the
2869 * isLastFragment field to 1. Note that all the NV blobs would be
2870 * concatenated together by HAL without any padding bytes in
2874 /* Is this the last fragment? When set to 1 it indicates that no
2875 * more fragments will be sent by UMAC and HAL can concatenate all
2876 * the NV blobs rcvd & proceed with the parsing. HAL would generate
2877 * a WCN36XX_HAL_DOWNLOAD_NV_RSP to the WCN36XX_HAL_DOWNLOAD_NV_REQ
2878 * after it receives each fragment */
2881 /* NV Image size (number of bytes) */
2882 u32 nv_img_buffer_size;
2884 /* Following the 'nv_img_buffer_size', there should be
2885 * nv_img_buffer_size bytes of NV Image i.e.
2886 * u8[nv_img_buffer_size] */
2889 struct wcn36xx_hal_nv_img_download_rsp_msg {
2890 struct wcn36xx_hal_msg_header header;
2892 /* Success or Failure. HAL would generate a
2893 * WCN36XX_HAL_DOWNLOAD_NV_RSP after each fragment */
2897 struct wcn36xx_hal_nv_store_ind {
2898 /* Note: The length specified in tHalNvStoreInd messages should be
2899 * header.msgLen = sizeof(tHalNvStoreInd) + nvBlobSize */
2900 struct wcn36xx_hal_msg_header header;
2905 /* Size of NV Blob */
2908 /* Following the 'nvBlobSize', there should be nvBlobSize bytes of
2909 * NV blob i.e. u8[nvBlobSize] */
2912 /* End of Block Ack Related Parameters */
2914 #define WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE 6
2916 /* Definition for MIC failure indication MAC reports this each time a MIC
2917 * failure occures on Rx TKIP packet
2919 struct mic_failure_ind_msg {
2920 struct wcn36xx_hal_msg_header header;
2924 /* address used to compute MIC */
2925 u8 src_addr[ETH_ALEN];
2927 /* transmitter address */
2928 u8 ta_addr[ETH_ALEN];
2930 u8 dst_addr[ETH_ALEN];
2934 /* first byte of IV */
2937 /* second byte of IV */
2940 /* sequence number */
2941 u8 tsc[WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE];
2943 /* receive address */
2944 u8 rx_addr[ETH_ALEN];
2947 struct update_vht_op_mode_req_msg {
2948 struct wcn36xx_hal_msg_header header;
2954 struct update_vht_op_mode_params_rsp_msg {
2955 struct wcn36xx_hal_msg_header header;
2960 struct update_beacon_req_msg {
2961 struct wcn36xx_hal_msg_header header;
2965 /* shortPreamble mode. HAL should update all the STA rates when it
2966 * receives this message */
2969 /* short Slot time. */
2972 /* Beacon Interval */
2973 u16 beacon_interval;
2975 /* Protection related */
2980 u8 lln_non_gf_coexist;
2981 u8 lsig_tx_op_protection_full_support;
2984 u16 param_change_bitmap;
2987 struct update_beacon_rsp_msg {
2988 struct wcn36xx_hal_msg_header header;
2992 struct wcn36xx_hal_send_beacon_req_msg {
2993 struct wcn36xx_hal_msg_header header;
2995 /* length of the template + 6. Only qcom knows why */
2998 /* length of the template. */
3002 u8 beacon[BEACON_TEMPLATE_SIZE - sizeof(u32)];
3006 /* TIM IE offset from the beginning of the template. */
3009 /* P2P IE offset from the begining of the template */
3013 struct send_beacon_rsp_msg {
3014 struct wcn36xx_hal_msg_header header;
3018 struct enable_radar_req_msg {
3019 struct wcn36xx_hal_msg_header header;
3025 struct enable_radar_rsp_msg {
3026 struct wcn36xx_hal_msg_header header;
3028 /* Link Parameters */
3031 /* success or failure */
3035 struct radar_detect_intr_ind_msg {
3036 struct wcn36xx_hal_msg_header header;
3038 u8 radar_det_channel;
3041 struct radar_detect_ind_msg {
3042 struct wcn36xx_hal_msg_header header;
3044 /* channel number in which the RADAR detected */
3047 /* RADAR pulse width in usecond */
3048 u16 radar_pulse_width;
3050 /* Number of RADAR pulses */
3051 u16 num_radar_pulse;
3054 struct wcn36xx_hal_get_tpc_report_req_msg {
3055 struct wcn36xx_hal_msg_header header;
3062 struct wcn36xx_hal_get_tpc_report_rsp_msg {
3063 struct wcn36xx_hal_msg_header header;
3065 /* success or failure */
3069 struct wcn36xx_hal_send_probe_resp_req_msg {
3070 struct wcn36xx_hal_msg_header header;
3072 u8 probe_resp_template[BEACON_TEMPLATE_SIZE];
3073 u32 probe_resp_template_len;
3074 u32 proxy_probe_req_valid_ie_bmap[8];
3078 struct send_probe_resp_rsp_msg {
3079 struct wcn36xx_hal_msg_header header;
3081 /* success or failure */
3085 struct send_unknown_frame_rx_ind_msg {
3086 struct wcn36xx_hal_msg_header header;
3088 /* success or failure */
3092 struct wcn36xx_hal_delete_sta_context_ind_msg {
3093 struct wcn36xx_hal_msg_header header;
3098 /* TO SUPPORT BT-AMP */
3101 /* HAL copies bssid from the sta table. */
3104 /* To unify the keepalive / unknown A2 / tim-based disa */
3108 struct indicate_del_sta {
3109 struct wcn36xx_hal_msg_header header;
3117 struct bt_amp_event_msg {
3118 struct wcn36xx_hal_msg_header header;
3120 enum bt_amp_event_type btAmpEventType;
3123 struct bt_amp_event_rsp {
3124 struct wcn36xx_hal_msg_header header;
3126 /* success or failure */
3130 struct tl_hal_flush_ac_req_msg {
3131 struct wcn36xx_hal_msg_header header;
3133 /* Station Index. originates from HAL */
3136 /* TID for which the transmit queue is being flushed */
3140 struct tl_hal_flush_ac_rsp_msg {
3141 struct wcn36xx_hal_msg_header header;
3143 /* Station Index. originates from HAL */
3146 /* TID for which the transmit queue is being flushed */
3149 /* success or failure */
3153 struct wcn36xx_hal_enter_imps_req_msg {
3154 struct wcn36xx_hal_msg_header header;
3157 struct wcn36xx_hal_exit_imps_req {
3158 struct wcn36xx_hal_msg_header header;
3161 struct wcn36xx_hal_enter_bmps_req_msg {
3162 struct wcn36xx_hal_msg_header header;
3166 /* TBTT value derived from the last beacon */
3167 #ifndef BUILD_QWPTTSTATIC
3172 /* DTIM period given to HAL during association may not be valid, if
3173 * association is based on ProbeRsp instead of beacon. */
3176 /* For CCX and 11R Roaming */
3177 u32 rssi_filter_period;
3179 u32 num_beacon_per_rssi_average;
3180 u8 rssi_filter_enable;
3183 struct wcn36xx_hal_exit_bmps_req_msg {
3184 struct wcn36xx_hal_msg_header header;
3190 struct wcn36xx_hal_missed_beacon_ind_msg {
3191 struct wcn36xx_hal_msg_header header;
3196 /* Beacon Filtering data structures */
3198 /* The above structure would be followed by multiple of below mentioned
3201 struct beacon_filter_ie {
3203 u8 check_ie_presence;
3210 struct wcn36xx_hal_add_bcn_filter_req_msg {
3211 struct wcn36xx_hal_msg_header header;
3213 u16 capability_info;
3214 u16 capability_mask;
3215 u16 beacon_interval;
3221 struct wcn36xx_hal_rem_bcn_filter_req {
3222 struct wcn36xx_hal_msg_header header;
3228 #define WCN36XX_HAL_IPV4_ARP_REPLY_OFFLOAD 0
3229 #define WCN36XX_HAL_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3230 #define WCN36XX_HAL_IPV6_NS_OFFLOAD 2
3231 #define WCN36XX_HAL_IPV6_ADDR_LEN 16
3232 #define WCN36XX_HAL_OFFLOAD_DISABLE 0
3233 #define WCN36XX_HAL_OFFLOAD_ENABLE 1
3234 #define WCN36XX_HAL_OFFLOAD_BCAST_FILTER_ENABLE 0x2
3235 #define WCN36XX_HAL_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE \
3236 (HAL_OFFLOAD_ENABLE|HAL_OFFLOAD_BCAST_FILTER_ENABLE)
3238 struct wcn36xx_hal_ns_offload_params {
3239 u8 src_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
3240 u8 self_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
3242 /* Only support 2 possible Network Advertisement IPv6 address */
3243 u8 target_ipv6_addr1[WCN36XX_HAL_IPV6_ADDR_LEN];
3244 u8 target_ipv6_addr2[WCN36XX_HAL_IPV6_ADDR_LEN];
3246 u8 self_addr[ETH_ALEN];
3247 u8 src_ipv6_addr_valid:1;
3248 u8 target_ipv6_addr1_valid:1;
3249 u8 target_ipv6_addr2_valid:1;
3252 /* make it DWORD aligned */
3255 /* slot index for this offload */
3260 struct wcn36xx_hal_host_offload_req {
3263 /* enable or disable */
3267 u8 host_ipv4_addr[4];
3268 u8 host_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
3272 struct wcn36xx_hal_host_offload_req_msg {
3273 struct wcn36xx_hal_msg_header header;
3274 struct wcn36xx_hal_host_offload_req host_offload_params;
3275 struct wcn36xx_hal_ns_offload_params ns_offload_params;
3279 #define WCN36XX_HAL_KEEP_ALIVE_NULL_PKT 1
3280 #define WCN36XX_HAL_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3282 /* Enable or disable keep alive */
3283 #define WCN36XX_HAL_KEEP_ALIVE_DISABLE 0
3284 #define WCN36XX_HAL_KEEP_ALIVE_ENABLE 1
3285 #define WCN36XX_KEEP_ALIVE_TIME_PERIOD 30 /* unit: s */
3287 /* Keep Alive request. */
3288 struct wcn36xx_hal_keep_alive_req_msg {
3289 struct wcn36xx_hal_msg_header header;
3293 u8 host_ipv4_addr[WCN36XX_HAL_IPV4_ADDR_LEN];
3294 u8 dest_ipv4_addr[WCN36XX_HAL_IPV4_ADDR_LEN];
3295 u8 dest_addr[ETH_ALEN];
3299 struct wcn36xx_hal_rssi_threshold_req_msg {
3300 struct wcn36xx_hal_msg_header header;
3305 u8 thres1_pos_notify:1;
3306 u8 thres1_neg_notify:1;
3307 u8 thres2_pos_notify:1;
3308 u8 thres2_neg_notify:1;
3309 u8 thres3_pos_notify:1;
3310 u8 thres3_neg_notify:1;
3314 struct wcn36xx_hal_enter_uapsd_req_msg {
3315 struct wcn36xx_hal_msg_header header;
3328 struct wcn36xx_hal_exit_uapsd_req_msg {
3329 struct wcn36xx_hal_msg_header header;
3333 #define WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE 128
3334 #define WCN36XX_HAL_WOWL_BCAST_MAX_NUM_PATTERNS 16
3336 struct wcn36xx_hal_wowl_add_bcast_ptrn_req_msg {
3337 struct wcn36xx_hal_msg_header header;
3342 /* Pattern byte offset from beginning of the 802.11 packet to start
3343 * of the wake-up pattern */
3346 /* Non-Zero Pattern size */
3350 u8 pattern[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
3352 /* Non-zero pattern mask size */
3356 u8 mask[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
3359 u8 extra[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
3361 /* Extra pattern mask */
3362 u8 mask_extra[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
3367 struct wcn36xx_hal_wow_del_bcast_ptrn_req_msg {
3368 struct wcn36xx_hal_msg_header header;
3370 /* Pattern ID of the wakeup pattern to be deleted */
3375 struct wcn36xx_hal_wowl_enter_req_msg {
3376 struct wcn36xx_hal_msg_header header;
3378 /* Enables/disables magic packet filtering */
3379 u8 magic_packet_enable;
3382 u8 magic_pattern[ETH_ALEN];
3384 /* Enables/disables packet pattern filtering in firmware. Enabling
3385 * this flag enables broadcast pattern matching in Firmware. If
3386 * unicast pattern matching is also desired,
3387 * ucUcastPatternFilteringEnable flag must be set tot true as well
3389 u8 pattern_filtering_enable;
3391 /* Enables/disables unicast packet pattern filtering. This flag
3392 * specifies whether we want to do pattern match on unicast packets
3393 * as well and not just broadcast packets. This flag has no effect
3394 * if the ucPatternFilteringEnable (main controlling flag) is set
3397 u8 ucast_pattern_filtering_enable;
3399 /* This configuration is valid only when magicPktEnable=1. It
3400 * requests hardware to wake up when it receives the Channel Switch
3403 u8 wow_channel_switch_receive;
3405 /* This configuration is valid only when magicPktEnable=1. It
3406 * requests hardware to wake up when it receives the
3407 * Deauthentication Frame.
3409 u8 wow_deauth_receive;
3411 /* This configuration is valid only when magicPktEnable=1. It
3412 * requests hardware to wake up when it receives the Disassociation
3415 u8 wow_disassoc_receive;
3417 /* This configuration is valid only when magicPktEnable=1. It
3418 * requests hardware to wake up when it has missed consecutive
3419 * beacons. This is a hardware register configuration (NOT a
3420 * firmware configuration).
3422 u8 wow_max_missed_beacons;
3424 /* This configuration is valid only when magicPktEnable=1. This is
3425 * a timeout value in units of microsec. It requests hardware to
3426 * unconditionally wake up after it has stayed in WoWLAN mode for
3427 * some time. Set 0 to disable this feature.
3431 /* This configuration directs the WoW packet filtering to look for
3432 * EAP-ID requests embedded in EAPOL frames and use this as a wake
3435 u8 wow_eap_id_request_enable;
3437 /* This configuration directs the WoW packet filtering to look for
3438 * EAPOL-4WAY requests and use this as a wake source.
3440 u8 wow_eapol_4way_enable;
3442 /* This configuration allows a host wakeup on an network scan
3445 u8 wow_net_scan_offload_match;
3447 /* This configuration allows a host wakeup on any GTK rekeying
3450 u8 wow_gtk_rekey_error;
3452 /* This configuration allows a host wakeup on BSS connection loss.
3454 u8 wow_bss_connection_loss;
3459 struct wcn36xx_hal_wowl_exit_req_msg {
3460 struct wcn36xx_hal_msg_header header;
3465 struct wcn36xx_hal_get_rssi_req_msg {
3466 struct wcn36xx_hal_msg_header header;
3469 struct wcn36xx_hal_get_roam_rssi_req_msg {
3470 struct wcn36xx_hal_msg_header header;
3472 /* Valid STA Idx for per STA stats request */
3476 struct wcn36xx_hal_set_uapsd_ac_params_req_msg {
3477 struct wcn36xx_hal_msg_header header;
3482 /* Access Category */
3488 /* Service Interval */
3489 u32 service_interval;
3491 /* Suspend Interval */
3492 u32 suspend_interval;
3494 /* Delay Interval */
3498 struct wcn36xx_hal_configure_rxp_filter_req_msg {
3499 struct wcn36xx_hal_msg_header header;
3501 u8 set_mcst_bcst_filter_setting;
3502 u8 set_mcst_bcst_filter;
3505 struct wcn36xx_hal_enter_imps_rsp_msg {
3506 struct wcn36xx_hal_msg_header header;
3508 /* success or failure */
3512 struct wcn36xx_hal_exit_imps_rsp_msg {
3513 struct wcn36xx_hal_msg_header header;
3515 /* success or failure */
3519 struct wcn36xx_hal_enter_bmps_rsp_msg {
3520 struct wcn36xx_hal_msg_header header;
3522 /* success or failure */
3528 struct wcn36xx_hal_exit_bmps_rsp_msg {
3529 struct wcn36xx_hal_msg_header header;
3531 /* success or failure */
3537 struct wcn36xx_hal_enter_uapsd_rsp_msg {
3538 struct wcn36xx_hal_msg_header header;
3540 /* success or failure */
3546 struct wcn36xx_hal_exit_uapsd_rsp_msg {
3547 struct wcn36xx_hal_msg_header header;
3549 /* success or failure */
3555 struct wcn36xx_hal_rssi_notification_ind_msg {
3556 struct wcn36xx_hal_msg_header header;
3558 u32 rssi_thres1_pos_cross:1;
3559 u32 rssi_thres1_neg_cross:1;
3560 u32 rssi_thres2_pos_cross:1;
3561 u32 rssi_thres2_neg_cross:1;
3562 u32 rssi_thres3_pos_cross:1;
3563 u32 rssi_thres3_neg_cross:1;
3569 struct wcn36xx_hal_get_rssio_rsp_msg {
3570 struct wcn36xx_hal_msg_header header;
3572 /* success or failure */
3578 struct wcn36xx_hal_get_roam_rssi_rsp_msg {
3579 struct wcn36xx_hal_msg_header header;
3581 /* success or failure */
3588 struct wcn36xx_hal_wowl_enter_rsp_msg {
3589 struct wcn36xx_hal_msg_header header;
3591 /* success or failure */
3596 struct wcn36xx_hal_wowl_exit_rsp_msg {
3597 struct wcn36xx_hal_msg_header header;
3599 /* success or failure */
3604 struct wcn36xx_hal_add_bcn_filter_rsp_msg {
3605 struct wcn36xx_hal_msg_header header;
3607 /* success or failure */
3611 struct wcn36xx_hal_rem_bcn_filter_rsp_msg {
3612 struct wcn36xx_hal_msg_header header;
3614 /* success or failure */
3618 struct wcn36xx_hal_add_wowl_bcast_ptrn_rsp_msg {
3619 struct wcn36xx_hal_msg_header header;
3621 /* success or failure */
3626 struct wcn36xx_hal_del_wowl_bcast_ptrn_rsp_msg {
3627 struct wcn36xx_hal_msg_header header;
3629 /* success or failure */
3634 struct wcn36xx_hal_host_offload_rsp_msg {
3635 struct wcn36xx_hal_msg_header header;
3637 /* success or failure */
3641 struct wcn36xx_hal_keep_alive_rsp_msg {
3642 struct wcn36xx_hal_msg_header header;
3644 /* success or failure */
3648 struct wcn36xx_hal_set_rssi_thresh_rsp_msg {
3649 struct wcn36xx_hal_msg_header header;
3651 /* success or failure */
3655 struct wcn36xx_hal_set_uapsd_ac_params_rsp_msg {
3656 struct wcn36xx_hal_msg_header header;
3658 /* success or failure */
3662 struct wcn36xx_hal_configure_rxp_filter_rsp_msg {
3663 struct wcn36xx_hal_msg_header header;
3665 /* success or failure */
3669 struct set_max_tx_pwr_req {
3670 struct wcn36xx_hal_msg_header header;
3672 /* BSSID is needed to identify which session issued this request.
3673 * As the request has power constraints, this should be applied
3674 * only to that session */
3677 u8 self_addr[ETH_ALEN];
3679 /* In request, power == MaxTx power to be used. */
3683 struct set_max_tx_pwr_rsp_msg {
3684 struct wcn36xx_hal_msg_header header;
3686 /* power == tx power used for management frames */
3689 /* success or failure */
3693 struct set_tx_pwr_req_msg {
3694 struct wcn36xx_hal_msg_header header;
3696 /* TX Power in milli watts */
3702 struct set_tx_pwr_rsp_msg {
3703 struct wcn36xx_hal_msg_header header;
3705 /* success or failure */
3709 struct get_tx_pwr_req_msg {
3710 struct wcn36xx_hal_msg_header header;
3715 struct get_tx_pwr_rsp_msg {
3716 struct wcn36xx_hal_msg_header header;
3718 /* success or failure */
3721 /* TX Power in milli watts */
3725 struct set_p2p_gonoa_req_msg {
3726 struct wcn36xx_hal_msg_header header;
3733 u32 single_noa_duration;
3737 struct set_p2p_gonoa_rsp_msg {
3738 struct wcn36xx_hal_msg_header header;
3740 /* success or failure */
3744 struct wcn36xx_hal_add_sta_self_req {
3745 struct wcn36xx_hal_msg_header header;
3747 u8 self_addr[ETH_ALEN];
3751 struct wcn36xx_hal_add_sta_self_rsp_msg {
3752 struct wcn36xx_hal_msg_header header;
3754 /* success or failure */
3757 /* Self STA Index */
3760 /* DPU Index (IGTK, PTK, GTK all same) */
3767 struct wcn36xx_hal_del_sta_self_req_msg {
3768 struct wcn36xx_hal_msg_header header;
3770 u8 self_addr[ETH_ALEN];
3773 struct wcn36xx_hal_del_sta_self_rsp_msg {
3774 struct wcn36xx_hal_msg_header header;
3776 /*success or failure */
3779 u8 self_addr[ETH_ALEN];
3782 struct aggr_add_ts_req {
3783 struct wcn36xx_hal_msg_header header;
3788 /* TSPEC handler uniquely identifying a TSPEC for a STA in a BSS.
3789 * This will carry the bitmap with the bit positions representing
3793 /* Tspec info per AC To program TPE with required parameters */
3794 struct wcn36xx_hal_tspec_ie tspec[WCN36XX_HAL_MAX_AC];
3796 /* U-APSD Flags: 1b per AC. Encoded as follows:
3797 b7 b6 b5 b4 b3 b2 b1 b0 =
3798 X X X X BE BK VI VO */
3801 /* These parameters are for all the access categories */
3803 /* Service Interval */
3804 u32 service_interval[WCN36XX_HAL_MAX_AC];
3806 /* Suspend Interval */
3807 u32 suspend_interval[WCN36XX_HAL_MAX_AC];
3809 /* Delay Interval */
3810 u32 delay_interval[WCN36XX_HAL_MAX_AC];
3813 struct aggr_add_ts_rsp_msg {
3814 struct wcn36xx_hal_msg_header header;
3816 /* success or failure */
3819 /* FIXME PRIMA for future use for 11R */
3823 struct wcn36xx_hal_configure_apps_cpu_wakeup_state_req_msg {
3824 struct wcn36xx_hal_msg_header header;
3826 u8 is_apps_cpu_awake;
3829 struct wcn36xx_hal_configure_apps_cpu_wakeup_state_rsp_msg {
3830 struct wcn36xx_hal_msg_header header;
3832 /* success or failure */
3836 struct wcn36xx_hal_dump_cmd_req_msg {
3837 struct wcn36xx_hal_msg_header header;
3846 struct wcn36xx_hal_dump_cmd_rsp_msg {
3847 struct wcn36xx_hal_msg_header header;
3849 /* success or failure */
3852 /* Length of the responce message */
3855 /* FIXME: Currently considering the the responce will be less than
3857 u8 rsp_buffer[DUMPCMD_RSP_BUFFER];
3860 #define WLAN_COEX_IND_DATA_SIZE (4)
3861 #define WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3862 #define WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
3864 struct coex_ind_msg {
3865 struct wcn36xx_hal_msg_header header;
3867 /* Coex Indication Type */
3870 /* Coex Indication Data */
3871 u32 data[WLAN_COEX_IND_DATA_SIZE];
3874 struct wcn36xx_hal_tx_compl_ind_msg {
3875 struct wcn36xx_hal_msg_header header;
3877 /* Tx Complete Indication Success or Failure */
3881 struct wcn36xx_hal_wlan_host_suspend_ind_msg {
3882 struct wcn36xx_hal_msg_header header;
3884 u32 configured_mcst_bcst_filter_setting;
3885 u32 active_session_count;
3888 struct wcn36xx_hal_wlan_exclude_unencrpted_ind_msg {
3889 struct wcn36xx_hal_msg_header header;
3891 u8 dot11_exclude_unencrypted;
3895 struct noa_attr_ind_msg {
3896 struct wcn36xx_hal_msg_header header;
3902 u16 noa1_interval_count;
3908 u16 noa2_interval_count;
3912 u32 noa2_start_time;
3917 struct noa_start_ind_msg {
3918 struct wcn36xx_hal_msg_header header;
3924 struct wcn36xx_hal_wlan_host_resume_req_msg {
3925 struct wcn36xx_hal_msg_header header;
3927 u8 configured_mcst_bcst_filter_setting;
3930 struct wcn36xx_hal_host_resume_rsp_msg {
3931 struct wcn36xx_hal_msg_header header;
3933 /* success or failure */
3937 struct wcn36xx_hal_del_ba_ind_msg {
3938 struct wcn36xx_hal_msg_header header;
3942 /* Peer MAC Address, whose BA session has timed out */
3943 u8 peer_addr[ETH_ALEN];
3945 /* TID for which a BA session timeout is being triggered */
3956 /* TO SUPPORT BT-AMP */
3962 /* Max number of channels that a network can be found on */
3963 #define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS 26
3965 /* Max number of channels that a network can be found on */
3966 #define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX 60
3968 /* Maximum numbers of networks supported by PNO */
3969 #define WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS 16
3971 /* The number of scan time intervals that can be programmed into PNO */
3972 #define WCN36XX_HAL_PNO_MAX_SCAN_TIMERS 10
3974 /* Maximum size of the probe template */
3975 #define WCN36XX_HAL_PNO_MAX_PROBE_SIZE 450
3977 /* Type of PNO enabling:
3979 * Immediate - scanning will start immediately and PNO procedure will be
3980 * repeated based on timer
3982 * Suspend - scanning will start at suspend
3984 * Resume - scanning will start on system resume
3988 PNO_MODE_ON_SUSPEND,
3990 PNO_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
3993 /* Authentication type */
3996 AUTH_TYPE_OPEN_SYSTEM = 1,
3998 /* Upper layer authentication types */
4000 AUTH_TYPE_WPA_PSK = 3,
4003 AUTH_TYPE_RSN_PSK = 5,
4004 AUTH_TYPE_FT_RSN = 6,
4005 AUTH_TYPE_FT_RSN_PSK = 7,
4006 AUTH_TYPE_WAPI_WAI_CERTIFICATE = 8,
4007 AUTH_TYPE_WAPI_WAI_PSK = 9,
4009 AUTH_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
4012 /* Encryption type */
4021 ED_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
4024 /* SSID broadcast type */
4025 enum ssid_bcast_type {
4030 BCAST_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
4033 /* The network description for which PNO will have to look for */
4034 struct network_type {
4035 /* SSID of the BSS */
4036 struct wcn36xx_hal_mac_ssid ssid;
4038 /* Authentication type for the network */
4039 enum auth_type authentication;
4041 /* Encryption type for the network */
4042 enum ed_type encryption;
4044 /* Indicate the channel on which the Network can be found 0 - if
4047 u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];
4049 /* Indicates the RSSI threshold for the network to be considered */
4054 /* How much it should wait */
4057 /* How many times it should repeat that wait value 0 - keep using
4058 * this timer until PNO is disabled */
4061 /* e.g: 2 3 4 0 - it will wait 2s between consecutive scans for 3
4062 * times - after that it will wait 4s between consecutive scans
4066 /* The network parameters to be sent to the PNO algorithm */
4067 struct scan_timers_type {
4068 /* set to 0 if you wish for PNO to use its default telescopic timer */
4071 /* A set value represents the amount of time that PNO will wait
4072 * between two consecutive scan procedures If the desired is for a
4073 * uniform timer that fires always at the exact same interval - one
4074 * single value is to be set If there is a desire for a more
4075 * complex - telescopic like timer multiple values can be set -
4076 * once PNO reaches the end of the array it will continue scanning
4077 * at intervals presented by the last value */
4078 struct scan_timer values[WCN36XX_HAL_PNO_MAX_SCAN_TIMERS];
4081 /* Preferred network list request */
4082 struct set_pref_netw_list_req {
4083 struct wcn36xx_hal_msg_header header;
4088 /* Immediate, On Suspend, On Resume */
4091 /* Number of networks sent for PNO */
4094 /* The networks that PNO needs to look for */
4095 struct network_type networks[WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS];
4097 /* The scan timers required for PNO */
4098 struct scan_timers_type scan_timers;
4100 /* Probe template for 2.4GHz band */
4101 u16 band_24g_probe_size;
4102 u8 band_24g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
4104 /* Probe template for 5GHz band */
4105 u16 band_5g_probe_size;
4106 u8 band_5g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
4109 /* The network description for which PNO will have to look for */
4110 struct network_type_new {
4111 /* SSID of the BSS */
4112 struct wcn36xx_hal_mac_ssid ssid;
4114 /* Authentication type for the network */
4115 enum auth_type authentication;
4117 /* Encryption type for the network */
4118 enum ed_type encryption;
4120 /* SSID broadcast type, normal, hidden or unknown */
4121 enum ssid_bcast_type bcast_network_type;
4123 /* Indicate the channel on which the Network can be found 0 - if
4126 u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];
4128 /* Indicates the RSSI threshold for the network to be considered */
4132 /* Preferred network list request new */
4133 struct set_pref_netw_list_req_new {
4134 struct wcn36xx_hal_msg_header header;
4139 /* Immediate, On Suspend, On Resume */
4142 /* Number of networks sent for PNO */
4145 /* The networks that PNO needs to look for */
4146 struct network_type_new networks[WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS];
4148 /* The scan timers required for PNO */
4149 struct scan_timers_type scan_timers;
4151 /* Probe template for 2.4GHz band */
4152 u16 band_24g_probe_size;
4153 u8 band_24g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
4155 /* Probe template for 5GHz band */
4156 u16 band_5g_probe_size;
4157 u8 band_5g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
4160 /* Preferred network list response */
4161 struct set_pref_netw_list_resp {
4162 struct wcn36xx_hal_msg_header header;
4164 /* status of the request - just to indicate that PNO has
4165 * acknowledged the request and will start scanning */
4169 /* Preferred network found indication */
4170 struct pref_netw_found_ind {
4172 struct wcn36xx_hal_msg_header header;
4174 /* Network that was found with the highest RSSI */
4175 struct wcn36xx_hal_mac_ssid ssid;
4177 /* Indicates the RSSI */
4181 /* RSSI Filter request */
4182 struct set_rssi_filter_req {
4183 struct wcn36xx_hal_msg_header header;
4185 /* RSSI Threshold */
4189 /* Set RSSI filter resp */
4190 struct set_rssi_filter_resp {
4191 struct wcn36xx_hal_msg_header header;
4193 /* status of the request */
4197 /* Update scan params - sent from host to PNO to be used during PNO
4199 struct wcn36xx_hal_update_scan_params_req {
4201 struct wcn36xx_hal_msg_header header;
4203 /* Host setting for 11d */
4206 /* Lets PNO know that host has determined the regulatory domain */
4209 /* Channels on which PNO is allowed to scan */
4211 u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];
4213 /* Minimum channel time */
4214 u16 active_min_ch_time;
4216 /* Maximum channel time */
4217 u16 active_max_ch_time;
4219 /* Minimum channel time */
4220 u16 passive_min_ch_time;
4222 /* Maximum channel time */
4223 u16 passive_max_ch_time;
4226 enum phy_chan_bond_state state;
4229 /* Update scan params - sent from host to PNO to be used during PNO
4231 struct wcn36xx_hal_update_scan_params_req_ex {
4233 struct wcn36xx_hal_msg_header header;
4235 /* Host setting for 11d */
4238 /* Lets PNO know that host has determined the regulatory domain */
4241 /* Channels on which PNO is allowed to scan */
4243 u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX];
4245 /* Minimum channel time */
4246 u16 active_min_ch_time;
4248 /* Maximum channel time */
4249 u16 active_max_ch_time;
4251 /* Minimum channel time */
4252 u16 passive_min_ch_time;
4254 /* Maximum channel time */
4255 u16 passive_max_ch_time;
4258 enum phy_chan_bond_state state;
4261 /* Update scan params - sent from host to PNO to be used during PNO
4263 struct wcn36xx_hal_update_scan_params_resp {
4265 struct wcn36xx_hal_msg_header header;
4267 /* status of the request */
4271 struct wcn36xx_hal_set_tx_per_tracking_req_msg {
4272 struct wcn36xx_hal_msg_header header;
4274 /* 0: disable, 1:enable */
4275 u8 tx_per_tracking_enable;
4277 /* Check period, unit is sec. */
4278 u8 tx_per_tracking_period;
4280 /* (Fail TX packet)/(Total TX packet) ratio, the unit is 10%. */
4281 u8 tx_per_tracking_ratio;
4283 /* A watermark of check number, once the tx packet exceed this
4284 * number, we do the check, default is 5 */
4285 u32 tx_per_tracking_watermark;
4288 struct wcn36xx_hal_set_tx_per_tracking_rsp_msg {
4289 struct wcn36xx_hal_msg_header header;
4291 /* success or failure */
4296 struct tx_per_hit_ind_msg {
4297 struct wcn36xx_hal_msg_header header;
4300 /* Packet Filtering Definitions Begin */
4301 #define WCN36XX_HAL_PROTOCOL_DATA_LEN 8
4302 #define WCN36XX_HAL_MAX_NUM_MULTICAST_ADDRESS 240
4303 #define WCN36XX_HAL_MAX_NUM_FILTERS 20
4304 #define WCN36XX_HAL_MAX_CMP_PER_FILTER 10
4306 enum wcn36xx_hal_receive_packet_filter_type {
4307 HAL_RCV_FILTER_TYPE_INVALID,
4308 HAL_RCV_FILTER_TYPE_FILTER_PKT,
4309 HAL_RCV_FILTER_TYPE_BUFFER_PKT,
4310 HAL_RCV_FILTER_TYPE_MAX_ENUM_SIZE
4313 enum wcn36xx_hal_rcv_pkt_flt_protocol_type {
4314 HAL_FILTER_PROTO_TYPE_INVALID,
4315 HAL_FILTER_PROTO_TYPE_MAC,
4316 HAL_FILTER_PROTO_TYPE_ARP,
4317 HAL_FILTER_PROTO_TYPE_IPV4,
4318 HAL_FILTER_PROTO_TYPE_IPV6,
4319 HAL_FILTER_PROTO_TYPE_UDP,
4320 HAL_FILTER_PROTO_TYPE_MAX
4323 enum wcn36xx_hal_rcv_pkt_flt_cmp_flag_type {
4324 HAL_FILTER_CMP_TYPE_INVALID,
4325 HAL_FILTER_CMP_TYPE_EQUAL,
4326 HAL_FILTER_CMP_TYPE_MASK_EQUAL,
4327 HAL_FILTER_CMP_TYPE_NOT_EQUAL,
4328 HAL_FILTER_CMP_TYPE_MAX
4331 struct wcn36xx_hal_rcv_pkt_filter_params {
4335 /* Length of the data to compare */
4338 /* from start of the respective frame header */
4341 /* Reserved field */
4344 /* Data to compare */
4345 u8 compare_data[WCN36XX_HAL_PROTOCOL_DATA_LEN];
4347 /* Mask to be applied on the received packet data before compare */
4348 u8 data_mask[WCN36XX_HAL_PROTOCOL_DATA_LEN];
4351 struct wcn36xx_hal_sessionized_rcv_pkt_filter_cfg_type {
4357 struct wcn36xx_hal_rcv_pkt_filter_params params[1];
4360 struct wcn36xx_hal_set_rcv_pkt_filter_req_msg {
4361 struct wcn36xx_hal_msg_header header;
4367 struct wcn36xx_hal_rcv_pkt_filter_params params[1];
4370 struct wcn36xx_hal_rcv_flt_mc_addr_list_type {
4371 /* from start of the respective frame header */
4375 u8 mc_addr[WCN36XX_HAL_MAX_NUM_MULTICAST_ADDRESS][ETH_ALEN];
4379 struct wcn36xx_hal_set_pkt_filter_rsp_msg {
4380 struct wcn36xx_hal_msg_header header;
4382 /* success or failure */
4388 struct wcn36xx_hal_rcv_flt_pkt_match_cnt_req_msg {
4389 struct wcn36xx_hal_msg_header header;
4394 struct wcn36xx_hal_rcv_flt_pkt_match_cnt {
4399 struct wcn36xx_hal_rcv_flt_pkt_match_cnt_rsp_msg {
4400 struct wcn36xx_hal_msg_header header;
4402 /* Success or Failure */
4406 struct wcn36xx_hal_rcv_flt_pkt_match_cnt
4407 matches[WCN36XX_HAL_MAX_NUM_FILTERS];
4411 struct wcn36xx_hal_rcv_flt_pkt_clear_param {
4412 /* only valid for response message */
4418 struct wcn36xx_hal_rcv_flt_pkt_clear_req_msg {
4419 struct wcn36xx_hal_msg_header header;
4420 struct wcn36xx_hal_rcv_flt_pkt_clear_param param;
4423 struct wcn36xx_hal_rcv_flt_pkt_clear_rsp_msg {
4424 struct wcn36xx_hal_msg_header header;
4425 struct wcn36xx_hal_rcv_flt_pkt_clear_param param;
4428 struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_req_msg {
4429 struct wcn36xx_hal_msg_header header;
4430 struct wcn36xx_hal_rcv_flt_mc_addr_list_type mc_addr_list;
4433 struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_rsp_msg {
4434 struct wcn36xx_hal_msg_header header;
4439 /* Packet Filtering Definitions End */
4441 struct wcn36xx_hal_set_power_params_req_msg {
4442 struct wcn36xx_hal_msg_header header;
4450 /* Listen Interval */
4451 u32 listen_interval;
4453 /* Broadcast Multicast Filter */
4454 u32 bcast_mcast_filter;
4456 /* Beacon Early Termination */
4459 /* Beacon Early Termination Interval */
4463 struct wcn36xx_hal_set_power_params_resp {
4465 struct wcn36xx_hal_msg_header header;
4467 /* status of the request */
4471 /* Capability bitmap exchange definitions and macros starts */
4473 enum place_holder_in_cap_bitmap {
4477 SLM_SESSIONIZATION = 3,
4481 P2P_GO_NOA_DECOUPLE_INIT_SCAN = 7,
4482 WLANACTIVE_OFFLOAD = 8,
4486 BCN_MISS_OFFLOAD = 12,
4488 STA_ADVANCED_PWRSAVE = 14,
4497 WLAN_ROAM_SCAN_OFFLOAD = 23,
4498 SPECULATIVE_PS_POLL = 24,
4500 IBSS_HEARTBEAT_OFFLOAD = 26,
4501 WLAN_SCAN_OFFLOAD = 27,
4502 WLAN_PERIODIC_TX_PTRN = 28,
4506 EXTENDED_NSOFFLOAD_SLOT = 32,
4508 HT40_OBSS_SCAN = 34,
4509 UPDATE_CHANNEL_LIST = 35,
4510 WLAN_MCADDR_FLT = 36,
4513 TDLS_SCAN_COEXISTENCE = 39,
4514 LINK_LAYER_STATS_MEAS = 40,
4517 DYNAMIC_WMM_PS = 43,
4518 MAC_SPOOFED_SCAN = 44,
4519 BMU_ERROR_GENERIC_RECOVERY = 45,
4522 WPS_PRBRSP_TMPL = 48,
4523 BCN_IE_FLT_DELTA = 49,
4524 TDLS_OFF_CHANNEL = 51,
4526 MGMT_FRAME_LOGGING = 53,
4527 ENHANCED_TXBD_COMPLETION = 54,
4528 LOGGING_ENHANCEMENT = 55,
4529 EXT_SCAN_ENHANCED = 56,
4530 MEMORY_DUMP_SUPPORTED = 57,
4531 PER_PKT_STATS_SUPPORTED = 58,
4534 ANTENNA_DIVERSITY_SELECTION = 62,
4536 MAX_FEATURE_SUPPORTED = 128,
4539 #define WCN36XX_HAL_CAPS_SIZE 4
4541 struct wcn36xx_hal_feat_caps_msg {
4543 struct wcn36xx_hal_msg_header header;
4545 u32 feat_caps[WCN36XX_HAL_CAPS_SIZE];
4548 /* status codes to help debug rekey failures */
4549 enum gtk_rekey_status {
4550 WCN36XX_HAL_GTK_REKEY_STATUS_SUCCESS = 0,
4552 /* rekey detected, but not handled */
4553 WCN36XX_HAL_GTK_REKEY_STATUS_NOT_HANDLED = 1,
4555 /* MIC check error on M1 */
4556 WCN36XX_HAL_GTK_REKEY_STATUS_MIC_ERROR = 2,
4558 /* decryption error on M1 */
4559 WCN36XX_HAL_GTK_REKEY_STATUS_DECRYPT_ERROR = 3,
4561 /* M1 replay detected */
4562 WCN36XX_HAL_GTK_REKEY_STATUS_REPLAY_ERROR = 4,
4564 /* missing GTK key descriptor in M1 */
4565 WCN36XX_HAL_GTK_REKEY_STATUS_MISSING_KDE = 5,
4567 /* missing iGTK key descriptor in M1 */
4568 WCN36XX_HAL_GTK_REKEY_STATUS_MISSING_IGTK_KDE = 6,
4570 /* key installation error */
4571 WCN36XX_HAL_GTK_REKEY_STATUS_INSTALL_ERROR = 7,
4573 /* iGTK key installation error */
4574 WCN36XX_HAL_GTK_REKEY_STATUS_IGTK_INSTALL_ERROR = 8,
4576 /* GTK rekey M2 response TX error */
4577 WCN36XX_HAL_GTK_REKEY_STATUS_RESP_TX_ERROR = 9,
4579 /* non-specific general error */
4580 WCN36XX_HAL_GTK_REKEY_STATUS_GEN_ERROR = 255
4583 /* wake reason types */
4584 enum wake_reason_type {
4585 WCN36XX_HAL_WAKE_REASON_NONE = 0,
4587 /* magic packet match */
4588 WCN36XX_HAL_WAKE_REASON_MAGIC_PACKET = 1,
4590 /* host defined pattern match */
4591 WCN36XX_HAL_WAKE_REASON_PATTERN_MATCH = 2,
4593 /* EAP-ID frame detected */
4594 WCN36XX_HAL_WAKE_REASON_EAPID_PACKET = 3,
4596 /* start of EAPOL 4-way handshake detected */
4597 WCN36XX_HAL_WAKE_REASON_EAPOL4WAY_PACKET = 4,
4599 /* network scan offload match */
4600 WCN36XX_HAL_WAKE_REASON_NETSCAN_OFFL_MATCH = 5,
4602 /* GTK rekey status wakeup (see status) */
4603 WCN36XX_HAL_WAKE_REASON_GTK_REKEY_STATUS = 6,
4605 /* BSS connection lost */
4606 WCN36XX_HAL_WAKE_REASON_BSS_CONN_LOST = 7,
4610 Wake Packet which is saved at tWakeReasonParams.DataStart
4611 This data is sent for any wake reasons that involve a packet-based wakeup :
4613 WCN36XX_HAL_WAKE_REASON_TYPE_MAGIC_PACKET
4614 WCN36XX_HAL_WAKE_REASON_TYPE_PATTERN_MATCH
4615 WCN36XX_HAL_WAKE_REASON_TYPE_EAPID_PACKET
4616 WCN36XX_HAL_WAKE_REASON_TYPE_EAPOL4WAY_PACKET
4617 WCN36XX_HAL_WAKE_REASON_TYPE_GTK_REKEY_STATUS
4619 The information is provided to the host for auditing and debug purposes
4623 /* Wake reason indication */
4624 struct wcn36xx_hal_wake_reason_ind {
4625 struct wcn36xx_hal_msg_header header;
4627 /* see tWakeReasonType */
4630 /* argument specific to the reason type */
4633 /* length of optional data stored in this message, in case HAL
4634 * truncates the data (i.e. data packets) this length will be less
4635 * than the actual length */
4636 u32 stored_data_len;
4638 /* actual length of data */
4639 u32 actual_data_len;
4641 /* variable length start of data (length == storedDataLen) see
4642 * specific wake type */
4649 #define WCN36XX_HAL_GTK_KEK_BYTES 16
4650 #define WCN36XX_HAL_GTK_KCK_BYTES 16
4652 #define WCN36XX_HAL_GTK_OFFLOAD_FLAGS_DISABLE (1 << 0)
4654 #define GTK_SET_BSS_KEY_TAG 0x1234AA55
4656 struct wcn36xx_hal_gtk_offload_req_msg {
4657 struct wcn36xx_hal_msg_header header;
4659 /* optional flags */
4662 /* Key confirmation key */
4663 u8 kck[WCN36XX_HAL_GTK_KCK_BYTES];
4665 /* key encryption key */
4666 u8 kek[WCN36XX_HAL_GTK_KEK_BYTES];
4668 /* replay counter */
4669 u64 key_replay_counter;
4674 struct wcn36xx_hal_gtk_offload_rsp_msg {
4675 struct wcn36xx_hal_msg_header header;
4677 /* success or failure */
4683 struct wcn36xx_hal_gtk_offload_get_info_req_msg {
4684 struct wcn36xx_hal_msg_header header;
4688 struct wcn36xx_hal_gtk_offload_get_info_rsp_msg {
4689 struct wcn36xx_hal_msg_header header;
4691 /* success or failure */
4694 /* last rekey status when the rekey was offloaded */
4695 u32 last_rekey_status;
4697 /* current replay counter value */
4698 u64 key_replay_counter;
4700 /* total rekey attempts */
4701 u32 total_rekey_count;
4703 /* successful GTK rekeys */
4704 u32 gtk_rekey_count;
4706 /* successful iGTK rekeys */
4707 u32 igtk_rekey_count;
4713 /* Indicates the device mode which indicates about the DHCP activity */
4719 struct dhcp_ind_status {
4720 struct wcn36xx_hal_msg_header header;
4722 /* success or failure */
4727 * Thermal Mitigation mode of operation.
4729 * WCN36XX_HAL_THERMAL_MITIGATION_MODE_0 - Based on AMPDU disabling aggregation
4731 * WCN36XX_HAL_THERMAL_MITIGATION_MODE_1 - Based on AMPDU disabling aggregation
4732 * and reducing transmit power
4734 * WCN36XX_HAL_THERMAL_MITIGATION_MODE_2 - Not supported */
4735 enum wcn36xx_hal_thermal_mitigation_mode_type {
4736 HAL_THERMAL_MITIGATION_MODE_INVALID = -1,
4737 HAL_THERMAL_MITIGATION_MODE_0,
4738 HAL_THERMAL_MITIGATION_MODE_1,
4739 HAL_THERMAL_MITIGATION_MODE_2,
4740 HAL_THERMAL_MITIGATION_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
4745 * Thermal Mitigation level.
4746 * Note the levels are incremental i.e WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_2 =
4747 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_0 +
4748 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_1
4750 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_0 - lowest level of thermal mitigation.
4751 * This level indicates normal mode of operation
4753 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_1 - 1st level of thermal mitigation
4755 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_2 - 2nd level of thermal mitigation
4757 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_3 - 3rd level of thermal mitigation
4759 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_4 - 4th level of thermal mitigation
4761 enum wcn36xx_hal_thermal_mitigation_level_type {
4762 HAL_THERMAL_MITIGATION_LEVEL_INVALID = -1,
4763 HAL_THERMAL_MITIGATION_LEVEL_0,
4764 HAL_THERMAL_MITIGATION_LEVEL_1,
4765 HAL_THERMAL_MITIGATION_LEVEL_2,
4766 HAL_THERMAL_MITIGATION_LEVEL_3,
4767 HAL_THERMAL_MITIGATION_LEVEL_4,
4768 HAL_THERMAL_MITIGATION_LEVEL_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
4772 /* WCN36XX_HAL_SET_THERMAL_MITIGATION_REQ */
4773 struct set_thermal_mitigation_req_msg {
4774 struct wcn36xx_hal_msg_header header;
4776 /* Thermal Mitigation Operation Mode */
4777 enum wcn36xx_hal_thermal_mitigation_mode_type mode;
4779 /* Thermal Mitigation Level */
4780 enum wcn36xx_hal_thermal_mitigation_level_type level;
4783 struct set_thermal_mitigation_resp {
4785 struct wcn36xx_hal_msg_header header;
4787 /* status of the request */
4791 /* Per STA Class B Statistics. Class B statistics are STA TX/RX stats
4792 * provided to FW from Host via periodic messages */
4793 struct stats_class_b_ind {
4794 struct wcn36xx_hal_msg_header header;
4796 /* Duration over which this stats was collected */
4802 u32 tx_bytes_pushed;
4803 u32 tx_packets_pushed;
4807 u32 rx_packets_rcvd;
4811 /* WCN36XX_HAL_PRINT_REG_INFO_IND */
4812 struct wcn36xx_hal_print_reg_info_ind {
4813 struct wcn36xx_hal_msg_header header;
4825 #endif /* _HAL_H_ */