xref: /wlan-dirver/qca-wifi-host-cmn/umac/mlme/connection_mgr/dispatcher/inc/cfg_mlme_score_params.h (revision 2f4b444fb7e689b83a4ab0e7b3b38f0bf4def8e0)
1 /*
2  * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 /**
18  * DOC: This file contains MLME SCORING related CFG/INI Items.
19  */
20 
21 #ifndef __CFG_MLME_SCORE_PARAMS_H
22 #define __CFG_MLME_SCORE_PARAMS_H
23 
24 /*
25  * <ini>
26  * rssi_weightage/RoamAPScore_RSSIWeight - RSSI Weightage to calculate best
27  * candidate
28  * @Min: 0
29  * @Max: 100
30  * @Default: 20
31  *
32  * This ini is used to increase/decrease RSSI weightage in best candidate
33  * selection. AP with better RSSI will get more weightage.
34  *
35  * Related: None
36  *
37  * Supported Feature: STA Candidate selection
38  *
39  * Usage: External
40  *
41  * </ini>
42  */
43 #define CFG_SCORING_RSSI_WEIGHTAGE CFG_INI_UINT( \
44 	"rssi_weightage RoamAPScore_RSSIWeight", \
45 	0, \
46 	100, \
47 	20, \
48 	CFG_VALUE_OR_DEFAULT, \
49 	"RSSI Weightage")
50 
51 /*
52  * <ini>
53  * ht_caps_weightage - HT caps weightage to calculate best candidate
54  * @Min: 0
55  * @Max: 100
56  * @Default: 2
57  *
58  * This ini is used to increase/decrease HT caps weightage in best candidate
59  * selection. If AP supports HT caps, AP will get additional Weightage with
60  * this param. Weightage will be given only if dot11mode is HT capable.
61  *
62  * Related: None
63  *
64  * Supported Feature: STA Candidate selection
65  *
66  * Usage: External
67  *
68  * </ini>
69  */
70 #define CFG_SCORING_HT_CAPS_WEIGHTAGE CFG_INI_UINT( \
71 	"ht_caps_weightage", \
72 	0, \
73 	100, \
74 	2, \
75 	CFG_VALUE_OR_DEFAULT, \
76 	"HT Caps Weightage")
77 
78 /*
79  * <ini>
80  * vht_caps_weightage - VHT caps Weightage to calculate best candidate
81  * @Min: 0
82  * @Max: 100
83  * @Default: 1
84  *
85  * This ini is used to increase/decrease VHT caps weightage in best candidate
86  * selection. If AP supports VHT caps, AP will get additional weightage with
87  * this param. Weightage will be given only if dot11mode is VHT capable.
88  *
89  * Related: None
90  *
91  * Supported Feature: STA Candidate selection
92  *
93  * Usage: External
94  *
95  * </ini>
96  */
97 #define CFG_SCORING_VHT_CAPS_WEIGHTAGE CFG_INI_UINT( \
98 	"vht_caps_weightage", \
99 	0, \
100 	100, \
101 	1, \
102 	CFG_VALUE_OR_DEFAULT, \
103 	"HT Caps Weightage")
104 
105 /*
106  * <ini>
107  * he_caps_weightage - HE caps Weightage to calculate best candidate
108  * @Min: 0
109  * @Max: 100
110  * @Default: 2
111  *
112  * This ini is used to increase/decrease HE caps weightage in best candidate
113  * selection. If AP supports HE caps, AP will get additional weightage with
114  * this param. Weightage will be given only if dot11mode is HE capable.
115  *
116  * Related: None
117  *
118  * Supported Feature: STA Candidate selection
119  *
120  * Usage: External
121  *
122  * </ini>
123  */
124 #define CFG_SCORING_HE_CAPS_WEIGHTAGE CFG_INI_UINT( \
125 	"he_caps_weightage", \
126 	0, \
127 	100, \
128 	2, \
129 	CFG_VALUE_OR_DEFAULT, \
130 	"HE Caps Weightage")
131 
132 /*
133  * <ini>
134  * chan_width_weightage - Channel Width Weightage to calculate best candidate
135  * @Min: 0
136  * @Max: 100
137  * @Default: 12
138  *
139  * This ini is used to increase/decrease Channel Width weightage in best
140  * candidate selection. AP with Higher channel width will get higher weightage
141  *
142  * Related: bandwidth_weight_per_index
143  *
144  * Supported Feature: STA Candidate selection
145  *
146  * Usage: External
147  *
148  * </ini>
149  */
150 #define CFG_SCORING_CHAN_WIDTH_WEIGHTAGE CFG_INI_UINT( \
151 	"chan_width_weightage", \
152 	0, \
153 	100, \
154 	12, \
155 	CFG_VALUE_OR_DEFAULT, \
156 	"Channel width weightage")
157 
158 /*
159  * <ini>
160  * chan_band_weightage - Channel Band perferance to 5GHZ to
161  * calculate best candidate
162  * @Min: 0
163  * @Max: 100
164  * @Default: 2
165  *
166  * This ini is used to increase/decrease Channel Band Preference weightage
167  * in best candidate selection. 5GHZ AP get this additional boost compare to
168  * 2GHZ AP before   rssi_pref_5g_rssi_thresh and 2.4Ghz get weightage after
169  * rssi_pref_5g_rssi_thresh.
170  *
171  * Related: rssi_pref_5g_rssi_thresh, band_weight_per_index
172  *
173  * Supported Feature: STA Candidate selection
174  *
175  * Usage: External
176  *
177  * </ini>
178  */
179 #define CFG_SCORING_CHAN_BAND_WEIGHTAGE CFG_INI_UINT( \
180 	"chan_band_weightage", \
181 	0, \
182 	100, \
183 	2, \
184 	CFG_VALUE_OR_DEFAULT, \
185 	"Channel Band Weightage")
186 
187 /*
188  * <ini>
189  * nss_weightage - NSS Weightage to calculate best candidate
190  * @Min: 0
191  * @Max: 100
192  * @Default: 16
193  *
194  * This ini is used to increase/decrease NSS weightage in best candidate
195  * selection. If there are two AP, one AP supports 2x2 and another one supports
196  * 1x1 and station supports 2X2, first A will get this additional weightage
197  * depending on self-capability.
198  *
199  * Related: nss_weight_per_index
200  *
201  * Supported Feature: STA Candidate selection
202  *
203  * Usage: External
204  *
205  * </ini>
206  */
207 #define CFG_SCORING_NSS_WEIGHTAGE CFG_INI_UINT( \
208 	"nss_weightage", \
209 	0, \
210 	100, \
211 	16, \
212 	CFG_VALUE_OR_DEFAULT, \
213 	"NSS Weightage")
214 /*
215  * <ini>
216  * beamforming_cap_weightage - Beam Forming Weightage to
217  *			       calculate best candidate
218  * @Min: 0
219  * @Max: 100
220  * @Default: 2
221  *
222  * This ini is used to increase/decrease Beam forming Weightage if some AP
223  * support Beam forming or not. If AP supports Beam forming, that AP will get
224  * additional boost of this weightage.
225  *
226  * Related: None
227  *
228  * Supported Feature: STA Candidate selection
229  *
230  * Usage: External
231  *
232  * </ini>
233  */
234 #define CFG_SCORING_BEAMFORM_CAP_WEIGHTAGE CFG_INI_UINT( \
235 	"beamforming_cap_weightage", \
236 	0, \
237 	100, \
238 	PLATFORM_VALUE(2, 0), \
239 	CFG_VALUE_OR_DEFAULT, \
240 	"Beamforming Cap Weightage")
241 
242 /*
243  * <ini>
244  * pcl_weightage - PCL Weightage to calculate best candidate
245  * @Min: 0
246  * @Max: 100
247  * @Default: 10
248  *
249  * This ini is used to increase/decrease PCL weightage in best candidate
250  * selection. If some APs are in PCL list, those AP will get addition
251  * weightage.
252  *
253  * Related: None
254  *
255  * Supported Feature: STA Candidate selection
256  *
257  * Usage: External
258  *
259  * </ini>
260  */
261 #define CFG_SCORING_PCL_WEIGHTAGE CFG_INI_UINT( \
262 	"pcl_weightage", \
263 	0, \
264 	100, \
265 	PLATFORM_VALUE(10, 0), \
266 	CFG_VALUE_OR_DEFAULT, \
267 	"PCL Weightage")
268 
269 /*
270  * <ini>
271  * channel_congestion_weightage/RoamAPScore_CUWeight - channel Congestion
272  * Weightage to
273  * calculate best candidate
274  * @Min: 0
275  * @Max: 100
276  * @Default: 25
277  *
278  * This ini is used to increase/decrease channel congestion weightage in
279  * candidate selection. Congestion is measured with the help of ESP/QBSS load.
280  *
281  * Related: num_esp_qbss_slots
282  *
283  * Supported Feature: STA Candidate selection
284  *
285  * Usage: External
286  *
287  * </ini>
288  */
289 #define CFG_SCORING_CHAN_CONGESTION_WEIGHTAGE CFG_INI_UINT( \
290 	"channel_congestion_weightage RoamAPScore_CUWeight", \
291 	0, \
292 	100, \
293 	25, \
294 	CFG_VALUE_OR_DEFAULT, \
295 	"Channel Congestion Weightage")
296 
297 /*
298  * <ini>
299  * oce_wan_weightage - OCE WAN DL capacity Weightage to calculate best candidate
300  * @Min: 0
301  * @Max: 100
302  * @Default: 2
303  *
304  * This ini is used to increase/decrease OCE WAN caps weightage in best
305  * candidate selection. If AP have OCE WAN information, give weightage depending
306  * on the downaload available capacity.
307  *
308  * Related: num_oce_wan_slots
309  *
310  * Supported Feature: STA Candidate selection
311  *
312  * Usage: External
313  *
314  * </ini>
315  */
316 #define CFG_SCORING_OCE_WAN_WEIGHTAGE CFG_INI_UINT( \
317 	"oce_wan_weightage", \
318 	0, \
319 	100, \
320 	PLATFORM_VALUE(2, 0), \
321 	CFG_VALUE_OR_DEFAULT, \
322 	"OCE WAN Weightage")
323 
324 /*
325  * <ini>
326  * oce_ap_tx_pwr_weightage - update scoring param based on ap tx power
327  * @Min: 0
328  * @Max: 10
329  * @Default: 5
330  *
331  * This ini is used to store calculate weightage based on ap tx power.
332  *
333  * Related: None
334  *
335  * Supported Feature: STA
336  *
337  * Usage: External
338  *
339  * </ini>
340  */
341 #define CFG_OCE_AP_TX_PWR_WEIGHTAGE CFG_INI_UINT( \
342 		"oce_ap_tx_pwr_weightage", \
343 		0, \
344 		10, \
345 		PLATFORM_VALUE(5, 0), \
346 		CFG_VALUE_OR_DEFAULT,\
347 		"AP weigtage for OCE ap tx power")
348 
349 /*
350  * <ini>
351  * oce_subnet_id_weightage - update scoring param based on subnet id
352  * @Min: 0
353  * @Max: 10
354  * @Default: 3
355  *
356  * This ini is used to calculate subnet id weightage in roam score.
357  * If the MBO-OCE ie has "IP subnet indication attribute", then host
358  * considers 50% of the "oce_subnet_id_weightage" value to calculate
359  * roam score for the initial connection and 100% of the
360  * "oce_subnet_id_weightage" value to calculate roam score for roaming
361  * case.
362  * "oce_ap_tx_pwr_weightage" adds a small amount of percentage advantage
363  * in roam score while selection of an AP candidate within the same subnet
364  * ID. If "oce_ap_tx_pwr_weightage" value is 0(min), roam score doesn't
365  * include percentage weightage for subnet id and if "oce_ap_tx_pwr_weightage"
366  * value is 10(max), then the weightage given because of same subnet ID is
367  * more in roam score. This ini is also used for WFA certification.
368  *
369  * Related: None
370  *
371  * Supported Feature: STA
372  *
373  * Usage: External
374  *
375  * </ini>
376  */
377 #define CFG_OCE_SUBNET_ID_WEIGHTAGE CFG_INI_UINT( \
378 		"oce_subnet_id_weightage", \
379 		0, \
380 		10, \
381 		PLATFORM_VALUE(3, 0), \
382 		CFG_VALUE_OR_DEFAULT,\
383 		"AP weigtage for OCE subnet id")
384 
385 /*
386  * <ini>
387  * sae_pk_ap_weightage - update scoring param based on SAE PK ap weightage
388  * @Min: 0
389  * @Max: 10
390  * @Default: 3
391  *
392  * This ini is used to calculate SAE PK ap weightage in roam score. SAE Public
393  * Key (SAE-PK) authentication is an extension of SAE that is intended for use
394  * cases where authentication is based on a password that might be
395  * distributed to or obtained by a potential adversary. With SAE-PK, the AP in
396  * an infrastructure network is additionally authenticated based on a static
397  * public/private key pair. This ini is also used for WFA certification.
398  *
399  * Related: None
400  *
401  * Supported Feature: STA
402  *
403  * Usage: External
404  *
405  * </ini>
406  */
407 #define CFG_SAE_PK_AP_WEIGHTAGE CFG_INI_UINT( \
408 		"sae_pk_ap_weightage", \
409 		0, \
410 		10, \
411 		PLATFORM_VALUE(3, 0), \
412 		CFG_VALUE_OR_DEFAULT,\
413 		"SAE-PK AP weightage")
414 
415 /*
416  * <ini>
417  * best_rssi_threshold - Best Rssi for score calculation
418  * @Min: 0
419  * @Max: 96
420  * @Default: 55
421  *
422  * This ini tells limit for best RSSI. RSSI better than this limit are
423  * considered as best RSSI. The best RSSI is given full rssi_weightage.
424  *
425  * Related: rssi_weightage
426  *
427  * Supported Feature: STA Candidate selection
428  *
429  * Usage: External
430  *
431  * </ini>
432  */
433 #define CFG_SCORING_BEST_RSSI_THRESHOLD CFG_INI_UINT( \
434 	"best_rssi_threshold", \
435 	0, \
436 	96, \
437 	55, \
438 	CFG_VALUE_OR_DEFAULT, \
439 	"Best RSSI threshold")
440 
441 /*
442  * <ini>
443  * good_rssi_threshold - Good Rssi for score calculation
444  * @Min: 0
445  * @Max: 96
446  * @Default: 70
447  *
448  * This ini tells limit for good RSSI. RSSI better than this limit and less
449  * than best_rssi_threshold is considered as good RSSI.
450  *
451  * Related: rssi_weightage, best_rssi_threshold
452  *
453  * Supported Feature: STA Candidate selection
454  *
455  * Usage: External
456  *
457  * </ini>
458  */
459 #define CFG_SCORING_GOOD_RSSI_THRESHOLD CFG_INI_UINT( \
460 	"good_rssi_threshold", \
461 	0, \
462 	96, \
463 	70, \
464 	CFG_VALUE_OR_DEFAULT, \
465 	"Good RSSI threshold")
466 
467 /*
468  * <ini>
469  * bad_rssi_threshold - Bad Rssi for score calculation
470  * @Min: 0
471  * @Max: 96
472  * @Default: 80
473  *
474  * This ini tells limit for Bad RSSI. RSSI greater then bad_rssi_threshold
475  * is considered as bad RSSI.
476  *
477  * Related: rssi_weightage, good_rssi_threshold
478  *
479  * Supported Feature: STA Candidate selection
480  *
481  * Usage: External
482  *
483  * </ini>
484  */
485 #define CFG_SCORING_BAD_RSSI_THRESHOLD CFG_INI_UINT( \
486 	"bad_rssi_threshold", \
487 	0, \
488 	96, \
489 	80, \
490 	CFG_VALUE_OR_DEFAULT, \
491 	"Bad RSSI threshold")
492 
493 /*
494  * <ini>
495  * good_rssi_pcnt - Percent Score to Good RSSI out of total RSSI score.
496  * @Min: 0
497  * @Max: 100
498  * @Default: 80
499  *
500  * This ini tells about how much percent should be given to good RSSI(RSSI
501  * between best_rssi_threshold and good_rssi_threshold) out of RSSI weightage.
502  *
503  * Related: rssi_weightage, best_rssi_threshold, good_rssi_threshold
504  *
505  * Supported Feature: STA Candidate selection
506  *
507  * Usage: External
508  *
509  * </ini>
510  */
511 #define CFG_SCORING_GOOD_RSSI_PERCENT CFG_INI_UINT( \
512 	"good_rssi_pcnt", \
513 	0, \
514 	100, \
515 	80, \
516 	CFG_VALUE_OR_DEFAULT, \
517 	"Good RSSI Percent")
518 
519 /*
520  * <ini>
521  * bad_rssi_pcnt - Percent Score to BAD RSSI out of total RSSI score.
522  * @Min: 0
523  * @Max: 100
524  * @Default: 25
525  *
526  * This ini tells about how much percent should be given to bad RSSI (RSSI
527  * between good_rssi_threshold and bad_rssi_threshold) out of RSSI weightage.
528  *
529  * Related: rssi_weightage, good_rssi_threshold, bad_rssi_threshold
530  *
531  * Supported Feature: STA Candidate selection
532  *
533  * Usage: External
534  *
535  * </ini>
536  */
537 #define CFG_SCORING_BAD_RSSI_PERCENT CFG_INI_UINT( \
538 	"bad_rssi_pcnt", \
539 	0, \
540 	100, \
541 	25, \
542 	CFG_VALUE_OR_DEFAULT, \
543 	"Bad RSSI Percent")
544 
545 /*
546  * <ini>
547  * good_rssi_bucket_size - Bucket size between best and good RSSI to score.
548  * @Min: 1
549  * @Max: 10
550  * @Default: 5
551  *
552  * This ini tells about bucket size for scoring between best and good RSSI.
553  * Below Best RSSI, 100% score will be given. Between best and good RSSI, RSSI
554  * is divided in buckets and score will be assigned bucket wise starting from
555  * good_rssi_pcnt.
556  *
557  * Related: rssi_weightage, good_rssi_pcnt
558  *
559  * Supported Feature: STA Candidate selection
560  *
561  * Usage: External
562  *
563  * </ini>
564  */
565 #define CFG_SCORING_GOOD_RSSI_BUCKET_SIZE CFG_INI_UINT( \
566 	"good_rssi_bucket_size", \
567 	1, \
568 	10, \
569 	5, \
570 	CFG_VALUE_OR_DEFAULT, \
571 	"Good RSSI Bucket Size")
572 
573 /*
574  * <ini>
575  * bad_rssi_bucket_size - Bucket size between good and bad RSSI to score.
576  * @Min: 1
577  * @Max: 10
578  * @Default: 5
579  *
580  * This ini tells about bucket size for scoring between good and bad RSSI.
581  * Between good and bad RSSI, RSSI is divided in buckets and score will be
582  * assigned bucket wise starting from bad_rssi_pcnt.
583  *
584  * Related: rssi_weightage, bad_rssi_pcnt
585  *
586  * Supported Feature: STA Candidate selection
587  *
588  * Usage: External
589  *
590  * </ini>
591  */
592 #define CFG_SCORING_BAD_RSSI_BUCKET_SIZE CFG_INI_UINT( \
593 	"bad_rssi_bucket_size", \
594 	1, \
595 	10, \
596 	5, \
597 	CFG_VALUE_OR_DEFAULT, \
598 	"Bad RSSI Bucket Size")
599 
600 /*
601  * <ini>
602  * rssi_pref_5g_rssi_thresh - A RSSI threshold above which 5 GHz is not favored
603  * @Min: 0
604  * @Max: 96
605  * @Default: 76
606  *
607  * 5G AP are given chan_band_weightage. This ini tells about RSSI threshold
608  * above which 5GHZ is not favored.
609  *
610  * Related: chan_band_weightage
611  *
612  * Supported Feature: STA Candidate selection
613  *
614  * Usage: External
615  *
616  * </ini>
617  */
618 #define CFG_SCORING_RSSI_PREF_5G_THRESHOLD CFG_INI_UINT( \
619 	"rssi_pref_5g_rssi_thresh", \
620 	0, \
621 	96, \
622 	76, \
623 	CFG_VALUE_OR_DEFAULT, \
624 	"RSSI Pref 5G Threshold")
625 
626 /*
627  * <ini>
628  * bandwidth_weight_per_index - percentage as per bandwidth
629  * @Min: 0x00000000
630  * @Max: 0x64646464
631  * @Default: 0x6432190C
632  *
633  * This INI give percentage value of chan_width_weightage to be used as per
634  * peer bandwidth. Self BW is also considered while calculating score. Eg if
635  * self BW is 20 MHZ 10% will be given for all AP irrespective of the AP
636  * capability.
637  *
638  * Indexes are defined in this way.
639  *     0 Index (BITS 0-7): 20 MHz - Def 12%
640  *     1 Index (BITS 8-15): 40 MHz - Def 25%
641  *     2 Index (BITS 16-23): 80 MHz - Def 50%
642  *     3 Index (BITS 24-31): 160 MHz - Def 100%
643  * These percentage values are stored in HEX. For any index max value, can be 64
644  *
645  * Related: chan_width_weightage
646  *
647  * Supported Feature: STA Candidate selection
648  *
649  * Usage: External
650  *
651  * </ini>
652  */
653 #define CFG_SCORING_BW_WEIGHT_PER_IDX CFG_INI_UINT( \
654 	"bandwidth_weight_per_index", \
655 	0x00000000, \
656 	0x64646464, \
657 	0x6432190C, \
658 	CFG_VALUE_OR_DEFAULT, \
659 	"Bandwidth weight per index")
660 
661 /*
662  * <ini>
663  * nss_weight_per_index - percentage as per NSS
664  * @Min: 0x00000000
665  * @Max: 0x64646464
666  * @Default: 0x6432190C
667  *
668  * This INI give percentage value of nss_weightage to be used as per peer NSS.
669  * Self NSS capability is also considered. Eg if self NSS is 1x1 10% will be
670  * given for all AP irrespective of the AP capability.
671  *
672  * Indexes are defined in this way.
673  *     0 Index (BITS 0-7): 1X1- Def 12%
674  *     1 Index (BITS 8-15): 2X2- Def 25%
675  *     2 Index (BITS 16-23): 3X3- Def 50%
676  *     3 Index (BITS 24-31): 4X4- Def 100%
677  * These percentage values are stored in HEX. For any index max value, can be 64
678  *
679  * Related: nss_weightage
680  *
681  * Supported Feature: STA Candidate selection
682  *
683  * Usage: External
684  *
685  * </ini>
686  */
687 #define CFG_SCORING_NSS_WEIGHT_PER_IDX CFG_INI_UINT( \
688 	"nss_weight_per_index", \
689 	0x00000000, \
690 	0x64646464, \
691 	0x6432190C, \
692 	CFG_VALUE_OR_DEFAULT, \
693 	"NSS weight per index")
694 
695 /*
696  * <ini>
697  * band_weight_per_index - percentage as per band
698  * @Min: 0x00000000
699  * @Max: 0x64646464
700  * @Default: 0x0000644B
701  *
702  * This INI give percentage value of chan_band_weightage to be used as per band.
703  * If RSSI is greater than rssi_pref_5g_rssi_thresh preference is given for 5Ghz
704  * else, it's given for 2.4Ghz.
705  *
706  * Indexes are defined in this way.
707  *     0 Index (BITS 0-7): 2.4GHz - Def 10%
708  *     1 Index (BITS 8-15): 5GHz - Def 20%
709  *     2 Index (BITS 16-23): 6Ghz - Def - 100%
710  *     3 Index (BITS 24-31): Reserved
711  * These percentage values are stored in HEX. For any index max value, can be 64
712  *
713  * Related: chan_band_weightage, rssi_pref_5g_rssi_thresh
714  *
715  * Supported Feature: STA Candidate selection
716  *
717  * Usage: External
718  *
719  * </ini>
720  */
721 #define CFG_SCORING_BAND_WEIGHT_PER_IDX CFG_INI_UINT( \
722 	"band_weight_per_index", \
723 	0x00000000, \
724 	0x64646464, \
725 	0x00644B32, \
726 	CFG_VALUE_OR_DEFAULT, \
727 	"Band weight per index")
728 
729 /*
730  * <ini>
731  * num_esp_qbss_slots - number of slots in which the esp/qbss load will
732  * be divided
733  *
734  * @Min: 1
735  * @Max: 15
736  * @Default: 8
737  *
738  * Number of slots in which the esp/qbss load will be divided. Max 15. index 0
739  * is used for 'not_present. Num_slot will equally divide 100. e.g, if
740  * num_slot = 4 slot 1 = 0-25% load, slot 2 = 26-50% load, slot 3 = 51-75% load,
741  * slot 4 = 76-100% load. Remaining unused index can be 0.
742  * Following is load percentage, score percentage and score of num_slot = 8,
743  * weight=25.
744  * 0-12% 13-25% 26-38% 39-50% 51-63 %64-75% 76-88% 87-100% Not Present
745  * 100%  90%    80%    70%    50%   25%     10%    5%      50%
746  * 2500  2250   2000   1750   1250  625     250    125     1250
747  *
748  * Usage: External
749  *
750  * </ini>
751  */
752 #define CFG_SCORING_NUM_ESP_QBSS_SLOTS CFG_INI_UINT( \
753 	"num_esp_qbss_slots", \
754 	1, \
755 	15, \
756 	8, \
757 	CFG_VALUE_OR_DEFAULT, \
758 	"Num ESP QPSS Slots")
759 
760 /*
761  * <ini>
762  * esp_qbss_score_idx3_to_0 - percentage for  esp/qbss load for slots 0-3
763  * @Min: 0x00000000
764  * @Max: 0x64646464
765  * @Default: 0x505A6432
766  *
767  * This INI give percentage value of channel_congestion_weightage to be used as
768  * index in which the load value falls. Index 0 is for percentage when ESP/QBSS
769  * is not present.
770  *
771  * Indexes are defined in this way.
772  *     0 Index (BITS 0-7): when ESP/QBSS is not present
773  *     1 Index (BITS 8-15): SLOT_1
774  *     2 Index (BITS 16-23): SLOT_2
775  *     3 Index (BITS 24-31): SLOT_3
776  * These percentage values are stored in HEX. For any index max value, can be 64
777  *
778  * Related: channel_congestion_weightage, num_esp_qbss_slots
779  *
780  * Supported Feature: STA Candidate selection
781  *
782  * Usage: External
783  *
784  * </ini>
785  */
786 #define CFG_SCORING_ESP_QBSS_SCORE_IDX_3_TO_0 CFG_INI_UINT( \
787 	"esp_qbss_score_idx3_to_0", \
788 	0x00000000, \
789 	0x64646464, \
790 	0x505A6432, \
791 	CFG_VALUE_OR_DEFAULT, \
792 	"ESP QPSS Score Index 3 to 0")
793 
794 /*
795  * <ini>
796  * esp_qbss_score_idx7_to_4 - percentage for  esp/qbss load for slots 4-7
797  * @Min: 0x00000000
798  * @Max: 0x64646464
799  * @Default: 0x0A193246
800  *
801  * This INI give percentage value of channel_congestion_weightage to be used as
802  * index in which the load value falls. Used only if num_esp_qbss_slots is
803  * greater than 3.
804  *
805  * Indexes are defined in this way.
806  *     0 Index (BITS 0-7): SLOT_4
807  *     1 Index (BITS 8-15): SLOT_5
808  *     2 Index (BITS 16-23): SLOT_6
809  *     3 Index (BITS 24-31): SLOT_7
810  * These percentage values are stored in HEX. For any index max value, can be 64
811  *
812  * Related: channel_congestion_weightage, num_esp_qbss_slots
813  *
814  * Supported Feature: STA Candidate selection
815  *
816  * Usage: External
817  *
818  * </ini>
819  */
820 #define CFG_SCORING_ESP_QBSS_SCORE_IDX_7_TO_4 CFG_INI_UINT( \
821 	"esp_qbss_score_idx7_to_4", \
822 	0x00000000, \
823 	0x64646464, \
824 	0x0A193246, \
825 	CFG_VALUE_OR_DEFAULT, \
826 	"ESP QPSS Score Index 7 to 4")
827 
828 /*
829  * <ini>
830  * esp_qbss_score_idx11_to_8 - percentage for  esp/qbss load for slots 8-11
831  * @Min: 0x00000000
832  * @Max: 0x64646464
833  * @Default: 0x00000005
834  *
835  * This INI give percentage value of channel_congestion_weightage to be used as
836  * index in which the load value falls. Used only if num_esp_qbss_slots is
837  * greater than 7.
838  *
839  * Indexes are defined in this way.
840  *     0 Index (BITS 0-7): SLOT_8
841  *     1 Index (BITS 8-15): SLOT_9
842  *     2 Index (BITS 16-23): SLOT_10
843  *     3 Index (BITS 24-31): SLOT_11
844  * These percentage values are stored in HEX. For any index max value, can be 64
845  *
846  * Related: channel_congestion_weightage, num_esp_qbss_slots
847  *
848  * Supported Feature: STA Candidate selection
849  *
850  * Usage: External
851  *
852  * </ini>
853  */
854 #define CFG_SCORING_ESP_QBSS_SCORE_IDX_11_TO_8 CFG_INI_UINT( \
855 	"esp_qbss_score_idx11_to_8", \
856 	0x00000000, \
857 	0x64646464, \
858 	0x00000005, \
859 	CFG_VALUE_OR_DEFAULT, \
860 	"ESP QPSS Score Index 11 to 8")
861 
862 /*
863  * <ini>
864  * esp_qbss_score_idx15_to_12 - percentage for	esp/qbss load for slots 12-15
865  * @Min: 0x00000000
866  * @Max: 0x64646464
867  * @Default: 0x00000000
868  *
869  * This INI give percentage value of channel_congestion_weightage to be used as
870  * index in which the load value falls. Used only if num_esp_qbss_slots is
871  * greater than 11.
872  *
873  * Indexes are defined in this way.
874  *     0 Index (BITS 0-7): SLOT_12
875  *     1 Index (BITS 8-15): SLOT_13
876  *     2 Index (BITS 16-23): SLOT_14
877  *     3 Index (BITS 24-31): SLOT_15
878  * These percentage values are stored in HEX. For any index max value, can be 64
879  *
880  * Related: channel_congestion_weightage, num_esp_qbss_slots
881  *
882  * Supported Feature: STA Candidate selection
883  *
884  * Usage: External
885  *
886  * </ini>
887  */
888 #define CFG_SCORING_ESP_QBSS_SCORE_IDX_15_TO_12 CFG_INI_UINT( \
889 	"esp_qbss_score_idx15_to_12", \
890 	0x00000000, \
891 	0x64646464, \
892 	0x00000000, \
893 	CFG_VALUE_OR_DEFAULT, \
894 	"ESP QPSS Score Index 15 to 12")
895 
896 /*
897  * <ini>
898  * num_oce_wan_slots - number of slots in which the oce wan metrics will
899  * be divided
900  *
901  * @Min: 1
902  * @Max: 15
903  * @Default: 8
904  *
905  * Number of slots in which the oce wan metrics will be divided. Max 15. index 0
906  * is used for not_present. Num_slot will equally divide 100. e.g, if
907  * num_slot = 4 slot 1 = 0-3 DL CAP, slot 2 = 4-7 DL CAP, slot 3 = 8-11 DL CAP,
908  * slot 4 = 12-15 DL CAP. Remaining unused index can be 0.
909  *
910  * Related: oce_wan_weightage
911  *
912  * Usage: External
913  *
914  * </ini>
915  */
916 #define CFG_SCORING_NUM_OCE_WAN_SLOTS CFG_INI_UINT( \
917 	"num_oce_wan_slots", \
918 	1, \
919 	15, \
920 	15, \
921 	CFG_VALUE_OR_DEFAULT, \
922 	"Num OCE WAN Slots")
923 
924 /*
925  * <ini>
926  * oce_wan_score_idx3_to_0 - percentage for OCE WAN metrics score for slots 0-3
927  * @Min: 0x00000000
928  * @Max: 0x64646464
929  * @Default: 0x00000032
930  *
931  * This INI give percentage value of OCE WAN metrics DL CAP, to be used as
932  * index in which the DL CAP value falls. Index 0 is for percentage when
933  * OCE WAN metrics DL CAP is not present.
934  *
935  * Indexes are defined in this way.
936  *     0 Index (BITS 0-7): when OCE WAN metrics DL CAP is not present
937  *     1 Index (BITS 8-15): SLOT_1
938  *     2 Index (BITS 16-23): SLOT_2
939  *     3 Index (BITS 24-31): SLOT_3
940  * These percentage values are stored in HEX. For any index max value, can be 64
941  *
942  * Related: num_oce_wan_slots, oce_wan_weightage
943  *
944  * Supported Feature: STA Candidate selection
945  *
946  * Usage: External
947  *
948  * </ini>
949  */
950 #define CFG_SCORING_OCE_WAN_SCORE_IDX_3_TO_0 CFG_INI_UINT( \
951 	"oce_wan_score_idx3_to_0", \
952 	0x00000000, \
953 	0x64646464, \
954 	0x00000032, \
955 	CFG_VALUE_OR_DEFAULT, \
956 	"OCE WAN Score Index 3 to 0")
957 
958 /*
959  * <ini>
960  * oce_wan_score_idx7_to_4 - percentage for OCE WAN metrics score for slots 4-7
961  * @Min: 0x00000000
962  * @Max: 0x64646464
963  * @Default: 0x00000000
964  *
965  * This INI give percentage value of OCE WAN metrics DL CAP, to be used as
966  * index in which the DL CAP value falls. Used only if num_oce_wan_slots is
967  * greater than 3.
968  *
969  * Indexes are defined in this way.
970  *     0 Index (BITS 0-7): SLOT_4
971  *     1 Index (BITS 8-15): SLOT_5
972  *     2 Index (BITS 16-23): SLOT_6
973  *     3 Index (BITS 24-31): SLOT_7
974  * These percentage values are stored in HEX. For any index max value, can be 64
975  *
976  * Related: num_oce_wan_slots, oce_wan_weightage
977  *
978  * Supported Feature: STA Candidate selection
979  *
980  * Usage: External
981  *
982  * </ini>
983  */
984 #define CFG_SCORING_OCE_WAN_SCORE_IDX_7_TO_4 CFG_INI_UINT( \
985 	"oce_wan_score_idx7_to_4", \
986 	0x00000000, \
987 	0x64646464, \
988 	0x00000000, \
989 	CFG_VALUE_OR_DEFAULT, \
990 	"OCE WAN Score Index 7 to 4")
991 
992 /*
993  * <ini>
994  * oce_wan_score_idx11_to_8 - percentage for OCE WAN metrics score for slot 8-11
995  * @Min: 0x00000000
996  * @Max: 0x64646464
997  * @Default: 0x06030000
998  *
999  * This INI give percentage value of OCE WAN metrics DL CAP, to be used as
1000  * index in which the DL CAP value falls. Used only if num_oce_wan_slots is
1001  * greater than 7.
1002  *
1003  * Indexes are defined in this way.
1004  *     0 Index (BITS 0-7): SLOT_8
1005  *     1 Index (BITS 8-15): SLOT_9
1006  *     2 Index (BITS 16-23): SLOT_10
1007  *     3 Index (BITS 24-31): SLOT_11
1008  * These percentage values are stored in HEX. For any index max value, can be 64
1009  *
1010  * Related: num_oce_wan_slots, oce_wan_weightage
1011  *
1012  * Supported Feature: STA Candidate selection
1013  *
1014  * Usage: External
1015  *
1016  * </ini>
1017  */
1018 #define CFG_SCORING_OCE_WAN_SCORE_IDX_11_TO_8 CFG_INI_UINT( \
1019 	"oce_wan_score_idx11_to_8", \
1020 	0x00000000, \
1021 	0x64646464, \
1022 	0x06030000, \
1023 	CFG_VALUE_OR_DEFAULT, \
1024 	"OCE WAN Score Index 11 to 8")
1025 
1026 /*
1027  * <ini>
1028  * oce_wan_score_idx15_to_12 - % for OCE WAN metrics score for slot 12-15
1029  * @Min: 0x00000000
1030  * @Max: 0x64646464
1031  * @Default: 0x6432190C
1032  *
1033  * This INI give percentage value of OCE WAN metrics DL CAP, to be used as
1034  * index in which the DL CAP value falls. Used only if num_oce_wan_slots is
1035  * greater than 11.
1036  *
1037  * Indexes are defined in this way.
1038  *     0 Index (BITS 0-7): SLOT_12
1039  *     1 Index (BITS 8-15): SLOT_13
1040  *     2 Index (BITS 16-23): SLOT_14
1041  *     3 Index (BITS 24-31): SLOT_15
1042  * These percentage values are stored in HEX. For any index max value, can be 64
1043  *
1044  * Related: num_oce_wan_slots, oce_wan_weightage
1045  *
1046  * Supported Feature: STA Candidate selection
1047  *
1048  * Usage: External
1049  *
1050  * </ini>
1051  */
1052 #define CFG_SCORING_OCE_WAN_SCORE_IDX_15_TO_12 CFG_INI_UINT( \
1053 	"oce_wan_score_idx15_to_12", \
1054 	0x00000000, \
1055 	0x64646464, \
1056 	0x6432190C, \
1057 	CFG_VALUE_OR_DEFAULT, \
1058 	"OCE WAN Score Index 15 to 12")
1059 
1060 /*
1061  * <ini>
1062  * is_bssid_hint_priority - Set priority for connection with bssid_hint
1063  * BSSID.
1064  * @Min: 0
1065  * @Max: 1
1066  * @Default: 1 - AP and 0 - non AP
1067  *
1068  * This ini is used to give priority to BSS for connection which comes
1069  * as part of bssid_hint
1070  *
1071  * Related: None
1072  *
1073  * Supported Feature: STA
1074  *
1075  * Usage: External
1076  *
1077  * </ini>
1078  */
1079 #define CFG_IS_BSSID_HINT_PRIORITY CFG_INI_UINT(\
1080 			"is_bssid_hint_priority",\
1081 			0, 1, \
1082 			PLATFORM_VALUE(0, 1), \
1083 			CFG_VALUE_OR_DEFAULT, \
1084 			"Set priority for connection with bssid_hint")
1085 
1086 /*
1087  * <ini>
1088  * vendor_roam_score_algorithm - Algorithm to calculate AP score
1089  * @Min: false
1090  * @Max: true
1091  * @Default: false
1092  *
1093  * By default the value is false and default roam algorithm will be used.
1094  * When the value is true, the V2 roaming algorithm will be used:
1095  * For this V2 algo, AP score calculation is based on ETP and below equation:
1096  * AP Score = (RSSIfactor * rssiweight(0.65)) + (CUfactor *cuweight(0.35))
1097  *
1098  * Related: None
1099  *
1100  * Supported Feature: roam score algorithm
1101  *
1102  * Usage: External
1103  *
1104  * </ini>
1105  */
1106 #define CFG_VENDOR_ROAM_SCORE_ALGORITHM \
1107 	CFG_INI_BOOL("vendor_roam_score_algorithm", false, \
1108 	"Roam candidate selection score algorithm")
1109 
1110 #ifdef CONFIG_BAND_6GHZ
1111 /*
1112  * <ini>
1113  * check_6ghz_security - Enable check for 6Ghz allowed security
1114  * BSSID.
1115  * @Min: 0
1116  * @Max: 1
1117  * @Default: non AP 1, AP 0
1118  *
1119  * This ini is used to Enable check for 6Ghz allowed security. If enabled
1120  * only WPA3 and other allowed security will be allowed for 6Ghz connection
1121  *
1122  * Related: None
1123  *
1124  * Supported Feature: STA
1125  *
1126  * Usage: External
1127  *
1128  * </ini>
1129  */
1130 #define CFG_CHECK_6GHZ_SECURITY CFG_INI_BOOL(\
1131 				"check_6ghz_security", PLATFORM_VALUE(1, 0), \
1132 				"Enable check for 6Ghz allowed security")
1133 /*
1134  * <ini>
1135  * key_mgmt_mask_6ghz - AKM bit mask (@wlan_crypto_key_mgmt) allowed in 6Ghz
1136  * channel
1137  * @Min: 0
1138  * @Max: 0xffffffff
1139  * @Default: 0xffffffff
1140  *
1141  * This ini is used to set allowed AKM check for 6Ghz. If enabled
1142  * only only AKM bits allowed will be used to connect to candidate.
1143  * valid only if check_6ghz_security is 0. By default all AKM are allowed
1144  *
1145  * Related: check_6Ghz_security
1146  *
1147  * Supported Feature: STA
1148  *
1149  * Usage: External
1150  *
1151  * </ini>
1152  */
1153 #define CFG_6GHZ_ALLOWED_AKM_MASK CFG_INI_UINT(\
1154 			"key_mgmt_mask_6ghz",\
1155 			0, DEFAULT_KEYMGMT_6G_MASK, DEFAULT_KEYMGMT_6G_MASK,\
1156 			CFG_VALUE_OR_DEFAULT, \
1157 			"Set priority for connection with bssid_hint")
1158 
1159 #define CFG_6GHZ_CONFIG \
1160 	CFG(CFG_CHECK_6GHZ_SECURITY) \
1161 	CFG(CFG_6GHZ_ALLOWED_AKM_MASK)
1162 #else
1163 #define CFG_6GHZ_CONFIG
1164 #endif
1165 
1166 #ifdef WLAN_FEATURE_11BE_MLO
1167 /**
1168  * <ini>
1169  * eht_caps_weightage - EHT caps Weightage to calculate best candidate
1170  * @Min: 0
1171  * @Max: 100
1172  * @Default: 2
1173  *
1174  * This ini is used to increase/decrease EHT caps weightage in best candidate
1175  * selection. If AP supports EHT caps, AP will get additional weightage with
1176  * this param. Weightage will be given only if dot11mode is EHT capable.
1177  *
1178  * Related: None
1179  *
1180  * Supported Feature: STA Candidate selection
1181  *
1182  * Usage: External
1183  *
1184  * </ini>
1185  */
1186 #define CFG_SCORING_EHT_CAPS_WEIGHTAGE CFG_INI_UINT( \
1187 	"eht_caps_weightage", \
1188 	0, \
1189 	100, \
1190 	2, \
1191 	CFG_VALUE_OR_DEFAULT, \
1192 	"EHT Caps Weightage")
1193 
1194 /**
1195  * <ini>
1196  * mlo_weightage - MLO Weightage to calculate best candidate
1197  * @Min: 0
1198  * @Max: 100
1199  * @Default: 3
1200  *
1201  * This ini is used to increase/decrease MLO weightage in best candidate
1202  * selection. If AP supports MLO, AP will get additional weightage with
1203  * this param.
1204  *
1205  * Related: None
1206  *
1207  * Supported Feature: STA Candidate selection
1208  *
1209  * Usage: External
1210  *
1211  * </ini>
1212  */
1213 #define CFG_SCORING_MLO_WEIGHTAGE CFG_INI_UINT( \
1214 	"mlo_weightage", \
1215 	0, \
1216 	100, \
1217 	3, \
1218 	CFG_VALUE_OR_DEFAULT, \
1219 	"MLO Weightage")
1220 
1221 /**
1222  * <ini>
1223  * emlsr_weightage - eMLSR Weightage to calculate best candidate
1224  * @Min: 0
1225  * @Max: 100
1226  * @Default: 3
1227  *
1228  * This ini is used to increase/decrease eMLSR weightage in best candidate
1229  * selection. If AP supports eMLSR, AP will get additional weightage with
1230  * this param.
1231  *
1232  * Related: None
1233  *
1234  * Supported Feature: STA Candidate selection
1235  *
1236  * Usage: External
1237  *
1238  * </ini>
1239  */
1240 #define CFG_SCORING_EMLSR_WEIGHTAGE CFG_INI_UINT( \
1241 	"emlsr_weightage", \
1242 	0, \
1243 	100, \
1244 	3, \
1245 	CFG_VALUE_OR_DEFAULT, \
1246 	"eMLSR Weightage")
1247 
1248 /**
1249  * <ini>
1250  * wlm_indication_weightage - WLM indication Weightage to calculate best
1251  *                            candidate
1252  * @Min: 0
1253  * @Max: 100
1254  * @Default: 2
1255  *
1256  * This ini is used to increase/decrease WLM indication weightage in best
1257  * candidate selection. AP will get additional weightage with this param based
1258  * on WLM indicates ultra low latency or low latency.
1259  *
1260  * Related: None
1261  *
1262  * Supported Feature: STA Candidate selection
1263  *
1264  * Usage: External
1265  *
1266  * </ini>
1267  */
1268 #define CFG_SCORING_WLM_INDICATION_WEIGHTAGE CFG_INI_UINT( \
1269 	"wlm_indication_weightage", \
1270 	0, \
1271 	100, \
1272 	2, \
1273 	CFG_VALUE_OR_DEFAULT, \
1274 	"WLM indication Weightage")
1275 
1276 /**
1277  * <ini>
1278  * mlsr_link_selection - MLSR link selection criteria
1279  * @Min: 0
1280  * @Max: 1
1281  * @Default: 0
1282  *
1283  * This ini is used to select the link to operate in MLSR mode.
1284  *
1285  * The values are defined as follows:
1286  *    0 : ML Link with highest link score
1287  *    1 : Link corresponds to best average ML score
1288  *
1289  * Related: None
1290  *
1291  * Supported Feature: STA Candidate selection
1292  *
1293  * Usage: External
1294  *
1295  * </ini>
1296  */
1297 #define CFG_SCORING_MLSR_LINK_SELECTION CFG_INI_UINT( \
1298 	"mlsr_link_selection", \
1299 	0, \
1300 	1, \
1301 	0, \
1302 	CFG_VALUE_OR_DEFAULT, \
1303 	"MLSR link selection")
1304 
1305 /**
1306  * <ini>
1307  * joint_rssi_alpha - Joint RSSI alpha to select best ML candidate
1308  * @Min: 0
1309  * @Max: 100
1310  * @Default: 50
1311  *
1312  * This ini is used to increase/decrease joint RSSI alpha percentage for
1313  * an MLO candidate in best candidate selection. Using this the joint RSSI
1314  * will be calculated as below.
1315  *
1316  *     joint_rssi = (alpha % Link1 RSSI) + ((100 - alpha)% Link2 RSSI)
1317  *
1318  * Related: low_band_rssi_boost
1319  *
1320  * Supported Feature: STA Candidate selection
1321  *
1322  * Usage: External
1323  *
1324  * </ini>
1325  */
1326 #define CFG_SCORING_JOINT_RSSI_ALPHA CFG_INI_UINT( \
1327 	"joint_rssi_alpha", \
1328 	0, \
1329 	100, \
1330 	50, \
1331 	CFG_VALUE_OR_DEFAULT, \
1332 	"Joint RSSI alpha")
1333 
1334 /**
1335  * <ini>
1336  * low_band_rssi_boost - Low band RSSI boost in joint RSSI calculation
1337  * @Min: 0
1338  * @Max: 1
1339  * @Default: 1
1340  *
1341  * If joint RSSI alpha is not 50 then joint RSSI calculation will depend on
1342  * this INI param as explained below.
1343  *
1344  * If this INI set to 1, then lower band will be given more weightage.
1345  * Otherwise higher band will get more weightage.
1346  *
1347  *    Example: Joint RSSI alpha is 70
1348  *	if (low_band_rssi_boost)
1349  *		joint_rssi_5g_6g = (70 * 5g_rssi) + (30 * 6g_rssi)
1350  *	else
1351  *		joint_rssi_5g_6g = (30 * 5g_rssi) + (70 * 6g_rssi)
1352  *
1353  * Related: joint_rssi_alpha
1354  *
1355  * Supported Feature: STA Candidate selection
1356  *
1357  * Usage: External
1358  *
1359  * </ini>
1360  */
1361 #define CFG_SCORING_LOW_BAND_RSSI_BOOST CFG_INI_BOOL( \
1362 				"low_band_rssi_boost", \
1363 				1, \
1364 				"Low band RSSI boost ")
1365 
1366 /**
1367  * <ini>
1368  * joint_esp_alpha - Joint ESP alpha to select best ML candidate
1369  * @Min: 0
1370  * @Max: 100
1371  * @Default: 50
1372  *
1373  * This ini is used to increase/decrease joint ESP alpha percentage for
1374  * an MLO candidate in best candidate selection. Using this the joint ESP
1375  * will be calculated as below.
1376  *
1377  *     joint_esp = (alpha % Link1 ESP) + ((100 - alpha)% Link2 ESP)
1378  *
1379  * Related: low_band_esp_boost
1380  *
1381  * Supported Feature: STA Candidate selection
1382  *
1383  * Usage: External
1384  *
1385  * </ini>
1386  */
1387 #define CFG_SCORING_JOINT_ESP_ALPHA CFG_INI_UINT( \
1388 	"joint_esp_alpha", \
1389 	0, \
1390 	100, \
1391 	50, \
1392 	CFG_VALUE_OR_DEFAULT, \
1393 	"Joint ESP alpha")
1394 
1395 /**
1396  * <ini>
1397  * low_band_esp_boost - Low band ESP boost in joint ESP calculation
1398  * @Min: 0
1399  * @Max: 1
1400  * @Default: 1
1401  *
1402  * If joint ESP alpha is not 50 then joint ESP calculation will depend on
1403  * this INI param as explained below.
1404  *
1405  * If this INI set to 1, then lower band will be given more weightage.
1406  * Otherwise higher band will get more weightage.
1407  *
1408  *    Example: Joint ESP alpha is 70
1409  *	if (low_band_esp_boost)
1410  *		joint_esp_5g_6g = (70 * 5g_esp) + (30 * 6g_esp)
1411  *	else
1412  *		joint_esp_5g_6g = (30 * 5g_esp) + (70 * 6g_esp)
1413  *
1414  * Related: joint_esp_alpha
1415  *
1416  * Supported Feature: STA Candidate selection
1417  *
1418  * Usage: External
1419  *
1420  * </ini>
1421  */
1422 #define CFG_SCORING_LOW_BAND_ESP_BOOST CFG_INI_BOOL( \
1423 				"low_band_esp_boost", \
1424 				1, \
1425 				"Low band ESP boost ")
1426 
1427 /**
1428  * <ini>
1429  * joint_oce_alpha - Joint OCE alpha to select best ML candidate
1430  * @Min: 0
1431  * @Max: 100
1432  * @Default: 50
1433  *
1434  * This ini is used to increase/decrease joint OCE alpha percentage for
1435  * an MLO candidate in best candidate selection. Using this the joint OCE
1436  * will be calculated as below.
1437  *
1438  *     joint_oce = (alpha % Link1 OCE) + ((100 - alpha)% Link2 OCE)
1439  *
1440  * Related: low_band_oce_boost
1441  *
1442  * Supported Feature: STA Candidate selection
1443  *
1444  * Usage: External
1445  *
1446  * </ini>
1447  */
1448 #define CFG_SCORING_JOINT_OCE_ALPHA CFG_INI_UINT( \
1449 	"joint_oce_alpha", \
1450 	0, \
1451 	100, \
1452 	50, \
1453 	CFG_VALUE_OR_DEFAULT, \
1454 	"Joint OCE alpha")
1455 
1456 /**
1457  * <ini>
1458  * low_band_oce_boost - Low band OCE boost in joint OCE calculation
1459  * @Min: 0
1460  * @Max: 1
1461  * @Default: 1
1462  *
1463  * If joint OCE alpha is not 50 then joint OCE calculation will depend on
1464  * this INI param as explained below.
1465  *
1466  * If this INI set to 1, then lower band will be given more weightage.
1467  * Otherwise higher band will get more weightage.
1468  *
1469  *    Example: Joint OCE alpha is 70
1470  *	if (low_band_oce_boost)
1471  *		joint_oce_5g_6g = (70 * 5g_oce) + (30 * 6g_oce)
1472  *	else
1473  *		joint_oce_5g_6g = (30 * 5g_oce) + (70 * 6g_oce)
1474  *
1475  * Related: joint_oce_alpha
1476  *
1477  * Supported Feature: STA Candidate selection
1478  *
1479  * Usage: External
1480  *
1481  * </ini>
1482  */
1483 #define CFG_SCORING_LOW_BAND_OCE_BOOST CFG_INI_BOOL( \
1484 				"low_band_oce_boost", \
1485 				1, \
1486 				"Low band OCE boost ")
1487 
1488 /*
1489  * <ini>
1490  * ml_bandwidth_weight_per_index_4_to_7 - percentage as per bandwidth
1491  * @Min: 0x00000000
1492  * @Max: 0x64646464
1493  * @Default: 0x342A1F14
1494  *
1495  * This INI give percentage value of chan_width_weightage to be used as per
1496  * peer bandwidth for two links. Self BW is also considered while calculating
1497  * score. Eg if self BW is 20+20 MHZ 20% will be given for all AP irrespective
1498  * of the AP  capability.
1499  *
1500  * Indexes are defined in this way.
1501  *     4 Index (BITS 0-7): 20+20 MHz - Def 20%
1502  *     5 Index (BITS 8-15): 20+40 MHz - Def 31%
1503  *     6 Index (BITS 16-23): 40+40 MHz - Def 42%
1504  *     7 Index (BITS 24-31): 20+80 MHz - Def 52%
1505  * These percentage values are stored in HEX. For any index max value, can be 64
1506  *
1507  * Indexes 0-3 are considered as part of the INI bandwidth_weight_per_index
1508  *
1509  * Related: chan_width_weightage
1510  *
1511  * Supported Feature: STA Candidate selection
1512  *
1513  * Usage: External
1514  *
1515  * </ini>
1516  */
1517 #define CFG_SCORING_ML_BW_WEIGHT_PER_IDX_4_TO_7 CFG_INI_UINT( \
1518 	"ml_bandwidth_weight_per_index_4_to_7", \
1519 	0x00000000, \
1520 	0x64646464, \
1521 	0x342A1F14, \
1522 	CFG_VALUE_OR_DEFAULT, \
1523 	"ML Bandwidth weight per index 4 to 7")
1524 
1525 /*
1526  * <ini>
1527  * ml_bandwidth_weight_per_index_8_to_11 - percentage as per bandwidth
1528  * @Min: 0x00000000
1529  * @Max: 0x64646464
1530  * @Default: 0x5A57553F
1531  *
1532  * This INI give percentage value of chan_width_weightage to be used as per
1533  * peer bandwidth for two links. Self BW is also considered while calculating
1534  * score. Eg if self BW is 20+20 MHZ 20% will be given for all AP irrespective
1535  * of the AP  capability.
1536  *
1537  * Indexes are defined in this way.
1538  *     8 Index (BITS 0-7): 40+80 MHz - Def 63%
1539  *     9 Index (BITS 8-15): 80+80 MHz - Def 85%
1540  *     10 Index (BITS 16-23): 20+160 MHz - Def 87%
1541  *     11 Index (BITS 24-31): 40+160 MHz - Def 90%
1542  * These percentage values are stored in HEX. For any index max value, can be 64
1543  *
1544  * Related: chan_width_weightage
1545  *
1546  * Supported Feature: STA Candidate selection
1547  *
1548  * Usage: External
1549  *
1550  * </ini>
1551  */
1552 #define CFG_SCORING_ML_BW_WEIGHT_PER_IDX_8_TO_11 CFG_INI_UINT( \
1553 	"ml_bandwidth_weight_per_index_8_to_11", \
1554 	0x00000000, \
1555 	0x64646464, \
1556 	0x5A57553F, \
1557 	CFG_VALUE_OR_DEFAULT, \
1558 	"ML Bandwidth weight per index 8 to 11")
1559 
1560 /*
1561  * <ini>
1562  * ml_bandwidth_weight_per_index_12_to_15 - percentage as per bandwidth
1563  * @Min: 0x00000000
1564  * @Max: 0x00646464
1565  * @Default: 0x0064645F
1566  *
1567  * This INI give percentage value of chan_width_weightage to be used as per
1568  * peer bandwidth for two links. Self BW is also considered while calculating
1569  * score. Eg if self BW is 20+20 MHZ 20% will be given for all AP irrespective
1570  * of the AP  capability.
1571  *
1572  * Indexes are defined in this way.
1573  *     12 Index (BITS 0-7): 80+160 MHz - Def 95%
1574  *     13 Index (BITS 8-15): 160+160 MHz - Def 100%
1575  *     14 Index (BITS 16-23): 320 MHz - Def 100%
1576  *     15 Index (BITS 24-31): Reserved - Def 0
1577  * These percentage values are stored in HEX. For any index max value, can be 64
1578  *
1579  * Related: chan_width_weightage
1580  *
1581  * Supported Feature: STA Candidate selection
1582  *
1583  * Usage: External
1584  *
1585  * </ini>
1586  */
1587 #define CFG_SCORING_ML_BW_WEIGHT_PER_IDX_12_TO_15 CFG_INI_UINT( \
1588 	"ml_bandwidth_weight_per_index_12_to_15", \
1589 	0x00000000, \
1590 	0x00646464, \
1591 	0x0064645F, \
1592 	CFG_VALUE_OR_DEFAULT, \
1593 	"ML Bandwidth weight per index 12 to 15")
1594 
1595 /*
1596  * <ini>
1597  * ml_nss_weight_per_index_4_to_7 - percentage as per NSS
1598  * @Min: 0x00000000
1599  * @Max: 0x00646464
1600  * @Default: 0x00645019
1601  *
1602  * This INI give percentage value of nss_weightage to be used as per peer NSS.
1603  * Self NSS capability is also considered. Eg if self NSS is 1x1 10% will be
1604  * given for all AP irrespective of the AP capability.
1605  *
1606  * Indexes are defined in this way.
1607  *     4 Index (BITS 0-7): 2x2 + 2x2 - Def 25%
1608  *     5 Index (BITS 8-15): 4x4 + 4x4 - Def 80%
1609  *     6 Index (BITS 16-23): 8X8- Def 100%
1610  *     7 Index (BITS 24-31): Reserved - Def 0
1611  * These percentage values are stored in HEX. For any index max value, can be 64
1612  *
1613  * Indexes 0-3 are considered as part of the INI nss_weight_per_index
1614  *
1615  * Related: nss_weightage
1616  *
1617  * Supported Feature: STA Candidate selection
1618  *
1619  * Usage: External
1620  *
1621  * </ini>
1622  */
1623 #define CFG_SCORING_ML_NSS_WEIGHT_PER_IDX_4_TO_7 CFG_INI_UINT( \
1624 	"ml_nss_weight_per_index_4_to_7", \
1625 	0x00000000, \
1626 	0x00646464, \
1627 	0x00645019, \
1628 	CFG_VALUE_OR_DEFAULT, \
1629 	"ML NSS weight per index 4 to 7")
1630 
1631 #define CFG_MLO_CONFIG \
1632 	CFG(CFG_SCORING_EHT_CAPS_WEIGHTAGE) \
1633 	CFG(CFG_SCORING_EMLSR_WEIGHTAGE) \
1634 	CFG(CFG_SCORING_JOINT_ESP_ALPHA) \
1635 	CFG(CFG_SCORING_JOINT_OCE_ALPHA) \
1636 	CFG(CFG_SCORING_JOINT_RSSI_ALPHA) \
1637 	CFG(CFG_SCORING_LOW_BAND_ESP_BOOST) \
1638 	CFG(CFG_SCORING_LOW_BAND_OCE_BOOST) \
1639 	CFG(CFG_SCORING_LOW_BAND_RSSI_BOOST) \
1640 	CFG(CFG_SCORING_ML_BW_WEIGHT_PER_IDX_4_TO_7) \
1641 	CFG(CFG_SCORING_ML_BW_WEIGHT_PER_IDX_8_TO_11) \
1642 	CFG(CFG_SCORING_ML_BW_WEIGHT_PER_IDX_12_TO_15) \
1643 	CFG(CFG_SCORING_ML_NSS_WEIGHT_PER_IDX_4_TO_7) \
1644 	CFG(CFG_SCORING_MLO_WEIGHTAGE) \
1645 	CFG(CFG_SCORING_MLSR_LINK_SELECTION) \
1646 	CFG(CFG_SCORING_WLM_INDICATION_WEIGHTAGE)
1647 #else
1648 #define CFG_MLO_CONFIG
1649 #endif
1650 
1651 #define CFG_MLME_SCORE_ALL \
1652 	CFG(CFG_SCORING_RSSI_WEIGHTAGE) \
1653 	CFG(CFG_SCORING_HT_CAPS_WEIGHTAGE) \
1654 	CFG(CFG_SCORING_VHT_CAPS_WEIGHTAGE) \
1655 	CFG(CFG_SCORING_HE_CAPS_WEIGHTAGE) \
1656 	CFG(CFG_SCORING_CHAN_WIDTH_WEIGHTAGE) \
1657 	CFG(CFG_SCORING_CHAN_BAND_WEIGHTAGE) \
1658 	CFG(CFG_SCORING_NSS_WEIGHTAGE) \
1659 	CFG(CFG_SCORING_BEAMFORM_CAP_WEIGHTAGE) \
1660 	CFG(CFG_SCORING_PCL_WEIGHTAGE) \
1661 	CFG(CFG_SCORING_CHAN_CONGESTION_WEIGHTAGE) \
1662 	CFG(CFG_SCORING_OCE_WAN_WEIGHTAGE) \
1663 	CFG(CFG_OCE_AP_TX_PWR_WEIGHTAGE) \
1664 	CFG(CFG_OCE_SUBNET_ID_WEIGHTAGE) \
1665 	CFG(CFG_SAE_PK_AP_WEIGHTAGE) \
1666 	CFG(CFG_SCORING_BEST_RSSI_THRESHOLD) \
1667 	CFG(CFG_SCORING_GOOD_RSSI_THRESHOLD) \
1668 	CFG(CFG_SCORING_BAD_RSSI_THRESHOLD) \
1669 	CFG(CFG_SCORING_GOOD_RSSI_PERCENT) \
1670 	CFG(CFG_SCORING_BAD_RSSI_PERCENT) \
1671 	CFG(CFG_SCORING_GOOD_RSSI_BUCKET_SIZE) \
1672 	CFG(CFG_SCORING_BAD_RSSI_BUCKET_SIZE) \
1673 	CFG(CFG_SCORING_RSSI_PREF_5G_THRESHOLD) \
1674 	CFG(CFG_SCORING_BW_WEIGHT_PER_IDX) \
1675 	CFG(CFG_SCORING_NSS_WEIGHT_PER_IDX) \
1676 	CFG(CFG_SCORING_BAND_WEIGHT_PER_IDX) \
1677 	CFG(CFG_SCORING_NUM_ESP_QBSS_SLOTS) \
1678 	CFG(CFG_SCORING_ESP_QBSS_SCORE_IDX_3_TO_0) \
1679 	CFG(CFG_SCORING_ESP_QBSS_SCORE_IDX_7_TO_4) \
1680 	CFG(CFG_SCORING_ESP_QBSS_SCORE_IDX_11_TO_8) \
1681 	CFG(CFG_SCORING_ESP_QBSS_SCORE_IDX_15_TO_12) \
1682 	CFG(CFG_SCORING_NUM_OCE_WAN_SLOTS) \
1683 	CFG(CFG_SCORING_OCE_WAN_SCORE_IDX_3_TO_0) \
1684 	CFG(CFG_SCORING_OCE_WAN_SCORE_IDX_7_TO_4) \
1685 	CFG(CFG_SCORING_OCE_WAN_SCORE_IDX_11_TO_8) \
1686 	CFG(CFG_SCORING_OCE_WAN_SCORE_IDX_15_TO_12) \
1687 	CFG(CFG_IS_BSSID_HINT_PRIORITY) \
1688 	CFG(CFG_VENDOR_ROAM_SCORE_ALGORITHM) \
1689 	CFG_6GHZ_CONFIG \
1690 	CFG_MLO_CONFIG
1691 
1692 #endif /* __CFG_MLME_SCORE_PARAMS_H */
1693