From 5e262a7c8b69dc5ba58eda70f6fbdb8eb59e3558 Mon Sep 17 00:00:00 2001 From: Wu Gao Date: Mon, 25 May 2020 17:04:15 +0800 Subject: [PATCH] qcacld-3.0: Use min/max macro to update start/end range of 6ghz Use MIN_6GHZ_CHANNEL to replace CHAN_ENUM_5945, MAX_6GHZ_CHANNEL to replace CHAN_ENUM_7105, since min/max channel of 6ghz may be changed. Change-Id: Ibb0aa4182162d956d632b271cbbfef5af07f918c CRs-Fixed: 2706639 --- core/sap/src/sap_module.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index f2a44cad513c..67670a9557f3 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -2154,21 +2154,21 @@ wlansap_reset_sap_config_add_ie(struct sap_config *config, static void wlansap_update_start_range_6ghz( uint32_t *start_ch_freq, uint32_t *bandStartChannel) { - *bandStartChannel = CHAN_ENUM_5945; + *bandStartChannel = MIN_6GHZ_CHANNEL; *start_ch_freq = (*start_ch_freq - ACS_5G_EXTEND) > - wlan_reg_ch_to_freq(CHAN_ENUM_5945) ? + wlan_reg_ch_to_freq(MIN_6GHZ_CHANNEL) ? (*start_ch_freq - ACS_5G_EXTEND) : - wlan_reg_ch_to_freq(CHAN_ENUM_5945); + wlan_reg_ch_to_freq(MIN_6GHZ_CHANNEL); } static void wlansap_update_end_range_6ghz( uint32_t *end_ch_freq, uint32_t *bandEndChannel) { - *bandEndChannel = CHAN_ENUM_7105; + *bandEndChannel = MAX_6GHZ_CHANNEL; *end_ch_freq = (*end_ch_freq + ACS_5G_EXTEND) <= - wlan_reg_ch_to_freq(CHAN_ENUM_7105) ? + wlan_reg_ch_to_freq(MAX_6GHZ_CHANNEL) ? (*end_ch_freq + ACS_5G_EXTEND) : - wlan_reg_ch_to_freq(CHAN_ENUM_7105); + wlan_reg_ch_to_freq(MAX_6GHZ_CHANNEL); } #else static void wlansap_update_start_range_6ghz(