Bladeren bron

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
Selvaraj, Sridhar 8 jaren geleden
bovenliggende
commit
d753e7cfe7
1 gewijzigde bestanden met toevoegingen van 7 en 3 verwijderingen
  1. 7 3
      core/hdd/src/wlan_hdd_cfg80211.c

+ 7 - 3
core/hdd/src/wlan_hdd_cfg80211.c

@@ -8293,6 +8293,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);
 
@@ -8329,11 +8330,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;
 }