From 433e0e37107944f3ba7abaac0a74d7d252e5bf07 Mon Sep 17 00:00:00 2001 From: Bala Venkatesh Date: Mon, 29 Oct 2018 14:47:43 +0530 Subject: [PATCH] qcacmn: Delete connection in progress tdls peers TDLS peer has to be deleted before sending the TDLS disable command to FW, otherwise FW may assert due to the invalid sequence of peer delete and TDLS set state command. So Delete TDLS peers for those the connection is in progress along with the active TDLS peers before disabling the TDLS. Change-Id: Ic52c44dea947095cfe5e4dfe36eec271b1f46867 CRs-Fixed: 2340759 --- umac/tdls/core/src/wlan_tdls_ct.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/umac/tdls/core/src/wlan_tdls_ct.c b/umac/tdls/core/src/wlan_tdls_ct.c index d7c50ab7c68f..e81c2e5b428a 100644 --- a/umac/tdls/core/src/wlan_tdls_ct.c +++ b/umac/tdls/core/src/wlan_tdls_ct.c @@ -1185,6 +1185,7 @@ void tdls_disable_offchan_and_teardown_links( struct tdls_soc_priv_obj *tdls_soc; QDF_STATUS status; uint8_t vdev_id; + bool tdls_in_progress = false; status = tdls_get_vdev_objects(vdev, &tdls_vdev, &tdls_soc); if (QDF_STATUS_SUCCESS != status) { @@ -1199,9 +1200,11 @@ void tdls_disable_offchan_and_teardown_links( } connected_tdls_peers = tdls_soc->connected_peer_count; + if (tdls_is_progress(tdls_vdev, NULL, 0)) + tdls_in_progress = true; - if (!connected_tdls_peers) { - tdls_notice("No TDLS connected peers to delete"); + if (!(connected_tdls_peers || tdls_in_progress)) { + tdls_notice("No TDLS connected/progress peers to delete"); vdev_id = vdev->vdev_objmgr.vdev_id; if (tdls_soc->set_state_info.set_state_cnt > 0) { tdls_debug("Disable the tdls in FW as second interface is coming up");