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