diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 0b5d0adb2c..7027dcb8ab 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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 @@ -3230,6 +3231,11 @@ qdf_freq_t wlansap_get_chan_band_restrict(struct sap_context *sap_ctx, return wlansap_get_safe_channel_from_pcl_and_acs_range(sap_ctx); } else if (wlan_reg_is_passive_for_freq(mac->pdev, sap_ctx->chan_freq)) { + sap_ctx->chan_freq_before_switch_band = sap_ctx->chan_freq; + sap_ctx->chan_width_before_switch_band = + sap_ctx->ch_params.ch_width; + sap_debug("Save chan info before switch: %d, width: %d", + sap_ctx->chan_freq, sap_ctx->ch_params.ch_width); sap_debug("channel is passive"); *csa_reason = CSA_REASON_CHAN_PASSIVE; return wlansap_get_safe_channel_from_pcl_for_sap(sap_ctx);