1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 4*5113495bSYour Name * 5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for 6*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the 7*5113495bSYour Name * above copyright notice and this permission notice appear in all 8*5113495bSYour Name * copies. 9*5113495bSYour Name * 10*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE. 18*5113495bSYour Name */ 19*5113495bSYour Name 20*5113495bSYour Name /** 21*5113495bSYour Name * DOC: This file contains MLME BTM related CFG/INI Items. 22*5113495bSYour Name */ 23*5113495bSYour Name 24*5113495bSYour Name #ifndef CFG_MLME_BTM_H_ 25*5113495bSYour Name #define CFG_MLME_BTM_H_ 26*5113495bSYour Name 27*5113495bSYour Name /* 28*5113495bSYour Name * <ini> 29*5113495bSYour Name * prefer_btm_query - Prefer btm query over 11k neighbor report 30*5113495bSYour Name * @Min: 0 31*5113495bSYour Name * @Max: 1 32*5113495bSYour Name * @Default: 1 33*5113495bSYour Name * 34*5113495bSYour Name * This ini is used to enable the STA to send BTM query instead of 35*5113495bSYour Name * 11k neighbor report. 36*5113495bSYour Name * 37*5113495bSYour Name * Supported Feature: STA 38*5113495bSYour Name * 39*5113495bSYour Name * Usage: External 40*5113495bSYour Name * 41*5113495bSYour Name * </ini> 42*5113495bSYour Name */ 43*5113495bSYour Name #define CFG_PREFER_BTM_QUERY CFG_INI_BOOL( \ 44*5113495bSYour Name "prefer_btm_query", \ 45*5113495bSYour Name 1, \ 46*5113495bSYour Name "prefer btm query over 11k neighbor report") 47*5113495bSYour Name 48*5113495bSYour Name /* 49*5113495bSYour Name * <ini> 50*5113495bSYour Name * prefer_roam_score_for_candidate_selection - choose to sort the candidates on 51*5113495bSYour Name * roam score or preferred AP 52*5113495bSYour Name * @Min: 0 53*5113495bSYour Name * @Max: 1 54*5113495bSYour Name * @Default: 1 55*5113495bSYour Name * 56*5113495bSYour Name * This ini is used to enable the the firmware to sort the candidates 57*5113495bSYour Name * based on the roam score rather than selecting APs as per the order 58*5113495bSYour Name * of the APs sent by the connected AP. 59*5113495bSYour Name * 60*5113495bSYour Name * Supported Feature: Roaming 61*5113495bSYour Name * 62*5113495bSYour Name * Usage: External 63*5113495bSYour Name * 64*5113495bSYour Name * </ini> 65*5113495bSYour Name */ 66*5113495bSYour Name #define CFG_ENABLE_BTM_ABRIDGE CFG_INI_BOOL( \ 67*5113495bSYour Name "prefer_roam_score_for_candidate_selection", \ 68*5113495bSYour Name 1, \ 69*5113495bSYour Name "sort candidate based on roam score") 70*5113495bSYour Name 71*5113495bSYour Name /* 72*5113495bSYour Name * <ini> 73*5113495bSYour Name * btm_offload_config - Configure BTM 74*5113495bSYour Name * @Min: 0x00000000 75*5113495bSYour Name * @Max: 0xFFFFFFFF 76*5113495bSYour Name * @Default: 0x000001c1 77*5113495bSYour Name * 78*5113495bSYour Name * This ini is used to configure BTM 79*5113495bSYour Name * 80*5113495bSYour Name * Bit 0: Enable/Disable the BTM offload. Set this to 1 will 81*5113495bSYour Name * enable and 0 will disable BTM offload. 82*5113495bSYour Name * 83*5113495bSYour Name * BIT 2, 1: Action on non matching candidate with cache. If a BTM request 84*5113495bSYour Name * is received from AP then the candidate AP's may/may-not be present in 85*5113495bSYour Name * the firmware scan cache . Based on below config firmware will decide 86*5113495bSYour Name * whether to forward BTM frame to host or consume with firmware and proceed 87*5113495bSYour Name * with Roaming to candidate AP. 88*5113495bSYour Name * 00 scan and consume 89*5113495bSYour Name * 01 no scan and forward to host 90*5113495bSYour Name * 10, 11 reserved 91*5113495bSYour Name * 92*5113495bSYour Name * BIT 5, 4, 3: Roaming handoff decisions on multiple candidates match 93*5113495bSYour Name * for unsolicited BTM request. 94*5113495bSYour Name * 000 match if exact BSSIDs are found 95*5113495bSYour Name * 001 match if at least one top priority BSSID only 96*5113495bSYour Name * 010, 011, 100, 101, 110, 111 reserved 97*5113495bSYour Name * In case of solicited request intersection of Roam cache/candidates 98*5113495bSYour Name * with candidates in BTM request is taken into consideration. 99*5113495bSYour Name * 100*5113495bSYour Name * BIT 6: Set this to 1 will send BTM query frame and 0 not sent. 101*5113495bSYour Name * 102*5113495bSYour Name * BIT 7: Roam BTM candidates based on the roam score instead of BTM preferred 103*5113495bSYour Name * value 104*5113495bSYour Name * 105*5113495bSYour Name * BIT 8: BTM query preference over 11k neighbor report request 106*5113495bSYour Name * 107*5113495bSYour Name * BIT 9: BTM query with candidate list 108*5113495bSYour Name * 109*5113495bSYour Name * BIT 10: When this bit is set, Firmware will forward BTM Request Frame to 110*5113495bSYour Name * driver when the frame contains MBO assoc retry attribute. Driver will send 111*5113495bSYour Name * this frame to supplicant and supplicant will use the frame info for 112*5113495bSYour Name * denylisting the AP so for the next connection framework will avoid this AP. 113*5113495bSYour Name * 114*5113495bSYour Name * BIT 11-31: Reserved 115*5113495bSYour Name * 116*5113495bSYour Name * Supported Feature: STA 117*5113495bSYour Name * 118*5113495bSYour Name * Usage: External 119*5113495bSYour Name * 120*5113495bSYour Name * </ini> 121*5113495bSYour Name */ 122*5113495bSYour Name #define CFG_BTM_ENABLE CFG_INI_UINT( \ 123*5113495bSYour Name "btm_offload_config", \ 124*5113495bSYour Name 0x00000000, \ 125*5113495bSYour Name 0xffffffff, \ 126*5113495bSYour Name 0x000001c1, \ 127*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 128*5113495bSYour Name "configure btm offload") 129*5113495bSYour Name 130*5113495bSYour Name /* 131*5113495bSYour Name * <ini> 132*5113495bSYour Name * btm_solicited_timeout - timeout value for waiting BTM request 133*5113495bSYour Name * @Min: 1 134*5113495bSYour Name * @Max: 10000 135*5113495bSYour Name * @Default: 100 136*5113495bSYour Name * 137*5113495bSYour Name * This ini is used to configure timeout value for waiting BTM request. 138*5113495bSYour Name * Unit: millionsecond 139*5113495bSYour Name * 140*5113495bSYour Name * Supported Feature: STA 141*5113495bSYour Name * 142*5113495bSYour Name * Usage: External 143*5113495bSYour Name * 144*5113495bSYour Name * </ini> 145*5113495bSYour Name */ 146*5113495bSYour Name #define CFG_BTM_SOLICITED_TIMEOUT CFG_INI_UINT( \ 147*5113495bSYour Name "btm_solicited_timeout", \ 148*5113495bSYour Name 1, \ 149*5113495bSYour Name 10000, \ 150*5113495bSYour Name 100, \ 151*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 152*5113495bSYour Name "configure timeout value for waiting BTM request") 153*5113495bSYour Name 154*5113495bSYour Name /* 155*5113495bSYour Name * <ini> 156*5113495bSYour Name * btm_max_attempt_cnt - Maximum attempt for sending BTM query to ESS 157*5113495bSYour Name * @Min: 1 158*5113495bSYour Name * @Max: 0xFFFFFFFF 159*5113495bSYour Name * @Default: 3 160*5113495bSYour Name * 161*5113495bSYour Name * This ini is used to configure maximum attempt for sending BTM query to ESS. 162*5113495bSYour Name * 163*5113495bSYour Name * Supported Feature: STA 164*5113495bSYour Name * 165*5113495bSYour Name * Usage: External 166*5113495bSYour Name * 167*5113495bSYour Name * </ini> 168*5113495bSYour Name */ 169*5113495bSYour Name #define CFG_BTM_MAX_ATTEMPT_CNT CFG_INI_UINT( \ 170*5113495bSYour Name "btm_max_attempt_cnt", \ 171*5113495bSYour Name 1, \ 172*5113495bSYour Name 0xFFFFFFFF, \ 173*5113495bSYour Name 3, \ 174*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 175*5113495bSYour Name "configure maximum attempt for sending BTM query to ESS") 176*5113495bSYour Name 177*5113495bSYour Name /* 178*5113495bSYour Name * <ini> 179*5113495bSYour Name * btm_sticky_time - Stick time after roaming to new AP by BTM 180*5113495bSYour Name * @Min: 0 181*5113495bSYour Name * @Max: 0x0000FFFF 182*5113495bSYour Name * @Default: 0 183*5113495bSYour Name * 184*5113495bSYour Name * This ini is used to configure Stick time after roaming to new AP by BTM. 185*5113495bSYour Name * Unit: seconds 186*5113495bSYour Name * 187*5113495bSYour Name * Supported Feature: STA 188*5113495bSYour Name * 189*5113495bSYour Name * Usage: External 190*5113495bSYour Name * 191*5113495bSYour Name * </ini> 192*5113495bSYour Name */ 193*5113495bSYour Name #define CFG_BTM_STICKY_TIME CFG_INI_UINT( \ 194*5113495bSYour Name "btm_sticky_time", \ 195*5113495bSYour Name 0, \ 196*5113495bSYour Name 0x0000FFFF, \ 197*5113495bSYour Name 0, \ 198*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 199*5113495bSYour Name "configure Stick time after roaming to new AP by BTM") 200*5113495bSYour Name 201*5113495bSYour Name /* 202*5113495bSYour Name * <ini> 203*5113495bSYour Name * roam_candidate_validity_timer - roam cache entries validity timer 204*5113495bSYour Name * @Min: 0 205*5113495bSYour Name * @Max: 0xffffffff 206*5113495bSYour Name * @Default: 0xffffffff 207*5113495bSYour Name * 208*5113495bSYour Name * This value is the timeout values for the cached roam candidate 209*5113495bSYour Name * entries in firmware. If this value is 0, then that entry is not 210*5113495bSYour Name * valid 211*5113495bSYour Name * 212*5113495bSYour Name * Supported Feature: Roaming 213*5113495bSYour Name * 214*5113495bSYour Name * Usage: External 215*5113495bSYour Name * 216*5113495bSYour Name * </ini> 217*5113495bSYour Name */ 218*5113495bSYour Name #define CFG_BTM_VALIDITY_TIMER CFG_INI_UINT( \ 219*5113495bSYour Name "roam_candidate_validity_timer", \ 220*5113495bSYour Name 0, \ 221*5113495bSYour Name 0xffffffff, \ 222*5113495bSYour Name 0xffffffff, \ 223*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 224*5113495bSYour Name "BTM validity timer") 225*5113495bSYour Name 226*5113495bSYour Name /* 227*5113495bSYour Name * <ini> 228*5113495bSYour Name * btm_disassoc_timer_threshold - Disassociation timer threshold to wait 229*5113495bSYour Name * after which the full scan for roaming can be started after the AP has sent 230*5113495bSYour Name * the disassoc imminent 231*5113495bSYour Name * @Min: 0 232*5113495bSYour Name * @Max: 0xffffffff 233*5113495bSYour Name * @Default: 10000 234*5113495bSYour Name * 235*5113495bSYour Name * When AP sends, BTM request with disassoc imminent bit set, the STA should 236*5113495bSYour Name * roam to a new AP within the disassc timeout provided by the ap. If the Roam 237*5113495bSYour Name * scan period is less than the disassoc timeout value, then instead of 238*5113495bSYour Name * triggering the roam scan immediately, STA can wait for this 239*5113495bSYour Name * btm_disassoc_timer_threshold and then start roaming. 240*5113495bSYour Name * 241*5113495bSYour Name * Supported Feature: Roaming 242*5113495bSYour Name * 243*5113495bSYour Name * Usage: External 244*5113495bSYour Name * 245*5113495bSYour Name * </ini> 246*5113495bSYour Name */ 247*5113495bSYour Name #define CFG_BTM_DISASSOC_TIMER_THRESHOLD CFG_INI_UINT( \ 248*5113495bSYour Name "btm_disassoc_timer_threshold", \ 249*5113495bSYour Name 0, \ 250*5113495bSYour Name 0xffffffff, \ 251*5113495bSYour Name 10000, \ 252*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 253*5113495bSYour Name "BTM disassociation timer threshold") 254*5113495bSYour Name 255*5113495bSYour Name /* 256*5113495bSYour Name * <ini> 257*5113495bSYour Name * btm_query_bitmask - To send BTM query with candidate list on various roam 258*5113495bSYour Name * scans reasons 259*5113495bSYour Name * @Min: 0 260*5113495bSYour Name * @Max: 0xFFFFFFFF 261*5113495bSYour Name * @Default: 0x8 262*5113495bSYour Name * 263*5113495bSYour Name * This new ini is introduced to configure the bitmask for various roam scan 264*5113495bSYour Name * reasons. Fw sends "BTM query with preferred candidate list" only for those 265*5113495bSYour Name * roam scans which are enable through this bitmask. 266*5113495bSYour Name 267*5113495bSYour Name * For Example: 268*5113495bSYour Name * Bitmask : 0x8 (LOW_RSSI) refer enum WMI_ROAM_TRIGGER_REASON_ID 269*5113495bSYour Name * Bitmask : 0xDA (PER, LOW_RSSI, HIGH_RSSI, MAWC, DENSE) 270*5113495bSYour Name * refer enum WMI_ROAM_TRIGGER_REASON_ID 271*5113495bSYour Name * 272*5113495bSYour Name * Related: None 273*5113495bSYour Name * 274*5113495bSYour Name * Supported Feature: Roaming 275*5113495bSYour Name * 276*5113495bSYour Name * Usage: External 277*5113495bSYour Name * 278*5113495bSYour Name * </ini> 279*5113495bSYour Name */ 280*5113495bSYour Name #define CFG_BTM_QUERY_BITMASK CFG_INI_UINT( \ 281*5113495bSYour Name "btm_query_bitmask", \ 282*5113495bSYour Name 0, \ 283*5113495bSYour Name 0xFFFFFFFF, \ 284*5113495bSYour Name 0x8, \ 285*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 286*5113495bSYour Name "btm query with candidate list bitmask") 287*5113495bSYour Name 288*5113495bSYour Name /* 289*5113495bSYour Name * <ini> 290*5113495bSYour Name * minimum_btm_candidate_score - Consider the AP as roam candidate only if 291*5113495bSYour Name * its score is greater than minimum_btm_candidate_score. 292*5113495bSYour Name * @Min: 0 293*5113495bSYour Name * @Max: 10000 294*5113495bSYour Name * @Default: 2600 295*5113495bSYour Name * 296*5113495bSYour Name * This ini is applicable only for candidate selection during BTM roam trigger. 297*5113495bSYour Name * For this roam_score_delta_bitmap bit 10 should be set to 1. 298*5113495bSYour Name * 299*5113495bSYour Name * Related: None 300*5113495bSYour Name * 301*5113495bSYour Name * Supported Feature: Roaming 302*5113495bSYour Name * 303*5113495bSYour Name * Usage: External 304*5113495bSYour Name * 305*5113495bSYour Name * </ini> 306*5113495bSYour Name */ 307*5113495bSYour Name #define CFG_MIN_BTM_CANDIDATE_SCORE CFG_INI_UINT( \ 308*5113495bSYour Name "minimum_btm_candidate_score", \ 309*5113495bSYour Name 0, \ 310*5113495bSYour Name 10000, \ 311*5113495bSYour Name 2600, \ 312*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 313*5113495bSYour Name "Minimum BTM candidate score") 314*5113495bSYour Name 315*5113495bSYour Name #define CFG_BTM_ALL \ 316*5113495bSYour Name CFG(CFG_PREFER_BTM_QUERY) \ 317*5113495bSYour Name CFG(CFG_ENABLE_BTM_ABRIDGE) \ 318*5113495bSYour Name CFG(CFG_BTM_ENABLE) \ 319*5113495bSYour Name CFG(CFG_BTM_SOLICITED_TIMEOUT) \ 320*5113495bSYour Name CFG(CFG_BTM_MAX_ATTEMPT_CNT) \ 321*5113495bSYour Name CFG(CFG_BTM_STICKY_TIME) \ 322*5113495bSYour Name CFG(CFG_BTM_VALIDITY_TIMER) \ 323*5113495bSYour Name CFG(CFG_BTM_DISASSOC_TIMER_THRESHOLD) \ 324*5113495bSYour Name CFG(CFG_BTM_QUERY_BITMASK) \ 325*5113495bSYour Name CFG(CFG_MIN_BTM_CANDIDATE_SCORE) 326*5113495bSYour Name 327*5113495bSYour Name #endif /* CFG_MLME_BTM_H_ */ 328