From 297e63ab482d9b116c13ca2c7546ae532e27e27a Mon Sep 17 00:00:00 2001 From: Padma Raghunathan Date: Mon, 20 Apr 2020 15:09:15 +0530 Subject: [PATCH] qcacmn: Add support to disable CFR through INI Add option to disable cfr for a pdev through INI. Since INI is per psoc, bitmap is used to indicate the set of PDEVs for which CFR needs to be disabled. Change-Id: Iaff24295c8c3ec702647db24961395b8a7ecf8c4 CRs-Fixed: 2671620 --- cfg/inc/cfg_converged.h | 9 ++++++++- umac/cfr/dispatcher/inc/cfr_cfg.h | 20 +++++++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/cfg/inc/cfg_converged.h b/cfg/inc/cfg_converged.h index b14387902fb3..59f5f517c784 100644 --- a/cfg/inc/cfg_converged.h +++ b/cfg/inc/cfg_converged.h @@ -38,6 +38,11 @@ #else #define CFG_DCS_ALL #endif +#ifdef WLAN_CFR_ENABLE +#include "cfr_cfg.h" +#else +#define CFG_CFR_ALL +#endif #define CFG_CONVERGED_ALL \ CFG_SCAN_ALL \ @@ -46,7 +51,9 @@ CFG_GREEN_AP_ALL \ CFG_SPECTRAL_ALL \ CFG_HIF \ - CFG_DCS_ALL + CFG_DCS_ALL \ + CFG_CFR_ALL + #endif /* __CFG_CONVERGED_H */ diff --git a/umac/cfr/dispatcher/inc/cfr_cfg.h b/umac/cfr/dispatcher/inc/cfr_cfg.h index f7e3417a0a4a..c9272e1f7b0d 100644 --- a/umac/cfr/dispatcher/inc/cfr_cfg.h +++ b/umac/cfr/dispatcher/inc/cfr_cfg.h @@ -24,24 +24,30 @@ /* * - * cfr_disable - disable channel frequence response(CFR) feature + * cfr_disable - Bitmap denoting the PDEVs for which CFR needs to be + * disabled * @Min: 0 - * @Max: 1 + * @Max: Bitmap with no. of set bits equal to total no. of PDEVs in the SOC * @Default: 0 * - * This ini is used to disable cfr feature. + * This ini is used to disable CFR feature for PDEV. * * Related: None * - * Supported Feature: cfr + * Supported Feature: CFR * * Usage: External * * */ -#define CFG_CFR_DISABLE \ - CFG_INI_BOOL("cfr_disable", false, \ - "CFR disable") +#define CFG_CFR_DISABLE\ + CFG_INI_UINT("cfr_disable", \ + 0, \ + 0x7, \ + 0, \ + CFG_VALUE_OR_DEFAULT, \ + "cfr disable bitmap") + #define CFG_CFR_ALL \ CFG(CFG_CFR_DISABLE)