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 WALN_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 /* Param Change Bitmap sent to HAL */
58 #define PARAM_BCN_INTERVAL_CHANGED (1 << 0)
59 #define PARAM_SHORT_PREAMBLE_CHANGED (1 << 1)
60 #define PARAM_SHORT_SLOT_TIME_CHANGED (1 << 2)
61 #define PARAM_llACOEXIST_CHANGED (1 << 3)
62 #define PARAM_llBCOEXIST_CHANGED (1 << 4)
63 #define PARAM_llGCOEXIST_CHANGED (1 << 5)
64 #define PARAM_HT20MHZCOEXIST_CHANGED (1<<6)
65 #define PARAM_NON_GF_DEVICES_PRESENT_CHANGED (1<<7)
66 #define PARAM_RIFS_MODE_CHANGED (1<<8)
67 #define PARAM_LSIG_TXOP_FULL_SUPPORT_CHANGED (1<<9)
68 #define PARAM_OBSS_MODE_CHANGED (1<<10)
69 #define PARAM_BEACON_UPDATE_MASK \
70 (PARAM_BCN_INTERVAL_CHANGED | \
71 PARAM_SHORT_PREAMBLE_CHANGED | \
72 PARAM_SHORT_SLOT_TIME_CHANGED | \
73 PARAM_llACOEXIST_CHANGED | \
74 PARAM_llBCOEXIST_CHANGED | \
75 PARAM_llGCOEXIST_CHANGED | \
76 PARAM_HT20MHZCOEXIST_CHANGED | \
77 PARAM_NON_GF_DEVICES_PRESENT_CHANGED | \
78 PARAM_RIFS_MODE_CHANGED | \
79 PARAM_LSIG_TXOP_FULL_SUPPORT_CHANGED | \
80 PARAM_OBSS_MODE_CHANGED)
82 /* dump command response Buffer size */
83 #define DUMPCMD_RSP_BUFFER 100
85 /* version string max length (including NULL) */
86 #define WCN36XX_HAL_VERSION_LENGTH 64
88 /* message types for messages exchanged between WDI and HAL */
89 enum wcn36xx_hal_host_msg_type
{
91 WCN36XX_HAL_START_REQ
= 0,
92 WCN36XX_HAL_START_RSP
= 1,
93 WCN36XX_HAL_STOP_REQ
= 2,
94 WCN36XX_HAL_STOP_RSP
= 3,
97 WCN36XX_HAL_INIT_SCAN_REQ
= 4,
98 WCN36XX_HAL_INIT_SCAN_RSP
= 5,
99 WCN36XX_HAL_START_SCAN_REQ
= 6,
100 WCN36XX_HAL_START_SCAN_RSP
= 7,
101 WCN36XX_HAL_END_SCAN_REQ
= 8,
102 WCN36XX_HAL_END_SCAN_RSP
= 9,
103 WCN36XX_HAL_FINISH_SCAN_REQ
= 10,
104 WCN36XX_HAL_FINISH_SCAN_RSP
= 11,
106 /* HW STA configuration/deconfiguration */
107 WCN36XX_HAL_CONFIG_STA_REQ
= 12,
108 WCN36XX_HAL_CONFIG_STA_RSP
= 13,
109 WCN36XX_HAL_DELETE_STA_REQ
= 14,
110 WCN36XX_HAL_DELETE_STA_RSP
= 15,
111 WCN36XX_HAL_CONFIG_BSS_REQ
= 16,
112 WCN36XX_HAL_CONFIG_BSS_RSP
= 17,
113 WCN36XX_HAL_DELETE_BSS_REQ
= 18,
114 WCN36XX_HAL_DELETE_BSS_RSP
= 19,
116 /* Infra STA asscoiation */
117 WCN36XX_HAL_JOIN_REQ
= 20,
118 WCN36XX_HAL_JOIN_RSP
= 21,
119 WCN36XX_HAL_POST_ASSOC_REQ
= 22,
120 WCN36XX_HAL_POST_ASSOC_RSP
= 23,
123 WCN36XX_HAL_SET_BSSKEY_REQ
= 24,
124 WCN36XX_HAL_SET_BSSKEY_RSP
= 25,
125 WCN36XX_HAL_SET_STAKEY_REQ
= 26,
126 WCN36XX_HAL_SET_STAKEY_RSP
= 27,
127 WCN36XX_HAL_RMV_BSSKEY_REQ
= 28,
128 WCN36XX_HAL_RMV_BSSKEY_RSP
= 29,
129 WCN36XX_HAL_RMV_STAKEY_REQ
= 30,
130 WCN36XX_HAL_RMV_STAKEY_RSP
= 31,
133 WCN36XX_HAL_ADD_TS_REQ
= 32,
134 WCN36XX_HAL_ADD_TS_RSP
= 33,
135 WCN36XX_HAL_DEL_TS_REQ
= 34,
136 WCN36XX_HAL_DEL_TS_RSP
= 35,
137 WCN36XX_HAL_UPD_EDCA_PARAMS_REQ
= 36,
138 WCN36XX_HAL_UPD_EDCA_PARAMS_RSP
= 37,
139 WCN36XX_HAL_ADD_BA_REQ
= 38,
140 WCN36XX_HAL_ADD_BA_RSP
= 39,
141 WCN36XX_HAL_DEL_BA_REQ
= 40,
142 WCN36XX_HAL_DEL_BA_RSP
= 41,
144 WCN36XX_HAL_CH_SWITCH_REQ
= 42,
145 WCN36XX_HAL_CH_SWITCH_RSP
= 43,
146 WCN36XX_HAL_SET_LINK_ST_REQ
= 44,
147 WCN36XX_HAL_SET_LINK_ST_RSP
= 45,
148 WCN36XX_HAL_GET_STATS_REQ
= 46,
149 WCN36XX_HAL_GET_STATS_RSP
= 47,
150 WCN36XX_HAL_UPDATE_CFG_REQ
= 48,
151 WCN36XX_HAL_UPDATE_CFG_RSP
= 49,
153 WCN36XX_HAL_MISSED_BEACON_IND
= 50,
154 WCN36XX_HAL_UNKNOWN_ADDR2_FRAME_RX_IND
= 51,
155 WCN36XX_HAL_MIC_FAILURE_IND
= 52,
156 WCN36XX_HAL_FATAL_ERROR_IND
= 53,
157 WCN36XX_HAL_SET_KEYDONE_MSG
= 54,
160 WCN36XX_HAL_DOWNLOAD_NV_REQ
= 55,
161 WCN36XX_HAL_DOWNLOAD_NV_RSP
= 56,
163 WCN36XX_HAL_ADD_BA_SESSION_REQ
= 57,
164 WCN36XX_HAL_ADD_BA_SESSION_RSP
= 58,
165 WCN36XX_HAL_TRIGGER_BA_REQ
= 59,
166 WCN36XX_HAL_TRIGGER_BA_RSP
= 60,
167 WCN36XX_HAL_UPDATE_BEACON_REQ
= 61,
168 WCN36XX_HAL_UPDATE_BEACON_RSP
= 62,
169 WCN36XX_HAL_SEND_BEACON_REQ
= 63,
170 WCN36XX_HAL_SEND_BEACON_RSP
= 64,
172 WCN36XX_HAL_SET_BCASTKEY_REQ
= 65,
173 WCN36XX_HAL_SET_BCASTKEY_RSP
= 66,
174 WCN36XX_HAL_DELETE_STA_CONTEXT_IND
= 67,
175 WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ
= 68,
176 WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_RSP
= 69,
178 /* PTT interface support */
179 WCN36XX_HAL_PROCESS_PTT_REQ
= 70,
180 WCN36XX_HAL_PROCESS_PTT_RSP
= 71,
182 /* BTAMP related events */
183 WCN36XX_HAL_SIGNAL_BTAMP_EVENT_REQ
= 72,
184 WCN36XX_HAL_SIGNAL_BTAMP_EVENT_RSP
= 73,
185 WCN36XX_HAL_TL_HAL_FLUSH_AC_REQ
= 74,
186 WCN36XX_HAL_TL_HAL_FLUSH_AC_RSP
= 75,
188 WCN36XX_HAL_ENTER_IMPS_REQ
= 76,
189 WCN36XX_HAL_EXIT_IMPS_REQ
= 77,
190 WCN36XX_HAL_ENTER_BMPS_REQ
= 78,
191 WCN36XX_HAL_EXIT_BMPS_REQ
= 79,
192 WCN36XX_HAL_ENTER_UAPSD_REQ
= 80,
193 WCN36XX_HAL_EXIT_UAPSD_REQ
= 81,
194 WCN36XX_HAL_UPDATE_UAPSD_PARAM_REQ
= 82,
195 WCN36XX_HAL_CONFIGURE_RXP_FILTER_REQ
= 83,
196 WCN36XX_HAL_ADD_BCN_FILTER_REQ
= 84,
197 WCN36XX_HAL_REM_BCN_FILTER_REQ
= 85,
198 WCN36XX_HAL_ADD_WOWL_BCAST_PTRN
= 86,
199 WCN36XX_HAL_DEL_WOWL_BCAST_PTRN
= 87,
200 WCN36XX_HAL_ENTER_WOWL_REQ
= 88,
201 WCN36XX_HAL_EXIT_WOWL_REQ
= 89,
202 WCN36XX_HAL_HOST_OFFLOAD_REQ
= 90,
203 WCN36XX_HAL_SET_RSSI_THRESH_REQ
= 91,
204 WCN36XX_HAL_GET_RSSI_REQ
= 92,
205 WCN36XX_HAL_SET_UAPSD_AC_PARAMS_REQ
= 93,
206 WCN36XX_HAL_CONFIGURE_APPS_CPU_WAKEUP_STATE_REQ
= 94,
208 WCN36XX_HAL_ENTER_IMPS_RSP
= 95,
209 WCN36XX_HAL_EXIT_IMPS_RSP
= 96,
210 WCN36XX_HAL_ENTER_BMPS_RSP
= 97,
211 WCN36XX_HAL_EXIT_BMPS_RSP
= 98,
212 WCN36XX_HAL_ENTER_UAPSD_RSP
= 99,
213 WCN36XX_HAL_EXIT_UAPSD_RSP
= 100,
214 WCN36XX_HAL_SET_UAPSD_AC_PARAMS_RSP
= 101,
215 WCN36XX_HAL_UPDATE_UAPSD_PARAM_RSP
= 102,
216 WCN36XX_HAL_CONFIGURE_RXP_FILTER_RSP
= 103,
217 WCN36XX_HAL_ADD_BCN_FILTER_RSP
= 104,
218 WCN36XX_HAL_REM_BCN_FILTER_RSP
= 105,
219 WCN36XX_HAL_SET_RSSI_THRESH_RSP
= 106,
220 WCN36XX_HAL_HOST_OFFLOAD_RSP
= 107,
221 WCN36XX_HAL_ADD_WOWL_BCAST_PTRN_RSP
= 108,
222 WCN36XX_HAL_DEL_WOWL_BCAST_PTRN_RSP
= 109,
223 WCN36XX_HAL_ENTER_WOWL_RSP
= 110,
224 WCN36XX_HAL_EXIT_WOWL_RSP
= 111,
225 WCN36XX_HAL_RSSI_NOTIFICATION_IND
= 112,
226 WCN36XX_HAL_GET_RSSI_RSP
= 113,
227 WCN36XX_HAL_CONFIGURE_APPS_CPU_WAKEUP_STATE_RSP
= 114,
229 /* 11k related events */
230 WCN36XX_HAL_SET_MAX_TX_POWER_REQ
= 115,
231 WCN36XX_HAL_SET_MAX_TX_POWER_RSP
= 116,
233 /* 11R related msgs */
234 WCN36XX_HAL_AGGR_ADD_TS_REQ
= 117,
235 WCN36XX_HAL_AGGR_ADD_TS_RSP
= 118,
237 /* P2P WLAN_FEATURE_P2P */
238 WCN36XX_HAL_SET_P2P_GONOA_REQ
= 119,
239 WCN36XX_HAL_SET_P2P_GONOA_RSP
= 120,
241 /* WLAN Dump commands */
242 WCN36XX_HAL_DUMP_COMMAND_REQ
= 121,
243 WCN36XX_HAL_DUMP_COMMAND_RSP
= 122,
245 /* OEM_DATA FEATURE SUPPORT */
246 WCN36XX_HAL_START_OEM_DATA_REQ
= 123,
247 WCN36XX_HAL_START_OEM_DATA_RSP
= 124,
249 /* ADD SELF STA REQ and RSP */
250 WCN36XX_HAL_ADD_STA_SELF_REQ
= 125,
251 WCN36XX_HAL_ADD_STA_SELF_RSP
= 126,
253 /* DEL SELF STA SUPPORT */
254 WCN36XX_HAL_DEL_STA_SELF_REQ
= 127,
255 WCN36XX_HAL_DEL_STA_SELF_RSP
= 128,
257 /* Coex Indication */
258 WCN36XX_HAL_COEX_IND
= 129,
260 /* Tx Complete Indication */
261 WCN36XX_HAL_OTA_TX_COMPL_IND
= 130,
263 /* Host Suspend/resume messages */
264 WCN36XX_HAL_HOST_SUSPEND_IND
= 131,
265 WCN36XX_HAL_HOST_RESUME_REQ
= 132,
266 WCN36XX_HAL_HOST_RESUME_RSP
= 133,
268 WCN36XX_HAL_SET_TX_POWER_REQ
= 134,
269 WCN36XX_HAL_SET_TX_POWER_RSP
= 135,
270 WCN36XX_HAL_GET_TX_POWER_REQ
= 136,
271 WCN36XX_HAL_GET_TX_POWER_RSP
= 137,
273 WCN36XX_HAL_P2P_NOA_ATTR_IND
= 138,
275 WCN36XX_HAL_ENABLE_RADAR_DETECT_REQ
= 139,
276 WCN36XX_HAL_ENABLE_RADAR_DETECT_RSP
= 140,
277 WCN36XX_HAL_GET_TPC_REPORT_REQ
= 141,
278 WCN36XX_HAL_GET_TPC_REPORT_RSP
= 142,
279 WCN36XX_HAL_RADAR_DETECT_IND
= 143,
280 WCN36XX_HAL_RADAR_DETECT_INTR_IND
= 144,
281 WCN36XX_HAL_KEEP_ALIVE_REQ
= 145,
282 WCN36XX_HAL_KEEP_ALIVE_RSP
= 146,
285 WCN36XX_HAL_SET_PREF_NETWORK_REQ
= 147,
286 WCN36XX_HAL_SET_PREF_NETWORK_RSP
= 148,
287 WCN36XX_HAL_SET_RSSI_FILTER_REQ
= 149,
288 WCN36XX_HAL_SET_RSSI_FILTER_RSP
= 150,
289 WCN36XX_HAL_UPDATE_SCAN_PARAM_REQ
= 151,
290 WCN36XX_HAL_UPDATE_SCAN_PARAM_RSP
= 152,
291 WCN36XX_HAL_PREF_NETW_FOUND_IND
= 153,
293 WCN36XX_HAL_SET_TX_PER_TRACKING_REQ
= 154,
294 WCN36XX_HAL_SET_TX_PER_TRACKING_RSP
= 155,
295 WCN36XX_HAL_TX_PER_HIT_IND
= 156,
297 WCN36XX_HAL_8023_MULTICAST_LIST_REQ
= 157,
298 WCN36XX_HAL_8023_MULTICAST_LIST_RSP
= 158,
300 WCN36XX_HAL_SET_PACKET_FILTER_REQ
= 159,
301 WCN36XX_HAL_SET_PACKET_FILTER_RSP
= 160,
302 WCN36XX_HAL_PACKET_FILTER_MATCH_COUNT_REQ
= 161,
303 WCN36XX_HAL_PACKET_FILTER_MATCH_COUNT_RSP
= 162,
304 WCN36XX_HAL_CLEAR_PACKET_FILTER_REQ
= 163,
305 WCN36XX_HAL_CLEAR_PACKET_FILTER_RSP
= 164,
308 * This is temp fix. Should be removed once Host and Riva code is
311 WCN36XX_HAL_INIT_SCAN_CON_REQ
= 165,
313 WCN36XX_HAL_SET_POWER_PARAMS_REQ
= 166,
314 WCN36XX_HAL_SET_POWER_PARAMS_RSP
= 167,
316 WCN36XX_HAL_TSM_STATS_REQ
= 168,
317 WCN36XX_HAL_TSM_STATS_RSP
= 169,
319 /* wake reason indication (WOW) */
320 WCN36XX_HAL_WAKE_REASON_IND
= 170,
322 /* GTK offload support */
323 WCN36XX_HAL_GTK_OFFLOAD_REQ
= 171,
324 WCN36XX_HAL_GTK_OFFLOAD_RSP
= 172,
325 WCN36XX_HAL_GTK_OFFLOAD_GETINFO_REQ
= 173,
326 WCN36XX_HAL_GTK_OFFLOAD_GETINFO_RSP
= 174,
328 WCN36XX_HAL_FEATURE_CAPS_EXCHANGE_REQ
= 175,
329 WCN36XX_HAL_FEATURE_CAPS_EXCHANGE_RSP
= 176,
330 WCN36XX_HAL_EXCLUDE_UNENCRYPTED_IND
= 177,
332 WCN36XX_HAL_SET_THERMAL_MITIGATION_REQ
= 178,
333 WCN36XX_HAL_SET_THERMAL_MITIGATION_RSP
= 179,
335 WCN36XX_HAL_UPDATE_VHT_OP_MODE_REQ
= 182,
336 WCN36XX_HAL_UPDATE_VHT_OP_MODE_RSP
= 183,
338 WCN36XX_HAL_P2P_NOA_START_IND
= 184,
340 WCN36XX_HAL_GET_ROAM_RSSI_REQ
= 185,
341 WCN36XX_HAL_GET_ROAM_RSSI_RSP
= 186,
343 WCN36XX_HAL_CLASS_B_STATS_IND
= 187,
344 WCN36XX_HAL_DEL_BA_IND
= 188,
345 WCN36XX_HAL_DHCP_START_IND
= 189,
346 WCN36XX_HAL_DHCP_STOP_IND
= 190,
348 WCN36XX_HAL_MSG_MAX
= WCN36XX_HAL_MSG_TYPE_MAX_ENUM_SIZE
351 /* Enumeration for Version */
352 enum wcn36xx_hal_host_msg_version
{
353 WCN36XX_HAL_MSG_VERSION0
= 0,
354 WCN36XX_HAL_MSG_VERSION1
= 1,
355 /* define as 2 bytes data */
356 WCN36XX_HAL_MSG_WCNSS_CTRL_VERSION
= 0x7FFF,
357 WCN36XX_HAL_MSG_VERSION_MAX_FIELD
= WCN36XX_HAL_MSG_WCNSS_CTRL_VERSION
361 DRIVER_TYPE_PRODUCTION
= 0,
364 DRIVER_TYPE_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
367 enum wcn36xx_hal_stop_type
{
368 HAL_STOP_TYPE_SYS_RESET
,
369 HAL_STOP_TYPE_SYS_DEEP_SLEEP
,
370 HAL_STOP_TYPE_RF_KILL
,
371 HAL_STOP_TYPE_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
374 enum wcn36xx_hal_sys_mode
{
378 HAL_SYS_MODE_PROMISC
,
379 HAL_SYS_MODE_SUSPEND_LINK
,
380 HAL_SYS_MODE_ROAM_SCAN
,
381 HAL_SYS_MODE_ROAM_SUSPEND_LINK
,
382 HAL_SYS_MODE_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
385 enum phy_chan_bond_state
{
386 /* 20MHz IF bandwidth centered on IF carrier */
387 PHY_SINGLE_CHANNEL_CENTERED
= 0,
389 /* 40MHz IF bandwidth with lower 20MHz supporting the primary channel */
390 PHY_DOUBLE_CHANNEL_LOW_PRIMARY
= 1,
392 /* 40MHz IF bandwidth centered on IF carrier */
393 PHY_DOUBLE_CHANNEL_CENTERED
= 2,
395 /* 40MHz IF bandwidth with higher 20MHz supporting the primary ch */
396 PHY_DOUBLE_CHANNEL_HIGH_PRIMARY
= 3,
398 /* 20/40MHZ offset LOW 40/80MHZ offset CENTERED */
399 PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED
= 4,
401 /* 20/40MHZ offset CENTERED 40/80MHZ offset CENTERED */
402 PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED
= 5,
404 /* 20/40MHZ offset HIGH 40/80MHZ offset CENTERED */
405 PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED
= 6,
407 /* 20/40MHZ offset LOW 40/80MHZ offset LOW */
408 PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW
= 7,
410 /* 20/40MHZ offset HIGH 40/80MHZ offset LOW */
411 PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW
= 8,
413 /* 20/40MHZ offset LOW 40/80MHZ offset HIGH */
414 PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH
= 9,
416 /* 20/40MHZ offset-HIGH 40/80MHZ offset HIGH */
417 PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH
= 10,
419 PHY_CHANNEL_BONDING_STATE_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
422 /* Spatial Multiplexing(SM) Power Save mode */
423 enum wcn36xx_hal_ht_mimo_state
{
424 /* Static SM Power Save mode */
425 WCN36XX_HAL_HT_MIMO_PS_STATIC
= 0,
427 /* Dynamic SM Power Save mode */
428 WCN36XX_HAL_HT_MIMO_PS_DYNAMIC
= 1,
431 WCN36XX_HAL_HT_MIMO_PS_NA
= 2,
433 /* SM Power Save disabled */
434 WCN36XX_HAL_HT_MIMO_PS_NO_LIMIT
= 3,
436 WCN36XX_HAL_HT_MIMO_PS_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
439 /* each station added has a rate mode which specifies the sta attributes */
449 STA_INVALID_RATE_MODE
= WCN36XX_HAL_MAX_ENUM_SIZE
453 #define WCN36XX_HAL_NUM_DSSS_RATES 4
455 /* 6,9,12,18,24,36,48,54 */
456 #define WCN36XX_HAL_NUM_OFDM_RATES 8
459 #define WCN36XX_HAL_NUM_POLARIS_RATES 3
461 #define WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET 16
463 enum wcn36xx_hal_bss_type
{
464 WCN36XX_HAL_INFRASTRUCTURE_MODE
,
466 /* Added for softAP support */
467 WCN36XX_HAL_INFRA_AP_MODE
,
469 WCN36XX_HAL_IBSS_MODE
,
471 /* Added for BT-AMP support */
472 WCN36XX_HAL_BTAMP_STA_MODE
,
474 /* Added for BT-AMP support */
475 WCN36XX_HAL_BTAMP_AP_MODE
,
477 WCN36XX_HAL_AUTO_MODE
,
479 WCN36XX_HAL_DONOT_USE_BSS_TYPE
= WCN36XX_HAL_MAX_ENUM_SIZE
482 enum wcn36xx_hal_nw_type
{
483 WCN36XX_HAL_11A_NW_TYPE
,
484 WCN36XX_HAL_11B_NW_TYPE
,
485 WCN36XX_HAL_11G_NW_TYPE
,
486 WCN36XX_HAL_11N_NW_TYPE
,
487 WCN36XX_HAL_DONOT_USE_NW_TYPE
= WCN36XX_HAL_MAX_ENUM_SIZE
490 #define WCN36XX_HAL_MAC_RATESET_EID_MAX 12
492 enum wcn36xx_hal_ht_operating_mode
{
494 WCN36XX_HAL_HT_OP_MODE_PURE
,
496 /* Overlap Legacy device present, protection is optional */
497 WCN36XX_HAL_HT_OP_MODE_OVERLAP_LEGACY
,
499 /* No legacy device, but 20 MHz HT present */
500 WCN36XX_HAL_HT_OP_MODE_NO_LEGACY_20MHZ_HT
,
502 /* Protection is required */
503 WCN36XX_HAL_HT_OP_MODE_MIXED
,
505 WCN36XX_HAL_HT_OP_MODE_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
508 /* Encryption type enum used with peer */
511 WCN36XX_HAL_ED_WEP40
,
512 WCN36XX_HAL_ED_WEP104
,
516 WCN36XX_HAL_ED_AES_128_CMAC
,
517 WCN36XX_HAL_ED_NOT_IMPLEMENTED
= WCN36XX_HAL_MAX_ENUM_SIZE
520 #define WLAN_MAX_KEY_RSC_LEN 16
521 #define WLAN_WAPI_KEY_RSC_LEN 16
523 /* MAX key length when ULA is used */
524 #define WCN36XX_HAL_MAC_MAX_KEY_LENGTH 32
525 #define WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS 4
528 * Enum to specify whether key is used for TX only, RX only or both.
530 enum ani_key_direction
{
534 WCN36XX_HAL_TX_DEFAULT
,
535 WCN36XX_HAL_DONOT_USE_KEY_DIRECTION
= WCN36XX_HAL_MAX_ENUM_SIZE
539 WCN36XX_HAL_WEP_STATIC
,
540 WCN36XX_HAL_WEP_DYNAMIC
,
541 WCN36XX_HAL_WEP_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
544 enum wcn36xx_hal_link_state
{
546 WCN36XX_HAL_LINK_IDLE_STATE
= 0,
547 WCN36XX_HAL_LINK_PREASSOC_STATE
= 1,
548 WCN36XX_HAL_LINK_POSTASSOC_STATE
= 2,
549 WCN36XX_HAL_LINK_AP_STATE
= 3,
550 WCN36XX_HAL_LINK_IBSS_STATE
= 4,
553 WCN36XX_HAL_LINK_BTAMP_PREASSOC_STATE
= 5,
554 WCN36XX_HAL_LINK_BTAMP_POSTASSOC_STATE
= 6,
555 WCN36XX_HAL_LINK_BTAMP_AP_STATE
= 7,
556 WCN36XX_HAL_LINK_BTAMP_STA_STATE
= 8,
558 /* Reserved for HAL Internal Use */
559 WCN36XX_HAL_LINK_LEARN_STATE
= 9,
560 WCN36XX_HAL_LINK_SCAN_STATE
= 10,
561 WCN36XX_HAL_LINK_FINISH_SCAN_STATE
= 11,
562 WCN36XX_HAL_LINK_INIT_CAL_STATE
= 12,
563 WCN36XX_HAL_LINK_FINISH_CAL_STATE
= 13,
564 WCN36XX_HAL_LINK_LISTEN_STATE
= 14,
566 WCN36XX_HAL_LINK_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
569 enum wcn36xx_hal_stats_mask
{
570 HAL_SUMMARY_STATS_INFO
= 0x00000001,
571 HAL_GLOBAL_CLASS_A_STATS_INFO
= 0x00000002,
572 HAL_GLOBAL_CLASS_B_STATS_INFO
= 0x00000004,
573 HAL_GLOBAL_CLASS_C_STATS_INFO
= 0x00000008,
574 HAL_GLOBAL_CLASS_D_STATS_INFO
= 0x00000010,
575 HAL_PER_STA_STATS_INFO
= 0x00000020
578 /* BT-AMP events type */
579 enum bt_amp_event_type
{
580 BTAMP_EVENT_CONNECTION_START
,
581 BTAMP_EVENT_CONNECTION_STOP
,
582 BTAMP_EVENT_CONNECTION_TERMINATED
,
584 /* This and beyond are invalid values */
585 BTAMP_EVENT_TYPE_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
,
590 PE_SUMMARY_STATS_INFO
= 0x00000001,
591 PE_GLOBAL_CLASS_A_STATS_INFO
= 0x00000002,
592 PE_GLOBAL_CLASS_B_STATS_INFO
= 0x00000004,
593 PE_GLOBAL_CLASS_C_STATS_INFO
= 0x00000008,
594 PE_GLOBAL_CLASS_D_STATS_INFO
= 0x00000010,
595 PE_PER_STA_STATS_INFO
= 0x00000020,
597 /* This and beyond are invalid values */
598 PE_STATS_TYPE_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
602 * Configuration Parameter IDs
604 #define WCN36XX_HAL_CFG_STA_ID 0
605 #define WCN36XX_HAL_CFG_CURRENT_TX_ANTENNA 1
606 #define WCN36XX_HAL_CFG_CURRENT_RX_ANTENNA 2
607 #define WCN36XX_HAL_CFG_LOW_GAIN_OVERRIDE 3
608 #define WCN36XX_HAL_CFG_POWER_STATE_PER_CHAIN 4
609 #define WCN36XX_HAL_CFG_CAL_PERIOD 5
610 #define WCN36XX_HAL_CFG_CAL_CONTROL 6
611 #define WCN36XX_HAL_CFG_PROXIMITY 7
612 #define WCN36XX_HAL_CFG_NETWORK_DENSITY 8
613 #define WCN36XX_HAL_CFG_MAX_MEDIUM_TIME 9
614 #define WCN36XX_HAL_CFG_MAX_MPDUS_IN_AMPDU 10
615 #define WCN36XX_HAL_CFG_RTS_THRESHOLD 11
616 #define WCN36XX_HAL_CFG_SHORT_RETRY_LIMIT 12
617 #define WCN36XX_HAL_CFG_LONG_RETRY_LIMIT 13
618 #define WCN36XX_HAL_CFG_FRAGMENTATION_THRESHOLD 14
619 #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_ZERO 15
620 #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_ONE 16
621 #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_TWO 17
622 #define WCN36XX_HAL_CFG_FIXED_RATE 18
623 #define WCN36XX_HAL_CFG_RETRYRATE_POLICY 19
624 #define WCN36XX_HAL_CFG_RETRYRATE_SECONDARY 20
625 #define WCN36XX_HAL_CFG_RETRYRATE_TERTIARY 21
626 #define WCN36XX_HAL_CFG_FORCE_POLICY_PROTECTION 22
627 #define WCN36XX_HAL_CFG_FIXED_RATE_MULTICAST_24GHZ 23
628 #define WCN36XX_HAL_CFG_FIXED_RATE_MULTICAST_5GHZ 24
629 #define WCN36XX_HAL_CFG_DEFAULT_RATE_INDEX_24GHZ 25
630 #define WCN36XX_HAL_CFG_DEFAULT_RATE_INDEX_5GHZ 26
631 #define WCN36XX_HAL_CFG_MAX_BA_SESSIONS 27
632 #define WCN36XX_HAL_CFG_PS_DATA_INACTIVITY_TIMEOUT 28
633 #define WCN36XX_HAL_CFG_PS_ENABLE_BCN_FILTER 29
634 #define WCN36XX_HAL_CFG_PS_ENABLE_RSSI_MONITOR 30
635 #define WCN36XX_HAL_CFG_NUM_BEACON_PER_RSSI_AVERAGE 31
636 #define WCN36XX_HAL_CFG_STATS_PERIOD 32
637 #define WCN36XX_HAL_CFG_CFP_MAX_DURATION 33
638 #define WCN36XX_HAL_CFG_FRAME_TRANS_ENABLED 34
639 #define WCN36XX_HAL_CFG_DTIM_PERIOD 35
640 #define WCN36XX_HAL_CFG_EDCA_WMM_ACBK 36
641 #define WCN36XX_HAL_CFG_EDCA_WMM_ACBE 37
642 #define WCN36XX_HAL_CFG_EDCA_WMM_ACVO 38
643 #define WCN36XX_HAL_CFG_EDCA_WMM_ACVI 39
644 #define WCN36XX_HAL_CFG_BA_THRESHOLD_HIGH 40
645 #define WCN36XX_HAL_CFG_MAX_BA_BUFFERS 41
646 #define WCN36XX_HAL_CFG_RPE_POLLING_THRESHOLD 42
647 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG 43
648 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG 44
649 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG 45
650 #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG 46
651 #define WCN36XX_HAL_CFG_NO_OF_ONCHIP_REORDER_SESSIONS 47
652 #define WCN36XX_HAL_CFG_PS_LISTEN_INTERVAL 48
653 #define WCN36XX_HAL_CFG_PS_HEART_BEAT_THRESHOLD 49
654 #define WCN36XX_HAL_CFG_PS_NTH_BEACON_FILTER 50
655 #define WCN36XX_HAL_CFG_PS_MAX_PS_POLL 51
656 #define WCN36XX_HAL_CFG_PS_MIN_RSSI_THRESHOLD 52
657 #define WCN36XX_HAL_CFG_PS_RSSI_FILTER_PERIOD 53
658 #define WCN36XX_HAL_CFG_PS_BROADCAST_FRAME_FILTER_ENABLE 54
659 #define WCN36XX_HAL_CFG_PS_IGNORE_DTIM 55
660 #define WCN36XX_HAL_CFG_PS_ENABLE_BCN_EARLY_TERM 56
661 #define WCN36XX_HAL_CFG_DYNAMIC_PS_POLL_VALUE 57
662 #define WCN36XX_HAL_CFG_PS_NULLDATA_AP_RESP_TIMEOUT 58
663 #define WCN36XX_HAL_CFG_TELE_BCN_WAKEUP_EN 59
664 #define WCN36XX_HAL_CFG_TELE_BCN_TRANS_LI 60
665 #define WCN36XX_HAL_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS 61
666 #define WCN36XX_HAL_CFG_TELE_BCN_MAX_LI 62
667 #define WCN36XX_HAL_CFG_TELE_BCN_MAX_LI_IDLE_BCNS 63
668 #define WCN36XX_HAL_CFG_TX_PWR_CTRL_ENABLE 64
669 #define WCN36XX_HAL_CFG_VALID_RADAR_CHANNEL_LIST 65
670 #define WCN36XX_HAL_CFG_TX_POWER_24_20 66
671 #define WCN36XX_HAL_CFG_TX_POWER_24_40 67
672 #define WCN36XX_HAL_CFG_TX_POWER_50_20 68
673 #define WCN36XX_HAL_CFG_TX_POWER_50_40 69
674 #define WCN36XX_HAL_CFG_MCAST_BCAST_FILTER_SETTING 70
675 #define WCN36XX_HAL_CFG_BCN_EARLY_TERM_WAKEUP_INTERVAL 71
676 #define WCN36XX_HAL_CFG_MAX_TX_POWER_2_4 72
677 #define WCN36XX_HAL_CFG_MAX_TX_POWER_5 73
678 #define WCN36XX_HAL_CFG_INFRA_STA_KEEP_ALIVE_PERIOD 74
679 #define WCN36XX_HAL_CFG_ENABLE_CLOSE_LOOP 75
680 #define WCN36XX_HAL_CFG_BTC_EXECUTION_MODE 76
681 #define WCN36XX_HAL_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK 77
682 #define WCN36XX_HAL_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS 78
683 #define WCN36XX_HAL_CFG_PS_TX_INACTIVITY_TIMEOUT 79
684 #define WCN36XX_HAL_CFG_WCNSS_API_VERSION 80
685 #define WCN36XX_HAL_CFG_AP_KEEPALIVE_TIMEOUT 81
686 #define WCN36XX_HAL_CFG_GO_KEEPALIVE_TIMEOUT 82
687 #define WCN36XX_HAL_CFG_ENABLE_MC_ADDR_LIST 83
688 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_INQ_BT 84
689 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_PAGE_BT 85
690 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_CONN_BT 86
691 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_LE_BT 87
692 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_INQ_WLAN 88
693 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_PAGE_WLAN 89
694 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_CONN_WLAN 90
695 #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_LE_WLAN 91
696 #define WCN36XX_HAL_CFG_BTC_DYN_MAX_LEN_BT 92
697 #define WCN36XX_HAL_CFG_BTC_DYN_MAX_LEN_WLAN 93
698 #define WCN36XX_HAL_CFG_BTC_MAX_SCO_BLOCK_PERC 94
699 #define WCN36XX_HAL_CFG_BTC_DHCP_PROT_ON_A2DP 95
700 #define WCN36XX_HAL_CFG_BTC_DHCP_PROT_ON_SCO 96
701 #define WCN36XX_HAL_CFG_ENABLE_UNICAST_FILTER 97
702 #define WCN36XX_HAL_CFG_MAX_ASSOC_LIMIT 98
703 #define WCN36XX_HAL_CFG_ENABLE_LPWR_IMG_TRANSITION 99
704 #define WCN36XX_HAL_CFG_ENABLE_MCC_ADAPTIVE_SCHEDULER 100
705 #define WCN36XX_HAL_CFG_ENABLE_DETECT_PS_SUPPORT 101
706 #define WCN36XX_HAL_CFG_AP_LINK_MONITOR_TIMEOUT 102
707 #define WCN36XX_HAL_CFG_BTC_DWELL_TIME_MULTIPLIER 103
708 #define WCN36XX_HAL_CFG_ENABLE_TDLS_OXYGEN_MODE 104
709 #define WCN36XX_HAL_CFG_MAX_PARAMS 105
711 /* Message definitons - All the messages below need to be packed */
713 /* Definition for HAL API Version. */
714 struct wcnss_wlan_version
{
721 /* Definition for Encryption Keys */
722 struct wcn36xx_hal_keys
{
725 /* 0 for multicast */
728 enum ani_key_direction direction
;
730 /* Usage is unknown */
731 u8 rsc
[WLAN_MAX_KEY_RSC_LEN
];
733 /* =1 for authenticator,=0 for supplicant */
737 u8 key
[WCN36XX_HAL_MAC_MAX_KEY_LENGTH
];
741 * set_sta_key_params Moving here since it is shared by
742 * configbss/setstakey msgs
744 struct wcn36xx_hal_set_sta_key_params
{
748 /* Encryption Type used with peer */
749 enum ani_ed_type enc_type
;
751 /* STATIC/DYNAMIC - valid only for WEP */
752 enum ani_wep_type wep_type
;
754 /* Default WEP key, valid only for static WEP, must between 0 and 3. */
757 /* valid only for non-static WEP encyrptions */
758 struct wcn36xx_hal_keys key
[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS
];
761 * Control for Replay Count, 1= Single TID based replay count on Tx
762 * 0 = Per TID based replay count on TX
768 /* 4-byte control message header used by HAL*/
769 struct wcn36xx_hal_msg_header
{
770 enum wcn36xx_hal_host_msg_type msg_type
:16;
771 enum wcn36xx_hal_host_msg_version msg_version
:16;
775 /* Config format required by HAL for each CFG item*/
776 struct wcn36xx_hal_cfg
{
777 /* Cfg Id. The Id required by HAL is exported by HAL
778 * in shared header file between UMAC and HAL.*/
781 /* Length of the Cfg. This parameter is used to go to next cfg
782 * in the TLV format.*/
785 /* Padding bytes for unaligned address's */
788 /* Reserve bytes for making cfgVal to align address */
791 /* Following the uCfgLen field there should be a 'uCfgLen' bytes
792 * containing the uCfgValue ; u8 uCfgValue[uCfgLen] */
795 struct wcn36xx_hal_mac_start_parameters
{
796 /* Drive Type - Production or FTM etc */
797 enum driver_type type
;
799 /* Length of the config buffer */
802 /* Following this there is a TLV formatted buffer of length
803 * "len" bytes containing all config values.
804 * The TLV is expected to be formatted like this:
805 * 0 15 31 31+CFG_LEN-1 length-1
806 * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......|
810 struct wcn36xx_hal_mac_start_req_msg
{
811 /* config buffer must start in TLV format just here */
812 struct wcn36xx_hal_msg_header header
;
813 struct wcn36xx_hal_mac_start_parameters params
;
816 struct wcn36xx_hal_mac_start_rsp_params
{
817 /* success or failure */
820 /* Max number of STA supported by the device */
823 /* Max number of BSS supported by the device */
827 struct wcnss_wlan_version version
;
829 /* CRM build information */
830 u8 crm_version
[WCN36XX_HAL_VERSION_LENGTH
];
832 /* hardware/chipset/misc version information */
833 u8 wlan_version
[WCN36XX_HAL_VERSION_LENGTH
];
837 struct wcn36xx_hal_mac_start_rsp_msg
{
838 struct wcn36xx_hal_msg_header header
;
839 struct wcn36xx_hal_mac_start_rsp_params start_rsp_params
;
842 struct wcn36xx_hal_mac_stop_req_params
{
843 /* The reason for which the device is being stopped */
844 enum wcn36xx_hal_stop_type reason
;
848 struct wcn36xx_hal_mac_stop_req_msg
{
849 struct wcn36xx_hal_msg_header header
;
850 struct wcn36xx_hal_mac_stop_req_params stop_req_params
;
853 struct wcn36xx_hal_mac_stop_rsp_msg
{
854 struct wcn36xx_hal_msg_header header
;
856 /* success or failure */
860 struct wcn36xx_hal_update_cfg_req_msg
{
862 * Note: The length specified in tHalUpdateCfgReqMsg messages should be
863 * header.msgLen = sizeof(tHalUpdateCfgReqMsg) + uConfigBufferLen
865 struct wcn36xx_hal_msg_header header
;
867 /* Length of the config buffer. Allows UMAC to update multiple CFGs */
871 * Following this there is a TLV formatted buffer of length
872 * "uConfigBufferLen" bytes containing all config values.
873 * The TLV is expected to be formatted like this:
874 * 0 15 31 31+CFG_LEN-1 length-1
875 * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......|
880 struct wcn36xx_hal_update_cfg_rsp_msg
{
881 struct wcn36xx_hal_msg_header header
;
883 /* success or failure */
888 /* Frame control field format (2 bytes) */
889 struct wcn36xx_hal_mac_frame_ctl
{
891 #ifndef ANI_LITTLE_BIT_ENDIAN
925 /* Sequence control field */
926 struct wcn36xx_hal_mac_seq_ctl
{
932 /* Management header format */
933 struct wcn36xx_hal_mac_mgmt_hdr
{
934 struct wcn36xx_hal_mac_frame_ctl fc
;
940 struct wcn36xx_hal_mac_seq_ctl seqControl
;
943 /* FIXME: pronto v1 apparently has 4 */
944 #define WCN36XX_HAL_NUM_BSSID 2
946 /* Scan Entry to hold active BSS idx's */
947 struct wcn36xx_hal_scan_entry
{
948 u8 bss_index
[WCN36XX_HAL_NUM_BSSID
];
952 struct wcn36xx_hal_init_scan_req_msg
{
953 struct wcn36xx_hal_msg_header header
;
957 enum wcn36xx_hal_sys_mode mode
;
959 /* BSSID of the BSS */
962 /* Whether BSS needs to be notified */
965 /* Kind of frame to be used for notifying the BSS (Data Null, QoS
966 * Null, or CTS to Self). Must always be a valid frame type. */
969 /* UMAC has the option of passing the MAC frame to be used for
970 * notifying the BSS. If non-zero, HAL will use the MAC frame
971 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
972 * appropriate MAC frame based on frameType. */
975 /* Following the framelength there is a MAC frame buffer if
976 * frameLength is non-zero. */
977 struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr
;
979 /* Entry to hold number of active BSS idx's */
980 struct wcn36xx_hal_scan_entry scan_entry
;
983 struct wcn36xx_hal_init_scan_con_req_msg
{
984 struct wcn36xx_hal_msg_header header
;
988 enum wcn36xx_hal_sys_mode mode
;
990 /* BSSID of the BSS */
993 /* Whether BSS needs to be notified */
996 /* Kind of frame to be used for notifying the BSS (Data Null, QoS
997 * Null, or CTS to Self). Must always be a valid frame type. */
1000 /* UMAC has the option of passing the MAC frame to be used for
1001 * notifying the BSS. If non-zero, HAL will use the MAC frame
1002 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
1003 * appropriate MAC frame based on frameType. */
1006 /* Following the framelength there is a MAC frame buffer if
1007 * frameLength is non-zero. */
1008 struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr
;
1010 /* Entry to hold number of active BSS idx's */
1011 struct wcn36xx_hal_scan_entry scan_entry
;
1013 /* Single NoA usage in Scanning */
1016 /* Indicates the scan duration (in ms) */
1021 struct wcn36xx_hal_init_scan_rsp_msg
{
1022 struct wcn36xx_hal_msg_header header
;
1024 /* success or failure */
1029 struct wcn36xx_hal_start_scan_req_msg
{
1030 struct wcn36xx_hal_msg_header header
;
1032 /* Indicates the channel to scan */
1036 struct wcn36xx_hal_start_rsp_msg
{
1037 struct wcn36xx_hal_msg_header header
;
1039 /* success or failure */
1047 struct wcn36xx_hal_end_scan_req_msg
{
1048 struct wcn36xx_hal_msg_header header
;
1050 /* Indicates the channel to stop scanning. Not used really. But
1051 * retained for symmetry with "start Scan" message. It can also
1052 * help in error check if needed. */
1056 struct wcn36xx_hal_end_scan_rsp_msg
{
1057 struct wcn36xx_hal_msg_header header
;
1059 /* success or failure */
1063 struct wcn36xx_hal_finish_scan_req_msg
{
1064 struct wcn36xx_hal_msg_header header
;
1066 /* Identifies the operational state of the AP/STA
1067 * LEARN - AP Role SCAN - STA Role */
1068 enum wcn36xx_hal_sys_mode mode
;
1070 /* Operating channel to tune to. */
1073 /* Channel Bonding state If 20/40 MHz is operational, this will
1074 * indicate the 40 MHz extension channel in combination with the
1075 * control channel */
1076 enum phy_chan_bond_state cb_state
;
1078 /* BSSID of the BSS */
1081 /* Whether BSS needs to be notified */
1084 /* Kind of frame to be used for notifying the BSS (Data Null, QoS
1085 * Null, or CTS to Self). Must always be a valid frame type. */
1088 /* UMAC has the option of passing the MAC frame to be used for
1089 * notifying the BSS. If non-zero, HAL will use the MAC frame
1090 * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
1091 * appropriate MAC frame based on frameType. */
1094 /* Following the framelength there is a MAC frame buffer if
1095 * frameLength is non-zero. */
1096 struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr
;
1098 /* Entry to hold number of active BSS idx's */
1099 struct wcn36xx_hal_scan_entry scan_entry
;
1103 struct wcn36xx_hal_finish_scan_rsp_msg
{
1104 struct wcn36xx_hal_msg_header header
;
1106 /* success or failure */
1111 enum wcn36xx_hal_rate_index
{
1112 HW_RATE_INDEX_1MBPS
= 0x82,
1113 HW_RATE_INDEX_2MBPS
= 0x84,
1114 HW_RATE_INDEX_5_5MBPS
= 0x8B,
1115 HW_RATE_INDEX_6MBPS
= 0x0C,
1116 HW_RATE_INDEX_9MBPS
= 0x12,
1117 HW_RATE_INDEX_11MBPS
= 0x96,
1118 HW_RATE_INDEX_12MBPS
= 0x18,
1119 HW_RATE_INDEX_18MBPS
= 0x24,
1120 HW_RATE_INDEX_24MBPS
= 0x30,
1121 HW_RATE_INDEX_36MBPS
= 0x48,
1122 HW_RATE_INDEX_48MBPS
= 0x60,
1123 HW_RATE_INDEX_54MBPS
= 0x6C
1126 struct wcn36xx_hal_supported_rates
{
1128 * For Self STA Entry: this represents Self Mode.
1129 * For Peer Stations, this represents the mode of the peer.
1132 * --this mode is updated when PE adds the Self Entry.
1134 * -- OR when PE sends 'ADD_BSS' message and station context in BSS
1135 * is used to indicate the mode of the AP.
1139 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry
1140 * for that BSS is used to indicate the self mode of the AP.
1142 * -- OR when a station is associated, PE sends 'ADD_STA' message
1143 * with this mode updated.
1146 enum sta_rate_mode op_rate_mode
;
1148 /* 11b, 11a and aniLegacyRates are IE rates which gives rate in
1149 * unit of 500Kbps */
1150 u16 dsss_rates
[WCN36XX_HAL_NUM_DSSS_RATES
];
1151 u16 ofdm_rates
[WCN36XX_HAL_NUM_OFDM_RATES
];
1152 u16 legacy_rates
[WCN36XX_HAL_NUM_POLARIS_RATES
];
1155 /* Taurus only supports 26 Titan Rates(no ESF/concat Rates will be
1156 * supported) First 26 bits are reserved for those Titan rates and
1157 * the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are
1159 /* Titan and Taurus Rates */
1160 u32 enhanced_rate_bitmap
;
1163 * 0-76 bits used, remaining reserved
1164 * bits 0-15 and 32 should be set.
1166 u8 supported_mcs_set
[WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET
];
1169 * RX Highest Supported Data Rate defines the highest data
1170 * rate that the STA is able to receive, in unites of 1Mbps.
1171 * This value is derived from "Supported MCS Set field" inside
1172 * the HT capability element.
1174 u16 rx_highest_data_rate
;
1178 struct wcn36xx_hal_config_sta_params
{
1182 /* ASSOC ID, as assigned by UMAC */
1185 /* STA entry Type: 0 - Self, 1 - Other/Peer, 2 - BSSID, 3 - BCAST */
1188 /* Short Preamble Supported. */
1189 u8 short_preamble_supported
;
1191 /* MAC Address of STA */
1194 /* Listen interval of the STA */
1195 u16 listen_interval
;
1197 /* Support for 11e/WMM */
1200 /* 11n HT capable STA */
1203 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1204 u8 tx_channel_width_set
;
1206 /* RIFS mode 0 - NA, 1 - Allowed */
1209 /* L-SIG TXOP Protection mechanism
1210 0 - No Support, 1 - Supported
1211 SG - there is global field */
1212 u8 lsig_txop_protection
;
1214 /* Max Ampdu Size supported by STA. TPE programming.
1215 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k */
1218 /* Max Ampdu density. Used by RA. 3 : 0~7 : 2^(11nAMPDUdensity -4) */
1219 u8 max_ampdu_density
;
1221 /* Max AMSDU size 1 : 3839 bytes, 0 : 7935 bytes */
1224 /* Short GI support for 40Mhz packets */
1227 /* Short GI support for 20Mhz packets */
1230 /* TODO move this parameter to the end for 3680 */
1231 /* These rates are the intersection of peer and self capabilities. */
1232 struct wcn36xx_hal_supported_rates supported_rates
;
1234 /* Robust Management Frame (RMF) enabled/disabled */
1237 /* The unicast encryption type in the association */
1240 /* HAL should update the existing STA entry, if this flag is set. UMAC
1241 will set this flag in case of RE-ASSOC, where we want to reuse the
1242 old STA ID. 0 = Add, 1 = Update */
1245 /* U-APSD Flags: 1b per AC. Encoded as follows:
1246 b7 b6 b5 b4 b3 b2 b1 b0 =
1247 X X X X BE BK VI VO */
1253 /* 11n Green Field preamble support
1254 0 - Not supported, 1 - Supported */
1255 u8 green_field_capable
;
1257 /* MIMO Power Save mode */
1258 enum wcn36xx_hal_ht_mimo_state mimo_ps
;
1260 /* Delayed BA Support */
1261 u8 delayed_ba_support
;
1263 /* Max AMPDU duration in 32us */
1264 u8 max_ampdu_duration
;
1266 /* HT STA should set it to 1 if it is enabled in BSS. HT STA should
1267 * set it to 0 if AP does not support it. This indication is sent
1268 * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
1270 u8 dsss_cck_mode_40mhz
;
1272 /* Valid STA Idx when action=Update. Set to 0xFF when invalid!
1273 * Retained for backward compalibity with existing HAL code */
1276 /* BSSID of BSS to which station is associated. Set to 0xFF when
1277 * invalid. Retained for backward compalibity with existing HAL
1283 /* TODO add this parameter for 3680. */
1284 /* Reserved to align next field on a dword boundary */
1288 struct wcn36xx_hal_config_sta_req_msg
{
1289 struct wcn36xx_hal_msg_header header
;
1290 struct wcn36xx_hal_config_sta_params sta_params
;
1293 struct wcn36xx_hal_config_sta_params_v1
{
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 /* Robust Management Frame (RMF) enabled/disabled */
1348 /* The unicast encryption type in the association */
1351 /* HAL should update the existing STA entry, if this flag is set. UMAC
1352 will set this flag in case of RE-ASSOC, where we want to reuse the
1353 old STA ID. 0 = Add, 1 = Update */
1356 /* U-APSD Flags: 1b per AC. Encoded as follows:
1357 b7 b6 b5 b4 b3 b2 b1 b0 =
1358 X X X X BE BK VI VO */
1364 /* 11n Green Field preamble support
1365 0 - Not supported, 1 - Supported */
1366 u8 green_field_capable
;
1368 /* MIMO Power Save mode */
1369 enum wcn36xx_hal_ht_mimo_state mimo_ps
;
1371 /* Delayed BA Support */
1372 u8 delayed_ba_support
;
1374 /* Max AMPDU duration in 32us */
1375 u8 max_ampdu_duration
;
1377 /* HT STA should set it to 1 if it is enabled in BSS. HT STA should
1378 * set it to 0 if AP does not support it. This indication is sent
1379 * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
1381 u8 dsss_cck_mode_40mhz
;
1383 /* Valid STA Idx when action=Update. Set to 0xFF when invalid!
1384 * Retained for backward compalibity with existing HAL code */
1387 /* BSSID of BSS to which station is associated. Set to 0xFF when
1388 * invalid. Retained for backward compalibity with existing HAL
1394 /* Reserved to align next field on a dword boundary */
1397 /* These rates are the intersection of peer and self capabilities. */
1398 struct wcn36xx_hal_supported_rates supported_rates
;
1401 struct wcn36xx_hal_config_sta_req_msg_v1
{
1402 struct wcn36xx_hal_msg_header header
;
1403 struct wcn36xx_hal_config_sta_params_v1 sta_params
;
1406 struct config_sta_rsp_params
{
1407 /* success or failure */
1410 /* Station index; valid only when 'status' field value SUCCESS */
1413 /* BSSID Index of BSS to which the station is associated */
1416 /* DPU Index for PTK */
1419 /* DPU Index for GTK */
1422 /* DPU Index for IGTK */
1423 u8 bcast_mgmt_dpu_idx
;
1425 /* PTK DPU signature */
1428 /* GTK DPU isignature */
1431 /* IGTK DPU signature */
1438 struct wcn36xx_hal_config_sta_rsp_msg
{
1439 struct wcn36xx_hal_msg_header header
;
1441 struct config_sta_rsp_params params
;
1444 /* Delete STA Request message */
1445 struct wcn36xx_hal_delete_sta_req_msg
{
1446 struct wcn36xx_hal_msg_header header
;
1448 /* Index of STA to delete */
1453 /* Delete STA Response message */
1454 struct wcn36xx_hal_delete_sta_rsp_msg
{
1455 struct wcn36xx_hal_msg_header header
;
1457 /* success or failure */
1460 /* Index of STA deleted */
1464 /* 12 Bytes long because this structure can be used to represent rate and
1465 * extended rate set IEs. The parser assume this to be at least 12 */
1466 struct wcn36xx_hal_rate_set
{
1468 u8 rate
[WCN36XX_HAL_MAC_RATESET_EID_MAX
];
1471 /* access category record */
1472 struct wcn36xx_hal_aci_aifsn
{
1473 #ifndef ANI_LITTLE_BIT_ENDIAN
1486 /* contention window size */
1487 struct wcn36xx_hal_mac_cw
{
1488 #ifndef ANI_LITTLE_BIT_ENDIAN
1497 struct wcn36xx_hal_edca_param_record
{
1498 struct wcn36xx_hal_aci_aifsn aci
;
1499 struct wcn36xx_hal_mac_cw cw
;
1503 struct wcn36xx_hal_mac_ssid
{
1508 /* Concurrency role. These are generic IDs that identify the various roles
1509 * in the software system. */
1510 enum wcn36xx_hal_con_mode
{
1511 WCN36XX_HAL_STA_MODE
= 0,
1513 /* to support softAp mode . This is misleading.
1514 It means AP MODE only. */
1515 WCN36XX_HAL_STA_SAP_MODE
= 1,
1517 WCN36XX_HAL_P2P_CLIENT_MODE
,
1518 WCN36XX_HAL_P2P_GO_MODE
,
1519 WCN36XX_HAL_MONITOR_MODE
,
1522 /* This is a bit pattern to be set for each mode
1525 * bit 2 - p2p client mode
1526 * bit 3 - p2p go mode */
1527 enum wcn36xx_hal_concurrency_mode
{
1531 /* to support sta, softAp mode . This means STA+AP mode */
1536 HAL_MAX_CONCURRENCY_PERSONA
= 4
1539 struct wcn36xx_hal_config_bss_params
{
1543 /* Self Mac Address */
1544 u8 self_mac_addr
[ETH_ALEN
];
1547 enum wcn36xx_hal_bss_type bss_type
;
1549 /* Operational Mode: AP =0, STA = 1 */
1553 enum wcn36xx_hal_nw_type nw_type
;
1555 /* Used to classify PURE_11G/11G_MIXED to program MTU */
1556 u8 short_slot_time_supported
;
1558 /* Co-exist with 11a STA */
1561 /* Co-exist with 11b STA */
1564 /* Co-exist with 11g STA */
1567 /* Coexistence with 11n STA */
1570 /* Non GF coexist flag */
1571 u8 lln_non_gf_coexist
;
1573 /* TXOP protection support */
1574 u8 lsig_tx_op_protection_full_support
;
1579 /* Beacon Interval in TU */
1580 u16 beacon_interval
;
1585 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1586 u8 tx_channel_width_set
;
1588 /* Operating channel */
1591 /* Extension channel for channel bonding */
1594 /* Reserved to align next field on a dword boundary */
1597 /* TODO move sta to the end for 3680 */
1598 /* Context of the station being added in HW
1599 * Add a STA entry for "itself" -
1601 * On AP - Add the AP itself in an "STA context"
1603 * On STA - Add the AP to which this STA is joining in an
1606 struct wcn36xx_hal_config_sta_params sta
;
1607 /* SSID of the BSS */
1608 struct wcn36xx_hal_mac_ssid ssid
;
1610 /* HAL should update the existing BSS entry, if this flag is set.
1611 * UMAC will set this flag in case of reassoc, where we want to
1612 * resue the the old BSSID and still return success 0 = Add, 1 =
1617 struct wcn36xx_hal_rate_set rateset
;
1619 /* Enable/Disable HT capabilities of the BSS */
1622 /* Enable/Disable OBSS protection */
1623 u8 obss_prot_enabled
;
1625 /* RMF enabled/disabled */
1628 /* HT Operating Mode operating mode of the 802.11n STA */
1629 enum wcn36xx_hal_ht_operating_mode ht_oper_mode
;
1631 /* Dual CTS Protection: 0 - Unused, 1 - Used */
1632 u8 dual_cts_protection
;
1634 /* Probe Response Max retries */
1635 u8 max_probe_resp_retry_limit
;
1637 /* To Enable Hidden ssid */
1640 /* To Enable Disable FW Proxy Probe Resp */
1641 u8 proxy_probe_resp
;
1643 /* Boolean to indicate if EDCA params are valid. UMAC might not
1644 * have valid EDCA params or might not desire to apply EDCA params
1645 * during config BSS. 0 implies Not Valid ; Non-Zero implies
1647 u8 edca_params_valid
;
1649 /* EDCA Parameters for Best Effort Access Category */
1650 struct wcn36xx_hal_edca_param_record acbe
;
1652 /* EDCA Parameters forBackground Access Category */
1653 struct wcn36xx_hal_edca_param_record acbk
;
1655 /* EDCA Parameters for Video Access Category */
1656 struct wcn36xx_hal_edca_param_record acvi
;
1658 /* EDCA Parameters for Voice Access Category */
1659 struct wcn36xx_hal_edca_param_record acvo
;
1661 /* Ext Bss Config Msg if set */
1662 u8 ext_set_sta_key_param_valid
;
1664 /* SetStaKeyParams for ext bss msg */
1665 struct wcn36xx_hal_set_sta_key_params ext_set_sta_key_param
;
1667 /* Persona for the BSS can be STA,AP,GO,CLIENT value same as enum
1668 * wcn36xx_hal_con_mode */
1669 u8 wcn36xx_hal_persona
;
1671 u8 spectrum_mgt_enable
;
1673 /* HAL fills in the tx power used for mgmt frames in txMgmtPower */
1676 /* maxTxPower has max power to be used after applying the power
1677 * constraint if any */
1681 struct wcn36xx_hal_config_bss_req_msg
{
1682 struct wcn36xx_hal_msg_header header
;
1683 struct wcn36xx_hal_config_bss_params bss_params
;
1686 struct wcn36xx_hal_config_bss_params_v1
{
1690 /* Self Mac Address */
1691 u8 self_mac_addr
[ETH_ALEN
];
1694 enum wcn36xx_hal_bss_type bss_type
;
1696 /* Operational Mode: AP =0, STA = 1 */
1700 enum wcn36xx_hal_nw_type nw_type
;
1702 /* Used to classify PURE_11G/11G_MIXED to program MTU */
1703 u8 short_slot_time_supported
;
1705 /* Co-exist with 11a STA */
1708 /* Co-exist with 11b STA */
1711 /* Co-exist with 11g STA */
1714 /* Coexistence with 11n STA */
1717 /* Non GF coexist flag */
1718 u8 lln_non_gf_coexist
;
1720 /* TXOP protection support */
1721 u8 lsig_tx_op_protection_full_support
;
1726 /* Beacon Interval in TU */
1727 u16 beacon_interval
;
1732 /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
1733 u8 tx_channel_width_set
;
1735 /* Operating channel */
1738 /* Extension channel for channel bonding */
1741 /* Reserved to align next field on a dword boundary */
1744 /* SSID of the BSS */
1745 struct wcn36xx_hal_mac_ssid ssid
;
1747 /* HAL should update the existing BSS entry, if this flag is set.
1748 * UMAC will set this flag in case of reassoc, where we want to
1749 * resue the the old BSSID and still return success 0 = Add, 1 =
1754 struct wcn36xx_hal_rate_set rateset
;
1756 /* Enable/Disable HT capabilities of the BSS */
1759 /* Enable/Disable OBSS protection */
1760 u8 obss_prot_enabled
;
1762 /* RMF enabled/disabled */
1765 /* HT Operating Mode operating mode of the 802.11n STA */
1766 enum wcn36xx_hal_ht_operating_mode ht_oper_mode
;
1768 /* Dual CTS Protection: 0 - Unused, 1 - Used */
1769 u8 dual_cts_protection
;
1771 /* Probe Response Max retries */
1772 u8 max_probe_resp_retry_limit
;
1774 /* To Enable Hidden ssid */
1777 /* To Enable Disable FW Proxy Probe Resp */
1778 u8 proxy_probe_resp
;
1780 /* Boolean to indicate if EDCA params are valid. UMAC might not
1781 * have valid EDCA params or might not desire to apply EDCA params
1782 * during config BSS. 0 implies Not Valid ; Non-Zero implies
1784 u8 edca_params_valid
;
1786 /* EDCA Parameters for Best Effort Access Category */
1787 struct wcn36xx_hal_edca_param_record acbe
;
1789 /* EDCA Parameters forBackground Access Category */
1790 struct wcn36xx_hal_edca_param_record acbk
;
1792 /* EDCA Parameters for Video Access Category */
1793 struct wcn36xx_hal_edca_param_record acvi
;
1795 /* EDCA Parameters for Voice Access Category */
1796 struct wcn36xx_hal_edca_param_record acvo
;
1798 /* Ext Bss Config Msg if set */
1799 u8 ext_set_sta_key_param_valid
;
1801 /* SetStaKeyParams for ext bss msg */
1802 struct wcn36xx_hal_set_sta_key_params ext_set_sta_key_param
;
1804 /* Persona for the BSS can be STA,AP,GO,CLIENT value same as enum
1805 * wcn36xx_hal_con_mode */
1806 u8 wcn36xx_hal_persona
;
1808 u8 spectrum_mgt_enable
;
1810 /* HAL fills in the tx power used for mgmt frames in txMgmtPower */
1813 /* maxTxPower has max power to be used after applying the power
1814 * constraint if any */
1817 /* Context of the station being added in HW
1818 * Add a STA entry for "itself" -
1820 * On AP - Add the AP itself in an "STA context"
1822 * On STA - Add the AP to which this STA is joining in an
1825 struct wcn36xx_hal_config_sta_params_v1 sta
;
1828 struct wcn36xx_hal_config_bss_req_msg_v1
{
1829 struct wcn36xx_hal_msg_header header
;
1830 struct wcn36xx_hal_config_bss_params_v1 bss_params
;
1833 struct wcn36xx_hal_config_bss_rsp_params
{
1834 /* Success or Failure */
1837 /* BSS index allocated by HAL */
1840 /* DPU descriptor index for PTK */
1843 /* PTK DPU signature */
1844 u8 ucast_dpu_signature
;
1846 /* DPU descriptor index for GTK */
1847 u8 bcast_dpu_desc_indx
;
1849 /* GTK DPU signature */
1850 u8 bcast_dpu_signature
;
1852 /* DPU descriptor for IGTK */
1853 u8 mgmt_dpu_desc_index
;
1855 /* IGTK DPU signature */
1856 u8 mgmt_dpu_signature
;
1858 /* Station Index for BSS entry */
1861 /* Self station index for this BSS */
1862 u8 bss_self_sta_index
;
1864 /* Bcast station for buffering bcast frames in AP role */
1865 u8 bss_bcast_sta_idx
;
1867 /* MAC Address of STA(PEER/SELF) in staContext of configBSSReq */
1870 /* HAL fills in the tx power used for mgmt frames in this field. */
1875 struct wcn36xx_hal_config_bss_rsp_msg
{
1876 struct wcn36xx_hal_msg_header header
;
1877 struct wcn36xx_hal_config_bss_rsp_params bss_rsp_params
;
1880 struct wcn36xx_hal_delete_bss_req_msg
{
1881 struct wcn36xx_hal_msg_header header
;
1883 /* BSS index to be deleted */
1888 struct wcn36xx_hal_delete_bss_rsp_msg
{
1889 struct wcn36xx_hal_msg_header header
;
1891 /* Success or Failure */
1894 /* BSS index that has been deleted */
1899 struct wcn36xx_hal_join_req_msg
{
1900 struct wcn36xx_hal_msg_header header
;
1902 /* Indicates the BSSID to which STA is going to associate */
1905 /* Indicates the channel to switch to. */
1909 u8 self_sta_mac_addr
[ETH_ALEN
];
1911 /* Local power constraint */
1912 u8 local_power_constraint
;
1914 /* Secondary channel offset */
1915 enum phy_chan_bond_state secondary_channel_offset
;
1918 enum wcn36xx_hal_link_state link_state
;
1924 struct wcn36xx_hal_join_rsp_msg
{
1925 struct wcn36xx_hal_msg_header header
;
1927 /* success or failure */
1930 /* HAL fills in the tx power used for mgmt frames in this field */
1934 struct post_assoc_req_msg
{
1935 struct wcn36xx_hal_msg_header header
;
1937 struct wcn36xx_hal_config_sta_params sta_params
;
1938 struct wcn36xx_hal_config_bss_params bss_params
;
1941 struct post_assoc_rsp_msg
{
1942 struct wcn36xx_hal_msg_header header
;
1943 struct config_sta_rsp_params sta_rsp_params
;
1944 struct wcn36xx_hal_config_bss_rsp_params bss_rsp_params
;
1947 /* This is used to create a set of WEP keys for a given BSS. */
1948 struct wcn36xx_hal_set_bss_key_req_msg
{
1949 struct wcn36xx_hal_msg_header header
;
1951 /* BSS Index of the BSS */
1954 /* Encryption Type used with peer */
1955 enum ani_ed_type enc_type
;
1957 /* Number of keys */
1960 /* Array of keys. */
1961 struct wcn36xx_hal_keys keys
[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS
];
1963 /* Control for Replay Count, 1= Single TID based replay count on Tx
1964 * 0 = Per TID based replay count on TX */
1968 /* tagged version of set bss key */
1969 struct wcn36xx_hal_set_bss_key_req_msg_tagged
{
1970 struct wcn36xx_hal_set_bss_key_req_msg Msg
;
1974 struct wcn36xx_hal_set_bss_key_rsp_msg
{
1975 struct wcn36xx_hal_msg_header header
;
1977 /* success or failure */
1982 * This is used configure the key information on a given station.
1983 * When the sec_type is WEP40 or WEP104, the def_wep_idx is used to locate
1984 * a preconfigured key from a BSS the station assoicated with; otherwise
1985 * a new key descriptor is created based on the key field.
1987 struct wcn36xx_hal_set_sta_key_req_msg
{
1988 struct wcn36xx_hal_msg_header header
;
1989 struct wcn36xx_hal_set_sta_key_params set_sta_key_params
;
1992 struct wcn36xx_hal_set_sta_key_rsp_msg
{
1993 struct wcn36xx_hal_msg_header header
;
1995 /* success or failure */
1999 struct wcn36xx_hal_remove_bss_key_req_msg
{
2000 struct wcn36xx_hal_msg_header header
;
2002 /* BSS Index of the BSS */
2005 /* Encryption Type used with peer */
2006 enum ani_ed_type enc_type
;
2011 /* STATIC/DYNAMIC. Used in Nullifying in Key Descriptors for
2012 * Static/Dynamic keys */
2013 enum ani_wep_type wep_type
;
2016 struct wcn36xx_hal_remove_bss_key_rsp_msg
{
2017 struct wcn36xx_hal_msg_header header
;
2019 /* success or failure */
2024 * This is used by PE to Remove the key information on a given station.
2026 struct wcn36xx_hal_remove_sta_key_req_msg
{
2027 struct wcn36xx_hal_msg_header header
;
2032 /* Encryption Type used with peer */
2033 enum ani_ed_type enc_type
;
2038 /* Whether to invalidate the Broadcast key or Unicast key. In case
2039 * of WEP, the same key is used for both broadcast and unicast. */
2044 struct wcn36xx_hal_remove_sta_key_rsp_msg
{
2045 struct wcn36xx_hal_msg_header header
;
2047 /*success or failure */
2052 #ifdef FEATURE_OEM_DATA_SUPPORT
2054 #ifndef OEM_DATA_REQ_SIZE
2055 #define OEM_DATA_REQ_SIZE 134
2058 #ifndef OEM_DATA_RSP_SIZE
2059 #define OEM_DATA_RSP_SIZE 1968
2062 struct start_oem_data_req_msg
{
2063 struct wcn36xx_hal_msg_header header
;
2066 tSirMacAddr self_mac_addr
;
2067 u8 oem_data_req
[OEM_DATA_REQ_SIZE
];
2071 struct start_oem_data_rsp_msg
{
2072 struct wcn36xx_hal_msg_header header
;
2074 u8 oem_data_rsp
[OEM_DATA_RSP_SIZE
];
2079 struct wcn36xx_hal_switch_channel_req_msg
{
2080 struct wcn36xx_hal_msg_header header
;
2082 /* Channel number */
2085 /* Local power constraint */
2086 u8 local_power_constraint
;
2088 /* Secondary channel offset */
2089 enum phy_chan_bond_state secondary_channel_offset
;
2091 /* HAL fills in the tx power used for mgmt frames in this field. */
2098 u8 self_sta_mac_addr
[ETH_ALEN
];
2100 /* VO WIFI comment: BSSID needed to identify session. As the
2101 * request has power constraints, this should be applied only to
2102 * that session Since MTU timing and EDCA are sessionized, this
2103 * struct needs to be sessionized and bssid needs to be out of the
2104 * VOWifi feature flag V IMP: Keep bssId field at the end of this
2105 * msg. It is used to mantain backward compatbility by way of
2106 * ignoring if using new host/old FW or old host/new FW since it is
2107 * at the end of this struct
2112 struct wcn36xx_hal_switch_channel_rsp_msg
{
2113 struct wcn36xx_hal_msg_header header
;
2118 /* Channel number - same as in request */
2121 /* HAL fills in the tx power used for mgmt frames in this field */
2124 /* BSSID needed to identify session - same as in request */
2129 struct update_edca_params_req_msg
{
2130 struct wcn36xx_hal_msg_header header
;
2136 struct wcn36xx_hal_edca_param_record acbe
;
2139 struct wcn36xx_hal_edca_param_record acbk
;
2142 struct wcn36xx_hal_edca_param_record acvi
;
2145 struct wcn36xx_hal_edca_param_record acvo
;
2148 struct update_edca_params_rsp_msg
{
2149 struct wcn36xx_hal_msg_header header
;
2151 /* success or failure */
2155 struct dpu_stats_params
{
2156 /* Index of STA to which the statistics */
2159 /* Encryption mode */
2172 u16 un_decryptable_cnt
;
2173 u32 decrypt_err_cnt
;
2177 struct wcn36xx_hal_stats_req_msg
{
2178 struct wcn36xx_hal_msg_header header
;
2180 /* Valid STA Idx for per STA stats request */
2183 /* Categories of stats requested as specified in eHalStatsMask */
2187 struct ani_summary_stats_info
{
2188 /* Total number of packets(per AC) that were successfully
2189 * transmitted with retries */
2192 /* The number of MSDU packets and MMPDU frames per AC that the
2193 * 802.11 station successfully transmitted after more than one
2194 * retransmission attempt */
2195 u32 multiple_retry_cnt
[4];
2197 /* Total number of packets(per AC) that were successfully
2198 * transmitted (with and without retries, including multi-cast,
2202 /* Total number of packets that were successfully received (after
2203 * appropriate filter rules including multi-cast, broadcast) */
2206 /* Total number of duplicate frames received successfully */
2209 /* Total number packets(per AC) failed to transmit */
2212 /* Total number of RTS/CTS sequence failures for transmission of a
2216 /* Total number packets failed transmit because of no ACK from the
2220 /* Total number of RTS/CTS sequence success for transmission of a
2224 /* The sum of the receive error count and dropped-receive-buffer
2225 * error count. HAL will provide this as a sum of (FCS error) +
2226 * (Fail get BD/PDU in HW) */
2230 * The receive error count. HAL will provide the RxP FCS error
2231 * global counter. */
2234 /* The sum of the transmit-directed byte count, transmit-multicast
2235 * byte count and transmit-broadcast byte count. HAL will sum TPE
2236 * UC/MC/BCAST global counters to provide this. */
2240 /* defines tx_rate_flags */
2243 HAL_TX_RATE_LEGACY
= 0x1,
2246 HAL_TX_RATE_HT20
= 0x2,
2249 HAL_TX_RATE_HT40
= 0x4,
2251 /* Rate with Short guard interval */
2252 HAL_TX_RATE_SGI
= 0x8,
2254 /* Rate with Long guard interval */
2255 HAL_TX_RATE_LGI
= 0x10
2258 struct ani_global_class_a_stats_info
{
2259 /* The number of MPDU frames received by the 802.11 station for
2260 * MSDU packets or MMPDU frames */
2263 /* The number of MPDU frames received by the 802.11 station for
2264 * MSDU packets or MMPDU frames when a promiscuous packet filter
2266 u32 promiscuous_rx_frag_cnt
;
2268 /* The receiver input sensitivity referenced to a FER of 8% at an
2269 * MPDU length of 1024 bytes at the antenna connector. Each element
2270 * of the array shall correspond to a supported rate and the order
2271 * shall be the same as the supporteRates parameter. */
2272 u32 rx_input_sensitivity
;
2274 /* The maximum transmit power in dBm upto one decimal. for eg: if
2275 * it is 10.5dBm, the value would be 105 */
2278 /* Number of times the receiver failed to synchronize with the
2279 * incoming signal after detecting the sync in the preamble of the
2280 * transmitted PLCP protocol data unit. */
2283 /* Legacy transmit rate, in units of 500 kbit/sec, for the most
2284 * recently transmitted frame */
2287 /* mcs index for HT20 and HT40 rates */
2290 /* to differentiate between HT20 and HT40 rates; short and long
2295 struct ani_global_security_stats
{
2296 /* The number of unencrypted received MPDU frames that the MAC
2297 * layer discarded when the IEEE 802.11 dot11ExcludeUnencrypted
2298 * management information base (MIB) object is enabled */
2299 u32 rx_wep_unencrypted_frm_cnt
;
2301 /* The number of received MSDU packets that that the 802.11 station
2302 * discarded because of MIC failures */
2303 u32 rx_mic_fail_cnt
;
2305 /* The number of encrypted MPDU frames that the 802.11 station
2306 * failed to decrypt because of a TKIP ICV error */
2309 /* The number of received MPDU frames that the 802.11 discarded
2310 * because of an invalid AES-CCMP format */
2311 u32 aes_ccmp_format_err
;
2313 /* The number of received MPDU frames that the 802.11 station
2314 * discarded because of the AES-CCMP replay protection procedure */
2315 u32 aes_ccmp_replay_cnt
;
2317 /* The number of received MPDU frames that the 802.11 station
2318 * discarded because of errors detected by the AES-CCMP decryption
2320 u32 aes_ccmp_decrpt_err
;
2322 /* The number of encrypted MPDU frames received for which a WEP
2323 * decryption key was not available on the 802.11 station */
2324 u32 wep_undecryptable_cnt
;
2326 /* The number of encrypted MPDU frames that the 802.11 station
2327 * failed to decrypt because of a WEP ICV error */
2330 /* The number of received encrypted packets that the 802.11 station
2331 * successfully decrypted */
2332 u32 rx_decrypt_succ_cnt
;
2334 /* The number of encrypted packets that the 802.11 station failed
2336 u32 rx_decrypt_fail_cnt
;
2339 struct ani_global_class_b_stats_info
{
2340 struct ani_global_security_stats uc_stats
;
2341 struct ani_global_security_stats mc_bc_stats
;
2344 struct ani_global_class_c_stats_info
{
2345 /* This counter shall be incremented for a received A-MSDU frame
2346 * with the stations MAC address in the address 1 field or an
2347 * A-MSDU frame with a group address in the address 1 field */
2350 /* This counter shall be incremented when the MAC receives an AMPDU
2354 /* This counter shall be incremented when a Frame is transmitted
2355 * only on the primary channel */
2358 /* This counter shall be incremented when a Frame is received only
2359 * on the primary channel */
2362 /* This counter shall be incremented by the number of MPDUs
2363 * received in the A-MPDU when an A-MPDU is received */
2364 u32 rx_mpdu_in_ampdu_cnt
;
2366 /* This counter shall be incremented when an MPDU delimiter has a
2367 * CRC error when this is the first CRC error in the received AMPDU
2368 * or when the previous delimiter has been decoded correctly */
2369 u32 ampdu_delimiter_crc_err
;
2372 struct ani_per_sta_stats_info
{
2373 /* The number of MPDU frames that the 802.11 station transmitted
2374 * and acknowledged through a received 802.11 ACK frame */
2377 /* This counter shall be incremented when an A-MPDU is transmitted */
2380 /* This counter shall increment by the number of MPDUs in the AMPDU
2381 * when an A-MPDU is transmitted */
2382 u32 tx_mpdu_in_ampdu_cnt
;
2385 struct wcn36xx_hal_stats_rsp_msg
{
2386 struct wcn36xx_hal_msg_header header
;
2388 /* Success or Failure */
2394 /* Categories of STATS being returned as per eHalStatsMask */
2397 /* message type is same as the request type */
2400 /* length of the entire request, includes the pStatsBuf length too */
2404 struct wcn36xx_hal_set_link_state_req_msg
{
2405 struct wcn36xx_hal_msg_header header
;
2408 enum wcn36xx_hal_link_state state
;
2409 u8 self_mac_addr
[ETH_ALEN
];
2413 struct set_link_state_rsp_msg
{
2414 struct wcn36xx_hal_msg_header header
;
2416 /* success or failure */
2421 struct wcn36xx_hal_ts_info_tfc
{
2422 #ifndef ANI_LITTLE_BIT_ENDIAN
2443 /* Flag to schedule the traffic type */
2444 struct wcn36xx_hal_ts_info_sch
{
2445 #ifndef ANI_LITTLE_BIT_ENDIAN
2454 /* Traffic and scheduling info */
2455 struct wcn36xx_hal_ts_info
{
2456 struct wcn36xx_hal_ts_info_tfc traffic
;
2457 struct wcn36xx_hal_ts_info_sch schedule
;
2460 /* Information elements */
2461 struct wcn36xx_hal_tspec_ie
{
2464 struct wcn36xx_hal_ts_info ts_info
;
2467 u32 min_svc_interval
;
2468 u32 max_svc_interval
;
2470 u32 suspend_interval
;
2482 struct add_ts_req_msg
{
2483 struct wcn36xx_hal_msg_header header
;
2488 /* TSPEC handler uniquely identifying a TSPEC for a STA in a BSS */
2491 /* To program TPE with required parameters */
2492 struct wcn36xx_hal_tspec_ie tspec
;
2494 /* U-APSD Flags: 1b per AC. Encoded as follows:
2495 b7 b6 b5 b4 b3 b2 b1 b0 =
2496 X X X X BE BK VI VO */
2499 /* These parameters are for all the access categories */
2501 /* Service Interval */
2502 u32 service_interval
[WCN36XX_HAL_MAX_AC
];
2504 /* Suspend Interval */
2505 u32 suspend_interval
[WCN36XX_HAL_MAX_AC
];
2507 /* Delay Interval */
2508 u32 delay_interval
[WCN36XX_HAL_MAX_AC
];
2511 struct add_rs_rsp_msg
{
2512 struct wcn36xx_hal_msg_header header
;
2514 /* success or failure */
2518 struct del_ts_req_msg
{
2519 struct wcn36xx_hal_msg_header header
;
2524 /* TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS */
2527 /* To lookup station id using the mac address */
2531 struct del_ts_rsp_msg
{
2532 struct wcn36xx_hal_msg_header header
;
2534 /* success or failure */
2538 /* End of TSpec Parameters */
2540 /* Start of BLOCK ACK related Parameters */
2542 struct wcn36xx_hal_add_ba_session_req_msg
{
2543 struct wcn36xx_hal_msg_header header
;
2548 /* Peer MAC Address */
2549 u8 mac_addr
[ETH_ALEN
];
2551 /* ADDBA Action Frame dialog token
2552 HAL will not interpret this object */
2555 /* TID for which the BA is being setup
2556 This identifies the TC or TS of interest */
2559 /* 0 - Delayed BA (Not supported)
2563 /* Indicates the number of buffers for this TID (baTID)
2564 NOTE - This is the requested buffer size. When this
2565 is processed by HAL and subsequently by HDD, it is
2566 possible that HDD may change this buffer size. Any
2567 change in the buffer size should be noted by PE and
2568 advertized appropriately in the ADDBA response */
2571 /* BA timeout in TU's 0 means no timeout will occur */
2574 /* b0..b3 - Fragment Number - Always set to 0
2575 b4..b15 - Starting Sequence Number of first MSDU
2576 for which this BA is setup */
2585 struct wcn36xx_hal_add_ba_session_rsp_msg
{
2586 struct wcn36xx_hal_msg_header header
;
2588 /* success or failure */
2594 /* TID for which the BA session has been setup */
2597 /* BA Buffer Size allocated for the current BA session */
2602 /* Reordering Window buffer */
2605 /* Station Index to id the sta */
2608 /* Starting Sequence Number */
2612 struct wcn36xx_hal_add_ba_req_msg
{
2613 struct wcn36xx_hal_msg_header header
;
2618 /* Reorder Window Size */
2620 /* Old FW 1.2.2.4 does not support this*/
2621 #ifdef FEATURE_ON_CHIP_REORDERING
2622 u8 reordering_done_on_chip
;
2626 struct wcn36xx_hal_add_ba_rsp_msg
{
2627 struct wcn36xx_hal_msg_header header
;
2629 /* success or failure */
2636 struct add_ba_info
{
2638 u16 starting_seq_num
:12;
2642 struct wcn36xx_hal_trigger_ba_rsp_candidate
{
2643 u8 sta_addr
[ETH_ALEN
];
2644 struct add_ba_info ba_info
[STACFG_MAX_TC
];
2647 struct wcn36xx_hal_trigger_ba_req_candidate
{
2652 struct wcn36xx_hal_trigger_ba_req_msg
{
2653 struct wcn36xx_hal_msg_header header
;
2658 /* baCandidateCnt is followed by trigger BA
2659 * Candidate List(tTriggerBaCandidate)
2665 struct wcn36xx_hal_trigger_ba_rsp_msg
{
2666 struct wcn36xx_hal_msg_header header
;
2668 /* TO SUPPORT BT-AMP */
2671 /* success or failure */
2674 /* baCandidateCnt is followed by trigger BA
2675 * Rsp Candidate List(tTriggerRspBaCandidate)
2680 struct wcn36xx_hal_del_ba_req_msg
{
2681 struct wcn36xx_hal_msg_header header
;
2686 /* TID for which the BA session is being deleted */
2695 struct wcn36xx_hal_del_ba_rsp_msg
{
2696 struct wcn36xx_hal_msg_header header
;
2698 /* success or failure */
2702 struct tsm_stats_req_msg
{
2703 struct wcn36xx_hal_msg_header header
;
2711 struct tsm_stats_rsp_msg
{
2712 struct wcn36xx_hal_msg_header header
;
2714 /*success or failure */
2717 /* Uplink Packet Queue delay */
2718 u16 uplink_pkt_queue_delay
;
2720 /* Uplink Packet Queue delay histogram */
2721 u16 uplink_pkt_queue_delay_hist
[4];
2723 /* Uplink Packet Transmit delay */
2724 u32 uplink_pkt_tx_delay
;
2726 /* Uplink Packet loss */
2727 u16 uplink_pkt_loss
;
2729 /* Uplink Packet count */
2730 u16 uplink_pkt_count
;
2739 struct set_key_done_msg
{
2740 struct wcn36xx_hal_msg_header header
;
2742 /*bssid of the keys */
2747 struct wcn36xx_hal_nv_img_download_req_msg
{
2748 /* Note: The length specified in wcn36xx_hal_nv_img_download_req_msg
2749 * messages should be
2750 * header.len = sizeof(wcn36xx_hal_nv_img_download_req_msg) +
2751 * nv_img_buffer_size */
2752 struct wcn36xx_hal_msg_header header
;
2754 /* Fragment sequence number of the NV Image. Note that NV Image
2755 * might not fit into one message due to size limitation of the SMD
2756 * channel FIFO. UMAC can hence choose to chop the NV blob into
2757 * multiple fragments starting with seqeunce number 0, 1, 2 etc.
2758 * The last fragment MUST be indicated by marking the
2759 * isLastFragment field to 1. Note that all the NV blobs would be
2760 * concatenated together by HAL without any padding bytes in
2764 /* Is this the last fragment? When set to 1 it indicates that no
2765 * more fragments will be sent by UMAC and HAL can concatenate all
2766 * the NV blobs rcvd & proceed with the parsing. HAL would generate
2767 * a WCN36XX_HAL_DOWNLOAD_NV_RSP to the WCN36XX_HAL_DOWNLOAD_NV_REQ
2768 * after it receives each fragment */
2771 /* NV Image size (number of bytes) */
2772 u32 nv_img_buffer_size
;
2774 /* Following the 'nv_img_buffer_size', there should be
2775 * nv_img_buffer_size bytes of NV Image i.e.
2776 * u8[nv_img_buffer_size] */
2779 struct wcn36xx_hal_nv_img_download_rsp_msg
{
2780 struct wcn36xx_hal_msg_header header
;
2782 /* Success or Failure. HAL would generate a
2783 * WCN36XX_HAL_DOWNLOAD_NV_RSP after each fragment */
2787 struct wcn36xx_hal_nv_store_ind
{
2788 /* Note: The length specified in tHalNvStoreInd messages should be
2789 * header.msgLen = sizeof(tHalNvStoreInd) + nvBlobSize */
2790 struct wcn36xx_hal_msg_header header
;
2795 /* Size of NV Blob */
2798 /* Following the 'nvBlobSize', there should be nvBlobSize bytes of
2799 * NV blob i.e. u8[nvBlobSize] */
2802 /* End of Block Ack Related Parameters */
2804 #define WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE 6
2806 /* Definition for MIC failure indication MAC reports this each time a MIC
2807 * failure occures on Rx TKIP packet
2809 struct mic_failure_ind_msg
{
2810 struct wcn36xx_hal_msg_header header
;
2814 /* address used to compute MIC */
2815 u8 src_addr
[ETH_ALEN
];
2817 /* transmitter address */
2818 u8 ta_addr
[ETH_ALEN
];
2820 u8 dst_addr
[ETH_ALEN
];
2824 /* first byte of IV */
2827 /* second byte of IV */
2830 /* sequence number */
2831 u8 tsc
[WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE
];
2833 /* receive address */
2834 u8 rx_addr
[ETH_ALEN
];
2837 struct update_vht_op_mode_req_msg
{
2838 struct wcn36xx_hal_msg_header header
;
2844 struct update_vht_op_mode_params_rsp_msg
{
2845 struct wcn36xx_hal_msg_header header
;
2850 struct update_beacon_req_msg
{
2851 struct wcn36xx_hal_msg_header header
;
2855 /* shortPreamble mode. HAL should update all the STA rates when it
2856 * receives this message */
2859 /* short Slot time. */
2862 /* Beacon Interval */
2863 u16 beacon_interval
;
2865 /* Protection related */
2870 u8 lln_non_gf_coexist
;
2871 u8 lsig_tx_op_protection_full_support
;
2874 u16 param_change_bitmap
;
2877 struct update_beacon_rsp_msg
{
2878 struct wcn36xx_hal_msg_header header
;
2882 struct wcn36xx_hal_send_beacon_req_msg
{
2883 struct wcn36xx_hal_msg_header header
;
2885 /* length of the template. */
2889 u8 beacon
[BEACON_TEMPLATE_SIZE
];
2893 /* TIM IE offset from the beginning of the template. */
2896 /* P2P IE offset from the begining of the template */
2900 struct send_beacon_rsp_msg
{
2901 struct wcn36xx_hal_msg_header header
;
2905 struct enable_radar_req_msg
{
2906 struct wcn36xx_hal_msg_header header
;
2912 struct enable_radar_rsp_msg
{
2913 struct wcn36xx_hal_msg_header header
;
2915 /* Link Parameters */
2918 /* success or failure */
2922 struct radar_detect_intr_ind_msg
{
2923 struct wcn36xx_hal_msg_header header
;
2925 u8 radar_det_channel
;
2928 struct radar_detect_ind_msg
{
2929 struct wcn36xx_hal_msg_header header
;
2931 /* channel number in which the RADAR detected */
2934 /* RADAR pulse width in usecond */
2935 u16 radar_pulse_width
;
2937 /* Number of RADAR pulses */
2938 u16 num_radar_pulse
;
2941 struct wcn36xx_hal_get_tpc_report_req_msg
{
2942 struct wcn36xx_hal_msg_header header
;
2949 struct wcn36xx_hal_get_tpc_report_rsp_msg
{
2950 struct wcn36xx_hal_msg_header header
;
2952 /* success or failure */
2956 struct wcn36xx_hal_send_probe_resp_req_msg
{
2957 struct wcn36xx_hal_msg_header header
;
2959 u8 probe_resp_template
[BEACON_TEMPLATE_SIZE
];
2960 u32 probe_resp_template_len
;
2961 u32 proxy_probe_req_valid_ie_bmap
[8];
2965 struct send_probe_resp_rsp_msg
{
2966 struct wcn36xx_hal_msg_header header
;
2968 /* success or failure */
2972 struct send_unknown_frame_rx_ind_msg
{
2973 struct wcn36xx_hal_msg_header header
;
2975 /* success or failure */
2979 struct wcn36xx_hal_delete_sta_context_ind_msg
{
2980 struct wcn36xx_hal_msg_header header
;
2985 /* TO SUPPORT BT-AMP */
2988 /* HAL copies bssid from the sta table. */
2991 /* To unify the keepalive / unknown A2 / tim-based disa */
2995 struct indicate_del_sta
{
2996 struct wcn36xx_hal_msg_header header
;
3004 struct bt_amp_event_msg
{
3005 struct wcn36xx_hal_msg_header header
;
3007 enum bt_amp_event_type btAmpEventType
;
3010 struct bt_amp_event_rsp
{
3011 struct wcn36xx_hal_msg_header header
;
3013 /* success or failure */
3017 struct tl_hal_flush_ac_req_msg
{
3018 struct wcn36xx_hal_msg_header header
;
3020 /* Station Index. originates from HAL */
3023 /* TID for which the transmit queue is being flushed */
3027 struct tl_hal_flush_ac_rsp_msg
{
3028 struct wcn36xx_hal_msg_header header
;
3030 /* Station Index. originates from HAL */
3033 /* TID for which the transmit queue is being flushed */
3036 /* success or failure */
3040 struct wcn36xx_hal_enter_imps_req_msg
{
3041 struct wcn36xx_hal_msg_header header
;
3044 struct wcn36xx_hal_exit_imps_req
{
3045 struct wcn36xx_hal_msg_header header
;
3048 struct wcn36xx_hal_enter_bmps_req_msg
{
3049 struct wcn36xx_hal_msg_header header
;
3053 /* TBTT value derived from the last beacon */
3054 #ifndef BUILD_QWPTTSTATIC
3059 /* DTIM period given to HAL during association may not be valid, if
3060 * association is based on ProbeRsp instead of beacon. */
3063 /* For CCX and 11R Roaming */
3064 u32 rssi_filter_period
;
3066 u32 num_beacon_per_rssi_average
;
3067 u8 rssi_filter_enable
;
3070 struct wcn36xx_hal_exit_bmps_req_msg
{
3071 struct wcn36xx_hal_msg_header header
;
3077 struct wcn36xx_hal_missed_beacon_ind_msg
{
3078 struct wcn36xx_hal_msg_header header
;
3083 /* Beacon Filtering data structures */
3085 /* The above structure would be followed by multiple of below mentioned
3088 struct beacon_filter_ie
{
3090 u8 check_ie_presence
;
3097 struct wcn36xx_hal_add_bcn_filter_req_msg
{
3098 struct wcn36xx_hal_msg_header header
;
3100 u16 capability_info
;
3101 u16 capability_mask
;
3102 u16 beacon_interval
;
3108 struct wcn36xx_hal_rem_bcn_filter_req
{
3109 struct wcn36xx_hal_msg_header header
;
3115 #define WCN36XX_HAL_IPV4_ARP_REPLY_OFFLOAD 0
3116 #define WCN36XX_HAL_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
3117 #define WCN36XX_HAL_IPV6_NS_OFFLOAD 2
3118 #define WCN36XX_HAL_IPV6_ADDR_LEN 16
3119 #define WCN36XX_HAL_OFFLOAD_DISABLE 0
3120 #define WCN36XX_HAL_OFFLOAD_ENABLE 1
3121 #define WCN36XX_HAL_OFFLOAD_BCAST_FILTER_ENABLE 0x2
3122 #define WCN36XX_HAL_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE \
3123 (HAL_OFFLOAD_ENABLE|HAL_OFFLOAD_BCAST_FILTER_ENABLE)
3125 struct wcn36xx_hal_ns_offload_params
{
3126 u8 src_ipv6_addr
[WCN36XX_HAL_IPV6_ADDR_LEN
];
3127 u8 self_ipv6_addr
[WCN36XX_HAL_IPV6_ADDR_LEN
];
3129 /* Only support 2 possible Network Advertisement IPv6 address */
3130 u8 target_ipv6_addr1
[WCN36XX_HAL_IPV6_ADDR_LEN
];
3131 u8 target_ipv6_addr2
[WCN36XX_HAL_IPV6_ADDR_LEN
];
3133 u8 self_addr
[ETH_ALEN
];
3134 u8 src_ipv6_addr_valid
:1;
3135 u8 target_ipv6_addr1_valid
:1;
3136 u8 target_ipv6_addr2_valid
:1;
3139 /* make it DWORD aligned */
3142 /* slot index for this offload */
3147 struct wcn36xx_hal_host_offload_req
{
3150 /* enable or disable */
3154 u8 host_ipv4_addr
[4];
3155 u8 host_ipv6_addr
[WCN36XX_HAL_IPV6_ADDR_LEN
];
3159 struct wcn36xx_hal_host_offload_req_msg
{
3160 struct wcn36xx_hal_msg_header header
;
3161 struct wcn36xx_hal_host_offload_req host_offload_params
;
3162 struct wcn36xx_hal_ns_offload_params ns_offload_params
;
3166 #define WCN36XX_HAL_KEEP_ALIVE_NULL_PKT 1
3167 #define WCN36XX_HAL_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
3169 /* Enable or disable keep alive */
3170 #define WCN36XX_HAL_KEEP_ALIVE_DISABLE 0
3171 #define WCN36XX_HAL_KEEP_ALIVE_ENABLE 1
3172 #define WCN36XX_KEEP_ALIVE_TIME_PERIOD 30 /* unit: s */
3174 /* Keep Alive request. */
3175 struct wcn36xx_hal_keep_alive_req_msg
{
3176 struct wcn36xx_hal_msg_header header
;
3180 u8 host_ipv4_addr
[WCN36XX_HAL_IPV4_ADDR_LEN
];
3181 u8 dest_ipv4_addr
[WCN36XX_HAL_IPV4_ADDR_LEN
];
3182 u8 dest_addr
[ETH_ALEN
];
3186 struct wcn36xx_hal_rssi_threshold_req_msg
{
3187 struct wcn36xx_hal_msg_header header
;
3192 u8 thres1_pos_notify
:1;
3193 u8 thres1_neg_notify
:1;
3194 u8 thres2_pos_notify
:1;
3195 u8 thres2_neg_notify
:1;
3196 u8 thres3_pos_notify
:1;
3197 u8 thres3_neg_notify
:1;
3201 struct wcn36xx_hal_enter_uapsd_req_msg
{
3202 struct wcn36xx_hal_msg_header header
;
3215 struct wcn36xx_hal_exit_uapsd_req_msg
{
3216 struct wcn36xx_hal_msg_header header
;
3220 #define WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE 128
3221 #define WCN36XX_HAL_WOWL_BCAST_MAX_NUM_PATTERNS 16
3223 struct wcn36xx_hal_wowl_add_bcast_ptrn_req_msg
{
3224 struct wcn36xx_hal_msg_header header
;
3229 /* Pattern byte offset from beginning of the 802.11 packet to start
3230 * of the wake-up pattern */
3233 /* Non-Zero Pattern size */
3237 u8 pattern
[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE
];
3239 /* Non-zero pattern mask size */
3243 u8 mask
[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE
];
3246 u8 extra
[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE
];
3248 /* Extra pattern mask */
3249 u8 mask_extra
[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE
];
3254 struct wcn36xx_hal_wow_del_bcast_ptrn_req_msg
{
3255 struct wcn36xx_hal_msg_header header
;
3257 /* Pattern ID of the wakeup pattern to be deleted */
3262 struct wcn36xx_hal_wowl_enter_req_msg
{
3263 struct wcn36xx_hal_msg_header header
;
3265 /* Enables/disables magic packet filtering */
3266 u8 magic_packet_enable
;
3269 u8 magic_pattern
[ETH_ALEN
];
3271 /* Enables/disables packet pattern filtering in firmware. Enabling
3272 * this flag enables broadcast pattern matching in Firmware. If
3273 * unicast pattern matching is also desired,
3274 * ucUcastPatternFilteringEnable flag must be set tot true as well
3276 u8 pattern_filtering_enable
;
3278 /* Enables/disables unicast packet pattern filtering. This flag
3279 * specifies whether we want to do pattern match on unicast packets
3280 * as well and not just broadcast packets. This flag has no effect
3281 * if the ucPatternFilteringEnable (main controlling flag) is set
3284 u8 ucast_pattern_filtering_enable
;
3286 /* This configuration is valid only when magicPktEnable=1. It
3287 * requests hardware to wake up when it receives the Channel Switch
3290 u8 wow_channel_switch_receive
;
3292 /* This configuration is valid only when magicPktEnable=1. It
3293 * requests hardware to wake up when it receives the
3294 * Deauthentication Frame.
3296 u8 wow_deauth_receive
;
3298 /* This configuration is valid only when magicPktEnable=1. It
3299 * requests hardware to wake up when it receives the Disassociation
3302 u8 wow_disassoc_receive
;
3304 /* This configuration is valid only when magicPktEnable=1. It
3305 * requests hardware to wake up when it has missed consecutive
3306 * beacons. This is a hardware register configuration (NOT a
3307 * firmware configuration).
3309 u8 wow_max_missed_beacons
;
3311 /* This configuration is valid only when magicPktEnable=1. This is
3312 * a timeout value in units of microsec. It requests hardware to
3313 * unconditionally wake up after it has stayed in WoWLAN mode for
3314 * some time. Set 0 to disable this feature.
3318 /* This configuration directs the WoW packet filtering to look for
3319 * EAP-ID requests embedded in EAPOL frames and use this as a wake
3322 u8 wow_eap_id_request_enable
;
3324 /* This configuration directs the WoW packet filtering to look for
3325 * EAPOL-4WAY requests and use this as a wake source.
3327 u8 wow_eapol_4way_enable
;
3329 /* This configuration allows a host wakeup on an network scan
3332 u8 wow_net_scan_offload_match
;
3334 /* This configuration allows a host wakeup on any GTK rekeying
3337 u8 wow_gtk_rekey_error
;
3339 /* This configuration allows a host wakeup on BSS connection loss.
3341 u8 wow_bss_connection_loss
;
3346 struct wcn36xx_hal_wowl_exit_req_msg
{
3347 struct wcn36xx_hal_msg_header header
;
3352 struct wcn36xx_hal_get_rssi_req_msg
{
3353 struct wcn36xx_hal_msg_header header
;
3356 struct wcn36xx_hal_get_roam_rssi_req_msg
{
3357 struct wcn36xx_hal_msg_header header
;
3359 /* Valid STA Idx for per STA stats request */
3363 struct wcn36xx_hal_set_uapsd_ac_params_req_msg
{
3364 struct wcn36xx_hal_msg_header header
;
3369 /* Access Category */
3375 /* Service Interval */
3376 u32 service_interval
;
3378 /* Suspend Interval */
3379 u32 suspend_interval
;
3381 /* Delay Interval */
3385 struct wcn36xx_hal_configure_rxp_filter_req_msg
{
3386 struct wcn36xx_hal_msg_header header
;
3388 u8 set_mcst_bcst_filter_setting
;
3389 u8 set_mcst_bcst_filter
;
3392 struct wcn36xx_hal_enter_imps_rsp_msg
{
3393 struct wcn36xx_hal_msg_header header
;
3395 /* success or failure */
3399 struct wcn36xx_hal_exit_imps_rsp_msg
{
3400 struct wcn36xx_hal_msg_header header
;
3402 /* success or failure */
3406 struct wcn36xx_hal_enter_bmps_rsp_msg
{
3407 struct wcn36xx_hal_msg_header header
;
3409 /* success or failure */
3415 struct wcn36xx_hal_exit_bmps_rsp_msg
{
3416 struct wcn36xx_hal_msg_header header
;
3418 /* success or failure */
3424 struct wcn36xx_hal_enter_uapsd_rsp_msg
{
3425 struct wcn36xx_hal_msg_header header
;
3427 /* success or failure */
3433 struct wcn36xx_hal_exit_uapsd_rsp_msg
{
3434 struct wcn36xx_hal_msg_header header
;
3436 /* success or failure */
3442 struct wcn36xx_hal_rssi_notification_ind_msg
{
3443 struct wcn36xx_hal_msg_header header
;
3445 u32 rssi_thres1_pos_cross
:1;
3446 u32 rssi_thres1_neg_cross
:1;
3447 u32 rssi_thres2_pos_cross
:1;
3448 u32 rssi_thres2_neg_cross
:1;
3449 u32 rssi_thres3_pos_cross
:1;
3450 u32 rssi_thres3_neg_cross
:1;
3456 struct wcn36xx_hal_get_rssio_rsp_msg
{
3457 struct wcn36xx_hal_msg_header header
;
3459 /* success or failure */
3465 struct wcn36xx_hal_get_roam_rssi_rsp_msg
{
3466 struct wcn36xx_hal_msg_header header
;
3468 /* success or failure */
3475 struct wcn36xx_hal_wowl_enter_rsp_msg
{
3476 struct wcn36xx_hal_msg_header header
;
3478 /* success or failure */
3483 struct wcn36xx_hal_wowl_exit_rsp_msg
{
3484 struct wcn36xx_hal_msg_header header
;
3486 /* success or failure */
3491 struct wcn36xx_hal_add_bcn_filter_rsp_msg
{
3492 struct wcn36xx_hal_msg_header header
;
3494 /* success or failure */
3498 struct wcn36xx_hal_rem_bcn_filter_rsp_msg
{
3499 struct wcn36xx_hal_msg_header header
;
3501 /* success or failure */
3505 struct wcn36xx_hal_add_wowl_bcast_ptrn_rsp_msg
{
3506 struct wcn36xx_hal_msg_header header
;
3508 /* success or failure */
3513 struct wcn36xx_hal_del_wowl_bcast_ptrn_rsp_msg
{
3514 struct wcn36xx_hal_msg_header header
;
3516 /* success or failure */
3521 struct wcn36xx_hal_host_offload_rsp_msg
{
3522 struct wcn36xx_hal_msg_header header
;
3524 /* success or failure */
3528 struct wcn36xx_hal_keep_alive_rsp_msg
{
3529 struct wcn36xx_hal_msg_header header
;
3531 /* success or failure */
3535 struct wcn36xx_hal_set_rssi_thresh_rsp_msg
{
3536 struct wcn36xx_hal_msg_header header
;
3538 /* success or failure */
3542 struct wcn36xx_hal_set_uapsd_ac_params_rsp_msg
{
3543 struct wcn36xx_hal_msg_header header
;
3545 /* success or failure */
3549 struct wcn36xx_hal_configure_rxp_filter_rsp_msg
{
3550 struct wcn36xx_hal_msg_header header
;
3552 /* success or failure */
3556 struct set_max_tx_pwr_req
{
3557 struct wcn36xx_hal_msg_header header
;
3559 /* BSSID is needed to identify which session issued this request.
3560 * As the request has power constraints, this should be applied
3561 * only to that session */
3564 u8 self_addr
[ETH_ALEN
];
3566 /* In request, power == MaxTx power to be used. */
3570 struct set_max_tx_pwr_rsp_msg
{
3571 struct wcn36xx_hal_msg_header header
;
3573 /* power == tx power used for management frames */
3576 /* success or failure */
3580 struct set_tx_pwr_req_msg
{
3581 struct wcn36xx_hal_msg_header header
;
3583 /* TX Power in milli watts */
3589 struct set_tx_pwr_rsp_msg
{
3590 struct wcn36xx_hal_msg_header header
;
3592 /* success or failure */
3596 struct get_tx_pwr_req_msg
{
3597 struct wcn36xx_hal_msg_header header
;
3602 struct get_tx_pwr_rsp_msg
{
3603 struct wcn36xx_hal_msg_header header
;
3605 /* success or failure */
3608 /* TX Power in milli watts */
3612 struct set_p2p_gonoa_req_msg
{
3613 struct wcn36xx_hal_msg_header header
;
3620 u32 single_noa_duration
;
3624 struct set_p2p_gonoa_rsp_msg
{
3625 struct wcn36xx_hal_msg_header header
;
3627 /* success or failure */
3631 struct wcn36xx_hal_add_sta_self_req
{
3632 struct wcn36xx_hal_msg_header header
;
3634 u8 self_addr
[ETH_ALEN
];
3638 struct wcn36xx_hal_add_sta_self_rsp_msg
{
3639 struct wcn36xx_hal_msg_header header
;
3641 /* success or failure */
3644 /* Self STA Index */
3647 /* DPU Index (IGTK, PTK, GTK all same) */
3654 struct wcn36xx_hal_del_sta_self_req_msg
{
3655 struct wcn36xx_hal_msg_header header
;
3657 u8 self_addr
[ETH_ALEN
];
3660 struct wcn36xx_hal_del_sta_self_rsp_msg
{
3661 struct wcn36xx_hal_msg_header header
;
3663 /*success or failure */
3666 u8 self_addr
[ETH_ALEN
];
3669 struct aggr_add_ts_req
{
3670 struct wcn36xx_hal_msg_header header
;
3675 /* TSPEC handler uniquely identifying a TSPEC for a STA in a BSS.
3676 * This will carry the bitmap with the bit positions representing
3680 /* Tspec info per AC To program TPE with required parameters */
3681 struct wcn36xx_hal_tspec_ie tspec
[WCN36XX_HAL_MAX_AC
];
3683 /* U-APSD Flags: 1b per AC. Encoded as follows:
3684 b7 b6 b5 b4 b3 b2 b1 b0 =
3685 X X X X BE BK VI VO */
3688 /* These parameters are for all the access categories */
3690 /* Service Interval */
3691 u32 service_interval
[WCN36XX_HAL_MAX_AC
];
3693 /* Suspend Interval */
3694 u32 suspend_interval
[WCN36XX_HAL_MAX_AC
];
3696 /* Delay Interval */
3697 u32 delay_interval
[WCN36XX_HAL_MAX_AC
];
3700 struct aggr_add_ts_rsp_msg
{
3701 struct wcn36xx_hal_msg_header header
;
3703 /* success or failure */
3706 /* FIXME PRIMA for future use for 11R */
3710 struct wcn36xx_hal_configure_apps_cpu_wakeup_state_req_msg
{
3711 struct wcn36xx_hal_msg_header header
;
3713 u8 is_apps_cpu_awake
;
3716 struct wcn36xx_hal_configure_apps_cpu_wakeup_state_rsp_msg
{
3717 struct wcn36xx_hal_msg_header header
;
3719 /* success or failure */
3723 struct wcn36xx_hal_dump_cmd_req_msg
{
3724 struct wcn36xx_hal_msg_header header
;
3733 struct wcn36xx_hal_dump_cmd_rsp_msg
{
3734 struct wcn36xx_hal_msg_header header
;
3736 /* success or failure */
3739 /* Length of the responce message */
3742 /* FIXME: Currently considering the the responce will be less than
3744 u8 rsp_buffer
[DUMPCMD_RSP_BUFFER
];
3747 #define WLAN_COEX_IND_DATA_SIZE (4)
3748 #define WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
3749 #define WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
3751 struct coex_ind_msg
{
3752 struct wcn36xx_hal_msg_header header
;
3754 /* Coex Indication Type */
3757 /* Coex Indication Data */
3758 u32 data
[WLAN_COEX_IND_DATA_SIZE
];
3761 struct wcn36xx_hal_tx_compl_ind_msg
{
3762 struct wcn36xx_hal_msg_header header
;
3764 /* Tx Complete Indication Success or Failure */
3768 struct wcn36xx_hal_wlan_host_suspend_ind_msg
{
3769 struct wcn36xx_hal_msg_header header
;
3771 u32 configured_mcst_bcst_filter_setting
;
3772 u32 active_session_count
;
3775 struct wcn36xx_hal_wlan_exclude_unencrpted_ind_msg
{
3776 struct wcn36xx_hal_msg_header header
;
3778 u8 dot11_exclude_unencrypted
;
3782 struct noa_attr_ind_msg
{
3783 struct wcn36xx_hal_msg_header header
;
3789 u16 noa1_interval_count
;
3795 u16 noa2_interval_count
;
3799 u32 noa2_start_time
;
3804 struct noa_start_ind_msg
{
3805 struct wcn36xx_hal_msg_header header
;
3811 struct wcn36xx_hal_wlan_host_resume_req_msg
{
3812 struct wcn36xx_hal_msg_header header
;
3814 u8 configured_mcst_bcst_filter_setting
;
3817 struct wcn36xx_hal_host_resume_rsp_msg
{
3818 struct wcn36xx_hal_msg_header header
;
3820 /* success or failure */
3824 struct wcn36xx_hal_del_ba_ind_msg
{
3825 struct wcn36xx_hal_msg_header header
;
3829 /* Peer MAC Address, whose BA session has timed out */
3830 u8 peer_addr
[ETH_ALEN
];
3832 /* TID for which a BA session timeout is being triggered */
3843 /* TO SUPPORT BT-AMP */
3849 /* Max number of channels that a network can be found on */
3850 #define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS 26
3852 /* Max number of channels that a network can be found on */
3853 #define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX 60
3855 /* Maximum numbers of networks supported by PNO */
3856 #define WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS 16
3858 /* The number of scan time intervals that can be programmed into PNO */
3859 #define WCN36XX_HAL_PNO_MAX_SCAN_TIMERS 10
3861 /* Maximum size of the probe template */
3862 #define WCN36XX_HAL_PNO_MAX_PROBE_SIZE 450
3864 /* Type of PNO enabling:
3866 * Immediate - scanning will start immediately and PNO procedure will be
3867 * repeated based on timer
3869 * Suspend - scanning will start at suspend
3871 * Resume - scanning will start on system resume
3875 PNO_MODE_ON_SUSPEND
,
3877 PNO_MODE_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
3880 /* Authentication type */
3883 AUTH_TYPE_OPEN_SYSTEM
= 1,
3885 /* Upper layer authentication types */
3887 AUTH_TYPE_WPA_PSK
= 3,
3890 AUTH_TYPE_RSN_PSK
= 5,
3891 AUTH_TYPE_FT_RSN
= 6,
3892 AUTH_TYPE_FT_RSN_PSK
= 7,
3893 AUTH_TYPE_WAPI_WAI_CERTIFICATE
= 8,
3894 AUTH_TYPE_WAPI_WAI_PSK
= 9,
3896 AUTH_TYPE_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
3899 /* Encryption type */
3908 ED_TYPE_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
3911 /* SSID broadcast type */
3912 enum ssid_bcast_type
{
3917 BCAST_TYPE_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
3920 /* The network description for which PNO will have to look for */
3921 struct network_type
{
3922 /* SSID of the BSS */
3923 struct wcn36xx_hal_mac_ssid ssid
;
3925 /* Authentication type for the network */
3926 enum auth_type authentication
;
3928 /* Encryption type for the network */
3929 enum ed_type encryption
;
3931 /* Indicate the channel on which the Network can be found 0 - if
3934 u8 channels
[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS
];
3936 /* Indicates the RSSI threshold for the network to be considered */
3941 /* How much it should wait */
3944 /* How many times it should repeat that wait value 0 - keep using
3945 * this timer until PNO is disabled */
3948 /* e.g: 2 3 4 0 - it will wait 2s between consecutive scans for 3
3949 * times - after that it will wait 4s between consecutive scans
3953 /* The network parameters to be sent to the PNO algorithm */
3954 struct scan_timers_type
{
3955 /* set to 0 if you wish for PNO to use its default telescopic timer */
3958 /* A set value represents the amount of time that PNO will wait
3959 * between two consecutive scan procedures If the desired is for a
3960 * uniform timer that fires always at the exact same interval - one
3961 * single value is to be set If there is a desire for a more
3962 * complex - telescopic like timer multiple values can be set -
3963 * once PNO reaches the end of the array it will continue scanning
3964 * at intervals presented by the last value */
3965 struct scan_timer values
[WCN36XX_HAL_PNO_MAX_SCAN_TIMERS
];
3968 /* Preferred network list request */
3969 struct set_pref_netw_list_req
{
3970 struct wcn36xx_hal_msg_header header
;
3975 /* Immediate, On Suspend, On Resume */
3978 /* Number of networks sent for PNO */
3981 /* The networks that PNO needs to look for */
3982 struct network_type networks
[WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS
];
3984 /* The scan timers required for PNO */
3985 struct scan_timers_type scan_timers
;
3987 /* Probe template for 2.4GHz band */
3988 u16 band_24g_probe_size
;
3989 u8 band_24g_probe_template
[WCN36XX_HAL_PNO_MAX_PROBE_SIZE
];
3991 /* Probe template for 5GHz band */
3992 u16 band_5g_probe_size
;
3993 u8 band_5g_probe_template
[WCN36XX_HAL_PNO_MAX_PROBE_SIZE
];
3996 /* The network description for which PNO will have to look for */
3997 struct network_type_new
{
3998 /* SSID of the BSS */
3999 struct wcn36xx_hal_mac_ssid ssid
;
4001 /* Authentication type for the network */
4002 enum auth_type authentication
;
4004 /* Encryption type for the network */
4005 enum ed_type encryption
;
4007 /* SSID broadcast type, normal, hidden or unknown */
4008 enum ssid_bcast_type bcast_network_type
;
4010 /* Indicate the channel on which the Network can be found 0 - if
4013 u8 channels
[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS
];
4015 /* Indicates the RSSI threshold for the network to be considered */
4019 /* Preferred network list request new */
4020 struct set_pref_netw_list_req_new
{
4021 struct wcn36xx_hal_msg_header header
;
4026 /* Immediate, On Suspend, On Resume */
4029 /* Number of networks sent for PNO */
4032 /* The networks that PNO needs to look for */
4033 struct network_type_new networks
[WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS
];
4035 /* The scan timers required for PNO */
4036 struct scan_timers_type scan_timers
;
4038 /* Probe template for 2.4GHz band */
4039 u16 band_24g_probe_size
;
4040 u8 band_24g_probe_template
[WCN36XX_HAL_PNO_MAX_PROBE_SIZE
];
4042 /* Probe template for 5GHz band */
4043 u16 band_5g_probe_size
;
4044 u8 band_5g_probe_template
[WCN36XX_HAL_PNO_MAX_PROBE_SIZE
];
4047 /* Preferred network list response */
4048 struct set_pref_netw_list_resp
{
4049 struct wcn36xx_hal_msg_header header
;
4051 /* status of the request - just to indicate that PNO has
4052 * acknowledged the request and will start scanning */
4056 /* Preferred network found indication */
4057 struct pref_netw_found_ind
{
4059 struct wcn36xx_hal_msg_header header
;
4061 /* Network that was found with the highest RSSI */
4062 struct wcn36xx_hal_mac_ssid ssid
;
4064 /* Indicates the RSSI */
4068 /* RSSI Filter request */
4069 struct set_rssi_filter_req
{
4070 struct wcn36xx_hal_msg_header header
;
4072 /* RSSI Threshold */
4076 /* Set RSSI filter resp */
4077 struct set_rssi_filter_resp
{
4078 struct wcn36xx_hal_msg_header header
;
4080 /* status of the request */
4084 /* Update scan params - sent from host to PNO to be used during PNO
4086 struct wcn36xx_hal_update_scan_params_req
{
4088 struct wcn36xx_hal_msg_header header
;
4090 /* Host setting for 11d */
4093 /* Lets PNO know that host has determined the regulatory domain */
4096 /* Channels on which PNO is allowed to scan */
4098 u8 channels
[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS
];
4100 /* Minimum channel time */
4101 u16 active_min_ch_time
;
4103 /* Maximum channel time */
4104 u16 active_max_ch_time
;
4106 /* Minimum channel time */
4107 u16 passive_min_ch_time
;
4109 /* Maximum channel time */
4110 u16 passive_max_ch_time
;
4113 enum phy_chan_bond_state state
;
4116 /* Update scan params - sent from host to PNO to be used during PNO
4118 struct update_scan_params_req_ex
{
4120 struct wcn36xx_hal_msg_header header
;
4122 /* Host setting for 11d */
4125 /* Lets PNO know that host has determined the regulatory domain */
4128 /* Channels on which PNO is allowed to scan */
4130 u8 channels
[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX
];
4132 /* Minimum channel time */
4133 u16 active_min_ch_time
;
4135 /* Maximum channel time */
4136 u16 active_max_ch_time
;
4138 /* Minimum channel time */
4139 u16 passive_min_ch_time
;
4141 /* Maximum channel time */
4142 u16 passive_max_ch_time
;
4145 enum phy_chan_bond_state state
;
4148 /* Update scan params - sent from host to PNO to be used during PNO
4150 struct wcn36xx_hal_update_scan_params_resp
{
4152 struct wcn36xx_hal_msg_header header
;
4154 /* status of the request */
4158 struct wcn36xx_hal_set_tx_per_tracking_req_msg
{
4159 struct wcn36xx_hal_msg_header header
;
4161 /* 0: disable, 1:enable */
4162 u8 tx_per_tracking_enable
;
4164 /* Check period, unit is sec. */
4165 u8 tx_per_tracking_period
;
4167 /* (Fail TX packet)/(Total TX packet) ratio, the unit is 10%. */
4168 u8 tx_per_tracking_ratio
;
4170 /* A watermark of check number, once the tx packet exceed this
4171 * number, we do the check, default is 5 */
4172 u32 tx_per_tracking_watermark
;
4175 struct wcn36xx_hal_set_tx_per_tracking_rsp_msg
{
4176 struct wcn36xx_hal_msg_header header
;
4178 /* success or failure */
4183 struct tx_per_hit_ind_msg
{
4184 struct wcn36xx_hal_msg_header header
;
4187 /* Packet Filtering Definitions Begin */
4188 #define WCN36XX_HAL_PROTOCOL_DATA_LEN 8
4189 #define WCN36XX_HAL_MAX_NUM_MULTICAST_ADDRESS 240
4190 #define WCN36XX_HAL_MAX_NUM_FILTERS 20
4191 #define WCN36XX_HAL_MAX_CMP_PER_FILTER 10
4193 enum wcn36xx_hal_receive_packet_filter_type
{
4194 HAL_RCV_FILTER_TYPE_INVALID
,
4195 HAL_RCV_FILTER_TYPE_FILTER_PKT
,
4196 HAL_RCV_FILTER_TYPE_BUFFER_PKT
,
4197 HAL_RCV_FILTER_TYPE_MAX_ENUM_SIZE
4200 enum wcn36xx_hal_rcv_pkt_flt_protocol_type
{
4201 HAL_FILTER_PROTO_TYPE_INVALID
,
4202 HAL_FILTER_PROTO_TYPE_MAC
,
4203 HAL_FILTER_PROTO_TYPE_ARP
,
4204 HAL_FILTER_PROTO_TYPE_IPV4
,
4205 HAL_FILTER_PROTO_TYPE_IPV6
,
4206 HAL_FILTER_PROTO_TYPE_UDP
,
4207 HAL_FILTER_PROTO_TYPE_MAX
4210 enum wcn36xx_hal_rcv_pkt_flt_cmp_flag_type
{
4211 HAL_FILTER_CMP_TYPE_INVALID
,
4212 HAL_FILTER_CMP_TYPE_EQUAL
,
4213 HAL_FILTER_CMP_TYPE_MASK_EQUAL
,
4214 HAL_FILTER_CMP_TYPE_NOT_EQUAL
,
4215 HAL_FILTER_CMP_TYPE_MAX
4218 struct wcn36xx_hal_rcv_pkt_filter_params
{
4222 /* Length of the data to compare */
4225 /* from start of the respective frame header */
4228 /* Reserved field */
4231 /* Data to compare */
4232 u8 compare_data
[WCN36XX_HAL_PROTOCOL_DATA_LEN
];
4234 /* Mask to be applied on the received packet data before compare */
4235 u8 data_mask
[WCN36XX_HAL_PROTOCOL_DATA_LEN
];
4238 struct wcn36xx_hal_sessionized_rcv_pkt_filter_cfg_type
{
4244 struct wcn36xx_hal_rcv_pkt_filter_params params
[1];
4247 struct wcn36xx_hal_set_rcv_pkt_filter_req_msg
{
4248 struct wcn36xx_hal_msg_header header
;
4254 struct wcn36xx_hal_rcv_pkt_filter_params params
[1];
4257 struct wcn36xx_hal_rcv_flt_mc_addr_list_type
{
4258 /* from start of the respective frame header */
4262 u8 mc_addr
[ETH_ALEN
][WCN36XX_HAL_MAX_NUM_MULTICAST_ADDRESS
];
4266 struct wcn36xx_hal_set_pkt_filter_rsp_msg
{
4267 struct wcn36xx_hal_msg_header header
;
4269 /* success or failure */
4275 struct wcn36xx_hal_rcv_flt_pkt_match_cnt_req_msg
{
4276 struct wcn36xx_hal_msg_header header
;
4281 struct wcn36xx_hal_rcv_flt_pkt_match_cnt
{
4286 struct wcn36xx_hal_rcv_flt_pkt_match_cnt_rsp_msg
{
4287 struct wcn36xx_hal_msg_header header
;
4289 /* Success or Failure */
4293 struct wcn36xx_hal_rcv_flt_pkt_match_cnt
4294 matches
[WCN36XX_HAL_MAX_NUM_FILTERS
];
4298 struct wcn36xx_hal_rcv_flt_pkt_clear_param
{
4299 /* only valid for response message */
4305 struct wcn36xx_hal_rcv_flt_pkt_clear_req_msg
{
4306 struct wcn36xx_hal_msg_header header
;
4307 struct wcn36xx_hal_rcv_flt_pkt_clear_param param
;
4310 struct wcn36xx_hal_rcv_flt_pkt_clear_rsp_msg
{
4311 struct wcn36xx_hal_msg_header header
;
4312 struct wcn36xx_hal_rcv_flt_pkt_clear_param param
;
4315 struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_req_msg
{
4316 struct wcn36xx_hal_msg_header header
;
4317 struct wcn36xx_hal_rcv_flt_mc_addr_list_type mc_addr_list
;
4320 struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_rsp_msg
{
4321 struct wcn36xx_hal_msg_header header
;
4326 /* Packet Filtering Definitions End */
4328 struct wcn36xx_hal_set_power_params_req_msg
{
4329 struct wcn36xx_hal_msg_header header
;
4337 /* Listen Interval */
4338 u32 listen_interval
;
4340 /* Broadcast Multicast Filter */
4341 u32 bcast_mcast_filter
;
4343 /* Beacon Early Termination */
4346 /* Beacon Early Termination Interval */
4350 struct wcn36xx_hal_set_power_params_resp
{
4352 struct wcn36xx_hal_msg_header header
;
4354 /* status of the request */
4358 /* Capability bitmap exchange definitions and macros starts */
4360 enum place_holder_in_cap_bitmap
{
4364 SLM_SESSIONIZATION
= 3,
4368 P2P_GO_NOA_DECOUPLE_INIT_SCAN
= 7,
4369 WLANACTIVE_OFFLOAD
= 8,
4373 BCN_MISS_OFFLOAD
= 12,
4375 STA_ADVANCED_PWRSAVE
= 14,
4384 MAX_FEATURE_SUPPORTED
= 128,
4387 #define WCN36XX_HAL_CAPS_SIZE 4
4389 struct wcn36xx_hal_feat_caps_msg
{
4391 struct wcn36xx_hal_msg_header header
;
4393 u32 feat_caps
[WCN36XX_HAL_CAPS_SIZE
];
4396 /* status codes to help debug rekey failures */
4397 enum gtk_rekey_status
{
4398 WCN36XX_HAL_GTK_REKEY_STATUS_SUCCESS
= 0,
4400 /* rekey detected, but not handled */
4401 WCN36XX_HAL_GTK_REKEY_STATUS_NOT_HANDLED
= 1,
4403 /* MIC check error on M1 */
4404 WCN36XX_HAL_GTK_REKEY_STATUS_MIC_ERROR
= 2,
4406 /* decryption error on M1 */
4407 WCN36XX_HAL_GTK_REKEY_STATUS_DECRYPT_ERROR
= 3,
4409 /* M1 replay detected */
4410 WCN36XX_HAL_GTK_REKEY_STATUS_REPLAY_ERROR
= 4,
4412 /* missing GTK key descriptor in M1 */
4413 WCN36XX_HAL_GTK_REKEY_STATUS_MISSING_KDE
= 5,
4415 /* missing iGTK key descriptor in M1 */
4416 WCN36XX_HAL_GTK_REKEY_STATUS_MISSING_IGTK_KDE
= 6,
4418 /* key installation error */
4419 WCN36XX_HAL_GTK_REKEY_STATUS_INSTALL_ERROR
= 7,
4421 /* iGTK key installation error */
4422 WCN36XX_HAL_GTK_REKEY_STATUS_IGTK_INSTALL_ERROR
= 8,
4424 /* GTK rekey M2 response TX error */
4425 WCN36XX_HAL_GTK_REKEY_STATUS_RESP_TX_ERROR
= 9,
4427 /* non-specific general error */
4428 WCN36XX_HAL_GTK_REKEY_STATUS_GEN_ERROR
= 255
4431 /* wake reason types */
4432 enum wake_reason_type
{
4433 WCN36XX_HAL_WAKE_REASON_NONE
= 0,
4435 /* magic packet match */
4436 WCN36XX_HAL_WAKE_REASON_MAGIC_PACKET
= 1,
4438 /* host defined pattern match */
4439 WCN36XX_HAL_WAKE_REASON_PATTERN_MATCH
= 2,
4441 /* EAP-ID frame detected */
4442 WCN36XX_HAL_WAKE_REASON_EAPID_PACKET
= 3,
4444 /* start of EAPOL 4-way handshake detected */
4445 WCN36XX_HAL_WAKE_REASON_EAPOL4WAY_PACKET
= 4,
4447 /* network scan offload match */
4448 WCN36XX_HAL_WAKE_REASON_NETSCAN_OFFL_MATCH
= 5,
4450 /* GTK rekey status wakeup (see status) */
4451 WCN36XX_HAL_WAKE_REASON_GTK_REKEY_STATUS
= 6,
4453 /* BSS connection lost */
4454 WCN36XX_HAL_WAKE_REASON_BSS_CONN_LOST
= 7,
4458 Wake Packet which is saved at tWakeReasonParams.DataStart
4459 This data is sent for any wake reasons that involve a packet-based wakeup :
4461 WCN36XX_HAL_WAKE_REASON_TYPE_MAGIC_PACKET
4462 WCN36XX_HAL_WAKE_REASON_TYPE_PATTERN_MATCH
4463 WCN36XX_HAL_WAKE_REASON_TYPE_EAPID_PACKET
4464 WCN36XX_HAL_WAKE_REASON_TYPE_EAPOL4WAY_PACKET
4465 WCN36XX_HAL_WAKE_REASON_TYPE_GTK_REKEY_STATUS
4467 The information is provided to the host for auditing and debug purposes
4471 /* Wake reason indication */
4472 struct wcn36xx_hal_wake_reason_ind
{
4473 struct wcn36xx_hal_msg_header header
;
4475 /* see tWakeReasonType */
4478 /* argument specific to the reason type */
4481 /* length of optional data stored in this message, in case HAL
4482 * truncates the data (i.e. data packets) this length will be less
4483 * than the actual length */
4484 u32 stored_data_len
;
4486 /* actual length of data */
4487 u32 actual_data_len
;
4489 /* variable length start of data (length == storedDataLen) see
4490 * specific wake type */
4497 #define WCN36XX_HAL_GTK_KEK_BYTES 16
4498 #define WCN36XX_HAL_GTK_KCK_BYTES 16
4500 #define WCN36XX_HAL_GTK_OFFLOAD_FLAGS_DISABLE (1 << 0)
4502 #define GTK_SET_BSS_KEY_TAG 0x1234AA55
4504 struct wcn36xx_hal_gtk_offload_req_msg
{
4505 struct wcn36xx_hal_msg_header header
;
4507 /* optional flags */
4510 /* Key confirmation key */
4511 u8 kck
[WCN36XX_HAL_GTK_KCK_BYTES
];
4513 /* key encryption key */
4514 u8 kek
[WCN36XX_HAL_GTK_KEK_BYTES
];
4516 /* replay counter */
4517 u64 key_replay_counter
;
4522 struct wcn36xx_hal_gtk_offload_rsp_msg
{
4523 struct wcn36xx_hal_msg_header header
;
4525 /* success or failure */
4531 struct wcn36xx_hal_gtk_offload_get_info_req_msg
{
4532 struct wcn36xx_hal_msg_header header
;
4536 struct wcn36xx_hal_gtk_offload_get_info_rsp_msg
{
4537 struct wcn36xx_hal_msg_header header
;
4539 /* success or failure */
4542 /* last rekey status when the rekey was offloaded */
4543 u32 last_rekey_status
;
4545 /* current replay counter value */
4546 u64 key_replay_counter
;
4548 /* total rekey attempts */
4549 u32 total_rekey_count
;
4551 /* successful GTK rekeys */
4552 u32 gtk_rekey_count
;
4554 /* successful iGTK rekeys */
4555 u32 igtk_rekey_count
;
4561 /* Indicates the device mode which indicates about the DHCP activity */
4567 struct dhcp_ind_status
{
4568 struct wcn36xx_hal_msg_header header
;
4570 /* success or failure */
4575 * Thermal Mitigation mode of operation.
4577 * WCN36XX_HAL_THERMAL_MITIGATION_MODE_0 - Based on AMPDU disabling aggregation
4579 * WCN36XX_HAL_THERMAL_MITIGATION_MODE_1 - Based on AMPDU disabling aggregation
4580 * and reducing transmit power
4582 * WCN36XX_HAL_THERMAL_MITIGATION_MODE_2 - Not supported */
4583 enum wcn36xx_hal_thermal_mitigation_mode_type
{
4584 HAL_THERMAL_MITIGATION_MODE_INVALID
= -1,
4585 HAL_THERMAL_MITIGATION_MODE_0
,
4586 HAL_THERMAL_MITIGATION_MODE_1
,
4587 HAL_THERMAL_MITIGATION_MODE_2
,
4588 HAL_THERMAL_MITIGATION_MODE_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
,
4593 * Thermal Mitigation level.
4594 * Note the levels are incremental i.e WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_2 =
4595 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_0 +
4596 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_1
4598 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_0 - lowest level of thermal mitigation.
4599 * This level indicates normal mode of operation
4601 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_1 - 1st level of thermal mitigation
4603 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_2 - 2nd level of thermal mitigation
4605 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_3 - 3rd level of thermal mitigation
4607 * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_4 - 4th level of thermal mitigation
4609 enum wcn36xx_hal_thermal_mitigation_level_type
{
4610 HAL_THERMAL_MITIGATION_LEVEL_INVALID
= -1,
4611 HAL_THERMAL_MITIGATION_LEVEL_0
,
4612 HAL_THERMAL_MITIGATION_LEVEL_1
,
4613 HAL_THERMAL_MITIGATION_LEVEL_2
,
4614 HAL_THERMAL_MITIGATION_LEVEL_3
,
4615 HAL_THERMAL_MITIGATION_LEVEL_4
,
4616 HAL_THERMAL_MITIGATION_LEVEL_MAX
= WCN36XX_HAL_MAX_ENUM_SIZE
,
4620 /* WCN36XX_HAL_SET_THERMAL_MITIGATION_REQ */
4621 struct set_thermal_mitigation_req_msg
{
4622 struct wcn36xx_hal_msg_header header
;
4624 /* Thermal Mitigation Operation Mode */
4625 enum wcn36xx_hal_thermal_mitigation_mode_type mode
;
4627 /* Thermal Mitigation Level */
4628 enum wcn36xx_hal_thermal_mitigation_level_type level
;
4631 struct set_thermal_mitigation_resp
{
4633 struct wcn36xx_hal_msg_header header
;
4635 /* status of the request */
4639 /* Per STA Class B Statistics. Class B statistics are STA TX/RX stats
4640 * provided to FW from Host via periodic messages */
4641 struct stats_class_b_ind
{
4642 struct wcn36xx_hal_msg_header header
;
4644 /* Duration over which this stats was collected */
4650 u32 tx_bytes_pushed
;
4651 u32 tx_packets_pushed
;
4655 u32 rx_packets_rcvd
;
4659 #endif /* _HAL_H_ */