qcacmn: provide is_create_punc_bitmap when generateing puncture

Puncture is one of 11be feature. Even 11be compile macro is defined,
Dut can start AP with non-11be mode. Regulatory component has no idea
whether it should consider puncture or not. Puncture should be a
configurable parameter from caller.
When updating channel state, puncture should be considered for 11BE
AP. is_create_punc_bitmap should be set in struct ch_params and pass
it to reg_get_5g_bonded_channel_state_for_pwrmode.

Change-Id: I96fb131f2df201a827ab7d98ca099a38b008e0d3
CRs-Fixed: 3160259
This commit is contained in:
Bing Sun
2022-03-28 09:37:16 +08:00
zatwierdzone przez Madan Koyyalamudi
rodzic 83294e6613
commit 37a48b157f
5 zmienionych plików z 37 dodań i 22 usunięć

Wyświetl plik

@@ -204,6 +204,7 @@ void target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev,
enum phy_ch_width ch_width, prev_ch_width;
uint32_t is_dfs, prev_ch_is_dfs;
enum channel_state ch_state, prev_ch_state;
struct ch_params ch_params = {0};
psoc = wlan_vdev_get_psoc(vdev);
pdev = wlan_vdev_get_pdev(vdev);
@@ -218,9 +219,10 @@ void target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev,
ch_width = curr_channel->ch_width;
is_dfs = wlan_reg_is_dfs_for_freq(pdev, ch_freq);
ch_params.ch_width = ch_width;
ch_state =
wlan_reg_get_5g_bonded_channel_state_for_pwrmode(
pdev, ch_freq, ch_width,
pdev, ch_freq, &ch_params,
REG_CURRENT_PWR_MODE);
rx_ops = target_if_vdev_mgr_get_rx_ops(psoc);
if (!rx_ops || !rx_ops->psoc_get_wakelock_info) {
@@ -237,10 +239,11 @@ void target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev,
prev_ch_width = prev_channel->ch_width;
prev_ch_is_dfs = wlan_reg_is_dfs_for_freq(pdev,
prev_ch_freq);
ch_params.ch_width = prev_ch_width;
prev_ch_state =
wlan_reg_get_5g_bonded_channel_state_for_pwrmode(
pdev,
prev_ch_freq, prev_ch_width,
prev_ch_freq, &ch_params,
REG_CURRENT_PWR_MODE);
/*
* In restart case, if SAP is on non DFS channel and
@@ -276,6 +279,7 @@ void target_if_vdev_stop_link_handler(struct wlan_objmgr_vdev *vdev)
uint32_t ch_freq;
enum phy_ch_width ch_width;
uint32_t is_dfs;
struct ch_params ch_params = {0};
psoc = wlan_vdev_get_psoc(vdev);
pdev = wlan_vdev_get_pdev(vdev);
@@ -298,12 +302,13 @@ void target_if_vdev_stop_link_handler(struct wlan_objmgr_vdev *vdev)
}
psoc_wakelock = rx_ops->psoc_get_wakelock_info(psoc);
ch_params.ch_width = ch_width;
if (wlan_vdev_mlme_get_opmode(vdev) == QDF_SAP_MODE)
if (is_dfs ||
(wlan_reg_get_5g_bonded_channel_state_for_pwrmode(
pdev,
ch_freq,
ch_width,
&ch_params,
REG_CURRENT_PWR_MODE) == CHANNEL_STATE_DFS))
target_if_vote_for_link_down(psoc, psoc_wakelock);
}

Wyświetl plik

@@ -4289,6 +4289,7 @@ target_if_spectral_is_valid_80p80_freq(struct wlan_objmgr_pdev *pdev,
enum channel_state chan_state1;
enum channel_state chan_state2;
struct wlan_objmgr_psoc *psoc;
struct ch_params temp_params = {0};
qdf_assert_always(pdev);
psoc = wlan_pdev_get_psoc(pdev);
@@ -4318,19 +4319,21 @@ target_if_spectral_is_valid_80p80_freq(struct wlan_objmgr_pdev *pdev,
ch_params.mhz_freq_seg1 != cfreq2)
return false;
temp_params.ch_width = CH_WIDTH_80MHZ;
chan_state1 = wlan_reg_get_5g_bonded_channel_state_for_pwrmode(
pdev,
ch_params.mhz_freq_seg0 - FREQ_OFFSET_10MHZ,
CH_WIDTH_80MHZ,
&temp_params,
REG_CURRENT_PWR_MODE);
if ((chan_state1 == CHANNEL_STATE_DISABLE) ||
(chan_state1 == CHANNEL_STATE_INVALID))
return false;
temp_params.ch_width = CH_WIDTH_80MHZ;
chan_state2 = wlan_reg_get_5g_bonded_channel_state_for_pwrmode(
pdev,
ch_params.mhz_freq_seg1 - FREQ_OFFSET_10MHZ,
CH_WIDTH_80MHZ,
&temp_params,
REG_CURRENT_PWR_MODE);
if ((chan_state2 == CHANNEL_STATE_DISABLE) ||
(chan_state2 == CHANNEL_STATE_INVALID))

Wyświetl plik

@@ -3902,20 +3902,18 @@ reg_get_5g_chan_state(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq,
enum channel_state
reg_get_ch_state_based_on_nol_flag(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
struct ch_params *ch_param,
struct ch_params *ch_params,
enum supported_6g_pwr_types
in_6g_pwr_mode,
bool treat_nol_chan_as_disabled)
{
uint16_t ch_width = ch_param->ch_width;
if (treat_nol_chan_as_disabled)
return wlan_reg_get_5g_bonded_channel_state_for_pwrmode(pdev,
freq,
ch_width,
ch_params,
in_6g_pwr_mode);
return reg_get_5g_chan_state(pdev, freq, ch_param->ch_width,
return reg_get_5g_chan_state(pdev, freq, ch_params->ch_width,
in_6g_pwr_mode);
}

Wyświetl plik

@@ -1363,7 +1363,7 @@ wlan_reg_get_5g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
* state.
* @pdev: The physical dev to program country code or regdomain
* @freq: channel frequency.
* @bw: channel band width
* @ch_params: channel parameters
* @in_6g_pwr_type: 6g power type which decides 6G channel list lookup.
*
* Return: channel state
@@ -1371,7 +1371,7 @@ wlan_reg_get_5g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
enum channel_state
wlan_reg_get_5g_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
enum phy_ch_width bw,
struct ch_params *ch_params,
enum supported_6g_pwr_types
in_6g_pwr_type);
#endif

Wyświetl plik

@@ -1161,11 +1161,17 @@ qdf_export_symbol(wlan_reg_get_5g_bonded_channel_state_for_freq);
enum channel_state
wlan_reg_get_5g_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
enum phy_ch_width bw,
struct ch_params *ch_params,
enum supported_6g_pwr_types
in_6g_pwr_type)
{
struct ch_params params = {0};
enum phy_ch_width bw;
if (!ch_params) {
reg_err_rl("Invalid ch_params");
return CHANNEL_STATE_INVALID;
}
bw = ch_params->ch_width;
if (reg_is_ch_width_320(bw)) {
const struct bonded_channel_freq *bonded_ch_ptr_ptr = NULL;
@@ -1175,20 +1181,25 @@ wlan_reg_get_5g_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev,
in_6g_pwr_type);
}
params.ch_width = bw;
return reg_get_5g_bonded_channel_state_for_pwrmode(pdev, freq, &params,
return reg_get_5g_bonded_channel_state_for_pwrmode(pdev, freq,
ch_params,
in_6g_pwr_type);
}
#else
enum channel_state
wlan_reg_get_5g_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
enum phy_ch_width bw,
struct ch_params *ch_params,
enum supported_6g_pwr_types
in_6g_pwr_type)
{
struct ch_params params = {0};
enum phy_ch_width bw;
if (!ch_params) {
reg_err_rl("Invalid ch_params");
return CHANNEL_STATE_INVALID;
}
bw = ch_params->ch_width;
if (reg_is_ch_width_320(bw)) {
const struct bonded_channel_freq *bonded_ch_ptr_ptr = NULL;
@@ -1197,9 +1208,7 @@ wlan_reg_get_5g_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev,
&bonded_ch_ptr_ptr);
}
params.ch_width = bw;
return reg_get_5g_bonded_channel_state_for_freq(pdev, freq, &params);
return reg_get_5g_bonded_channel_state_for_freq(pdev, freq, ch_params);
}
#endif