wlan: If set firmware roaming fails return non-positive value
qcacld-2.0 to pronto propagation
If isFastRoamIniFeatureEnabled is 0 and sme_ConfigFwrRoaming api
is called it 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_ConfigFwrRoaming returns falure,
return -EINVAL.
Change-Id: I1de5276f9fc72b04725f963e44e6168bc119f559
CRs-Fixed: 1029834
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 5a26d67..fe52edd 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -6116,8 +6116,13 @@
//Update roaming
status = sme_ConfigFwrRoaming((tHalHandle)(pHddCtx->hHal), isFwrRoamEnabled);
+ if (!HAL_STATUS_SUCCESS(status)) {
+ hddLog(LOGE,
+ FL("sme_ConfigFwrRoaming failed (err=%d)"), status);
+ return -EINVAL;
+ }
EXIT();
- return status;
+ return 0;
}
static int wlan_hdd_cfg80211_firmware_roaming(struct wiphy *wiphy,