From 5335bfcf4574afe931372d2b457afb996fa9d263 Mon Sep 17 00:00:00 2001 From: Abhishek Ambure Date: Tue, 3 Nov 2020 12:25:18 +0530 Subject: [PATCH] qcacld-3.0: Do not delete peer if wma peer assoc send fails As per vdev state machine, host deletes peer while vdev stop response. If host deletes peer on wma peer assoc req send fail, vdev state machine stuck at vdev stop and fails to send vdev down to FW. Thus PE session and vdev ref of WLAN_LEGACY_MAC_ID remains undeleted. Which leads to ref leak. Hence do not delete peer if peer assoc req send at wma. Change-Id: Ibc5d6013fa3ecbad1e45ea03b8d27c9010a72008 CRs-Fixed: 2812183 --- core/wma/src/wma_dev_if.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 4312a12724df..314a782d9393 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -3677,7 +3677,7 @@ QDF_STATUS wma_send_peer_assoc_req(struct bss_params *add_bss) OL_TXRX_PEER_STATE_CONN); status = wma_set_cdp_vdev_pause_reason(wma, vdev_id); if (QDF_IS_STATUS_ERROR(status)) - goto peer_cleanup; + goto send_resp; } wmi_unified_send_txbf(wma, &add_bss->staContext); @@ -3698,7 +3698,7 @@ QDF_STATUS wma_send_peer_assoc_req(struct bss_params *add_bss) &add_bss->staContext); if (QDF_IS_STATUS_ERROR(status)) { wma_err("Failed to send peer assoc status:%d", status); - goto peer_cleanup; + goto send_resp; } /* we just had peer assoc, so install key will be done later */ @@ -3719,7 +3719,7 @@ QDF_STATUS wma_send_peer_assoc_req(struct bss_params *add_bss) if (!mlme_obj) { wma_err("Failed to mlme obj"); status = QDF_STATUS_E_FAILURE; - goto peer_cleanup; + goto send_resp; } /* * Store the bssid in interface table, bssid will @@ -3743,14 +3743,11 @@ QDF_STATUS wma_send_peer_assoc_req(struct bss_params *add_bss) wma_err("Failed to allocate request for vdev_id %d", vdev_id); wma_remove_req(wma, vdev_id, WMA_PEER_ASSOC_CNF_START); status = QDF_STATUS_E_FAILURE; - goto peer_cleanup; + goto send_resp; } return QDF_STATUS_SUCCESS; -peer_cleanup: - if (peer_exist) - wma_remove_peer(wma, add_bss->bssId, vdev_id, false); send_resp: wma_send_add_bss_resp(wma, vdev_id, status);