summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Singh <absingh@codeaurora.org>2017-01-09 13:05:54 +0530
committerqcabuildsw <qcabuildsw@localhost>2017-01-09 06:43:52 -0800
commit5dc415bc8d7f297ad5603c37dae0a4a631d2ea7d (patch)
tree71a4b1bc3612625dc05b407c73cce4b8f80fcdfb
parent7db8b926985a28e8f0a00dff75180ca1f8616f73 (diff)
qcacld-3.0: Avoid decrementing no of connected peer twice on failure
In case rate set of the peer in assoc req doesn't match the number of connected peers is decremented and sta is deleted. Now as part of send del sta again the number of connected peers is decremented. This sets the number of peer connected to 255 when last peer departs. And thus new peer always fails to join as the no of connected peer is always more than the allowed limit. In this case the sta is not yet added and thus there is no need to call del sta. To fix this set delete_sta false while calling lim_reject_association and thus avoid calling del sta. Also clean up the sta_ds from hash table. Change-Id: Ia7d837cfbbf9ddc15230aaeeca1a72acf48ac232 CRs-Fixed: 1108820
-rw-r--r--core/mac/src/pe/lim/lim_process_assoc_req_frame.c18
1 files changed, 9 insertions, 9 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 420fae1517ac..9e546a09616d 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1227,7 +1227,7 @@ static bool lim_chk_wmm(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
* Return: true of no error, false otherwise
*/
static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
- tpPESession session, tpSirAssocReq *sir_assoc_req,
+ tpPESession session, tpSirAssocReq assoc_req,
uint8_t sub_type, tpDphHashNode sta_ds,
tAniAuthType auth_type,
bool *assoc_req_copied, uint16_t peer_idx,
@@ -1241,7 +1241,6 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
#endif
tDot11fIEVHTCaps *vht_caps;
tpSirAssocReq tmp_assoc_req;
- tpSirAssocReq assoc_req = *sir_assoc_req;
if (assoc_req->VHTCaps.present)
vht_caps = &assoc_req->VHTCaps;
@@ -1433,13 +1432,14 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
lim_release_peer_idx(mac_ctx, peer_idx, session);
lim_reject_association(mac_ctx, hdr->sa,
- sub_type, true, auth_type, peer_idx, true,
+ sub_type, true, auth_type, peer_idx, false,
(tSirResultCodes)eSIR_MAC_UNSPEC_FAILURE_STATUS,
session);
-
- if (session->parsedAssocReq)
- *sir_assoc_req =
- session->parsedAssocReq[sta_ds->assocId];
+ lim_log(mac_ctx, LOGE,
+ FL(" Delete dph hash entry"));
+ if (dph_delete_hash_entry(mac_ctx, hdr->sa, sta_ds->assocId,
+ &session->dph.dphHashTable) != eSIR_SUCCESS)
+ lim_log(mac_ctx, LOGE, FL("error deleting hash entry"));
return false;
}
if (assoc_req->operMode.present) {
@@ -2010,7 +2010,7 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
}
sendIndToSme:
- if (false == lim_update_sta_ds(mac_ctx, hdr, session, &assoc_req,
+ if (false == lim_update_sta_ds(mac_ctx, hdr, session, assoc_req,
sub_type, sta_ds, auth_type,
&assoc_req_copied, peer_idx, qos_mode,
pmf_connection))