From 27073364a41129d28126cb26223a3210bdb74d0d Mon Sep 17 00:00:00 2001 From: Srinivas Dasari Date: Tue, 3 Oct 2023 12:20:52 +0530 Subject: [PATCH] qcacld-3.0: Don't process the beacon in non-connected state Beacon/probe resp needs to be processed only if it's received as part of join(eLIM_MLM_WT_JOIN_BEACON_STATE). But beacons are processed after join phase and before connect completion also. This delays actual connection if there are any critical updates(e.g. VHT IE update) in beacon. These beacons need not be honored before connect completion. So, drop the beacon frames if received during connect. Also, reduce the log level for error cases while processing beacon in lim_update_sta_run_time_ht_switch_chnl_params(). Change-Id: If2f4ee05eeb27d26964daf8dfc6e7c9b4fb3144c CRs-Fixed: 3624753 --- core/mac/src/pe/lim/lim_utils.c | 2 +- core/mac/src/pe/sch/sch_beacon_process.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 222e18471e..0418b2f2d5 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -3852,7 +3852,7 @@ void lim_update_sta_run_time_ht_switch_chnl_params(struct mac_context *mac, } if (!wlan_cm_is_vdev_connected(pe_session->vdev)) { - pe_err("vdev not connected, ignore HT IE BW update"); + pe_debug_rl("vdev not connected, ignore HT IE BW update"); return; } diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c index 3d87e54175..0c10909e30 100644 --- a/core/mac/src/pe/sch/sch_beacon_process.c +++ b/core/mac/src/pe/sch/sch_beacon_process.c @@ -1025,6 +1025,13 @@ sch_beacon_process(struct mac_context *mac_ctx, uint8_t *rx_pkt_info, if (!session) return; + + if (LIM_IS_STA_ROLE(session) && + !wlan_cm_is_vdev_connected(session->vdev)) { + pe_debug_rl("vdev %d, drop beacon", session->vdev_id); + return; + } + /* Convert the beacon frame into a structure */ if (sir_convert_beacon_frame2_struct(mac_ctx, (uint8_t *) rx_pkt_info, &bcn) != QDF_STATUS_SUCCESS) {