diff options
| author | Padma, Santhosh Kumar <skpadma@codeaurora.org> | 2016-10-20 13:22:39 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-11-01 15:05:08 +0530 |
| commit | 6556299b7eb41ca2649ca5935fd8d6f450dae5da (patch) | |
| tree | 196848db2da39abe7c5ad4f8ac1f9c55c56972a4 | |
| parent | 1d87153d25d76a58fae6cb269c13df159fa5a9ce (diff) | |
qcacld-2.0: Update EBUSY to framework if driver roaming is in progress
Android WiFi roaming can be initiated by either the framework or
firmware without notifying each other. Roaming can be started by both
framework and firmware at the same or very close time, which makes them
step on each other's toes.
Add following change to achieve this.
1. If framework sends disable roam, driver to return wait indication
conveyed through EBUSY to framework if roaming is in progress.
This can help framework to defer out-network roaming. Otherwise
disable roaming.
Change-Id: I98ea50f733e9515702d0bab0e7e77563f47a7f55
CRs-Fixed: 1080765
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 6de81de93677..cf0bf6434197 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -11553,6 +11553,7 @@ static int __wlan_hdd_cfg80211_fast_roaming(struct wiphy *wiphy, uint32_t is_fast_roam_enabled; eHalStatus status; int ret; + hdd_station_ctx_t *hddstactx; ENTER(); @@ -11582,6 +11583,26 @@ static int __wlan_hdd_cfg80211_fast_roaming(struct wiphy *wiphy, tb[QCA_WLAN_VENDOR_ATTR_ROAMING_POLICY]); hddLog(LOG1, FL("isFastRoamEnabled %d"), is_fast_roam_enabled); + /* + * If framework sends pause_roam, host to send WAIT indication to + * framework if roaming is in progress. This can help framework to + * defer out-network roaming. EBUSY is used to convey wait indication. + */ + if (!is_fast_roam_enabled) { + if (sme_staInMiddleOfRoaming(hdd_ctx->hHal, + adapter->sessionId)) { + hddLog(LOG1, FL("Roaming in progress, do not allow disable")); + return -EBUSY; + } + + hddstactx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + if (hddstactx->hdd_ReassocScenario) { + hddLog(LOG1, + FL("Roaming in progress, so unable to disable roaming")); + return -EBUSY; + } + } + /* Update roaming */ status = sme_config_fast_roaming(hdd_ctx->hHal, adapter->sessionId, is_fast_roam_enabled); @@ -11590,6 +11611,7 @@ static int __wlan_hdd_cfg80211_fast_roaming(struct wiphy *wiphy, FL("sme_config_fast_roaming (err=%d)"), status); return -EINVAL; } + EXIT(); return 0; } @@ -18752,7 +18774,6 @@ int wlan_hdd_cfg80211_connect_start( hdd_adapter_t *pAdapter, vos_mem_copy((void *)(pRoamProfile->SSIDs.SSIDList->SSID.ssId), ssid, ssid_len); - pRoamProfile->do_not_roam = false; if (bssid) { pRoamProfile->BSSIDs.numOfBSSIDs = 1; |
