summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanumantha Reddy Pothula <c_hpothu@qti.qualcomm.com>2015-05-20 14:37:02 -0700
committerAnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com>2015-05-21 16:14:30 +0530
commitcd261f0d42885ff26736d5fb850aca3cb068b886 (patch)
tree7c3ab2e614ca7b57ef6931f4e57cba57d774a3e0
parentdc5e3214d41166cc5d4c71fbb4d8166add15ff1b (diff)
qcacld-2.0: Abort existing scan before starting DHCP phase
This is a prima to qcacld-2.0 propagation. In case of BT coex, WLAN connection is taking longer time, because of ongoing scan during DHCP phase. Abort ongoing scan before sending DHCP START event to firmware. Change-Id: Iedd55df6473d78172c8d62540c128a71dda00f52 CRs-Fixed: 720672
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h2
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c2
-rwxr-xr-xCORE/HDD/src/wlan_hdd_main.c25
3 files changed, 27 insertions, 2 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 22c703827bf9..bbe21a8c8fd8 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -1683,6 +1683,8 @@ hdd_adapter_t *hdd_get_con_sap_adapter(hdd_adapter_t *this_sap_adapter,
boolean hdd_is_5g_supported(hdd_context_t * pHddCtx);
+int wlan_hdd_scan_abort(hdd_adapter_t *pAdapter);
+
#ifdef FEATURE_GREEN_AP
void hdd_wlan_green_ap_mc(hdd_context_t *pHddCtx,
hdd_green_ap_event_t event);
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 7430811e1c3f..80d739d38507 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -16590,7 +16590,7 @@ wlan_hdd_cfg80211_update_ft_ies(struct wiphy *wiphy,
#endif
#ifdef FEATURE_WLAN_SCAN_PNO
-static int wlan_hdd_scan_abort(hdd_adapter_t *pAdapter)
+int wlan_hdd_scan_abort(hdd_adapter_t *pAdapter)
{
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
hdd_scaninfo_t *pScanInfo = NULL;
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index aa7b022f2d32..2d890cdac1ed 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -5695,10 +5695,33 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
"%s: Received Command to change okc mode = %d", __func__, okcMode);
-
pHddCtx->cfg_ini->isOkcIniFeatureEnabled = okcMode;
}
#endif /* FEATURE_WLAN_OKC */
+ else if (strncmp(command, "BTCOEXMODE", 10) == 0 )
+ {
+ char *bcMode;
+ int ret;
+
+ bcMode = command + 11;
+ if ('1' == *bcMode)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_DEBUG,
+ FL("BTCOEXMODE %d"), *bcMode);
+ pHddCtx->btCoexModeSet = TRUE;
+ ret = wlan_hdd_scan_abort(pAdapter);
+ if (ret < 0) {
+ hddLog(LOGE,
+ FL("Failed to abort existing scan status:%d"), ret);
+ }
+ }
+ else if ('2' == *bcMode)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_DEBUG,
+ FL("BTCOEXMODE %d"), *bcMode);
+ pHddCtx->btCoexModeSet = FALSE;
+ }
+ }
else if (strncmp(priv_data.buf, "GETROAMSCANCONTROL", 18) == 0)
{
tANI_BOOLEAN roamScanControl = sme_GetRoamScanControl(pHddCtx->hHal);