1 /*
2  * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 /**
19  * DOC: Define bss scoring structures and APIs
20  */
21 
22 #ifndef _WLAN_CM_BSS_SCORE_H
23 #define _WLAN_CM_BSS_SCORE_H
24 
25 #include <wlan_scan_utils_api.h>
26 #include "wlan_reg_services_api.h"
27 
28 /**
29  * struct weight_cfg - weight params to calculate best candidate
30  * @rssi_weightage: RSSI weightage
31  * @ht_caps_weightage: HT caps weightage
32  * @vht_caps_weightage: VHT caps weightage
33  * @he_caps_weightage: HE caps weightage
34  * @chan_width_weightage: Channel width weightage
35  * @chan_band_weightage: Channel band weightage
36  * @nss_weightage: NSS weightage
37  * @beamforming_cap_weightage: Beamforming caps weightage
38  * @pcl_weightage: PCL weightage
39  * @channel_congestion_weightage: channel congestion weightage
40  * @oce_wan_weightage: OCE WAN metrics weightage
41  * @oce_ap_tx_pwr_weightage: OCE AP tx power weigtage
42  * @oce_subnet_id_weightage: OCE subnet id weigtage
43  * @sae_pk_ap_weightage: SAE-PK AP weigtage
44  * @eht_caps_weightage: EHT caps weightage
45  * @mlo_weightage: MLO weightage
46  * @joint_rssi_alpha: Joint RSSI alpha value
47  * @joint_esp_alpha: Joint ESP alpha value
48  * @joint_oce_alpha: Joint OCE alpha value
49  * @low_band_rssi_boost: Flag to assign higher alpha weightage low band RSSI
50  * @low_band_esp_boost: Flag to assign higher alpha weightage low band esp
51  * @low_band_oce_boost: Flag to assign higher alpha weightage low band oce
52  * @reserved: reserved/unused bits
53  * @wlm_indication_weightage: WLM indication weightage
54  * @emlsr_weightage: eMLSR weightage
55  * @security_weightage: Security weightage
56  */
57 struct weight_cfg {
58 	uint8_t rssi_weightage;
59 	uint8_t ht_caps_weightage;
60 	uint8_t vht_caps_weightage;
61 	uint8_t he_caps_weightage;
62 	uint8_t chan_width_weightage;
63 	uint8_t chan_band_weightage;
64 	uint8_t nss_weightage;
65 	uint8_t beamforming_cap_weightage;
66 	uint8_t pcl_weightage;
67 	uint8_t channel_congestion_weightage;
68 	uint8_t oce_wan_weightage;
69 	uint8_t oce_ap_tx_pwr_weightage;
70 	uint8_t oce_subnet_id_weightage;
71 	uint8_t sae_pk_ap_weightage;
72 #ifdef WLAN_FEATURE_11BE_MLO
73 	uint8_t eht_caps_weightage;
74 	uint8_t mlo_weightage;
75 	uint8_t joint_rssi_alpha;
76 	uint8_t joint_esp_alpha;
77 	uint8_t joint_oce_alpha;
78 	uint8_t low_band_rssi_boost:1,
79 		low_band_esp_boost:1,
80 		low_band_oce_boost:1,
81 		reserved:5;
82 	uint8_t wlm_indication_weightage;
83 	uint8_t emlsr_weightage;
84 #endif
85 	uint8_t security_weightage;
86 };
87 
88 /**
89  * struct rssi_config_score - rssi related params for scoring logic
90  * @best_rssi_threshold: RSSI weightage
91  * @good_rssi_threshold: HT caps weightage
92  * @bad_rssi_threshold: VHT caps weightage
93  * @good_rssi_pcnt: HE caps weightage
94  * @bad_rssi_pcnt: Channel width weightage
95  * @good_rssi_bucket_size: Channel band weightage
96  * @bad_rssi_bucket_size: NSS weightage
97  * @rssi_pref_5g_rssi_thresh: Beamforming caps weightage
98  * @con_non_hint_target_rssi_threshold: RSSI threshold value
99  */
100 struct rssi_config_score  {
101 	uint8_t best_rssi_threshold;
102 	uint8_t good_rssi_threshold;
103 	uint8_t bad_rssi_threshold;
104 	uint8_t good_rssi_pcnt;
105 	uint8_t bad_rssi_pcnt;
106 	uint8_t good_rssi_bucket_size;
107 	uint8_t bad_rssi_bucket_size;
108 	uint8_t rssi_pref_5g_rssi_thresh;
109 	int8_t con_non_hint_target_rssi_threshold;
110 };
111 
112 /**
113  * struct per_slot_score - define % score for different slots for a
114  *                               scoring param.
115  * @num_slot: number of slots in which the param will be divided.
116  *           Max 15. index 0 is used for 'not_present. Num_slot will
117  *           equally divide 100. e.g, if num_slot = 4 slot 0 = 0-25%, slot
118  *           1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
119  * @score_pcnt3_to_0: Contains score percentage for slot 0-3
120  *             BITS 0-7   :- the scoring pcnt when not present
121  *             BITS 8-15  :- SLOT_1
122  *             BITS 16-23 :- SLOT_2
123  *             BITS 24-31 :- SLOT_3
124  * @score_pcnt7_to_4: Contains score percentage for slot 4-7
125  *             BITS 0-7   :- SLOT_4
126  *             BITS 8-15  :- SLOT_5
127  *             BITS 16-23 :- SLOT_6
128  *             BITS 24-31 :- SLOT_7
129  * @score_pcnt11_to_8: Contains score percentage for slot 8-11
130  *             BITS 0-7   :- SLOT_8
131  *             BITS 8-15  :- SLOT_9
132  *             BITS 16-23 :- SLOT_10
133  *             BITS 24-31 :- SLOT_11
134  * @score_pcnt15_to_12: Contains score percentage for slot 12-15
135  *             BITS 0-7   :- SLOT_12
136  *             BITS 8-15  :- SLOT_13
137  *             BITS 16-23 :- SLOT_14
138  *             BITS 24-31 :- SLOT_15
139  */
140 struct per_slot_score {
141 	uint8_t num_slot;
142 	uint32_t score_pcnt3_to_0;
143 	uint32_t score_pcnt7_to_4;
144 	uint32_t score_pcnt11_to_8;
145 	uint32_t score_pcnt15_to_12;
146 };
147 
148 #ifndef WLAN_FEATURE_11BE
149 #define CM_20MHZ_BW_INDEX                  0
150 #define CM_40MHZ_BW_INDEX                  1
151 #define CM_80MHZ_BW_INDEX                  2
152 #define CM_160MHZ_BW_INDEX                 3
153 #define CM_MAX_BW_INDEX                    4
154 
155 #define CM_NSS_1x1_INDEX                   0
156 #define CM_NSS_2x2_INDEX                   1
157 #define CM_NSS_3x3_INDEX                   2
158 #define CM_NSS_4x4_INDEX                   3
159 #define CM_MAX_NSS_INDEX                   4
160 #else
161 enum cm_bw_idx {
162 	CM_20MHZ_BW_INDEX = 0,
163 	CM_40MHZ_BW_INDEX = 1,
164 	CM_80MHZ_BW_INDEX = 2,
165 	CM_160MHZ_BW_INDEX = 3,
166 	CM_320MHZ_BW_INDEX = 4,
167 	CM_80MHZ_BW_20MHZ_PUNCTURE_INDEX = 5,
168 	CM_160MHZ_BW_40MHZ_PUNCTURE_INDEX = 6,
169 	CM_160MHZ_BW_20MHZ_PUNCTURE_INDEX = 7,
170 	CM_320MHZ_BW_40MHZ_80MHZ_PUNCTURE_INDEX = 8,
171 	CM_320MHZ_BW_80MHZ_PUNCTURE_INDEX = 9,
172 	CM_320MHZ_BW_40MHZ_PUNCTURE_INDEX = 10,
173 #ifdef WLAN_FEATURE_11BE_MLO
174 	CM_MLO_20_PLUS_20MHZ_BW_INDEX = 11,
175 	CM_MLO_20_PLUS_40MHZ_BW_INDEX = 12,
176 	CM_MLO_40_PLUS_40MHZ_BW_INDEX = 13,
177 	CM_MLO_20_PLUS_80MHZ_BW_20MHZ_PUNCTURE_INDEX = 14,
178 	CM_MLO_20_PLUS_80MHZ_BW_INDEX = 15,
179 	CM_MLO_40_PLUS_80MHZ_BW_20MHZ_PUNCTURE_INDEX = 16,
180 	CM_MLO_40_PLUS_80MHZ_BW_INDEX = 17,
181 	CM_MLO_80_PLUS_80MHZ_BW_40MHZ_PUNCTURE_INDEX = 18,
182 	CM_MLO_80_PLUS_80MHZ_BW_20MHZ_PUNCTURE_INDEX = 19,
183 	CM_MLO_80_PLUS_80MHZ_BW_INDEX = 20,
184 	CM_MLO_20_PLUS_160HZ_BW_40MHZ_PUNCTURE_INDEX = 21,
185 	CM_MLO_20_PLUS_160HZ_BW_20MHZ_PUNCTURE_INDEX = 22,
186 	CM_MLO_20_PLUS_160HZ_BW_INDEX = 23,
187 	CM_MLO_40_PLUS_160HZ_BW_40MHZ_PUNCTURE_INDEX = 24,
188 	CM_MLO_40_PLUS_160HZ_BW_20MHZ_PUNCTURE_INDEX = 25,
189 	CM_MLO_40_PLUS_160HZ_BW_INDEX = 26,
190 	CM_MLO_80_PLUS_160HZ_BW_60MHZ_PUNCTURE_INDEX = 27,
191 	CM_MLO_80_PLUS_160HZ_BW_40MHZ_PUNCTURE_INDEX = 28,
192 	CM_MLO_80_PLUS_160HZ_BW_20MHZ_PUNCTURE_INDEX = 29,
193 	CM_MLO_80_PLUS_160HZ_BW_INDEX = 30,
194 	CM_MLO_160_PLUS_160HZ_BW_80MHZ_PUNCTURE_INDEX = 31,
195 	CM_MLO_160_PLUS_160HZ_BW_60MHZ_PUNCTURE_INDEX = 32,
196 	CM_MLO_160_PLUS_160HZ_BW_40MHZ_PUNCTURE_INDEX = 33,
197 	CM_MLO_160_PLUS_160HZ_BW_20MHZ_PUNCTURE_INDEX = 34,
198 	CM_MLO_160_PLUS_160HZ_BW_INDEX = 35,
199 #endif
200 	CM_MAX_BW_INDEX
201 };
202 
203 enum cm_nss_idx {
204 	CM_NSS_1x1_INDEX,
205 	CM_NSS_2x2_INDEX,
206 	CM_NSS_3x3_INDEX,
207 	CM_NSS_4x4_INDEX,
208 #ifdef WLAN_FEATURE_11BE_MLO
209 	CM_NSS_2x2_PLUS_2x2_INDEX,
210 	CM_NSS_4x4_PLUS_4x4_INDEX,
211 #endif
212 	CM_MAX_NSS_INDEX
213 };
214 #endif
215 
216 enum cm_security_idx {
217 	CM_SECURITY_WPA_INDEX,
218 	CM_SECURITY_WPA2_INDEX,
219 	CM_SECURITY_WPA3_INDEX,
220 	CM_SECURITY_WPA_OPEN_WEP_INDEX,
221 	CM_MAX_SECURITY_INDEX
222 };
223 
224 /**
225  * struct scoring_cfg - Scoring related configuration
226  * @weight_config: weightage config for scoring config
227  * @rssi_score: Rssi related config for scoring config
228  * @esp_qbss_scoring: esp and qbss related scoring config
229  * @oce_wan_scoring: oce related scoring config
230  * @bandwidth_weight_per_index: BW weight per index
231  * @nss_weight_per_index: nss weight per index
232  * @band_weight_per_index: band weight per index
233  * @is_bssid_hint_priority: True if bssid_hint is given priority
234  * @check_assoc_disallowed: Should assoc be disallowed if MBO OCE IE indicate so
235  * @vendor_roam_score_algorithm: Preferred ETP vendor roam score algorithm
236  * @check_6ghz_security: check security for 6 GHz candidate
237  * @standard_6ghz_conn_policy: check for 6 GHz standard connection policy
238  * @disable_vlp_sta_conn_to_sp_ap: check for disable vlp sta conn to sp ap
239  * @key_mgmt_mask_6ghz: user configurable mask for 6 GHz AKM
240  * @mlsr_link_selection: MLSR link selection config
241  * @roam_tgt_score_cap: Roam score capability
242  * @security_weight_per_index: security weight per index
243  */
244 struct scoring_cfg {
245 	struct weight_cfg weight_config;
246 	struct rssi_config_score rssi_score;
247 	struct per_slot_score esp_qbss_scoring;
248 	struct per_slot_score oce_wan_scoring;
249 	uint32_t bandwidth_weight_per_index[qdf_ceil(CM_MAX_BW_INDEX, 4)];
250 	uint32_t nss_weight_per_index[qdf_ceil(CM_MAX_NSS_INDEX, 4)];
251 	uint32_t band_weight_per_index;
252 	uint8_t is_bssid_hint_priority:1,
253 		 check_assoc_disallowed:1,
254 		 vendor_roam_score_algorithm:1,
255 		 check_6ghz_security:1,
256 		 standard_6ghz_conn_policy:1,
257 		 disable_vlp_sta_conn_to_sp_ap:1;
258 
259 	uint32_t key_mgmt_mask_6ghz;
260 #ifdef WLAN_FEATURE_11BE_MLO
261 	uint8_t mlsr_link_selection;
262 #endif
263 	uint32_t roam_tgt_score_cap;
264 	uint32_t security_weight_per_index;
265 };
266 
267 /**
268  * struct pcl_freq_weight_list - pcl freq weight info
269  * @num_of_pcl_channels: number of pcl channel
270  * @pcl_freq_list: pcl freq list
271  * @pcl_weight_list: pcl freq weight list
272  */
273 struct pcl_freq_weight_list {
274 	uint32_t num_of_pcl_channels;
275 	uint32_t pcl_freq_list[NUM_CHANNELS];
276 	uint8_t pcl_weight_list[NUM_CHANNELS];
277 };
278 
279 /**
280  * enum cm_denylist_action - action taken by denylist manager for the bssid
281  * @CM_DLM_NO_ACTION: No operation to be taken for the BSSID in the scan list.
282  * @CM_DLM_REMOVE: Remove the BSSID from the scan list (AP is denylisted)
283  * This param is a way to inform the caller that this BSSID is denylisted
284  * but it is a driver denylist and we can connect to them if required.
285  * @CM_DLM_FORCE_REMOVE: Forcefully remove the BSSID from scan list.
286  * This param is introduced as we want to differentiate between optional
287  * mandatory denylisting. Driver denylisting is optional and won't
288  * fail any CERT or protocol violations as it is internal implementation.
289  * hence FORCE_REMOVE will mean that driver cannot connect to this BSSID
290  * in any situation.
291  * @CM_DLM_AVOID: Add the Ap at last of the scan list (AP to Avoid)
292  */
293 enum cm_denylist_action {
294 	CM_DLM_NO_ACTION,
295 	CM_DLM_REMOVE,
296 	CM_DLM_FORCE_REMOVE,
297 	CM_DLM_AVOID,
298 };
299 
300 /**
301  * struct etp_params - params for estimated throughput
302  * @airtime_fraction: Portion of airtime available for outbound transmissions
303  * @data_ppdu_dur_target_us: Expected duration of a single PPDU, in us
304  * @ba_window_size: Block ack window size of the transmitter
305  */
306 struct etp_params {
307 	uint32_t airtime_fraction;
308 	uint32_t data_ppdu_dur_target_us;
309 	uint32_t ba_window_size;
310 };
311 
312 #ifdef FEATURE_DENYLIST_MGR
313 enum cm_denylist_action
314 wlan_denylist_action_on_bssid(struct wlan_objmgr_pdev *pdev,
315 			      struct scan_cache_entry *entry);
316 #else
317 static inline enum cm_denylist_action
wlan_denylist_action_on_bssid(struct wlan_objmgr_pdev * pdev,struct scan_cache_entry * entry)318 wlan_denylist_action_on_bssid(struct wlan_objmgr_pdev *pdev,
319 			      struct scan_cache_entry *entry)
320 {
321 	return CM_DLM_NO_ACTION;
322 }
323 #endif
324 
325 /**
326  * wlan_cm_calculate_bss_score() - calculate bss score for the scan list
327  * @pdev: pointer to pdev object
328  * @pcl_lst: pcl list for scoring
329  * @scan_list: scan list, contains the input list and after the
330  *             func it will have sorted list
331  * @bssid_hint: bssid hint
332  * @self_mac: connecting vdev self mac address
333  *
334  * Return: void
335  */
336 void wlan_cm_calculate_bss_score(struct wlan_objmgr_pdev *pdev,
337 				 struct pcl_freq_weight_list *pcl_lst,
338 				 qdf_list_t *scan_list,
339 				 struct qdf_mac_addr *bssid_hint,
340 				 struct qdf_mac_addr *self_mac);
341 
342 #ifdef WLAN_FEATURE_11BE
343 #ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
344 /**
345  * wlan_cm_is_eht_allowed_for_current_security() - checks the current security,
346  * if eht allowed or not.
347  * @psoc: psoc context
348  * @entry: pointer to scan cache entry
349  * @is_mlo_connect: Is for MLO connection, if false check for non-ML EHT only
350  *
351  * Return: true if eht allowed for current security
352  **/
353 bool wlan_cm_is_eht_allowed_for_current_security(struct wlan_objmgr_psoc *psoc,
354 						 struct scan_cache_entry *entry,
355 						 bool is_mlo_connect);
356 #else
357 static inline bool
wlan_cm_is_eht_allowed_for_current_security(struct wlan_objmgr_psoc * psoc,struct scan_cache_entry * entry,bool is_mlo_connect)358 wlan_cm_is_eht_allowed_for_current_security(struct wlan_objmgr_psoc *psoc,
359 					    struct scan_cache_entry *entry,
360 					    bool is_mlo_connect)
361 {
362 	return true;
363 }
364 #endif
365 #else
366 static inline bool
wlan_cm_is_eht_allowed_for_current_security(struct wlan_objmgr_psoc * psoc,struct scan_cache_entry * entry,bool is_mlo_connect)367 wlan_cm_is_eht_allowed_for_current_security(struct wlan_objmgr_psoc *psoc,
368 					    struct scan_cache_entry *entry,
369 					    bool is_mlo_connect)
370 {
371 	return false;
372 }
373 #endif
374 
375 #ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
376 /**
377  * cm_print_candidate_list() - print candidate list
378  * @candidate_list: candidate list
379  *
380  * Return: None
381  */
382 void cm_print_candidate_list(qdf_list_t *candidate_list);
383 #else
cm_print_candidate_list(qdf_list_t * candidate_list)384 static inline void cm_print_candidate_list(qdf_list_t *candidate_list)
385 {
386 }
387 #endif
388 
389 /**
390  * wlan_cm_init_score_config() - Init score INI and config
391  * @psoc: pointer to psoc object
392  * @score_cfg: score config
393  *
394  * Return: void
395  */
396 void wlan_cm_init_score_config(struct wlan_objmgr_psoc *psoc,
397 			       struct scoring_cfg *score_cfg);
398 
399 /**
400  * wlan_cm_6ghz_allowed_for_akm() - check if 6 GHz channel can be allowed
401  *                                  for AKM
402  * @psoc: pointer to psoc object
403  * @key_mgmt: key mgmt used
404  * @rsn_caps: rsn caps
405  * @rsnxe: rsnxe pointer if present
406  * @sae_pwe: support for SAE password
407  * @is_wps: if security is WPS
408  *
409  * Return: bool
410  */
411 #ifdef CONFIG_BAND_6GHZ
412 bool wlan_cm_6ghz_allowed_for_akm(struct wlan_objmgr_psoc *psoc,
413 				  uint32_t key_mgmt, uint16_t rsn_caps,
414 				  const uint8_t *rsnxe, uint8_t sae_pwe,
415 				  bool is_wps);
416 
417 /**
418  * wlan_cm_set_check_6ghz_security() - Set check 6 GHz security
419  * @psoc: pointer to psoc object
420  * @value: value to be set
421  *
422  * Return: void
423  */
424 void wlan_cm_set_check_6ghz_security(struct wlan_objmgr_psoc *psoc,
425 				     bool value);
426 
427 /**
428  * wlan_cm_reset_check_6ghz_security() - reset check 6 GHz security to original
429  *                                       value
430  * @psoc: pointer to psoc object
431  *
432  * Return: void
433  */
434 void wlan_cm_reset_check_6ghz_security(struct wlan_objmgr_psoc *psoc);
435 
436 /**
437  * wlan_cm_get_check_6ghz_security() - Get 6 GHz allowed AKM mask
438  * @psoc: pointer to psoc object
439  *
440  * Return: value
441  */
442 bool wlan_cm_get_check_6ghz_security(struct wlan_objmgr_psoc *psoc);
443 
444 /**
445  * wlan_cm_set_6ghz_key_mgmt_mask() - Set 6 GHz allowed AKM mask
446  * @psoc: pointer to psoc object
447  * @value: value to be set
448  *
449  * Return: void
450  */
451 void wlan_cm_set_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc,
452 				    uint32_t value);
453 
454 /**
455  * wlan_cm_get_6ghz_key_mgmt_mask() - Get 6 GHz allowed AKM mask
456  * @psoc: pointer to psoc object
457  *
458  * Return: value
459  */
460 uint32_t wlan_cm_get_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc);
461 
462 /**
463  * wlan_cm_get_disable_vlp_sta_conn_to_sp_ap() - Set disable vlp sta connection
464  *                                               to sp ap
465  * @psoc: pointer to psoc object
466  *
467  * Return: value
468  */
469 bool wlan_cm_get_disable_vlp_sta_conn_to_sp_ap(struct wlan_objmgr_psoc *psoc);
470 
471 /**
472  * wlan_cm_set_disable_vlp_sta_conn_to_sp_ap() - Set disable vlp sta connection
473  *                                               to sp ap
474  * @psoc: pointer to psoc object
475  * @value: value to be set
476  *
477  * Return: void
478  */
479 void wlan_cm_set_disable_vlp_sta_conn_to_sp_ap(struct wlan_objmgr_psoc *psoc,
480 					       bool value);
481 /**
482  * wlan_cm_set_standard_6ghz_conn_policy() - Set 6 GHz standard connection
483  *					     policy
484  * @psoc: pointer to psoc object
485  * @value: value to be set
486  *
487  * Return: void
488  */
489 void wlan_cm_set_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc,
490 					   bool value);
491 
492 /**
493  * wlan_cm_get_standard_6ghz_conn_policy() - Get 6Ghz standard connection
494  *					     policy
495  * @psoc: pointer to psoc object
496  *
497  * Return: value
498  */
499 bool wlan_cm_get_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc);
500 
501 #else
502 static inline bool
wlan_cm_6ghz_allowed_for_akm(struct wlan_objmgr_psoc * psoc,uint32_t key_mgmt,uint16_t rsn_caps,const uint8_t * rsnxe,uint8_t sae_pwe,bool is_wps)503 wlan_cm_6ghz_allowed_for_akm(struct wlan_objmgr_psoc *psoc,
504 			     uint32_t key_mgmt, uint16_t rsn_caps,
505 			     const uint8_t *rsnxe, uint8_t sae_pwe,
506 			     bool is_wps)
507 {
508 	return true;
509 }
510 
511 static inline
wlan_cm_set_check_6ghz_security(struct wlan_objmgr_psoc * psoc,bool value)512 void wlan_cm_set_check_6ghz_security(struct wlan_objmgr_psoc *psoc,
513 				     bool value) {}
514 
515 static inline
wlan_cm_reset_check_6ghz_security(struct wlan_objmgr_psoc * psoc)516 void wlan_cm_reset_check_6ghz_security(struct wlan_objmgr_psoc *psoc) {}
517 
518 static inline
wlan_cm_get_check_6ghz_security(struct wlan_objmgr_psoc * psoc)519 bool wlan_cm_get_check_6ghz_security(struct wlan_objmgr_psoc *psoc)
520 {
521 	return false;
522 }
523 
524 static inline
wlan_cm_set_standard_6ghz_conn_policy(struct wlan_objmgr_psoc * psoc,uint32_t value)525 void wlan_cm_set_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc,
526 					   uint32_t value)
527 {
528 }
529 
530 static inline
wlan_cm_get_standard_6ghz_conn_policy(struct wlan_objmgr_psoc * psoc)531 bool wlan_cm_get_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc)
532 {
533 	return false;
534 }
535 
536 static inline
wlan_cm_set_disable_vlp_sta_conn_to_sp_ap(struct wlan_objmgr_psoc * psoc,bool value)537 void wlan_cm_set_disable_vlp_sta_conn_to_sp_ap(struct wlan_objmgr_psoc *psoc,
538 					       bool value)
539 {}
540 
541 static inline
wlan_cm_get_disable_vlp_sta_conn_to_sp_ap(struct wlan_objmgr_psoc * psoc)542 bool wlan_cm_get_disable_vlp_sta_conn_to_sp_ap(struct wlan_objmgr_psoc *psoc)
543 {
544 	return false;
545 }
546 
547 static inline
wlan_cm_set_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc * psoc,uint32_t value)548 void wlan_cm_set_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc,
549 				    uint32_t value) {}
550 
551 static inline
wlan_cm_get_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc * psoc)552 uint32_t wlan_cm_get_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc)
553 {
554 	return DEFAULT_KEYMGMT_6G_MASK;
555 }
556 #endif
557 
558 #ifdef CONN_MGR_ADV_FEATURE
559 /**
560  * wlan_cm_set_check_assoc_disallowed() - Set check assoc disallowed param
561  * @psoc: pointer to psoc object
562  * @value: value to be set
563  *
564  * Return: void
565  */
566 void wlan_cm_set_check_assoc_disallowed(struct wlan_objmgr_psoc *psoc,
567 					bool value);
568 
569 /**
570  * wlan_cm_get_check_assoc_disallowed() - get check assoc disallowed param
571  * @psoc: pointer to psoc object
572  * @value: value to be filled
573  *
574  * Return: void
575  */
576 void wlan_cm_get_check_assoc_disallowed(struct wlan_objmgr_psoc *psoc,
577 					bool *value);
578 #endif
579 
580 /**
581  * cm_get_entry() - Get bss scan entry by link mac address
582  * @scan_list: Scan entry list of bss candidates after filtering
583  * @link_addr: link mac address
584  *
585  * Return: Pointer to bss scan entry
586  */
587 struct scan_cache_entry *cm_get_entry(qdf_list_t *scan_list,
588 				      struct qdf_mac_addr *link_addr);
589 #endif
590