diff options
| author | Jeff Johnson <jjohnson@qca.qualcomm.com> | 2015-05-20 14:14:28 -0700 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2015-05-21 16:14:30 +0530 |
| commit | 470ce99bb5a2962f7a92a19fef9c7a015fc5b6c0 (patch) | |
| tree | 4aba50a21a24bbaaff3e2e39c89a306c4375e03e | |
| parent | 4f6206b1f098ec2d8b4903eee500c246dae7f4d6 (diff) | |
qcacld-2.0: Fix for setband commands which occasionally enable dualband
This is a prima to qcacld-2.0 propagation.
Added a fix to check the INI settings for band
Change-Id: Id933a63633f7b1495318343d6261b3a0af29641e
CRs-Fixed: 368987
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_wext.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c index d831465524c9..48df55433392 100644 --- a/CORE/HDD/src/wlan_hdd_wext.c +++ b/CORE/HDD/src/wlan_hdd_wext.c @@ -9482,6 +9482,14 @@ int hdd_setBand(struct net_device *dev, u8 ui_band) return -EINVAL; } + if ((band == eCSR_BAND_24 && pHddCtx->cfg_ini->nBandCapability == 2) || + (band == eCSR_BAND_5G && pHddCtx->cfg_ini->nBandCapability == 1) || + (band == eCSR_BAND_ALL && pHddCtx->cfg_ini->nBandCapability != 0)) { + hddLog(LOGP, FL("band value %u violate INI settings %u"), + band, pHddCtx->cfg_ini->nBandCapability); + return -EIO; + } + if (eHAL_STATUS_SUCCESS != sme_GetFreqBand(hHal, &currBand)) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, |
