From 0f3e0fff3925366ef9f26ec97e96e18ceb0edab3 Mon Sep 17 00:00:00 2001 From: "Selvaraj, Sridhar" Date: Thu, 12 Jan 2017 20:19:27 +0530 Subject: qcacld-3.0: Return error status to user space if set fast roam fails Currently, when the set fast roam from user space fails in HDD, host driver is not returning failure status. This causes timeout in user space awaiting more data from driver eventually leading to supplicant driver connection loss and wifi disabling and re-enabling. Return failure status when the set fast roam command fails in HDD. Change-Id: Id53d9fe0a2fb18fc4da4f174f6f031350dc20af2 CRs-Fixed: 1111083 --- core/hdd/src/wlan_hdd_cfg80211.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 8697a988461f..c16547cfbae2 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -8319,6 +8319,7 @@ static int __wlan_hdd_cfg80211_set_fast_roaming(struct wiphy *wiphy, struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_MAX + 1]; uint32_t is_fast_roam_enabled; int ret; + QDF_STATUS qdf_status; ENTER_DEV(dev); @@ -8355,11 +8356,14 @@ static int __wlan_hdd_cfg80211_set_fast_roaming(struct wiphy *wiphy, return -EINVAL; } /* Update roaming */ - ret = sme_config_fast_roaming(hdd_ctx->hHal, adapter->sessionId, + qdf_status = sme_config_fast_roaming(hdd_ctx->hHal, adapter->sessionId, (is_fast_roam_enabled && adapter->fast_roaming_allowed)); - if (ret) - hdd_err("sme_config_fast_roaming failed"); + if (qdf_status != QDF_STATUS_SUCCESS) + hdd_err("sme_config_fast_roaming failed with status=%d", + qdf_status); + ret = qdf_status_to_os_return(qdf_status); + EXIT(); return ret; } -- cgit v1.2.3