From 6e5f4b2e27fda4ebdd87350ba2f59be320c54ac2 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 --- tdls/core/src/wlan_tdls_cmds_process.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tdls/core/src/wlan_tdls_cmds_process.c b/tdls/core/src/wlan_tdls_cmds_process.c index 23f9563042..527b202ff8 100644 --- a/tdls/core/src/wlan_tdls_cmds_process.c +++ b/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,