From 1e9696ee08f09771e40ba2948a8935b3e2ec6028 Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Sat, 19 Sep 2020 22:30:58 +0800 Subject: [PATCH] qcacld-3.0: Handle case when SAP assoc rsp tx complete failed When DUT SAP assoc rsp tx complete failed, assoc failed, should send disassoc and remove the sta peer, or hostapd will add a fake peer and send EAPOL to it until timeout. When timeout, host will send deauth to the peer which will stop new connecting from peer. Change-Id: I9dc72bec2c67c93bd9749df30e93a0526796ee49 CRs-Fixed: 2779345 --- core/mac/src/pe/lim/lim_send_management_frames.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index 2853a64da7b2..e54f71a9a1f9 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -1159,6 +1159,15 @@ static QDF_STATUS lim_assoc_rsp_tx_complete( goto end; } + if (tx_complete != WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK) { + lim_send_disassoc_mgmt_frame(mac_ctx, + REASON_DISASSOC_DUE_TO_INACTIVITY, + sta_ds->staAddr, + session_entry, false); + lim_trigger_sta_deletion(mac_ctx, sta_ds, session_entry); + goto free_buffers; + } + lim_assoc_ind = qdf_mem_malloc(sizeof(tLimMlmAssocInd)); if (!lim_assoc_ind) { pe_err("lim assoc ind is NULL"); @@ -1191,6 +1200,8 @@ static QDF_STATUS lim_assoc_rsp_tx_complete( lim_sys_process_mmh_msg_api(mac_ctx, &msg); qdf_mem_free(lim_assoc_ind); + +free_buffers: if (assoc_req->assocReqFrame) { qdf_mem_free(assoc_req->assocReqFrame); assoc_req->assocReqFrame = NULL;