From 7ce8fb0556431b3fffcab75e5719a8a7f20f728e Mon Sep 17 00:00:00 2001 From: Bala Venkatesh Date: Wed, 6 Nov 2019 15:55:11 +0530 Subject: [PATCH] qcacld-3.0: Do not reset the tdls link status to tearing If the force peer is removed from wpa_cli, then without checking the current link status link status is set to tearing. Then if the same peer is again marked as forced then that peer status is not reset to idle and that can lead to tdls connection denial of that peer. Reset the tdls link status to tearing only in connected state. Change-Id: Idd4128b4599fc2dfbb768984f8f9390fc14ab5f6 CRs-Fixed: 2551180 --- components/tdls/core/src/wlan_tdls_cmds_process.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/tdls/core/src/wlan_tdls_cmds_process.c b/components/tdls/core/src/wlan_tdls_cmds_process.c index 23f95630424b..527b202ff82f 100644 --- a/components/tdls/core/src/wlan_tdls_cmds_process.c +++ b/components/tdls/core/src/wlan_tdls_cmds_process.c @@ -1885,9 +1885,9 @@ QDF_STATUS tdls_process_remove_force_peer(struct tdls_oper_request *req) status = QDF_STATUS_E_NULL_VALUE; goto error; } - - tdls_set_peer_link_status(peer, TDLS_LINK_TEARING, - TDLS_LINK_UNSPECIFIED); + if (peer->link_status == TDLS_LINK_CONNECTED) + tdls_set_peer_link_status(peer, TDLS_LINK_TEARING, + TDLS_LINK_UNSPECIFIED); if (soc_obj->tdls_dp_vdev_update) soc_obj->tdls_dp_vdev_update(&soc_obj->soc,