summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmar Singhal <asinghal@qca.qualcomm.com>2014-08-19 15:23:33 -0700
committerPitani Venkata Rajesh Kumar <c_vpitan@qti.qualcomm.com>2014-08-23 11:51:35 +0530
commite704e226a7a25027ea8b714be3cf6cf024ae54f4 (patch)
tree185e1f2152690b10e223283250fa39d6771e8e35
parent8089281233a37598972b05b51190e2397323a77d (diff)
qcacld: Honour BandCapability setting from INI
The BandCapability setting can come from the target as well as the INI. If the BandCapability from INI is a subset of BandCapability from target, it should take precedence. Also change the default INI setting to ALL. CRs-Fixed: 711797 Change-Id: I8dd8c46820908e95736439bb6d69b9aafb2bd446
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h2
-rwxr-xr-xCORE/HDD/src/wlan_hdd_main.c18
2 files changed, 19 insertions, 1 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index c62fb1f079f7..f57c81b304a3 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -1404,7 +1404,7 @@ typedef enum
#define CFG_BAND_CAPABILITY_NAME "BandCapability"
#define CFG_BAND_CAPABILITY_MIN (0)
#define CFG_BAND_CAPABILITY_MAX (2)
-#define CFG_BAND_CAPABILITY_DEFAULT (1)
+#define CFG_BAND_CAPABILITY_DEFAULT (0)
#define CFG_ENABLE_BEACON_EARLY_TERMINATION_NAME "enableBeaconEarlyTermination"
#define CFG_ENABLE_BEACON_EARLY_TERMINATION_MIN ( 0 )
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 781f57ac6761..4c6e2aa50f72 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -6641,8 +6641,26 @@ void hdd_update_tgt_cfg(void *context, void *param)
{
hdd_context_t *hdd_ctx = (hdd_context_t *)context;
struct hdd_tgt_cfg *cfg = (struct hdd_tgt_cfg *)param;
+ tANI_U8 temp_band_cap;
+
+ /* first store the INI band capability */
+ temp_band_cap = hdd_ctx->cfg_ini->nBandCapability;
+
hdd_ctx->cfg_ini->nBandCapability = cfg->band_cap;
+ /* now overwrite the target band capability with INI
+ setting if INI setting is a subset */
+
+ if ((hdd_ctx->cfg_ini->nBandCapability == eCSR_BAND_ALL) &&
+ (temp_band_cap != eCSR_BAND_ALL))
+ hdd_ctx->cfg_ini->nBandCapability = temp_band_cap;
+ else if ((hdd_ctx->cfg_ini->nBandCapability != eCSR_BAND_ALL) &&
+ (temp_band_cap != eCSR_BAND_ALL) &&
+ (hdd_ctx->cfg_ini->nBandCapability != temp_band_cap)) {
+ hddLog(VOS_TRACE_LEVEL_WARN,
+ FL("ini BandCapability not supported by the target"));
+ }
+
hdd_ctx->reg.reg_domain = cfg->reg_domain;
hdd_ctx->reg.eeprom_rd_ext = cfg->eeprom_rd_ext;