From 3cc2c0a86dbe97f7e32f55777965b2d754c034cc Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Thu, 16 Jun 2016 16:49:11 +0530 Subject: qcacld-2.0: If set roaming fails return non-positive value If set roaming disabled is called when roaming is already in progress the sme_config_fast_roaming api returns failure status and this status, which is positive value, is returned to upper layer. This results in wpa_supplicant to wait indefinitely. To avoid this if sme_config_fast_roaming returns falure, return -EINVAL. Change-Id: I1de5276f9fc72b04725f963e44e6168bc119f559 CRs-Fixed: 1029834 --- CORE/HDD/src/wlan_hdd_cfg80211.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 98bb836c6bfb..ebdcf9cc824e 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -11031,6 +11031,7 @@ static int __wlan_hdd_cfg80211_fast_roaming(struct wiphy *wiphy, hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev); struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_MAX + 1]; uint32_t is_fast_roam_enabled; + eHalStatus status; int ret; ENTER(); @@ -11062,12 +11063,15 @@ static int __wlan_hdd_cfg80211_fast_roaming(struct wiphy *wiphy, hddLog(LOG1, FL("isFastRoamEnabled %d"), is_fast_roam_enabled); /* Update roaming */ - ret = sme_config_fast_roaming(hdd_ctx->hHal, adapter->sessionId, + status = sme_config_fast_roaming(hdd_ctx->hHal, adapter->sessionId, is_fast_roam_enabled); - if (ret) - hddLog(LOGE, FL("sme_config_fast_roaming failed")); + if (!HAL_STATUS_SUCCESS(status)) { + hddLog(LOGE, + FL("sme_config_fast_roaming (err=%d)"), status); + return -EINVAL; + } EXIT(); - return ret; + return 0; } /** -- cgit v1.2.3