From b6153b1bcb08881c4ea20c7b45036d9a842096a9 Mon Sep 17 00:00:00 2001 From: Kabilan Kannan Date: Thu, 13 Jul 2017 17:54:02 -0700 Subject: [PATCH] qcacld-3.0: Fix TDLS set state cmd sequence in concurrent TDLS connections TDLS set state cmd to firmware is going out of sequence, if STA is disconnected, when concurrent TDLS connections are active. This out of sequence causes crash in the firmware. Fix the out of sequence issue, by grouping all the TDLS delete peer commands into one single command. Change-Id: Ie4fe5888587755719b5540fd328022fa4f966c40 CRs-Fixed: 2073506 --- core/hdd/src/wlan_hdd_assoc.c | 4 +++- core/hdd/src/wlan_hdd_cfg80211.c | 6 ++---- core/mac/src/pe/lim/lim_process_tdls.c | 3 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 3aa02096adbe..9059ed54a8cf 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1256,7 +1256,8 @@ static void hdd_send_association_event(struct net_device *dev, hdd_debug("LFR3:hdd_send_association_event"); /* Update tdls module about the disconnection event */ hdd_notify_sta_disconnect(adapter->sessionId, - true, adapter->hdd_vdev); + true, false, + adapter->hdd_vdev); } #endif if (eConnectionState_Associated == sta_ctx->conn_info.connState) { @@ -1407,6 +1408,7 @@ static void hdd_send_association_event(struct net_device *dev, hdd_lpass_notify_disconnect(adapter); /* Update tdls module about the disconnection event */ hdd_notify_sta_disconnect(adapter->sessionId, + false, false, adapter->hdd_vdev); diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 16e8f7283a80..1e0c6a30ebdf 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -17526,12 +17526,10 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy, adapter->sessionId, INVALID_SCAN_ID, false); } wlan_hdd_cleanup_remain_on_channel_ctx(adapter); -#ifdef FEATURE_WLAN_TDLS /* First clean up the tdls peers if any */ - /* TDLS-TODO */ hdd_notify_sta_disconnect(adapter->sessionId, - true, adapter->hdd_vdev); -#endif + false, true, adapter->hdd_vdev); + hdd_info("Disconnect request from user space with reason: %d (%s) internal reason code: %d", reason, hdd_ieee80211_reason_code_to_str(reason), reasonCode); status = wlan_hdd_disconnect(adapter, reasonCode); diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c index f59bb631be6a..cd2744552e86 100644 --- a/core/mac/src/pe/lim/lim_process_tdls.c +++ b/core/mac/src/pe/lim/lim_process_tdls.c @@ -3188,6 +3188,9 @@ tSirRetStatus lim_process_sme_del_all_tdls_peers(tpAniSirGlobal p_mac, lim_check_aid_and_delete_peer(p_mac, session_entry); + tgt_tdls_peers_deleted_notification(p_mac->psoc, + session_entry->smeSessionId); + return eSIR_SUCCESS; }