summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Singh <absingh@codeaurora.org>2018-12-12 10:52:32 +0530
committerAbhishek Singh <absingh@codeaurora.org>2020-04-03 12:06:51 +0530
commitb1b0efad48990d3a0eb917aaa159b3a8901fd12e (patch)
tree33f47cf06229a03707acbeb3b57992501a04fae0
parente88c9da2ac0820a867e75541de6e0518f627f748 (diff)
qcacld-3.0: Fix channel width update sent during channel switch
During channel switch if the new channel's phymode is different than the old channel the host will update its phymode and send vdev restart to firmware. Once vdev restart resp is received, host sends new phymode and channel width to the firmware. If host process beacon with opmode IE while waiting for vdev restart response, it check if new channel width in bcn is valid for new phymode and send channel width to firmware. If channel width changed is greater than allowed value for older phymode, firmware is not able to handle it. Fix is to ignore any opmode IE during channel switch. Also ignore the beacons with CSA/ECSA IE if channel switch detection is offloaded. The opmode or any other change in beacon will be detected with the beacons on new channel once AP moves to new channel. Change-Id: If3bfb555dfa7b63dc997bbdf2fe6a0836bcf17fd CRs-Fixed: 2361553
-rw-r--r--core/mac/src/pe/lim/lim_process_action_frame.c11
-rw-r--r--core/mac/src/pe/sch/sch_beacon_process.c21
2 files changed, 30 insertions, 2 deletions
diff --git a/core/mac/src/pe/lim/lim_process_action_frame.c b/core/mac/src/pe/lim/lim_process_action_frame.c
index 2153e605690f..402f42b04e46 100644
--- a/core/mac/src/pe/lim/lim_process_action_frame.c
+++ b/core/mac/src/pe/lim/lim_process_action_frame.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018, 2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -455,6 +455,15 @@ static void __lim_process_operating_mode_action_frame(tpAniSirGlobal mac_ctx,
frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);
pe_debug("Received Operating Mode action frame");
+
+ /*
+ * Ignore opmode change during channel change The opmode will be updated
+ * with the beacons on new channel once the AP move to new channel.
+ */
+ if (session->ch_switch_in_progress) {
+ pe_debug("Ignore opmode change as channel switch is in progress");
+ return;
+ }
operating_mode_frm = qdf_mem_malloc(sizeof(*operating_mode_frm));
if (NULL == operating_mode_frm) {
pe_err("AllocateMemory failed");
diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c
index be88a0a11551..37cec83f8ca8 100644
--- a/core/mac/src/pe/sch/sch_beacon_process.c
+++ b/core/mac/src/pe/sch/sch_beacon_process.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -377,6 +377,16 @@ sch_bcn_process_sta(tpAniSirGlobal mac_ctx,
bcn->channelNumber);
return false;
}
+
+ /*
+ * Ignore bcn as channel switch IE present and csa offload is enabled,
+ * as in CSA offload enabled case FW will send Event to switch channel
+ */
+ if (bcn->channelSwitchPresent && wma_is_csa_offload_enabled()) {
+ pe_debug("Ignore bcn as channel switch IE present and csa offload is enabled");
+ return false;
+ }
+
lim_detect_change_in_ap_capabilities(mac_ctx, bcn, session);
if (lim_get_sta_hash_bssidx(mac_ctx, DPH_STA_HASH_INDEX_PEER, bssIdx,
session) != eSIR_SUCCESS)
@@ -540,6 +550,15 @@ sch_bcn_process_sta_ibss(tpAniSirGlobal mac_ctx,
(STA_INVALID_IDX == pStaDs->staIndex)))
return;
+ /*
+ * Ignore opmode change during channel change The opmode will be updated
+ * with the beacons on new channel once the AP move to new channel.
+ */
+ if (session->ch_switch_in_progress) {
+ pe_debug("Ignore opmode change as channel switch is in progress");
+ return;
+ }
+
if (session->vhtCapability && bcn->OperatingMode.present) {
update_nss(mac_ctx, pStaDs, bcn, session, pMh);
operMode = get_operating_channel_width(pStaDs);