From 44323898a4c6b7968efdbd830135fe7fcbca1009 Mon Sep 17 00:00:00 2001 From: Krunal Soni Date: Sun, 19 Nov 2017 09:00:56 -0800 Subject: qcacld-3.0: Create PMF timer when PEER associates in PMF mode Current driver is creating PMF timer for all non-pmf as well as PMF PEERs which is un-necessary. Create PMF timer for each PEER when PEER associates in 80211W-PMF mode. CRs-Fixed: 2145687 Change-Id: I698de22a075f3307253db811b7ae616ebe48c127 --- core/mac/src/pe/lim/lim_assoc_utils.c | 6 +++++- core/mac/src/pe/lim/lim_process_assoc_req_frame.c | 6 +++++- core/mac/src/pe/lim/lim_utils.c | 9 +++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index a127bbb508e9..e7ca136f209a 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -3045,7 +3045,11 @@ lim_delete_dph_hash_entry(tpAniSirGlobal mac_ctx, tSirMacAddr sta_addr, session_entry); } #ifdef WLAN_FEATURE_11W - tx_timer_delete(&sta_ds->pmfSaQueryTimer); + if (sta_ds->rmfEnabled) { + pe_debug("delete pmf timer sta-idx:%d assoc-id:%d", + sta_ds->staIndex, sta_ds->assocId); + tx_timer_delete(&sta_ds->pmfSaQueryTimer); + } #endif } 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 80825df880a6..6cbc188fece4 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 @@ -1499,7 +1499,8 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr, if (WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL_STAMIN > retry_interval) { retry_interval = WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL_STADEF; } - if (tx_timer_create(mac_ctx, &sta_ds->pmfSaQueryTimer, + if (sta_ds->rmfEnabled && + tx_timer_create(mac_ctx, &sta_ds->pmfSaQueryTimer, "PMF SA Query timer", lim_pmf_sa_query_timer_handler, timer_id.value, SYS_MS_TO_TICKS((retry_interval * 1024) / 1000), @@ -1511,6 +1512,9 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr, session); return false; } + if (sta_ds->rmfEnabled) + pe_debug("Created pmf timer sta-idx:%d assoc-id:%d", + sta_ds->staIndex, sta_ds->assocId); #endif if (assoc_req->ExtCap.present) { diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index e294d7b4e38c..a18ac887ebaa 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -6636,9 +6636,14 @@ void lim_del_pmf_sa_query_timer(tpAniSirGlobal mac_ctx, tpPESession pe_session) &pe_session->dph.dphHashTable); if (NULL == sta_ds) continue; + if (!sta_ds->rmfEnabled) { + pe_debug("no PMF timer for sta-idx:%d assoc-id:%d", + sta_ds->staIndex, sta_ds->assocId); + continue; + } - pe_err("Deleting pmfSaQueryTimer for staid: %d", - sta_ds->staIndex); + pe_debug("Deleting pmfSaQueryTimer for sta-idx:%d assoc-id:%d", + sta_ds->staIndex, sta_ds->assocId); tx_timer_deactivate(&sta_ds->pmfSaQueryTimer); tx_timer_delete(&sta_ds->pmfSaQueryTimer); } -- cgit v1.2.3