Forráskód Böngészése

qcacld-3.0: Fix wait for disconnect during connect req

Even when vdev is in disconnected state, during connect it tries
to wait for disconnect which lead to 1 sec delay in connect.

So call wait for disconnect only if vdev is not already disconnected.

Change-Id: Ib7a9b4628b0e10f71bdebe4b74a70d648825d9d3
CRs-Fixed: 2609462
Abhishek Singh 5 éve
szülő
commit
30769a34c3
1 módosított fájl, 6 hozzáadás és 1 törlés
  1. 6 1
      core/hdd/src/wlan_hdd_cfg80211.c

+ 6 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -19886,6 +19886,11 @@ static int wlan_hdd_wait_for_disconnect(mac_handle_t mac_handle,
 	unsigned long rc;
 	uint32_t wait_time = SME_DISCONNECT_TIMEOUT;
 
+	/* Return if already disconnected */
+	if (sta_ctx->conn_info.conn_state == eConnectionState_NotConnected ||
+	    sta_ctx->conn_info.conn_state == eConnectionState_IbssDisconnected)
+		return 0;
+
 	/* If already in disconnecting state just wait for its completion */
 	if (sta_ctx->conn_info.conn_state == eConnectionState_Disconnecting)
 		goto wait_for_disconnect;
@@ -19936,7 +19941,7 @@ static void wlan_hdd_wait_for_roaming(mac_handle_t mac_handle,
 	struct hdd_context *hdd_ctx;
 	unsigned long rc;
 
-	if (adapter->device_mode !=  QDF_STA_MODE)
+	if (adapter->device_mode != QDF_STA_MODE)
 		return;
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);