qcacld-3.0: Fix CSA handling to the same channel
Currently CSA event is ignored if the new channel is same as
current channel and there is no check for the BW comparison.
CSA can be done to the same channel with different BW. Allow the
CSA processing with same channel if the CSA has the different BW
Change-Id: Ib12c86dccf1c745dfa66c9e712d283af2df7809e
CRs-Fixed: 1102539
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
index 338ecb6..330974a 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
@@ -2314,6 +2314,12 @@
}
pe_debug("new ch width: %d space: %d",
session_entry->gLimChannelSwitch.ch_width, chan_space);
+ if ((session_entry->currentOperChannel == csa_params->channel) &&
+ (session_entry->ch_width ==
+ session_entry->gLimChannelSwitch.ch_width)) {
+ pe_debug("Ignore CSA, no change in ch and bw");
+ goto err;
+ }
lim_prepare_for11h_channel_switch(mac_ctx, session_entry);
csa_offload_ind = qdf_mem_malloc(sizeof(tSmeCsaOffloadInd));
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index a2c15be..bebac44 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -1306,8 +1306,7 @@
* basic sanity check: requested channel should not be 0
* and equal to home channel
*/
- if ((0 == csa_offload_event->channel) ||
- (cur_chan == csa_offload_event->channel)) {
+ if (0 == csa_offload_event->channel) {
WMA_LOGE("CSA Event with channel %d. Ignore !!",
csa_offload_event->channel);
qdf_mem_free(csa_offload_event);