xref: /wlan-driver/qcacld-3.0/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /*
21  * DOC: contains mlme structure definitions
22  */
23 
24 #ifndef _WLAN_MLME_STRUCT_H_
25 #define _WLAN_MLME_STRUCT_H_
26 
27 #include <wlan_cmn.h>
28 #include <reg_services_public_struct.h>
29 #include <wmi_unified_param.h>
30 #include <sir_api.h>
31 #include "wlan_cm_roam_public_struct.h"
32 #include "wlan_mlme_twt_public_struct.h"
33 #include "cfg_mlme_generic.h"
34 #include "host_diag_core_event.h"
35 
36 #define OWE_TRANSITION_OUI_TYPE "\x50\x6f\x9a\x1c"
37 #define OWE_TRANSITION_OUI_SIZE 4
38 
39 /*
40  * EID_VENDOR| IE_LEN | OUI |OUI_TYPE| OWE transition BSSID|SSID_LEN|   SSID   |
41  *   (1)     |  (1)   | (3) |   (1)  |         (6)         |   (1)  |(SSID_LEN)|
42  */
43 #define OWE_SSID_LEN_OFFSET 12
44 #define OWE_SSID_OFFSET     13
45 
46 #define CFG_PMKID_MODES_OKC                        (0x1)
47 #define CFG_PMKID_MODES_PMKSA_CACHING              (0x2)
48 
49 #define CFG_VHT_BASIC_MCS_SET_STADEF    0xFFFE
50 
51 #define CFG_VHT_RX_MCS_MAP_STAMIN    0
52 #define CFG_VHT_RX_MCS_MAP_STAMAX    0xFFFF
53 #define CFG_VHT_RX_MCS_MAP_STADEF    0xFFFE
54 
55 #define CFG_VHT_TX_MCS_MAP_STAMIN    0
56 #define CFG_VHT_TX_MCS_MAP_STAMAX    0xFFFF
57 #define CFG_VHT_TX_MCS_MAP_STADEF    0xFFFE
58 
59 #define STA_DOT11_MODE_INDX       0
60 #define P2P_DEV_DOT11_MODE_INDX   4
61 #define NAN_DISC_DOT11_MODE_INDX  8
62 #define OCB_DOT11_MODE_INDX       12
63 #define TDLS_DOT11_MODE_INDX      16
64 #define NDI_DOT11_MODE_INDX       20
65 
66 /* Roam debugging related macro defines */
67 #define MAX_ROAM_DEBUG_BUF_SIZE    250
68 #define MAX_ROAM_EVENTS_SUPPORTED  5
69 #define ROAM_FAILURE_BUF_SIZE      60
70 #define TIME_STRING_LEN            24
71 
72 #define ROAM_CHANNEL_BUF_SIZE      300
73 #define LINE_STR "=============================================================="
74 /*
75  * MLME_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_FW_DEF + 1 is
76  * assumed to be the default fw supported BF antennas, if fw
77  * says it supports 8 antennas in rx ready event and if
78  * gTxBFCsnValue INI value is configured above 3, set
79  * the same to MLME_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED.
80  * Otherwise, fall back and set fw default value[3].
81  */
82 #define MLME_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_FW_DEF 3
83 
84 #define CFG_STR_DATA_LEN     17
85 #define CFG_EDCA_DATA_LEN    17
86 #define CFG_MAX_TX_POWER_2_4_LEN    128
87 #define CFG_MAX_TX_POWER_5_LEN      256
88 #define CFG_POWER_USAGE_MAX_LEN      4
89 #define CFG_MAX_STR_LEN       256
90 #define MAX_VENDOR_IES_LEN 1532
91 
92 #define CFG_MAX_PMK_LEN       64
93 
94 #define CFG_VALID_CHANNEL_LIST_STRING_LEN (CFG_VALID_CHANNEL_LIST_LEN * 4)
95 
96 #define DEFAULT_ROAM_TRIGGER_BITMAP 0xFFFFFFFF
97 
98 /*
99  * detect AP off based FW reported last RSSI > roaming Low rssi
100  * and not less than 20db of host cached RSSI
101  */
102 #define AP_OFF_RSSI_OFFSET 20
103 
104 /* Default beacon interval of 100 ms */
105 #define CUSTOM_CONC_GO_BI 100
106 
107 #define HECAP_TXRX_MCS_NSS_IDX_80    (0)
108 #define HECAP_TXRX_MCS_NSS_IDX_160   (1)
109 #define HECAP_TXRX_MCS_NSS_IDX_80_80 (2)
110 #define INVALID_MCS_NSS_INDEX         0xff
111 
112 enum diagwlan_status_eventsubtype {
113 	DIAG_WLAN_STATUS_CONNECT = 0,
114 	DIAG_WLAN_STATUS_DISCONNECT
115 };
116 
117 enum diagwlan_status_eventreason {
118 	DIAG_REASON_UNSPECIFIED = 0,
119 	DIAG_REASON_USER_REQUESTED,
120 	DIAG_REASON_MIC_ERROR,
121 	DIAG_REASON_DISASSOC,
122 	DIAG_REASON_DEAUTH,
123 	DIAG_REASON_HANDOFF,
124 	DIAG_REASON_ROAM_SYNCH_IND,
125 	DIAG_REASON_ROAM_SYNCH_CNF,
126 	DIAG_REASON_ROAM_HO_FAIL,
127 };
128 
129 /**
130  * struct mlme_cfg_str - generic structure for all mlme CFG string items
131  *
132  * @max_len: maximum data length allowed
133  * @len: valid no. of elements of the data
134  * @data: uint8_t array to store values
135  */
136 struct mlme_cfg_str {
137 	qdf_size_t max_len;
138 	qdf_size_t len;
139 	uint8_t data[CFG_STR_DATA_LEN];
140 };
141 
142 /**
143  * enum e_edca_type - to index edca params for edca profile
144  *			 EDCA profile   AC   unicast/bcast
145  * @edca_ani_acbe_local:    ani          BE      unicast
146  * @edca_ani_acbk_local:    ani          BK      unicast
147  * @edca_ani_acvi_local:    ani          VI      unicast
148  * @edca_ani_acvo_local:    ani          VO      unicast
149  * @edca_ani_acbe_bcast:    ani          BE      bcast
150  * @edca_ani_acbk_bcast:    ani          BK      bcast
151  * @edca_ani_acvi_bcast:    ani          VI      bcast
152  * @edca_ani_acvo_bcast:    ani          VO      bcast
153  * @edca_wme_acbe_local:    wme          BE      unicast
154  * @edca_wme_acbk_local:    wme          BK      unicast
155  * @edca_wme_acvi_local:    wme          VI      unicast
156  * @edca_wme_acvo_local:    wme          VO      unicast
157  * @edca_wme_acbe_bcast:    wme          BE      bcast
158  * @edca_wme_acbk_bcast:    wme          BK      bcast
159  * @edca_wme_acvi_bcast:    wme          VI      bcast
160  * @edca_wme_acvo_bcast:    wme          VO      bcast
161  * @edca_etsi_acbe_local:   etsi         BE      unicast
162  * @edca_etsi_acbk_local:   etsi         BK      unicast
163  * @edca_etsi_acvi_local:   etsi         VI      unicast
164  * @edca_etsi_acvo_local:   etsi         VO      unicast
165  * @edca_etsi_acbe_bcast:   etsi         BE      bcast
166  * @edca_etsi_acbk_bcast:   etsi         BK      bcast
167  * @edca_etsi_acvi_bcast:   etsi         VI      bcast
168  * @edca_etsi_acvo_bcast:   etsi         VO      bcast
169  */
170 enum e_edca_type {
171 	edca_ani_acbe_local,
172 	edca_ani_acbk_local,
173 	edca_ani_acvi_local,
174 	edca_ani_acvo_local,
175 	edca_ani_acbe_bcast,
176 	edca_ani_acbk_bcast,
177 	edca_ani_acvi_bcast,
178 	edca_ani_acvo_bcast,
179 	edca_wme_acbe_local,
180 	edca_wme_acbk_local,
181 	edca_wme_acvi_local,
182 	edca_wme_acvo_local,
183 	edca_wme_acbe_bcast,
184 	edca_wme_acbk_bcast,
185 	edca_wme_acvi_bcast,
186 	edca_wme_acvo_bcast,
187 	edca_etsi_acbe_local,
188 	edca_etsi_acbk_local,
189 	edca_etsi_acvi_local,
190 	edca_etsi_acvo_local,
191 	edca_etsi_acbe_bcast,
192 	edca_etsi_acbk_bcast,
193 	edca_etsi_acvi_bcast,
194 	edca_etsi_acvo_bcast
195 };
196 
197 #define CFG_EDCA_PROFILE_ACM_IDX      0
198 #define CFG_EDCA_PROFILE_AIFSN_IDX    1
199 #define CFG_EDCA_PROFILE_CWMINA_IDX   2
200 #define CFG_EDCA_PROFILE_CWMAXA_IDX   4
201 #define CFG_EDCA_PROFILE_TXOPA_IDX    6
202 #define CFG_EDCA_PROFILE_CWMINB_IDX   7
203 #define CFG_EDCA_PROFILE_CWMAXB_IDX   9
204 #define CFG_EDCA_PROFILE_TXOPB_IDX    11
205 #define CFG_EDCA_PROFILE_CWMING_IDX   12
206 #define CFG_EDCA_PROFILE_CWMAXG_IDX   14
207 #define CFG_EDCA_PROFILE_TXOPG_IDX    16
208 
209 /**
210  * struct mlme_edca_ac_vo - cwmin, cwmax and  aifs value for edca_ac_vo
211  *
212  * @vo_cwmin: cwmin value for voice
213  * @vo_cwmax: cwmax value for voice
214  * @vo_aifs: aifs value for voice
215  */
216 struct mlme_edca_ac_vo {
217 	uint32_t vo_cwmin;
218 	uint32_t vo_cwmax;
219 	uint32_t vo_aifs;
220 };
221 
222 /**
223  * enum mlme_dot11_mode - Dot11 mode of the vdev
224  * @MLME_DOT11_MODE_ALL: vdev supports all dot11 modes
225  * @MLME_DOT11_MODE_ABG: vdev supports just 11A, 11B and 11G modes
226  * @MLME_DOT11_MODE_11A: vdev just supports 11A mode
227  * @MLME_DOT11_MODE_11B: vdev supports 11B mode, and modes above it
228  * @MLME_DOT11_MODE_11G: vdev supports 11G mode, and modes above it
229  * @MLME_DOT11_MODE_11N: vdev supports 11N mode, and modes above it
230  * @MLME_DOT11_MODE_11G_ONLY: vdev just supports 11G mode
231  * @MLME_DOT11_MODE_11N_ONLY: vdev just supports 11N mode
232  * @MLME_DOT11_MODE_11AC: vdev supports 11AC mode, and modes above it
233  * @MLME_DOT11_MODE_11AC_ONLY: vdev just supports 11AC mode
234  * @MLME_DOT11_MODE_11AX: vdev supports 11AX mode, and modes above it
235  * @MLME_DOT11_MODE_11AX_ONLY: vdev just supports 11AX mode
236  * @MLME_DOT11_MODE_11BE: vdev supports 11BE mode, and modes above it
237  * @MLME_DOT11_MODE_11BE_ONLY: vdev just supports 11BE mode
238  */
239 enum mlme_dot11_mode {
240 	MLME_DOT11_MODE_ALL,
241 	/* Initial dot11 modes should come first */
242 	MLME_DOT11_MODE_ABG,
243 	MLME_DOT11_MODE_11A,
244 	MLME_DOT11_MODE_11B,
245 	MLME_DOT11_MODE_11G,
246 	MLME_DOT11_MODE_11N,
247 	MLME_DOT11_MODE_11G_ONLY,
248 	MLME_DOT11_MODE_11N_ONLY,
249 	MLME_DOT11_MODE_11AC,
250 	MLME_DOT11_MODE_11AC_ONLY,
251 	MLME_DOT11_MODE_11AX,
252 	MLME_DOT11_MODE_11AX_ONLY,
253 	MLME_DOT11_MODE_11BE,
254 	MLME_DOT11_MODE_11BE_ONLY,
255 };
256 
257 /**
258  * struct wlan_mlme_dot11_mode - dot11 mode
259  *
260  * @dot11_mode: dot11 mode supported
261  * @vdev_type_dot11_mode: dot11 mode supported by different vdev types
262  */
263 struct wlan_mlme_dot11_mode {
264 	enum mlme_dot11_mode dot11_mode;
265 	uint32_t vdev_type_dot11_mode;
266 };
267 
268 /**
269  * struct mlme_edca_ac_vi - cwmin, cwmax and  aifs value for edca_ac_vi
270  *
271  * @vi_cwmin: cwmin value for video
272  * @vi_cwmax: cwmax value for video
273  * @vi_aifs: aifs value for video
274  */
275 struct mlme_edca_ac_vi {
276 	uint32_t vi_cwmin;
277 	uint32_t vi_cwmax;
278 	uint32_t vi_aifs;
279 };
280 
281 /**
282  * struct mlme_edca_ac_bk - cwmin, cwmax and  aifs value for edca_ac_bk
283  *
284  * @bk_cwmin: cwmin value for background
285  * @bk_cwmax: cwmax value for background
286  * @bk_aifs: aifs value for background
287  */
288 struct mlme_edca_ac_bk {
289 	uint32_t bk_cwmin;
290 	uint32_t bk_cwmax;
291 	uint32_t bk_aifs;
292 };
293 
294 /**
295  * struct mlme_edca_ac_be - cwmin, cwmax and  aifs value for edca_ac_be
296  *
297  * @be_cwmin: cwmin value for best effort
298  * @be_cwmax: cwmax value for best effort
299  * @be_aifs: aifs value for best effort
300  */
301 struct mlme_edca_ac_be {
302 	uint32_t be_cwmin;
303 	uint32_t be_cwmax;
304 	uint32_t be_aifs;
305 };
306 
307 /**
308  * enum mlme_ts_info_ack_policy - TS Info Ack Policy
309  * @TS_INFO_ACK_POLICY_NORMAL_ACK:normal ack
310  * @TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK: HT immediate block ack
311  */
312 enum mlme_ts_info_ack_policy {
313 	TS_INFO_ACK_POLICY_NORMAL_ACK = 0,
314 	TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK = 1,
315 };
316 
317 /**
318  * struct wlan_mlme_edca_params - EDCA pramaters related config items
319  *
320  * @ani_acbk_l:  EDCA parameters for ANI local access category background
321  * @ani_acbe_l:  EDCA parameters for ANI local access category best effort
322  * @ani_acvi_l:  EDCA parameters for ANI local access category video
323  * @ani_acvo_l:  EDCA parameters for ANI local access category voice
324  * @ani_acbk_b:  EDCA parameters for ANI bcast access category background
325  * @ani_acbe_b:  EDCA parameters for ANI bcast access category best effort
326  * @ani_acvi_b:  EDCA parameters for ANI bcast access category video
327  * @ani_acvo_b:  EDCA parameters for ANI bcast access category voice
328  * @wme_acbk_l:  EDCA parameters for WME local access category background
329  * @wme_acbe_l:  EDCA parameters for WME local access category best effort
330  * @wme_acvi_l:  EDCA parameters for WME local access category video
331  * @wme_acvo_l:  EDCA parameters for WME local access category voice
332  * @wme_acbk_b:  EDCA parameters for WME bcast access category background
333  * @wme_acbe_b:  EDCA parameters for WME bcast access category best effort
334  * @wme_acvi_b:  EDCA parameters for WME bcast access category video
335  * @wme_acvo_b:  EDCA parameters for WME bcast access category voice
336  * @etsi_acbk_l: EDCA parameters for ETSI local access category background
337  * @etsi_acbe_l: EDCA parameters for ETSI local access category best effort
338  * @etsi_acvi_l: EDCA parameters for ETSI local access category video
339  * @etsi_acvo_l: EDCA parameters for ETSI local access category voice
340  * @etsi_acbk_b: EDCA parameters for ETSI bcast access category background
341  * @etsi_acbe_b: EDCA parameters for ETSI bcast access category best effort
342  * @etsi_acvi_b: EDCA parameters for ETSI bcast access category video
343  * @etsi_acvo_b: EDCA parameters for ETSI bcast access category voice
344  * @enable_edca_params: Enable edca parameter
345  * @enable_wmm_txop: Enable WMM TxOp
346  * @edca_ac_vo: value for edca_ac_vo
347  * @edca_ac_vi: value for edca_ac_vi
348  * @edca_ac_bk: value for edca_ac_bk
349  * @edca_ac_be: value for edca_ac_be
350  * @edca_param_type: Edca param type
351  */
352 struct wlan_mlme_edca_params {
353 	struct mlme_cfg_str ani_acbk_l;
354 	struct mlme_cfg_str ani_acbe_l;
355 	struct mlme_cfg_str ani_acvi_l;
356 	struct mlme_cfg_str ani_acvo_l;
357 	struct mlme_cfg_str ani_acbk_b;
358 	struct mlme_cfg_str ani_acbe_b;
359 	struct mlme_cfg_str ani_acvi_b;
360 	struct mlme_cfg_str ani_acvo_b;
361 
362 	struct mlme_cfg_str wme_acbk_l;
363 	struct mlme_cfg_str wme_acbe_l;
364 	struct mlme_cfg_str wme_acvi_l;
365 	struct mlme_cfg_str wme_acvo_l;
366 	struct mlme_cfg_str wme_acbk_b;
367 	struct mlme_cfg_str wme_acbe_b;
368 	struct mlme_cfg_str wme_acvi_b;
369 	struct mlme_cfg_str wme_acvo_b;
370 
371 	struct mlme_cfg_str etsi_acbk_l;
372 	struct mlme_cfg_str etsi_acbe_l;
373 	struct mlme_cfg_str etsi_acvi_l;
374 	struct mlme_cfg_str etsi_acvo_l;
375 	struct mlme_cfg_str etsi_acbk_b;
376 	struct mlme_cfg_str etsi_acbe_b;
377 	struct mlme_cfg_str etsi_acvi_b;
378 	struct mlme_cfg_str etsi_acvo_b;
379 
380 	bool enable_edca_params;
381 	bool enable_wmm_txop;
382 	struct mlme_edca_ac_vo edca_ac_vo;
383 	struct mlme_edca_ac_vi edca_ac_vi;
384 	struct mlme_edca_ac_bk edca_ac_bk;
385 	struct mlme_edca_ac_be edca_ac_be;
386 
387 	enum host_edca_param_type edca_param_type;
388 };
389 
390 /* To configure EDCA/PIFS param for LL SAP */
391 #define CFG_EDCA_PARAM_ACM         0
392 #define CFG_EDCA_PARAM_AIFSN       2
393 #define CFG_EDCA_PARAM_ACI         3
394 #define CFG_EDCA_PARAM_CWMIN       2
395 #define CFG_EDCA_PARAM_CWMAX       3
396 #define CFG_EDCA_PARAM_TXOP        47
397 #define CFG_PIFS_PARAM_SAP_OFFSET  0
398 #define CFG_PIFS_PARAM_LEB_OFFSET  1
399 #define CFG_PIFS_PARAM_REB_OFFSET  2
400 
401 #define WLAN_CFG_MFR_NAME_LEN (63)
402 #define WLAN_CFG_MODEL_NUMBER_LEN (31)
403 #define WLAN_CFG_MODEL_NAME_LEN (31)
404 #define WLAN_CFG_MFR_PRODUCT_NAME_LEN (31)
405 #define WLAN_CFG_MFR_PRODUCT_VERSION_LEN (31)
406 
407 #define MLME_NUM_WLM_LATENCY_LEVEL 4
408 #define MLME_RMENABLEDCAP_MAX_LEN  5
409 
410 #ifndef ANI_LITTLE_BIT_ENDIAN
411 /**
412  * struct mlme_ht_capabilities_info - HT Capabilities Info
413  * @l_sig_tx_op_protection: L-SIG TXOP Protection Mechanism support
414  * @stbc_control_frame: STBC Control frame support
415  * @psmp: PSMP Support
416  * @dsss_cck_mode_40_mhz: To indicate use of DSSS/CCK in 40Mhz
417  * @maximal_amsdu_size: Maximum AMSDU Size - 0:3839 octes, 1:7935 octets
418  * @delayed_ba: Support of Delayed Block Ack
419  * @rx_stbc: Rx STBC Support - 0:Not Supported, 1: 1SS, 2: 1,2SS, 3: 1,2,3SS
420  * @tx_stbc: Tx STBC Support
421  * @short_gi_40_mhz: Short GI Support for HT40
422  * @short_gi_20_mhz: Short GI support for HT20
423  * @green_field: Support for HT Greenfield PPDUs
424  * @mimo_power_save: SM Power Save Mode - 0:Static, 1:Dynamic, 3:Disabled, 2:Res
425  * @supported_channel_width_set: Supported Chan Width - 0:20Mhz, 1:20Mhz & 40Mhz
426  * @adv_coding_cap: Rx LDPC support
427  */
428 struct mlme_ht_capabilities_info {
429 	uint16_t l_sig_tx_op_protection:1;
430 	uint16_t stbc_control_frame:1;
431 	uint16_t psmp:1;
432 	uint16_t dsss_cck_mode_40_mhz:1;
433 	uint16_t maximal_amsdu_size:1;
434 	uint16_t delayed_ba:1;
435 	uint16_t rx_stbc:2;
436 	uint16_t tx_stbc:1;
437 	uint16_t short_gi_40_mhz:1;
438 	uint16_t short_gi_20_mhz:1;
439 	uint16_t green_field:1;
440 	uint16_t mimo_power_save:2;
441 	uint16_t supported_channel_width_set:1;
442 	uint16_t adv_coding_cap:1;
443 } qdf_packed;
444 #else
445 struct mlme_ht_capabilities_info {
446 	uint16_t adv_coding_cap:1;
447 	uint16_t supported_channel_width_set:1;
448 	uint16_t mimo_power_save:2;
449 	uint16_t green_field:1;
450 	uint16_t short_gi_20_mhz:1;
451 	uint16_t short_gi_40_mhz:1;
452 	uint16_t tx_stbc:1;
453 	uint16_t rx_stbc:2;
454 	uint16_t delayed_ba:1;
455 	uint16_t maximal_amsdu_size:1;
456 	uint16_t dsss_cck_mode_40_mhz:1;
457 	uint16_t psmp:1;
458 	uint16_t stbc_control_frame:1;
459 	uint16_t l_sig_tx_op_protection:1;
460 } qdf_packed;
461 #endif
462 
463 /**
464  * struct wlan_ht_config - HT capabilities
465  * @ht_caps: ht caps in bitwise
466  * @caps: uint32 caps
467  */
468 struct wlan_ht_config {
469 	union {
470 		struct mlme_ht_capabilities_info ht_caps;
471 		uint32_t caps;
472 	};
473 };
474 
475 #ifndef ANI_LITTLE_BIT_ENDIAN
476 /**
477  * struct mlme_ht_param_info - HT AMPDU Parameters Info
478  * @reserved: reserved bits
479  * @mpdu_density: MPDU Density
480  * @max_rx_ampdu_factor: Max Rx AMPDU Factor
481  */
482 struct mlme_ht_param_info {
483 	uint8_t reserved:3;
484 	uint8_t mpdu_density:3;
485 	uint8_t max_rx_ampdu_factor:2;
486 } qdf_packed;
487 #else
488 struct mlme_ht_param_info {
489 	uint8_t max_rx_ampdu_factor:2;
490 	uint8_t mpdu_density:3;
491 	uint8_t reserved:3;
492 } qdf_packed;
493 #endif
494 
495 #ifndef ANI_LITTLE_BIT_ENDIAN
496 /**
497  * struct mlme_ht_ext_cap_info - Extended HT Capabilities Info
498  * @reserved_2: Reserved Bits
499  * @mcs_feedback: MCS Feedback Capability
500  * @reserved_1: Reserved Bits
501  * @transition_time: Time needed for transition between 20Mhz and 40 Mhz
502  * @pco: PCO (Phased Coexistence Operation) Support
503  */
504 struct mlme_ht_ext_cap_info {
505 	uint16_t reserved_2:6;
506 	uint16_t mcs_feedback:2;
507 	uint16_t reserved_1:5;
508 	uint16_t transition_time:2;
509 	uint16_t pco:1;
510 } qdf_packed;
511 #else
512 struct mlme_ht_ext_cap_info {
513 	uint16_t pco:1;
514 	uint16_t transition_time:2;
515 	uint16_t reserved1:5;
516 	uint16_t mcs_feedback:2;
517 	uint16_t reserved2:6;
518 } qdf_packed;
519 #endif
520 
521 #ifndef ANI_LITTLE_BIT_ENDIAN
522 /**
523  * struct mlme_ht_info_field_1 - Additional HT IE Field1
524  * @service_interval_granularity: Shortest Service Interval
525  * @controlled_access_only: Access Control for assoc requests
526  * @rifs_mode: Reduced Interframe Spacing mode
527  * @recommended_tx_width_set: Recommended Tx Channel Width
528  * @secondary_channel_offset: Secondary Channel Offset
529  */
530 struct mlme_ht_info_field_1 {
531 	uint8_t service_interval_granularity:3;
532 	uint8_t controlled_access_only:1;
533 	uint8_t rifs_mode:1;
534 	uint8_t recommended_tx_width_set:1;
535 	uint8_t secondary_channel_offset:2;
536 } qdf_packed;
537 #else
538 struct mlme_ht_info_field_1 {
539 	uint8_t secondary_channel_offset:2;
540 	uint8_t recommended_tx_width_set:1;
541 	uint8_t rifs_mode:1;
542 	uint8_t controlled_access_only:1;
543 	uint8_t service_interval_granularity:3;
544 } qdf_packed;
545 #endif
546 
547 /* struct mlme_ht_info_field_2 - Additional HT IE Field2
548  * @reserved: reserved bits
549  * @obss_non_ht_sta_present: Protection for non-HT STAs by Overlapping BSS
550  * @transmit_burst_limit: Transmit Burst Limit
551  * @non_gf_devices_present: Non Greenfield devices present
552  * @op_mode: Operation Mode
553  */
554 #ifndef ANI_LITTLE_BIT_ENDIAN
555 struct mlme_ht_info_field_2 {
556 	uint16_t reserved:11;
557 	uint16_t obss_non_ht_sta_present:1;
558 	uint16_t transmit_burst_limit:1;
559 	uint16_t non_gf_devices_present:1;
560 	uint16_t op_mode:2;
561 } qdf_packed;
562 #else
563 struct mlme_ht_info_field_2 {
564 	uint16_t op_mode:2;
565 	uint16_t non_gf_devices_present:1;
566 	uint16_t transmit_burst_limit:1;
567 	uint16_t obss_non_ht_sta_present:1;
568 	uint16_t reserved:11;
569 } qdf_packed;
570 #endif
571 
572 #ifdef WLAN_FEATURE_FILS_SK
573 
574 /**
575  * struct wlan_fils_connection_info  - Fils connection parameters
576  * @is_fils_connection: flag to indicate if the connection is done using
577  * authentication algorithm as 4
578  * @keyname_nai: key name network access identifier
579  * @key_nai_length:  key name network access identifier length
580  * @erp_sequence_number: FILS ERP sequence number
581  * @r_rk: re-authentication Root Key length
582  * @r_rk_length: reauthentication root keys length
583  * @rik: Re-authentication integrity key
584  * @rik_length: Re-Authentication integrity key length
585  * @realm: Realm name
586  * @realm_len: Realm length
587  * @akm_type: FILS connection akm
588  * @auth_type: FILS Authentication Algorithm
589  * @pmk: Pairwise master key
590  * @pmk_len: Pairwise master key length
591  * @pmkid: Pairwise master key ID
592  * @fils_ft: FILS FT key
593  * @fils_ft_len: Length of FILS FT
594  */
595 struct wlan_fils_connection_info {
596 	bool is_fils_connection;
597 	uint8_t keyname_nai[FILS_MAX_KEYNAME_NAI_LENGTH];
598 	uint32_t key_nai_length;
599 	uint32_t erp_sequence_number;
600 	uint8_t r_rk[WLAN_FILS_MAX_RRK_LENGTH];
601 	uint32_t r_rk_length;
602 	uint8_t rik[WLAN_FILS_MAX_RIK_LENGTH];
603 	uint32_t rik_length;
604 	uint8_t realm[WLAN_FILS_MAX_REALM_LEN];
605 	uint32_t realm_len;
606 	uint8_t akm_type;
607 	uint8_t auth_type;
608 	uint8_t pmk[MAX_PMK_LEN];
609 	uint8_t pmk_len;
610 	uint8_t pmkid[PMKID_LEN];
611 	uint8_t fils_ft[WLAN_FILS_FT_MAX_LEN];
612 	uint8_t fils_ft_len;
613 };
614 #endif
615 
616 #ifndef ANI_LITTLE_BIT_ENDIAN
617 /**
618  * struct mlme_ht_info_field_3 - Additional HT IE Field3
619  * @reserved: reserved bits
620  * @pco_phase: PCO Phase
621  * @pco_active: PCO state
622  * @lsig_txop_protection_full_support: L-Sig TXOP Protection Full Support
623  * @secondary_beacon: Beacon ID
624  * @dual_cts_protection: Dual CTS protection Required
625  * @basic_stbc_mcs: Basic STBC MCS
626  */
627 struct mlme_ht_info_field_3 {
628 	uint16_t reserved:4;
629 	uint16_t pco_phase:1;
630 	uint16_t pco_active:1;
631 	uint16_t lsig_txop_protection_full_support:1;
632 	uint16_t secondary_beacon:1;
633 	uint16_t dual_cts_protection:1;
634 	uint16_t basic_stbc_mcs:7;
635 } qdf_packed;
636 #else
637 struct mlme_ht_info_field_3 {
638 	uint16_t basic_stbc_mcs:7;
639 	uint16_t dual_cts_protection:1;
640 	uint16_t secondary_beacon:1;
641 	uint16_t lsig_txop_protection_full_support:1;
642 	uint16_t pco_active:1;
643 	uint16_t pco_phase:1;
644 	uint16_t reserved:4;
645 } qdf_packed;
646 #endif
647 
648 /**
649  * struct wlan_mlme_ht_caps - HT Capabilities related config items
650  * @ht_cap_info: HT capabilities Info Structure
651  * @ampdu_params: AMPDU parameters
652  * @ext_cap_info: HT EXT capabilities info
653  * @info_field_1: HT Information Subset 1
654  * @info_field_2: HT Information Subset 2
655  * @info_field_3: HT Information Subset 3
656  * @short_preamble: Short Preamble support
657  * @enable_ampdu_ps: Enable AMPDU Power Save
658  * @enable_smps: Enabled SM Power Save
659  * @smps : SM Power Save mode
660  * @max_num_amsdu: Max number of AMSDU
661  * @tx_ldpc_enable: Enable Tx LDPC
662  * @short_slot_time_enabled: Enabled/disable short slot time
663  */
664 struct wlan_mlme_ht_caps {
665 	struct mlme_ht_capabilities_info ht_cap_info;
666 	struct mlme_ht_param_info ampdu_params;
667 	struct mlme_ht_ext_cap_info ext_cap_info;
668 	struct mlme_ht_info_field_1 info_field_1;
669 	struct mlme_ht_info_field_2 info_field_2;
670 	struct mlme_ht_info_field_3 info_field_3;
671 	bool short_preamble;
672 	bool enable_ampdu_ps;
673 	bool enable_smps;
674 	uint8_t smps;
675 	uint8_t max_num_amsdu;
676 	uint8_t tx_ldpc_enable;
677 	bool short_slot_time_enabled;
678 };
679 
680 #define MLME_CFG_WPS_UUID_MAX_LEN    16
681 /**
682  * struct wlan_mlme_wps_params - All wps based related cfg items
683  *
684  * @enable_wps: to enable wps
685  * @wps_state: current wps state
686  * @wps_version: wps version
687  * @wps_cfg_method: wps config method
688  * @wps_primary_device_category: wps primary device category
689  * @wps_primary_device_oui: primary device OUI
690  * @wps_device_sub_category: device sub category
691  * @wps_device_password_id: password id of device
692  * @wps_uuid: wps uuid to be sent in probe
693  */
694 struct wlan_mlme_wps_params {
695 	uint8_t enable_wps;
696 	uint8_t wps_state;
697 	uint8_t wps_version;
698 	uint32_t wps_cfg_method;
699 	uint32_t wps_primary_device_category;
700 	uint32_t wps_primary_device_oui;
701 	uint16_t wps_device_sub_category;
702 	uint32_t wps_device_password_id;
703 	struct mlme_cfg_str wps_uuid;
704 };
705 
706 #define MLME_CFG_LISTEN_INTERVAL        1
707 #define MLME_CFG_BEACON_INTERVAL_DEF    100
708 #define MLME_CFG_TX_MGMT_RATE_DEF       0xFF
709 #define MLME_CFG_TX_MGMT_2G_RATE_DEF    0xFF
710 #define MLME_CFG_TX_MGMT_5G_RATE_DEF    0xFF
711 
712 /**
713  * struct wlan_mlme_cfg_sap - SAP related config items
714  * @cfg_ssid: SSID to be configured
715  * @beacon_interval: beacon interval
716  * @dtim_interval:   dtim interval
717  * @listen_interval: listen interval
718  * @sap_11g_policy:  Check if 11g support is enabled
719  * @assoc_sta_limit: Limit on number of STA associated to SAP
720  * @enable_lte_coex: Flag for LTE coexistence
721  * @rate_tx_mgmt: mgmt frame tx rate
722  * @rate_tx_mgmt_2g: mgmt frame tx rate for 2G band
723  * @rate_tx_mgmt_5g: mgmt frame tx rate for 5G band
724  * @tele_bcn_wakeup_en: beacon wakeup enable/disable
725  * @tele_bcn_max_li: max listen interval
726  * @sap_get_peer_info: get peer info
727  * @sap_allow_all_chan_param_name: allow all channels
728  * @sap_max_no_peers: Maximum number of peers
729  * @sap_max_offload_peers: Maximum number of peer offloads
730  * @sap_max_offload_reorder_buffs: Maximum offload reorder buffs
731  * @sap_ch_switch_beacon_cnt: Number of beacons to be sent out during CSA
732  * @sap_internal_restart: flag to check if sap restart is in progress
733  * @sap_ch_switch_mode: Channel switch test mode enable/disable
734  * @chan_switch_hostapd_rate_enabled_name: enable/disable skip hostapd rate
735  * @reduced_beacon_interval: reduced beacon interval value
736  * @max_li_modulated_dtim_time: Max modulated DTIM time.
737  * @country_code_priority: Country code priority.
738  * @sap_pref_chan_location: SAP Preferred channel location.
739  * @sap_force_11n_for_11ac:
740  * @go_force_11n_for_11ac:
741  * @ap_random_bssid_enable:
742  * @sap_mcc_chnl_avoid: SAP MCC channel avoidance flag
743  * @sap_11ac_override: Overrirde SAP bandwidth to 11ac
744  * @go_11ac_override: Override GO bandwidth to 11ac
745  * @sap_sae_enabled: enable sae in sap mode
746  * @is_sap_bcast_deauth_enabled: enable bcast deauth for sap
747  * @is_6g_sap_fd_enabled: enable fils discovery on sap
748  * @disable_bcn_prot: disable beacon protection for sap
749  * @sap_ps_with_twt_enable: SAP power save with TWT
750  */
751 struct wlan_mlme_cfg_sap {
752 	uint16_t beacon_interval;
753 	uint16_t dtim_interval;
754 	uint16_t listen_interval;
755 	bool sap_11g_policy;
756 	uint8_t assoc_sta_limit;
757 	bool enable_lte_coex;
758 	uint8_t rate_tx_mgmt;
759 	uint8_t rate_tx_mgmt_2g;
760 	uint8_t rate_tx_mgmt_5g;
761 	bool tele_bcn_wakeup_en;
762 	uint8_t tele_bcn_max_li;
763 	bool sap_get_peer_info;
764 	bool sap_allow_all_chan_param_name;
765 	uint8_t sap_max_no_peers;
766 	uint8_t sap_max_offload_peers;
767 	uint8_t sap_max_offload_reorder_buffs;
768 	uint8_t sap_ch_switch_beacon_cnt;
769 	bool sap_internal_restart;
770 	bool sap_ch_switch_mode;
771 	bool chan_switch_hostapd_rate_enabled_name;
772 	uint8_t reduced_beacon_interval;
773 	uint8_t max_li_modulated_dtim_time;
774 	bool country_code_priority;
775 	uint8_t sap_pref_chan_location;
776 	bool sap_force_11n_for_11ac;
777 	bool go_force_11n_for_11ac;
778 	bool ap_random_bssid_enable;
779 	uint8_t sap_mcc_chnl_avoid;
780 	bool sap_11ac_override;
781 	bool go_11ac_override;
782 	bool sap_sae_enabled;
783 	bool is_sap_bcast_deauth_enabled;
784 	bool is_6g_sap_fd_enabled;
785 	bool disable_bcn_prot;
786 	bool sap_ps_with_twt_enable;
787 };
788 
789 /**
790  * struct wlan_mlme_dfs_cfg - DFS Capabilities related config items
791  * @dfs_master_capable: Is DFS master mode support enabled
792  * @dfs_disable_channel_switch: disable channel switch on radar detection
793  * @dfs_ignore_cac: Disable cac
794  * @dfs_filter_offload: dfs filter offloaad
795  * @dfs_beacon_tx_enhanced: enhance dfs beacon tx
796  * @dfs_prefer_non_dfs: perefer non dfs channel after radar
797  * @dfs_disable_japan_w53: Disable W53 channels
798  * @sap_tx_leakage_threshold: sap tx leakage threshold
799  * @dfs_pri_multiplier: dfs_pri_multiplier for handle missing pulses
800  */
801 struct wlan_mlme_dfs_cfg {
802 	bool dfs_master_capable;
803 	bool dfs_disable_channel_switch;
804 	bool dfs_ignore_cac;
805 	bool dfs_filter_offload;
806 	bool dfs_beacon_tx_enhanced;
807 	bool dfs_prefer_non_dfs;
808 	bool dfs_disable_japan_w53;
809 	uint32_t sap_tx_leakage_threshold;
810 	uint32_t dfs_pri_multiplier;
811 };
812 
813 /**
814  * struct wlan_mlme_mbo - Multiband Operation related ini configs
815  * @mbo_candidate_rssi_thres: candidate AP's min rssi to accept it
816  * @mbo_current_rssi_thres: Connected AP's rssi threshold below which
817  * transition is considered
818  * @mbo_current_rssi_mcc_thres: connected AP's RSSI threshold value to prefer
819  * against MCC
820  * @mbo_candidate_rssi_btc_thres: Candidate AP's minimum RSSI threshold to
821  * prefer it even in BT coex.
822  */
823 struct wlan_mlme_mbo {
824 	int8_t mbo_candidate_rssi_thres;
825 	int8_t mbo_current_rssi_thres;
826 	int8_t mbo_current_rssi_mcc_thres;
827 	int8_t mbo_candidate_rssi_btc_thres;
828 };
829 
830 /**
831  * struct wlan_mlme_powersave - Powersave related ini configs
832  * @is_imps_enabled: flag to enable/disable IMPS
833  * @is_bmps_enabled: flag to enable/disable BMPS
834  * @auto_bmps_timer_val: auto BMPS timer value
835  * @bmps_min_listen_interval: BMPS listen interval minimum value
836  * @bmps_max_listen_interval: BMPS listen interval maximum value
837  * @dtim_selection_diversity: dtim selection diversity value to be sent to fw
838  */
839 struct wlan_mlme_powersave {
840 	bool is_imps_enabled;
841 	bool is_bmps_enabled;
842 	uint32_t auto_bmps_timer_val;
843 	uint32_t bmps_min_listen_interval;
844 	uint32_t bmps_max_listen_interval;
845 	uint32_t dtim_selection_diversity;
846 };
847 
848 /**
849  * struct mlme_vht_capabilities_info - MLME VHT config items
850  * @supp_chan_width: Supported Channel Width
851  * @ldpc_coding_cap: LDPC Coding Capability
852  * @short_gi_80mhz: 80MHz Short Guard Interval
853  * @short_gi_160mhz: 160MHz Short Guard Interval
854  * @tx_stbc: Tx STBC cap
855  * @rx_stbc: Rx STBC cap
856  * @su_bformer: SU Beamformer cap
857  * @su_bformee: SU Beamformee cap
858  * @tx_bfee_ant_supp: Tx beamformee anti supp
859  * @num_soundingdim: Number of sounding dimensions
860  * @mu_bformer: MU Beamformer cap
861  * @txop_ps: Tx OPs in power save
862  * @htc_vhtc: htc_vht capability
863  * @link_adap_cap: Link adaptation capability
864  * @rx_antpattern: Rx Antenna Pattern cap
865  * @tx_antpattern: Tx Antenna Pattern cap
866  * @rx_mcs_map: Rx MCS Map
867  * @tx_mcs_map: Tx MCS Map
868  * @rx_supp_data_rate: Rx highest supported data rate
869  * @tx_supp_data_rate: Tx highest supported data rate
870  * @basic_mcs_set: Basic MCS set
871  * @enable_txbf_20mhz: enable tx bf for 20mhz
872  * @channel_width: Channel width capability for 11ac
873  * @rx_mcs: VHT Rx MCS capability for 1x1 mode
874  * @tx_mcs: VHT Tx MCS capability for 1x1 mode
875  * @rx_mcs2x2: VHT Rx MCS capability for 2x2 mode
876  * @tx_mcs2x2: VHT Tx MCS capability for 2x2 mode
877  * @enable_vht20_mcs9: Enables VHT MCS9 in 20M BW operation
878  * @enable2x2: Enables/disables VHT Tx/Rx MCS values for 2x2
879  * @enable_mu_bformee: Enables/disables multi-user (MU)
880  * beam formee capability
881  * @enable_paid: Enables/disables paid
882  * @enable_gid: Enables/disables gid
883  * @b24ghz_band: To control VHT support in 2.4 GHz band
884  * @vendor_24ghz_band: to control VHT support based on vendor
885  * ie in 2.4 GHz band
886  * @ampdu_len_exponent: To handle maximum receive AMPDU ampdu len exponent
887  * @ampdu_len: To handle maximum receive AMPDU ampdu len
888  * @tx_bfee_sap: enable tx bfee SAp
889  * @vendor_vhtie: enable subfee vendor vht ie
890  * @tx_bf_cap: Transmit bf capability
891  * @as_cap: Antenna sharing capability info
892  * @disable_ldpc_with_txbf_ap: Disable ldpc capability
893  * @vht_mcs_10_11_supp: VHT MCS 10 & 11 support
894  * @extended_nss_bw_supp:
895  * @vht_extended_nss_bw_cap:
896  * @max_nsts_total:
897  * @restricted_80p80_bw_supp:
898  */
899 struct mlme_vht_capabilities_info {
900 	uint8_t supp_chan_width;
901 	bool ldpc_coding_cap;
902 	bool short_gi_80mhz;
903 	bool short_gi_160mhz;
904 	bool tx_stbc;
905 	bool rx_stbc;
906 	bool su_bformer;
907 	bool su_bformee;
908 	uint8_t tx_bfee_ant_supp;
909 	uint8_t num_soundingdim;
910 	bool mu_bformer;
911 	bool txop_ps;
912 	bool htc_vhtc;
913 	uint8_t link_adap_cap;
914 	bool rx_antpattern;
915 	bool tx_antpattern;
916 	uint32_t rx_mcs_map;
917 	uint32_t tx_mcs_map;
918 	uint32_t rx_supp_data_rate;
919 	uint32_t tx_supp_data_rate;
920 	uint32_t basic_mcs_set;
921 	bool enable_txbf_20mhz;
922 	uint8_t channel_width;
923 	uint32_t rx_mcs;
924 	uint32_t tx_mcs;
925 	uint8_t rx_mcs2x2;
926 	uint8_t tx_mcs2x2;
927 	bool enable_vht20_mcs9;
928 	bool enable2x2;
929 	bool enable_mu_bformee;
930 	bool enable_paid;
931 	bool enable_gid;
932 	bool b24ghz_band;
933 	bool vendor_24ghz_band;
934 	uint8_t ampdu_len_exponent;
935 	uint8_t ampdu_len;
936 	bool tx_bfee_sap;
937 	bool vendor_vhtie;
938 	uint8_t tx_bf_cap;
939 	uint8_t as_cap;
940 	bool disable_ldpc_with_txbf_ap;
941 	bool vht_mcs_10_11_supp;
942 	uint8_t extended_nss_bw_supp;
943 	uint8_t vht_extended_nss_bw_cap;
944 	uint8_t max_nsts_total;
945 	bool restricted_80p80_bw_supp;
946 };
947 
948 /**
949  * struct wlan_mlme_vht_caps - VHT Capabilities related config items
950  * @vht_cap_info: VHT capabilities Info Structure
951  */
952 struct wlan_mlme_vht_caps {
953 	struct mlme_vht_capabilities_info vht_cap_info;
954 };
955 
956 /**
957  * struct wlan_vht_config - VHT capabilities
958  * @max_mpdu_len: MPDU length
959  * @supported_channel_widthset: channel width set
960  * @ldpc_coding: LDPC coding capability
961  * @shortgi80: short GI 80 support
962  * @shortgi160and80plus80: short Gi 160 & 80+80 support
963  * @tx_stbc: Tx STBC cap
964  * @rx_stbc: Rx STBC cap
965  * @su_beam_former: SU beam former cap
966  * @su_beam_formee: SU beam formee cap
967  * @csnof_beamformer_antSup: Antenna support for beamforming
968  * @num_soundingdim: Sound dimensions
969  * @mu_beam_former: MU beam former cap
970  * @mu_beam_formee: MU beam formee cap
971  * @vht_txops: TXOP power save
972  * @htc_vhtcap: HTC VHT capability
973  * @max_ampdu_lenexp: AMPDU length
974  * @vht_link_adapt: VHT link adapatation capable
975  * @rx_antpattern: RX antenna pattern
976  * @tx_antpattern: TX antenna pattern
977  * @extended_nss_bw_supp:
978  * @caps: entire capability bitmap
979  */
980 struct wlan_vht_config {
981 	union {
982 		struct {
983 			uint32_t           max_mpdu_len:2;
984 			uint32_t supported_channel_widthset:2;
985 			uint32_t        ldpc_coding:1;
986 			uint32_t         shortgi80:1;
987 			uint32_t shortgi160and80plus80:1;
988 			uint32_t               tx_stbc:1;
989 			uint32_t               rx_stbc:3;
990 			uint32_t      su_beam_former:1;
991 			uint32_t      su_beam_formee:1;
992 			uint32_t csnof_beamformer_antSup:3;
993 			uint32_t       num_soundingdim:3;
994 			uint32_t      mu_beam_former:1;
995 			uint32_t      mu_beam_formee:1;
996 			uint32_t            vht_txops:1;
997 			uint32_t            htc_vhtcap:1;
998 			uint32_t       max_ampdu_lenexp:3;
999 			uint32_t        vht_link_adapt:2;
1000 			uint32_t         rx_antpattern:1;
1001 			uint32_t         tx_antpattern:1;
1002 			uint32_t  extended_nss_bw_supp:2;
1003 		};
1004 		uint32_t caps;
1005 	};
1006 };
1007 
1008 /**
1009  * struct wlan_mlme_qos - QOS TX/RX aggregation related CFG items
1010  * @tx_aggregation_size: TX aggr size in number of MPDUs
1011  * @tx_aggregation_size_be: No. of MPDUs for BE queue for TX aggr
1012  * @tx_aggregation_size_bk: No. of MPDUs for BK queue for TX aggr
1013  * @tx_aggregation_size_vi: No. of MPDUs for VI queue for TX aggr
1014  * @tx_aggregation_size_vo: No. of MPDUs for VO queue for TX aggr
1015  * @rx_aggregation_size: No. of MPDUs for RX aggr
1016  * @tx_aggr_sw_retry_threshold_be: aggr sw retry threshold for BE
1017  * @tx_aggr_sw_retry_threshold_bk: aggr sw retry threshold for BK
1018  * @tx_aggr_sw_retry_threshold_vi: aggr sw retry threshold for VI
1019  * @tx_aggr_sw_retry_threshold_vo: aggr sw retry threshold for VO
1020  * @tx_aggr_sw_retry_threshold: aggr sw retry threshold
1021  * @tx_non_aggr_sw_retry_threshold_be: non aggr sw retry threshold for BE
1022  * @tx_non_aggr_sw_retry_threshold_bk: non aggr sw retry threshold for BK
1023  * @tx_non_aggr_sw_retry_threshold_vi: non aggr sw retry threshold for VI
1024  * @tx_non_aggr_sw_retry_threshold_vo: non aggr sw retry threshold for VO
1025  * @tx_non_aggr_sw_retry_threshold: non aggr sw retry threshold
1026  * @sap_max_inactivity_override: Override updating ap_sta_inactivity from
1027  * hostapd.conf
1028  * @sap_uapsd_enabled: Flag to enable/disable UAPSD for SAP
1029  */
1030 struct wlan_mlme_qos {
1031 	uint32_t tx_aggregation_size;
1032 	uint32_t tx_aggregation_size_be;
1033 	uint32_t tx_aggregation_size_bk;
1034 	uint32_t tx_aggregation_size_vi;
1035 	uint32_t tx_aggregation_size_vo;
1036 	uint32_t rx_aggregation_size;
1037 	uint32_t tx_aggr_sw_retry_threshold_be;
1038 	uint32_t tx_aggr_sw_retry_threshold_bk;
1039 	uint32_t tx_aggr_sw_retry_threshold_vi;
1040 	uint32_t tx_aggr_sw_retry_threshold_vo;
1041 	uint32_t tx_aggr_sw_retry_threshold;
1042 	uint32_t tx_non_aggr_sw_retry_threshold_be;
1043 	uint32_t tx_non_aggr_sw_retry_threshold_bk;
1044 	uint32_t tx_non_aggr_sw_retry_threshold_vi;
1045 	uint32_t tx_non_aggr_sw_retry_threshold_vo;
1046 	uint32_t tx_non_aggr_sw_retry_threshold;
1047 	bool sap_max_inactivity_override;
1048 	bool sap_uapsd_enabled;
1049 };
1050 
1051 #ifdef WLAN_FEATURE_11AX
1052 #define MLME_HE_PPET_LEN 25
1053 #define WNI_CFG_HE_OPS_BSS_COLOR_MAX 0x3F
1054 
1055 /**
1056  * struct wlan_mlme_he_caps - HE Capabilities related config items
1057  * @dot11_he_cap:
1058  * @he_cap_orig:
1059  * @he_ppet_2g:
1060  * @he_ppet_5g:
1061  * @he_ops_basic_mcs_nss:
1062  * @he_dynamic_fragmentation:
1063  * @enable_ul_mimo:
1064  * @enable_ul_ofdm:
1065  * @he_sta_obsspd:
1066  * @he_mcs_12_13_supp_2g:
1067  * @he_mcs_12_13_supp_5g:
1068  * @disable_sap_mcs_12_13: Bitmap to disable he mcs 12 13 for SAP
1069  */
1070 struct wlan_mlme_he_caps {
1071 	tDot11fIEhe_cap dot11_he_cap;
1072 	tDot11fIEhe_cap he_cap_orig;
1073 	uint8_t he_ppet_2g[MLME_HE_PPET_LEN];
1074 	uint8_t he_ppet_5g[MLME_HE_PPET_LEN];
1075 	uint32_t he_ops_basic_mcs_nss;
1076 	uint8_t he_dynamic_fragmentation;
1077 	uint8_t enable_ul_mimo;
1078 	uint8_t enable_ul_ofdm;
1079 	uint32_t he_sta_obsspd;
1080 	uint16_t he_mcs_12_13_supp_2g;
1081 	uint16_t he_mcs_12_13_supp_5g;
1082 	uint32_t disable_sap_mcs_12_13;
1083 };
1084 #endif
1085 
1086 #ifdef WLAN_FEATURE_11BE
1087 /**
1088  * struct wlan_mlme_eht_caps - EHT Capabilities related config items
1089  * @dot11_eht_cap: current EHT capabilities
1090  * @eht_cap_orig: original EHT capabilities
1091  */
1092 struct wlan_mlme_eht_caps {
1093 	tDot11fIEeht_cap dot11_eht_cap;
1094 	tDot11fIEeht_cap eht_cap_orig;
1095 	/* Add members to store INI configuration corresponding to 11be */
1096 };
1097 #endif
1098 
1099 /**
1100  * struct wlan_mlme_chain_cfg - Chain info related structure
1101  * @max_tx_chains_2g: max tx chains supported in 2.4ghz band
1102  * @max_rx_chains_2g: max rx chains supported in 2.4ghz band
1103  * @max_tx_chains_5g: max tx chains supported in 5ghz band
1104  * @max_rx_chains_5g: max rx chains supported in 5ghz band
1105  */
1106 struct wlan_mlme_chain_cfg {
1107 	uint8_t max_tx_chains_2g;
1108 	uint8_t max_rx_chains_2g;
1109 	uint8_t max_tx_chains_5g;
1110 	uint8_t max_rx_chains_5g;
1111 };
1112 
1113 /**
1114  * struct mlme_tgt_caps - mlme related capability coming from target (FW)
1115  * @data_stall_recovery_fw_support: does target supports data stall recovery.
1116  * @bigtk_support: does the target support bigtk capability or not.
1117  * @stop_all_host_scan_support: Target capability that indicates if the target
1118  * supports stop all host scan request type.
1119  * @peer_create_conf_support: Peer create confirmation command support
1120  * @dual_sta_roam_fw_support: Firmware support for dual sta roaming feature
1121  * @ocv_support: FW supports OCV
1122  *
1123  * Add all the mlme-tgt related capabilities here, and the public API would fill
1124  * the related capability in the required mlme cfg structure.
1125  */
1126 struct mlme_tgt_caps {
1127 	bool data_stall_recovery_fw_support;
1128 	bool bigtk_support;
1129 	bool stop_all_host_scan_support;
1130 	bool peer_create_conf_support;
1131 	bool dual_sta_roam_fw_support;
1132 	bool ocv_support;
1133 };
1134 
1135 /**
1136  * struct wlan_mlme_rates - RATES related config items
1137  * @cfp_period: cfp period info
1138  * @cfp_max_duration: cfp Max duration info
1139  * @max_htmcs_txdata: max HT mcs info for Tx
1140  * @disable_abg_rate_txdata: disable abg rate info for tx data
1141  * @sap_max_mcs_txdata: sap max mcs info
1142  * @disable_high_ht_mcs_2x2: disable high mcs for 2x2 info
1143  * @supported_11b: supported 11B rates
1144  * @supported_11a: supported 11A rates
1145  * @supported_mcs_set: supported MCS set
1146  * @basic_mcs_set: basic MCS set
1147  * @current_mcs_set: current MCS set
1148  */
1149 struct wlan_mlme_rates {
1150 	uint8_t cfp_period;
1151 	uint16_t cfp_max_duration;
1152 	uint16_t max_htmcs_txdata;
1153 	bool disable_abg_rate_txdata;
1154 	uint16_t sap_max_mcs_txdata;
1155 	uint8_t disable_high_ht_mcs_2x2;
1156 	struct mlme_cfg_str supported_11b;
1157 	struct mlme_cfg_str supported_11a;
1158 	struct mlme_cfg_str supported_mcs_set;
1159 	struct mlme_cfg_str basic_mcs_set;
1160 	struct mlme_cfg_str current_mcs_set;
1161 };
1162 
1163 
1164 /* Flags for gLimProtectionControl that is updated in pe session*/
1165 #define MLME_FORCE_POLICY_PROTECTION_DISABLE        0
1166 #define MLME_FORCE_POLICY_PROTECTION_CTS            1
1167 #define MLME_FORCE_POLICY_PROTECTION_RTS            2
1168 #define MLME_FORCE_POLICY_PROTECTION_DUAL_CTS       3
1169 #define MLME_FORCE_POLICY_PROTECTION_RTS_ALWAYS     4
1170 #define MLME_FORCE_POLICY_PROTECTION_AUTO           5
1171 
1172 /* protection_enabled bits*/
1173 #define MLME_PROTECTION_ENABLED_FROM_llA            0
1174 #define MLME_PROTECTION_ENABLED_FROM_llB            1
1175 #define MLME_PROTECTION_ENABLED_FROM_llG            2
1176 #define MLME_PROTECTION_ENABLED_HT_20               3
1177 #define MLME_PROTECTION_ENABLED_NON_GF              4
1178 #define MLME_PROTECTION_ENABLED_LSIG_TXOP           5
1179 #define MLME_PROTECTION_ENABLED_RIFS                6
1180 #define MLME_PROTECTION_ENABLED_OBSS                7
1181 #define MLME_PROTECTION_ENABLED_OLBC_FROM_llA       8
1182 #define MLME_PROTECTION_ENABLED_OLBC_FROM_llB       9
1183 #define MLME_PROTECTION_ENABLED_OLBC_FROM_llG       10
1184 #define MLME_PROTECTION_ENABLED_OLBC_HT20           11
1185 #define MLME_PROTECTION_ENABLED_OLBC_NON_GF         12
1186 #define MLME_PROTECTION_ENABLED_OLBC_LSIG_TXOP      13
1187 #define MLME_PROTECTION_ENABLED_OLBC_RIFS           14
1188 #define MLME_PROTECTION_ENABLED_OLBC_OBSS           15
1189 
1190 /**
1191  * struct wlan_mlme_feature_flag - feature related information
1192  * @accept_short_slot_assoc: enable short slot feature
1193  * @enable_hcf: enable HCF feature
1194  * @enable_rsn: enable RSN for connection
1195  * @enable_short_preamble_11g: enable short preamble for 11g
1196  * @enable_short_slot_time_11g: enable shot slot time for 11g
1197  * @enable_ampdu: enable AMPDU feature
1198  * @enable_mcc: enable MCC feature
1199  * @mcc_rts_cts_prot: RTS-CTS protection in MCC
1200  * @mcc_bcast_prob_rsp: broadcast Probe Response in MCC
1201  * @channel_bonding_mode: channel bonding mode
1202  * @enable_block_ack: enable block ack feature
1203  * @channel_bonding_mode_24ghz: configures Channel Bonding in 24 GHz
1204  * @channel_bonding_mode_5ghz:  configures Channel Bonding in 5 GHz
1205  * @update_cw_allowed: to check update chan width allowed or not
1206  */
1207 struct wlan_mlme_feature_flag {
1208 	bool accept_short_slot_assoc;
1209 	bool enable_hcf;
1210 	bool enable_rsn;
1211 	bool enable_short_preamble_11g;
1212 	bool enable_short_slot_time_11g;
1213 	bool enable_ampdu;
1214 	bool enable_mcc;
1215 	uint8_t mcc_rts_cts_prot;
1216 	uint8_t mcc_bcast_prob_rsp;
1217 	uint32_t channel_bonding_mode;
1218 	uint32_t enable_block_ack;
1219 	uint32_t channel_bonding_mode_24ghz;
1220 	uint32_t channel_bonding_mode_5ghz;
1221 	bool update_cw_allowed;
1222 };
1223 
1224 /**
1225  * struct wlan_mlme_sap_protection - SAP erp protection config items
1226  * @ignore_peer_ht_opmode:     Ignore the ht opmode of the peer. Dynamic via INI
1227  * @enable_ap_obss_protection: enable/disable AP OBSS protection
1228  * @protection_force_policy:   Protection force policy. Static via cfg
1229  * @is_ap_prot_enabled:        Enable/disable SAP protection
1230  * @ap_protection_mode:        AP protection bitmap
1231  * @protection_enabled:        Force enable protection. static via cfg
1232  */
1233 struct wlan_mlme_sap_protection {
1234 	bool ignore_peer_ht_opmode;
1235 	bool enable_ap_obss_protection;
1236 	uint8_t protection_force_policy;
1237 	bool is_ap_prot_enabled;
1238 	uint16_t ap_protection_mode;
1239 	uint32_t protection_enabled;
1240 };
1241 
1242 /**
1243  * struct wlan_mlme_chainmask - All chainmask related cfg items
1244  * @txchainmask1x1:     To set transmit chainmask
1245  * @rxchainmask1x1:     To set rx chainmask
1246  * @tx_chain_mask_cck:  Used to enable/disable Cck ChainMask
1247  * @tx_chain_mask_1ss:  Enables/disables tx chain Mask1ss
1248  * @num_11b_tx_chains:  Number of Tx Chains in 11b mode
1249  * @num_11ag_tx_chains: Number of Tx Chains in 11ag mode
1250  * @tx_chain_mask_2g:   Tx chain mask for 2g
1251  * @rx_chain_mask_2g:   Tx chain mask for 2g
1252  * @tx_chain_mask_5g:   Tx chain mask for 5g
1253  * @rx_chain_mask_5g:   Rx chain mask for 5g
1254  * @enable_bt_chain_separation: Enable/Disable BT/WLAN Host chain separation
1255  */
1256 struct wlan_mlme_chainmask {
1257 	uint8_t txchainmask1x1;
1258 	uint8_t rxchainmask1x1;
1259 	bool tx_chain_mask_cck;
1260 	uint8_t tx_chain_mask_1ss;
1261 	uint16_t num_11b_tx_chains;
1262 	uint16_t num_11ag_tx_chains;
1263 	uint8_t tx_chain_mask_2g;
1264 	uint8_t rx_chain_mask_2g;
1265 	uint8_t tx_chain_mask_5g;
1266 	uint8_t rx_chain_mask_5g;
1267 	bool enable_bt_chain_separation;
1268 };
1269 
1270 /**
1271  * enum wlan_mlme_ratemask_type: Type of PHY for ratemask
1272  * @WLAN_MLME_RATEMASK_TYPE_NO_MASK: no ratemask set
1273  * @WLAN_MLME_RATEMASK_TYPE_CCK: CCK/OFDM rate
1274  * @WLAN_MLME_RATEMASK_TYPE_HT: HT rate
1275  * @WLAN_MLME_RATEMASK_TYPE_VHT: VHT rate
1276  * @WLAN_MLME_RATEMASK_TYPE_HE: HE rate
1277  * @WLAN_MLME_RATEMASK_TYPE_MAX: max enumeration
1278  *
1279  * This is used for 'type' values in wlan_mlme_ratemask
1280  */
1281 enum wlan_mlme_ratemask_type {
1282 	WLAN_MLME_RATEMASK_TYPE_NO_MASK  =  0,
1283 	WLAN_MLME_RATEMASK_TYPE_CCK      =  1,
1284 	WLAN_MLME_RATEMASK_TYPE_HT       =  2,
1285 	WLAN_MLME_RATEMASK_TYPE_VHT      =  3,
1286 	WLAN_MLME_RATEMASK_TYPE_HE       =  4,
1287 	/* keep this last */
1288 	WLAN_MLME_RATEMASK_TYPE_MAX,
1289 };
1290 
1291 /**
1292  * struct wlan_mlme_ratemask - ratemask config parameters
1293  * @type:       Type of PHY the mask to be applied
1294  * @lower32:    Lower 32 bits in the 1st 64-bit value
1295  * @higher32:   Higher 32 bits in the 1st 64-bit value
1296  * @lower32_2:  Lower 32 bits in the 2nd 64-bit value
1297  * @higher32_2: Higher 32 bits in the 2nd 64-bit value
1298  */
1299 struct wlan_mlme_ratemask {
1300 	enum wlan_mlme_ratemask_type type;
1301 	uint32_t lower32;
1302 	uint32_t higher32;
1303 	uint32_t lower32_2;
1304 	uint32_t higher32_2;
1305 };
1306 
1307 /**
1308  * struct dual_sta_policy - Concurrent STA policy configuration
1309  * @concurrent_sta_policy: Possible values are defined in enum
1310  * qca_wlan_concurrent_sta_policy_config
1311  * @primary_vdev_id: specified iface is the primary STA iface, say 0 means
1312  * vdev 0 is acting as primary interface
1313  */
1314 struct dual_sta_policy {
1315 	uint8_t concurrent_sta_policy;
1316 	uint8_t primary_vdev_id;
1317 };
1318 
1319 /**
1320  * enum mlme_cfg_frame_type  - frame type to configure mgmt hw tx retry count
1321  * @CFG_GO_NEGOTIATION_REQ_FRAME_TYPE: p2p go negotiation request fame
1322  * @CFG_P2P_INVITATION_REQ_FRAME_TYPE: p2p invitation request frame
1323  * @CFG_PROVISION_DISCOVERY_REQ_FRAME_TYPE: p2p provision discovery request
1324  * @CFG_FRAME_TYPE_MAX: max enumeration
1325  */
1326 enum mlme_cfg_frame_type {
1327 	CFG_GO_NEGOTIATION_REQ_FRAME_TYPE = 0,
1328 	CFG_P2P_INVITATION_REQ_FRAME_TYPE = 1,
1329 	CFG_PROVISION_DISCOVERY_REQ_FRAME_TYPE = 2,
1330 	CFG_FRAME_TYPE_MAX,
1331 };
1332 
1333 #define MAX_MGMT_HW_TX_RETRY_COUNT 127
1334 
1335 /**
1336  * struct wlan_user_mcc_quota - User MCC quota configuration
1337  * @op_mode: Mode for which MCC quota needs to be applied
1338  * @quota: User MCC quota value
1339  * @vdev_id: Intended VDEV id for the quota
1340  */
1341 struct wlan_user_mcc_quota {
1342 	enum QDF_OPMODE op_mode;
1343 	uint8_t quota;
1344 	uint8_t vdev_id;
1345 };
1346 
1347 /**
1348  * enum wlan_mlme_hw_mode_config_type - HW mode config type replicated from
1349  *                                     wmi_hw_mode_config_type in FW header.
1350  *                                     similar as wmi_host_hw_mode_config_type.
1351  * @WLAN_MLME_HW_MODE_SINGLE: Only one PHY is active.
1352  * @WLAN_MLME_HW_MODE_DBS: Both PHYs are active in different bands,
1353  *                        one in 2G and another in 5G.
1354  * @WLAN_MLME_HW_MODE_SBS_PASSIVE: Both PHYs are in passive mode (only rx) in
1355  *                        same band; no tx allowed.
1356  * @WLAN_MLME_HW_MODE_SBS: Both PHYs are active in the same band.
1357  *                        Support for both PHYs within one band is planned
1358  *                        for 5G only(as indicated in WMI_MAC_PHY_CAPABILITIES),
1359  *                        but could be extended to other bands in the future.
1360  *                        The separation of the band between the two PHYs needs
1361  *                        to be communicated separately.
1362  * @WLAN_MLME_HW_MODE_DBS_SBS: 3 PHYs, with 2 on the same band doing SBS
1363  *                           as in WMI_HW_MODE_SBS, and 3rd on the other band
1364  * @WLAN_MLME_HW_MODE_DBS_OR_SBS: Two PHY with one PHY capabale of both 2G and
1365  *                        5G. It can support SBS (5G + 5G) OR DBS (5G + 2G).
1366  * @WLAN_MLME_HW_MODE_DBS_2G_5G: Both PHYs are active in different bands.
1367  *                               PhyA 2G and PhyB 5G
1368  * @WLAN_MLME_HW_MODE_2G_PHYB: Only one phy is active. 2G mode on PhyB.
1369  * @WLAN_MLME_HW_MODE_EMLSR: Both PHYs are active in listen mode in 1x1
1370  *                          and Tx/Rx trigger on any PHY will switch
1371  *                          from 1x1 to 2x2 on that Phy
1372  * @WLAN_MLME_HW_MODE_AUX_EMLSR_SINGLE:  PHYA0 and AUX are active in listen mode
1373  *                                      in 1x1 and Tx/Rx trigger on any.
1374  *                                      PHY will switch from 1x1 to 2x2
1375  *                                      on that Phy.
1376  * @WLAN_MLME_HW_MODE_AUX_EMLSR_SPLIT: PHYA1 and AUX are active in listen mode
1377  *                                    in 1x1 and Tx/Rx trigger on any.
1378  *                                    PHY will switch from 1x1 to 2x2
1379  *                                    on that Phy.
1380  * @WLAN_MLME_HW_MODE_MAX: Max hw_mode_id.
1381  */
1382 enum wlan_mlme_hw_mode_config_type {
1383 	WLAN_MLME_HW_MODE_SINGLE       = 0,
1384 	WLAN_MLME_HW_MODE_DBS          = 1,
1385 	WLAN_MLME_HW_MODE_SBS_PASSIVE  = 2,
1386 	WLAN_MLME_HW_MODE_SBS          = 3,
1387 	WLAN_MLME_HW_MODE_DBS_SBS      = 4,
1388 	WLAN_MLME_HW_MODE_DBS_OR_SBS   = 5,
1389 	WLAN_MLME_HW_MODE_DBS_2G_5G    = 6,
1390 	WLAN_MLME_HW_MODE_2G_PHYB      = 7,
1391 	WLAN_MLME_HW_MODE_EMLSR        = 8,
1392 	WLAN_MLME_HW_MODE_AUX_EMLSR_SINGLE = 9,
1393 	WLAN_MLME_HW_MODE_AUX_EMLSR_SPLIT  = 10,
1394 	WLAN_MLME_HW_MODE_MAX,
1395 };
1396 
1397 /**
1398  * enum wlan_mlme_aux_caps_bit - Bit mapping for aux capability
1399  *
1400  * @WLAN_MLME_AUX_MODE_SCAN_BIT: if set, aux scan is supported
1401  * @WLAN_MLME_AUX_MODE_LISTEN_BIT: if set, aux listen is supported
1402  * @WLAN_MLME_AUX_MODE_EMLSR_BIT: if set, aux emlsr is supported
1403  */
1404 enum wlan_mlme_aux_caps_bit {
1405 	WLAN_MLME_AUX_MODE_SCAN_BIT = 0,
1406 	WLAN_MLME_AUX_MODE_LISTEN_BIT = 1,
1407 	WLAN_MLME_AUX_MODE_EMLSR_BIT = 2,
1408 };
1409 
1410 /* struct wlan_mlme_aux_dev_caps - wlan mlme aux dev capability
1411  *
1412  * @supported_modes_bitmap: indicate which mode this AUX supports for the
1413  *                          HW mode defined in hw_mode_id
1414  * @listen_pdev_id_map: indicate which AUX MAC can listen/scan for the HW mode
1415  *                      described in hw_mode_id
1416  * @emlsr_pdev_id_map: indicate which AUX MAC can perform eMLSR for the HW mode
1417  *                     described in hw_mode_id.
1418  */
1419 struct wlan_mlme_aux_dev_caps {
1420 	uint32_t supported_modes_bitmap;
1421 	uint32_t listen_pdev_id_map;
1422 	uint32_t emlsr_pdev_id_map;
1423 };
1424 
1425 /* struct wlan_mlme_generic - Generic CFG config items
1426  *
1427  * @band_capability: HW Band Capability - Both or 2.4G only or 5G only
1428  * @band: Current Band - Internal variable, initialized to INI and updated later
1429  * @select_5ghz_margin: RSSI margin to select 5Ghz over 2.4 Ghz
1430  * @sub_20_chan_width: Sub 20Mhz Channel Width
1431  * @ito_repeat_count: ITO Repeat Count
1432  * @pmf_sa_query_max_retries: PMF query max retries for SAP
1433  * @pmf_sa_query_retry_interval: PMF query retry interval for SAP
1434  * @dropped_pkt_disconnect_thresh: Threshold for dropped pkts before disconnect
1435  * @rtt_mac_randomization: Enable/Disable RTT MAC randomization
1436  * @rtt3_enabled: RTT3 enable or disable info
1437  * @prevent_link_down: Enable/Disable prevention of link down
1438  * @memory_deep_sleep: Enable/Disable memory deep sleep
1439  * @cck_tx_fir_override: Enable/Disable CCK Tx FIR Override
1440  * @crash_inject: Enable/Disable Crash Inject
1441  * @lpass_support: Enable/Disable LPASS Support
1442  * @self_recovery: Enable/Disable Self Recovery
1443  * @sap_dot11mc: Enable/Disable SAP 802.11mc support
1444  * @fatal_event_trigger: Enable/Disable Fatal Events Trigger
1445  * @optimize_ca_event: Enable/Disable Optimization of CA events
1446  * @fw_timeout_crash: Enable/Disable FW Timeout Crash *
1447  * @debug_packet_log: Debug packet log flags
1448  * @enabled_11h: enable 11h flag
1449  * @enabled_11d: enable 11d flag
1450  * @enable_beacon_reception_stats: enable beacon reception stats
1451  * @data_stall_recovery_fw_support: whether FW supports Data stall recovery.
1452  * @enable_change_channel_bandwidth: enable/disable change channel bw in mission
1453  * mode
1454  * @disable_4way_hs_offload: enable/disable 4 way handshake offload to firmware
1455  * @as_enabled: antenna sharing enabled or not (FW capability)
1456  * @mgmt_retry_max: maximum retries for management frame
1457  * @enable_he_mcs0_for_6ghz_mgmt: HE MCS0 rate for mgmt frames in 6GHz band
1458  * @bmiss_skip_full_scan: Decide if full scan can be skipped in firmware if no
1459  * candidate is found in partial scan based on channel map
1460  * @enable_ring_buffer: Decide to enable/disable ring buffer for bug report
1461  * @enable_peer_unmap_conf_support: Indicate whether to send conf for peer unmap
1462  * @dfs_chan_ageout_time: Set DFS Channel ageout time
1463  * @bigtk_support: Whether BIGTK is supported or not
1464  * @stop_all_host_scan_support: Target capability that indicates if the target
1465  * supports stop all host scan request type.
1466  * @dual_sta_roam_fw_support: Firmware support for dual sta roaming feature
1467  * @sae_connect_retries: sae connect retry bitmask
1468  * @wls_6ghz_capable: wifi location service(WLS) is 6ghz capable
1469  * @enabled_rf_test_mode: Enable/disable the RF test mode config
1470  * @monitor_mode_concurrency: Monitor mode concurrency supported
1471  * @ocv_support: FW supports OCV or not
1472  * @wds_mode: wds mode supported
1473  * @dual_sta_policy_cfg: Dual STA policies configuration
1474  * @tx_retry_multiplier: TX xretry extension parameter
1475  * @mgmt_hw_tx_retry_count: MGMT HW tx retry count for frames
1476  * @std_6ghz_conn_policy: 6GHz standard connection policy
1477  * @disable_vlp_sta_conn_to_sp_ap: Disable VLP STA connection to SP AP
1478  * @eht_mode: EHT mode of operation
1479  * @t2lm_negotiation_support: T2LM negotiation supported enum value
1480  * @enable_emlsr_mode: 11BE eMLSR mode support
1481  * @mld_id: MLD ID of requested BSS within ML probe request frame
1482  * @oem_eht_mlo_crypto_bitmap: Bitmap of APs allowed by OEMs to connect
1483  * in EHT/MLO.
1484  * @safe_mode_enable: safe mode to bypass some strict 6 GHz checks for
1485  * connection, bypass strict power levels
1486  * @sr_enable_modes: modes for which SR(Spatial Reuse) is enabled
1487  * @wlan_mlme_aux0_dev_caps: capability for aux0
1488  * @bt_profile_con: Bluetooth connection profile
1489  */
1490 struct wlan_mlme_generic {
1491 	uint32_t band_capability;
1492 	uint32_t band;
1493 	uint8_t select_5ghz_margin;
1494 	uint8_t sub_20_chan_width;
1495 	uint8_t ito_repeat_count;
1496 	uint8_t pmf_sa_query_max_retries;
1497 	uint16_t pmf_sa_query_retry_interval;
1498 	uint16_t dropped_pkt_disconnect_thresh;
1499 	bool rtt_mac_randomization;
1500 	bool rtt3_enabled;
1501 	bool prevent_link_down;
1502 	bool memory_deep_sleep;
1503 	bool cck_tx_fir_override;
1504 	bool crash_inject;
1505 	bool lpass_support;
1506 	bool self_recovery;
1507 	bool sap_dot11mc;
1508 	bool fatal_event_trigger;
1509 	bool optimize_ca_event;
1510 	bool fw_timeout_crash;
1511 	uint8_t debug_packet_log;
1512 	bool enabled_11h;
1513 	bool enabled_11d;
1514 	bool enable_deauth_to_disassoc_map;
1515 	bool enable_beacon_reception_stats;
1516 	bool data_stall_recovery_fw_support;
1517 	uint32_t disable_4way_hs_offload;
1518 	bool as_enabled;
1519 	uint8_t mgmt_retry_max;
1520 	bool enable_he_mcs0_for_6ghz_mgmt;
1521 	bool bmiss_skip_full_scan;
1522 	bool enable_ring_buffer;
1523 	bool enable_peer_unmap_conf_support;
1524 	uint8_t dfs_chan_ageout_time;
1525 	bool bigtk_support;
1526 	bool stop_all_host_scan_support;
1527 	bool dual_sta_roam_fw_support;
1528 	uint32_t sae_connect_retries;
1529 	bool wls_6ghz_capable;
1530 	bool enabled_rf_test_mode;
1531 	enum monitor_mode_concurrency monitor_mode_concurrency;
1532 	bool ocv_support;
1533 	enum wlan_wds_mode wds_mode;
1534 	struct dual_sta_policy dual_sta_policy;
1535 	uint32_t tx_retry_multiplier;
1536 	uint8_t mgmt_hw_tx_retry_count[CFG_FRAME_TYPE_MAX];
1537 #ifdef CONFIG_BAND_6GHZ
1538 	bool std_6ghz_conn_policy;
1539 	bool disable_vlp_sta_conn_to_sp_ap;
1540 #endif
1541 #ifdef WLAN_FEATURE_11BE_MLO
1542 	enum wlan_eht_mode eht_mode;
1543 	bool enable_emlsr_mode;
1544 	enum t2lm_negotiation_support t2lm_negotiation_support;
1545 	uint8_t mld_id;
1546 #endif
1547 #ifdef WLAN_FEATURE_11BE
1548 	uint32_t oem_eht_mlo_crypto_bitmap;
1549 #endif
1550 #ifdef WLAN_FEATURE_MCC_QUOTA
1551 	struct wlan_user_mcc_quota user_mcc_quota;
1552 #endif
1553 	bool safe_mode_enable;
1554 #if defined(WLAN_FEATURE_SR)
1555 	uint32_t sr_enable_modes;
1556 #endif
1557 	struct wlan_mlme_aux_dev_caps
1558 		wlan_mlme_aux0_dev_caps[WLAN_MLME_HW_MODE_MAX];
1559 	bool bt_profile_con;
1560 };
1561 
1562 /**
1563  * struct wlan_mlme_product_details_cfg - product details config items
1564  * @manufacturer_name: manufacture name
1565  * @model_number: model number
1566  * @model_name: model name
1567  * @manufacture_product_name: manufacture product name
1568  * @manufacture_product_version: manufacture product version
1569  */
1570 struct wlan_mlme_product_details_cfg {
1571 	char manufacturer_name[WLAN_CFG_MFR_NAME_LEN + 1];
1572 	char model_number[WLAN_CFG_MODEL_NUMBER_LEN + 1];
1573 	char model_name[WLAN_CFG_MODEL_NAME_LEN + 1];
1574 	char manufacture_product_name[WLAN_CFG_MFR_PRODUCT_NAME_LEN + 1];
1575 	char manufacture_product_version[WLAN_CFG_MFR_PRODUCT_VERSION_LEN + 1];
1576 };
1577 
1578 /**
1579  * struct acs_weight - Normalize ACS weight for mentioned channels
1580  * @chan_freq: frequency of the channel
1581  * @normalize_weight: Normalization factor of the frequency
1582  */
1583 struct acs_weight {
1584 	uint32_t chan_freq;
1585 	uint8_t normalize_weight;
1586 };
1587 
1588 /**
1589  * struct acs_weight_range - Normalize ACS weight for mentioned channel range
1590  * @start_freq: frequency of the start channel
1591  * @end_freq: frequency of the end channel
1592  * @normalize_weight: Normalization factor for freq range
1593  */
1594 struct acs_weight_range {
1595 	uint32_t start_freq;
1596 	uint32_t end_freq;
1597 	uint8_t normalize_weight;
1598 };
1599 
1600 #define MAX_ACS_WEIGHT_RANGE              10
1601 #define MLME_GET_DFS_CHAN_WEIGHT(np_chan_weight) (np_chan_weight & 0x000000FF)
1602 
1603 /**
1604  * struct wlan_mlme_acs - All acs related cfg items
1605  * @is_acs_with_more_param: to enable acs with more param
1606  * @auto_channel_select_weight: to set acs channel weight
1607  * @is_vendor_acs_support: enable application based channel selection
1608  * @is_acs_support_for_dfs_ltecoex: enable channel for dfs and lte coex
1609  * @is_external_acs_policy: control external policy
1610  * @normalize_weight_chan: Weight factor to be considered in ACS
1611  * @normalize_weight_num_chan: Number of freq items for normalization.
1612  * @normalize_weight_range: Frequency range for weight normalization
1613  * @num_weight_range: num of ranges provided by user
1614  * @force_sap_start: Force SAP start when no channel is found suitable
1615  * by ACS
1616  * @acs_prefer_6ghz_psc: Select 6 GHz PSC channel as priority
1617  * @np_chan_weightage: Weightage to be given to non preferred channels.
1618  */
1619 struct wlan_mlme_acs {
1620 	bool is_acs_with_more_param;
1621 	uint32_t auto_channel_select_weight;
1622 	bool is_vendor_acs_support;
1623 	bool is_acs_support_for_dfs_ltecoex;
1624 	bool is_external_acs_policy;
1625 	struct acs_weight normalize_weight_chan[NUM_CHANNELS];
1626 	uint16_t normalize_weight_num_chan;
1627 	struct acs_weight_range normalize_weight_range[MAX_ACS_WEIGHT_RANGE];
1628 	uint16_t num_weight_range;
1629 	bool force_sap_start;
1630 	bool acs_prefer_6ghz_psc;
1631 	uint32_t np_chan_weightage;
1632 };
1633 
1634 /**
1635  * struct wlan_mlme_cfg_twt - All twt related cfg items
1636  * @is_twt_enabled: global twt configuration
1637  * @is_bcast_responder_enabled: bcast responder enable/disable
1638  * @is_bcast_requestor_enabled: bcast requestor enable/disable
1639  * @bcast_requestor_tgt_cap: Broadcast requestor target capability
1640  * @bcast_responder_tgt_cap: Broadcast responder target capability
1641  * @bcast_legacy_tgt_cap: Broadcast Target capability. This is the legacy
1642  * capability.
1643  * @is_twt_nudge_tgt_cap_enabled: support for nudge request enable/disable
1644  * @is_all_twt_tgt_cap_enabled: support for all twt enable/disable
1645  * @is_twt_statistics_tgt_cap_enabled: support for twt statistics
1646  * @twt_congestion_timeout: congestion timeout value
1647  * @disable_btwt_usr_cfg: User config param to enable/disable the BTWT support
1648  * @enable_twt_24ghz: Enable/disable host TWT when STA is connected in
1649  * 2.4Ghz
1650  * @disable_twt_info_frame: Enable/disable TWT info frame
1651  * @req_flag: requestor flag enable/disable
1652  * @res_flag: responder flag enable/disable
1653  * @twt_res_svc_cap: responder service capability
1654  */
1655 struct wlan_mlme_cfg_twt {
1656 	bool is_twt_enabled;
1657 	bool is_bcast_responder_enabled;
1658 	bool is_bcast_requestor_enabled;
1659 	bool bcast_requestor_tgt_cap;
1660 	bool bcast_responder_tgt_cap;
1661 	bool bcast_legacy_tgt_cap;
1662 	bool is_twt_nudge_tgt_cap_enabled;
1663 	bool is_all_twt_tgt_cap_enabled;
1664 	bool is_twt_statistics_tgt_cap_enabled;
1665 	uint32_t twt_congestion_timeout;
1666 	bool disable_btwt_usr_cfg;
1667 	bool enable_twt_24ghz;
1668 	bool disable_twt_info_frame;
1669 	bool req_flag;
1670 	bool res_flag;
1671 	bool twt_res_svc_cap;
1672 };
1673 
1674 /**
1675  * struct wlan_mlme_obss_ht40 - OBSS HT40 config items
1676  * @active_dwelltime:        obss active dwelltime
1677  * @passive_dwelltime:       obss passive dwelltime
1678  * @width_trigger_interval:  obss trigger interval
1679  * @passive_per_channel:     obss scan passive total duration per channel
1680  * @active_per_channel:      obss scan active total duration per channel
1681  * @width_trans_delay:       obss width transition delay
1682  * @scan_activity_threshold: obss scan activity threshold
1683  * @is_override_ht20_40_24g: use channel bonding in 2.4 GHz
1684  * @obss_detection_offload_enabled:       Enable OBSS detection offload
1685  * @obss_color_collision_offload_enabled: Enable obss color collision
1686  * @bss_color_collision_det_sta: STA BSS color collision detection offload
1687  * @bss_color_collision_det_tgt_support: STA BSS color collision detection
1688  * target support
1689  */
1690 struct wlan_mlme_obss_ht40 {
1691 	uint32_t active_dwelltime;
1692 	uint32_t passive_dwelltime;
1693 	uint32_t width_trigger_interval;
1694 	uint32_t passive_per_channel;
1695 	uint32_t active_per_channel;
1696 	uint32_t width_trans_delay;
1697 	uint32_t scan_activity_threshold;
1698 	bool is_override_ht20_40_24g;
1699 	bool obss_detection_offload_enabled;
1700 	bool obss_color_collision_offload_enabled;
1701 	bool bss_color_collision_det_sta;
1702 	bool bss_color_collision_det_tgt_support;
1703 };
1704 
1705 /**
1706  * struct wlan_mlme_eml_cap - EML capabilities of MLD
1707  * @emlsr_supp: eMLSR Support
1708  * @emlsr_pad_delay: eMLSR Padding Delay
1709  * @emlsr_trans_delay: eMLSR transition delay
1710  * @emlmr_supp: eMLMR Support
1711  * @emlmr_delay: eMLMR Delay
1712  * @trans_timeout: Transition Timeout
1713  * @reserved: Reserved
1714  */
1715 struct wlan_mlme_eml_cap {
1716 	uint16_t emlsr_supp:1,
1717 		 emlsr_pad_delay:3,
1718 		 emlsr_trans_delay:3,
1719 		 emlmr_supp:1,
1720 		 emlmr_delay:3,
1721 		 trans_timeout:4,
1722 		 reserved:1;
1723 };
1724 
1725 /**
1726  * enum dot11p_mode - The 802.11p mode of operation
1727  * @CFG_11P_DISABLED:   802.11p mode is disabled
1728  * @CFG_11P_STANDALONE: 802.11p-only operation
1729  * @CFG_11P_CONCURRENT: 802.11p and WLAN operate concurrently
1730  */
1731 enum dot11p_mode {
1732 	CFG_11P_DISABLED = 0,
1733 	CFG_11P_STANDALONE,
1734 	CFG_11P_CONCURRENT,
1735 };
1736 
1737 #define MAX_VDEV_NSS                2
1738 #define MAX_VDEV_CHAINS             2
1739 
1740 /**
1741  * struct wlan_mlme_nss_chains -     MLME vdev config of nss, and chains
1742  * @num_tx_chains:                   tx chains of vdev config
1743  * @num_rx_chains:                   rx chains of vdev config
1744  * @tx_nss:                          tx nss of vdev config
1745  * @rx_nss:                          rx nss of vdev config
1746  * @num_tx_chains_11b:               number of tx chains in 11b mode
1747  * @num_tx_chains_11g:               number of tx chains in 11g mode
1748  * @num_tx_chains_11a:               number of tx chains in 11a mode
1749  * @disable_rx_mrc:                  disable 2 rx chains, in rx nss 1 mode
1750  * @disable_tx_mrc:                  disable 2 tx chains, in tx nss 1 mode
1751  * @enable_dynamic_nss_chains_cfg:   enable the dynamic nss chain config to FW
1752  * @restart_sap_on_dyn_nss_chains_cfg: restart SAP on dynamic NSS chains
1753  * update
1754  */
1755 struct wlan_mlme_nss_chains {
1756 	uint32_t num_tx_chains[NSS_CHAINS_BAND_MAX];
1757 	uint32_t num_rx_chains[NSS_CHAINS_BAND_MAX];
1758 	uint32_t tx_nss[NSS_CHAINS_BAND_MAX];
1759 	uint32_t rx_nss[NSS_CHAINS_BAND_MAX];
1760 	uint32_t num_tx_chains_11b;
1761 	uint32_t num_tx_chains_11g;
1762 	uint32_t num_tx_chains_11a;
1763 	bool disable_rx_mrc[NSS_CHAINS_BAND_MAX];
1764 	bool disable_tx_mrc[NSS_CHAINS_BAND_MAX];
1765 	bool enable_dynamic_nss_chains_cfg;
1766 	bool restart_sap_on_dyn_nss_chains_cfg;
1767 };
1768 
1769 /**
1770  * enum station_keepalive_method - available keepalive methods for stations
1771  * @MLME_STA_KEEPALIVE_MIN: ensure KEEPALIVE_NULL or ARP are not values of 0
1772  * @MLME_STA_KEEPALIVE_NULL_DATA: null data packet
1773  * @MLME_STA_KEEPALIVE_GRAT_ARP: gratuitous ARP packet
1774  * @MLME_STA_KEEPALIVE_UNSOLICIT_ARP_RSP: unsolicited  ARP response packet
1775  * @MLME_STA_KEEPALIVE_COUNT: number of method options available
1776  */
1777 enum station_keepalive_method {
1778 	MLME_STA_KEEPALIVE_MIN,
1779 	MLME_STA_KEEPALIVE_NULL_DATA = 1,
1780 	MLME_STA_KEEPALIVE_GRAT_ARP = 2,
1781 	MLME_STA_KEEPALIVE_UNSOLICIT_ARP_RSP = 3,
1782 	/* keep at the end */
1783 	MLME_STA_KEEPALIVE_COUNT
1784 };
1785 
1786 /**
1787  * enum station_prefer_bw - Station preferred bandwidth to connect AP
1788  * @STA_PREFER_BW_DEFAULT: Station connects AP with its max bw capability.
1789  * @STA_PREFER_BW_VHT80MHZ: Station connects in VHT 80MHz 2x2 when AP is in
1790  *				160MHz 2x2
1791  * @STA_PREFER_BW_80MHZ: Station connects in 80MHz when AP is in 160MHz
1792  */
1793 enum station_prefer_bw {
1794 	STA_PREFER_BW_DEFAULT,
1795 	STA_PREFER_BW_VHT80MHZ,
1796 	STA_PREFER_BW_80MHZ
1797 };
1798 
1799 /**
1800  * struct wlan_mlme_sta_cfg - MLME STA configuration items
1801  * @sta_keep_alive_period:          Sends NULL frame to AP period
1802  * @bss_max_idle_period:            BSS max idle period
1803  * @tgt_gtx_usr_cfg:                Target gtx user config
1804  * @pmkid_modes:                    Enable PMKID modes
1805  * @wait_cnf_timeout:               Wait assoc cnf timeout
1806  * @sta_miracast_mcc_rest_time:     STA+MIRACAST(P2P) MCC rest time
1807  * @dot11p_mode:                    Set 802.11p mode
1808  * @fils_max_chan_guard_time:       Set maximum channel guard time
1809  * @current_rssi:                   Current rssi
1810  * @deauth_retry_cnt:               Deauth retry count
1811  * @sta_prefer_80mhz_over_160mhz:   Set Sta preference to connect in 80HZ/160HZ
1812  * @ignore_peer_erp_info:           Ignore peer information
1813  * @enable_5g_ebt:                  Set default 5G early beacon termination
1814  * @deauth_before_connection:       Send deauth before connection or not
1815  * @enable_go_cts2self_for_sta:     Stop NOA and start using cts2self
1816  * @qcn_ie_support:                 QCN IE support
1817  * @force_rsne_override:            Force rsnie override from user
1818  * @single_tid:                     Set replay counter for all TID
1819  * @allow_tpc_from_ap:              Support for AP power constraint
1820  * @sta_keepalive_method:           STA keepalive method
1821  * @usr_disabled_roaming:           User disable roaming for current connection
1822  * @usr_scan_probe_unicast_ra:      User config unicast probe req in scan
1823  * @event_payload:                  Diagnostic event payload
1824  * @max_li_modulated_dtim_time_ms:  Max modulated DTIM time in ms.
1825  * @mlo_same_link_mld_address:      Use one of the links same as mld address
1826  * @user_set_link_num:              save link num set by vendor command
1827  * @mlo_support_link_num:           max number of links that sta mlo supports
1828  * @mlo_support_link_band:          band bitmap that sta mlo supports
1829  * @mlo_max_simultaneous_links:     number of simultaneous links
1830  * @mlo_prefer_percentage:          percentage to boost/reduce mlo scoring
1831  * @mlo_5gl_5gh_mlsr:               enable/disable 5GL+5GH MLSR
1832  * @epcs_capability:                epcs capability enable or disable flag
1833  * @usr_disable_eht:                user disable the eht for STA
1834  * @eht_disable_punct_in_us_lpi:    Disable eht puncture in us lpi mode
1835  */
1836 struct wlan_mlme_sta_cfg {
1837 	uint32_t sta_keep_alive_period;
1838 	uint32_t bss_max_idle_period;
1839 	uint32_t tgt_gtx_usr_cfg;
1840 	uint32_t pmkid_modes;
1841 	uint32_t wait_cnf_timeout;
1842 	uint32_t sta_miracast_mcc_rest_time;
1843 	enum dot11p_mode dot11p_mode;
1844 	uint8_t fils_max_chan_guard_time;
1845 	uint8_t current_rssi;
1846 	uint8_t deauth_retry_cnt;
1847 	uint8_t sta_prefer_80mhz_over_160mhz;
1848 	bool ignore_peer_erp_info;
1849 	bool enable_5g_ebt;
1850 	bool deauth_before_connection;
1851 	bool enable_go_cts2self_for_sta;
1852 	bool qcn_ie_support;
1853 	bool single_tid;
1854 	bool allow_tpc_from_ap;
1855 	enum station_keepalive_method sta_keepalive_method;
1856 	bool usr_disabled_roaming;
1857 	bool usr_scan_probe_unicast_ra;
1858 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
1859 	host_event_wlan_status_payload_type event_payload;
1860 #endif
1861 	uint16_t max_li_modulated_dtim_time_ms;
1862 #ifdef WLAN_FEATURE_11BE_MLO
1863 	bool mlo_same_link_mld_address;
1864 	uint8_t user_set_link_num;
1865 	uint8_t mlo_support_link_num;
1866 	uint8_t mlo_support_link_band;
1867 	uint8_t mlo_max_simultaneous_links;
1868 	int8_t mlo_prefer_percentage;
1869 	bool mlo_5gl_5gh_mlsr;
1870 #endif
1871 #ifdef WLAN_FEATURE_11BE
1872 	bool epcs_capability;
1873 	bool usr_disable_eht;
1874 	bool eht_disable_punct_in_us_lpi;
1875 #endif
1876 };
1877 
1878 /**
1879  * struct wlan_mlme_stats_cfg - MLME stats configuration items
1880  * @stats_periodic_display_time: time after which stats will be printed
1881  * @stats_link_speed_rssi_high: rssi link speed, high
1882  * @stats_link_speed_rssi_med: medium rssi link speed
1883  * @stats_link_speed_rssi_low: rssi link speed, low
1884  * @stats_report_max_link_speed_rssi: report speed limit
1885  */
1886 struct wlan_mlme_stats_cfg {
1887 	uint32_t stats_periodic_display_time;
1888 	int stats_link_speed_rssi_high;
1889 	int stats_link_speed_rssi_med;
1890 	int stats_link_speed_rssi_low;
1891 	uint32_t stats_report_max_link_speed_rssi;
1892 };
1893 
1894 /**
1895  * enum roaming_dfs_channel_type - Allow dfs channel in roam
1896  * @ROAMING_DFS_CHANNEL_DISABLED:   Disallow dfs channel in roam
1897  * @ROAMING_DFS_CHANNEL_ENABLED_NORMAL: Allow dfs channel
1898  * @ROAMING_DFS_CHANNEL_ENABLED_ACTIVE: Allow dfs channel with active scan
1899  */
1900 enum roaming_dfs_channel_type {
1901 	ROAMING_DFS_CHANNEL_DISABLED,
1902 	ROAMING_DFS_CHANNEL_ENABLED_NORMAL,
1903 	ROAMING_DFS_CHANNEL_ENABLED_ACTIVE,
1904 };
1905 
1906 /**
1907  * struct bss_load_trigger - parameters related to bss load triggered roam
1908  * @enabled: flag to check if this trigger is enabled/disabled
1909  * @threshold: Bss load threshold value above which roaming should start
1910  * @sample_time: Time duration in milliseconds for which the bss load value
1911  * should be monitored
1912  * @rssi_threshold_6ghz: RSSI threshold of the current connected AP below which
1913  * roam should be triggered if bss load threshold exceeds the configured value.
1914  * This value is applicable only when we are connected in 6GHz band.
1915  * @rssi_threshold_5ghz: RSSI threshold of the current connected AP below which
1916  * roam should be triggered if bss load threshold exceeds the configured value.
1917  * This value is applicable only when we are connected in 5GHz band.
1918  * @rssi_threshold_24ghz: RSSI threshold of the current connected AP below which
1919  * roam should be triggered if bss load threshold exceeds the configured value.
1920  * This value is applicable only when we are connected in 2.4 GHz band.
1921  */
1922 struct bss_load_trigger {
1923 	bool enabled;
1924 	uint32_t threshold;
1925 	uint32_t sample_time;
1926 	uint32_t rssi_threshold_6ghz;
1927 	int32_t rssi_threshold_5ghz;
1928 	int32_t rssi_threshold_24ghz;
1929 };
1930 
1931 /*
1932  * AKM suites supported by firmware for roaming
1933  */
1934 #define AKM_FT_SAE           0
1935 #define AKM_FT_SUITEB_SHA384 1
1936 #define AKM_FT_FILS          2
1937 #define AKM_SAE              3
1938 #define AKM_OWE              4
1939 #define AKM_SUITEB           5
1940 #define AKM_SAE_EXT          6
1941 
1942 #define LFR3_STA_ROAM_DISABLE_BY_P2P BIT(0)
1943 #define LFR3_STA_ROAM_DISABLE_BY_NAN BIT(1)
1944 
1945 /**
1946  * struct fw_scan_channels  - Channel details part of VDEV set PCL command
1947  * @num_channels: Number of channels
1948  * @freq: Channel Frequency list
1949  */
1950 struct fw_scan_channels {
1951 	uint8_t num_channels;
1952 	uint32_t freq[NUM_CHANNELS];
1953 };
1954 
1955 /**
1956  * struct wlan_mlme_lfr_cfg - MLME LMAC fast roaming config
1957  * @mawc_roam_enabled: Enable/Disable MAWC during roaming
1958  * @enable_fast_roam_in_concurrency: Enable LFR roaming on STA during
1959  *                                   concurrency
1960  * @vendor_btm_param: Vendor WTC roam trigger parameters
1961  * @roam_rt_stats: Roam event stats vendor command parameters
1962  * @lfr3_roaming_offload: Enable/disable roam offload feature
1963  * @lfr3_dual_sta_roaming_enabled: Enable/Disable dual sta roaming offload
1964  *                                 feature
1965  * @enable_self_bss_roam: enable roaming to connected BSSID
1966  * @enable_disconnect_roam_offload: enable disassoc/deauth roam scan.
1967  * @enable_idle_roam: flag to enable/disable idle roam in fw
1968  * @idle_roam_rssi_delta: rssi delta of connected ap which is used to
1969  *                        identify if the AP is idle or in motion
1970  * @idle_roam_inactive_time: Timeout value in seconds, above which the
1971  *                           connection is idle
1972  * @idle_data_packet_count: data packet count measured during inactive time,
1973  *                          below which the connection is idle.
1974  * @idle_roam_band: Bands on which idle roam scan is allowed
1975  * @idle_roam_min_rssi: Minimum rssi of connected AP to be considered for
1976  *                      idle roam trigger.
1977  * @enable_roam_reason_vsie: Enable/disable incluison of roam reason
1978  *                           vsie in Re(assoc) frame
1979  * @roam_trigger_bitmap: Bitmap of roaming triggers.
1980  * @sta_roam_disable: STA roaming disabled by interfaces
1981  * @roam_info_stats_num: STA roaming information cache number
1982  * @roam_high_rssi_delta: Delta change in high RSSI at which roam scan is
1983  * triggered in 2.4/5 GHz.
1984  * @early_stop_scan_enable: Set early stop scan
1985  * @enable_5g_band_pref: Enable preference for 5G from INI
1986  * @ese_enabled: Enable ESE feature
1987  * @lfr_enabled: Enable fast roaming
1988  * @mawc_enabled: Enable MAWC
1989  * @fast_transition_enabled: Enable fast transition
1990  * @wes_mode_enabled: Enable WES mode
1991  * @mawc_roam_traffic_threshold: Configure traffic threshold
1992  * @mawc_roam_ap_rssi_threshold: Best AP RSSI threshold
1993  * @mawc_roam_rssi_high_adjust: Adjust MAWC roam high RSSI
1994  * @mawc_roam_rssi_low_adjust: Adjust MAWC roam low RSSI
1995  * @roam_rssi_abs_threshold: The min RSSI of the candidate AP
1996  * @rssi_threshold_offset_5g: Lookup threshold offset for 5G band
1997  * @early_stop_scan_min_threshold: Set early stop scan min
1998  * @early_stop_scan_max_threshold: Set early stop scan max
1999  * @roam_dense_traffic_threshold: Dense traffic threshold
2000  * @roam_dense_rssi_thre_offset: Sets dense roam RSSI threshold diff
2001  * @roam_dense_min_aps: Sets minimum number of AP for dense roam
2002  * @roam_bg_scan_bad_rssi_threshold:RSSI threshold for background roam
2003  * @roam_bg_scan_client_bitmap: Bitmap used to identify the scan clients
2004  * @roam_bg_scan_bad_rssi_offset_2g:RSSI threshold offset for 2G to 5G roam
2005  * @roam_data_rssi_threshold_triggers: triggers of bad data RSSI threshold to
2006  *                                     roam
2007  * @roam_data_rssi_threshold: Bad data RSSI threshold to roam
2008  * @rx_data_inactivity_time: Rx duration to check data RSSI
2009  * @adaptive_roamscan_dwell_mode: Sets dwell time adaptive mode
2010  * @per_roam_enable: To enabled/disable PER based roaming in FW
2011  * @per_roam_config_high_rate_th: Rate at which PER based roam will stop
2012  * @per_roam_config_low_rate_th: Rate at which PER based roam will start
2013  * @per_roam_config_rate_th_percent:Percentage at which FW will issue roam scan
2014  * @per_roam_rest_time: FW will wait once it issues a roam scan.
2015  * @per_roam_monitor_time: Min time to be considered as valid scenario
2016  * @per_roam_min_candidate_rssi: Min roamable AP RSSI for candidate selection
2017  * @lfr3_disallow_duration: Disallow duration before roaming
2018  * @lfr3_rssi_channel_penalization: RSSI penalization
2019  * @lfr3_num_disallowed_aps: Max number of AP's to maintain in LCA list
2020  * @rssi_boost_threshold_5g: Boost threshold above which 5 GHz is favored
2021  * @rssi_boost_factor_5g: Factor by which 5GHz RSSI is boosted
2022  * @max_rssi_boost_5g: Maximum boost that can be applied to 5G RSSI
2023  * @rssi_penalize_threshold_5g: Penalize thres above which 5G isn't favored
2024  * @rssi_penalize_factor_5g: Factor by which 5GHz RSSI is penalizeed
2025  * @max_rssi_penalize_5g: Max penalty that can be applied to 5G RSSI
2026  * @max_num_pre_auth: Configure max number of pre-auth
2027  * @roam_preauth_retry_count: Configure the max number of preauth retry
2028  * @roam_preauth_no_ack_timeout: Configure the no ack timeout period
2029  * @roam_rssi_diff: Enable roam based on rssi
2030  * @roam_rssi_diff_6ghz: RSSI diff value to be used for roaming to 6 GHz AP.
2031  * @bg_rssi_threshold: Background RSSI threshold
2032  * @roam_scan_offload_enabled: Enable Roam Scan Offload
2033  * @neighbor_scan_timer_period: Neighbor scan timer period
2034  * @neighbor_scan_min_timer_period: Min neighbor scan timer period
2035  * @neighbor_lookup_rssi_threshold: Neighbor lookup rssi threshold
2036  * @opportunistic_scan_threshold_diff: Set oppurtunistic threshold diff
2037  * @roam_rescan_rssi_diff: Sets RSSI for Scan trigger in firmware
2038  * @neighbor_scan_min_chan_time: Neighbor scan channel min time
2039  * @neighbor_scan_max_chan_time: Neighbor scan channel max time
2040  * @passive_max_channel_time: Passive scan channel max time
2041  * @neighbor_scan_results_refresh_period: Neighbor scan refresh period
2042  * @empty_scan_refresh_period: Empty scan refresh period
2043  * @roam_bmiss_first_bcnt: First beacon miss count
2044  * @roam_bmiss_final_bcnt: Final beacon miss count
2045  * @roam_beacon_rssi_weight: Beacon miss weight
2046  * @roaming_dfs_channel: Allow dfs channel in roam
2047  * @roam_scan_hi_rssi_maxcount: 5GHz maximum scan count
2048  * @roam_scan_hi_rssi_delta: RSSI Delta for scan trigger
2049  * @roam_scan_hi_rssi_delay: Minimum delay between 5GHz scans
2050  * @roam_scan_hi_rssi_ub: Upper bound after which 5GHz scan
2051  * @roam_prefer_5ghz: Prefer roaming to 5GHz Bss
2052  * @roam_intra_band: Prefer roaming within Band
2053  * @enable_adaptive_11r: Flag to check if adaptive 11r ini is enabled
2054  * @tgt_adaptive_11r_cap: Flag to check if target supports adaptive 11r
2055  * @enable_ft_im_roaming: Flag to enable/disable FT-IM roaming
2056  * @roam_scan_home_away_time: The home away time to firmware
2057  * @roam_scan_n_probes: The number of probes to be sent for firmware roaming
2058  * @delay_before_vdev_stop: Wait time for tx complete before vdev stop
2059  * @neighbor_scan_channel_list: Neighbor scan channel list
2060  * @neighbor_scan_channel_list_num: Neighbor scan channel list number
2061  * @enable_lfr_subnet_detection: Enable LFR3 subnet detection
2062  * @ho_delay_for_rx: Delay hand-off by this duration to receive
2063  * @min_delay_btw_roam_scans: Min duration
2064  * @roam_trigger_reason_bitmask: Contains roam_trigger_reasons
2065  * @enable_ftopen: Enable/disable FT open feature
2066  * @roam_force_rssi_trigger: Force RSSI trigger or not
2067  * @bss_load_trig: configuration of BSS load roam trigger
2068  * @roaming_scan_policy: Config roaming scan policy in fw
2069  * @roam_scan_inactivity_time: Device inactivity monitoring time in
2070  * milliseconds for which the device is considered to be inactive.
2071  * @roam_inactive_data_packet_count: Maximum allowed data packets count
2072  * during roam_scan_inactivity_time.
2073  * @fw_akm_bitmap: Supported Akm suites of firmware
2074  * @roam_full_scan_period: Idle period in seconds between two successive
2075  * full channel roam scans
2076  * @saved_freq_list: Valid channel list
2077  * @sae_single_pmk_feature_enabled: Contains value of ini
2078  * sae_single_pmk_feature_enabled
2079  * @rso_user_config: RSO user config
2080  * @enable_ft_over_ds: Enable FT over DS
2081  * @beaconloss_timeout_onwakeup: time in sec to configure FW BMISS event
2082  * during wakeup.
2083  * @beaconloss_timeout_onsleep: time in sec to configure FW BMISS event
2084  * during sleep.
2085  * @roam_ho_delay_config: Roam HO delay value
2086  * @exclude_rm_partial_scan_freq: Exclude the channels in roam full scan that
2087  * are already scanned as part of partial scan.
2088  * @roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full scan
2089  * only on prior discovery of any 6 GHz support in the environment.
2090  * @disconnect_on_nud_roam_invoke_fail: indicate whether disconnect ap when
2091  * roam invoke fail on nud.
2092  * @hs20_btm_offload_disable: indicate whether btm offload is enable/disable
2093  * for Hotspot 2.0
2094  */
2095 struct wlan_mlme_lfr_cfg {
2096 	bool mawc_roam_enabled;
2097 	bool enable_fast_roam_in_concurrency;
2098 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
2099 	struct wlan_cm_roam_vendor_btm_params vendor_btm_param;
2100 	struct wlan_cm_roam_rt_stats roam_rt_stats;
2101 	bool lfr3_roaming_offload;
2102 	bool lfr3_dual_sta_roaming_enabled;
2103 	bool enable_self_bss_roam;
2104 	bool enable_disconnect_roam_offload;
2105 	bool enable_idle_roam;
2106 	uint32_t idle_roam_rssi_delta;
2107 	uint32_t idle_roam_inactive_time;
2108 	uint32_t idle_data_packet_count;
2109 	uint32_t idle_roam_band;
2110 	int32_t idle_roam_min_rssi;
2111 	bool enable_roam_reason_vsie;
2112 	uint32_t roam_trigger_bitmap;
2113 	uint32_t sta_roam_disable;
2114 	uint32_t roam_info_stats_num;
2115 	uint8_t roam_high_rssi_delta;
2116 #endif
2117 	bool early_stop_scan_enable;
2118 	bool enable_5g_band_pref;
2119 #ifdef FEATURE_WLAN_ESE
2120 	bool ese_enabled;
2121 #endif
2122 	bool lfr_enabled;
2123 	bool mawc_enabled;
2124 	bool fast_transition_enabled;
2125 	bool wes_mode_enabled;
2126 	uint32_t mawc_roam_traffic_threshold;
2127 	uint32_t mawc_roam_ap_rssi_threshold;
2128 	uint8_t mawc_roam_rssi_high_adjust;
2129 	uint8_t mawc_roam_rssi_low_adjust;
2130 	uint32_t roam_rssi_abs_threshold;
2131 	uint8_t rssi_threshold_offset_5g;
2132 	int8_t early_stop_scan_min_threshold;
2133 	int8_t early_stop_scan_max_threshold;
2134 	uint32_t roam_dense_traffic_threshold;
2135 	uint32_t roam_dense_rssi_thre_offset;
2136 	uint32_t roam_dense_min_aps;
2137 	uint32_t roam_bg_scan_bad_rssi_threshold;
2138 	uint32_t roam_bg_scan_client_bitmap;
2139 	uint32_t roam_bg_scan_bad_rssi_offset_2g;
2140 	uint32_t roam_data_rssi_threshold_triggers;
2141 	int32_t roam_data_rssi_threshold;
2142 	uint32_t rx_data_inactivity_time;
2143 	uint32_t adaptive_roamscan_dwell_mode;
2144 	uint32_t per_roam_enable;
2145 	uint32_t per_roam_config_high_rate_th;
2146 	uint32_t per_roam_config_low_rate_th;
2147 	uint32_t per_roam_config_rate_th_percent;
2148 	uint32_t per_roam_rest_time;
2149 	uint32_t per_roam_monitor_time;
2150 	uint32_t per_roam_min_candidate_rssi;
2151 	uint32_t lfr3_disallow_duration;
2152 	uint32_t lfr3_rssi_channel_penalization;
2153 	uint32_t lfr3_num_disallowed_aps;
2154 	uint32_t rssi_boost_threshold_5g;
2155 	uint32_t rssi_boost_factor_5g;
2156 	uint32_t max_rssi_boost_5g;
2157 	uint32_t rssi_penalize_threshold_5g;
2158 	uint32_t rssi_penalize_factor_5g;
2159 	uint32_t max_rssi_penalize_5g;
2160 	uint32_t max_num_pre_auth;
2161 	uint32_t roam_preauth_retry_count;
2162 	uint32_t roam_preauth_no_ack_timeout;
2163 	uint8_t roam_rssi_diff;
2164 	uint8_t roam_rssi_diff_6ghz;
2165 	uint8_t bg_rssi_threshold;
2166 	bool roam_scan_offload_enabled;
2167 	uint32_t neighbor_scan_timer_period;
2168 	uint32_t neighbor_scan_min_timer_period;
2169 	uint32_t neighbor_lookup_rssi_threshold;
2170 	uint32_t opportunistic_scan_threshold_diff;
2171 	uint32_t roam_rescan_rssi_diff;
2172 	uint16_t neighbor_scan_min_chan_time;
2173 	uint16_t neighbor_scan_max_chan_time;
2174 	uint32_t passive_max_channel_time;
2175 	uint32_t neighbor_scan_results_refresh_period;
2176 	uint32_t empty_scan_refresh_period;
2177 	uint8_t roam_bmiss_first_bcnt;
2178 	uint8_t roam_bmiss_final_bcnt;
2179 	enum roaming_dfs_channel_type roaming_dfs_channel;
2180 	uint32_t roam_scan_hi_rssi_maxcount;
2181 	uint32_t roam_scan_hi_rssi_delta;
2182 	uint32_t roam_scan_hi_rssi_delay;
2183 	uint32_t roam_scan_hi_rssi_ub;
2184 	bool roam_prefer_5ghz;
2185 	bool roam_intra_band;
2186 #ifdef WLAN_ADAPTIVE_11R
2187 	bool enable_adaptive_11r;
2188 	bool tgt_adaptive_11r_cap;
2189 #endif
2190 	bool enable_ft_im_roaming;
2191 	uint16_t roam_scan_home_away_time;
2192 	uint32_t roam_scan_n_probes;
2193 	uint8_t delay_before_vdev_stop;
2194 	uint8_t neighbor_scan_channel_list[CFG_VALID_CHANNEL_LIST_LEN];
2195 	uint8_t neighbor_scan_channel_list_num;
2196 #ifdef FEATURE_LFR_SUBNET_DETECTION
2197 	bool enable_lfr_subnet_detection;
2198 #endif
2199 	uint8_t ho_delay_for_rx;
2200 	uint8_t min_delay_btw_roam_scans;
2201 	uint32_t roam_trigger_reason_bitmask;
2202 	bool enable_ftopen;
2203 	bool roam_force_rssi_trigger;
2204 	struct bss_load_trigger bss_load_trig;
2205 	bool roaming_scan_policy;
2206 	uint32_t roam_scan_inactivity_time;
2207 	uint32_t roam_inactive_data_packet_count;
2208 	uint32_t fw_akm_bitmap;
2209 	uint32_t roam_full_scan_period;
2210 	struct fw_scan_channels saved_freq_list;
2211 #if defined(WLAN_SAE_SINGLE_PMK) && defined(WLAN_FEATURE_ROAM_OFFLOAD)
2212 	bool sae_single_pmk_feature_enabled;
2213 #endif
2214 	struct rso_config_params rso_user_config;
2215 	bool enable_ft_over_ds;
2216 	uint8_t beaconloss_timeout_onwakeup;
2217 	uint8_t beaconloss_timeout_onsleep;
2218 	uint16_t roam_ho_delay_config;
2219 	uint8_t exclude_rm_partial_scan_freq;
2220 	uint8_t roam_full_scan_6ghz_on_disc;
2221 	bool disconnect_on_nud_roam_invoke_fail;
2222 	bool hs20_btm_offload_disable;
2223 };
2224 
2225 /**
2226  * struct wlan_mlme_wmm_config - WMM configuration
2227  * @wmm_mode: Enable WMM feature
2228  * @b80211e_is_enabled: Enable 802.11e feature
2229  * @uapsd_mask: what ACs to setup U-APSD for at assoc
2230  */
2231 struct wlan_mlme_wmm_config {
2232 	uint8_t wmm_mode;
2233 	bool b80211e_is_enabled;
2234 	uint8_t uapsd_mask;
2235 };
2236 
2237 /**
2238  * struct wlan_mlme_wmm_tspec_element - Default TSPEC parameters
2239  * from the wmm spec
2240  * @inactivity_intv: inactivity_interval as per wmm spec
2241  * @burst_size_def: TS burst size
2242  * @ts_ack_policy: TS Info ACK policy
2243  * @ts_acm_is_off: ACM is off for AC
2244  */
2245 struct wlan_mlme_wmm_tspec_element {
2246 #ifdef FEATURE_WLAN_ESE
2247 	uint32_t inactivity_intv;
2248 #endif
2249 	bool burst_size_def;
2250 	enum mlme_ts_info_ack_policy ts_ack_policy;
2251 	bool ts_acm_is_off;
2252 };
2253 
2254 /**
2255  * struct wlan_mlme_wmm_ac_vo - Default TSPEC parameters
2256  * for AC_VO
2257  * @dir_ac_vo: TSPEC direction for VO
2258  * @nom_msdu_size_ac_vo: normal MSDU size for VO
2259  * @mean_data_rate_ac_vo: mean data rate for VO
2260  * @min_phy_rate_ac_vo: min PHY rate for VO
2261  * @sba_ac_vo: surplus bandwidth allowance for VO
2262  * @uapsd_vo_srv_intv: Uapsd service interval for voice
2263  * @uapsd_vo_sus_intv: Uapsd suspension interval for voice
2264  */
2265 struct wlan_mlme_wmm_ac_vo {
2266 	uint8_t dir_ac_vo;
2267 	uint16_t nom_msdu_size_ac_vo;
2268 	uint32_t mean_data_rate_ac_vo;
2269 	uint32_t min_phy_rate_ac_vo;
2270 	uint16_t sba_ac_vo;
2271 	uint32_t uapsd_vo_srv_intv;
2272 	uint32_t uapsd_vo_sus_intv;
2273 };
2274 
2275 /**
2276  * struct wlan_mlme_wmm_ac_vi - Default TSPEC parameters
2277  * for AC_VI
2278  * @dir_ac_vi: TSPEC direction for VI
2279  * @nom_msdu_size_ac_vi: normal MSDU size for VI
2280  * @mean_data_rate_ac_vi: mean data rate for VI
2281  * @min_phy_rate_ac_vi: min PHY rate for VI
2282  * @sba_ac_vi: surplus bandwidth allowance for VI
2283  * @uapsd_vi_srv_intv: Uapsd service interval for VI
2284  * @uapsd_vi_sus_intv: Uapsd suspension interval for VI
2285  */
2286 struct wlan_mlme_wmm_ac_vi {
2287 	uint8_t dir_ac_vi;
2288 	uint16_t nom_msdu_size_ac_vi;
2289 	uint32_t mean_data_rate_ac_vi;
2290 	uint32_t min_phy_rate_ac_vi;
2291 	uint16_t sba_ac_vi;
2292 	uint32_t uapsd_vi_srv_intv;
2293 	uint32_t uapsd_vi_sus_intv;
2294 };
2295 
2296 /**
2297  * struct wlan_mlme_wmm_ac_be - Default TSPEC parameters
2298  * for AC_BE
2299  * @dir_ac_be: TSPEC direction for BE
2300  * @nom_msdu_size_ac_be: normal MSDU size for BE
2301  * @mean_data_rate_ac_be: mean data rate for BE
2302  * @min_phy_rate_ac_be: min PHY rate for BE
2303  * @sba_ac_be: surplus bandwidth allowance for BE
2304  * @uapsd_be_srv_intv: Uapsd service interval for BE
2305  * @uapsd_be_sus_intv: Uapsd suspension interval for BE
2306  */
2307 struct wlan_mlme_wmm_ac_be {
2308 	uint8_t dir_ac_be;
2309 	uint16_t nom_msdu_size_ac_be;
2310 	uint32_t mean_data_rate_ac_be;
2311 	uint32_t min_phy_rate_ac_be;
2312 	uint16_t sba_ac_be;
2313 	uint32_t uapsd_be_srv_intv;
2314 	uint32_t uapsd_be_sus_intv;
2315 
2316 };
2317 
2318 /**
2319  * struct wlan_mlme_wmm_ac_bk - Default TSPEC parameters
2320  * for AC_BK
2321  * @dir_ac_bk: TSPEC direction for BK
2322  * @nom_msdu_size_ac_bk: normal MSDU size for BK
2323  * @mean_data_rate_ac_bk: mean data rate for BK
2324  * @min_phy_rate_ac_bk: min PHY rate for BK
2325  * @sba_ac_bk: surplus bandwidth allowance for BK
2326  * @uapsd_bk_srv_intv: Uapsd service interval for BK
2327  * @uapsd_bk_sus_intv: Uapsd suspension interval for BK
2328  */
2329 struct wlan_mlme_wmm_ac_bk {
2330 	uint8_t dir_ac_bk;
2331 	uint16_t nom_msdu_size_ac_bk;
2332 	uint32_t mean_data_rate_ac_bk;
2333 	uint32_t min_phy_rate_ac_bk;
2334 	uint16_t sba_ac_bk;
2335 	uint32_t uapsd_bk_srv_intv;
2336 	uint32_t uapsd_bk_sus_intv;
2337 };
2338 
2339 /**
2340  * struct wlan_mlme_wmm_params - WMM CFG Items
2341  * @qos_enabled: AP is enabled with 11E
2342  * @wme_enabled: AP is enabled with WMM
2343  * @max_sp_length: Maximum SP Length
2344  * @wsm_enabled: AP is enabled with WSM
2345  * @edca_profile: WMM Edca profile
2346  * @wmm_config: WMM configuration
2347  * @wmm_tspec_element: Default TSPEC parameters
2348  * @ac_vo: Default TSPEC parameters for AC_VO
2349  * @ac_vi: Default TSPEC parameters for AC_VI
2350  * @ac_be: Default TSPEC parameters for AC_BE
2351  * @ac_bk: Default TSPEC parameters for AC_BK
2352  * @delayed_trigger_frm_int: delay int(in ms) of UAPSD auto trigger
2353  */
2354 struct wlan_mlme_wmm_params {
2355 	bool qos_enabled;
2356 	bool wme_enabled;
2357 	uint8_t max_sp_length;
2358 	bool wsm_enabled;
2359 	uint32_t edca_profile;
2360 	struct wlan_mlme_wmm_config wmm_config;
2361 	struct wlan_mlme_wmm_tspec_element wmm_tspec_element;
2362 	struct wlan_mlme_wmm_ac_vo ac_vo;
2363 	struct wlan_mlme_wmm_ac_vi ac_vi;
2364 	struct wlan_mlme_wmm_ac_be ac_be;
2365 	struct wlan_mlme_wmm_ac_bk ac_bk;
2366 	uint32_t delayed_trigger_frm_int;
2367 };
2368 
2369 /**
2370  * struct wlan_mlme_weight_config - weight params to
2371  * calculate best candidate
2372  * @rssi_weightage: RSSI weightage
2373  * @ht_caps_weightage: HT caps weightage
2374  * @vht_caps_weightage: VHT caps weightage
2375  * @he_caps_weightage: HE caps weightage
2376  * @chan_width_weightage: Channel width weightage
2377  * @chan_band_weightage: Channel band weightage
2378  * @nss_weightage: NSS weightage
2379  * @beamforming_cap_weightage: Beamforming caps weightage
2380  * @pcl_weightage: PCL weightage
2381  * @channel_congestion_weightage: channel congestion weightage
2382  * @oce_wan_weightage: OCE WAN metrics weightage
2383  * @oce_ap_tx_pwr_weightage: weightage based on ap tx power
2384  * @oce_subnet_id_weightage: weightage based on subnet id
2385  * @sae_pk_ap_weightage:SAE-PK AP weightage
2386  */
2387 struct  wlan_mlme_weight_config {
2388 	uint8_t rssi_weightage;
2389 	uint8_t ht_caps_weightage;
2390 	uint8_t vht_caps_weightage;
2391 	uint8_t he_caps_weightage;
2392 	uint8_t chan_width_weightage;
2393 	uint8_t chan_band_weightage;
2394 	uint8_t nss_weightage;
2395 	uint8_t beamforming_cap_weightage;
2396 	uint8_t pcl_weightage;
2397 	uint8_t channel_congestion_weightage;
2398 	uint8_t oce_wan_weightage;
2399 	uint8_t oce_ap_tx_pwr_weightage;
2400 	uint8_t oce_subnet_id_weightage;
2401 	uint8_t sae_pk_ap_weightage;
2402 };
2403 
2404 /**
2405  * struct wlan_mlme_rssi_cfg_score - RSSI params to
2406  * calculate best candidate
2407  * @best_rssi_threshold: Best RSSI threshold
2408  * @good_rssi_threshold: Good RSSI threshold
2409  * @bad_rssi_threshold: Bad RSSI threshold
2410  * @good_rssi_pcnt: Good RSSI Percentage
2411  * @bad_rssi_pcnt: Bad RSSI Percentage
2412  * @good_rssi_bucket_size: Good RSSI Bucket Size
2413  * @bad_rssi_bucket_size: Bad RSSI Bucket Size
2414  * @rssi_pref_5g_rssi_thresh: Preferred 5G RSSI threshold
2415  */
2416 struct wlan_mlme_rssi_cfg_score  {
2417 	uint32_t best_rssi_threshold;
2418 	uint32_t good_rssi_threshold;
2419 	uint32_t bad_rssi_threshold;
2420 	uint32_t good_rssi_pcnt;
2421 	uint32_t bad_rssi_pcnt;
2422 	uint32_t good_rssi_bucket_size;
2423 	uint32_t bad_rssi_bucket_size;
2424 	uint32_t rssi_pref_5g_rssi_thresh;
2425 };
2426 
2427 /**
2428  * struct wlan_mlme_roam_scoring_cfg - MLME roam related scoring config
2429  * @enable_scoring_for_roam: Enable/disable BSS Scoring for Roaming
2430  * @roam_trigger_bitmap: bitmap for various roam triggers
2431  * @roam_score_delta: percentage delta in roam score
2432  * @apsd_enabled: Enable automatic power save delivery
2433  * @min_roam_score_delta: Minimum difference between connected AP's and
2434  *			candidate AP's roam score to start roaming.
2435  */
2436 struct wlan_mlme_roam_scoring_cfg {
2437 	bool enable_scoring_for_roam;
2438 	uint32_t roam_trigger_bitmap;
2439 	uint32_t roam_score_delta;
2440 	bool apsd_enabled;
2441 	uint32_t min_roam_score_delta;
2442 };
2443 
2444 /* struct wlan_mlme_threshold - Threshold related config items
2445  * @rts_threshold: set rts threshold
2446  * @frag_threshold: set fragmentation threshold
2447  */
2448 struct wlan_mlme_threshold {
2449 	uint32_t rts_threshold;
2450 	uint32_t frag_threshold;
2451 };
2452 
2453 /* struct mlme_max_tx_power_24 - power related items
2454  * @max_len: max length of string
2455  * @len: actual len of string
2456  * @data: Data in string format
2457  */
2458 struct mlme_max_tx_power_24 {
2459 	qdf_size_t max_len;
2460 	qdf_size_t len;
2461 	uint8_t data[CFG_MAX_TX_POWER_2_4_LEN];
2462 };
2463 
2464 /* struct mlme_max_tx_power_5 - power related items
2465  * @max_len: max length of string
2466  * @len: actual len of string
2467  * @data: Data in string format
2468  */
2469 struct mlme_max_tx_power_5 {
2470 	qdf_size_t max_len;
2471 	qdf_size_t len;
2472 	uint8_t data[CFG_MAX_TX_POWER_5_LEN];
2473 };
2474 
2475 /* struct mlme_power_usage - power related items
2476  * @max_len: max length of string
2477  * @len: actual len of string
2478  * @data: Data in string format
2479  */
2480 struct mlme_power_usage {
2481 	qdf_size_t max_len;
2482 	qdf_size_t len;
2483 	char data[CFG_POWER_USAGE_MAX_LEN];
2484 };
2485 
2486 /**
2487  * struct wlan_mlme_power - power related config items
2488  * @max_tx_power_24: max power Tx for 2.4 ghz, this is based on frequencies
2489  * @max_tx_power_5: max power Tx for 5 ghz, this is based on frequencies
2490  * @max_tx_power_24_chan: max power Tx for 2.4 ghz, this is based on channel
2491  * numbers, this is added to parse the ini values to maintain the backward
2492  * compatibility, these channel numbers are converted to frequencies and copied
2493  * to max_tx_power_24 structure, once this conversion is done this structure
2494  * should not be used.
2495  * @max_tx_power_5_chan: max power Tx for 5 ghz, this is based on channel
2496  * numbers, this is added to parse the ini values to maintain the backward
2497  * compatibility, these channel numbers are converted to frequencies and copied
2498  * to max_tx_power_24 structure, once this conversion is done this structure
2499  * should not be used.
2500  * @power_usage: power usage mode, min, max, mod
2501  * @tx_power_2g: limit tx power in 2.4 ghz
2502  * @tx_power_5g: limit tx power in 5 ghz
2503  * @current_tx_power_level: current tx power level
2504  * @local_power_constraint: local power constraint
2505  * @skip_tpe: option to not consider TPE values in 2.4G/5G bands
2506  */
2507 struct wlan_mlme_power {
2508 	struct mlme_max_tx_power_24 max_tx_power_24;
2509 	struct mlme_max_tx_power_5 max_tx_power_5;
2510 	struct mlme_max_tx_power_24 max_tx_power_24_chan;
2511 	struct mlme_max_tx_power_5 max_tx_power_5_chan;
2512 	struct mlme_power_usage power_usage;
2513 	uint8_t tx_power_2g;
2514 	uint8_t tx_power_5g;
2515 	uint8_t current_tx_power_level;
2516 	uint8_t local_power_constraint;
2517 	bool skip_tpe;
2518 };
2519 
2520 /**
2521  * struct wlan_mlme_timeout - mlme timeout related config items
2522  * @join_failure_timeout: join failure timeout (can be changed in connect req)
2523  * @probe_req_retry_timeout: Probe req retry timeout during join time
2524  * @join_failure_timeout_ori: original value of above join timeout
2525  * @auth_failure_timeout: authenticate failure timeout
2526  * @auth_rsp_timeout: authenticate response timeout
2527  * @assoc_failure_timeout: assoc failure timeout
2528  * @reassoc_failure_timeout: re-assoc failure timeout
2529  * @olbc_detect_timeout: OLBC detect timeout
2530  * @addts_rsp_timeout: ADDTS rsp timeout value
2531  * @heart_beat_threshold: Heart beat threshold
2532  * @ap_keep_alive_timeout: AP keep alive timeout value
2533  * @ap_link_monitor_timeout: AP link monitor timeout value
2534  * @wmi_wq_watchdog_timeout: timeout period for wmi watchdog bite
2535  * @sae_auth_failure_timeout: SAE authentication failure timeout
2536  */
2537 struct wlan_mlme_timeout {
2538 	uint32_t join_failure_timeout;
2539 	uint32_t probe_req_retry_timeout;
2540 	uint32_t join_failure_timeout_ori;
2541 	uint32_t auth_failure_timeout;
2542 	uint32_t auth_rsp_timeout;
2543 	uint32_t assoc_failure_timeout;
2544 	uint32_t reassoc_failure_timeout;
2545 	uint32_t olbc_detect_timeout;
2546 	uint32_t addts_rsp_timeout;
2547 	uint32_t heart_beat_threshold;
2548 	uint32_t ap_keep_alive_timeout;
2549 	uint32_t ap_link_monitor_timeout;
2550 	uint32_t wmi_wq_watchdog_timeout;
2551 	uint32_t sae_auth_failure_timeout;
2552 };
2553 
2554 /**
2555  * struct wlan_mlme_oce - OCE related config items
2556  * @enable_bcast_probe_rsp: enable broadcast probe response
2557  * @oce_sta_enabled: enable/disable oce feature for sta
2558  * @oce_sap_enabled: enable/disable oce feature for sap
2559  * @fils_enabled: enable/disable fils support
2560  * @feature_bitmap: oce feature bitmap
2561  *
2562  */
2563 struct wlan_mlme_oce {
2564 	bool enable_bcast_probe_rsp;
2565 	bool oce_sta_enabled;
2566 	bool oce_sap_enabled;
2567 	bool fils_enabled;
2568 	uint8_t feature_bitmap;
2569 };
2570 
2571 /**
2572  * enum wep_key_id  - values passed to get/set wep default keys
2573  * @MLME_WEP_DEFAULT_KEY_1: wep default key 1
2574  * @MLME_WEP_DEFAULT_KEY_2: wep default key 2
2575  * @MLME_WEP_DEFAULT_KEY_3: wep default key 3
2576  * @MLME_WEP_DEFAULT_KEY_4: wep default key 4
2577  */
2578 enum wep_key_id {
2579 	MLME_WEP_DEFAULT_KEY_1 = 0,
2580 	MLME_WEP_DEFAULT_KEY_2,
2581 	MLME_WEP_DEFAULT_KEY_3,
2582 	MLME_WEP_DEFAULT_KEY_4
2583 };
2584 
2585 /**
2586  * struct wlan_mlme_wep_cfg - WEP related configs
2587  * @is_privacy_enabled:     Flag to check if encryption is enabled
2588  * @is_shared_key_auth:     Flag to check if the auth type is shared key
2589  * @is_auth_open_system:    Flag to check if the auth type is open
2590  * @auth_type:              Authentication type value
2591  * @wep_default_key_id:     Default WEP key id
2592  */
2593 struct wlan_mlme_wep_cfg {
2594 	bool is_privacy_enabled;
2595 	bool is_shared_key_auth;
2596 	bool is_auth_open_system;
2597 	uint8_t auth_type;
2598 	uint8_t wep_default_key_id;
2599 };
2600 
2601 /**
2602  * struct wlan_mlme_wifi_pos_cfg - WIFI POS configs
2603  * @fine_time_meas_cap: fine timing measurement capability information
2604  * @oem_6g_support_disable: oem is 6Ghz disabled if set
2605  */
2606 struct wlan_mlme_wifi_pos_cfg {
2607 	uint32_t fine_time_meas_cap;
2608 	bool oem_6g_support_disable;
2609 };
2610 
2611 #define MLME_SET_BIT(value, bit_offset) ((value) |= (1 << (bit_offset)))
2612 #define MLME_CLEAR_BIT(value, bit_offset) ((value) &= ~(1 << (bit_offset)))
2613 
2614 /* Mask to check if BTM offload is enabled/disabled*/
2615 #define BTM_OFFLOAD_ENABLED_MASK    0x01
2616 
2617 #define BTM_OFFLOAD_CONFIG_BIT_0    0
2618 #define BTM_OFFLOAD_CONFIG_BIT_8    8
2619 #define BTM_OFFLOAD_CONFIG_BIT_7    7
2620 
2621 /**
2622  * struct wlan_mlme_btm - BTM related configs
2623  * @prefer_btm_query: flag to prefer btm query over 11k
2624  * @abridge_flag: set this flag to enable firmware to sort candidates based on
2625  * roam score rather than selecting preferred APs.
2626  * @btm_offload_config: configure btm offload
2627  * @btm_solicited_timeout: configure timeout value for waiting BTM request
2628  * @btm_max_attempt_cnt: configure maximum attempt for sending BTM query to ESS
2629  * @btm_sticky_time: configure Stick time after roaming to new AP by BTM
2630  * @rct_validity_timer: Timeout values for roam cache table entries
2631  * @disassoc_timer_threshold: Disassociation timeout till which roam scan need
2632  * not be triggered
2633  * @btm_query_bitmask: Bitmask to send BTM query with candidate list on
2634  * various roam
2635  * @btm_trig_min_candidate_score: Minimum score to consider the AP as candidate
2636  * when the roam trigger is BTM.
2637  */
2638 struct wlan_mlme_btm {
2639 	bool prefer_btm_query;
2640 	bool abridge_flag;
2641 	uint32_t btm_offload_config;
2642 	uint32_t btm_solicited_timeout;
2643 	uint32_t btm_max_attempt_cnt;
2644 	uint32_t btm_sticky_time;
2645 	uint32_t rct_validity_timer;
2646 	uint32_t disassoc_timer_threshold;
2647 	uint32_t btm_query_bitmask;
2648 	uint32_t btm_trig_min_candidate_score;
2649 };
2650 
2651 /**
2652  * struct wlan_mlme_fe_wlm - WLM related configs
2653  * @latency_enable: Flag to check if latency is enabled
2654  * @latency_reset: Flag to check if latency reset is enabled
2655  * @latency_level: WLM latency level
2656  * @latency_flags: WLM latency flags setting
2657  * @latency_host_flags: WLM latency host flags setting
2658  * @multi_client_ll_support: To check whether host support multi client feature
2659  */
2660 struct wlan_mlme_fe_wlm {
2661 	bool latency_enable;
2662 	bool latency_reset;
2663 	uint8_t latency_level;
2664 	uint32_t latency_flags[MLME_NUM_WLM_LATENCY_LEVEL];
2665 	uint32_t latency_host_flags[MLME_NUM_WLM_LATENCY_LEVEL];
2666 #ifdef MULTI_CLIENT_LL_SUPPORT
2667 	bool multi_client_ll_support;
2668 #endif
2669 };
2670 
2671 /**
2672  * struct wlan_mlme_fe_rrm - RRM related configs
2673  * @rrm_enabled: Flag to check if RRM is enabled for STA
2674  * @sap_rrm_enabled: Flag to check if RRM is enabled for SAP
2675  * @rrm_rand_interval: RRM randomization interval
2676  * @rm_capability: RM enabled capabilities IE
2677  */
2678 struct wlan_mlme_fe_rrm {
2679 	bool rrm_enabled;
2680 	bool sap_rrm_enabled;
2681 	uint8_t rrm_rand_interval;
2682 	uint8_t rm_capability[MLME_RMENABLEDCAP_MAX_LEN];
2683 };
2684 
2685 #ifdef MWS_COEX
2686 /**
2687  * struct wlan_mlme_mwc - MWC related configs
2688  * @mws_coex_4g_quick_tdm:  bitmap to set mws-coex 5g-nr power limit
2689  * @mws_coex_5g_nr_pwr_limit: bitmap to set mws-coex 5g-nr power limit
2690  * @mws_coex_pcc_channel_avoid_delay: PCC avoidance delay in seconds
2691  * @mws_coex_scc_channel_avoid_delay: SCC avoidance delay in seconds
2692  **/
2693 struct wlan_mlme_mwc {
2694 	uint32_t mws_coex_4g_quick_tdm;
2695 	uint32_t mws_coex_5g_nr_pwr_limit;
2696 	uint32_t mws_coex_pcc_channel_avoid_delay;
2697 	uint32_t mws_coex_scc_channel_avoid_delay;
2698 };
2699 #else
2700 struct wlan_mlme_mwc {
2701 };
2702 #endif
2703 
2704 /**
2705  * enum mlme_reg_srd_master_modes  - Bitmap of SRD master modes supported
2706  * @MLME_SRD_MASTER_MODE_SAP: SRD master mode for SAP
2707  * @MLME_SRD_MASTER_MODE_P2P_GO: SRD master mode for P2P-GO
2708  * @MLME_SRD_MASTER_MODE_NAN: SRD master mode for NAN
2709  */
2710 enum mlme_reg_srd_master_modes {
2711 	MLME_SRD_MASTER_MODE_SAP = 1,
2712 	MLME_SRD_MASTER_MODE_P2P_GO = 2,
2713 	MLME_SRD_MASTER_MODE_NAN = 4,
2714 };
2715 
2716 /**
2717  * struct wlan_mlme_reg - REG related configs
2718  * @self_gen_frm_pwr: self-generated frame power in tx chain mask
2719  * for CCK rates
2720  * @etsi_srd_chan_in_master_mode: etsi srd chan in master mode
2721  * @fcc_5dot9_ghz_chan_in_master_mode: fcc 5.9 GHz chan in master mode
2722  * @restart_beaconing_on_ch_avoid: restart beaconing on ch avoid
2723  * @indoor_channel_support: indoor channel support
2724  * @scan_11d_interval: scan 11d interval
2725  * @valid_channel_freq_list: array for valid channel list
2726  * @valid_channel_list_num: valid channel list number
2727  * @enable_11d_in_world_mode: Whether to enable 11d scan in world mode or not
2728  * @avoid_acs_freq_list: List of the frequencies which need to be avoided
2729  * during acs
2730  * @avoid_acs_freq_list_num: Number of the frequencies to be avoided during acs
2731  * @ignore_fw_reg_offload_ind: Ignore fw regulatory offload indication
2732  * @enable_pending_chan_list_req: enables/disables scan channel
2733  * list command to FW till the current scan is complete.
2734  * @retain_nol_across_regdmn_update: Retain the NOL list across the regdomain.
2735  * @enable_nan_on_indoor_channels: Enable nan on Indoor channels
2736  * @enable_6ghz_sp_pwrmode_supp: Enable 6 GHz SP mode support
2737  * @afc_disable_timer_check: Disable AFC timer check
2738  * @afc_disable_request_id_check: Disable AFC request id check
2739  * @is_afc_reg_noaction: Whether no action to AFC power event
2740  * @coex_unsafe_chan_nb_user_prefer: Honor coex unsafe freq event from firmware
2741  * or not
2742  * @coex_unsafe_chan_reg_disable: To disable reg channels for received coex
2743  * unsafe channels list
2744  */
2745 struct wlan_mlme_reg {
2746 	uint32_t self_gen_frm_pwr;
2747 	uint8_t etsi_srd_chan_in_master_mode;
2748 	bool fcc_5dot9_ghz_chan_in_master_mode;
2749 	enum restart_beaconing_on_ch_avoid_rule
2750 		restart_beaconing_on_ch_avoid;
2751 	bool indoor_channel_support;
2752 	uint32_t scan_11d_interval;
2753 	uint32_t valid_channel_freq_list[CFG_VALID_CHANNEL_LIST_LEN];
2754 	uint32_t valid_channel_list_num;
2755 	bool enable_11d_in_world_mode;
2756 #ifdef SAP_AVOID_ACS_FREQ_LIST
2757 	uint16_t avoid_acs_freq_list[CFG_VALID_CHANNEL_LIST_LEN];
2758 	uint8_t avoid_acs_freq_list_num;
2759 #endif
2760 	bool ignore_fw_reg_offload_ind;
2761 	bool enable_pending_chan_list_req;
2762 	bool retain_nol_across_regdmn_update;
2763 	bool enable_nan_on_indoor_channels;
2764 #if defined(CONFIG_AFC_SUPPORT) && defined(CONFIG_BAND_6GHZ)
2765 	bool enable_6ghz_sp_pwrmode_supp;
2766 	bool afc_disable_timer_check;
2767 	bool afc_disable_request_id_check;
2768 	bool is_afc_reg_noaction;
2769 #endif
2770 #ifdef FEATURE_WLAN_CH_AVOID_EXT
2771 	uint32_t coex_unsafe_chan_nb_user_prefer;
2772 	bool coex_unsafe_chan_reg_disable;
2773 #endif
2774 };
2775 
2776 #define IOT_AGGR_INFO_MAX_NUM 32
2777 
2778 /**
2779  * struct wlan_iot_aggr - IOT related AGGR rule
2780  *
2781  * @oui: OUI for the rule
2782  * @oui_len: length of the OUI
2783  * @ampdu_sz: max aggregation size in no. of MPDUs
2784  * @amsdu_sz: max aggregation size in no. of MSDUs
2785  */
2786 struct wlan_iot_aggr {
2787 	uint8_t oui[OUI_LENGTH];
2788 	uint32_t oui_len;
2789 	uint32_t ampdu_sz;
2790 	uint32_t amsdu_sz;
2791 };
2792 
2793 /**
2794  * struct wlan_mlme_iot - IOT related CFG Items
2795  *
2796  * @aggr: aggr rules
2797  * @aggr_num: number of the configured aggr rules
2798  */
2799 struct wlan_mlme_iot {
2800 	struct wlan_iot_aggr aggr[IOT_AGGR_INFO_MAX_NUM];
2801 	uint32_t aggr_num;
2802 };
2803 
2804 /**
2805  * struct wlan_mlme_cfg - MLME config items
2806  * @chainmask_cfg: VHT chainmask related cfg items
2807  * @edca_params: edca related CFG items
2808  * @gen: Generic CFG items
2809  * @ht_caps: HT related CFG Items
2810  * @he_caps: HE related cfg items
2811  * @eht_caps: EHT related cfg items
2812  * @lfr: LFR related CFG Items
2813  * @ibss: IBSS related CFG items
2814  * @obss_ht40:obss ht40 CFG Items
2815  * @mbo_cfg: Multiband Operation related CFG items
2816  * @vht_caps: VHT related CFG Items
2817  * @qos_mlme_params: QOS CFG Items
2818  * @rates: Rates related cfg items
2819  * @product_details: product details related CFG Items
2820  * @dfs_cfg: DFS related CFG Items
2821  * @sap_protection_cfg: SAP erp protection related CFG items
2822  * @sap_cfg: sap CFG items
2823  * @nss_chains_ini_cfg: Per vdev nss, chains related CFG items
2824  * @sta: sta CFG Items
2825  * @stats: stats CFG Items
2826  * @roam_scoring: BSS Scoring related CFG Items
2827  * @oce: OCE related CFG items
2828  * @threshold: threshold related cfg items
2829  * @timeouts: mlme timeout related CFG items
2830  * @twt_cfg: TWT CFG Items
2831  * @power: power related items
2832  * @acs: ACS related CFG items
2833  * @feature_flags: Feature flag config items
2834  * @ps_params: Powersave related ini configs
2835  * @wep_params:  WEP related config items
2836  * @wifi_pos_cfg: WIFI POS config
2837  * @wmm_params: WMM related CFG & INI Items
2838  * @wps_params: WPS related CFG itmes
2839  * @btm: BTM related CFG itmes
2840  * @wlm_config: WLM related CFG items
2841  * @rrm_config: RRM related CFG items
2842  * @mwc: MWC related CFG items
2843  * @dot11_mode: dot11 mode supported
2844  * @reg: REG related CFG itmes
2845  * @trig_score_delta: Roam score delta value for various roam triggers
2846  * @trig_min_rssi: Expected minimum RSSI value of candidate AP for
2847  * various roam triggers
2848  * @ratemask_cfg: ratemask configuration
2849  * @iot: IOT related CFG items
2850  * @connection_roaming_ini_flag: To indicate whether connection_roaming related
2851  * ini file is present or not.
2852  * @eml_cap: EML capability subfield present in ML IE common info
2853  * @dynamic_nss_chains_support : intersection of host and fw capability of
2854  *				 dynamic NSS chain support
2855  */
2856 struct wlan_mlme_cfg {
2857 	struct wlan_mlme_chainmask chainmask_cfg;
2858 	struct wlan_mlme_edca_params edca_params;
2859 	struct wlan_mlme_generic gen;
2860 	struct wlan_mlme_ht_caps ht_caps;
2861 #ifdef WLAN_FEATURE_11AX
2862 	struct wlan_mlme_he_caps he_caps;
2863 #endif
2864 #ifdef WLAN_FEATURE_11BE
2865 	struct wlan_mlme_eht_caps eht_caps;
2866 #endif
2867 	struct wlan_mlme_lfr_cfg lfr;
2868 	struct wlan_mlme_obss_ht40 obss_ht40;
2869 	struct wlan_mlme_mbo mbo_cfg;
2870 	struct wlan_mlme_vht_caps vht_caps;
2871 	struct wlan_mlme_qos qos_mlme_params;
2872 	struct wlan_mlme_rates rates;
2873 	struct wlan_mlme_product_details_cfg product_details;
2874 	struct wlan_mlme_dfs_cfg dfs_cfg;
2875 	struct wlan_mlme_sap_protection sap_protection_cfg;
2876 	struct wlan_mlme_cfg_sap sap_cfg;
2877 	struct wlan_mlme_nss_chains nss_chains_ini_cfg;
2878 	struct wlan_mlme_sta_cfg sta;
2879 	struct wlan_mlme_stats_cfg stats;
2880 	struct wlan_mlme_roam_scoring_cfg roam_scoring;
2881 	struct wlan_mlme_oce oce;
2882 	struct wlan_mlme_threshold threshold;
2883 	struct wlan_mlme_timeout timeouts;
2884 	struct wlan_mlme_cfg_twt twt_cfg;
2885 	struct wlan_mlme_power power;
2886 	struct wlan_mlme_acs acs;
2887 	struct wlan_mlme_feature_flag feature_flags;
2888 	struct wlan_mlme_powersave ps_params;
2889 	struct wlan_mlme_wep_cfg wep_params;
2890 	struct wlan_mlme_wifi_pos_cfg wifi_pos_cfg;
2891 	struct wlan_mlme_wmm_params wmm_params;
2892 	struct wlan_mlme_wps_params wps_params;
2893 	struct wlan_mlme_btm btm;
2894 	struct wlan_mlme_fe_wlm wlm_config;
2895 	struct wlan_mlme_fe_rrm rrm_config;
2896 	struct wlan_mlme_mwc mwc;
2897 	struct wlan_mlme_dot11_mode dot11_mode;
2898 	struct wlan_mlme_reg reg;
2899 	struct roam_trigger_score_delta trig_score_delta[NUM_OF_ROAM_TRIGGERS];
2900 	struct roam_trigger_min_rssi trig_min_rssi[NUM_OF_ROAM_MIN_RSSI];
2901 	struct wlan_mlme_ratemask ratemask_cfg;
2902 	struct wlan_mlme_iot iot;
2903 	bool connection_roaming_ini_flag;
2904 	struct wlan_mlme_eml_cap eml_cap;
2905 	bool dynamic_nss_chains_support;
2906 };
2907 
2908 /**
2909  * struct mlme_pmk_info - SAE Roaming using single pmk info
2910  * @pmk: pmk
2911  * @pmk_len: pmk length
2912  * @spmk_timeout_period: Time to generate new SPMK in seconds.
2913  * @spmk_timestamp: System timestamp at which the Single PMK entry was added.
2914  */
2915 struct mlme_pmk_info {
2916 	uint8_t pmk[CFG_MAX_PMK_LEN];
2917 	uint8_t pmk_len;
2918 	uint16_t spmk_timeout_period;
2919 	qdf_time_t spmk_timestamp;
2920 };
2921 
2922 /**
2923  * struct wlan_mlme_sae_single_pmk - SAE Roaming using single pmk configuration
2924  * structure
2925  * @sae_single_pmk_ap: Current connected AP has VSIE or not
2926  * @pmk_info: pmk information
2927  */
2928 struct wlan_mlme_sae_single_pmk {
2929 	bool sae_single_pmk_ap;
2930 	struct mlme_pmk_info pmk_info;
2931 };
2932 
2933 #define ROAM_FRAME_INFO_FRAME_TYPE_EXT 3
2934 /**
2935  * struct mlme_roam_debug_info - Roam debug information storage structure.
2936  * @trigger:            Roam trigger related data
2937  * @scan:               Roam scan related data structure.
2938  * @result:             Roam result parameters.
2939  * @data_11kv:          Neighbor report/BTM parameters.
2940  * @btm_rsp:            BTM response information
2941  * @roam_init_info:     Roam initial info
2942  * @roam_msg_info:      roam related message information
2943  * @frame_info:         Information related to mgmt/eapol frames exchanged
2944  *                      during roaming.
2945  */
2946 struct mlme_roam_debug_info {
2947 	struct wmi_roam_trigger_info trigger;
2948 	struct wmi_roam_scan_data scan;
2949 	struct wmi_roam_result result;
2950 	struct wmi_neighbor_report_data data_11kv;
2951 	struct roam_btm_response_data btm_rsp;
2952 	struct roam_initial_data roam_init_info;
2953 	struct roam_msg_info roam_msg_info;
2954 	struct roam_frame_info frame_info[WLAN_ROAM_MAX_FRAME_INFO];
2955 };
2956 
2957 /**
2958  * struct wlan_change_bi - Message struct to update beacon interval
2959  * @message_type: type of message
2960  * @length: length of message
2961  * @beacon_interval: beacon interval to update to (seconds)
2962  * @bssid: BSSID of vdev
2963  * @session_id: session ID of vdev
2964  */
2965 struct wlan_change_bi {
2966 	uint16_t message_type;
2967 	uint16_t length;
2968 	uint16_t beacon_interval;
2969 	struct qdf_mac_addr bssid;
2970 	uint8_t session_id;
2971 };
2972 
2973 #ifdef FEATURE_SET
2974 /**
2975  * enum wlan_mlme_iface_combinations - Iface combinations
2976  * @MLME_IFACE_STA_P2P_SUPPORT: STA + P2P concurrency bit
2977  * @MLME_IFACE_STA_SAP_SUPPORT: STA + SAP concurrency bit
2978  * @MLME_IFACE_STA_NAN_SUPPORT: STA + NAN concurrency bit
2979  * @MLME_IFACE_STA_TDLS_SUPPORT: STA + TDLS concurrency bit
2980  * @MLME_IFACE_STA_DUAL_P2P_SUPPORT: STA + P2P + P2P concurrency bit
2981  * @MLME_IFACE_STA_SAP_P2P_SUPPORT: STA + SAP + P2P concurrency bit
2982  * @MLME_IFACE_STA_SAP_NAN_SUPPORT: STA + SAP + NAN concurrency bit
2983  * @MLME_IFACE_STA_P2P_NAN_SUPPORT: STA + P2P + NAN concurrency bit
2984  * @MLME_IFACE_STA_P2P_TDLS_SUPPORT: STA + P2P + TDLS concurrency bit
2985  * @MLME_IFACE_STA_SAP_TDLS_SUPPORT: STA + SAP + TDLS concurrency bit
2986  * @MLME_IFACE_STA_NAN_TDLS_SUPPORT: STA + NAN + TDLS concurrency bit
2987  * @MLME_IFACE_STA_SAP_P2P_TDLS_SUPPORT: STA + SAP + P2P + TDLS concurrency bit
2988  * @MLME_IFACE_STA_SAP_NAN_TDLS_SUPPORT: STA + SAP + NAN + TDLS concurrency bit
2989  * @MLME_IFACE_STA_P2P_P2P_TDLS_SUPPORT: STA + P2P + P2P + TDLS concurrency bit
2990  * @MLME_IFACE_STA_P2P_NAN_TDLS_SUPPORT: STA + P2P + NAN + TDLS concurrency bit
2991  */
2992 enum wlan_mlme_iface_combinations {
2993 	MLME_IFACE_STA_P2P_SUPPORT = 0x1,
2994 	MLME_IFACE_STA_SAP_SUPPORT = 0x2,
2995 	MLME_IFACE_STA_NAN_SUPPORT = 0x4,
2996 	MLME_IFACE_STA_TDLS_SUPPORT = 0x8,
2997 	MLME_IFACE_STA_DUAL_P2P_SUPPORT = 0x10,
2998 	MLME_IFACE_STA_SAP_P2P_SUPPORT = 0x20,
2999 	MLME_IFACE_STA_SAP_NAN_SUPPORT = 0x40,
3000 	MLME_IFACE_STA_P2P_NAN_SUPPORT = 0x80,
3001 	MLME_IFACE_STA_P2P_TDLS_SUPPORT = 0x100,
3002 	MLME_IFACE_STA_SAP_TDLS_SUPPORT = 0x200,
3003 	MLME_IFACE_STA_NAN_TDLS_SUPPORT = 0x400,
3004 	MLME_IFACE_STA_SAP_P2P_TDLS_SUPPORT = 0x800,
3005 	MLME_IFACE_STA_SAP_NAN_TDLS_SUPPORT = 0x1000,
3006 	MLME_IFACE_STA_P2P_P2P_TDLS_SUPPORT = 0x2000,
3007 	MLME_IFACE_STA_P2P_NAN_TDLS_SUPPORT = 0x4000,
3008 };
3009 
3010 /**
3011  * struct wlan_mlme_features - Mlme feature set structure
3012  * @enable_wifi_optimizer: indicates wifi optimizer is enabled or disabled
3013  * @sap_max_num_clients: maximum number of SoftAP clients
3014  * @roaming_high_cu_roam_trigger: Roaming high CPU trigger enabled or disabled
3015  * @roaming_emergency_trigger: Roaming emergency trigger enabled or disabled
3016  * @roaming_btm_trihgger: Roaming btm trigger enabled or disabled
3017  * @roaming_idle_trigger: Roaming idle trigger enabled or disabled
3018  * @roaming_wtc_trigger: Roaming wtc trigger enabled or disabled
3019  * @roaming_btcoex_trigger: Roaming btcoex trigger enabled or disabled
3020  * @roaming_btw_wpa_wpa2: Roaming btw wpa wpa2 enabled or disabled
3021  * @roaming_manage_chan_list_api: Roaming manage chan list api enabled or
3022  * disabled
3023  * @roaming_adaptive_11r: Roaming adaptive 11r enabled or disabled
3024  * @roaming_ctrl_api_get_set: Roaming ctrl api get set enabled or disabled
3025  * @roaming_ctrl_api_reassoc: Roaming ctrl api reassoc enabled or disabled
3026  * @roaming_ctrl_get_cu: Roaming ctrl get cu enabled or disabled
3027  * @vendor_req_1_version: Vendor requirement version 1
3028  * @vendor_req_2_version: Vendor requirement version 2
3029  * @enable2x2: Enable 2x2
3030  * @iface_combinations: iface combination bitmask
3031  */
3032 struct wlan_mlme_features {
3033 	bool enable_wifi_optimizer;
3034 	uint8_t sap_max_num_clients;
3035 	bool roaming_high_cu_roam_trigger;
3036 	bool roaming_emergency_trigger;
3037 	bool roaming_btm_trihgger;
3038 	bool roaming_idle_trigger;
3039 	bool roaming_wtc_trigger;
3040 	bool roaming_btcoex_trigger;
3041 	bool roaming_btw_wpa_wpa2;
3042 	bool roaming_manage_chan_list_api;
3043 	bool roaming_adaptive_11r;
3044 	bool roaming_ctrl_api_get_set;
3045 	bool roaming_ctrl_api_reassoc;
3046 	bool roaming_ctrl_get_cu;
3047 	WMI_HOST_VENDOR1_REQ1_VERSION vendor_req_1_version;
3048 	WMI_HOST_VENDOR1_REQ2_VERSION vendor_req_2_version;
3049 	bool enable2x2;
3050 	uint32_t iface_combinations;
3051 };
3052 #endif
3053 
3054 /**
3055  * enum host_concurrent_ap_policy - Host concurrent AP policy value
3056  * @HOST_CONCURRENT_AP_POLICY_UNSPECIFIED: Unspecified concurrent policy value
3057  * @HOST_CONCURRENT_AP_POLICY_GAMING_AUDIO: Gaming audio concurrent policy value
3058  * @HOST_CONCURRENT_AP_POLICY_LOSSLESS_AUDIO_STREAMING: Lossless audio
3059  * concurrent streaming policy value
3060  * @HOST_CONCURRENT_AP_POLICY_XR: Concurrent policy to meet AR/VR requirements.
3061  */
3062 enum host_concurrent_ap_policy {
3063 	HOST_CONCURRENT_AP_POLICY_UNSPECIFIED = 0,
3064 	HOST_CONCURRENT_AP_POLICY_GAMING_AUDIO = 1,
3065 	HOST_CONCURRENT_AP_POLICY_LOSSLESS_AUDIO_STREAMING = 2,
3066 	HOST_CONCURRENT_AP_POLICY_XR = 3
3067 };
3068 
3069 /**
3070  * enum ll_ap_type - low latency AP type
3071  * @LL_AP_TYPE_HT: low latency AP type high throughput
3072  * @LL_AP_TYPE_LT: low latency AP type low latency
3073  * @LL_AP_TYPE_ANY: low latency AP type any
3074  */
3075 enum ll_ap_type {
3076 	LL_AP_TYPE_HT = 0,
3077 	LL_AP_TYPE_LT = 1,
3078 	LL_AP_TYPE_ANY = 2,
3079 };
3080 
3081 /**
3082  * struct sap_ch_info - Structure holding all the information required to make
3083  * a decision for the best operating channel based on dfs formula.
3084  * @chan_freq: Channel frequency found in scanresult
3085  * @bss_count: Bss found in scanresult for this channel
3086  * @rssi_agr: Max value of rssi among all BSS(es) from scan result
3087  * for this channel.
3088  * @weight: Weightage of this channel
3089  * @weight_copy: copy of the original weight
3090  * @valid: Is this a valid center frequency for regulatory domain
3091  * @weight_calc_done: Weight calculation done for this channel
3092  */
3093 struct sap_ch_info {
3094 	uint32_t chan_freq;
3095 	uint16_t bss_count;
3096 	int32_t rssi_agr;
3097 	uint32_t weight;
3098 	uint32_t weight_copy;
3099 	bool valid;
3100 	bool weight_calc_done;
3101 };
3102 
3103 /**
3104  * struct sap_sel_ch_info - Wrapper of sap_ch_info structure.
3105  * @ch_info: Ptr to the channel information.
3106  * @num_ch: Total num of channels.
3107  */
3108 struct sap_sel_ch_info {
3109 	struct sap_ch_info *ch_info;
3110 	uint8_t num_ch;
3111 };
3112 
3113 /**
3114  * enum mlme_peer_oper_mode_ind - Peer mode indication type
3115  * @mlme_peer_ind_smps: spatial multiplexing power save
3116  * @mlme_peer_ind_omn: Operating mode notification
3117  * @mlme_peer_ind_omi: Operating mode indication
3118  */
3119 enum mlme_peer_oper_mode_ind {
3120 	mlme_peer_ind_smps,
3121 	mlme_peer_ind_omn,
3122 	mlme_peer_ind_omi,
3123 };
3124 
3125 /**
3126  * struct peer_oper_mode_event - structure for peer oper mode indication data
3127  * @peer_mac_address: mac address of peer
3128  * @ind_type: indication type of type @enum mlme_peer_oper_mode_ind
3129  * @new_rxnss: New Rx NSS
3130  * @new_bw: New bandwidth
3131  * @new_txnss: New Tx NSS, valid only for mlme_peer_ind_omi
3132  * @new_disablemu: Disabled MU mode, valid only for mlme_peer_ind_omi
3133  */
3134 struct peer_oper_mode_event {
3135 	struct qdf_mac_addr peer_mac_address;
3136 	uint32_t ind_type;
3137 	uint32_t new_rxnss;
3138 	uint32_t new_bw;
3139 	uint32_t new_txnss;
3140 	uint32_t new_disablemu;
3141 };
3142 #endif
3143