Procházet zdrojové kódy

qcacld-3.0: Fix TDLS connection problem in concurrency cases

TDLS conection is not happening consistently when the system
goes in and out of sta/p2p concurrency. TDLS set mode source
bit map is not cleared correctly in concurrency situation and
it causes connection problem.
Clear the TDLS set mode source bit map correctly in concurrency
cases.

Change-Id: Ided72067e194794f45382c2c3ba32343a3ab2e59
CRs-Fixed: 1116900
Kabilan Kannan před 8 roky
rodič
revize
3a5b9fc7cc
1 změnil soubory, kde provedl 11 přidání a 9 odebrání
  1. 11 9
      core/hdd/src/wlan_hdd_tdls.c

+ 11 - 9
core/hdd/src/wlan_hdd_tdls.c

@@ -1613,22 +1613,24 @@ static void wlan_hdd_tdls_set_mode(hdd_context_t *pHddCtx,
 		mutex_unlock(&pHddCtx->tdls_lock);
 		hdd_notice("already in mode %d", (int)tdls_mode);
 
+		switch (tdls_mode) {
+		/* TDLS is already enabled hence clear source mask, return */
+		case eTDLS_SUPPORT_ENABLED:
+		case eTDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY:
+		case eTDLS_SUPPORT_EXTERNAL_CONTROL:
+			clear_bit((unsigned long)source,
+				  &pHddCtx->tdls_source_bitmap);
+			hdd_notice("clear source mask:%d", source);
+			return;
 		/* TDLS is already disabled hence set source mask, return */
-		if (eTDLS_SUPPORT_DISABLED == tdls_mode) {
+		case eTDLS_SUPPORT_DISABLED:
 			set_bit((unsigned long)source,
 				&pHddCtx->tdls_source_bitmap);
 			hdd_notice("set source mask:%d", source);
 			return;
-		}
-
-		/* TDLS is already enabled hence clear source mask, return */
-		if (eTDLS_SUPPORT_ENABLED == tdls_mode) {
-			clear_bit((unsigned long)source,
-				  &pHddCtx->tdls_source_bitmap);
-			hdd_notice("clear source mask:%d", source);
+		default:
 			return;
 		}
-		return;
 	}
 
 	status = hdd_get_front_adapter(pHddCtx, &pAdapterNode);