Browse Source

qcacld-3.0: Use link info to get VDEV's roaming status

Modify hdd_cm_is_vdev_roaming() API to take link_info
as functional argument to retrieve whether the
corresponding VDEV is in roaming state or not.
Existing callers moved to deflink.

Change-Id: I0efee888a1d886e04817c9870db95be2a95d8e54
CRs-Fixed: 3464349
Vinod Kumar Pirla 2 years ago
parent
commit
6c4913dc46

+ 1 - 1
core/hdd/src/wlan_hdd_assoc.c

@@ -434,7 +434,7 @@ static void hdd_start_powersave_timer_on_associated(struct hdd_adapter *adapter)
 		return;
 	ucfg_mlme_get_auto_bmps_timer_value(hdd_ctx->psoc,
 					    &auto_bmps_timer_val);
-	timeout = hdd_cm_is_vdev_roaming(adapter) ?
+	timeout = hdd_cm_is_vdev_roaming(adapter->deflink) ?
 		AUTO_PS_ENTRY_TIMER_DEFAULT_VALUE :
 		(auto_bmps_timer_val * 1000);
 	sme_ps_enable_auto_ps_timer(hdd_ctx->mac_handle,

+ 2 - 2
core/hdd/src/wlan_hdd_cm_api.h

@@ -360,11 +360,11 @@ bool hdd_cm_is_disconnected(struct wlan_hdd_link_info *link_info);
 
 /**
  * hdd_cm_is_vdev_roaming() - Function to check roaming in progress
- * @adapter: pointer to the adapter structure
+ * @link_info: pointer to the link_info structure
  *
  * Return: true if roaming, false otherwise
  */
-bool hdd_cm_is_vdev_roaming(struct hdd_adapter *adapter);
+bool hdd_cm_is_vdev_roaming(struct wlan_hdd_link_info *link_info);
 
 /**
  * hdd_cm_get_scan_ie_params() - to get scan ie params

+ 2 - 2
core/hdd/src/wlan_hdd_cm_connect.c

@@ -155,13 +155,13 @@ bool hdd_cm_is_disconnected(struct wlan_hdd_link_info *link_info)
 	return is_vdev_disconnected;
 }
 
-bool hdd_cm_is_vdev_roaming(struct hdd_adapter *adapter)
+bool hdd_cm_is_vdev_roaming(struct wlan_hdd_link_info *link_info)
 {
 	struct wlan_objmgr_vdev *vdev;
 	bool is_vdev_roaming;
 	enum QDF_OPMODE opmode;
 
-	vdev = hdd_objmgr_get_vdev_by_user(adapter->deflink, WLAN_OSIF_CM_ID);
+	vdev = hdd_objmgr_get_vdev_by_user(link_info, WLAN_OSIF_CM_ID);
 	if (!vdev)
 		return false;
 

+ 1 - 1
core/hdd/src/wlan_hdd_power.c

@@ -3290,7 +3290,7 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
 	switch (adapter->device_mode) {
 	case QDF_STA_MODE:
 	case QDF_P2P_CLIENT_MODE:
-		if (hdd_cm_is_vdev_roaming(adapter)) {
+		if (hdd_cm_is_vdev_roaming(adapter->deflink)) {
 			hdd_debug("Roaming is in progress, rej this req");
 			return -EINVAL;
 		}

+ 6 - 6
core/hdd/src/wlan_hdd_stats.c

@@ -2404,7 +2404,7 @@ int wlan_hdd_ll_stats_get(struct hdd_adapter *adapter, uint32_t req_id,
 		return -EPERM;
 	}
 
-	if (hdd_cm_is_vdev_roaming(adapter)) {
+	if (hdd_cm_is_vdev_roaming(adapter->deflink)) {
 		hdd_err("Roaming in progress, cannot process the request");
 		return -EBUSY;
 	}
@@ -2469,7 +2469,7 @@ __wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy,
 		return -EINVAL;
 	}
 
-	if (hdd_cm_is_vdev_roaming(adapter)) {
+	if (hdd_cm_is_vdev_roaming(adapter->deflink)) {
 		hdd_err("Roaming in progress, cannot process the request");
 		return -EBUSY;
 	}
@@ -6541,7 +6541,7 @@ static int wlan_hdd_get_sta_stats(struct hdd_adapter *adapter,
 		return 0;
 	}
 
-	if (hdd_cm_is_vdev_roaming(adapter)) {
+	if (hdd_cm_is_vdev_roaming(adapter->deflink)) {
 		hdd_debug("Roaming is in progress, cannot continue with this request");
 		/*
 		 * supplicant reports very low rssi to upper layer
@@ -7034,7 +7034,7 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
 	if (!ucfg_scan_is_snr_monitor_enabled(hdd_ctx->psoc))
 		return -ENONET;
 
-	if (hdd_cm_is_vdev_roaming(adapter)) {
+	if (hdd_cm_is_vdev_roaming(adapter->deflink)) {
 		hdd_debug("Roaming in progress, hence return");
 		return -ENONET;
 	}
@@ -7127,7 +7127,7 @@ static bool hdd_is_rcpi_applicable(struct hdd_adapter *adapter,
 		if (!hdd_cm_is_vdev_associated(adapter->deflink))
 			return false;
 
-		if (hdd_cm_is_vdev_roaming(adapter)) {
+		if (hdd_cm_is_vdev_roaming(adapter->deflink)) {
 			/* return the cached rcpi, if mac addr matches */
 			hdd_debug("Roaming in progress, return cached RCPI");
 			if (!qdf_mem_cmp(&adapter->rcpi.mac_addr,
@@ -7384,7 +7384,7 @@ QDF_STATUS wlan_hdd_get_rssi(struct hdd_adapter *adapter, int8_t *rssi_value)
 		return QDF_STATUS_SUCCESS;
 	}
 
-	if (hdd_cm_is_vdev_roaming(adapter)) {
+	if (hdd_cm_is_vdev_roaming(adapter->deflink)) {
 		hdd_debug("Roaming in progress, return cached RSSI");
 		*rssi_value = adapter->deflink->rssi;
 		return QDF_STATUS_SUCCESS;

+ 1 - 1
core/hdd/src/wlan_hdd_sysfs_connect_info.c

@@ -334,7 +334,7 @@ static ssize_t wlan_hdd_connect_info(struct hdd_adapter *adapter, uint8_t *buf,
 		return buf_avail_len;
 	}
 
-	if (hdd_cm_is_vdev_roaming(adapter)) {
+	if (hdd_cm_is_vdev_roaming(adapter->deflink)) {
 		ret_val = scnprintf(buf + length, buf_avail_len - length,
 				    "Roaming is in progress");
 		if (ret_val <= 0)