1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * Copyright (c) 2022-2023 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 centralized definitions of converged configuration. 22*5113495bSYour Name */ 23*5113495bSYour Name 24*5113495bSYour Name #ifndef __CFG_MLME_ACS_H 25*5113495bSYour Name #define __CFG_MLME_ACS_H 26*5113495bSYour Name 27*5113495bSYour Name /* 28*5113495bSYour Name * <ini> 29*5113495bSYour Name * acs_with_more_param- Enable acs calculation with more param. 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 acs calculation with more param. 35*5113495bSYour Name * 36*5113495bSYour Name * Related: NA 37*5113495bSYour Name * 38*5113495bSYour Name * Supported Feature: ACS 39*5113495bSYour Name * 40*5113495bSYour Name * Usage: External 41*5113495bSYour Name * 42*5113495bSYour Name * </ini> 43*5113495bSYour Name */ 44*5113495bSYour Name 45*5113495bSYour Name #define CFG_ACS_WITH_MORE_PARAM CFG_INI_BOOL( \ 46*5113495bSYour Name "acs_with_more_param", \ 47*5113495bSYour Name 1, \ 48*5113495bSYour Name "Enable ACS with more param") 49*5113495bSYour Name 50*5113495bSYour Name /* 51*5113495bSYour Name * <ini> 52*5113495bSYour Name * AutoChannelSelectWeight - ACS channel weight 53*5113495bSYour Name * @Min: 0 54*5113495bSYour Name * @Max: 0xFFFFFFFF 55*5113495bSYour Name * @Default: 0x00fafafa 56*5113495bSYour Name * 57*5113495bSYour Name * This ini is used to adjust weight of factors in 58*5113495bSYour Name * acs algorithm. 59*5113495bSYour Name * 60*5113495bSYour Name * Supported Feature: ACS 61*5113495bSYour Name * 62*5113495bSYour Name * Usage: External 63*5113495bSYour Name * 64*5113495bSYour Name * bits 0-3: rssi weight 65*5113495bSYour Name * bits 4-7: bss count weight 66*5113495bSYour Name * bits 8-11: noise floor weight 67*5113495bSYour Name * bits 12-15: channel free weight 68*5113495bSYour Name * bits 16-19: tx power range weight 69*5113495bSYour Name * bits 20-23: tx power throughput weight 70*5113495bSYour Name * bits 24-31: reserved 71*5113495bSYour Name * 72*5113495bSYour Name * </ini> 73*5113495bSYour Name */ 74*5113495bSYour Name 75*5113495bSYour Name #define CFG_AUTO_CHANNEL_SELECT_WEIGHT CFG_INI_UINT( \ 76*5113495bSYour Name "AutoChannelSelectWeight", \ 77*5113495bSYour Name 0, \ 78*5113495bSYour Name 0xFFFFFFFF, \ 79*5113495bSYour Name 0x00fafafa, \ 80*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 81*5113495bSYour Name "Adjust weight factor in ACS") 82*5113495bSYour Name 83*5113495bSYour Name /* 84*5113495bSYour Name * <ini> 85*5113495bSYour Name * gvendor_acs_support - vendor based channel selection manager 86*5113495bSYour Name * @Min: 0 87*5113495bSYour Name * @Max: 1 88*5113495bSYour Name * @Default: 0 89*5113495bSYour Name * 90*5113495bSYour Name * Enabling this parameter will force driver to use user application based 91*5113495bSYour Name * channel selection algo instead of driver based auto channel selection 92*5113495bSYour Name * logic. 93*5113495bSYour Name * 94*5113495bSYour Name * Supported Feature: ACS 95*5113495bSYour Name * 96*5113495bSYour Name * Usage: External 97*5113495bSYour Name * 98*5113495bSYour Name * </ini> 99*5113495bSYour Name */ 100*5113495bSYour Name 101*5113495bSYour Name #define CFG_USER_AUTO_CHANNEL_SELECTION CFG_INI_BOOL( \ 102*5113495bSYour Name "gvendor_acs_support", \ 103*5113495bSYour Name 0, \ 104*5113495bSYour Name "Vendor channel selection manager") 105*5113495bSYour Name 106*5113495bSYour Name /* 107*5113495bSYour Name * <ini> 108*5113495bSYour Name * gacs_support_for_dfs_lte_coex - acs support for lte coex and dfs event 109*5113495bSYour Name * @Min: 0 110*5113495bSYour Name * @Max: 1 111*5113495bSYour Name * @Default: 0 112*5113495bSYour Name * 113*5113495bSYour Name * Enabling this parameter will force driver to use user application based 114*5113495bSYour Name * channel selection algo for channel selection in case of dfs and lte 115*5113495bSYour Name * coex event. 116*5113495bSYour Name * 117*5113495bSYour Name * Supported Feature: ACS 118*5113495bSYour Name * 119*5113495bSYour Name * Usage: Internal 120*5113495bSYour Name * 121*5113495bSYour Name * </ini> 122*5113495bSYour Name */ 123*5113495bSYour Name 124*5113495bSYour Name #define CFG_USER_ACS_DFS_LTE CFG_INI_BOOL( \ 125*5113495bSYour Name "gacs_support_for_dfs_lte_coex", \ 126*5113495bSYour Name 0, \ 127*5113495bSYour Name "Acs support for lte coex and dfs") 128*5113495bSYour Name 129*5113495bSYour Name /* 130*5113495bSYour Name * <ini> 131*5113495bSYour Name * acs_policy - External ACS policy control 132*5113495bSYour Name * @Min: 0 133*5113495bSYour Name * @Max: 1 134*5113495bSYour Name * @Default: 1 135*5113495bSYour Name * 136*5113495bSYour Name * Values are per enum hdd_external_acs_policy. 137*5113495bSYour Name * 138*5113495bSYour Name * This ini is used to control the external ACS policy. 139*5113495bSYour Name * 140*5113495bSYour Name * 0 -Preferable for ACS to select a 141*5113495bSYour Name * channel with non-zero pcl weight. 142*5113495bSYour Name * 1 -Mandatory for ACS to select a 143*5113495bSYour Name * channel with non-zero pcl weight. 144*5113495bSYour Name * 145*5113495bSYour Name * Related: None 146*5113495bSYour Name * 147*5113495bSYour Name * Supported Feature: ACS 148*5113495bSYour Name * 149*5113495bSYour Name * Usage: External 150*5113495bSYour Name * 151*5113495bSYour Name * </ini> 152*5113495bSYour Name */ 153*5113495bSYour Name 154*5113495bSYour Name #define CFG_EXTERNAL_ACS_POLICY CFG_INI_BOOL( \ 155*5113495bSYour Name "acs_policy", \ 156*5113495bSYour Name 1, \ 157*5113495bSYour Name "External ACS Policy Control") 158*5113495bSYour Name 159*5113495bSYour Name #define ACS_WEIGHT_MAX_STR_LEN 500 160*5113495bSYour Name 161*5113495bSYour Name /* 162*5113495bSYour Name * <ini> 163*5113495bSYour Name * normalize_acs_weight - Used to control the ACS channel weightage. 164*5113495bSYour Name * 165*5113495bSYour Name * This ini is used to specify the weight percentage of the channel. Channel 166*5113495bSYour Name * weights can be controlled by user to prioritize or de-prioritize channels. 167*5113495bSYour Name * 168*5113495bSYour Name * Related: ACS 169*5113495bSYour Name * 170*5113495bSYour Name * Supported Feature: ACS 171*5113495bSYour Name * 172*5113495bSYour Name * Usage: External 173*5113495bSYour Name * 174*5113495bSYour Name * </ini> 175*5113495bSYour Name */ 176*5113495bSYour Name #define CFG_NORMALIZE_ACS_WEIGHT CFG_INI_STRING( \ 177*5113495bSYour Name "normalize_acs_weight", \ 178*5113495bSYour Name 0, \ 179*5113495bSYour Name ACS_WEIGHT_MAX_STR_LEN, \ 180*5113495bSYour Name "2407-5875=40, 5945-7125=90, 5975=100, 6055=100, 6135=100, 6215=100, 6295=100, 6375=100, 6615=100, 6695=100, 6775=100, 6855=100", \ 181*5113495bSYour Name "Used to specify the channel weights") 182*5113495bSYour Name 183*5113495bSYour Name /* 184*5113495bSYour Name * <ini> 185*5113495bSYour Name * force_start_sap- Enable the SAP even if no channel is suitable for SAP 186*5113495bSYour Name * @Min: 0 187*5113495bSYour Name * @Max: 1 188*5113495bSYour Name * @Default: 0 189*5113495bSYour Name * 190*5113495bSYour Name * This ini is used to enable the SAP even if no channel is found suitable 191*5113495bSYour Name * for SAP by ACS. 192*5113495bSYour Name * 193*5113495bSYour Name * Related: NA 194*5113495bSYour Name * 195*5113495bSYour Name * Supported Feature: ACS 196*5113495bSYour Name * 197*5113495bSYour Name * Usage: Internal 198*5113495bSYour Name * 199*5113495bSYour Name * </ini> 200*5113495bSYour Name */ 201*5113495bSYour Name #define CFG_ACS_FORCE_START_SAP CFG_INI_BOOL( \ 202*5113495bSYour Name "force_start_sap", \ 203*5113495bSYour Name 0, \ 204*5113495bSYour Name "Force start SAP") 205*5113495bSYour Name 206*5113495bSYour Name /* 207*5113495bSYour Name * <ini> 208*5113495bSYour Name * acs_prefer_6ghz_psc - Select 6 GHz PSC channel as priority 209*5113495bSYour Name * @Min: 0 210*5113495bSYour Name * @Max: 1 211*5113495bSYour Name * @Default: 1 212*5113495bSYour Name * 213*5113495bSYour Name * This config is used to configure ACS logic to select PSC channel as 214*5113495bSYour Name * perefered result. "normalize_acs_weight" INI can make the PSC 215*5113495bSYour Name * channel priority higher than NON PSC, but it is for a single channel's 216*5113495bSYour Name * weight, for bw 160 or bw 80 combined channel weight, it has less 217*5113495bSYour Name * help. 218*5113495bSYour Name * 219*5113495bSYour Name * Related: None 220*5113495bSYour Name * 221*5113495bSYour Name * Supported Feature: ACS 222*5113495bSYour Name * 223*5113495bSYour Name * Usage: Internal 224*5113495bSYour Name * 225*5113495bSYour Name * </ini> 226*5113495bSYour Name */ 227*5113495bSYour Name #define CFG_ACS_PREFER_6GHZ_PSC CFG_BOOL( \ 228*5113495bSYour Name "acs_prefer_6ghz_psc", \ 229*5113495bSYour Name 1, \ 230*5113495bSYour Name "Select 6 GHz PSC channel as priority") 231*5113495bSYour Name 232*5113495bSYour Name /* 233*5113495bSYour Name * <ini> 234*5113495bSYour Name * np_chan_weight - chan weightage for non preferred channels 235*5113495bSYour Name * @Min: 0x00000000 236*5113495bSYour Name * @Max: 0x64646464 237*5113495bSYour Name * @Default: 0x00000000 238*5113495bSYour Name * 239*5113495bSYour Name * This INI give percentage value of weights to be considered in the ACS algo 240*5113495bSYour Name * for the non preferred channels. the distribution of the channel type is:- 241*5113495bSYour Name * Example:- If the percentage of lets say DFS channels is set to 50%, and 242*5113495bSYour Name * the weight comes out to be x, then we would increase the weight of DFS 243*5113495bSYour Name * channels by 50% ( 100 - y% set in INI), so that it gets de-prioritized in 244*5113495bSYour Name * the ACS sorted channel list, the lesser the weight, the better the channel. 245*5113495bSYour Name * So the channel with more weight is less likely to be selected. So by default 246*5113495bSYour Name * the np chan weightage for DFS is set to 0, that is it will be assigned max 247*5113495bSYour Name * weightage, so no probality of getting selected, as for standlaone, DFS is not 248*5113495bSYour Name * recommended (it takes 60 sec/10min to start depending upon channel type). 249*5113495bSYour Name * 250*5113495bSYour Name * Indexes are defined in this way. 251*5113495bSYour Name * 0 Index (BITS 0-7): DFS - Def 1% 252*5113495bSYour Name * 1 Index (BITS 8-15): Reserved 253*5113495bSYour Name * 2 Index (BITS 16-23): Reserved 254*5113495bSYour Name * 3 Index (BITS 24-31): Reserved 255*5113495bSYour Name * These percentage values are stored in HEX. Max can be 0x64 256*5113495bSYour Name * Supported Feature: ACS 257*5113495bSYour Name * 258*5113495bSYour Name * Usage: External 259*5113495bSYour Name * 260*5113495bSYour Name * </ini> 261*5113495bSYour Name */ 262*5113495bSYour Name #define CFG_ACS_NP_CHAN_WEIGHT CFG_INI_UINT( \ 263*5113495bSYour Name "np_chan_weight", \ 264*5113495bSYour Name 0x00000000, \ 265*5113495bSYour Name 0x64646464, \ 266*5113495bSYour Name 0x00000001, \ 267*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 268*5113495bSYour Name "np chan weight") 269*5113495bSYour Name 270*5113495bSYour Name #define CFG_ACS_ALL \ 271*5113495bSYour Name CFG(CFG_ACS_WITH_MORE_PARAM) \ 272*5113495bSYour Name CFG(CFG_AUTO_CHANNEL_SELECT_WEIGHT) \ 273*5113495bSYour Name CFG(CFG_USER_AUTO_CHANNEL_SELECTION) \ 274*5113495bSYour Name CFG(CFG_USER_ACS_DFS_LTE) \ 275*5113495bSYour Name CFG(CFG_EXTERNAL_ACS_POLICY) \ 276*5113495bSYour Name CFG(CFG_NORMALIZE_ACS_WEIGHT) \ 277*5113495bSYour Name CFG(CFG_ACS_PREFER_6GHZ_PSC) \ 278*5113495bSYour Name CFG(CFG_ACS_FORCE_START_SAP) \ 279*5113495bSYour Name CFG(CFG_ACS_NP_CHAN_WEIGHT) 280*5113495bSYour Name 281*5113495bSYour Name #endif /* __CFG_MLME_ACS_H */ 282