wlan: SoftAP AutoChannel select scan fix and country code update fix
It fixes bug of auto channel select scan failing in softAP Mode and also
solves the issue of country code update in channel select range so as to
enable correct validation of channel range.
Change-Id: Ic186270c2b24fa4b44c9bd5d7995ef2502c667b5
CR-Fixed: 364693
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 1369616..4385475 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -2763,8 +2763,6 @@
hddLog(LOGE, "Could not pass on WNI_CFG_ENABLE_PHY_AGC_LISTEN_MODE to CCM\n");
}
- WLANSAP_SetChannelRange(pHddCtx->hHal, pConfig->apStartChannelNum, pConfig->apEndChannelNum, pConfig->apOperatingBand);
-
if (ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_AP_KEEP_ALIVE_TIMEOUT, pConfig->apKeepAlivePeriod,
NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE)
{
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 098d039..97e1acc 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -1302,6 +1302,15 @@
return -EINVAL;
}
}
+ /*
+ *Validate the given channel range for
+ * for given country code
+ */
+ else
+ {
+ hdd_config_t *hdd_pConfig= (WLAN_HDD_GET_CTX(pHostapdAdapter))->cfg_ini;
+ WLANSAP_SetChannelRange(hHal,hdd_pConfig->apStartChannelNum,hdd_pConfig->apEndChannelNum,hdd_pConfig->apOperatingBand);
+ }
}
else
{
diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c
index 9e1bf83..8bd3be0 100644
--- a/CORE/SME/src/csr/csrApiScan.c
+++ b/CORE/SME/src/csr/csrApiScan.c
@@ -4346,6 +4346,11 @@
break;
case eCsrScanGetScanChnInfo:
pScanChnInfo = (tSmeGetScanChnRsp *)pMsgBuf;
+ /*
+ * status code not available in tSmeGetScanChnRsp, so
+ * by default considereing it to be success
+ */
+ scanStatus = eSIR_SME_SUCCESS;
csrScanAgeResults(pMac, pScanChnInfo);
break;
case eCsrScanForCapsChange: