فهرست منبع

qcacld-3.0: Decrement TDLS state count while association in LFR

In LFR, wlan_hdd_tdls_notify_disconnect() will decrement TDLS
state count and increment it again. Thus, while associating
with new BSS, the TDLS connection does not happen.

Fix is not to increment TDLS state count again while association
occurs in LFR.

Change-Id: I219252265f1fecea09e9e3383209d2328102cde1
CRs-Fixed: 1111816
Nitesh Shah 8 سال پیش
والد
کامیت
b9d3dbb4ab
3فایلهای تغییر یافته به همراه10 افزوده شده و 7 حذف شده
  1. 5 3
      core/hdd/inc/wlan_hdd_tdls.h
  2. 2 2
      core/hdd/src/wlan_hdd_assoc.c
  3. 3 2
      core/hdd/src/wlan_hdd_tdls.c

+ 5 - 3
core/hdd/inc/wlan_hdd_tdls.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -741,6 +741,7 @@ void wlan_hdd_tdls_notify_connect(hdd_adapter_t *adapter,
  * wlan_hdd_tdls_notify_disconnect() - Update tdls state for every
  * disconnect event.
  * @adapter: hdd adapter
+ * @lfr_roam: roaming case
  *
  * After every disconnect event in the system, check whether TDLS
  * can be disabled/enabled in the system and update the
@@ -748,7 +749,7 @@ void wlan_hdd_tdls_notify_connect(hdd_adapter_t *adapter,
  *
  * Return: None
  */
-void wlan_hdd_tdls_notify_disconnect(hdd_adapter_t *adapter);
+void wlan_hdd_tdls_notify_disconnect(hdd_adapter_t *adapter, bool lfr_roam);
 void wlan_hdd_change_tdls_mode(void *hdd_ctx);
 void hdd_restart_tdls_source_timer(hdd_context_t *pHddCtx,
 				      eTDLSSupportMode tdls_mode);
@@ -805,7 +806,8 @@ static inline void wlan_hdd_tdls_notify_connect(hdd_adapter_t *adapter,
 				  tCsrRoamInfo *csr_roam_info)
 {
 }
-static inline void wlan_hdd_tdls_notify_disconnect(hdd_adapter_t *adapter)
+static inline void wlan_hdd_tdls_notify_disconnect(hdd_adapter_t *adapter,
+						   bool lfr_roam)
 {
 }
 

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

@@ -1203,7 +1203,7 @@ static void hdd_send_association_event(struct net_device *dev,
 			/* change logging before release */
 			hdd_info("LFR3:hdd_send_association_event");
 			/* Update tdls module about the disconnection event */
-			wlan_hdd_tdls_notify_disconnect(pAdapter);
+			wlan_hdd_tdls_notify_disconnect(pAdapter, true);
 		}
 #endif
 	if (eConnectionState_Associated == pHddStaCtx->conn_info.connState) {
@@ -1351,7 +1351,7 @@ static void hdd_send_association_event(struct net_device *dev,
 
 		hdd_lpass_notify_disconnect(pAdapter);
 		/* Update tdls module about the disconnection event */
-		wlan_hdd_tdls_notify_disconnect(pAdapter);
+		wlan_hdd_tdls_notify_disconnect(pAdapter, false);
 
 #ifdef MSM_PLATFORM
 		/* stop timer in sta/p2p_cli */

+ 3 - 2
core/hdd/src/wlan_hdd_tdls.c

@@ -2038,6 +2038,7 @@ void wlan_hdd_tdls_notify_connect(hdd_adapter_t *adapter,
  * wlan_hdd_tdls_notify_disconnect() - Update tdls state for every
  * disconnect event.
  * @adapter: hdd adapter
+ * @lfr_roam: roaming case
  *
  * After every disconnect event in the system, check whether TDLS
  * can be disabled/enabled in the system and update the
@@ -2045,7 +2046,7 @@ void wlan_hdd_tdls_notify_connect(hdd_adapter_t *adapter,
  *
  * Return: None
  */
-void wlan_hdd_tdls_notify_disconnect(hdd_adapter_t *adapter)
+void wlan_hdd_tdls_notify_disconnect(hdd_adapter_t *adapter, bool lfr_roam)
 {
 	hdd_adapter_t *temp_adapter;
 	hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
@@ -2063,7 +2064,7 @@ void wlan_hdd_tdls_notify_disconnect(hdd_adapter_t *adapter)
 	 * check, whether TDLS could be enabled in the
 	 * system after this disassoc event.
 	 */
-	if (!hdd_ctx->concurrency_marked) {
+	if (!lfr_roam && !hdd_ctx->concurrency_marked) {
 		temp_adapter = wlan_hdd_tdls_get_adapter(
 					hdd_ctx);
 		if (NULL != temp_adapter)