diff options
| author | Masti, Narayanraddi <c_nmasti@qti.qualcomm.com> | 2016-02-12 17:24:02 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-02-16 11:20:59 +0530 |
| commit | e01e2467ab9d0ca2e2f3b29bd0907fa5ce90335e (patch) | |
| tree | 19b27d0d4f89325564239d35816788f4ea1a6fbd | |
| parent | 538c91ff4e73acacf0a862dc40567ee8ad546c09 (diff) | |
qcacld-2.0: Send Deauth and delete all TDLS stations.
prima to qcacld-2.0 propagation
Send Deauth to TDLS peers, delete TDLS stations
and clear hdd structures if concurrency is detected.
Change-Id: Icc2019d78fc2447d388afd8a0ccb290df056e5e3
CRs-Fixed: 878382
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_tdls.c | 45 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessTdls.c | 2 |
2 files changed, 32 insertions, 15 deletions
diff --git a/CORE/HDD/src/wlan_hdd_tdls.c b/CORE/HDD/src/wlan_hdd_tdls.c index 3f21a024540f..35ee975f4d7e 100644 --- a/CORE/HDD/src/wlan_hdd_tdls.c +++ b/CORE/HDD/src/wlan_hdd_tdls.c @@ -186,6 +186,7 @@ void hdd_wlan_block_scan_by_tdls_event(void) void wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *hddctx) { u16 connected_tdls_peers = 0; + hddTdlsPeer_t *curr_peer; u8 staidx; hdd_adapter_t *adapter = NULL; @@ -230,25 +231,39 @@ void wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *hddctx) for (staidx = 0; staidx < hddctx->max_num_tdls_sta; staidx++) { - if (hddctx->tdlsConnInfo[staidx].staId) { - wlan_hdd_tdls_reset_peer(adapter, - hddctx->tdlsConnInfo[staidx].peerMac.bytes); - hdd_roamDeregisterTDLSSTA(adapter, - hddctx->tdlsConnInfo[staidx].staId ); - wlan_hdd_tdls_decrement_peer_count(adapter); - wlan_hdd_tdls_reset_peer(adapter, - hddctx->tdlsConnInfo[staidx].peerMac.bytes); + if (!hddctx->tdlsConnInfo[staidx].staId) + continue; - hdd_send_wlan_tdls_teardown_event( - eTDLS_TEARDOWN_CONCURRENCY, + curr_peer = wlan_hdd_tdls_find_all_peer(hddctx, hddctx->tdlsConnInfo[staidx].peerMac.bytes); + if (!curr_peer) + continue; - vos_mem_zero(&hddctx->tdlsConnInfo[staidx].peerMac, - sizeof(v_MACADDR_t)); + hddLog(LOG1, FL("indicate TDLS teardown (staId %d)"), + curr_peer->staId); - hddctx->tdlsConnInfo[staidx].staId = 0; - hddctx->tdlsConnInfo[staidx].sessionId = 255; - } + /* Indicate teardown to supplicant */ + wlan_hdd_tdls_indicate_teardown( + curr_peer->pHddTdlsCtx->pAdapter, + curr_peer, + eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON); + + /* + * Del Sta happened already as part of sme_delete_all_tdls_peers + * Hence clear hdd data structure. + */ + hdd_roamDeregisterTDLSSTA(adapter, + hddctx->tdlsConnInfo[staidx].staId); + wlan_hdd_tdls_decrement_peer_count(adapter); + wlan_hdd_tdls_reset_peer(adapter, curr_peer->peerMac); + hdd_send_wlan_tdls_teardown_event(eTDLS_TEARDOWN_CONCURRENCY, + curr_peer->peerMac); + + hddctx->tdlsConnInfo[staidx].staId = 0; + hddctx->tdlsConnInfo[staidx].sessionId = 255; + + vos_mem_zero(&hddctx->tdlsConnInfo[staidx].peerMac, + sizeof(v_MACADDR_t)); } wlan_hdd_tdls_check_bmps(adapter); } diff --git a/CORE/MAC/src/pe/lim/limProcessTdls.c b/CORE/MAC/src/pe/lim/limProcessTdls.c index d657586db5a7..d94c09fc9254 100644 --- a/CORE/MAC/src/pe/lim/limProcessTdls.c +++ b/CORE/MAC/src/pe/lim/limProcessTdls.c @@ -3329,6 +3329,8 @@ static void lim_check_aid_and_delete_peer(tpAniSirGlobal p_mac, eSIR_MAC_DEAUTH_LEAVING_BSS_REASON, sta_ds->staAddr, session_entry, FALSE); + limTdlsDelSta(p_mac, sta_ds->staAddr, + session_entry); dphDeleteHashEntry(p_mac, sta_ds->staAddr, sta_ds->assocId, |
