Explorar o código

qcacld-3.0: Defer connect request when roaming is in progress

Consider STA+STA case where roaming is enabled on one sta.
There is a case where STA1 is roaming to a bssid and there is a
connect request for same bssid on STA2. Here the firwmare would
have already created peer for STA1 peer and STA2 peer creation
would have failed. But at host, since there is no response for
peer creation, the peer would be created for STA2 vdev.
When roam synch indication is received, then peer create fails
at host for the roaming vdev due to duplicate peer detection
logic. Still roam synch confirm is sent to the firmware.
When disconnection is received for STA1, then del bss is sent
for this vdev and firmware asserts as the peer was not created
for this STA2 vdev.

Defer the connect request processing and return failure when
roaming is in progress.

Change-Id: I0892dc567cd17e335b1de3cd5260050f2c1e6b44
CRs-Fixed: 2538389
Pragaspathi Thilagaraj %!s(int64=5) %!d(string=hai) anos
pai
achega
76d0e25a07
Modificáronse 1 ficheiros con 19 adicións e 0 borrados
  1. 19 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 19 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -20278,6 +20278,25 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
 		return -EINVAL;
 	}
 
+	/*
+	 * In STA + STA roaming scenario, connection to same ssid but different
+	 * bssid is allowed on both vdevs. So there could be a race where the
+	 * STA1 connectes to a bssid when roaming is in progress on STA2 for
+	 * the same bssid. Here the firwmare would have already created peer for
+	 * the roam candidate and host would have created peer on the other
+	 * vdev. When roam synch indication is received, then peer create fails
+	 * at host for the roaming vdev due to duplicate peer detection logic.
+	 * Still roam synch confirm is sent to the firmware.
+	 * When disconnection is received for STA1, then del bss is sent for
+	 * this vdev and firmware asserts as the peer was not created for this
+	 * vdev.
+	 */
+	if (hdd_is_roaming_in_progress(hdd_ctx) ||
+	    sme_is_any_session_in_middle_of_roaming(hdd_ctx->mac_handle)) {
+		hdd_err("Roaming in progress. Defer connect");
+		return -EBUSY;
+	}
+
 	/*
 	 * Check if this is reassoc to same bssid, if reassoc is success, return
 	 */