Fix multiple acquires for the same mutex lock and data stall.
Device hangs due to multiple lock acquire for the same mutex when
the discovery request is sent on a peer add to the PPL.
Remove the discovery request transmission when a peer is added to
the PPL.
Do not wait for the Discover Request transmission event as it
blocks the discover timer callback for every attempt.
CRs-Fixed: 457130
Change-Id: I21131d90ae5a7c266da489ed5a26cfa0678a638e
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 2754078..8525809 100755
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -6746,9 +6746,6 @@
status = sme_SendTdlsMgmtFrame(WLAN_HDD_GET_HAL_CTX(pAdapter), pAdapter->sessionId,
peerMac, action_code, dialog_token, status_code, (tANI_U8 *)buf, len, responder);
- status = wait_for_completion_interruptible_timeout(&pAdapter->tdls_add_station_comp,
- msecs_to_jiffies(WAIT_TIME_TDLS_MGMT));
-
if (VOS_STATUS_SUCCESS != status)
{
if(ret == 0 && /* if failure, don't need to set the progress bit */
@@ -6760,15 +6757,22 @@
return -EPERM;
}
- if (TRUE != pAdapter->mgmtTxCompletionStatus)
+ /* not block discovery request, as it is called from timer callback */
+ if (SIR_MAC_TDLS_DIS_REQ != action_code)
{
- if(ret == 0 && /* if failure, don't need to set the progress bit */
- (WLAN_IS_TDLS_SETUP_ACTION(action_code)))
- wlan_hdd_tdls_set_connection_progress(peer, FALSE);
+ status = wait_for_completion_interruptible_timeout(&pAdapter->tdls_mgmt_comp,
+ msecs_to_jiffies(WAIT_TIME_TDLS_MGMT));
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Mgmt Tx Completion failed!", __func__);
- return -EPERM;
+ if ((VOS_STATUS_SUCCESS != status) || (TRUE != pAdapter->mgmtTxCompletionStatus))
+ {
+ if(ret == 0 && /* if failure, don't need to set the progress bit */
+ (WLAN_IS_TDLS_SETUP_ACTION(action_code)))
+ wlan_hdd_tdls_set_connection_progress(peer, FALSE);
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: Mgmt Tx Completion failed!", __func__);
+ return -EPERM;
+ }
}
if (ret)