qcacld-3.0: Update channel_before_switch_band in passive chan switch case
In current scenario, SAP is unable to switch from 2.4GHz to 5Ghz if previous CSA happens with reason CSA_REASON_CHAN_PASSIVE. For instance, SAP starts on 5Ghz with Country US, and later it changes to country 00 after MCC. Since in country 00, all 5Ghz channels are passive, so SAP switches to 2.4Ghz with reason CSA_REASON_CHAN_PASSIVE. Again if MCC happens to country US then SAP is unable to switch from 2.4Ghz to 5Ghz. This is because chan_freq_before_switch_band and chan_width_before_switch_band are not filled in CSA_REASON_CHAN_PASSIVE case. As part of fix, in wlansap_get_chan_band_restrict(), update the chan_freq_before_switch_band and chan_width_before_switch_band incase channel switch reason is CSA_REASON_CHAN_PASSIVE. Change-Id: I9610b17cff3f6e0e5257270d2fccd5586c9913f9 CRs-Fixed: 3055017
This commit is contained in:

committed by
Madan Koyyalamudi

parent
7bbcbb8c3e
commit
8ca26ac642
@@ -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);
|
||||
|
Reference in New Issue
Block a user