فهرست منبع

qcacld-3.0: Use link info to get if VDEV is connecting state

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

Change-Id: If24273873b2b20e9dc63ce4b912c95a873ec7675
CRs-Fixed: 3464297
Vinod Kumar Pirla 2 سال پیش
والد
کامیت
581d7afc7c

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

@@ -552,7 +552,7 @@ struct hdd_adapter *hdd_get_sta_connection_in_progress(
 		if ((QDF_STA_MODE == adapter->device_mode) ||
 		    (QDF_P2P_CLIENT_MODE == adapter->device_mode) ||
 		    (QDF_P2P_DEVICE_MODE == adapter->device_mode)) {
-			if (hdd_cm_is_connecting(adapter)) {
+			if (hdd_cm_is_connecting(adapter->deflink)) {
 				hdd_debug("vdev_id %d: Connection is in progress",
 					  adapter->deflink->vdev_id);
 				hdd_adapter_dev_put_debug(adapter, dbgid);

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

@@ -344,11 +344,11 @@ bool hdd_cm_is_vdev_connected(struct wlan_hdd_link_info *link_info);
 
 /**
  * hdd_cm_is_connecting() - Function to check connection in progress
- * @adapter: pointer to the adapter structure
+ * @link_info: pointer to the link_info structure
  *
  * Return: true if connecting, false otherwise
  */
-bool hdd_cm_is_connecting(struct hdd_adapter *adapter);
+bool hdd_cm_is_connecting(struct wlan_hdd_link_info *link_info);
 
 /**
  * hdd_cm_is_disconnected() - Function to check if vdev is disconnected or not

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

@@ -111,13 +111,13 @@ bool hdd_cm_is_vdev_connected(struct wlan_hdd_link_info *link_info)
 	return is_vdev_connected;
 }
 
-bool hdd_cm_is_connecting(struct hdd_adapter *adapter)
+bool hdd_cm_is_connecting(struct wlan_hdd_link_info *link_info)
 {
 	struct wlan_objmgr_vdev *vdev;
 	bool is_vdev_connecting;
 	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_hostapd.c

@@ -3354,7 +3354,7 @@ bool hdd_is_any_sta_connecting(struct hdd_context *hdd_ctx)
 		sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter->deflink);
 		if ((adapter->device_mode == QDF_STA_MODE) ||
 		    (adapter->device_mode == QDF_P2P_CLIENT_MODE)) {
-			if (hdd_cm_is_connecting(adapter)) {
+			if (hdd_cm_is_connecting(adapter->deflink)) {
 				hdd_debug("vdev_id %d: connecting",
 					  adapter->deflink->vdev_id);
 				hdd_adapter_dev_put_debug(adapter, dbgid);

+ 4 - 4
core/hdd/src/wlan_hdd_main.c

@@ -19766,10 +19766,10 @@ static QDF_STATUS hdd_is_connection_in_progress_iterator(
 	     adapter->device_mode == QDF_SAP_MODE))
 		return QDF_STATUS_SUCCESS;
 
-	if (((QDF_STA_MODE == adapter->device_mode)
-		|| (QDF_P2P_CLIENT_MODE == adapter->device_mode)
-		|| (QDF_P2P_DEVICE_MODE == adapter->device_mode))
-		&& hdd_cm_is_connecting(adapter)) {
+	if ((QDF_STA_MODE == adapter->device_mode ||
+	     QDF_P2P_CLIENT_MODE == adapter->device_mode ||
+	     QDF_P2P_DEVICE_MODE == adapter->device_mode) &&
+	    hdd_cm_is_connecting(adapter->deflink)) {
 		hdd_debug("%pK(%d) mode %d Connection is in progress",
 			  WLAN_HDD_GET_STATION_CTX_PTR(adapter->deflink),
 			  adapter->deflink->vdev_id, adapter->device_mode);

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

@@ -143,7 +143,7 @@ static bool hdd_is_ndp_allowed(struct hdd_context *hdd_ctx)
 			sta_ctx =
 				WLAN_HDD_GET_STATION_CTX_PTR(adapter->deflink);
 			if (hdd_cm_is_vdev_associated(adapter->deflink) ||
-			    hdd_cm_is_connecting(adapter)) {
+			    hdd_cm_is_connecting(adapter->deflink)) {
 				hdd_adapter_dev_put_debug(adapter, dbgid);
 				if (next_adapter)
 					hdd_adapter_dev_put_debug(next_adapter,
@@ -184,7 +184,7 @@ static bool hdd_is_ndp_allowed(struct hdd_context *hdd_ctx)
 			sta_ctx =
 				WLAN_HDD_GET_STATION_CTX_PTR(adapter->deflink);
 			if (hdd_cm_is_vdev_associated(adapter->deflink) ||
-			    hdd_cm_is_connecting(adapter)) {
+			    hdd_cm_is_connecting(adapter->deflink)) {
 				hdd_adapter_dev_put_debug(adapter, dbgid);
 				if (next_adapter)
 					hdd_adapter_dev_put_debug(next_adapter,

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

@@ -891,7 +891,7 @@ bool hdd_get_interface_info(struct hdd_adapter *adapter,
 		if (hdd_cm_is_disconnected(adapter)) {
 			info->state = WIFI_DISCONNECTED;
 		}
-		if (hdd_cm_is_connecting(adapter)) {
+		if (hdd_cm_is_connecting(adapter->deflink)) {
 			hdd_debug("Session ID %d, Connection is in progress",
 				  adapter->deflink->vdev_id);
 			info->state = WIFI_ASSOCIATING;