1 /* 2 * Copyright (c) 2012-2020, 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 - RSSI Weightage to calculate best candidate 27 * @Min: 0 28 * @Max: 100 29 * @Default: 20 30 * 31 * This ini is used to increase/decrease RSSI weightage in best candidate 32 * selection. AP with better RSSI will get more weightage. 33 * 34 * Related: None 35 * 36 * Supported Feature: STA Candidate selection 37 * 38 * Usage: External 39 * 40 * </ini> 41 */ 42 #define CFG_SCORING_RSSI_WEIGHTAGE CFG_INI_UINT( \ 43 "rssi_weightage", \ 44 0, \ 45 100, \ 46 20, \ 47 CFG_VALUE_OR_DEFAULT, \ 48 "RSSI Weightage") 49 50 /* 51 * <ini> 52 * ht_caps_weightage - HT caps weightage to calculate best candidate 53 * @Min: 0 54 * @Max: 100 55 * @Default: 2 56 * 57 * This ini is used to increase/decrease HT caps weightage in best candidate 58 * selection. If AP supports HT caps, AP will get additional Weightage with 59 * this param. Weightage will be given only if dot11mode is HT capable. 60 * 61 * Related: None 62 * 63 * Supported Feature: STA Candidate selection 64 * 65 * Usage: External 66 * 67 * </ini> 68 */ 69 #define CFG_SCORING_HT_CAPS_WEIGHTAGE CFG_INI_UINT( \ 70 "ht_caps_weightage", \ 71 0, \ 72 100, \ 73 2, \ 74 CFG_VALUE_OR_DEFAULT, \ 75 "HT Caps Weightage") 76 77 /* 78 * <ini> 79 * vht_caps_weightage - VHT caps Weightage to calculate best candidate 80 * @Min: 0 81 * @Max: 100 82 * @Default: 1 83 * 84 * This ini is used to increase/decrease VHT caps weightage in best candidate 85 * selection. If AP supports VHT caps, AP will get additional weightage with 86 * this param. Weightage will be given only if dot11mode is VHT capable. 87 * 88 * Related: None 89 * 90 * Supported Feature: STA Candidate selection 91 * 92 * Usage: External 93 * 94 * </ini> 95 */ 96 #define CFG_SCORING_VHT_CAPS_WEIGHTAGE CFG_INI_UINT( \ 97 "vht_caps_weightage", \ 98 0, \ 99 100, \ 100 1, \ 101 CFG_VALUE_OR_DEFAULT, \ 102 "HT Caps Weightage") 103 104 /* 105 * <ini> 106 * he_caps_weightage - HE caps Weightage to calculate best candidate 107 * @Min: 0 108 * @Max: 100 109 * @Default: 2 110 * 111 * This ini is used to increase/decrease HE caps weightage in best candidate 112 * selection. If AP supports HE caps, AP will get additional weightage with 113 * this param. Weightage will be given only if dot11mode is HE capable. 114 * 115 * Related: None 116 * 117 * Supported Feature: STA Candidate selection 118 * 119 * Usage: External 120 * 121 * </ini> 122 */ 123 #define CFG_SCORING_HE_CAPS_WEIGHTAGE CFG_INI_UINT( \ 124 "he_caps_weightage", \ 125 0, \ 126 100, \ 127 2, \ 128 CFG_VALUE_OR_DEFAULT, \ 129 "HE Caps Weightage") 130 131 /* 132 * <ini> 133 * chan_width_weightage - Channel Width Weightage to calculate best candidate 134 * @Min: 0 135 * @Max: 100 136 * @Default: 12 137 * 138 * This ini is used to increase/decrease Channel Width weightage in best 139 * candidate selection. AP with Higher channel width will get higher weightage 140 * 141 * Related: bandwidth_weight_per_index 142 * 143 * Supported Feature: STA Candidate selection 144 * 145 * Usage: External 146 * 147 * </ini> 148 */ 149 #define CFG_SCORING_CHAN_WIDTH_WEIGHTAGE CFG_INI_UINT( \ 150 "chan_width_weightage", \ 151 0, \ 152 100, \ 153 12, \ 154 CFG_VALUE_OR_DEFAULT, \ 155 "Channel width weightage") 156 157 /* 158 * <ini> 159 * chan_band_weightage - Channel Band perferance to 5GHZ to 160 * calculate best candidate 161 * @Min: 0 162 * @Max: 100 163 * @Default: 2 164 * 165 * This ini is used to increase/decrease Channel Band Preference weightage 166 * in best candidate selection. 5GHZ AP get this additional boost compare to 167 * 2GHZ AP before rssi_pref_5g_rssi_thresh and 2.4Ghz get weightage after 168 * rssi_pref_5g_rssi_thresh. 169 * 170 * Related: rssi_pref_5g_rssi_thresh, band_weight_per_index 171 * 172 * Supported Feature: STA Candidate selection 173 * 174 * Usage: External 175 * 176 * </ini> 177 */ 178 #define CFG_SCORING_CHAN_BAND_WEIGHTAGE CFG_INI_UINT( \ 179 "chan_band_weightage", \ 180 0, \ 181 100, \ 182 2, \ 183 CFG_VALUE_OR_DEFAULT, \ 184 "Channel Band Weightage") 185 186 /* 187 * <ini> 188 * nss_weightage - NSS Weightage to calculate best candidate 189 * @Min: 0 190 * @Max: 100 191 * @Default: 16 192 * 193 * This ini is used to increase/decrease NSS weightage in best candidate 194 * selection. If there are two AP, one AP supports 2x2 and another one supports 195 * 1x1 and station supports 2X2, first A will get this additional weightage 196 * depending on self-capability. 197 * 198 * Related: nss_weight_per_index 199 * 200 * Supported Feature: STA Candidate selection 201 * 202 * Usage: External 203 * 204 * </ini> 205 */ 206 #define CFG_SCORING_NSS_WEIGHTAGE CFG_INI_UINT( \ 207 "nss_weightage", \ 208 0, \ 209 100, \ 210 16, \ 211 CFG_VALUE_OR_DEFAULT, \ 212 "NSS Weightage") 213 /* 214 * <ini> 215 * beamforming_cap_weightage - Beam Forming Weightage to 216 * calculate best candidate 217 * @Min: 0 218 * @Max: 100 219 * @Default: 2 220 * 221 * This ini is used to increase/decrease Beam forming Weightage if some AP 222 * support Beam forming or not. If AP supports Beam forming, that AP will get 223 * additional boost of this weightage. 224 * 225 * Related: None 226 * 227 * Supported Feature: STA Candidate selection 228 * 229 * Usage: External 230 * 231 * </ini> 232 */ 233 #define CFG_SCORING_BEAMFORM_CAP_WEIGHTAGE CFG_INI_UINT( \ 234 "beamforming_cap_weightage", \ 235 0, \ 236 100, \ 237 PLATFORM_VALUE(2, 0), \ 238 CFG_VALUE_OR_DEFAULT, \ 239 "Beamforming Cap Weightage") 240 241 /* 242 * <ini> 243 * pcl_weightage - PCL Weightage to calculate best candidate 244 * @Min: 0 245 * @Max: 100 246 * @Default: 10 247 * 248 * This ini is used to increase/decrease PCL weightage in best candidate 249 * selection. If some APs are in PCL list, those AP will get addition 250 * weightage. 251 * 252 * Related: None 253 * 254 * Supported Feature: STA Candidate selection 255 * 256 * Usage: External 257 * 258 * </ini> 259 */ 260 #define CFG_SCORING_PCL_WEIGHTAGE CFG_INI_UINT( \ 261 "pcl_weightage", \ 262 0, \ 263 100, \ 264 PLATFORM_VALUE(10, 0), \ 265 CFG_VALUE_OR_DEFAULT, \ 266 "PCL Weightage") 267 268 /* 269 * <ini> 270 * channel_congestion_weightage - channel Congestion Weightage to 271 * calculate best candidate 272 * @Min: 0 273 * @Max: 100 274 * @Default: 25 275 * 276 * This ini is used to increase/decrease channel congestion weightage in 277 * candidate selection. Congestion is measured with the help of ESP/QBSS load. 278 * 279 * Related: num_esp_qbss_slots 280 * 281 * Supported Feature: STA Candidate selection 282 * 283 * Usage: External 284 * 285 * </ini> 286 */ 287 #define CFG_SCORING_CHAN_CONGESTION_WEIGHTAGE CFG_INI_UINT( \ 288 "channel_congestion_weightage", \ 289 0, \ 290 100, \ 291 25, \ 292 CFG_VALUE_OR_DEFAULT, \ 293 "Channel Congestion Weightage") 294 295 /* 296 * <ini> 297 * oce_wan_weightage - OCE WAN DL capacity Weightage to calculate best candidate 298 * @Min: 0 299 * @Max: 100 300 * @Default: 2 301 * 302 * This ini is used to increase/decrease OCE WAN caps weightage in best 303 * candidate selection. If AP have OCE WAN information, give weightage depending 304 * on the downaload available capacity. 305 * 306 * Related: num_oce_wan_slots 307 * 308 * Supported Feature: STA Candidate selection 309 * 310 * Usage: External 311 * 312 * </ini> 313 */ 314 #define CFG_SCORING_OCE_WAN_WEIGHTAGE CFG_INI_UINT( \ 315 "oce_wan_weightage", \ 316 0, \ 317 100, \ 318 PLATFORM_VALUE(2, 0), \ 319 CFG_VALUE_OR_DEFAULT, \ 320 "OCE WAN Weightage") 321 322 /* 323 * <ini> 324 * oce_ap_tx_pwr_weightage - update scoring param based on ap tx power 325 * @Min: 0 326 * @Max: 10 327 * @Default: 5 328 * 329 * This ini is used to store calculate weightage based on ap tx power. 330 * 331 * Related: None 332 * 333 * Supported Feature: STA 334 * 335 * Usage: External 336 * 337 * </ini> 338 */ 339 #define CFG_OCE_AP_TX_PWR_WEIGHTAGE CFG_INI_UINT( \ 340 "oce_ap_tx_pwr_weightage", \ 341 0, \ 342 10, \ 343 PLATFORM_VALUE(5, 0), \ 344 CFG_VALUE_OR_DEFAULT,\ 345 "AP weigtage for OCE ap tx power") 346 347 /* 348 * <ini> 349 * oce_subnet_id_weightage - update scoring param based on subnet id 350 * @Min: 0 351 * @Max: 10 352 * @Default: 3 353 * 354 * This ini is used to calculate subnet id weightage in roam score. 355 * If the MBO-OCE ie has "IP subnet indication attribute", then host 356 * considers 50% of the "oce_subnet_id_weightage" value to calculate 357 * roam score for the initial connection and 100% of the 358 * "oce_subnet_id_weightage" value to calculate roam score for roaming 359 * case. 360 * "oce_ap_tx_pwr_weightage" adds a small amount of percentage advantage 361 * in roam score while selection of an AP candidate within the same subnet 362 * ID. If "oce_ap_tx_pwr_weightage" value is 0(min), roam score doesn't 363 * include percentage weightage for subnet id and if "oce_ap_tx_pwr_weightage" 364 * value is 10(max), then the weightage given because of same subnet ID is 365 * more in roam score. This ini is also used for WFA certification. 366 * 367 * Related: None 368 * 369 * Supported Feature: STA 370 * 371 * Usage: External 372 * 373 * </ini> 374 */ 375 #define CFG_OCE_SUBNET_ID_WEIGHTAGE CFG_INI_UINT( \ 376 "oce_subnet_id_weightage", \ 377 0, \ 378 10, \ 379 PLATFORM_VALUE(3, 0), \ 380 CFG_VALUE_OR_DEFAULT,\ 381 "AP weigtage for OCE subnet id") 382 383 /* 384 * <ini> 385 * sae_pk_ap_weightage - update scoring param based on SAE PK ap weightage 386 * @Min: 0 387 * @Max: 10 388 * @Default: 3 389 * 390 * This ini is used to calculate SAE PK ap weightage in roam score. SAE Public 391 * Key (SAE-PK) authentication is an extension of SAE that is intended for use 392 * cases where authentication is based on a password that might be 393 * distributed to or obtained by a potential adversary. With SAE-PK, the AP in 394 * an infrastructure network is additionally authenticated based on a static 395 * public/private key pair. This ini is also used for WFA certification. 396 * 397 * Related: None 398 * 399 * Supported Feature: STA 400 * 401 * Usage: External 402 * 403 * </ini> 404 */ 405 #define CFG_SAE_PK_AP_WEIGHTAGE CFG_INI_UINT( \ 406 "sae_pk_ap_weightage", \ 407 0, \ 408 10, \ 409 PLATFORM_VALUE(3, 0), \ 410 CFG_VALUE_OR_DEFAULT,\ 411 "SAE-PK AP weightage") 412 413 /* 414 * <ini> 415 * best_rssi_threshold - Best Rssi for score calculation 416 * @Min: 0 417 * @Max: 96 418 * @Default: 55 419 * 420 * This ini tells limit for best RSSI. RSSI better than this limit are 421 * considered as best RSSI. The best RSSI is given full rssi_weightage. 422 * 423 * Related: rssi_weightage 424 * 425 * Supported Feature: STA Candidate selection 426 * 427 * Usage: External 428 * 429 * </ini> 430 */ 431 #define CFG_SCORING_BEST_RSSI_THRESHOLD CFG_INI_UINT( \ 432 "best_rssi_threshold", \ 433 0, \ 434 96, \ 435 55, \ 436 CFG_VALUE_OR_DEFAULT, \ 437 "Best RSSI threshold") 438 439 /* 440 * <ini> 441 * good_rssi_threshold - Good Rssi for score calculation 442 * @Min: 0 443 * @Max: 96 444 * @Default: 70 445 * 446 * This ini tells limit for good RSSI. RSSI better than this limit and less 447 * than best_rssi_threshold is considered as good RSSI. 448 * 449 * Related: rssi_weightage, best_rssi_threshold 450 * 451 * Supported Feature: STA Candidate selection 452 * 453 * Usage: External 454 * 455 * </ini> 456 */ 457 #define CFG_SCORING_GOOD_RSSI_THRESHOLD CFG_INI_UINT( \ 458 "good_rssi_threshold", \ 459 0, \ 460 96, \ 461 70, \ 462 CFG_VALUE_OR_DEFAULT, \ 463 "Good RSSI threshold") 464 465 /* 466 * <ini> 467 * bad_rssi_threshold - Bad Rssi for score calculation 468 * @Min: 0 469 * @Max: 96 470 * @Default: 80 471 * 472 * This ini tells limit for Bad RSSI. RSSI greater then bad_rssi_threshold 473 * is considered as bad RSSI. 474 * 475 * Related: rssi_weightage, good_rssi_threshold 476 * 477 * Supported Feature: STA Candidate selection 478 * 479 * Usage: External 480 * 481 * </ini> 482 */ 483 #define CFG_SCORING_BAD_RSSI_THRESHOLD CFG_INI_UINT( \ 484 "bad_rssi_threshold", \ 485 0, \ 486 96, \ 487 80, \ 488 CFG_VALUE_OR_DEFAULT, \ 489 "Bad RSSI threshold") 490 491 /* 492 * <ini> 493 * good_rssi_pcnt - Percent Score to Good RSSI out of total RSSI score. 494 * @Min: 0 495 * @Max: 100 496 * @Default: 80 497 * 498 * This ini tells about how much percent should be given to good RSSI(RSSI 499 * between best_rssi_threshold and good_rssi_threshold) out of RSSI weightage. 500 * 501 * Related: rssi_weightage, best_rssi_threshold, good_rssi_threshold 502 * 503 * Supported Feature: STA Candidate selection 504 * 505 * Usage: External 506 * 507 * </ini> 508 */ 509 #define CFG_SCORING_GOOD_RSSI_PERCENT CFG_INI_UINT( \ 510 "good_rssi_pcnt", \ 511 0, \ 512 100, \ 513 80, \ 514 CFG_VALUE_OR_DEFAULT, \ 515 "Good RSSI Percent") 516 517 /* 518 * <ini> 519 * bad_rssi_pcnt - Percent Score to BAD RSSI out of total RSSI score. 520 * @Min: 0 521 * @Max: 100 522 * @Default: 25 523 * 524 * This ini tells about how much percent should be given to bad RSSI (RSSI 525 * between good_rssi_threshold and bad_rssi_threshold) out of RSSI weightage. 526 * 527 * Related: rssi_weightage, good_rssi_threshold, bad_rssi_threshold 528 * 529 * Supported Feature: STA Candidate selection 530 * 531 * Usage: External 532 * 533 * </ini> 534 */ 535 #define CFG_SCORING_BAD_RSSI_PERCENT CFG_INI_UINT( \ 536 "bad_rssi_pcnt", \ 537 0, \ 538 100, \ 539 25, \ 540 CFG_VALUE_OR_DEFAULT, \ 541 "Bad RSSI Percent") 542 543 /* 544 * <ini> 545 * good_rssi_bucket_size - Bucket size between best and good RSSI to score. 546 * @Min: 1 547 * @Max: 10 548 * @Default: 5 549 * 550 * This ini tells about bucket size for scoring between best and good RSSI. 551 * Below Best RSSI, 100% score will be given. Between best and good RSSI, RSSI 552 * is divided in buckets and score will be assigned bucket wise starting from 553 * good_rssi_pcnt. 554 * 555 * Related: rssi_weightage, good_rssi_pcnt 556 * 557 * Supported Feature: STA Candidate selection 558 * 559 * Usage: External 560 * 561 * </ini> 562 */ 563 #define CFG_SCORING_GOOD_RSSI_BUCKET_SIZE CFG_INI_UINT( \ 564 "good_rssi_bucket_size", \ 565 1, \ 566 10, \ 567 5, \ 568 CFG_VALUE_OR_DEFAULT, \ 569 "Good RSSI Bucket Size") 570 571 /* 572 * <ini> 573 * bad_rssi_bucket_size - Bucket size between good and bad RSSI to score. 574 * @Min: 1 575 * @Max: 10 576 * @Default: 5 577 * 578 * This ini tells about bucket size for scoring between good and bad RSSI. 579 * Between good and bad RSSI, RSSI is divided in buckets and score will be 580 * assigned bucket wise starting from bad_rssi_pcnt. 581 * 582 * Related: rssi_weightage, bad_rssi_pcnt 583 * 584 * Supported Feature: STA Candidate selection 585 * 586 * Usage: External 587 * 588 * </ini> 589 */ 590 #define CFG_SCORING_BAD_RSSI_BUCKET_SIZE CFG_INI_UINT( \ 591 "bad_rssi_bucket_size", \ 592 1, \ 593 10, \ 594 5, \ 595 CFG_VALUE_OR_DEFAULT, \ 596 "Bad RSSI Bucket Size") 597 598 /* 599 * <ini> 600 * rssi_pref_5g_rssi_thresh - A RSSI threshold above which 5 GHz is not favored 601 * @Min: 0 602 * @Max: 96 603 * @Default: 76 604 * 605 * 5G AP are given chan_band_weightage. This ini tells about RSSI threshold 606 * above which 5GHZ is not favored. 607 * 608 * Related: chan_band_weightage 609 * 610 * Supported Feature: STA Candidate selection 611 * 612 * Usage: External 613 * 614 * </ini> 615 */ 616 #define CFG_SCORING_RSSI_PREF_5G_THRESHOLD CFG_INI_UINT( \ 617 "rssi_pref_5g_rssi_thresh", \ 618 0, \ 619 96, \ 620 76, \ 621 CFG_VALUE_OR_DEFAULT, \ 622 "RSSI Pref 5G Threshold") 623 624 /* 625 * <ini> 626 * bandwidth_weight_per_index - percentage as per bandwidth 627 * @Min: 0x00000000 628 * @Max: 0x64646464 629 * @Default: 0x6432190C 630 * 631 * This INI give percentage value of chan_width_weightage to be used as per 632 * peer bandwidth. Self BW is also considered while calculating score. Eg if 633 * self BW is 20 MHZ 10% will be given for all AP irrespective of the AP 634 * capability. 635 * 636 * Indexes are defined in this way. 637 * 0 Index (BITS 0-7): 20 MHz - Def 12% 638 * 1 Index (BITS 8-15): 40 MHz - Def 25% 639 * 2 Index (BITS 16-23): 80 MHz - Def 50% 640 * 3 Index (BITS 24-31): 160 MHz - Def 100% 641 * These percentage values are stored in HEX. For any index max value, can be 64 642 * 643 * Related: chan_width_weightage 644 * 645 * Supported Feature: STA Candidate selection 646 * 647 * Usage: External 648 * 649 * </ini> 650 */ 651 #define CFG_SCORING_BW_WEIGHT_PER_IDX CFG_INI_UINT( \ 652 "bandwidth_weight_per_index", \ 653 0x00000000, \ 654 0x64646464, \ 655 0x6432190C, \ 656 CFG_VALUE_OR_DEFAULT, \ 657 "Bandwidth weight per index") 658 659 /* 660 * <ini> 661 * nss_weight_per_index - percentage as per NSS 662 * @Min: 0x00000000 663 * @Max: 0x64646464 664 * @Default: 0x6432190C 665 * 666 * This INI give percentage value of nss_weightage to be used as per peer NSS. 667 * Self NSS capability is also considered. Eg if self NSS is 1x1 10% will be 668 * given for all AP irrespective of the AP capability. 669 * 670 * Indexes are defined in this way. 671 * 0 Index (BITS 0-7): 1X1- Def 12% 672 * 1 Index (BITS 8-15): 2X2- Def 25% 673 * 2 Index (BITS 16-23): 3X3- Def 50% 674 * 3 Index (BITS 24-31): 4X4- Def 100% 675 * These percentage values are stored in HEX. For any index max value, can be 64 676 * 677 * Related: nss_weightage 678 * 679 * Supported Feature: STA Candidate selection 680 * 681 * Usage: External 682 * 683 * </ini> 684 */ 685 #define CFG_SCORING_NSS_WEIGHT_PER_IDX CFG_INI_UINT( \ 686 "nss_weight_per_index", \ 687 0x00000000, \ 688 0x64646464, \ 689 0x6432190C, \ 690 CFG_VALUE_OR_DEFAULT, \ 691 "NSS weight per index") 692 693 /* 694 * <ini> 695 * band_weight_per_index - percentage as per band 696 * @Min: 0x00000000 697 * @Max: 0x64646464 698 * @Default: 0x0000644B 699 * 700 * This INI give percentage value of chan_band_weightage to be used as per band. 701 * If RSSI is greater than rssi_pref_5g_rssi_thresh preference is given for 5Ghz 702 * else, it's given for 2.4Ghz. 703 * 704 * Indexes are defined in this way. 705 * 0 Index (BITS 0-7): 2.4GHz - Def 10% 706 * 1 Index (BITS 8-15): 5GHz - Def 20% 707 * 2 Index (BITS 16-23): 6Ghz - Def - 100% 708 * 3 Index (BITS 24-31): Reserved 709 * These percentage values are stored in HEX. For any index max value, can be 64 710 * 711 * Related: chan_band_weightage, rssi_pref_5g_rssi_thresh 712 * 713 * Supported Feature: STA Candidate selection 714 * 715 * Usage: External 716 * 717 * </ini> 718 */ 719 #define CFG_SCORING_BAND_WEIGHT_PER_IDX CFG_INI_UINT( \ 720 "band_weight_per_index", \ 721 0x00000000, \ 722 0x64646464, \ 723 0x00644B32, \ 724 CFG_VALUE_OR_DEFAULT, \ 725 "Band weight per index") 726 727 /* 728 * <ini> 729 * num_esp_qbss_slots - number of slots in which the esp/qbss load will 730 * be divided 731 * 732 * @Min: 1 733 * @Max: 15 734 * @Default: 8 735 * 736 * Number of slots in which the esp/qbss load will be divided. Max 15. index 0 737 * is used for 'not_present. Num_slot will equally divide 100. e.g, if 738 * num_slot = 4 slot 1 = 0-25% load, slot 2 = 26-50% load, slot 3 = 51-75% load, 739 * slot 4 = 76-100% load. Remaining unused index can be 0. 740 * Following is load percentage, score percentage and score of num_slot = 8, 741 * weight=25. 742 * 0-12% 13-25% 26-38% 39-50% 51-63 %64-75% 76-88% 87-100% Not Present 743 * 100% 90% 80% 70% 50% 25% 10% 5% 50% 744 * 2500 2250 2000 1750 1250 625 250 125 1250 745 * 746 * Usage: External 747 * 748 * </ini> 749 */ 750 #define CFG_SCORING_NUM_ESP_QBSS_SLOTS CFG_INI_UINT( \ 751 "num_esp_qbss_slots", \ 752 1, \ 753 15, \ 754 8, \ 755 CFG_VALUE_OR_DEFAULT, \ 756 "Num ESP QPSS Slots") 757 758 /* 759 * <ini> 760 * esp_qbss_score_idx3_to_0 - percentage for esp/qbss load for slots 0-3 761 * @Min: 0x00000000 762 * @Max: 0x64646464 763 * @Default: 0x505A6432 764 * 765 * This INI give percentage value of channel_congestion_weightage to be used as 766 * index in which the load value falls. Index 0 is for percentage when ESP/QBSS 767 * is not present. 768 * 769 * Indexes are defined in this way. 770 * 0 Index (BITS 0-7): when ESP/QBSS is not present 771 * 1 Index (BITS 8-15): SLOT_1 772 * 2 Index (BITS 16-23): SLOT_2 773 * 3 Index (BITS 24-31): SLOT_3 774 * These percentage values are stored in HEX. For any index max value, can be 64 775 * 776 * Related: channel_congestion_weightage, num_esp_qbss_slots 777 * 778 * Supported Feature: STA Candidate selection 779 * 780 * Usage: External 781 * 782 * </ini> 783 */ 784 #define CFG_SCORING_ESP_QBSS_SCORE_IDX_3_TO_0 CFG_INI_UINT( \ 785 "esp_qbss_score_idx3_to_0", \ 786 0x00000000, \ 787 0x64646464, \ 788 0x505A6432, \ 789 CFG_VALUE_OR_DEFAULT, \ 790 "ESP QPSS Score Index 3 to 0") 791 792 /* 793 * <ini> 794 * esp_qbss_score_idx7_to_4 - percentage for esp/qbss load for slots 4-7 795 * @Min: 0x00000000 796 * @Max: 0x64646464 797 * @Default: 0x0A193246 798 * 799 * This INI give percentage value of channel_congestion_weightage to be used as 800 * index in which the load value falls. Used only if num_esp_qbss_slots is 801 * greater than 3. 802 * 803 * Indexes are defined in this way. 804 * 0 Index (BITS 0-7): SLOT_4 805 * 1 Index (BITS 8-15): SLOT_5 806 * 2 Index (BITS 16-23): SLOT_6 807 * 3 Index (BITS 24-31): SLOT_7 808 * These percentage values are stored in HEX. For any index max value, can be 64 809 * 810 * Related: channel_congestion_weightage, num_esp_qbss_slots 811 * 812 * Supported Feature: STA Candidate selection 813 * 814 * Usage: External 815 * 816 * </ini> 817 */ 818 #define CFG_SCORING_ESP_QBSS_SCORE_IDX_7_TO_4 CFG_INI_UINT( \ 819 "esp_qbss_score_idx7_to_4", \ 820 0x00000000, \ 821 0x64646464, \ 822 0x0A193246, \ 823 CFG_VALUE_OR_DEFAULT, \ 824 "ESP QPSS Score Index 7 to 4") 825 826 /* 827 * <ini> 828 * esp_qbss_score_idx11_to_8 - percentage for esp/qbss load for slots 8-11 829 * @Min: 0x00000000 830 * @Max: 0x64646464 831 * @Default: 0x00000005 832 * 833 * This INI give percentage value of channel_congestion_weightage to be used as 834 * index in which the load value falls. Used only if num_esp_qbss_slots is 835 * greater than 7. 836 * 837 * Indexes are defined in this way. 838 * 0 Index (BITS 0-7): SLOT_8 839 * 1 Index (BITS 8-15): SLOT_9 840 * 2 Index (BITS 16-23): SLOT_10 841 * 3 Index (BITS 24-31): SLOT_11 842 * These percentage values are stored in HEX. For any index max value, can be 64 843 * 844 * Related: channel_congestion_weightage, num_esp_qbss_slots 845 * 846 * Supported Feature: STA Candidate selection 847 * 848 * Usage: External 849 * 850 * </ini> 851 */ 852 #define CFG_SCORING_ESP_QBSS_SCORE_IDX_11_TO_8 CFG_INI_UINT( \ 853 "esp_qbss_score_idx11_to_8", \ 854 0x00000000, \ 855 0x64646464, \ 856 0x00000005, \ 857 CFG_VALUE_OR_DEFAULT, \ 858 "ESP QPSS Score Index 11 to 8") 859 860 /* 861 * <ini> 862 * esp_qbss_score_idx15_to_12 - percentage for esp/qbss load for slots 12-15 863 * @Min: 0x00000000 864 * @Max: 0x64646464 865 * @Default: 0x00000000 866 * 867 * This INI give percentage value of channel_congestion_weightage to be used as 868 * index in which the load value falls. Used only if num_esp_qbss_slots is 869 * greater than 11. 870 * 871 * Indexes are defined in this way. 872 * 0 Index (BITS 0-7): SLOT_12 873 * 1 Index (BITS 8-15): SLOT_13 874 * 2 Index (BITS 16-23): SLOT_14 875 * 3 Index (BITS 24-31): SLOT_15 876 * These percentage values are stored in HEX. For any index max value, can be 64 877 * 878 * Related: channel_congestion_weightage, num_esp_qbss_slots 879 * 880 * Supported Feature: STA Candidate selection 881 * 882 * Usage: External 883 * 884 * </ini> 885 */ 886 #define CFG_SCORING_ESP_QBSS_SCORE_IDX_15_TO_12 CFG_INI_UINT( \ 887 "esp_qbss_score_idx15_to_12", \ 888 0x00000000, \ 889 0x64646464, \ 890 0x00000000, \ 891 CFG_VALUE_OR_DEFAULT, \ 892 "ESP QPSS Score Index 15 to 12") 893 894 /* 895 * <ini> 896 * num_oce_wan_slots - number of slots in which the oce wan metrics will 897 * be divided 898 * 899 * @Min: 1 900 * @Max: 15 901 * @Default: 8 902 * 903 * Number of slots in which the oce wan metrics will be divided. Max 15. index 0 904 * is used for not_present. Num_slot will equally divide 100. e.g, if 905 * num_slot = 4 slot 1 = 0-3 DL CAP, slot 2 = 4-7 DL CAP, slot 3 = 8-11 DL CAP, 906 * slot 4 = 12-15 DL CAP. Remaining unused index can be 0. 907 * 908 * Related: oce_wan_weightage 909 * 910 * Usage: External 911 * 912 * </ini> 913 */ 914 #define CFG_SCORING_NUM_OCE_WAN_SLOTS CFG_INI_UINT( \ 915 "num_oce_wan_slots", \ 916 1, \ 917 15, \ 918 15, \ 919 CFG_VALUE_OR_DEFAULT, \ 920 "Num OCE WAN Slots") 921 922 /* 923 * <ini> 924 * oce_wan_score_idx3_to_0 - percentage for OCE WAN metrics score for slots 0-3 925 * @Min: 0x00000000 926 * @Max: 0x64646464 927 * @Default: 0x00000032 928 * 929 * This INI give percentage value of OCE WAN metrics DL CAP, to be used as 930 * index in which the DL CAP value falls. Index 0 is for percentage when 931 * OCE WAN metrics DL CAP is not present. 932 * 933 * Indexes are defined in this way. 934 * 0 Index (BITS 0-7): when OCE WAN metrics DL CAP is not present 935 * 1 Index (BITS 8-15): SLOT_1 936 * 2 Index (BITS 16-23): SLOT_2 937 * 3 Index (BITS 24-31): SLOT_3 938 * These percentage values are stored in HEX. For any index max value, can be 64 939 * 940 * Related: num_oce_wan_slots, oce_wan_weightage 941 * 942 * Supported Feature: STA Candidate selection 943 * 944 * Usage: External 945 * 946 * </ini> 947 */ 948 #define CFG_SCORING_OCE_WAN_SCORE_IDX_3_TO_0 CFG_INI_UINT( \ 949 "oce_wan_score_idx3_to_0", \ 950 0x00000000, \ 951 0x64646464, \ 952 0x00000032, \ 953 CFG_VALUE_OR_DEFAULT, \ 954 "OCE WAN Score Index 3 to 0") 955 956 /* 957 * <ini> 958 * oce_wan_score_idx7_to_4 - percentage for OCE WAN metrics score for slots 4-7 959 * @Min: 0x00000000 960 * @Max: 0x64646464 961 * @Default: 0x00000000 962 * 963 * This INI give percentage value of OCE WAN metrics DL CAP, to be used as 964 * index in which the DL CAP value falls. Used only if num_oce_wan_slots is 965 * greater than 3. 966 * 967 * Indexes are defined in this way. 968 * 0 Index (BITS 0-7): SLOT_4 969 * 1 Index (BITS 8-15): SLOT_5 970 * 2 Index (BITS 16-23): SLOT_6 971 * 3 Index (BITS 24-31): SLOT_7 972 * These percentage values are stored in HEX. For any index max value, can be 64 973 * 974 * Related: num_oce_wan_slots, oce_wan_weightage 975 * 976 * Supported Feature: STA Candidate selection 977 * 978 * Usage: External 979 * 980 * </ini> 981 */ 982 #define CFG_SCORING_OCE_WAN_SCORE_IDX_7_TO_4 CFG_INI_UINT( \ 983 "oce_wan_score_idx7_to_4", \ 984 0x00000000, \ 985 0x64646464, \ 986 0x00000000, \ 987 CFG_VALUE_OR_DEFAULT, \ 988 "OCE WAN Score Index 7 to 4") 989 990 /* 991 * <ini> 992 * oce_wan_score_idx11_to_8 - percentage for OCE WAN metrics score for slot 8-11 993 * @Min: 0x00000000 994 * @Max: 0x64646464 995 * @Default: 0x06030000 996 * 997 * This INI give percentage value of OCE WAN metrics DL CAP, to be used as 998 * index in which the DL CAP value falls. Used only if num_oce_wan_slots is 999 * greater than 7. 1000 * 1001 * Indexes are defined in this way. 1002 * 0 Index (BITS 0-7): SLOT_8 1003 * 1 Index (BITS 8-15): SLOT_9 1004 * 2 Index (BITS 16-23): SLOT_10 1005 * 3 Index (BITS 24-31): SLOT_11 1006 * These percentage values are stored in HEX. For any index max value, can be 64 1007 * 1008 * Related: num_oce_wan_slots, oce_wan_weightage 1009 * 1010 * Supported Feature: STA Candidate selection 1011 * 1012 * Usage: External 1013 * 1014 * </ini> 1015 */ 1016 #define CFG_SCORING_OCE_WAN_SCORE_IDX_11_TO_8 CFG_INI_UINT( \ 1017 "oce_wan_score_idx11_to_8", \ 1018 0x00000000, \ 1019 0x64646464, \ 1020 0x06030000, \ 1021 CFG_VALUE_OR_DEFAULT, \ 1022 "OCE WAN Score Index 11 to 8") 1023 1024 /* 1025 * <ini> 1026 * oce_wan_score_idx15_to_12 - % for OCE WAN metrics score for slot 12-15 1027 * @Min: 0x00000000 1028 * @Max: 0x64646464 1029 * @Default: 0x6432190C 1030 * 1031 * This INI give percentage value of OCE WAN metrics DL CAP, to be used as 1032 * index in which the DL CAP value falls. Used only if num_oce_wan_slots is 1033 * greater than 11. 1034 * 1035 * Indexes are defined in this way. 1036 * 0 Index (BITS 0-7): SLOT_12 1037 * 1 Index (BITS 8-15): SLOT_13 1038 * 2 Index (BITS 16-23): SLOT_14 1039 * 3 Index (BITS 24-31): SLOT_15 1040 * These percentage values are stored in HEX. For any index max value, can be 64 1041 * 1042 * Related: num_oce_wan_slots, oce_wan_weightage 1043 * 1044 * Supported Feature: STA Candidate selection 1045 * 1046 * Usage: External 1047 * 1048 * </ini> 1049 */ 1050 #define CFG_SCORING_OCE_WAN_SCORE_IDX_15_TO_12 CFG_INI_UINT( \ 1051 "oce_wan_score_idx15_to_12", \ 1052 0x00000000, \ 1053 0x64646464, \ 1054 0x6432190C, \ 1055 CFG_VALUE_OR_DEFAULT, \ 1056 "OCE WAN Score Index 15 to 12") 1057 1058 /* 1059 * <ini> 1060 * is_bssid_hint_priority - Set priority for connection with bssid_hint 1061 * BSSID. 1062 * @Min: 0 1063 * @Max: 1 1064 * @Default: 1 1065 * 1066 * This ini is used to give priority to BSS for connection which comes 1067 * as part of bssid_hint 1068 * 1069 * Related: None 1070 * 1071 * Supported Feature: STA 1072 * 1073 * Usage: External 1074 * 1075 * </ini> 1076 */ 1077 #define CFG_IS_BSSID_HINT_PRIORITY CFG_INI_UINT(\ 1078 "is_bssid_hint_priority",\ 1079 0, 1, \ 1080 PLATFORM_VALUE(0, 1), \ 1081 CFG_VALUE_OR_DEFAULT, \ 1082 "Set priority for connection with bssid_hint") 1083 1084 /* 1085 * <ini> 1086 * vendor_roam_score_algorithm - Algorithm to calculate AP score 1087 * @Min: false 1088 * @Max: true 1089 * @Default: false 1090 * 1091 * By default the value is false and default roam algorithm will be used. 1092 * When the value is true, the V2 roaming algorithm will be used: 1093 * For this V2 algo, AP score calculation is based on ETP and below equation: 1094 * AP Score = (RSSIfactor * rssiweight(0.65)) + (CUfactor *cuweight(0.35)) 1095 * 1096 * Related: None 1097 * 1098 * Supported Feature: roam score algorithm 1099 * 1100 * Usage: External 1101 * 1102 * </ini> 1103 */ 1104 #define CFG_VENDOR_ROAM_SCORE_ALGORITHM \ 1105 CFG_INI_BOOL("vendor_roam_score_algorithm", false, \ 1106 "Roam candidate selection score algorithm") 1107 1108 #ifdef CONFIG_BAND_6GHZ 1109 /* 1110 * <ini> 1111 * check_6ghz_security - Enable check for 6Ghz allowed security 1112 * BSSID. 1113 * @Min: 0 1114 * @Max: 1 1115 * @Default: 0 1116 * 1117 * This ini is used to Enable check for 6Ghz allowed security. If enabled 1118 * only WPA3 and other allowed security will be allowed for 6Ghz connection 1119 * 1120 * Related: None 1121 * 1122 * Supported Feature: STA 1123 * 1124 * Usage: External 1125 * 1126 * </ini> 1127 */ 1128 #define CFG_CHECK_6GHZ_SECURITY CFG_INI_BOOL(\ 1129 "check_6ghz_security", 0, \ 1130 "Enable check for 6Ghz allowed security") 1131 /* 1132 * <ini> 1133 * key_mgmt_mask_6ghz - AKM bit mask (@wlan_crypto_key_mgmt) allowed in 6Ghz 1134 * channel 1135 * @Min: 0 1136 * @Max: 0xffffffff 1137 * @Default: 0xffffffff 1138 * 1139 * This ini is used to set allowed AKM check for 6Ghz. If enabled 1140 * only only AKM bits allowed will be used to connect to candidate. 1141 * valid only if check_6ghz_security is 0. By default all AKM are allowed 1142 * 1143 * Related: check_6Ghz_security 1144 * 1145 * Supported Feature: STA 1146 * 1147 * Usage: External 1148 * 1149 * </ini> 1150 */ 1151 #define CFG_6GHZ_ALLOWED_AKM_MASK CFG_INI_UINT(\ 1152 "key_mgmt_mask_6ghz",\ 1153 0, DEFAULT_KEYMGMT_6G_MASK, DEFAULT_KEYMGMT_6G_MASK,\ 1154 CFG_VALUE_OR_DEFAULT, \ 1155 "Set priority for connection with bssid_hint") 1156 1157 #define CFG_6GHZ_CONFIG \ 1158 CFG(CFG_CHECK_6GHZ_SECURITY) \ 1159 CFG(CFG_6GHZ_ALLOWED_AKM_MASK) 1160 #else 1161 #define CFG_6GHZ_CONFIG 1162 #endif 1163 1164 #define CFG_MLME_SCORE_ALL \ 1165 CFG(CFG_SCORING_RSSI_WEIGHTAGE) \ 1166 CFG(CFG_SCORING_HT_CAPS_WEIGHTAGE) \ 1167 CFG(CFG_SCORING_VHT_CAPS_WEIGHTAGE) \ 1168 CFG(CFG_SCORING_HE_CAPS_WEIGHTAGE) \ 1169 CFG(CFG_SCORING_CHAN_WIDTH_WEIGHTAGE) \ 1170 CFG(CFG_SCORING_CHAN_BAND_WEIGHTAGE) \ 1171 CFG(CFG_SCORING_NSS_WEIGHTAGE) \ 1172 CFG(CFG_SCORING_BEAMFORM_CAP_WEIGHTAGE) \ 1173 CFG(CFG_SCORING_PCL_WEIGHTAGE) \ 1174 CFG(CFG_SCORING_CHAN_CONGESTION_WEIGHTAGE) \ 1175 CFG(CFG_SCORING_OCE_WAN_WEIGHTAGE) \ 1176 CFG(CFG_OCE_AP_TX_PWR_WEIGHTAGE) \ 1177 CFG(CFG_OCE_SUBNET_ID_WEIGHTAGE) \ 1178 CFG(CFG_SAE_PK_AP_WEIGHTAGE) \ 1179 CFG(CFG_SCORING_BEST_RSSI_THRESHOLD) \ 1180 CFG(CFG_SCORING_GOOD_RSSI_THRESHOLD) \ 1181 CFG(CFG_SCORING_BAD_RSSI_THRESHOLD) \ 1182 CFG(CFG_SCORING_GOOD_RSSI_PERCENT) \ 1183 CFG(CFG_SCORING_BAD_RSSI_PERCENT) \ 1184 CFG(CFG_SCORING_GOOD_RSSI_BUCKET_SIZE) \ 1185 CFG(CFG_SCORING_BAD_RSSI_BUCKET_SIZE) \ 1186 CFG(CFG_SCORING_RSSI_PREF_5G_THRESHOLD) \ 1187 CFG(CFG_SCORING_BW_WEIGHT_PER_IDX) \ 1188 CFG(CFG_SCORING_NSS_WEIGHT_PER_IDX) \ 1189 CFG(CFG_SCORING_BAND_WEIGHT_PER_IDX) \ 1190 CFG(CFG_SCORING_NUM_ESP_QBSS_SLOTS) \ 1191 CFG(CFG_SCORING_ESP_QBSS_SCORE_IDX_3_TO_0) \ 1192 CFG(CFG_SCORING_ESP_QBSS_SCORE_IDX_7_TO_4) \ 1193 CFG(CFG_SCORING_ESP_QBSS_SCORE_IDX_11_TO_8) \ 1194 CFG(CFG_SCORING_ESP_QBSS_SCORE_IDX_15_TO_12) \ 1195 CFG(CFG_SCORING_NUM_OCE_WAN_SLOTS) \ 1196 CFG(CFG_SCORING_OCE_WAN_SCORE_IDX_3_TO_0) \ 1197 CFG(CFG_SCORING_OCE_WAN_SCORE_IDX_7_TO_4) \ 1198 CFG(CFG_SCORING_OCE_WAN_SCORE_IDX_11_TO_8) \ 1199 CFG(CFG_SCORING_OCE_WAN_SCORE_IDX_15_TO_12) \ 1200 CFG(CFG_IS_BSSID_HINT_PRIORITY) \ 1201 CFG(CFG_VENDOR_ROAM_SCORE_ALGORITHM) \ 1202 CFG_6GHZ_CONFIG 1203 1204 #endif /* __CFG_MLME_SCORE_PARAMS_H */ 1205