diff --git a/components/son/dispatcher/src/son_api.c b/components/son/dispatcher/src/son_api.c index 36141f0312..d5cdb18976 100644 --- a/components/son/dispatcher/src/son_api.c +++ b/components/son/dispatcher/src/son_api.c @@ -256,9 +256,10 @@ uint32_t wlan_son_get_chan_flag(struct wlan_objmgr_pdev *pdev, else sec_freq = 0; - if (wlan_reg_get_bonded_channel_state_for_freq(pdev, freq, - bandwidth, - sec_freq) != + if (wlan_reg_get_bonded_channel_state_for_pwrmode( + pdev, freq, + bandwidth, sec_freq, + REG_CURRENT_PWR_MODE) != CHANNEL_STATE_INVALID) { if (ch_width40_ch_params.sec_ch_offset == LOW_PRIMARY_CH) { @@ -290,18 +291,20 @@ uint32_t wlan_son_get_chan_flag(struct wlan_objmgr_pdev *pdev, bandwidth = CH_WIDTH_10MHZ; fallthrough; case CH_WIDTH_10MHZ: - if (wlan_reg_get_bonded_channel_state_for_freq(pdev, freq, - bandwidth, - 0) != + if (wlan_reg_get_bonded_channel_state_for_pwrmode( + pdev, freq, + bandwidth, 0, + REG_CURRENT_PWR_MODE) != CHANNEL_STATE_INVALID && sub_20_channel_width == WLAN_SUB_20_CH_WIDTH_10) flags |= QCA_WLAN_VENDOR_CHANNEL_PROP_FLAG_HALF; bandwidth = CH_WIDTH_5MHZ; fallthrough; case CH_WIDTH_5MHZ: - if (wlan_reg_get_bonded_channel_state_for_freq(pdev, freq, - bandwidth, - 0) != + if (wlan_reg_get_bonded_channel_state_for_pwrmode( + pdev, freq, + bandwidth, 0, + REG_CURRENT_PWR_MODE) != CHANNEL_STATE_INVALID && sub_20_channel_width == WLAN_SUB_20_CH_WIDTH_5) flags |= QCA_WLAN_VENDOR_CHANNEL_PROP_FLAG_QUARTER; diff --git a/core/cds/src/cds_reg_service.c b/core/cds/src/cds_reg_service.c index 46727dc142..ae77a24c45 100644 --- a/core/cds/src/cds_reg_service.c +++ b/core/cds/src/cds_reg_service.c @@ -112,9 +112,10 @@ uint32_t cds_get_vendor_reg_flags(struct wlan_objmgr_pdev *pdev, else sec_freq = 0; - if (wlan_reg_get_bonded_channel_state_for_freq(pdev, freq, - bandwidth, - sec_freq) != + if (wlan_reg_get_bonded_channel_state_for_pwrmode( + pdev, freq, + bandwidth, sec_freq, + REG_CURRENT_PWR_MODE) != CHANNEL_STATE_INVALID) { if (ch_params.sec_ch_offset == LOW_PRIMARY_CH) { flags |= IEEE80211_CHAN_HT40PLUS; @@ -137,18 +138,20 @@ uint32_t cds_get_vendor_reg_flags(struct wlan_objmgr_pdev *pdev, bandwidth = CH_WIDTH_10MHZ; fallthrough; case CH_WIDTH_10MHZ: - if (wlan_reg_get_bonded_channel_state_for_freq(pdev, freq, - bandwidth, - 0) != + if (wlan_reg_get_bonded_channel_state_for_pwrmode( + pdev, freq, + bandwidth, 0, + REG_CURRENT_PWR_MODE) != CHANNEL_STATE_INVALID && sub_20_channel_width == WLAN_SUB_20_CH_WIDTH_10) flags |= IEEE80211_CHAN_HALF; bandwidth = CH_WIDTH_5MHZ; fallthrough; case CH_WIDTH_5MHZ: - if (wlan_reg_get_bonded_channel_state_for_freq(pdev, freq, - bandwidth, - 0) != + if (wlan_reg_get_bonded_channel_state_for_pwrmode( + pdev, freq, + bandwidth, 0, + REG_CURRENT_PWR_MODE) != CHANNEL_STATE_INVALID && sub_20_channel_width == WLAN_SUB_20_CH_WIDTH_5) flags |= IEEE80211_CHAN_QUARTER; diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index cc2511e688..b0c9ecd964 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -2082,9 +2082,10 @@ void sap_append_cac_history(struct mac_context *mac_ctx, enum channel_state state; const struct bonded_channel_freq *bonded_chan_ptr = NULL; - state = wlan_reg_get_5g_bonded_channel_and_state_for_freq + state = wlan_reg_get_5g_bonded_channel_and_state_for_pwrmode (mac_ctx->pdev, ch_param.mhz_freq_seg0, - ch_param.ch_width, &bonded_chan_ptr); + ch_param.ch_width, &bonded_chan_ptr, + REG_CURRENT_PWR_MODE, NO_SCHANS_PUNC); if (!bonded_chan_ptr || state == CHANNEL_STATE_INVALID) { sap_debug("invalid freq %d", ch_param.mhz_freq_seg0); return;