blob: ff076f710aff5acfbf655d02544bbf25bd11fca4 [file] [log] [blame]
Sandeep Puligillac5609d52018-05-17 19:23:41 -07001/*
gaurank kathpalia1be77fa2019-01-04 13:32:09 +05302 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
Sandeep Puligillac5609d52018-05-17 19:23:41 -07003 *
4 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
19/*
20 * DOC: contains mlme structure definations
21 */
22
23#ifndef _WLAN_MLME_STRUCT_H_
24#define _WLAN_MLME_STRUCT_H_
25
26#include <wlan_cmn.h>
Vignesh Viswanathan7db3b042018-10-03 23:33:35 +053027#include <reg_services_public_struct.h>
gaurank kathpalia2fc3b892018-11-14 13:48:44 +053028#include <wmi_unified_param.h>
Bala Venkatesh6d537092018-09-25 10:38:36 +053029#include <sir_api.h>
Sandeep Puligillac5609d52018-05-17 19:23:41 -070030
Wu Gao406c53c2018-09-10 13:51:37 +080031#define CFG_PMKID_MODES_OKC (0x1)
32#define CFG_PMKID_MODES_PMKSA_CACHING (0x2)
33
Abhinav Kumarb074f2f2018-09-15 15:32:11 +053034#define CFG_VHT_BASIC_MCS_SET_STADEF 0xFFFE
35
36#define CFG_VHT_RX_MCS_MAP_STAMIN 0
Abhinav Kumare057b412018-10-09 17:28:16 +053037#define CFG_VHT_RX_MCS_MAP_STAMAX 0xFFFF
38#define CFG_VHT_RX_MCS_MAP_STADEF 0xFFFE
Abhinav Kumarb074f2f2018-09-15 15:32:11 +053039
40#define CFG_VHT_TX_MCS_MAP_STAMIN 0
Abhinav Kumare057b412018-10-09 17:28:16 +053041#define CFG_VHT_TX_MCS_MAP_STAMAX 0xFFFF
42#define CFG_VHT_TX_MCS_MAP_STADEF 0xFFFE
Abhinav Kumarb074f2f2018-09-15 15:32:11 +053043
Pragaspathi Thilagaraj6fc0a9a2019-05-17 16:49:45 +053044/*
45 * MLME_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_FW_DEF + 1 is
46 * assumed to be the default fw supported BF antennas, if fw
47 * says it supports 8 antennas in rx ready event and if
48 * gTxBFCsnValue INI value is configured above 3, set
49 * the same to MLME_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED.
50 * Otherwise, fall back and set fw default value[3].
51 */
52#define MLME_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_FW_DEF 3
53
Pragaspathi Thilagarajfe1efec2018-09-16 00:18:26 +053054#define CFG_STR_DATA_LEN 17
55#define CFG_EDCA_DATA_LEN 17
gaurank kathpalia3d2e3852018-10-03 22:03:23 +053056#define CFG_MAX_TX_POWER_2_4_LEN 128
57#define CFG_MAX_TX_POWER_5_LEN 128
58#define CFG_POWER_USAGE_MAX_LEN 4
Abhishek Singhf5f21662019-05-31 21:20:58 +053059#define CFG_MAX_STR_LEN 256
Pragaspathi Thilagaraj03efaa52018-09-15 22:58:18 +053060
Wu Gao5d23d782018-11-08 16:09:47 +080061#define CFG_VALID_CHANNEL_LIST_STRING_LEN (CFG_VALID_CHANNEL_LIST_LEN * 4)
Pragaspathi Thilagaraj03efaa52018-09-15 22:58:18 +053062/**
63 * struct mlme_cfg_str - generic structure for all mlme CFG string items
64 *
Pragaspathi Thilagarajfe1efec2018-09-16 00:18:26 +053065 * @max_len: maximum data length allowed
66 * @len: valid no. of elements of the data
Pragaspathi Thilagaraj03efaa52018-09-15 22:58:18 +053067 * @data: uint8_t array to store values
68 */
69struct mlme_cfg_str {
Pragaspathi Thilagarajfe1efec2018-09-16 00:18:26 +053070 qdf_size_t max_len;
Pragaspathi Thilagaraj03efaa52018-09-15 22:58:18 +053071 qdf_size_t len;
Pragaspathi Thilagarajfe1efec2018-09-16 00:18:26 +053072 uint8_t data[CFG_STR_DATA_LEN];
Pragaspathi Thilagaraj03efaa52018-09-15 22:58:18 +053073};
74
75/**
76 * enum e_edca_type - to index edca params for edca profile
77 * EDCA profile AC unicast/bcast
78 * @edca_ani_acbe_local: ani BE unicast
79 * @edca_ani_acbk_local: ani BK unicast
80 * @edca_ani_acvi_local: ani VI unicast
81 * @edca_ani_acvo_local: ani VO unicast
82 * @edca_ani_acbe_bcast: ani BE bcast
83 * @edca_ani_acbk_bcast: ani BK bcast
84 * @edca_ani_acvi_bcast: ani VI bcast
85 * @edca_ani_acvo_bcast: ani VO bcast
86 * @edca_wme_acbe_local: wme BE unicast
87 * @edca_wme_acbk_local: wme BK unicast
88 * @edca_wme_acvi_local: wme VI unicast
89 * @edca_wme_acvo_local: wme VO unicast
90 * @edca_wme_acbe_bcast: wme BE bcast
91 * @edca_wme_acbk_bcast: wme BK bcast
92 * @edca_wme_acvi_bcast: wme VI bcast
93 * @edca_wme_acvo_bcast: wme VO bcast
94 * @edca_etsi_acbe_local: etsi BE unicast
95 * @edca_etsi_acbk_local: etsi BK unicast
96 * @edca_etsi_acvi_local: etsi VI unicast
97 * @edca_etsi_acvo_local: etsi VO unicast
98 * @edca_etsi_acbe_bcast: etsi BE bcast
99 * @edca_etsi_acbk_bcast: etsi BK bcast
100 * @edca_etsi_acvi_bcast: etsi VI bcast
101 * @edca_etsi_acvo_bcast: etsi VO bcast
102 */
103enum e_edca_type {
104 edca_ani_acbe_local,
105 edca_ani_acbk_local,
106 edca_ani_acvi_local,
107 edca_ani_acvo_local,
108 edca_ani_acbe_bcast,
109 edca_ani_acbk_bcast,
110 edca_ani_acvi_bcast,
111 edca_ani_acvo_bcast,
112 edca_wme_acbe_local,
113 edca_wme_acbk_local,
114 edca_wme_acvi_local,
115 edca_wme_acvo_local,
116 edca_wme_acbe_bcast,
117 edca_wme_acbk_bcast,
118 edca_wme_acvi_bcast,
119 edca_wme_acvo_bcast,
120 edca_etsi_acbe_local,
121 edca_etsi_acbk_local,
122 edca_etsi_acvi_local,
123 edca_etsi_acvo_local,
124 edca_etsi_acbe_bcast,
125 edca_etsi_acbk_bcast,
126 edca_etsi_acvi_bcast,
127 edca_etsi_acvo_bcast
128};
129
Pragaspathi Thilagarajfe1efec2018-09-16 00:18:26 +0530130#define CFG_EDCA_PROFILE_ACM_IDX 0
131#define CFG_EDCA_PROFILE_AIFSN_IDX 1
132#define CFG_EDCA_PROFILE_CWMINA_IDX 2
133#define CFG_EDCA_PROFILE_CWMAXA_IDX 4
134#define CFG_EDCA_PROFILE_TXOPA_IDX 6
135#define CFG_EDCA_PROFILE_CWMINB_IDX 7
136#define CFG_EDCA_PROFILE_CWMAXB_IDX 9
137#define CFG_EDCA_PROFILE_TXOPB_IDX 11
138#define CFG_EDCA_PROFILE_CWMING_IDX 12
139#define CFG_EDCA_PROFILE_CWMAXG_IDX 14
140#define CFG_EDCA_PROFILE_TXOPG_IDX 16
141
Pragaspathi Thilagaraj03efaa52018-09-15 22:58:18 +0530142/**
Abhinav Kumar06b9a122018-10-10 15:01:11 +0530143 * struct mlme_edca_ac_vo - cwmin, cwmax and aifs value for edca_ac_vo
144 *
145 * @vo_cwmin: cwmin value for voice
146 * @vo_cwmax: cwmax value for voice
147 * @vo_aifs: aifs value for voice
148 */
149struct mlme_edca_ac_vo {
150 uint32_t vo_cwmin;
151 uint32_t vo_cwmax;
152 uint32_t vo_aifs;
153};
154
155/**
gaurank kathpalia1be77fa2019-01-04 13:32:09 +0530156 * enum dot11_mode - Dot11 mode of the vdev
157 * MLME_DOT11_MODE_ALL: vdev supports all dot11 modes
158 * MLME_DOT11_MODE_11A: vdev just supports 11A mode
159 * MLME_DOT11_MODE_11B: vdev supports 11B mode, and modes above it
160 * MLME_DOT11_MODE_11G: vdev supports 11G mode, and modes above it
161 * MLME_DOT11_MODE_11N: vdev supports 11N mode, and modes above it
162 * MLME_DOT11_MODE_11G_ONLY: vdev just supports 11G mode
163 * MLME_DOT11_MODE_1N_ONLYA: vdev just supports 11N mode
164 * MLME_DOT11_MODE_11AC: vdev supports 11AC mode, and modes above it
165 * MLME_DOT11_MODE_11AC_ONLY: vdev just supports 11AC mode
166 * MLME_DOT11_MODE_11AX: vdev supports 11AX mode, and modes above it
167 * MLME_DOT11_MODE_11AX_ONLY: vdev just supports 11AX mode
168 */
169enum mlme_dot11_mode {
170 MLME_DOT11_MODE_ALL,
171 MLME_DOT11_MODE_11A,
172 MLME_DOT11_MODE_11B,
173 MLME_DOT11_MODE_11G,
174 MLME_DOT11_MODE_11N,
175 MLME_DOT11_MODE_11G_ONLY,
176 MLME_DOT11_MODE_11N_ONLY,
177 MLME_DOT11_MODE_11AC,
178 MLME_DOT11_MODE_11AC_ONLY,
179 MLME_DOT11_MODE_11AX,
180 MLME_DOT11_MODE_11AX_ONLY
181};
182
183/**
184 * struct wlan_mlme_dot11_mode - dot11 mode
185 *
186 * @dot11_mode: dot11 mode supported
187 */
188struct wlan_mlme_dot11_mode {
189 enum mlme_dot11_mode dot11_mode;
190};
191
192/**
gaurank kathpalia7ef72182019-05-29 19:41:25 +0530193 * enum roam_invoke_source_entity - Source of invoking roam invoke command.
194 * @USERSPACE_INITIATED: Userspace (supplicant)
195 * @CONNECTION_MGR_INITIATED: connection mgr initiated.
196 */
197enum roam_invoke_source_entity {
198 USERSPACE_INITIATED,
199 CONNECTION_MGR_INITIATED,
200};
201
202/**
203 * struct mlme_roam_after_data_stall - roam invoke entity params
204 * @roam_invoke_in_progress: is roaming already in progress.
205 * @source: source of the roam invoke command.
206 */
207struct mlme_roam_after_data_stall {
208 bool roam_invoke_in_progress;
209 enum roam_invoke_source_entity source;
210};
211
212/**
Abhinav Kumar06b9a122018-10-10 15:01:11 +0530213 * struct mlme_edca_ac_vi - cwmin, cwmax and aifs value for edca_ac_vi
214 *
215 * @vi_cwmin: cwmin value for video
216 * @vi_cwmax: cwmax value for video
217 * @vi_aifs: aifs value for video
218 */
219struct mlme_edca_ac_vi {
220 uint32_t vi_cwmin;
221 uint32_t vi_cwmax;
222 uint32_t vi_aifs;
223};
224
225/**
226 * struct mlme_edca_ac_bk - cwmin, cwmax and aifs value for edca_ac_bk
227 *
228 * @bk_cwmin: cwmin value for background
229 * @bk_cwmax: cwmax value for background
230 * @bk_aifs: aifs value for background
231 */
232struct mlme_edca_ac_bk {
233 uint32_t bk_cwmin;
234 uint32_t bk_cwmax;
235 uint32_t bk_aifs;
236};
237
238/**
239 * struct mlme_edca_ac_be - cwmin, cwmax and aifs value for edca_ac_be
240 *
241 * @be_cwmin: cwmin value for best effort
242 * @be_cwmax: cwmax value for best effort
243 * @be_aifs: aifs value for best effort
244 */
245struct mlme_edca_ac_be {
246 uint32_t be_cwmin;
247 uint32_t be_cwmax;
248 uint32_t be_aifs;
249};
250
251/**
Abhinav Kumarab576712018-11-05 14:32:49 +0530252 * enum mlme_ts_info_ack_policy - TS Info Ack Policy
253 * @TS_INFO_ACK_POLICY_NORMAL_ACK:normal ack
254 * @TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK: HT immediate block ack
255 */
256enum mlme_ts_info_ack_policy {
257 TS_INFO_ACK_POLICY_NORMAL_ACK = 0,
258 TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK = 1,
259};
260
261/**
Pragaspathi Thilagaraj03efaa52018-09-15 22:58:18 +0530262 * struct mlme_edca_params - EDCA pramaters related config items
263 *
Pragaspathi Thilagarajfe1efec2018-09-16 00:18:26 +0530264 * @ani_acbk_l: EDCA parameters for ANI local access category background
265 * @ani_acbe_l: EDCA parameters for ANI local access category best effort
266 * @ani_acvi_l: EDCA parameters for ANI local access category video
267 * @ani_acvo_l: EDCA parameters for ANI local access category voice
268 * @ani_acbk_b: EDCA parameters for ANI bcast access category background
269 * @ani_acbe_b: EDCA parameters for ANI bcast access category best effort
270 * @ani_acvi_b: EDCA parameters for ANI bcast access category video
271 * @ani_acvo_b: EDCA parameters for ANI bcast access category voice
272 * @wme_acbk_l: EDCA parameters for WME local access category background
273 * @wme_acbe_l: EDCA parameters for WME local access category best effort
274 * @wme_acvi_l: EDCA parameters for WME local access category video
275 * @wme_acvo_l: EDCA parameters for WME local access category voice
276 * @wme_acbk_b: EDCA parameters for WME bcast access category background
277 * @wme_acbe_b: EDCA parameters for WME bcast access category best effort
278 * @wme_acvi_b: EDCA parameters for WME bcast access category video
279 * @wme_acvo_b: EDCA parameters for WME bcast access category voice
Pragaspathi Thilagaraj03efaa52018-09-15 22:58:18 +0530280 * @etsi_acbk_l: EDCA parameters for ETSI local access category background
281 * @etsi_acbe_l: EDCA parameters for ETSI local access category best effort
282 * @etsi_acvi_l: EDCA parameters for ETSI local access category video
283 * @etsi_acvo_l: EDCA parameters for ETSI local access category voice
284 * @etsi_acbk_b: EDCA parameters for ETSI bcast access category background
285 * @etsi_acbe_b: EDCA parameters for ETSI bcast access category best effort
286 * @etsi_acvi_b: EDCA parameters for ETSI bcast access category video
287 * @etsi_acvo_b: EDCA parameters for ETSI bcast access category voice
Abhinav Kumar06b9a122018-10-10 15:01:11 +0530288 * @enable_edca_params: Enable edca parameter
289 * @mlme_edca_ac_vo: value for edca_ac_vo
290 * @mlme_edca_ac_vi: value for edca_ac_vi
291 * @mlme_edca_ac_bk: value for edca_ac_bk
292 * @mlme_edca_ac_be: value for edca_ac_be
Pragaspathi Thilagaraj03efaa52018-09-15 22:58:18 +0530293 */
294struct wlan_mlme_edca_params {
295 struct mlme_cfg_str ani_acbk_l;
296 struct mlme_cfg_str ani_acbe_l;
297 struct mlme_cfg_str ani_acvi_l;
298 struct mlme_cfg_str ani_acvo_l;
299 struct mlme_cfg_str ani_acbk_b;
300 struct mlme_cfg_str ani_acbe_b;
301 struct mlme_cfg_str ani_acvi_b;
302 struct mlme_cfg_str ani_acvo_b;
303
304 struct mlme_cfg_str wme_acbk_l;
305 struct mlme_cfg_str wme_acbe_l;
306 struct mlme_cfg_str wme_acvi_l;
307 struct mlme_cfg_str wme_acvo_l;
308 struct mlme_cfg_str wme_acbk_b;
309 struct mlme_cfg_str wme_acbe_b;
310 struct mlme_cfg_str wme_acvi_b;
311 struct mlme_cfg_str wme_acvo_b;
312
313 struct mlme_cfg_str etsi_acbk_l;
314 struct mlme_cfg_str etsi_acbe_l;
315 struct mlme_cfg_str etsi_acvi_l;
316 struct mlme_cfg_str etsi_acvo_l;
317 struct mlme_cfg_str etsi_acbk_b;
318 struct mlme_cfg_str etsi_acbe_b;
319 struct mlme_cfg_str etsi_acvi_b;
320 struct mlme_cfg_str etsi_acvo_b;
Abhinav Kumar06b9a122018-10-10 15:01:11 +0530321
322 bool enable_edca_params;
323 struct mlme_edca_ac_vo edca_ac_vo;
324 struct mlme_edca_ac_vi edca_ac_vi;
325 struct mlme_edca_ac_bk edca_ac_bk;
326 struct mlme_edca_ac_be edca_ac_be;
Pragaspathi Thilagaraj03efaa52018-09-15 22:58:18 +0530327};
328
Jiachao Wu3304d6b2018-08-24 18:24:34 +0800329#define WLAN_CFG_MFR_NAME_LEN (63)
330#define WLAN_CFG_MODEL_NUMBER_LEN (31)
331#define WLAN_CFG_MODEL_NAME_LEN (31)
332#define WLAN_CFG_MFR_PRODUCT_NAME_LEN (31)
333#define WLAN_CFG_MFR_PRODUCT_VERSION_LEN (31)
334
Yeshwanth Sriram Guntuka334aa8d2018-08-20 16:49:15 +0530335#define MLME_NUM_WLM_LATENCY_LEVEL 4
336#define MLME_RMENABLEDCAP_MAX_LEN 5
337
Sandeep Puligillac5609d52018-05-17 19:23:41 -0700338/**
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530339 * struct mlme_ht_capabilities_info - HT Capabilities Info
Vignesh Viswanathan78182502018-08-06 15:13:30 +0530340 * @l_sig_tx_op_protection: L-SIG TXOP Protection Mechanism support
341 * @stbc_control_frame: STBC Control frame support
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530342 * @psmp: PSMP Support
Vignesh Viswanathan78182502018-08-06 15:13:30 +0530343 * @dsss_cck_mode_40_mhz: To indicate use of DSSS/CCK in 40Mhz
344 * @maximal_amsdu_size: Maximum AMSDU Size - 0:3839 octes, 1:7935 octets
345 * @delayed_ba: Support of Delayed Block Ack
346 * @rx_stbc: Rx STBC Support - 0:Not Supported, 1: 1SS, 2: 1,2SS, 3: 1,2,3SS
347 * @tx_stbc: Tx STBC Support
348 * @short_gi_40_mhz: Short GI Support for HT40
349 * @short_gi_20_mhz: Short GI support for HT20
350 * @green_field: Support for HT Greenfield PPDUs
351 * @mimo_power_save: SM Power Save Mode - 0:Static, 1:Dynamic, 3:Disabled, 2:Res
352 * @supported_channel_width_set: Supported Chan Width - 0:20Mhz, 1:20Mhz & 40Mhz
353 * @adv_coding_cap: Rx LDPC support
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530354 */
355#ifndef ANI_LITTLE_BIT_ENDIAN
356struct mlme_ht_capabilities_info {
Vignesh Viswanathan78182502018-08-06 15:13:30 +0530357 uint16_t l_sig_tx_op_protection:1;
358 uint16_t stbc_control_frame:1;
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530359 uint16_t psmp:1;
Vignesh Viswanathan78182502018-08-06 15:13:30 +0530360 uint16_t dsss_cck_mode_40_mhz:1;
361 uint16_t maximal_amsdu_size:1;
362 uint16_t delayed_ba:1;
363 uint16_t rx_stbc:2;
364 uint16_t tx_stbc:1;
365 uint16_t short_gi_40_mhz:1;
366 uint16_t short_gi_20_mhz:1;
367 uint16_t green_field:1;
368 uint16_t mimo_power_save:2;
369 uint16_t supported_channel_width_set:1;
370 uint16_t adv_coding_cap:1;
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530371} qdf_packed;
372#else
373struct mlme_ht_capabilities_info {
Vignesh Viswanathan78182502018-08-06 15:13:30 +0530374 uint16_t adv_coding_cap:1;
375 uint16_t supported_channel_width_set:1;
376 uint16_t mimo_power_save:2;
377 uint16_t green_field:1;
378 uint16_t short_gi_20_mhz:1;
379 uint16_t short_gi_40_mhz:1;
380 uint16_t tx_stbc:1;
381 uint16_t rx_stbc:2;
382 uint16_t delayed_ba:1;
383 uint16_t maximal_amsdu_size:1;
384 uint16_t dsss_cck_mode_40_mhz:1;
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530385 uint16_t psmp:1;
Vignesh Viswanathan78182502018-08-06 15:13:30 +0530386 uint16_t stbc_control_frame:1;
387 uint16_t l_sig_tx_op_protection:1;
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530388} qdf_packed;
389#endif
390
391/**
Vignesh Viswanathanddc89e52018-11-02 18:43:42 +0530392 * struct mlme_ht_param_info - HT AMPDU Parameters Info
393 * @reserved: reserved bits
394 * @mpdu_density: MPDU Density
395 * @max_rx_ampdu_factor: Max Rx AMPDU Factor
396 */
397#ifndef ANI_LITTLE_BIT_ENDIAN
398struct mlme_ht_param_info {
399 uint8_t reserved:3;
400 uint8_t mpdu_density:3;
401 uint8_t max_rx_ampdu_factor:2;
402} qdf_packed;
403#else
404struct mlme_ht_param_info {
405 uint8_t max_rx_ampdu_factor:2;
406 uint8_t mpdu_density:3;
407 uint8_t reserved:3;
408#endif
409} qdf_packed;
410
411/**
412 * struct mlme_ht_ext_cap_info - Extended HT Capabilities Info
413 * reserved_2: Reserved Bits
414 * mcs_feedback: MCS Feedback Capability
415 * reserved_1: Reserved Bits
416 * transition_time: Time needed for transition between 20Mhz and 40 Mhz
417 * pco: PCO (Phased Coexistence Operation) Support
418 */
419#ifndef ANI_LITTLE_BIT_ENDIAN
420struct mlme_ht_ext_cap_info {
421 uint16_t reserved_2:6;
422 uint16_t mcs_feedback:2;
423 uint16_t reserved_1:5;
424 uint16_t transition_time:2;
425 uint16_t pco:1;
426} qdf_packed;
427#else
428struct mlme_ht_ext_cap_info {
429 uint16_t pco:1;
430 uint16_t transition_time:2;
431 uint16_t reserved1:5;
432 uint16_t mcs_feedback:2;
433 uint16_t reserved2:6;
434} qdf_packed;
435#endif
436
437/**
438 * struct mlme_ht_info_field_1 - Additional HT IE Field1
439 * @service_interval_granularity: Shortest Service Interval
440 * @controlled_access_only: Access Control for assoc requests
441 * @rifs_mode: Reduced Interframe Spacing mode
442 * @recommended_tx_width_set: Recommended Tx Channel Width
443 * @secondary_channel_offset: Secondary Channel Offset
444 */
445#ifndef ANI_LITTLE_BIT_ENDIAN
446struct mlme_ht_info_field_1 {
447 uint8_t service_interval_granularity:3;
448 uint8_t controlled_access_only:1;
449 uint8_t rifs_mode:1;
450 uint8_t recommended_tx_width_set:1;
451 uint8_t secondary_channel_offset:2;
452} qdf_packed;
453#else
454struct mlme_ht_info_field_1 {
455 uint8_t secondary_channel_offset:2;
456 uint8_t recommended_tx_width_set:1;
457 uint8_t rifs_mode:1;
458 uint8_t controlled_access_only:1;
459 uint8_t service_interval_granularity:3;
460} qdf_packed;
461#endif
462
463/* struct mlme_ht_info_field_2 - Additional HT IE Field2
464 * @reserved: reserved bits
465 * @obss_non_ht_sta_present: Protection for non-HT STAs by Overlapping BSS
466 * @transmit_burst_limit: Transmit Burst Limit
467 * @non_gf_devices_present: Non Greenfield devices present
468 * @op_mode: Operation Mode
469 */
470#ifndef ANI_LITTLE_BIT_ENDIAN
471struct mlme_ht_info_field_2 {
472 uint16_t reserved:11;
473 uint16_t obss_non_ht_sta_present:1;
474 uint16_t transmit_burst_limit:1;
475 uint16_t non_gf_devices_present:1;
476 uint16_t op_mode:2;
477} qdf_packed;
478#else
479struct mlme_ht_info_field_2 {
480 uint16_t op_mode:2;
Jeff Johnsonda70bd12019-01-05 18:55:00 -0800481 uint16_t non_gf_devices_present:1;
Vignesh Viswanathanddc89e52018-11-02 18:43:42 +0530482 uint16_t transmit_burst_limit:1;
483 uint16_t obss_non_ht_sta_present:1;
484 uint16_t reserved:11;
485} qdf_packed;
486#endif
487
488/**
489 * struct mlme_ht_info_field_3 - Additional HT IE Field3
490 * @reserved: reserved bits
491 * @pco_phase: PCO Phase
492 * @pco_active: PCO state
493 * @lsig_txop_protection_full_support: L-Sig TXOP Protection Full Support
494 * @secondary_beacon: Beacon ID
495 * @dual_cts_protection: Dual CTS protection Required
496 * @basic_stbc_mcs: Basic STBC MCS
497 */
498#ifndef ANI_LITTLE_BIT_ENDIAN
499struct mlme_ht_info_field_3 {
500 uint16_t reserved:4;
501 uint16_t pco_phase:1;
502 uint16_t pco_active:1;
503 uint16_t lsig_txop_protection_full_support:1;
504 uint16_t secondary_beacon:1;
505 uint16_t dual_cts_protection:1;
506 uint16_t basic_stbc_mcs:7;
507} qdf_packed;
508#else
509struct mlme_ht_info_field_3 {
510 uint16_t basic_stbc_mcs:7;
511 uint16_t dual_cts_protection:1;
512 uint16_t secondary_beacon:1;
513 uint16_t lsig_txop_protection_full_support:1;
514 uint16_t pco_active:1;
515 uint16_t pco_phase:1;
516 uint16_t reserved:4;
517} qdf_packed;
518#endif
519
520/**
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530521 * struct wlan_mlme_ht_caps - HT Capabilities related config items
522 * @ht_cap_info: HT capabilities Info Structure
Vignesh Viswanathanddc89e52018-11-02 18:43:42 +0530523 * @ampdu_params: AMPDU parameters
524 * @ext_cap_info: HT EXT capabilities info
525 * @info_field_1: HT Information Subset 1
526 * @info_field_2: HT Information Subset 2
527 * @info_field_3: HT Information Subset 3
528 * @short_preamble: Short Preamble support
529 * @enable_ampdu_ps: Enable AMPDU Power Save
530 * @enable_smps: Enabled SM Power Save
531 * @smps : SM Power Save mode
532 * @max_num_amsdu: Max number of AMSDU
Vignesh Viswanathanecd4de72018-11-22 13:02:20 +0530533 * @tx_ldpc_enable: Enable Tx LDPC
534 * @short_slot_time_enabled: Enabled/disable short slot time
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530535 */
536struct wlan_mlme_ht_caps {
537 struct mlme_ht_capabilities_info ht_cap_info;
Vignesh Viswanathanddc89e52018-11-02 18:43:42 +0530538 struct mlme_ht_param_info ampdu_params;
539 struct mlme_ht_ext_cap_info ext_cap_info;
540 struct mlme_ht_info_field_1 info_field_1;
541 struct mlme_ht_info_field_2 info_field_2;
542 struct mlme_ht_info_field_3 info_field_3;
543 bool short_preamble;
544 bool enable_ampdu_ps;
545 bool enable_smps;
546 uint8_t smps;
547 uint8_t max_num_amsdu;
Vignesh Viswanathanecd4de72018-11-22 13:02:20 +0530548 uint8_t tx_ldpc_enable;
549 bool short_slot_time_enabled;
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530550};
551
Pragaspathi Thilagaraj2b9259f2018-12-05 22:29:03 +0530552#define MLME_CFG_WPS_UUID_MAX_LEN 16
gaurank kathpalia837f6202018-09-14 21:55:32 +0530553/*
554 * struct wlan_mlme_wps_params - All wps based related cfg items
555 *
556 * @enable_wps - to enable wps
557 * @wps_state - current wps state
558 * @wps_version - wps version
559 * @wps_cfg_method - wps config method
560 * @wps_primary_device_category - wps primary device category
561 * @wps_primary_device_oui - primary device OUI
562 * @wps_device_sub_category - device sub category
563 * @wps_device_password_id - password id of device
Pragaspathi Thilagaraj2b9259f2018-12-05 22:29:03 +0530564 * @wps_uuid - wps uuid to be sent in probe
gaurank kathpalia837f6202018-09-14 21:55:32 +0530565 */
566struct wlan_mlme_wps_params {
567 uint8_t enable_wps;
568 uint8_t wps_state;
569 uint8_t wps_version;
570 uint32_t wps_cfg_method;
571 uint32_t wps_primary_device_category;
572 uint32_t wps_primary_device_oui;
573 uint16_t wps_device_sub_category;
574 uint32_t wps_device_password_id;
Pragaspathi Thilagaraj2b9259f2018-12-05 22:29:03 +0530575 struct mlme_cfg_str wps_uuid;
gaurank kathpalia837f6202018-09-14 21:55:32 +0530576};
577
Pragaspathi Thilagaraj3cf0f652018-10-29 16:40:35 +0530578#define MLME_CFG_LISTEN_INTERVAL 1
579#define MLME_CFG_BEACON_INTERVAL_DEF 100
580#define MLME_CFG_TX_MGMT_RATE_DEF 0xFF
581#define MLME_CFG_TX_MGMT_2G_RATE_DEF 0xFF
582#define MLME_CFG_TX_MGMT_5G_RATE_DEF 0xFF
Bala Venkatesh3d786eb2018-11-20 12:59:31 +0530583
Bala Venkatesh100d7422018-08-27 11:42:21 +0530584/**
Pragaspathi Thilagaraj3cf0f652018-10-29 16:40:35 +0530585 * struct wlan_mlme_cfg_sap - SAP related config items
586 * @cfg_ssid: SSID to be configured
587 * @beacon_interval: beacon interval
588 * @dtim_interval: dtim interval
589 * @listen_interval: listen interval
590 * @sap_11g_policy: Check if 11g support is enabled
591 * @assoc_sta_limit: Limit on number of STA associated to SAP
592 * @enable_lte_coex: Flag for LTE coexistence
593 * @rmc_action_period_freq: rmc action period frequency
594 * @rate_tx_mgmt: mgmt frame tx rate
595 * @rate_tx_mgmt_2g: mgmt frame tx rate for 2G band
596 * @rate_tx_mgmt_5g: mgmt frame tx rate for 5G band
597 * @tele_bcn_wakeup_en: beacon wakeup enable/disable
598 * @tele_bcn_max_li: max listen interval
599 * @sap_get_peer_info: get peer info
600 * @sap_allow_all_chan_param_name: allow all channels
601 * @sap_max_no_peers: Maximum number of peers
602 * @sap_max_offload_peers: Maximum number of peer offloads
603 * @sap_max_offload_reorder_buffs: Maximum offload reorder buffs
604 * @sap_ch_switch_beacon_cnt: Number of beacons to be sent out during CSA
605 * @sap_internal_restart: flag to check if sap restart is in progress
606 * @sap_ch_switch_mode: Channel switch test mode enable/disable
607 * @chan_switch_hostapd_rate_enabled_name: enable/disable skip hostapd rate
608 * @reduced_beacon_interval: reduced beacon interval value
Bala Venkatesh46e29032018-11-14 18:24:55 +0530609 * @max_li_modulated_dtim_time: Max modulated DTIM time.
610 * @country_code_priority: Country code priority.
611 * @sap_pref_chan_location: SAP Preferred channel location.
Krunal Sonid2c33e12018-12-06 15:02:37 -0800612 * @sap_mcc_chnl_avoid: SAP MCC channel avoidance flag
Sandeep Puligilla34618782019-01-04 17:42:42 -0800613 * @sap_11ac_override: Overrirde SAP bandwidth to 11ac
614 * @go_11ac_override: Override GO bandwidth to 11ac
Harprit Chhabadae5742552019-03-21 16:28:48 -0700615 * @sap_sae_enabled: enable sae in sap mode
616 * @is_sap_bcast_deauth_enabled: enable bcast deauth for sap
Bala Venkatesh100d7422018-08-27 11:42:21 +0530617 */
618struct wlan_mlme_cfg_sap {
Srinivas Girigowdab8fdc642019-03-19 15:33:03 -0700619 uint8_t cfg_ssid[WLAN_SSID_MAX_LEN];
Bala Venkatesh3d786eb2018-11-20 12:59:31 +0530620 uint8_t cfg_ssid_len;
Bala Venkatesh100d7422018-08-27 11:42:21 +0530621 uint16_t beacon_interval;
622 uint16_t dtim_interval;
623 uint16_t listen_interval;
624 bool sap_11g_policy;
625 uint8_t assoc_sta_limit;
626 bool enable_lte_coex;
627 uint16_t rmc_action_period_freq;
628 uint8_t rate_tx_mgmt;
629 uint8_t rate_tx_mgmt_2g;
630 uint8_t rate_tx_mgmt_5g;
631 bool tele_bcn_wakeup_en;
632 uint8_t tele_bcn_max_li;
633 bool sap_get_peer_info;
634 bool sap_allow_all_chan_param_name;
635 uint8_t sap_max_no_peers;
636 uint8_t sap_max_offload_peers;
637 uint8_t sap_max_offload_reorder_buffs;
638 uint8_t sap_ch_switch_beacon_cnt;
Bala Venkatesh2fde2c62018-09-11 20:33:24 +0530639 bool sap_internal_restart;
Bala Venkatesh100d7422018-08-27 11:42:21 +0530640 bool sap_ch_switch_mode;
Bala Venkatesh100d7422018-08-27 11:42:21 +0530641 bool chan_switch_hostapd_rate_enabled_name;
642 uint8_t reduced_beacon_interval;
Bala Venkatesh46e29032018-11-14 18:24:55 +0530643 uint8_t max_li_modulated_dtim_time;
644 bool country_code_priority;
645 uint8_t sap_pref_chan_location;
Bala Venkatesh3d786eb2018-11-20 12:59:31 +0530646 bool sap_force_11n_for_11ac;
647 bool go_force_11n_for_11ac;
Sourav Mohapatra0dfe5552018-11-16 11:29:54 +0530648 bool ap_random_bssid_enable;
Krunal Sonid2c33e12018-12-06 15:02:37 -0800649 uint8_t sap_mcc_chnl_avoid;
Sandeep Puligilla34618782019-01-04 17:42:42 -0800650 bool sap_11ac_override;
651 bool go_11ac_override;
Srinivas Dasaried83dde2019-02-11 16:21:42 +0530652 bool sap_sae_enabled;
Harprit Chhabadae5742552019-03-21 16:28:48 -0700653 bool is_sap_bcast_deauth_enabled;
Bala Venkatesh100d7422018-08-27 11:42:21 +0530654};
655
Pragaspathi Thilagarajcd6aef02018-09-11 20:30:23 +0530656/**
Arif Hussain88d1fdd2018-09-26 16:12:24 -0700657 * struct wlan_mlme_dfs_cfg - DFS Capabilities related config items
658 * @dfs_master_capable: Is DFS master mode support enabled
Arif Hussain224d3812018-11-16 17:58:38 -0800659 * @dfs_disable_channel_switch: disable channel switch on radar detection
660 * @dfs_ignore_cac: Disable cac
661 * @dfs_filter_offload: dfs filter offloaad
662 * @dfs_beacon_tx_enhanced: enhance dfs beacon tx
663 * @dfs_prefer_non_dfs: perefer non dfs channel after radar
Arif Hussain0b634b42018-12-20 16:03:18 -0800664 * @dfs_disable_japan_w53: Disable W53 channels
Arif Hussain224d3812018-11-16 17:58:38 -0800665 * @sap_tx_leakage_threshold: sap tx leakage threshold
Arif Hussain88d1fdd2018-09-26 16:12:24 -0700666 */
667struct wlan_mlme_dfs_cfg {
668 bool dfs_master_capable;
Arif Hussain224d3812018-11-16 17:58:38 -0800669 bool dfs_disable_channel_switch;
670 bool dfs_ignore_cac;
671 bool dfs_filter_offload;
672 bool dfs_beacon_tx_enhanced;
673 bool dfs_prefer_non_dfs;
Arif Hussain0b634b42018-12-20 16:03:18 -0800674 bool dfs_disable_japan_w53;
Arif Hussain224d3812018-11-16 17:58:38 -0800675 uint32_t sap_tx_leakage_threshold;
Arif Hussain88d1fdd2018-09-26 16:12:24 -0700676};
677
678/**
Pragaspathi Thilagarajcd6aef02018-09-11 20:30:23 +0530679 * struct wlan_mlme_mbo - Multiband Operation related ini configs
Pragaspathi Thilagaraj43455532018-11-20 00:05:44 +0530680 * @mbo_candidate_rssi_thres: candidate AP's min rssi to accept it
681 * @mbo_current_rssi_thres: Connected AP's rssi threshold below which
682 * transition is considered
683 * @mbo_current_rssi_mcc_thres: connected AP's RSSI threshold value to prefer
684 * against MCC
685 * @mbo_candidate_rssi_btc_thres: Candidate AP's minimum RSSI threshold to
686 * prefer it even in BT coex.
Pragaspathi Thilagarajcd6aef02018-09-11 20:30:23 +0530687 */
688struct wlan_mlme_mbo {
689 int8_t mbo_candidate_rssi_thres;
690 int8_t mbo_current_rssi_thres;
691 int8_t mbo_current_rssi_mcc_thres;
692 int8_t mbo_candidate_rssi_btc_thres;
693};
694
Abhinav Kumarc1c266b2018-09-08 18:43:47 +0530695/**
Pragaspathi Thilagaraj43455532018-11-20 00:05:44 +0530696 * struct wlan_mlme_powersave - Powersave related ini configs
697 * @is_imps_enabled: flag to enable/disable IMPS
698 * @is_bmps_enabled: flag to enable/disable BMPS
699 * @auto_bmps_timer: auto BMPS timer value
700 * @bmps_min_listen_interval: BMPS listen inteval minimum value
701 * @bmps_max_listen_interval: BMPS listen interval maximum value
702 * @dtim_selection_diversity: dtim selection diversity value to be sent to fw
703 */
704struct wlan_mlme_powersave {
705 bool is_imps_enabled;
706 bool is_bmps_enabled;
707 uint32_t auto_bmps_timer_val;
708 uint32_t bmps_min_listen_interval;
709 uint32_t bmps_max_listen_interval;
710 uint32_t dtim_selection_diversity;
711};
712
713/**
Abhinav Kumarc1c266b2018-09-08 18:43:47 +0530714 * struct wlan_mlme_vht_caps - MLME VHT config items
715 * @supp_chan_width: Supported Channel Width
716 * @ldpc_coding_cap: LDPC Coding Capability
717 * @short_gi_80mhz: 80MHz Short Guard Interval
718 * @short_gi_160mhz: 160MHz Short Guard Interval
719 * @tx_stbc: Tx STBC cap
720 * @rx_stbc: Rx STBC cap
721 * @su_bformer: SU Beamformer cap
722 * @su_bformee: SU Beamformee cap
723 * @tx_bfee_ant_supp: Tx beamformee anti supp
724 * @num_soundingdim: Number of sounding dimensions
725 * @mu_bformer: MU Beamformer cap
726 * @txop_ps: Tx OPs in power save
727 * @htc_vhtc: htc_vht capability
728 * @link_adap_cap: Link adaptation capability
729 * @rx_antpattern: Rx Antenna Pattern cap
730 * @tx_antpattern: Tx Antenna Pattern cap
731 * @rx_mcs_map: Rx MCS Map
732 * @tx_mcs_map: Tx MCS Map
733 * @rx_supp_data_rate: Rx highest supported data rate
734 * @tx_supp_data_rate: Tx highest supported data rate
735 * @basic_mcs_set: Basic MCS set
736 * @enable_txbf_20mhz: enable tx bf for 20mhz
737 * @channel_width: Channel width capability for 11ac
738 * @rx_mcs: VHT Rx MCS capability for 1x1 mode
739 * @tx_mcs: VHT Tx MCS capability for 1x1 mode
740 * @rx_mcs2x2: VHT Rx MCS capability for 2x2 mode
741 * @tx_mcs2x2: VHT Tx MCS capability for 2x2 mode
742 * @enable_vht20_mcs9: Enables VHT MCS9 in 20M BW operation
743 * @enable2x2: Enables/disables VHT Tx/Rx MCS values for 2x2
744 * @enable_mu_bformee: Enables/disables multi-user (MU)
745 * beam formee capability
746 * @enable_paid: Enables/disables paid
747 * @enable_gid: Enables/disables gid
748 * @b24ghz_band: To control VHT support in 2.4 GHz band
749 * @vendor_24ghz_band: to control VHT support based on vendor
750 * ie in 2.4 GHz band
751 * @ampdu_len_exponent: To handle maximum receive AMPDU ampdu len exponent
752 * @ampdu_len: To handle maximum receive AMPDU ampdu len
Abhinav Kumarb074f2f2018-09-15 15:32:11 +0530753 * @tx_bfee_sap: enable tx bfee SAp
754 * @subfee_vendor_vhtie: enable subfee vendor vht ie
Abhinav Kumard4d6eb72018-12-04 20:30:37 +0530755 * @tx_bf_cap: Transmit bf capability
756 * @as_cap: Antenna sharing capability info
757 * @disable_ldpc_with_txbf_ap: Disable ldpc capability
Abhinav Kumarc1c266b2018-09-08 18:43:47 +0530758 */
759struct mlme_vht_capabilities_info {
760 uint8_t supp_chan_width;
761 bool ldpc_coding_cap;
762 bool short_gi_80mhz;
763 bool short_gi_160mhz;
764 bool tx_stbc;
765 bool rx_stbc;
766 bool su_bformer;
767 bool su_bformee;
768 uint8_t tx_bfee_ant_supp;
769 uint8_t num_soundingdim;
770 bool mu_bformer;
771 bool txop_ps;
772 bool htc_vhtc;
773 uint8_t link_adap_cap;
774 bool rx_antpattern;
775 bool tx_antpattern;
776 uint32_t rx_mcs_map;
777 uint32_t tx_mcs_map;
778 uint32_t rx_supp_data_rate;
779 uint32_t tx_supp_data_rate;
780 uint32_t basic_mcs_set;
781 bool enable_txbf_20mhz;
782 uint8_t channel_width;
Abhinav Kumarb074f2f2018-09-15 15:32:11 +0530783 uint32_t rx_mcs;
784 uint32_t tx_mcs;
Abhinav Kumarc1c266b2018-09-08 18:43:47 +0530785 uint8_t rx_mcs2x2;
786 uint8_t tx_mcs2x2;
787 bool enable_vht20_mcs9;
788 bool enable2x2;
789 bool enable_mu_bformee;
790 bool enable_paid;
791 bool enable_gid;
792 bool b24ghz_band;
793 bool vendor_24ghz_band;
794 uint8_t ampdu_len_exponent;
795 uint8_t ampdu_len;
Abhinav Kumarb074f2f2018-09-15 15:32:11 +0530796 bool tx_bfee_sap;
797 bool vendor_vhtie;
Abhinav Kumard4d6eb72018-12-04 20:30:37 +0530798 uint8_t tx_bf_cap;
799 uint8_t as_cap;
800 bool disable_ldpc_with_txbf_ap;
Abhinav Kumarc1c266b2018-09-08 18:43:47 +0530801};
802
803/**
804 * struct wlan_mlme_vht_caps - VHT Capabilities related config items
805 * @vht_cap_info: VHT capabilities Info Structure
806 */
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530807struct wlan_mlme_vht_caps {
Abhinav Kumarc1c266b2018-09-08 18:43:47 +0530808 struct mlme_vht_capabilities_info vht_cap_info;
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530809};
810
811/**
Pragaspathi Thilagaraj17afb842018-08-30 17:55:13 +0530812 * struct wlan_mlme_qos - QOS TX/RX aggregation related CFG items
813 * @tx_aggregation_size: TX aggr size in number of MPDUs
814 * @tx_aggregation_size_be: No. of MPDUs for BE queue for TX aggr
815 * @tx_aggregation_size_bk: No. of MPDUs for BK queue for TX aggr
816 * @tx_aggregation_size_vi: No. of MPDUs for VI queue for TX aggr
817 * @tx_aggregation_size_vo: No. of MPDUs for VO queue for TX aggr
818 * @rx_aggregation_size: No. of MPDUs for RX aggr
stonez26388d02018-10-17 13:37:48 +0800819 * @tx_aggr_sw_retry_threshold_be: aggr sw retry threshold for BE
820 * @tx_aggr_sw_retry_threshold_bk: aggr sw retry threshold for BK
821 * @tx_aggr_sw_retry_threshold_vi: aggr sw retry threshold for VI
822 * @tx_aggr_sw_retry_threshold_vo: aggr sw retry threshold for VO
Paul Zhanga25f75a2019-04-12 17:11:14 +0800823 * @tx_aggr_sw_retry_threshold: aggr sw retry threshold
stonez26388d02018-10-17 13:37:48 +0800824 * @tx_non_aggr_sw_retry_threshold_be: non aggr sw retry threshold for BE
825 * @tx_non_aggr_sw_retry_threshold_bk: non aggr sw retry threshold for BK
826 * @tx_non_aggr_sw_retry_threshold_vi: non aggr sw retry threshold for VI
827 * @tx_non_aggr_sw_retry_threshold_vo: non aggr sw retry threshold for VO
Paul Zhanga25f75a2019-04-12 17:11:14 +0800828 * @tx_non_aggr_sw_retry_threshold: non aggr sw retry threshold
Pragaspathi Thilagaraj17afb842018-08-30 17:55:13 +0530829 * @sap_max_inactivity_override: Override updating ap_sta_inactivity from
830 * hostapd.conf
Pragaspathi Thilagaraj4b5c0602018-11-14 22:35:23 +0530831 * @sap_uapsd_enabled: Flag to enable/disable UAPSD for SAP
Pragaspathi Thilagaraj17afb842018-08-30 17:55:13 +0530832 */
833struct wlan_mlme_qos {
834 uint32_t tx_aggregation_size;
835 uint32_t tx_aggregation_size_be;
836 uint32_t tx_aggregation_size_bk;
837 uint32_t tx_aggregation_size_vi;
838 uint32_t tx_aggregation_size_vo;
839 uint32_t rx_aggregation_size;
840 uint32_t tx_aggr_sw_retry_threshold_be;
841 uint32_t tx_aggr_sw_retry_threshold_bk;
842 uint32_t tx_aggr_sw_retry_threshold_vi;
843 uint32_t tx_aggr_sw_retry_threshold_vo;
Paul Zhanga25f75a2019-04-12 17:11:14 +0800844 uint32_t tx_aggr_sw_retry_threshold;
stonez26388d02018-10-17 13:37:48 +0800845 uint32_t tx_non_aggr_sw_retry_threshold_be;
846 uint32_t tx_non_aggr_sw_retry_threshold_bk;
847 uint32_t tx_non_aggr_sw_retry_threshold_vi;
848 uint32_t tx_non_aggr_sw_retry_threshold_vo;
Paul Zhanga25f75a2019-04-12 17:11:14 +0800849 uint32_t tx_non_aggr_sw_retry_threshold;
Pragaspathi Thilagaraj17afb842018-08-30 17:55:13 +0530850 bool sap_max_inactivity_override;
Pragaspathi Thilagaraj4b5c0602018-11-14 22:35:23 +0530851 bool sap_uapsd_enabled;
Pragaspathi Thilagaraj17afb842018-08-30 17:55:13 +0530852};
853
Bala Venkatesh6d537092018-09-25 10:38:36 +0530854#ifdef WLAN_FEATURE_11AX
Bala Venkatesh9296f092018-09-21 16:25:24 +0530855#define MLME_HE_PPET_LEN 25
Bala Venkatesh2fae18a2018-11-14 12:32:45 +0530856#define WNI_CFG_HE_OPS_BSS_COLOR_MAX 0x3F
857
Bala Venkatesh9296f092018-09-21 16:25:24 +0530858/**
859 * struct wlan_mlme_he_caps - HE Capabilities related config items
860 */
861struct wlan_mlme_he_caps {
Bala Venkatesh6d537092018-09-25 10:38:36 +0530862 tDot11fIEhe_cap dot11_he_cap;
Kiran Kumar Lokere921b5a52019-02-24 21:53:20 -0800863 tDot11fIEhe_cap he_cap_orig;
Bala Venkatesh9296f092018-09-21 16:25:24 +0530864 uint8_t he_ppet_2g[MLME_HE_PPET_LEN];
865 uint8_t he_ppet_5g[MLME_HE_PPET_LEN];
866 uint32_t he_ops_basic_mcs_nss;
Bala Venkatesh6d537092018-09-25 10:38:36 +0530867 uint8_t he_dynamic_fragmentation;
Bala Venkatesh9296f092018-09-21 16:25:24 +0530868 uint8_t enable_ul_mimo;
869 uint8_t enable_ul_ofdm;
870 uint32_t he_sta_obsspd;
871};
Bala Venkatesh6d537092018-09-25 10:38:36 +0530872#endif
Bala Venkatesh9296f092018-09-21 16:25:24 +0530873
Pragaspathi Thilagaraj17afb842018-08-30 17:55:13 +0530874/**
gaurank kathpaliafa7ad0a2019-03-12 19:17:56 +0530875 * struct wlan_mlme_chain_cfg - Chain info related structure
876 * @max_tx_chains_2g: max tx chains supported in 2.4ghz band
877 * @max_rx_chains_2g: max rx chains supported in 2.4ghz band
878 * @max_tx_chains_5g: max tx chains supported in 5ghz band
879 * @max_rx_chains_5g: max rx chains supported in 5ghz band
880 */
881struct wlan_mlme_chain_cfg {
882 uint8_t max_tx_chains_2g;
883 uint8_t max_rx_chains_2g;
884 uint8_t max_tx_chains_5g;
885 uint8_t max_rx_chains_5g;
886};
887
888/**
gaurank kathpalia7ef72182019-05-29 19:41:25 +0530889 * struct mlme_tgt_caps - mlme related capability coming from target (FW)
890 * @data_stall_recovery_fw_support: does target supports data stall recovery.
891 *
892 * Add all the mlme-tgt related capablities here, and the public API would fill
893 * the related capability in the required mlme cfg structure.
894 */
895struct mlme_tgt_caps {
896 bool data_stall_recovery_fw_support;
897};
898
899/**
Karthik Kantamneni22dd0f62018-08-07 14:53:50 +0530900 * struct wlan_mlme_rates - RATES related config items
901 * @cfpPeriod: cfp period info
902 * @cfpMaxDuration: cfp Max duration info
903 * @max_htmcs_txdata: max HT mcs info for Tx
904 * @disable_abg_rate_txdata: disable abg rate info for tx data
905 * @sap_max_mcs_txdata: sap max mcs info
906 * @disable_high_ht_mcs_2x2: disable high mcs for 2x2 info
Karthik Kantamnenie3bbd7f2018-09-19 20:27:32 +0530907 * @supported_11b: supported 11B rates
908 * @supported_11a: supported 11A rates
909 * @opr_rate_set: operational rates set
910 * @ext_opr_rate_set: extended operational rates set
911 * @supported_mcs_set: supported MCS set
912 * @basic_mcs_set: basic MCS set
913 * @current_mcs_set: current MCS set
Karthik Kantamneni22dd0f62018-08-07 14:53:50 +0530914 */
915struct wlan_mlme_rates {
916 uint8_t cfp_period;
917 uint16_t cfp_max_duration;
918 uint16_t max_htmcs_txdata;
919 bool disable_abg_rate_txdata;
920 uint16_t sap_max_mcs_txdata;
921 uint8_t disable_high_ht_mcs_2x2;
Karthik Kantamnenie3bbd7f2018-09-19 20:27:32 +0530922 struct mlme_cfg_str supported_11b;
923 struct mlme_cfg_str supported_11a;
924 struct mlme_cfg_str opr_rate_set;
925 struct mlme_cfg_str ext_opr_rate_set;
926 struct mlme_cfg_str supported_mcs_set;
927 struct mlme_cfg_str basic_mcs_set;
928 struct mlme_cfg_str current_mcs_set;
Karthik Kantamneni22dd0f62018-08-07 14:53:50 +0530929};
930
Pragaspathi Thilagaraj1ee76002018-09-18 21:38:51 +0530931
932/* Flags for gLimProtectionControl that is updated in pe session*/
933#define MLME_FORCE_POLICY_PROTECTION_DISABLE 0
934#define MLME_FORCE_POLICY_PROTECTION_CTS 1
935#define MLME_FORCE_POLICY_PROTECTION_RTS 2
936#define MLME_FORCE_POLICY_PROTECTION_DUAL_CTS 3
937#define MLME_FORCE_POLICY_PROTECTION_RTS_ALWAYS 4
938#define MLME_FORCE_POLICY_PROTECTION_AUTO 5
939
940/* protection_enabled bits*/
941#define MLME_PROTECTION_ENABLED_FROM_llA 0
942#define MLME_PROTECTION_ENABLED_FROM_llB 1
943#define MLME_PROTECTION_ENABLED_FROM_llG 2
944#define MLME_PROTECTION_ENABLED_HT_20 3
945#define MLME_PROTECTION_ENABLED_NON_GF 4
946#define MLME_PROTECTION_ENABLED_LSIG_TXOP 5
947#define MLME_PROTECTION_ENABLED_RIFS 6
948#define MLME_PROTECTION_ENABLED_OBSS 7
949#define MLME_PROTECTION_ENABLED_OLBC_FROM_llA 8
950#define MLME_PROTECTION_ENABLED_OLBC_FROM_llB 9
951#define MLME_PROTECTION_ENABLED_OLBC_FROM_llG 10
952#define MLME_PROTECTION_ENABLED_OLBC_HT20 11
953#define MLME_PROTECTION_ENABLED_OLBC_NON_GF 12
954#define MLME_PROTECTION_ENABLED_OLBC_LSIG_TXOP 13
955#define MLME_PROTECTION_ENABLED_OLBC_RIFS 14
956#define MLME_PROTECTION_ENABLED_OLBC_OBSS 15
957
gaurank kathpaliae5a17e42018-09-10 10:05:25 +0530958/**
959 * struct wlan_mlme_feature_flag - feature related information
960 * @accept_short_slot_assoc: enable short sloc feature
961 * @enable_hcf: enable HCF feature
962 * @enable_rsn: enable RSN for connection
963 * @enable_short_preamble_11g: enable short preamble for 11g
Wu Gaoed616a12019-01-16 15:19:21 +0800964 * @enable_short_slot_time_11g
965 * @enable_ampdu: enable AMPDU feature
966 * @enable_mcc: enable MCC feature
967 * @mcc_rts_cts_prot: RTS-CTS protection in MCC
968 * @mcc_bcast_prob_rsp: broadcast Probe Response in MCC
gaurank kathpaliae5a17e42018-09-10 10:05:25 +0530969 * @channel_bonding_mode: channel bonding mode
970 * @enable_block_ack: enable block ack feature
Wu Gaoed616a12019-01-16 15:19:21 +0800971 * @channel_bonding_mode_24ghz: configures Channel Bonding in 24 GHz
972 * @channel_bonding_mode_5ghz: configures Channel Bonding in 5 GHz
gaurank kathpaliae5a17e42018-09-10 10:05:25 +0530973 */
gaurank kathpaliae5a17e42018-09-10 10:05:25 +0530974struct wlan_mlme_feature_flag {
975 bool accept_short_slot_assoc;
976 bool enable_hcf;
977 bool enable_rsn;
978 bool enable_short_preamble_11g;
979 bool enable_short_slot_time_11g;
Krunal Sonid2c33e12018-12-06 15:02:37 -0800980 bool enable_ampdu;
981 bool enable_mcc;
982 uint8_t mcc_rts_cts_prot;
983 uint8_t mcc_bcast_prob_rsp;
gaurank kathpaliae5a17e42018-09-10 10:05:25 +0530984 uint32_t channel_bonding_mode;
985 uint32_t enable_block_ack;
Wu Gaoed616a12019-01-16 15:19:21 +0800986 uint32_t channel_bonding_mode_24ghz;
987 uint32_t channel_bonding_mode_5ghz;
gaurank kathpaliae5a17e42018-09-10 10:05:25 +0530988};
989
Pragaspathi Thilagarajf4cc58b2018-07-31 00:39:05 +0530990/*
991 * struct wlan_mlme_sap_protection_cfg - SAP erp protection config items
Pragaspathi Thilagaraj1ee76002018-09-18 21:38:51 +0530992 * @ignore_peer_ht_opmode: Ignore the ht opmode of the peer. Dynamic via INI
Pragaspathi Thilagaraj4b5c0602018-11-14 22:35:23 +0530993 * @enable_ap_obss_protection: enable/disable AP OBSS protection
994 * @protection_force_policy: Protection force policy. Static via cfg
Pragaspathi Thilagarajf37f3932019-01-11 00:25:43 +0530995 * @is_ap_prot_enabled: Enable/disable SAP protection
Pragaspathi Thilagaraj4b5c0602018-11-14 22:35:23 +0530996 * @ap_protection_mode: AP protection bitmap
997 * @protection_enabled: Force enable protection. static via cfg
Pragaspathi Thilagarajf4cc58b2018-07-31 00:39:05 +0530998 */
999struct wlan_mlme_sap_protection {
Pragaspathi Thilagaraj1ee76002018-09-18 21:38:51 +05301000 bool ignore_peer_ht_opmode;
Pragaspathi Thilagaraj4b5c0602018-11-14 22:35:23 +05301001 bool enable_ap_obss_protection;
1002 uint8_t protection_force_policy;
Pragaspathi Thilagarajf37f3932019-01-11 00:25:43 +05301003 bool is_ap_prot_enabled;
Pragaspathi Thilagaraj4b5c0602018-11-14 22:35:23 +05301004 uint16_t ap_protection_mode;
1005 uint32_t protection_enabled;
Pragaspathi Thilagarajf4cc58b2018-07-31 00:39:05 +05301006};
1007
Pragaspathi Thilagarajce0a9d02018-08-18 01:17:23 +05301008/*
1009 * struct wlan_mlme_chainmask - All chainmask related cfg items
Pragaspathi Thilagaraj1ee76002018-09-18 21:38:51 +05301010 * @txchainmask1x1: To set transmit chainmask
1011 * @rxchainmask1x1: To set rx chainmask
1012 * @tx_chain_mask_cck: Used to enable/disable Cck ChainMask
1013 * @tx_chain_mask_1ss: Enables/disables tx chain Mask1ss
1014 * @num_11b_tx_chains: Number of Tx Chains in 11b mode
1015 * @num_11ag_tx_chains: Number of Tx Chains in 11ag mode
1016 * @tx_chain_mask_2g: Tx chain mask for 2g
1017 * @rx_chain_mask_2g: Tx chain mask for 2g
1018 * @tx_chain_mask_5g: Tx chain mask for 5g
1019 * @rx_chain_mask_5g: Rx chain mask for 5g
Pragaspathi Thilagaraj4b5c0602018-11-14 22:35:23 +05301020 * @enable_bt_chain_separation: Enable/Disable BT/WLAN Host chain seperation
Pragaspathi Thilagarajce0a9d02018-08-18 01:17:23 +05301021 */
1022struct wlan_mlme_chainmask {
1023 uint8_t txchainmask1x1;
1024 uint8_t rxchainmask1x1;
1025 bool tx_chain_mask_cck;
1026 uint8_t tx_chain_mask_1ss;
1027 uint16_t num_11b_tx_chains;
1028 uint16_t num_11ag_tx_chains;
1029 uint8_t tx_chain_mask_2g;
1030 uint8_t rx_chain_mask_2g;
1031 uint8_t tx_chain_mask_5g;
1032 uint8_t rx_chain_mask_5g;
Pragaspathi Thilagaraj4b5c0602018-11-14 22:35:23 +05301033 bool enable_bt_chain_separation;
Pragaspathi Thilagarajce0a9d02018-08-18 01:17:23 +05301034};
1035
Karthik Kantamneni24f71bc2018-09-11 19:08:38 +05301036/* struct wlan_mlme_generic - Generic CFG config items
1037 *
Vignesh Viswanathan7db3b042018-10-03 23:33:35 +05301038 * @band_capability: HW Band Capability - Both or 2.4G only or 5G only
1039 * @band: Current Band - Internal variable, initialized to INI and updated later
1040 * @select_5ghz_margin: RSSI margin to select 5Ghz over 2.4 Ghz
1041 * @sub_20_chan_width: Sub 20Mhz Channel Width
1042 * @ito_repeat_count: ITO Repeat Count
Karthik Kantamneni24f71bc2018-09-11 19:08:38 +05301043 * @pmf_sa_query_max_retries: PMF query max retries for SAP
1044 * @pmf_sa_query_retry_interval: PMF query retry interval for SAP
Vignesh Viswanathan7db3b042018-10-03 23:33:35 +05301045 * @dropped_pkt_disconnect_thresh: Threshold for dropped pkts before disconnect
Karthik Kantamneni9180c752018-11-14 12:14:17 +05301046 * @rtt_mac_randomization: Enable/Disable RTT MAC randomization
Vignesh Viswanathan7db3b042018-10-03 23:33:35 +05301047 * @rtt3_enabled: RTT3 enable or disable info
1048 * @prevent_link_down: Enable/Disable prevention of link down
1049 * @memory_deep_sleep: Enable/Disable memory deep sleep
1050 * @cck_tx_fir_override: Enable/Disable CCK Tx FIR Override
1051 * @crash_inject: Enable/Disable Crash Inject
1052 * @lpass_support: Enable/Disable LPASS Support
1053 * @self_recovery: Enable/Disable Self Recovery
1054 * @sap_dot11mc: Enable/Disable SAP 802.11mc support
1055 * @fatal_event_trigger: Enable/Disable Fatal Events Trigger
1056 * @optimize_ca_event: Enable/Disable Optimization of CA events
1057 * @fw_timeout_crash: Enable/Disable FW Timeout Crash *
Dundi Ravitejaf99ce092018-09-27 17:51:59 +05301058 * @debug_packet_log: Debug packet log flags
Abhinav Kumard4d6eb72018-12-04 20:30:37 +05301059 * @enabled_11h: enable 11h flag
1060 * @enabled_11d: enable 11d flag
Sourav Mohapatrac55bdf32018-12-13 16:16:50 +05301061 * @enable_beacon_reception_stats: enable beacon reception stats
Wu Gaof3cbeaf2019-01-15 18:26:25 +08001062 * @enable_remove_time_stamp_sync_cmd: Enable remove time stamp sync cmd
gaurank kathpalia7ef72182019-05-29 19:41:25 +05301063 * @data_stall_recovery_fw_support: whether FW supports Data stall recovery.
Pragaspathi Thilagaraja8893752019-02-06 19:58:59 +05301064 * @enable_change_channel_bandwidth: enable/disable change channel bw in mission
1065 * mode
Yeshwanth Sriram Guntukac52f24d2019-05-24 13:54:15 +05301066 * @disable_4way_hs_offload: enable/disable 4 way handshake offload to firmware
Karthik Kantamneni24f71bc2018-09-11 19:08:38 +05301067 */
1068struct wlan_mlme_generic {
Vignesh Viswanathan7db3b042018-10-03 23:33:35 +05301069 enum band_info band_capability;
1070 enum band_info band;
1071 uint8_t select_5ghz_margin;
1072 uint8_t sub_20_chan_width;
1073 uint8_t ito_repeat_count;
Karthik Kantamneni24f71bc2018-09-11 19:08:38 +05301074 uint8_t pmf_sa_query_max_retries;
1075 uint16_t pmf_sa_query_retry_interval;
Vignesh Viswanathan7db3b042018-10-03 23:33:35 +05301076 uint16_t dropped_pkt_disconnect_thresh;
Karthik Kantamneni9180c752018-11-14 12:14:17 +05301077 bool rtt_mac_randomization;
Vignesh Viswanathan7db3b042018-10-03 23:33:35 +05301078 bool rtt3_enabled;
1079 bool prevent_link_down;
1080 bool memory_deep_sleep;
1081 bool cck_tx_fir_override;
1082 bool crash_inject;
1083 bool lpass_support;
1084 bool self_recovery;
1085 bool sap_dot11mc;
1086 bool fatal_event_trigger;
1087 bool optimize_ca_event;
1088 bool fw_timeout_crash;
Dundi Ravitejaf99ce092018-09-27 17:51:59 +05301089 uint8_t debug_packet_log;
Abhinav Kumard4d6eb72018-12-04 20:30:37 +05301090 bool enabled_11h;
1091 bool enabled_11d;
Sourav Mohapatra0dfe5552018-11-16 11:29:54 +05301092 bool enable_deauth_to_disassoc_map;
Sourav Mohapatrac55bdf32018-12-13 16:16:50 +05301093 bool enable_beacon_reception_stats;
Wu Gaof3cbeaf2019-01-15 18:26:25 +08001094 bool enable_remove_time_stamp_sync_cmd;
gaurank kathpalia7ef72182019-05-29 19:41:25 +05301095 bool data_stall_recovery_fw_support;
Pragaspathi Thilagaraja8893752019-02-06 19:58:59 +05301096 bool enable_change_channel_bandwidth;
Yeshwanth Sriram Guntukac52f24d2019-05-24 13:54:15 +05301097 bool disable_4way_hs_offload;
Karthik Kantamneni24f71bc2018-09-11 19:08:38 +05301098};
1099
Jiachao Wu3304d6b2018-08-24 18:24:34 +08001100/*
1101 * struct wlan_mlme_product_details_cfg - product details config items
1102 * @manufacturer_name: manufacture name
1103 * @model_number: model number
1104 * @model_name: model name
1105 * @manufacture_product_name: manufacture product name
1106 * @manufacture_product_version: manufacture product version
1107 */
1108struct wlan_mlme_product_details_cfg {
1109 char manufacturer_name[WLAN_CFG_MFR_NAME_LEN + 1];
1110 char model_number[WLAN_CFG_MODEL_NUMBER_LEN + 1];
1111 char model_name[WLAN_CFG_MODEL_NAME_LEN + 1];
1112 char manufacture_product_name[WLAN_CFG_MFR_PRODUCT_NAME_LEN + 1];
1113 char manufacture_product_version[WLAN_CFG_MFR_PRODUCT_VERSION_LEN + 1];
1114};
1115
Harprit Chhabada1eeeb8d2018-09-14 15:16:56 -07001116/*
1117 * struct wlan_mlme_acs - All acs related cfg items
1118 * @is_acs_with_more_param - to enable acs with more param
1119 * @auto_channel_select_weight - to set acs channel weight
1120 * @is_vendor_acs_support - enable application based channel selection
1121 * @is_acs_support_for_dfs_ltecoex - enable channel for dfs and lte coex
1122 * @is_external_acs_policy - control external policy
1123 */
1124struct wlan_mlme_acs {
1125 bool is_acs_with_more_param;
1126 uint32_t auto_channel_select_weight;
1127 bool is_vendor_acs_support;
1128 bool is_acs_support_for_dfs_ltecoex;
1129 bool is_external_acs_policy;
1130};
1131
Arif Hussain178f35f2018-11-13 18:26:18 -08001132/*
1133 * struct wlan_mlme_cfg_twt - All twt related cfg items
1134 * @is_twt_bcast_enabled: twt capability for the session
1135 * @is_twt_enabled: global twt configuration
1136 * @is_twt_responder_enabled: twt responder
1137 * @is_twt_requestor_enabled: twt requestor
1138 * @twt_congestion_timeout: congestion timeout value
1139 */
1140struct wlan_mlme_cfg_twt {
1141 bool is_twt_bcast_enabled;
1142 bool is_twt_enabled;
1143 bool is_twt_responder_enabled;
1144 bool is_twt_requestor_enabled;
1145 uint32_t twt_congestion_timeout;
1146};
1147
Karthik Kantamneni22dd0f62018-08-07 14:53:50 +05301148/**
Wu Gaod8f3db02018-07-24 19:18:45 +08001149 * struct wlan_mlme_obss_ht40 - OBSS HT40 config items
1150 * @active_dwelltime: obss active dwelltime
1151 * @passive_dwelltime: obss passive dwelltime
1152 * @width_trigger_interval: obss trigger interval
1153 * @passive_per_channel: obss scan passive total duration per channel
1154 * @active_per_channel: obss scan active total duration per channel
1155 * @width_trans_delay: obss width transition delay
1156 * @scan_activity_threshold: obss scan activity threshold
Wu Gaofc81ecf2018-11-22 11:38:41 +08001157 * @is_override_ht20_40_24g: use channel bonding in 2.4 GHz
Wu Gao2255ea22019-01-04 15:44:35 +08001158 * @obss_detection_offload_enabled: Enable OBSS detection offload
1159 * @obss_color_collision_offload_enabled: Enable obss color collision
Wu Gaod8f3db02018-07-24 19:18:45 +08001160 */
1161struct wlan_mlme_obss_ht40 {
1162 uint32_t active_dwelltime;
1163 uint32_t passive_dwelltime;
1164 uint32_t width_trigger_interval;
1165 uint32_t passive_per_channel;
1166 uint32_t active_per_channel;
1167 uint32_t width_trans_delay;
1168 uint32_t scan_activity_threshold;
Wu Gaofc81ecf2018-11-22 11:38:41 +08001169 bool is_override_ht20_40_24g;
Wu Gao2255ea22019-01-04 15:44:35 +08001170 bool obss_detection_offload_enabled;
1171 bool obss_color_collision_offload_enabled;
Wu Gaod8f3db02018-07-24 19:18:45 +08001172};
1173
1174/**
Wu Gao406c53c2018-09-10 13:51:37 +08001175 * enum dot11p_mode - The 802.11p mode of operation
1176 * @WLAN_HDD_11P_DISABLED: 802.11p mode is disabled
1177 * @WLAN_HDD_11P_STANDALONE: 802.11p-only operation
1178 * @WLAN_HDD_11P_CONCURRENT: 802.11p and WLAN operate concurrently
1179 */
1180enum dot11p_mode {
1181 CFG_11P_DISABLED = 0,
1182 CFG_11P_STANDALONE,
1183 CFG_11P_CONCURRENT,
1184};
1185
gaurank kathpalia6c9d1c32018-10-08 15:11:59 +05301186#define MAX_VDEV_NSS 2
1187#define MAX_VDEV_CHAINS 2
1188
1189/**
1190 * struct wlan_mlme_nss_chains - MLME vdev config of nss, and chains
1191 * @num_tx_chains: tx chains of vdev config
1192 * @num_rx_chains: rx chains of vdev config
1193 * @tx_nss: tx nss of vdev config
1194 * @rx_nss: rx nss of vdev config
1195 * @num_tx_chains_11b: number of tx chains in 11b mode
1196 * @num_tx_chains_11g: number of tx chains in 11g mode
1197 * @num_tx_chains_11a: number of tx chains in 11a mode
1198 * @disable_rx_mrc: disable 2 rx chains, in rx nss 1 mode
1199 * @disable_tx_mrc: disable 2 tx chains, in tx nss 1 mode
1200 */
1201struct wlan_mlme_nss_chains {
gaurank kathpaliab414bce2018-11-09 18:44:46 +05301202 uint32_t num_tx_chains[NSS_CHAINS_BAND_MAX];
1203 uint32_t num_rx_chains[NSS_CHAINS_BAND_MAX];
1204 uint32_t tx_nss[NSS_CHAINS_BAND_MAX];
1205 uint32_t rx_nss[NSS_CHAINS_BAND_MAX];
gaurank kathpalia6c9d1c32018-10-08 15:11:59 +05301206 uint32_t num_tx_chains_11b;
1207 uint32_t num_tx_chains_11g;
1208 uint32_t num_tx_chains_11a;
gaurank kathpaliab414bce2018-11-09 18:44:46 +05301209 bool disable_rx_mrc[NSS_CHAINS_BAND_MAX];
1210 bool disable_tx_mrc[NSS_CHAINS_BAND_MAX];
gaurank kathpalia6c9d1c32018-10-08 15:11:59 +05301211};
1212
1213/**
Sourav Mohapatra0dfe5552018-11-16 11:29:54 +05301214 * enum station_keepalive_method - available keepalive methods for stations
1215 * @MLME_STA_KEEPALIVE_NULL_DATA: null data packet
1216 * @MLME_STA_KEEPALIVE_GRAT_ARP: gratuitous ARP packet
1217 * @MLME_STA_KEEPALIVE_COUNT: number of method options available
1218 */
1219enum station_keepalive_method {
1220 MLME_STA_KEEPALIVE_NULL_DATA,
1221 MLME_STA_KEEPALIVE_GRAT_ARP,
1222 /* keep at the end */
1223 MLME_STA_KEEPALIVE_COUNT
1224};
1225
1226/**
Wu Gao406c53c2018-09-10 13:51:37 +08001227 * struct wlan_mlme_sta_cfg - MLME STA configuration items
1228 * @sta_keep_alive_period: Sends NULL frame to AP period
1229 * @tgt_gtx_usr_cfg: Target gtx user config
1230 * @pmkid_modes: Enable PMKID modes
1231 * @wait_cnf_timeout: Wait assoc cnf timeout
Krunal Sonid2c33e12018-12-06 15:02:37 -08001232 * @sta_miracast_mcc_rest_time: STA+MIRACAST(P2P) MCC rest time
Wu Gao406c53c2018-09-10 13:51:37 +08001233 * @dot11p_mode: Set 802.11p mode
1234 * @fils_max_chan_guard_time: Set maximum channel guard time
1235 * @current_rssi: Current rssi
1236 * @ignore_peer_erp_info: Ignore peer infrormation
1237 * @sta_prefer_80mhz_over_160mhz: Set Sta preference to connect in 80HZ/160HZ
1238 * @enable_5g_ebt: Set default 5G early beacon termination
1239 * @deauth_before_connection: Send deauth before connection or not
1240 * @enable_go_cts2self_for_sta: Stop NOA and start using cts2self
1241 * @qcn_ie_support: QCN IE support
1242 * @force_rsne_override: Force rsnie override from user
1243 * @single_tid: Set replay counter for all TID
Wu Gao4f8938a2018-11-26 11:49:00 +08001244 * @allow_tpc_from_ap: Support for AP power constraint
Wu Gao406c53c2018-09-10 13:51:37 +08001245 */
1246struct wlan_mlme_sta_cfg {
1247 uint32_t sta_keep_alive_period;
1248 uint32_t tgt_gtx_usr_cfg;
1249 uint32_t pmkid_modes;
1250 uint32_t wait_cnf_timeout;
Krunal Sonid2c33e12018-12-06 15:02:37 -08001251 uint32_t sta_miracast_mcc_rest_time;
Dustin Brown686d3032018-10-17 16:58:50 -07001252 enum dot11p_mode dot11p_mode;
Wu Gao406c53c2018-09-10 13:51:37 +08001253 uint8_t fils_max_chan_guard_time;
1254 uint8_t current_rssi;
1255 bool ignore_peer_erp_info;
1256 bool sta_prefer_80mhz_over_160mhz;
1257 bool enable_5g_ebt;
1258 bool deauth_before_connection;
1259 bool enable_go_cts2self_for_sta;
1260 bool qcn_ie_support;
1261 bool force_rsne_override;
1262 bool single_tid;
Wu Gao4f8938a2018-11-26 11:49:00 +08001263 bool allow_tpc_from_ap;
Sourav Mohapatra0dfe5552018-11-16 11:29:54 +05301264 enum station_keepalive_method sta_keepalive_method;
Wu Gao406c53c2018-09-10 13:51:37 +08001265};
1266
Wu Gao5d23d782018-11-08 16:09:47 +08001267/**
Arif Hussaincca60432018-12-03 19:45:12 -08001268 * struct wlan_mlme_stats_cfg - MLME stats configuration items
1269 * @stats_periodic_display_time: time after which stats will be printed
1270 * @stats_link_speed_rssi_high: rssi link speed, high
1271 * @stats_link_speed_rssi_med: medium rssi link speed
1272 * @stats_link_speed_rssi_low: rssi link speed, low
1273 * @stats_report_max_link_speed_rssi: report speed limit
1274 */
1275struct wlan_mlme_stats_cfg {
1276 uint32_t stats_periodic_display_time;
1277 int stats_link_speed_rssi_high;
1278 int stats_link_speed_rssi_med;
1279 int stats_link_speed_rssi_low;
1280 uint32_t stats_report_max_link_speed_rssi;
1281};
1282
1283/**
Wu Gao5d23d782018-11-08 16:09:47 +08001284 * enum roaming_dfs_channel_type - Allow dfs channel in roam
1285 * @CFG_ROAMING_DFS_CHANNEL_DISABLED: Disallow dfs channel in roam
1286 * @CFG_ROAMING_DFS_CHANNEL_ENABLED_NORMAL: Allow dfs channel
1287 * @CFG_ROAMING_DFS_CHANNEL_ENABLED_ACTIVE: Allow dfs channel with active scan
1288 */
1289enum roaming_dfs_channel_type {
1290 ROAMING_DFS_CHANNEL_DISABLED,
1291 ROAMING_DFS_CHANNEL_ENABLED_NORMAL,
1292 ROAMING_DFS_CHANNEL_ENABLED_ACTIVE,
1293};
1294
Wu Gao55f21712018-09-17 10:57:49 +08001295/*
Pragaspathi Thilagaraj69f0b692018-12-16 22:23:04 +05301296 * struct bss_load_trigger - parameters related to bss load triggered roam
Pragaspathi Thilagaraj39d61602018-12-24 14:46:53 +05301297 * @enabled: flag to check if this trigger is enabled/disabled
1298 * @threshold: Bss load threshold value above which roaming should start
1299 * @sample_time: Time duration in milliseconds for which the bss load value
1300 * should be monitored
Pragaspathi Thilagaraj2b8ea352019-04-12 02:23:50 +05301301 * @rssi_threshold_5ghz: RSSI threshold of the current connected AP below which
1302 * roam should be triggered if bss load threshold exceeds the configured value.
1303 * This value is applicable only when we are connected in 5GHz band.
1304 * @rssi_threshold_24ghz: RSSI threshold of the current connected AP below which
1305 * roam should be triggered if bss load threshold exceeds the configured value.
1306 * This value is applicable only when we are connected in 2.4 GHz band.
Pragaspathi Thilagaraj69f0b692018-12-16 22:23:04 +05301307 */
1308struct bss_load_trigger {
1309 bool enabled;
1310 uint32_t threshold;
Pragaspathi Thilagaraj39d61602018-12-24 14:46:53 +05301311 uint32_t sample_time;
Pragaspathi Thilagaraj2b8ea352019-04-12 02:23:50 +05301312 int32_t rssi_threshold_5ghz;
1313 int32_t rssi_threshold_24ghz;
Pragaspathi Thilagaraj69f0b692018-12-16 22:23:04 +05301314};
1315
1316/*
Pragaspathi Thilagarajeb367282019-02-19 00:42:28 +05301317 * AKM suites supported by firmware for
1318 * roaming
1319 */
1320#define AKM_FT_SAE 0
1321#define AKM_FT_SUITEB_SHA384 1
1322#define AKM_FT_FILS 2
1323
1324/*
Wu Gao55f21712018-09-17 10:57:49 +08001325 * @mawc_roam_enabled: Enable/Disable MAWC during roaming
1326 * @enable_fast_roam_in_concurrency:Enable LFR roaming on STA during concurrency
1327 * @lfr3_roaming_offload: Enable/disable roam offload feature
Pragaspathi Thilagaraj14f72de2019-03-28 23:12:51 +05301328 * @enable_disconnect_roam_offload: enable disassoc/deauth roam scan.
1329 * @enable_idle_roam: flag to enable/disable idle roam in fw
1330 * @idle_roam_rssi_delta: rssi delta of connected ap which is used to
1331 * identify if the AP is idle or in motion
1332 * @idle_roam_inactive_time: Timeout value in seconds, above which the
1333 * connection is idle
1334 * @idle_data_packet_count: data packet count measured during inactive time,
1335 * below which the connection is idle.
1336 * @idle_roam_min_rssi: Minimum rssi of connected AP to be considered for
1337 * idle roam trigger.
Wu Gao55f21712018-09-17 10:57:49 +08001338 * @early_stop_scan_enable: Set early stop scan
Wu Gao55f21712018-09-17 10:57:49 +08001339 * @enable_5g_band_pref: Enable preference for 5G from INI
Wu Gao5d23d782018-11-08 16:09:47 +08001340 * @ese_enabled: Enable ESE feature
1341 * @lfr_enabled: Enable fast roaming
1342 * @mawc_enabled: Enable MAWC
1343 * @fast_transition_enabled: Enable fast transition
1344 * @wes_mode_enabled: Enable WES mode
Wu Gao55f21712018-09-17 10:57:49 +08001345 * @mawc_roam_traffic_threshold: Configure traffic threshold
1346 * @mawc_roam_ap_rssi_threshold: Best AP RSSI threshold
1347 * @mawc_roam_rssi_high_adjust: Adjust MAWC roam high RSSI
1348 * @mawc_roam_rssi_low_adjust: Adjust MAWC roam low RSSI
1349 * @roam_rssi_abs_threshold: The min RSSI of the candidate AP
1350 * @rssi_threshold_offset_5g: Lookup threshold offset for 5G band
1351 * @early_stop_scan_min_threshold: Set early stop scan min
1352 * @early_stop_scan_max_threshold: Set early stop scan max
1353 * @first_scan_bucket_threshold: Set first scan bucket
1354 * @roam_dense_traffic_threshold: Dense traffic threshold
1355 * @roam_dense_rssi_thre_offset: Sets dense roam RSSI threshold diff
1356 * @roam_dense_min_aps: Sets minimum number of AP for dense roam
1357 * @roam_bg_scan_bad_rssi_threshold:RSSI threshold for background roam
1358 * @roam_bg_scan_client_bitmap: Bitmap used to identify the scan clients
1359 * @roam_bg_scan_bad_rssi_offset_2g:RSSI threshold offset for 2G to 5G roam
1360 * @adaptive_roamscan_dwell_mode: Sets dwell time adaptive mode
1361 * @per_roam_enable: To enabled/disable PER based roaming in FW
1362 * @per_roam_config_high_rate_th: Rate at which PER based roam will stop
1363 * @per_roam_config_low_rate_th: Rate at which PER based roam will start
1364 * @per_roam_config_rate_th_percent:Percentage at which FW will issue roam scan
1365 * @per_roam_rest_time: FW will wait once it issues a roam scan.
1366 * @per_roam_monitor_time: Min time to be considered as valid scenario
1367 * @per_roam_min_candidate_rssi: Min roamable AP RSSI for candidate selection
1368 * @lfr3_disallow_duration: Disallow duration before roaming
1369 * @lfr3_rssi_channel_penalization: RSSI penalization
1370 * @lfr3_num_disallowed_aps: Max number of AP's to maintain in LCA list
1371 * @rssi_boost_threshold_5g: Boost threshold above which 5 GHz is favored
1372 * @rssi_boost_factor_5g: Factor by which 5GHz RSSI is boosted
1373 * @max_rssi_boost_5g: Maximum boost that can be applied to 5G RSSI
1374 * @rssi_penalize_threshold_5g: Penalize thres above which 5G isn't favored
1375 * @rssi_penalize_factor_5g: Factor by which 5GHz RSSI is penalizeed
1376 * @max_rssi_penalize_5g: Max penalty that can be applied to 5G RSSI
1377 * @max_num_pre_auth: Configure max number of pre-auth
Sourav Mohapatra5ba8da32018-07-16 09:21:15 +05301378 * @roam_preauth_retry_count: Configure the max number of preauth retry
1379 * @roam_preauth_no_ack_timeout: Configure the no ack timeout period
Wu Gao5d23d782018-11-08 16:09:47 +08001380 * @roam_rssi_diff: Enable roam based on rssi
1381 * @roam_scan_offload_enabled: Enable Roam Scan Offload
1382 * @neighbor_scan_timer_period: Neighbor scan timer period
1383 * @neighbor_scan_min_timer_period: Min neighbor scan timer period
1384 * @neighbor_lookup_rssi_threshold: Neighbor lookup rssi threshold
1385 * @opportunistic_scan_threshold_diff: Set oppurtunistic threshold diff
1386 * @roam_rescan_rssi_diff: Sets RSSI for Scan trigger in firmware
1387 * @neighbor_scan_min_chan_time: Neighbor scan channel min time
1388 * @neighbor_scan_max_chan_time: Neighbor scan channel max time
1389 * @neighbor_scan_results_refresh_period: Neighbor scan refresh period
1390 * @empty_scan_refresh_period: Empty scan refresh period
1391 * @roam_bmiss_first_bcnt: First beacon miss count
1392 * @roam_bmiss_final_bcnt: Final beacon miss count
1393 * @roam_beacon_rssi_weight: Beacon miss weight
1394 * @roaming_dfs_channel: Allow dfs channel in roam
1395 * @roam_scan_hi_rssi_maxcount: 5GHz maximum scan count
1396 * @roam_scan_hi_rssi_delta: RSSI Delta for scan trigger
1397 * @roam_scan_hi_rssi_delay: Minimum delay between 5GHz scans
1398 * @roam_scan_hi_rssi_ub: Upper bound after which 5GHz scan
1399 * @roam_prefer_5ghz: Prefer roaming to 5GHz Bss
1400 * @roam_intra_band: Prefer roaming within Band
Pragaspathi Thilagaraj1f3f99f2019-04-24 23:48:47 +05301401 * @enable_adaptive_11r Flag to check if adaptive 11r ini is enabled
1402 * @tgt_adaptive_11r_cap: Flag to check if target supports adaptive
1403 * 11r
Wu Gao5d23d782018-11-08 16:09:47 +08001404 * @roam_scan_home_away_time: The home away time to firmware
1405 * @roam_scan_n_probes: The number of probes to be sent for firmware roaming
1406 * @delay_before_vdev_stop:Wait time for tx complete before vdev stop
1407 * @neighbor_scan_channel_list: Neighbor scan channel list
1408 * @neighbor_scan_channel_list_num: Neighbor scan channel list number
Wu Gao6294afc2019-01-05 00:00:58 +08001409 * @enable_lfr_subnet_detection: Enable LFR3 subnet detection
1410 * @ho_delay_for_rx: Delay hand-off by this duration to receive
1411 * @min_delay_btw_roam_scans: Min duration
1412 * @roam_trigger_reason_bitmask: Contains roam_trigger_reasons
1413 * @enable_ftopen: Enable/disable FT open feature
1414 * @roam_force_rssi_trigger: Force RSSI trigger or not
Abhinav Kumar990fea62019-02-14 12:38:38 +05301415 * @roaming_scan_policy: Config roaming scan policy in fw
Pragaspathi Thilagaraj2b8ea352019-04-12 02:23:50 +05301416 * @roam_scan_inactivity_time: Device inactivity monitoring time in
1417 * milliseconds for which the device is considered to be inactive.
1418 * @roam_inactive_data_packet_count: Maximum allowed data packets count
1419 * during roam_scan_inactivity_time.
1420 * @roam_scan_period_after_inactivity: Roam scan period after device was in
1421 * inactive state
Pragaspathi Thilagarajeb367282019-02-19 00:42:28 +05301422 * @fw_akm_bitmap: Supported Akm suites of firmware
Wu Gao55f21712018-09-17 10:57:49 +08001423 */
1424struct wlan_mlme_lfr_cfg {
1425 bool mawc_roam_enabled;
1426 bool enable_fast_roam_in_concurrency;
Wu Gao5d23d782018-11-08 16:09:47 +08001427#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Wu Gao55f21712018-09-17 10:57:49 +08001428 bool lfr3_roaming_offload;
Pragaspathi Thilagaraj14f72de2019-03-28 23:12:51 +05301429 bool enable_disconnect_roam_offload;
1430 bool enable_idle_roam;
1431 uint32_t idle_roam_rssi_delta;
1432 uint32_t idle_roam_inactive_time;
1433 uint32_t idle_data_packet_count;
1434 uint32_t idle_roam_band;
1435 int32_t idle_roam_min_rssi;
Wu Gao5d23d782018-11-08 16:09:47 +08001436#endif
Wu Gao55f21712018-09-17 10:57:49 +08001437 bool early_stop_scan_enable;
Wu Gao55f21712018-09-17 10:57:49 +08001438 bool enable_5g_band_pref;
Wu Gao5d23d782018-11-08 16:09:47 +08001439#ifdef FEATURE_WLAN_ESE
1440 bool ese_enabled;
1441#endif
1442 bool lfr_enabled;
1443 bool mawc_enabled;
1444 bool fast_transition_enabled;
1445 bool wes_mode_enabled;
Wu Gao55f21712018-09-17 10:57:49 +08001446 uint32_t mawc_roam_traffic_threshold;
1447 uint32_t mawc_roam_ap_rssi_threshold;
1448 uint32_t mawc_roam_rssi_high_adjust;
1449 uint32_t mawc_roam_rssi_low_adjust;
1450 uint32_t roam_rssi_abs_threshold;
1451 uint8_t rssi_threshold_offset_5g;
1452 uint8_t early_stop_scan_min_threshold;
1453 uint8_t early_stop_scan_max_threshold;
1454 uint8_t first_scan_bucket_threshold;
1455 uint32_t roam_dense_traffic_threshold;
1456 uint32_t roam_dense_rssi_thre_offset;
1457 uint32_t roam_dense_min_aps;
1458 uint32_t roam_bg_scan_bad_rssi_threshold;
1459 uint32_t roam_bg_scan_client_bitmap;
1460 uint32_t roam_bg_scan_bad_rssi_offset_2g;
1461 uint32_t adaptive_roamscan_dwell_mode;
1462 uint32_t per_roam_enable;
1463 uint32_t per_roam_config_high_rate_th;
1464 uint32_t per_roam_config_low_rate_th;
1465 uint32_t per_roam_config_rate_th_percent;
1466 uint32_t per_roam_rest_time;
1467 uint32_t per_roam_monitor_time;
1468 uint32_t per_roam_min_candidate_rssi;
1469 uint32_t lfr3_disallow_duration;
1470 uint32_t lfr3_rssi_channel_penalization;
1471 uint32_t lfr3_num_disallowed_aps;
1472 uint32_t rssi_boost_threshold_5g;
1473 uint32_t rssi_boost_factor_5g;
1474 uint32_t max_rssi_boost_5g;
1475 uint32_t rssi_penalize_threshold_5g;
1476 uint32_t rssi_penalize_factor_5g;
1477 uint32_t max_rssi_penalize_5g;
1478 uint32_t max_num_pre_auth;
Sourav Mohapatra5ba8da32018-07-16 09:21:15 +05301479 uint32_t roam_preauth_retry_count;
1480 uint32_t roam_preauth_no_ack_timeout;
Wu Gao5d23d782018-11-08 16:09:47 +08001481 uint32_t roam_rssi_diff;
1482 bool roam_scan_offload_enabled;
1483 uint32_t neighbor_scan_timer_period;
1484 uint32_t neighbor_scan_min_timer_period;
1485 uint32_t neighbor_lookup_rssi_threshold;
1486 uint32_t opportunistic_scan_threshold_diff;
1487 uint32_t roam_rescan_rssi_diff;
1488 uint16_t neighbor_scan_min_chan_time;
1489 uint16_t neighbor_scan_max_chan_time;
1490 uint32_t neighbor_scan_results_refresh_period;
1491 uint32_t empty_scan_refresh_period;
1492 uint8_t roam_bmiss_first_bcnt;
1493 uint8_t roam_bmiss_final_bcnt;
1494 uint32_t roam_beacon_rssi_weight;
1495 enum roaming_dfs_channel_type roaming_dfs_channel;
1496 uint32_t roam_scan_hi_rssi_maxcount;
1497 uint32_t roam_scan_hi_rssi_delta;
1498 uint32_t roam_scan_hi_rssi_delay;
1499 uint32_t roam_scan_hi_rssi_ub;
1500 bool roam_prefer_5ghz;
1501 bool roam_intra_band;
Pragaspathi Thilagaraj1f3f99f2019-04-24 23:48:47 +05301502#ifdef WLAN_ADAPTIVE_11R
1503 bool enable_adaptive_11r;
1504 bool tgt_adaptive_11r_cap;
1505#endif
Wu Gao5d23d782018-11-08 16:09:47 +08001506 uint16_t roam_scan_home_away_time;
1507 uint32_t roam_scan_n_probes;
1508 uint8_t delay_before_vdev_stop;
1509 uint8_t neighbor_scan_channel_list[CFG_VALID_CHANNEL_LIST_LEN];
1510 uint8_t neighbor_scan_channel_list_num;
Wu Gao6294afc2019-01-05 00:00:58 +08001511#ifdef FEATURE_LFR_SUBNET_DETECTION
1512 bool enable_lfr_subnet_detection;
1513#endif
1514 uint8_t ho_delay_for_rx;
1515 uint8_t min_delay_btw_roam_scans;
1516 uint32_t roam_trigger_reason_bitmask;
1517 bool enable_ftopen;
1518 bool roam_force_rssi_trigger;
Pragaspathi Thilagaraj69f0b692018-12-16 22:23:04 +05301519 struct bss_load_trigger bss_load_trig;
Abhinav Kumar990fea62019-02-14 12:38:38 +05301520 bool roaming_scan_policy;
Pragaspathi Thilagaraj2b8ea352019-04-12 02:23:50 +05301521 uint32_t roam_scan_inactivity_time;
1522 uint32_t roam_inactive_data_packet_count;
1523 uint32_t roam_scan_period_after_inactivity;
Pragaspathi Thilagarajeb367282019-02-19 00:42:28 +05301524 uint32_t fw_akm_bitmap;
Wu Gao55f21712018-09-17 10:57:49 +08001525};
1526
Wu Gao406c53c2018-09-10 13:51:37 +08001527/**
Abhinav Kumar7d6f1ac2018-09-01 18:33:56 +05301528 * struct wlan_mlme_wmm_config - WMM configuration
1529 * @wmm_mode: Enable WMM feature
1530 * @b80211e_is_enabled: Enable 802.11e feature
1531 * @uapsd_mask: what ACs to setup U-APSD for at assoc
1532 * @bimplicit_qos_enabled: Enable implicit QOS
1533 */
1534struct wlan_mlme_wmm_config {
1535 uint8_t wmm_mode;
1536 bool b80211e_is_enabled;
1537 uint8_t uapsd_mask;
1538 bool bimplicit_qos_enabled;
1539};
1540
1541/**
Abhinav Kumarab576712018-11-05 14:32:49 +05301542 * struct wlan_mlme_wmm_tspec_element - Default TSPEC parameters
1543 * from the wmm spec
1544 * @inactivity_interval: inactivity_interval as per wmm spec
1545 * @burst_size_def: TS burst size
1546 * @ts_ack_policy: TS Info ACK policy
1547 * @ts_acm_is_off: ACM is off for AC
1548 */
1549struct wlan_mlme_wmm_tspec_element {
1550#ifdef FEATURE_WLAN_ESE
1551 uint32_t inactivity_intv;
1552#endif
1553 bool burst_size_def;
1554 enum mlme_ts_info_ack_policy ts_ack_policy;
1555 bool ts_acm_is_off;
1556};
1557
1558/**
Abhinav Kumar18b45cd2018-09-21 12:35:22 +05301559 * struct wlan_mlme_wmm_ac_vo - Default TSPEC parameters
1560 * for AC_VO
1561 * @dir_ac_vo: TSPEC direction for VO
1562 * @nom_msdu_size_ac_vo: normal MSDU size for VO
1563 * @mean_data_rate_ac_vo: mean data rate for VO
1564 * @min_phy_rate_ac_vo: min PHY rate for VO
1565 * @sba_ac_vo: surplus bandwidth allowance for VO
1566 * @uapsd_vo_srv_intv: Uapsd service interval for voice
1567 * @uapsd_vo_sus_intv: Uapsd suspension interval for voice
1568 */
1569struct wlan_mlme_wmm_ac_vo {
1570 uint8_t dir_ac_vo;
1571 uint16_t nom_msdu_size_ac_vo;
1572 uint32_t mean_data_rate_ac_vo;
1573 uint32_t min_phy_rate_ac_vo;
1574 uint16_t sba_ac_vo;
1575 uint32_t uapsd_vo_srv_intv;
1576 uint32_t uapsd_vo_sus_intv;
1577};
1578
1579/**
Abhinav Kumar4c8e0262018-10-06 16:50:27 +05301580 * struct wlan_mlme_wmm_ac_vi - Default TSPEC parameters
1581 * for AC_VI
1582 * @dir_ac_vi: TSPEC direction for VI
1583 * @nom_msdu_size_ac_vi: normal MSDU size for VI
1584 * @mean_data_rate_ac_vi: mean data rate for VI
1585 * @min_phy_rate_ac_vi: min PHY rate for VI
1586 * @sba_ac_vi: surplus bandwidth allowance for VI
1587 * @uapsd_vo_srv_intv: Uapsd service interval for VI
1588 * @uapsd_vo_sus_intv: Uapsd suspension interval for VI
1589 */
1590struct wlan_mlme_wmm_ac_vi {
1591 uint8_t dir_ac_vi;
1592 uint16_t nom_msdu_size_ac_vi;
1593 uint32_t mean_data_rate_ac_vi;
1594 uint32_t min_phy_rate_ac_vi;
1595 uint16_t sba_ac_vi;
1596 uint32_t uapsd_vi_srv_intv;
1597 uint32_t uapsd_vi_sus_intv;
1598};
1599
1600/**
Abhinav Kumare94f2482018-08-19 12:37:36 +05301601 * struct wlan_mlme_wmm_ac_be - Default TSPEC parameters
1602 * for AC_BE
1603 * @dir_ac_be: TSPEC direction for BE
1604 * @nom_msdu_size_ac_be: normal MSDU size for BE
1605 * @mean_data_rate_ac_be: mean data rate for BE
1606 * @min_phy_rate_ac_be: min PHY rate for BE
1607 * @sba_ac_be: surplus bandwidth allowance for BE
1608 * @uapsd_be_srv_intv: Uapsd service interval for BE
1609 * @uapsd_be_sus_intv: Uapsd suspension interval for BE
1610
1611 */
1612struct wlan_mlme_wmm_ac_be {
1613 uint8_t dir_ac_be;
1614 uint16_t nom_msdu_size_ac_be;
1615 uint32_t mean_data_rate_ac_be;
1616 uint32_t min_phy_rate_ac_be;
1617 uint16_t sba_ac_be;
1618 uint32_t uapsd_be_srv_intv;
1619 uint32_t uapsd_be_sus_intv;
1620
1621};
1622
1623/**
Abhinav Kumar2af8c122018-08-19 13:49:52 +05301624 * struct wlan_mlme_wmm_ac_bk - Default TSPEC parameters
1625 * for AC_BK
1626 * @dir_ac_bk: TSPEC direction for BK
1627 * @nom_msdu_size_ac_bk: normal MSDU size for BK
1628 * @mean_data_rate_ac_bk: mean data rate for BK
1629 * @min_phy_rate_ac_bk: min PHY rate for BK
1630 * @sba_ac_bk: surplus bandwidth allowance for BK
1631 * @uapsd_bk_srv_intv: Uapsd service interval for BK
1632 * @uapsd_bk_sus_intv: Uapsd suspension interval for BK
1633 */
1634struct wlan_mlme_wmm_ac_bk {
1635 uint8_t dir_ac_bk;
1636 uint16_t nom_msdu_size_ac_bk;
1637 uint32_t mean_data_rate_ac_bk;
1638 uint32_t min_phy_rate_ac_bk;
1639 uint16_t sba_ac_bk;
1640 uint32_t uapsd_bk_srv_intv;
1641 uint32_t uapsd_bk_sus_intv;
1642};
1643
1644/**
Abhinav Kumar18b45cd2018-09-21 12:35:22 +05301645 * struct wlan_mlme_wmm_params - WMM CFG Items
Pragaspathi Thilagarajec7dc252018-09-06 15:38:49 +05301646 * @qos_enabled: AP is enabled with 11E
1647 * @wme_enabled: AP is enabled with WMM
1648 * @max_sp_length: Maximum SP Length
1649 * @wsm_enabled: AP is enabled with WSM
Abhinav Kumarab576712018-11-05 14:32:49 +05301650 * @edca_profile: WMM Edca profile
1651 * @wmm_config: WMM configuration
1652 * @wmm_tspec_element: Default TSPEC parameters
Abhinav Kumar18b45cd2018-09-21 12:35:22 +05301653 * @ac_vo: Default TSPEC parameters for AC_VO
Abhinav Kumar4c8e0262018-10-06 16:50:27 +05301654 * @ac_vi: Default TSPEC parameters for AC_VI
Abhinav Kumare94f2482018-08-19 12:37:36 +05301655 * @ac_be: Default TSPEC parameters for AC_BE
Abhinav Kumar2af8c122018-08-19 13:49:52 +05301656 * @ac_bk: Default TSPEC parameters for AC_BK
Abhinav Kumarc8c21502018-12-05 15:17:39 +05301657 * @delayed_trigger_frm_int: delay int(in ms) of UAPSD auto trigger
Pragaspathi Thilagarajec7dc252018-09-06 15:38:49 +05301658 */
1659struct wlan_mlme_wmm_params {
1660 bool qos_enabled;
1661 bool wme_enabled;
1662 uint8_t max_sp_length;
1663 bool wsm_enabled;
1664 uint32_t edca_profile;
Abhinav Kumar7d6f1ac2018-09-01 18:33:56 +05301665 struct wlan_mlme_wmm_config wmm_config;
Abhinav Kumarab576712018-11-05 14:32:49 +05301666 struct wlan_mlme_wmm_tspec_element wmm_tspec_element;
Abhinav Kumar18b45cd2018-09-21 12:35:22 +05301667 struct wlan_mlme_wmm_ac_vo ac_vo;
Abhinav Kumar4c8e0262018-10-06 16:50:27 +05301668 struct wlan_mlme_wmm_ac_vi ac_vi;
Abhinav Kumare94f2482018-08-19 12:37:36 +05301669 struct wlan_mlme_wmm_ac_be ac_be;
Abhinav Kumar2af8c122018-08-19 13:49:52 +05301670 struct wlan_mlme_wmm_ac_bk ac_bk;
Abhinav Kumarc8c21502018-12-05 15:17:39 +05301671 uint32_t delayed_trigger_frm_int;
Pragaspathi Thilagarajec7dc252018-09-06 15:38:49 +05301672};
1673
1674/**
Vignesh Viswanathanff78bc12018-09-17 16:55:48 +05301675 * struct wlan_mlme_weight_config - weight params to
1676 * calculate best candidate
1677 *
1678 * @rssi_weightage: RSSI weightage
1679 * @ht_caps_weightage: HT caps weightage
1680 * @vht_caps_weightage: VHT caps weightage
1681 * @he_caps_weightage: HE caps weightage
1682 * @chan_width_weightage: Channel width weightage
1683 * @chan_band_weightage: Channel band weightage
1684 * @nss_weightage: NSS weightage
1685 * @beamforming_cap_weightage: Beamforming caps weightage
1686 * @pcl_weightage: PCL weightage
1687 * @channel_congestion_weightage: channel congestion weightage
1688 * @oce_wan_weightage: OCE WAN metrics weightage
1689 */
1690struct wlan_mlme_weight_config {
1691 uint8_t rssi_weightage;
1692 uint8_t ht_caps_weightage;
1693 uint8_t vht_caps_weightage;
1694 uint8_t he_caps_weightage;
1695 uint8_t chan_width_weightage;
1696 uint8_t chan_band_weightage;
1697 uint8_t nss_weightage;
1698 uint8_t beamforming_cap_weightage;
1699 uint8_t pcl_weightage;
1700 uint8_t channel_congestion_weightage;
1701 uint8_t oce_wan_weightage;
1702};
1703
1704/**
1705 * struct wlan_mlme_rssi_cfg_score - RSSI params to
1706 * calculate best candidate
1707 *
1708 * @best_rssi_threshold: Best RSSI threshold
1709 * @good_rssi_threshold: Good RSSI threshold
1710 * @bad_rssi_threshold: Bad RSSI threshold
1711 * @good_rssi_pcnt: Good RSSI Percentage
1712 * @bad_rssi_pcnt: Bad RSSI Percentage
1713 * @good_rssi_bucket_size: Good RSSI Bucket Size
1714 * @bad_rssi_bucket_size: Bad RSSI Bucket Size
1715 * @rssi_pref_5g_rssi_thresh: Preffered 5G RSSI threshold
1716 */
1717struct wlan_mlme_rssi_cfg_score {
1718 uint32_t best_rssi_threshold;
1719 uint32_t good_rssi_threshold;
1720 uint32_t bad_rssi_threshold;
1721 uint32_t good_rssi_pcnt;
1722 uint32_t bad_rssi_pcnt;
1723 uint32_t good_rssi_bucket_size;
1724 uint32_t bad_rssi_bucket_size;
1725 uint32_t rssi_pref_5g_rssi_thresh;
1726};
1727
1728/**
1729 * struct wlan_mlme_per_slot_scoring - define % score for differents slots
1730 * for a scoring param.
1731 * num_slot: number of slots in which the param will be divided.
1732 * Max 15. index 0 is used for 'not_present. Num_slot will
1733 * equally divide 100. e.g, if num_slot = 4 slot 0 = 0-25%, slot
1734 * 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
1735 * score_pcnt3_to_0: Conatins score percentage for slot 0-3
1736 * BITS 0-7 :- the scoring pcnt when not present
1737 * BITS 8-15 :- SLOT_1
1738 * BITS 16-23 :- SLOT_2
1739 * BITS 24-31 :- SLOT_3
1740 * score_pcnt7_to_4: Conatins score percentage for slot 4-7
1741 * BITS 0-7 :- SLOT_4
1742 * BITS 8-15 :- SLOT_5
1743 * BITS 16-23 :- SLOT_6
1744 * BITS 24-31 :- SLOT_7
1745 * score_pcnt11_to_8: Conatins score percentage for slot 8-11
1746 * BITS 0-7 :- SLOT_8
1747 * BITS 8-15 :- SLOT_9
1748 * BITS 16-23 :- SLOT_10
1749 * BITS 24-31 :- SLOT_11
1750 * score_pcnt15_to_12: Conatins score percentage for slot 12-15
1751 * BITS 0-7 :- SLOT_12
1752 * BITS 8-15 :- SLOT_13
1753 * BITS 16-23 :- SLOT_14
1754 * BITS 24-31 :- SLOT_15
1755 */
1756struct wlan_mlme_per_slot_scoring {
1757 uint32_t num_slot;
1758 uint32_t score_pcnt3_to_0;
1759 uint32_t score_pcnt7_to_4;
1760 uint32_t score_pcnt11_to_8;
1761 uint32_t score_pcnt15_to_12;
1762};
1763
1764/*
1765 * struct wlan_mlme_score_config - MLME BSS Scoring related config
1766 * @enable_scoring_for_roam: Enable/disable BSS Scoring for Roaming
1767 * @weight_cfg: Various Weight related Scoring Configs
1768 * @rssi_score: RSSI Scoring related thresholds/percentages config
1769 * @esp_qbss_scoring: ESP QBSS Scoring configs
1770 * @oce_wan_scoring: OCE WAN Scoring Configs
1771 * @bandwidth_weight_per_index: Bandwidth weight per index for scoring logic
1772 * @nss_weight_per_index: NSS weight per index for scoring logic
1773 * @band_weight_per_index: Band weight per index for scoring logic
Pragaspathi Thilagarajdf0f5442018-12-11 16:59:46 +05301774 * @roam_trigger_bitmap: bitmap for various roam triggers
1775 * @roam_score_delta: percentage delta in roam score
Wu Gao2255ea22019-01-04 15:44:35 +08001776 * @apsd_enabled: Enable automatic power save delivery
Vignesh Viswanathanff78bc12018-09-17 16:55:48 +05301777 */
1778struct wlan_mlme_scoring_cfg {
1779 bool enable_scoring_for_roam;
1780 struct wlan_mlme_weight_config weight_cfg;
1781 struct wlan_mlme_rssi_cfg_score rssi_score;
1782 struct wlan_mlme_per_slot_scoring esp_qbss_scoring;
1783 struct wlan_mlme_per_slot_scoring oce_wan_scoring;
1784 uint32_t bandwidth_weight_per_index;
1785 uint32_t nss_weight_per_index;
1786 uint32_t band_weight_per_index;
Pragaspathi Thilagarajdf0f5442018-12-11 16:59:46 +05301787 uint32_t roam_trigger_bitmap;
1788 uint32_t roam_score_delta;
Wu Gao2255ea22019-01-04 15:44:35 +08001789 bool apsd_enabled;
Vignesh Viswanathanff78bc12018-09-17 16:55:48 +05301790};
1791
Harprit Chhabadabec6de42018-09-10 10:21:15 -07001792/* struct wlan_mlme_threshold - Threshold related config items
1793 * @rts_threshold: set rts threshold
1794 * @frag_threshold: set fragmentation threshold
1795 */
1796struct wlan_mlme_threshold {
1797 uint32_t rts_threshold;
1798 uint32_t frag_threshold;
1799};
1800
gaurank kathpalia3d2e3852018-10-03 22:03:23 +05301801/* struct mlme_max_tx_power_24 - power related items
1802 * @max_len: max length of string
1803 * @len: actual len of string
1804 * @data: Data in string format
1805 */
1806struct mlme_max_tx_power_24 {
1807 qdf_size_t max_len;
1808 qdf_size_t len;
1809 uint8_t data[CFG_MAX_TX_POWER_2_4_LEN];
1810};
1811
1812/* struct mlme_max_tx_power_5 - power related items
1813 * @max_len: max length of string
1814 * @len: actual len of string
1815 * @data: Data in string format
1816 */
1817struct mlme_max_tx_power_5 {
1818 qdf_size_t max_len;
1819 qdf_size_t len;
1820 uint8_t data[CFG_MAX_TX_POWER_5_LEN];
1821};
1822
1823/* struct mlme_power_usage - power related items
1824 * @max_len: max length of string
1825 * @len: actual len of string
1826 * @data: Data in string format
1827 */
1828struct mlme_power_usage {
1829 qdf_size_t max_len;
1830 qdf_size_t len;
1831 char data[CFG_POWER_USAGE_MAX_LEN];
1832};
1833
1834/*
1835 * struct wlan_mlme_power - power related config items
1836 * @max_tx_power_24: max power Tx for 2.4 ghz
1837 * @max_tx_power_5: max power Tx for 5 ghz
1838 * @power_usage: power usage mode, min, max, mod
1839 * @tx_power_2g: limit tx power in 2.4 ghz
1840 * @tx_power_5g: limit tx power in 5 ghz
Wu Gao2255ea22019-01-04 15:44:35 +08001841 * @max_tx_power: WLAN max tx power
1842 * @current_tx_power_level: current tx power level
1843 * @local_power_constraint: local power constraint
gaurank kathpalia3d2e3852018-10-03 22:03:23 +05301844 */
1845struct wlan_mlme_power {
1846 struct mlme_max_tx_power_24 max_tx_power_24;
1847 struct mlme_max_tx_power_5 max_tx_power_5;
1848 struct mlme_power_usage power_usage;
1849 uint8_t tx_power_2g;
1850 uint8_t tx_power_5g;
Wu Gao2255ea22019-01-04 15:44:35 +08001851 uint8_t max_tx_power;
1852 uint8_t current_tx_power_level;
1853 uint8_t local_power_constraint;
gaurank kathpalia3d2e3852018-10-03 22:03:23 +05301854};
1855
Arif Hussain9f93a642018-09-10 18:32:25 -07001856/*
1857 * struct wlan_mlme_timeout - mlme timeout related config items
1858 * @join_failure_timeout: join failure timeout
Arif Hussain43e09712018-09-18 19:31:57 -07001859 * @auth_failure_timeout: authenticate failure timeout
1860 * @auth_rsp_timeout: authenticate response timeout
1861 * @assoc_failure_timeout: assoc failure timeout
1862 * @reassoc_failure_timeout: re-assoc failure timeout
1863 * @probe_after_hb_fail_timeout: Probe after HB fail timeout
1864 * @olbc_detect_timeout: OLBC detect timeout
1865 * @addts_rsp_timeout: ADDTS rsp timeout value
1866 * @heart_beat_threshold: Heart beat threshold
1867 * @ap_keep_alive_timeout: AP keep alive timeout value
1868 * @ap_link_monitor_timeout: AP link monitor timeout value
1869 * @ps_data_inactivity_timeout: PS data inactivity timeout
Arif Hussain4966f692018-11-27 16:40:51 -08001870 * @wmi_wq_watchdog_timeout: timeout period for wmi watchdog bite
Arif Hussain9f93a642018-09-10 18:32:25 -07001871 */
1872struct wlan_mlme_timeout {
1873 uint32_t join_failure_timeout;
Arif Hussain43e09712018-09-18 19:31:57 -07001874 uint32_t auth_failure_timeout;
1875 uint32_t auth_rsp_timeout;
1876 uint32_t assoc_failure_timeout;
1877 uint32_t reassoc_failure_timeout;
1878 uint32_t probe_after_hb_fail_timeout;
1879 uint32_t olbc_detect_timeout;
1880 uint32_t addts_rsp_timeout;
1881 uint32_t heart_beat_threshold;
1882 uint32_t ap_keep_alive_timeout;
1883 uint32_t ap_link_monitor_timeout;
1884 uint32_t ps_data_inactivity_timeout;
Arif Hussain4966f692018-11-27 16:40:51 -08001885 uint32_t wmi_wq_watchdog_timeout;
Arif Hussain9f93a642018-09-10 18:32:25 -07001886};
1887
Vignesh Viswanathanff78bc12018-09-17 16:55:48 +05301888/**
Karthik Kantamneni2231a232018-09-11 15:45:55 +05301889 * struct wlan_mlme_oce - OCE related config items
1890 * @enable_bcast_probe_rsp: enable broadcast probe response
1891 * @oce_sta_enabled: enable/disable oce feature for sta
1892 * @oce_sap_enabled: enable/disable oce feature for sap
1893 * @fils_enabled: enable/disable fils support
1894 * @feature_bitmap: oce feature bitmap
1895 *
1896 */
1897struct wlan_mlme_oce {
1898 bool enable_bcast_probe_rsp;
1899 bool oce_sta_enabled;
1900 bool oce_sap_enabled;
1901 bool fils_enabled;
1902 uint8_t feature_bitmap;
1903};
1904
Pragaspathi Thilagaraj51d0a182018-09-21 01:25:46 +05301905/**
Pragaspathi Thilagarajda3b5e22018-09-23 01:55:57 +05301906 * enum wep_key_id - values passed to get/set wep default keys
1907 * @MLME_WEP_DEFAULT_KEY_1: wep default key 1
1908 * @MLME_WEP_DEFAULT_KEY_2: wep default key 2
1909 * @MLME_WEP_DEFAULT_KEY_3: wep default key 3
1910 * @MLME_WEP_DEFAULT_KEY_4: wep default key 4
1911 */
1912enum wep_key_id {
1913 MLME_WEP_DEFAULT_KEY_1 = 0,
1914 MLME_WEP_DEFAULT_KEY_2,
1915 MLME_WEP_DEFAULT_KEY_3,
1916 MLME_WEP_DEFAULT_KEY_4
1917};
1918
1919/**
Pragaspathi Thilagaraj51d0a182018-09-21 01:25:46 +05301920 * struct wlan_mlme_wep_cfg - WEP related configs
1921 * @is_privacy_enabled: Flag to check if encryption is enabled
1922 * @is_shared_key_auth: Flag to check if the auth type is shared key
1923 * @is_auth_open_system: Flag to check if the auth type is open
1924 * @auth_type: Authentication type value
1925 * @wep_default_key_id: Default WEP key id
1926 * @wep_default_key_1: WEP encryption key 1
1927 * @wep_default_key_2: WEP encryption key 2
1928 * @wep_default_key_3: WEP encryption key 3
1929 * @wep_default_key_4: WEP encryption key 4
1930 */
1931struct wlan_mlme_wep_cfg {
1932 bool is_privacy_enabled;
1933 bool is_shared_key_auth;
1934 bool is_auth_open_system;
1935 uint8_t auth_type;
1936 uint8_t wep_default_key_id;
1937 struct mlme_cfg_str wep_default_key_1;
1938 struct mlme_cfg_str wep_default_key_2;
1939 struct mlme_cfg_str wep_default_key_3;
1940 struct mlme_cfg_str wep_default_key_4;
1941};
1942
Karthik Kantamneni2231a232018-09-11 15:45:55 +05301943/**
Arif Hussainbd5194c2018-11-27 19:01:15 -08001944 * struct wlan_mlme_wifi_pos_cfg - WIFI POS configs
1945 * @fine_time_meas_cap: fine timing measurement capability information
1946 */
1947struct wlan_mlme_wifi_pos_cfg {
1948 uint32_t fine_time_meas_cap;
1949};
1950
Pragaspathi Thilagaraj7d0a3cf2018-12-12 15:53:57 +05301951#define MLME_SET_BIT(value, bit_offset) ((value) |= (1 << (bit_offset)))
1952
Pragaspathi Thilagarajcbecb292019-05-29 15:04:49 +05301953/* Mask to check if BTM offload is enabled/disabled*/
1954#define BTM_OFFLOAD_ENABLED_MASK 0x01
1955
Pragaspathi Thilagaraj7d0a3cf2018-12-12 15:53:57 +05301956#define BTM_OFFLOAD_CONFIG_BIT_8 8
1957#define BTM_OFFLOAD_CONFIG_BIT_7 7
1958
lifeng6d19c252018-11-23 18:04:23 +08001959/*
1960 * struct wlan_mlme_btm - BTM related configs
Pragaspathi Thilagaraj7d0a3cf2018-12-12 15:53:57 +05301961 * @prefer_btm_query: flag to prefer btm query over 11k
Pragaspathi Thilagarajae7dc762018-12-12 18:10:50 +05301962 * @abridge_flag: set this flag to enable firmware to sort candidates based on
1963 * roam score rather than selecting preferred APs.
lifeng6d19c252018-11-23 18:04:23 +08001964 * @btm_offload_config: configure btm offload
1965 * @btm_solicited_timeout: configure timeout value for waiting BTM request
1966 * @btm_max_attempt_cnt: configure maximum attempt for sending BTM query to ESS
1967 * @btm_sticky_time: configure Stick time after roaming to new AP by BTM
Pragaspathi Thilagarajae7dc762018-12-12 18:10:50 +05301968 * @rct_validity_timer: Timeout values for roam cache table entries
1969 * @disassoc_timer_threshold: Disassociation timeout till which roam scan need
1970 * not be triggered
Abhinav Kumar43565942019-03-02 01:34:12 +05301971 * @btm_query_bitmask: Bitmask to send BTM query with candidate list on
1972 * various roam
Pragaspathi Thilagaraj2b8ea352019-04-12 02:23:50 +05301973 * @btm_trig_min_candidate_score: Minimum score to consider the AP as candidate
1974 * when the roam trigger is BTM.
lifeng6d19c252018-11-23 18:04:23 +08001975 */
1976struct wlan_mlme_btm {
Pragaspathi Thilagaraj7d0a3cf2018-12-12 15:53:57 +05301977 bool prefer_btm_query;
Pragaspathi Thilagarajae7dc762018-12-12 18:10:50 +05301978 bool abridge_flag;
lifeng6d19c252018-11-23 18:04:23 +08001979 uint32_t btm_offload_config;
1980 uint32_t btm_solicited_timeout;
1981 uint32_t btm_max_attempt_cnt;
1982 uint32_t btm_sticky_time;
Pragaspathi Thilagarajae7dc762018-12-12 18:10:50 +05301983 uint32_t rct_validity_timer;
1984 uint32_t disassoc_timer_threshold;
Abhinav Kumar43565942019-03-02 01:34:12 +05301985 uint32_t btm_query_bitmask;
Pragaspathi Thilagaraj2b8ea352019-04-12 02:23:50 +05301986 uint32_t btm_trig_min_candidate_score;
lifeng6d19c252018-11-23 18:04:23 +08001987};
1988
Arif Hussainbd5194c2018-11-27 19:01:15 -08001989/**
Yeshwanth Sriram Guntuka334aa8d2018-08-20 16:49:15 +05301990 * struct wlan_mlme_fe_wlm - WLM related configs
1991 * @latency_enable: Flag to check if latency is enabled
1992 * @latency_level: WLM latency level
1993 * @latency_flags: WLM latency flags setting
1994 */
1995struct wlan_mlme_fe_wlm {
1996 bool latency_enable;
1997 uint8_t latency_level;
1998 uint32_t latency_flags[MLME_NUM_WLM_LATENCY_LEVEL];
1999};
2000
2001/**
2002 * struct wlan_mlme_fe_rrm - RRM related configs
2003 * @rrm_enabled: Flag to check if RRM is enabled
2004 * @rrm_rand_interval: RRM randomization interval
2005 * @rm_capability: RM enabled capabilities IE
2006 */
2007struct wlan_mlme_fe_rrm {
2008 bool rrm_enabled;
2009 uint8_t rrm_rand_interval;
2010 uint8_t rm_capability[MLME_RMENABLEDCAP_MAX_LEN];
2011};
2012
lifengdb340e72018-11-20 00:50:20 +08002013#ifdef MWS_COEX
2014/*
2015 * struct wlan_mlme_mwc - MWC related configs
2016 * @mws_coex_4g_quick_tdm: bitmap to set mws-coex 5g-nr power limit
2017 * @mws_coex_5g_nr_pwr_limit: bitmap to set mws-coex 5g-nr power limit
2018 **/
2019struct wlan_mlme_mwc {
2020 uint32_t mws_coex_4g_quick_tdm;
2021 uint32_t mws_coex_5g_nr_pwr_limit;
2022};
2023#else
2024struct wlan_mlme_mwc {
2025};
2026#endif
2027
Yeshwanth Sriram Guntuka334aa8d2018-08-20 16:49:15 +05302028/**
lifeng0b46ae52018-12-13 09:42:27 +08002029 * struct wlan_mlme_reg - REG related configs
2030 * @self_gen_frm_pwr: self-generated frame power in tx chain mask
2031 * for CCK rates
2032 * @etsi13_srd_chan_in_master_mode: etsi13 srd chan in master mode
2033 * @restart_beaconing_on_ch_avoid: restart beaconing on ch avoid
2034 * @indoor_channel_support: indoor channel support
2035 * @scan_11d_interval: scan 11d interval
Wu Gaof3cbeaf2019-01-15 18:26:25 +08002036 * @valid_channel_list: array for valid channel list
2037 * @valid_channel_list_num: valid channel list number
2038 * @country_code: country code
2039 * @country_code_len: country code length
gaurank kathpaliaba22ef22019-02-05 17:04:08 +05302040 * @enable_11d_in_world_mode: Whether to enable 11d scan in world mode or not
Ashish Kumar Dhanotiya2168aad2019-06-12 20:51:36 +05302041 * @avoid_acs_freq_list: List of the frequencies which need to be avoided
2042 * during acs
2043 * @avoid_acs_freq_list_num: Number of the frequencies to be avoided during acs
lifeng0b46ae52018-12-13 09:42:27 +08002044 */
2045struct wlan_mlme_reg {
2046 uint32_t self_gen_frm_pwr;
2047 bool etsi13_srd_chan_in_master_mode;
2048 enum restart_beaconing_on_ch_avoid_rule
2049 restart_beaconing_on_ch_avoid;
2050 bool indoor_channel_support;
2051 uint32_t scan_11d_interval;
Wu Gaof3cbeaf2019-01-15 18:26:25 +08002052 uint8_t valid_channel_list[CFG_VALID_CHANNEL_LIST_LEN];
2053 uint8_t valid_channel_list_num;
2054 uint8_t country_code[CFG_COUNTRY_CODE_LEN + 1];
2055 uint8_t country_code_len;
gaurank kathpaliaba22ef22019-02-05 17:04:08 +05302056 bool enable_11d_in_world_mode;
Ashish Kumar Dhanotiya2168aad2019-06-12 20:51:36 +05302057#ifdef SAP_AVOID_ACS_FREQ_LIST
2058 uint16_t avoid_acs_freq_list[CFG_VALID_CHANNEL_LIST_LEN];
2059 uint8_t avoid_acs_freq_list_num;
2060#endif
lifeng0b46ae52018-12-13 09:42:27 +08002061};
2062
2063/**
Manikandan Mohan2bd09772018-11-28 18:27:32 -08002064 * struct wlan_mlme_ibss_cfg - IBSS config params
2065 * @auto_bssid: Enable Auto BSSID for IBSS
2066 * @atim_win_size: Set IBSS ATIM window size
2067 * @adhoc_ch_5g: Default 5Ghz IBSS channel if not provided by supplicant
2068 * @adhoc_ch_2g: Default 2.4Ghz IBSS channel if not provided by supplicant
2069 * @coalesing_enable: IBSS coalesing control param
2070 * @power_save_allow: IBSS Power Save control
2071 * @power_collapse_allow: IBSS Power collapse control
2072 * @awake_on_tx_rx: IBSS sta power save mode on TX/RX activity
2073 * @inactivity_bcon_count: No of Beacons of data inactivity for power save
2074 * @txsp_end_timeout: TX service period inactivity timeout
2075 * @ps_warm_up_time: IBSS Power save skip time
2076 * @ps_1rx_chain_atim_win: Control IBSS Power save in 1RX chain during ATIM
2077 * @bssid: BSSID Mac address: IBSS BSSID if not provided by supplicant
2078 */
2079struct wlan_mlme_ibss_cfg {
2080 bool auto_bssid;
2081 uint32_t atim_win_size;
2082 uint32_t adhoc_ch_5g;
2083 uint32_t adhoc_ch_2g;
2084 bool coalesing_enable;
2085 bool power_save_allow;
2086 bool power_collapse_allow;
2087 bool awake_on_tx_rx;
2088 uint32_t inactivity_bcon_count;
2089 uint32_t txsp_end_timeout;
2090 uint32_t ps_warm_up_time;
2091 uint32_t ps_1rx_chain_atim_win;
2092 struct qdf_mac_addr bssid;
2093};
2094
2095/**
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +05302096 * struct wlan_mlme_cfg - MLME config items
Pragaspathi Thilagaraj51d0a182018-09-21 01:25:46 +05302097 * @chainmask_cfg: VHT chainmask related cfg items
Arif Hussain9f93a642018-09-10 18:32:25 -07002098 * @edca_params: edca related CFG items
2099 * @gen: Generic CFG items
2100 * @ht_caps: HT related CFG Items
Bala Venkatesh9296f092018-09-21 16:25:24 +05302101 * @he_caps: HE related cfg items
Wu Gao55f21712018-09-17 10:57:49 +08002102 * @lfr: LFR related CFG Items
Manikandan Mohan2bd09772018-11-28 18:27:32 -08002103 * @ibss: IBSS related CFG items
Wu Gaod8f3db02018-07-24 19:18:45 +08002104 * @obss_ht40:obss ht40 CFG Items
Harprit Chhabada1eeeb8d2018-09-14 15:16:56 -07002105 * @mbo_cfg: Multiband Operation related CFG items
2106 * @vht_caps: VHT related CFG Items
Arif Hussain9f93a642018-09-10 18:32:25 -07002107 * @qos_mlme_params: QOS CFG Items
Karthik Kantamneni22dd0f62018-08-07 14:53:50 +05302108 * @rates: Rates related cfg items
Jiachao Wu3304d6b2018-08-24 18:24:34 +08002109 * @product_details: product details related CFG Items
Arif Hussain88d1fdd2018-09-26 16:12:24 -07002110 * @dfs_cfg: DFS related CFG Items
Pragaspathi Thilagarajf4cc58b2018-07-31 00:39:05 +05302111 * @sap_protection_cfg: SAP erp protection related CFG items
Harprit Chhabada1eeeb8d2018-09-14 15:16:56 -07002112 * @sap_cfg: sap CFG items
gaurank kathpalia6c9d1c32018-10-08 15:11:59 +05302113 * @nss_chains_ini_cfg: Per vdev nss, chains related CFG items
Wu Gao406c53c2018-09-10 13:51:37 +08002114 * @sta: sta CFG Items
Arif Hussaincca60432018-12-03 19:45:12 -08002115 * @stats: stats CFG Items
Vignesh Viswanathanff78bc12018-09-17 16:55:48 +05302116 * @scoring: BSS Scoring related CFG Items
Arif Hussain9f93a642018-09-10 18:32:25 -07002117 * @oce: OCE related CFG items
Harprit Chhabadabec6de42018-09-10 10:21:15 -07002118 * @threshold: threshold related cfg items
Arif Hussain9f93a642018-09-10 18:32:25 -07002119 * @timeouts: mlme timeout related CFG items
Arif Hussain178f35f2018-11-13 18:26:18 -08002120 * @twt_cfg: TWT CFG Items
gaurank kathpalia3d2e3852018-10-03 22:03:23 +05302121 * @wlan_mlme_power: power related items
Arif Hussain9f93a642018-09-10 18:32:25 -07002122 * @acs: ACS related CFG items
gaurank kathpaliae5a17e42018-09-10 10:05:25 +05302123 * @feature_flags: Feature flag config items
Pragaspathi Thilagaraj43455532018-11-20 00:05:44 +05302124 * @ps_params: Powersave related ini configs
Pragaspathi Thilagaraj51d0a182018-09-21 01:25:46 +05302125 * @wep_params: WEP related config items
Arif Hussainbd5194c2018-11-27 19:01:15 -08002126 * @wifi_pos_cfg: WIFI POS config
Abhinav Kumar18b45cd2018-09-21 12:35:22 +05302127 * @wmm_params: WMM related CFG & INI Items
gaurank kathpalia837f6202018-09-14 21:55:32 +05302128 * @wps_params: WPS related CFG itmes
lifeng6d19c252018-11-23 18:04:23 +08002129 * @btm: BTM related CFG itmes
Yeshwanth Sriram Guntuka334aa8d2018-08-20 16:49:15 +05302130 * @wlm_config: WLM related CFG items
2131 * @rrm_config: RRM related CFG items
lifengdb340e72018-11-20 00:50:20 +08002132 * @mwc: MWC related CFG items
gaurank kathpalia1be77fa2019-01-04 13:32:09 +05302133 * @dot11_mode: dot11 mode supported
lifeng0b46ae52018-12-13 09:42:27 +08002134 * @reg: REG related CFG itmes
Pragaspathi Thilagaraj2b8ea352019-04-12 02:23:50 +05302135 * @trig_score_delta: Roam score delta value for various roam triggers
2136 * @trig_min_rssi: Expected minimum RSSI value of candidate AP for
2137 * various roam triggers
Sandeep Puligillac5609d52018-05-17 19:23:41 -07002138 */
2139struct wlan_mlme_cfg {
Pragaspathi Thilagaraj51d0a182018-09-21 01:25:46 +05302140 struct wlan_mlme_chainmask chainmask_cfg;
Pragaspathi Thilagaraj03efaa52018-09-15 22:58:18 +05302141 struct wlan_mlme_edca_params edca_params;
Karthik Kantamneni24f71bc2018-09-11 19:08:38 +05302142 struct wlan_mlme_generic gen;
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +05302143 struct wlan_mlme_ht_caps ht_caps;
Bala Venkatesh6d537092018-09-25 10:38:36 +05302144#ifdef WLAN_FEATURE_11AX
Bala Venkatesh9296f092018-09-21 16:25:24 +05302145 struct wlan_mlme_he_caps he_caps;
Bala Venkatesh6d537092018-09-25 10:38:36 +05302146#endif
Wu Gao55f21712018-09-17 10:57:49 +08002147 struct wlan_mlme_lfr_cfg lfr;
Manikandan Mohan2bd09772018-11-28 18:27:32 -08002148 struct wlan_mlme_ibss_cfg ibss;
Wu Gaod8f3db02018-07-24 19:18:45 +08002149 struct wlan_mlme_obss_ht40 obss_ht40;
Pragaspathi Thilagarajcd6aef02018-09-11 20:30:23 +05302150 struct wlan_mlme_mbo mbo_cfg;
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +05302151 struct wlan_mlme_vht_caps vht_caps;
Pragaspathi Thilagaraj17afb842018-08-30 17:55:13 +05302152 struct wlan_mlme_qos qos_mlme_params;
Karthik Kantamneni22dd0f62018-08-07 14:53:50 +05302153 struct wlan_mlme_rates rates;
Jiachao Wu3304d6b2018-08-24 18:24:34 +08002154 struct wlan_mlme_product_details_cfg product_details;
Arif Hussain88d1fdd2018-09-26 16:12:24 -07002155 struct wlan_mlme_dfs_cfg dfs_cfg;
Pragaspathi Thilagarajf4cc58b2018-07-31 00:39:05 +05302156 struct wlan_mlme_sap_protection sap_protection_cfg;
Bala Venkatesh100d7422018-08-27 11:42:21 +05302157 struct wlan_mlme_cfg_sap sap_cfg;
gaurank kathpalia6c9d1c32018-10-08 15:11:59 +05302158 struct wlan_mlme_nss_chains nss_chains_ini_cfg;
Wu Gao406c53c2018-09-10 13:51:37 +08002159 struct wlan_mlme_sta_cfg sta;
Arif Hussaincca60432018-12-03 19:45:12 -08002160 struct wlan_mlme_stats_cfg stats;
Vignesh Viswanathanff78bc12018-09-17 16:55:48 +05302161 struct wlan_mlme_scoring_cfg scoring;
Karthik Kantamneni2231a232018-09-11 15:45:55 +05302162 struct wlan_mlme_oce oce;
Harprit Chhabadabec6de42018-09-10 10:21:15 -07002163 struct wlan_mlme_threshold threshold;
Arif Hussain9f93a642018-09-10 18:32:25 -07002164 struct wlan_mlme_timeout timeouts;
Arif Hussain178f35f2018-11-13 18:26:18 -08002165 struct wlan_mlme_cfg_twt twt_cfg;
gaurank kathpalia3d2e3852018-10-03 22:03:23 +05302166 struct wlan_mlme_power power;
Harprit Chhabada1eeeb8d2018-09-14 15:16:56 -07002167 struct wlan_mlme_acs acs;
gaurank kathpaliae5a17e42018-09-10 10:05:25 +05302168 struct wlan_mlme_feature_flag feature_flags;
Pragaspathi Thilagaraj43455532018-11-20 00:05:44 +05302169 struct wlan_mlme_powersave ps_params;
Pragaspathi Thilagaraj51d0a182018-09-21 01:25:46 +05302170 struct wlan_mlme_wep_cfg wep_params;
Arif Hussainbd5194c2018-11-27 19:01:15 -08002171 struct wlan_mlme_wifi_pos_cfg wifi_pos_cfg;
Pragaspathi Thilagarajec7dc252018-09-06 15:38:49 +05302172 struct wlan_mlme_wmm_params wmm_params;
gaurank kathpalia837f6202018-09-14 21:55:32 +05302173 struct wlan_mlme_wps_params wps_params;
lifeng6d19c252018-11-23 18:04:23 +08002174 struct wlan_mlme_btm btm;
Yeshwanth Sriram Guntuka334aa8d2018-08-20 16:49:15 +05302175 struct wlan_mlme_fe_wlm wlm_config;
2176 struct wlan_mlme_fe_rrm rrm_config;
lifengdb340e72018-11-20 00:50:20 +08002177 struct wlan_mlme_mwc mwc;
gaurank kathpalia1be77fa2019-01-04 13:32:09 +05302178 struct wlan_mlme_dot11_mode dot11_mode;
lifeng0b46ae52018-12-13 09:42:27 +08002179 struct wlan_mlme_reg reg;
Pragaspathi Thilagaraj2b8ea352019-04-12 02:23:50 +05302180 struct roam_trigger_score_delta trig_score_delta[NUM_OF_ROAM_TRIGGERS];
2181 struct roam_trigger_min_rssi trig_min_rssi[NUM_OF_ROAM_TRIGGERS];
Sandeep Puligillac5609d52018-05-17 19:23:41 -07002182};
2183
2184#endif