1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. 3*5113495bSYour Name * 4*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for any 5*5113495bSYour Name * purpose with or without fee is hereby granted, provided that the above 6*5113495bSYour Name * copyright notice and this permission notice appear in all copies. 7*5113495bSYour Name * 8*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9*5113495bSYour Name * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10*5113495bSYour Name * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11*5113495bSYour Name * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12*5113495bSYour Name * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13*5113495bSYour Name * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14*5113495bSYour Name * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15*5113495bSYour Name */ 16*5113495bSYour Name 17*5113495bSYour Name /** 18*5113495bSYour Name * DOC: This file contains centralized definitions of DCS component 19*5113495bSYour Name */ 20*5113495bSYour Name #ifndef __CONFIG_DCS_H 21*5113495bSYour Name #define __CONFIG_DCS_H 22*5113495bSYour Name 23*5113495bSYour Name #include "cfg_define.h" 24*5113495bSYour Name 25*5113495bSYour Name /* 26*5113495bSYour Name * <ini> 27*5113495bSYour Name * gEnableDcs - Enable/Disable DCS 28*5113495bSYour Name * @Min: 0 29*5113495bSYour Name * @Max: 3 30*5113495bSYour Name * @Default: 0 31*5113495bSYour Name * 32*5113495bSYour Name * This ini is used to enable/disable DCS. Configurations are as follows: 33*5113495bSYour Name * 0 - Disable DCS. 34*5113495bSYour Name * 1 - Enable DCS for CW interference mitigation(CW_IM). 35*5113495bSYour Name * 2 - Enable DCS for WLAN interference mitigation(WLAN_IM). 36*5113495bSYour Name * 3 - Enable both DCS for CW_IM and DCS for WLAN_IM. 37*5113495bSYour Name * 38*5113495bSYour Name * Related: None 39*5113495bSYour Name * 40*5113495bSYour Name * Supported Feature: DCS 41*5113495bSYour Name * 42*5113495bSYour Name * Usage: External 43*5113495bSYour Name * 44*5113495bSYour Name * </ini> 45*5113495bSYour Name */ 46*5113495bSYour Name #define CFG_DCS_ENABLE CFG_INI_UINT(\ 47*5113495bSYour Name "gEnableDcs",\ 48*5113495bSYour Name 0, 3, 0,\ 49*5113495bSYour Name CFG_VALUE_OR_DEFAULT, "Enable DCS") 50*5113495bSYour Name 51*5113495bSYour Name /* 52*5113495bSYour Name * <ini> 53*5113495bSYour Name * dcs_debug - Configure dcs debug trace level for debug purpose 54*5113495bSYour Name * @Min: 0 55*5113495bSYour Name * @Max: 2 56*5113495bSYour Name * @Default: 0 57*5113495bSYour Name * 58*5113495bSYour Name * This ini is used to configure dcs debug trace level for debug purpose 59*5113495bSYour Name * 60*5113495bSYour Name * 61*5113495bSYour Name * Related: None 62*5113495bSYour Name * 63*5113495bSYour Name * Usage: External 64*5113495bSYour Name * 65*5113495bSYour Name * </ini> 66*5113495bSYour Name */ 67*5113495bSYour Name #define CFG_DCS_DEBUG CFG_INI_UINT(\ 68*5113495bSYour Name "dcs_debug",\ 69*5113495bSYour Name 0, 2, 0,\ 70*5113495bSYour Name CFG_VALUE_OR_DEFAULT,\ 71*5113495bSYour Name "dcs debug trace level") 72*5113495bSYour Name 73*5113495bSYour Name /* 74*5113495bSYour Name * <ini> 75*5113495bSYour Name * dcs_coch_intfr_threshold - Configure co-channel interference threshold 76*5113495bSYour Name * @Min: 0 77*5113495bSYour Name * @Max: 0xFFFFFFFF 78*5113495bSYour Name * @Default: 30 79*5113495bSYour Name * 80*5113495bSYour Name * This ini is used to configure co-channel interference threshold 81*5113495bSYour Name * 82*5113495bSYour Name * 83*5113495bSYour Name * Related: None 84*5113495bSYour Name * 85*5113495bSYour Name * Usage: External 86*5113495bSYour Name * 87*5113495bSYour Name * </ini> 88*5113495bSYour Name */ 89*5113495bSYour Name #define CFG_DCS_COCH_INTFR_THRESHOLD CFG_INI_UINT(\ 90*5113495bSYour Name "dcs_coch_intfr_threshold",\ 91*5113495bSYour Name 0, 0xFFFFFFFF, 30,\ 92*5113495bSYour Name CFG_VALUE_OR_DEFAULT,\ 93*5113495bSYour Name "dcs co-channel interference threshold level") 94*5113495bSYour Name 95*5113495bSYour Name /* 96*5113495bSYour Name * <ini> 97*5113495bSYour Name * dcs_tx_err_threshold - Configure transmission failure rate threshold 98*5113495bSYour Name * @Min: 0 99*5113495bSYour Name * @Max: 0xFFFFFFFF 100*5113495bSYour Name * @Default: 30 101*5113495bSYour Name * 102*5113495bSYour Name * This ini is used to configure transmission failure rate threshold 103*5113495bSYour Name * 104*5113495bSYour Name * 105*5113495bSYour Name * Related: None 106*5113495bSYour Name * 107*5113495bSYour Name * Usage: External 108*5113495bSYour Name * 109*5113495bSYour Name * </ini> 110*5113495bSYour Name */ 111*5113495bSYour Name #define CFG_DCS_TX_ERR_THRESHOLD CFG_INI_UINT(\ 112*5113495bSYour Name "dcs_tx_err_threshold",\ 113*5113495bSYour Name 0, 0xFFFFFFFF, 30,\ 114*5113495bSYour Name CFG_VALUE_OR_DEFAULT,\ 115*5113495bSYour Name "dcs transmission failure rate threshold") 116*5113495bSYour Name 117*5113495bSYour Name /* 118*5113495bSYour Name * <ini> 119*5113495bSYour Name * dcs_phy_err_penalty - Configure channel time wasted due to each Phy 120*5113495bSYour Name * error(phy error penalty) 121*5113495bSYour Name * @Min: 0 122*5113495bSYour Name * @Max: 0xFFFFFFFF 123*5113495bSYour Name * @Default: 500 124*5113495bSYour Name * 125*5113495bSYour Name * This ini is used to configure phy error penalty 126*5113495bSYour Name * 127*5113495bSYour Name * 128*5113495bSYour Name * Related: None 129*5113495bSYour Name * 130*5113495bSYour Name * Usage: External 131*5113495bSYour Name * 132*5113495bSYour Name * </ini> 133*5113495bSYour Name */ 134*5113495bSYour Name #define CFG_DCS_PHY_ERR_PENALTY CFG_INI_UINT(\ 135*5113495bSYour Name "dcs_phy_err_penalty",\ 136*5113495bSYour Name 0, 0xFFFFFFFF, 500,\ 137*5113495bSYour Name CFG_VALUE_OR_DEFAULT,\ 138*5113495bSYour Name "dcs phy error penalty") 139*5113495bSYour Name 140*5113495bSYour Name /* 141*5113495bSYour Name * <ini> 142*5113495bSYour Name * dcs_phy_err_threshold - Configure phy err threshold 143*5113495bSYour Name * @Min: 0 144*5113495bSYour Name * @Max: 0xFFFFFFFF 145*5113495bSYour Name * @Default: 300 146*5113495bSYour Name * 147*5113495bSYour Name * This ini is used to configure phy error threshold 148*5113495bSYour Name * 149*5113495bSYour Name * 150*5113495bSYour Name * Related: None 151*5113495bSYour Name * 152*5113495bSYour Name * Usage: External 153*5113495bSYour Name * 154*5113495bSYour Name * </ini> 155*5113495bSYour Name */ 156*5113495bSYour Name #define CFG_DCS_PHY_ERR_THRESHOLD CFG_INI_UINT(\ 157*5113495bSYour Name "dcs_phy_err_threshold",\ 158*5113495bSYour Name 0, 0xFFFFFFFF, 300,\ 159*5113495bSYour Name CFG_VALUE_OR_DEFAULT,\ 160*5113495bSYour Name "dcs phy error threshold") 161*5113495bSYour Name 162*5113495bSYour Name /* 163*5113495bSYour Name * <ini> 164*5113495bSYour Name * dcs_user_max_cu - Configure tx channel utilization due to AP's tx and rx 165*5113495bSYour Name * @Min: 0 166*5113495bSYour Name * @Max: 0xFFFFFFFF 167*5113495bSYour Name * @Default: 50 168*5113495bSYour Name * 169*5113495bSYour Name * This ini is used to configure tx channel utilization due to AP's tx and rx 170*5113495bSYour Name * 171*5113495bSYour Name * 172*5113495bSYour Name * Related: None 173*5113495bSYour Name * 174*5113495bSYour Name * Usage: External 175*5113495bSYour Name * 176*5113495bSYour Name * </ini> 177*5113495bSYour Name */ 178*5113495bSYour Name #define CFG_DCS_USER_MAX_CU CFG_INI_UINT(\ 179*5113495bSYour Name "user_max_cu",\ 180*5113495bSYour Name 0, 0xFFFFFFFF, 50,\ 181*5113495bSYour Name CFG_VALUE_OR_DEFAULT,\ 182*5113495bSYour Name "dcs tx channel utilization") 183*5113495bSYour Name 184*5113495bSYour Name /* 185*5113495bSYour Name * <ini> 186*5113495bSYour Name * dcs_radar_err_threshold - Configure radar error threshold 187*5113495bSYour Name * @Min: 0 188*5113495bSYour Name * @Max: 0xFFFFFFFF 189*5113495bSYour Name * @Default: 1000 190*5113495bSYour Name * 191*5113495bSYour Name * This ini is used to configure radar error threshold 192*5113495bSYour Name * 193*5113495bSYour Name * 194*5113495bSYour Name * Related: None 195*5113495bSYour Name * 196*5113495bSYour Name * Usage: External 197*5113495bSYour Name * 198*5113495bSYour Name * </ini> 199*5113495bSYour Name */ 200*5113495bSYour Name #define CFG_DCS_RADAR_ERR_THRESHOLD CFG_INI_UINT(\ 201*5113495bSYour Name "dcs_radar_err_threshold",\ 202*5113495bSYour Name 0, 0xFFFFFFFF, 1000,\ 203*5113495bSYour Name CFG_VALUE_OR_DEFAULT,\ 204*5113495bSYour Name "dcs radar error threshold") 205*5113495bSYour Name 206*5113495bSYour Name /* 207*5113495bSYour Name * <ini> 208*5113495bSYour Name * dcs_intfr_detection_threshold - Configure interference detection threshold 209*5113495bSYour Name * @Min: 0 210*5113495bSYour Name * @Max: 0xFFFFFFFF 211*5113495bSYour Name * @Default: 6 212*5113495bSYour Name * 213*5113495bSYour Name * This ini is used to configure interference detection threshold 214*5113495bSYour Name * 215*5113495bSYour Name * 216*5113495bSYour Name * Related: None 217*5113495bSYour Name * 218*5113495bSYour Name * Usage: External 219*5113495bSYour Name * 220*5113495bSYour Name * </ini> 221*5113495bSYour Name */ 222*5113495bSYour Name #define CFG_DCS_INTFR_DETECTION_THRESHOLD CFG_INI_UINT(\ 223*5113495bSYour Name "dcs_intfr_detection_threshold",\ 224*5113495bSYour Name 0, 0xFFFFFFFF, 6,\ 225*5113495bSYour Name CFG_VALUE_OR_DEFAULT,\ 226*5113495bSYour Name "dcs interference detection threshold") 227*5113495bSYour Name 228*5113495bSYour Name /* 229*5113495bSYour Name * <ini> 230*5113495bSYour Name * dcs_intfr_detection_window - Configure interference sampling window 231*5113495bSYour Name * @Min: 0 232*5113495bSYour Name * @Max: 0xFFFFFFFF 233*5113495bSYour Name * @Default: 10 234*5113495bSYour Name * 235*5113495bSYour Name * This ini is used to configure interference sampling window 236*5113495bSYour Name * 237*5113495bSYour Name * 238*5113495bSYour Name * Related: None 239*5113495bSYour Name * 240*5113495bSYour Name * Usage: External 241*5113495bSYour Name * 242*5113495bSYour Name * </ini> 243*5113495bSYour Name */ 244*5113495bSYour Name #define CFG_DCS_INTFR_DETECTION_WINDOW CFG_INI_UINT(\ 245*5113495bSYour Name "dcs_intfr_detection_window",\ 246*5113495bSYour Name 0, 0xFFFFFFFF, 10,\ 247*5113495bSYour Name CFG_VALUE_OR_DEFAULT,\ 248*5113495bSYour Name "dcs interference sampling window") 249*5113495bSYour Name 250*5113495bSYour Name /* 251*5113495bSYour Name * <ini> 252*5113495bSYour Name * dcs_disable_threshold_per_5mins - In five minutes, if dcs happen 253*5113495bSYour Name * more than threshold, then disable dcs for some time 254*5113495bSYour Name * @Min: 0 255*5113495bSYour Name * @Max: 10 256*5113495bSYour Name * @Default: 3 257*5113495bSYour Name * 258*5113495bSYour Name * This ini is used to dcs happen times threshold in five minutes 259*5113495bSYour Name * 260*5113495bSYour Name * 261*5113495bSYour Name * Related: None 262*5113495bSYour Name * 263*5113495bSYour Name * Usage: External 264*5113495bSYour Name * 265*5113495bSYour Name * </ini> 266*5113495bSYour Name */ 267*5113495bSYour Name #define CFG_DCS_DISABLE_THRESHOLD_PER_5MINS CFG_INI_UINT(\ 268*5113495bSYour Name "dcs_disable_thresh_per_5mins",\ 269*5113495bSYour Name 0, 10, 3,\ 270*5113495bSYour Name CFG_VALUE_OR_DEFAULT,\ 271*5113495bSYour Name "dcs happen times threshold in five minutes") 272*5113495bSYour Name 273*5113495bSYour Name /* 274*5113495bSYour Name * <ini> 275*5113495bSYour Name * dcs_restart_delay - When dcs happen more than threshold in five minutes, 276*5113495bSYour Name * then start to disable dcs for some minutes, then enable dcs again. 277*5113495bSYour Name * @Min: 0 278*5113495bSYour Name * @Max: 0xFFFFFFFF 279*5113495bSYour Name * @Default: 30 280*5113495bSYour Name * 281*5113495bSYour Name * This ini is used to configure dcs disable time length in minute unit 282*5113495bSYour Name * 283*5113495bSYour Name * 284*5113495bSYour Name * Related: None 285*5113495bSYour Name * 286*5113495bSYour Name * Usage: External 287*5113495bSYour Name * 288*5113495bSYour Name * </ini> 289*5113495bSYour Name */ 290*5113495bSYour Name #define CFG_DCS_RESTART_DELAY CFG_INI_UINT(\ 291*5113495bSYour Name "dcs_restart_delay",\ 292*5113495bSYour Name 0, 0xFFFFFFFF, 30,\ 293*5113495bSYour Name CFG_VALUE_OR_DEFAULT, "dcs restart delay") 294*5113495bSYour Name 295*5113495bSYour Name /* 296*5113495bSYour Name * <ini> 297*5113495bSYour Name * dcs_disable_algorithm - Some feature like SON only need dcs stats, 298*5113495bSYour Name * then disable dcs algorithm for SON. 299*5113495bSYour Name * @Min: 0 300*5113495bSYour Name * @Max: 1 301*5113495bSYour Name * @Default: 0 302*5113495bSYour Name * 303*5113495bSYour Name * This ini is used to disable dcs algorithm 304*5113495bSYour Name * 305*5113495bSYour Name * 306*5113495bSYour Name * Related: None 307*5113495bSYour Name * 308*5113495bSYour Name * Usage: External 309*5113495bSYour Name * 310*5113495bSYour Name * </ini> 311*5113495bSYour Name */ 312*5113495bSYour Name #define CFG_DCS_DISABLE_ALGORITHM CFG_INI_BOOL(\ 313*5113495bSYour Name "dcs_disable_algorithm", false,\ 314*5113495bSYour Name "dcs disable algorithm") 315*5113495bSYour Name 316*5113495bSYour Name #define CFG_DCS_ALL \ 317*5113495bSYour Name CFG(CFG_DCS_ENABLE) \ 318*5113495bSYour Name CFG(CFG_DCS_DEBUG) \ 319*5113495bSYour Name CFG(CFG_DCS_COCH_INTFR_THRESHOLD) \ 320*5113495bSYour Name CFG(CFG_DCS_TX_ERR_THRESHOLD) \ 321*5113495bSYour Name CFG(CFG_DCS_PHY_ERR_PENALTY) \ 322*5113495bSYour Name CFG(CFG_DCS_PHY_ERR_THRESHOLD) \ 323*5113495bSYour Name CFG(CFG_DCS_USER_MAX_CU) \ 324*5113495bSYour Name CFG(CFG_DCS_RADAR_ERR_THRESHOLD) \ 325*5113495bSYour Name CFG(CFG_DCS_INTFR_DETECTION_THRESHOLD) \ 326*5113495bSYour Name CFG(CFG_DCS_INTFR_DETECTION_WINDOW) \ 327*5113495bSYour Name CFG(CFG_DCS_DISABLE_THRESHOLD_PER_5MINS) \ 328*5113495bSYour Name CFG(CFG_DCS_RESTART_DELAY) \ 329*5113495bSYour Name CFG(CFG_DCS_DISABLE_ALGORITHM) 330*5113495bSYour Name 331*5113495bSYour Name #endif /* __CONFIG_DCS_H */ 332