From f0493820922e67a0dfd573478bec4153b44c3d33 Mon Sep 17 00:00:00 2001 From: "Masti, Narayanraddi" Date: Mon, 10 Aug 2015 11:11:24 +0530 Subject: [PATCH] qcacld-3.0: Send assoc response for duplicate assoc request frames qcacld-2.0 to qcacld-3.0 propagation Few STA/P2P-client's are sending assoc req frame and waiting for 300-500ms. If they don't receive the assoc resp frame within this time then they resending the assoc req frame. These frames are not going to have retry bit set. In the current design host driver is not handling these duplicate assoc req frames without retry bit set. To mitigate this issue, while processing assoc request frame, if pStaDs entry already exists then send assoc response with same tid and stop processing the assoc req further. Change-Id: I6d67f4cd352bbee422301b832742e7386666037f CRs-Fixed: 868736 --- .../src/pe/lim/lim_process_assoc_req_frame.c | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c index 1972461f0350..02b092312dc2 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c @@ -280,13 +280,32 @@ lim_process_assoc_req_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, */ pStaDs = dph_lookup_hash_entry(pMac, pHdr->sa, &assoc_id, &psessionEntry->dph.dphHashTable); - if ((NULL != pStaDs) && (pHdr->fc.retry > 0)) { - lim_log(pMac, LOGE, - FL("STA is initiating Assoc Req after ACK lost. Do not process" - " sessionid: %d sys subType=%d for role=%d from: " - MAC_ADDRESS_STR), psessionEntry->peSessionId, - subType, GET_LIM_SYSTEM_ROLE(psessionEntry), - MAC_ADDR_ARRAY(pHdr->sa)); + if ((NULL != pStaDs)) { + if (pHdr->fc.retry > 0) { + lim_log(pMac, LOGE, + FL("STA is initiating Assoc Req after ACK lost. Do not process" + " sessionid: %d sys subType=%d for role=%d from: " + MAC_ADDRESS_STR), psessionEntry->peSessionId, + subType, GET_LIM_SYSTEM_ROLE(psessionEntry), + MAC_ADDR_ARRAY(pHdr->sa)); + } else { + /* + * STA might have missed the assoc response, + * so it is sending assoc request frame again. + */ + lim_send_assoc_rsp_mgmt_frame(pMac, eSIR_SUCCESS, + pStaDs->assocId, pStaDs->staAddr, + pStaDs->mlmStaContext.subType, pStaDs, + psessionEntry); + lim_log(pMac, LOGE, + FL("DUT already received an assoc request frame " + "and STA is sending another assoc req.So, do not " + "Process sessionid: %d sys subType=%d for role=%d " + "from: "MAC_ADDRESS_STR), + psessionEntry->peSessionId, subType, + psessionEntry->limSystemRole, + MAC_ADDR_ARRAY(pHdr->sa)); + } return; }