qcacld-3.0: Update callers of wlan_reg_get_5g_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 API to use supper channel list. Replaced wlan_reg_get_5g_bonded_channel_state_for_freq API to use the super channel API wlan_reg_get_5g_bonded_channel_state_for_pwrmode Change-Id: If5d40a704efa3130da63ba20f163aa2e0e027be4 CRs-Fixed: 3143058
This commit is contained in:

committed by
Madan Koyyalamudi

parent
4968633370
commit
f2ecda5efe
@@ -157,6 +157,7 @@ uint32_t wlan_son_get_chan_flag(struct wlan_objmgr_pdev *pdev,
|
||||
enum phy_ch_width bandwidth = mlme_get_vht_ch_width();
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
bool is_he_enabled;
|
||||
struct ch_params ch_params;
|
||||
|
||||
if (!pdev) {
|
||||
son_err("invalid pdev");
|
||||
@@ -173,6 +174,7 @@ uint32_t wlan_son_get_chan_flag(struct wlan_objmgr_pdev *pdev,
|
||||
&sub_20_channel_width);
|
||||
|
||||
qdf_mem_zero(chan_params, sizeof(*chan_params));
|
||||
qdf_mem_zero(&ch_params, sizeof(ch_params));
|
||||
qdf_mem_zero(&ch_width40_ch_params, sizeof(ch_width40_ch_params));
|
||||
if (wlan_reg_is_24ghz_ch_freq(freq)) {
|
||||
if (bandwidth == CH_WIDTH_80P80MHZ ||
|
||||
@@ -181,10 +183,13 @@ uint32_t wlan_son_get_chan_flag(struct wlan_objmgr_pdev *pdev,
|
||||
bandwidth = CH_WIDTH_40MHZ;
|
||||
}
|
||||
|
||||
ch_params.ch_width = bandwidth;
|
||||
switch (bandwidth) {
|
||||
case CH_WIDTH_80P80MHZ:
|
||||
if (wlan_reg_get_5g_bonded_channel_state_for_freq(pdev, freq,
|
||||
bandwidth) !=
|
||||
ch_params.ch_width = CH_WIDTH_80P80MHZ;
|
||||
if (wlan_reg_get_5g_bonded_channel_state_for_pwrmode(
|
||||
pdev, freq,
|
||||
&ch_params, REG_CURRENT_PWR_MODE) !=
|
||||
CHANNEL_STATE_INVALID) {
|
||||
if (!flag_160) {
|
||||
chan_params->ch_width = CH_WIDTH_80P80MHZ;
|
||||
@@ -200,8 +205,10 @@ uint32_t wlan_son_get_chan_flag(struct wlan_objmgr_pdev *pdev,
|
||||
bandwidth = CH_WIDTH_160MHZ;
|
||||
fallthrough;
|
||||
case CH_WIDTH_160MHZ:
|
||||
if (wlan_reg_get_5g_bonded_channel_state_for_freq(pdev, freq,
|
||||
bandwidth) !=
|
||||
ch_params.ch_width = CH_WIDTH_160MHZ;
|
||||
if (wlan_reg_get_5g_bonded_channel_state_for_pwrmode(
|
||||
pdev, freq,
|
||||
&ch_params, REG_CURRENT_PWR_MODE) !=
|
||||
CHANNEL_STATE_INVALID) {
|
||||
if (flag_160) {
|
||||
chan_params->ch_width = CH_WIDTH_160MHZ;
|
||||
@@ -217,8 +224,10 @@ uint32_t wlan_son_get_chan_flag(struct wlan_objmgr_pdev *pdev,
|
||||
bandwidth = CH_WIDTH_80MHZ;
|
||||
fallthrough;
|
||||
case CH_WIDTH_80MHZ:
|
||||
if (wlan_reg_get_5g_bonded_channel_state_for_freq(pdev, freq,
|
||||
bandwidth) !=
|
||||
ch_params.ch_width = CH_WIDTH_80MHZ;
|
||||
if (wlan_reg_get_5g_bonded_channel_state_for_pwrmode(
|
||||
pdev, freq,
|
||||
&ch_params, REG_CURRENT_PWR_MODE) !=
|
||||
CHANNEL_STATE_INVALID) {
|
||||
if (!flag_160 &&
|
||||
chan_params->ch_width != CH_WIDTH_80P80MHZ) {
|
||||
|
Reference in New Issue
Block a user