Эх сурвалжийг харах

qcacld-3.0: Fix sme_get_bss_transition_status() signature

The signature for sme_get_bss_transition_status() indicates it returns
an int errno, and that is what the only caller is currently expecting,
but in reality it returns QDF_STATUS. Since SME APIs are generally
expected to return QDF_STATUS, update the signature as well as the
caller to use QDF_STATUS.

Change-Id: I256fac3980ee55c6e797388df1ea7022fd9fe863
CRs-Fixed: 2353529
Jeff Johnson 6 жил өмнө
parent
commit
627372505b

+ 7 - 6
core/hdd/src/wlan_hdd_bss_transition.c

@@ -115,6 +115,7 @@ __wlan_hdd_cfg80211_fetch_bss_transition_status(struct wiphy *wiphy,
 	struct hdd_station_ctx *hdd_sta_ctx =
 	struct hdd_station_ctx *hdd_sta_ctx =
 					WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 					WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 	mac_handle_t mac_handle;
 	mac_handle_t mac_handle;
+	QDF_STATUS status;
 
 
 	const struct nla_policy
 	const struct nla_policy
 	btm_params_policy[QCA_WLAN_VENDOR_ATTR_MAX + 1] = {
 	btm_params_policy[QCA_WLAN_VENDOR_ATTR_MAX + 1] = {
@@ -199,12 +200,12 @@ __wlan_hdd_cfg80211_fetch_bss_transition_status(struct wiphy *wiphy,
 	is_bt_in_progress = wlan_hdd_is_bt_in_progress(hdd_ctx);
 	is_bt_in_progress = wlan_hdd_is_bt_in_progress(hdd_ctx);
 
 
 	mac_handle = hdd_ctx->mac_handle;
 	mac_handle = hdd_ctx->mac_handle;
-	ret = sme_get_bss_transition_status(mac_handle, transition_reason,
-					    &hdd_sta_ctx->conn_info.bssId,
-					    candidate_info,
-					    nof_candidates,
-					    is_bt_in_progress);
-	if (ret)
+	status = sme_get_bss_transition_status(mac_handle, transition_reason,
+					       &hdd_sta_ctx->conn_info.bssId,
+					       candidate_info,
+					       nof_candidates,
+					       is_bt_in_progress);
+	if (QDF_IS_STATUS_ERROR(status))
 		return -EINVAL;
 		return -EINVAL;
 
 
 	/* Prepare the reply and send it to userspace */
 	/* Prepare the reply and send it to userspace */

+ 8 - 8
core/sme/inc/sme_api.h

@@ -2540,14 +2540,14 @@ QDF_STATUS sme_scan_get_result_for_bssid(mac_handle_t mac_handle,
  * @n_candidates : number of candidates
  * @n_candidates : number of candidates
  * @is_bt_in_progress: bt activity indicator
  * @is_bt_in_progress: bt activity indicator
  *
  *
- * Return : 0 on success otherwise errno
- */
-int sme_get_bss_transition_status(mac_handle_t mac_handle,
-				  uint8_t transition_reason,
-				  struct qdf_mac_addr *bssid,
-				  struct bss_candidate_info *info,
-				  uint16_t n_candidates,
-				  bool is_bt_in_progress);
+ * Return: QDF_STATUS_SUCCESS on success otherwise a QDF_STATUS error
+ */
+QDF_STATUS sme_get_bss_transition_status(mac_handle_t mac_handle,
+					 uint8_t transition_reason,
+					 struct qdf_mac_addr *bssid,
+					 struct bss_candidate_info *info,
+					 uint16_t n_candidates,
+					 bool is_bt_in_progress);
 
 
 /**
 /**
  * sme_unpack_rsn_ie: wrapper to unpack RSN IE and update def RSN params
  * sme_unpack_rsn_ie: wrapper to unpack RSN IE and update def RSN params

+ 6 - 17
core/sme/src/common/sme_api.c

@@ -16386,23 +16386,12 @@ static bool sme_get_status_for_candidate(mac_handle_t mac_handle,
 	return false;
 	return false;
 }
 }
 
 
-/**
- * sme_get_bss_transition_status() - get bss transition status all cadidates
- * @mac_context: Opaque handle to the global MAC context
- * @transition_reason: Transition reason
- * @bssid: connected BSSID
- * @info: bss candidate information
- * @n_candidates: number of candidates
- * @is_bt_in_progress: bt activity indicator
- *
- * Return: 0 on success otherwise errno
- */
-int sme_get_bss_transition_status(mac_handle_t mac_handle,
-				  uint8_t transition_reason,
-				  struct qdf_mac_addr *bssid,
-				  struct bss_candidate_info *info,
-				  uint16_t n_candidates,
-				  bool is_bt_in_progress)
+QDF_STATUS sme_get_bss_transition_status(mac_handle_t mac_handle,
+					 uint8_t transition_reason,
+					 struct qdf_mac_addr *bssid,
+					 struct bss_candidate_info *info,
+					 uint16_t n_candidates,
+					 bool is_bt_in_progress)
 {
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tSirBssDescription *bss_desc, *conn_bss_desc;
 	tSirBssDescription *bss_desc, *conn_bss_desc;