qcacld-3.0: Replace callers of wlan_reg_get_bonded_channel_state_for_freq
The current channel list alone is not enough to represent the capability of the chip or device. Given a channel, in many cases it may be required to know all the power modes that are supported by this channel. Update caller APIs to use super channel list. Removed wlan_reg_get_bonded_channel_state_for_freq and wlan_reg_get_5g_bonded_channel_and_state_for_pwrmode to use the super channel API wlan_reg_get_bonded_channel_state_for_pwrmode and wlan_reg_get_5g_bonded_channel_and_state_for_pwrmode Change-Id: I797ecaf0d01d47c5369f9e334805d855841566df CRs-Fixed: 3144692
This commit is contained in:

committed by
Madan Koyyalamudi

parent
f2ecda5efe
commit
94b9aa8de3
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user