diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index d0d1f3fd5529..878d9d954760 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -3089,7 +3089,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 ffbbbb3ee365..cdf1c0749331 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 @@ -1506,7 +1506,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), @@ -1518,6 +1519,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 352e6ad94e67..5d1da657fd61 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -6577,9 +6577,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); }