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
Šī revīzija ir iekļauta:
Bing Sun
2022-03-28 09:37:16 +08:00
revīziju iesūtīja Madan Koyyalamudi
vecāks 83294e6613
revīzija 37a48b157f
5 mainīti faili ar 37 papildinājumiem un 22 dzēšanām

Parādīt failu

@@ -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; enum phy_ch_width ch_width, prev_ch_width;
uint32_t is_dfs, prev_ch_is_dfs; uint32_t is_dfs, prev_ch_is_dfs;
enum channel_state ch_state, prev_ch_state; enum channel_state ch_state, prev_ch_state;
struct ch_params ch_params = {0};
psoc = wlan_vdev_get_psoc(vdev); psoc = wlan_vdev_get_psoc(vdev);
pdev = wlan_vdev_get_pdev(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; ch_width = curr_channel->ch_width;
is_dfs = wlan_reg_is_dfs_for_freq(pdev, ch_freq); is_dfs = wlan_reg_is_dfs_for_freq(pdev, ch_freq);
ch_params.ch_width = ch_width;
ch_state = ch_state =
wlan_reg_get_5g_bonded_channel_state_for_pwrmode( wlan_reg_get_5g_bonded_channel_state_for_pwrmode(
pdev, ch_freq, ch_width, pdev, ch_freq, &ch_params,
REG_CURRENT_PWR_MODE); REG_CURRENT_PWR_MODE);
rx_ops = target_if_vdev_mgr_get_rx_ops(psoc); rx_ops = target_if_vdev_mgr_get_rx_ops(psoc);
if (!rx_ops || !rx_ops->psoc_get_wakelock_info) { 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_width = prev_channel->ch_width;
prev_ch_is_dfs = wlan_reg_is_dfs_for_freq(pdev, prev_ch_is_dfs = wlan_reg_is_dfs_for_freq(pdev,
prev_ch_freq); prev_ch_freq);
ch_params.ch_width = prev_ch_width;
prev_ch_state = prev_ch_state =
wlan_reg_get_5g_bonded_channel_state_for_pwrmode( wlan_reg_get_5g_bonded_channel_state_for_pwrmode(
pdev, pdev,
prev_ch_freq, prev_ch_width, prev_ch_freq, &ch_params,
REG_CURRENT_PWR_MODE); REG_CURRENT_PWR_MODE);
/* /*
* In restart case, if SAP is on non DFS channel and * 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; uint32_t ch_freq;
enum phy_ch_width ch_width; enum phy_ch_width ch_width;
uint32_t is_dfs; uint32_t is_dfs;
struct ch_params ch_params = {0};
psoc = wlan_vdev_get_psoc(vdev); psoc = wlan_vdev_get_psoc(vdev);
pdev = wlan_vdev_get_pdev(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); 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 (wlan_vdev_mlme_get_opmode(vdev) == QDF_SAP_MODE)
if (is_dfs || if (is_dfs ||
(wlan_reg_get_5g_bonded_channel_state_for_pwrmode( (wlan_reg_get_5g_bonded_channel_state_for_pwrmode(
pdev, pdev,
ch_freq, ch_freq,
ch_width, &ch_params,
REG_CURRENT_PWR_MODE) == CHANNEL_STATE_DFS)) REG_CURRENT_PWR_MODE) == CHANNEL_STATE_DFS))
target_if_vote_for_link_down(psoc, psoc_wakelock); target_if_vote_for_link_down(psoc, psoc_wakelock);
} }

Parādīt failu

@@ -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_state1;
enum channel_state chan_state2; enum channel_state chan_state2;
struct wlan_objmgr_psoc *psoc; struct wlan_objmgr_psoc *psoc;
struct ch_params temp_params = {0};
qdf_assert_always(pdev); qdf_assert_always(pdev);
psoc = wlan_pdev_get_psoc(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) ch_params.mhz_freq_seg1 != cfreq2)
return false; return false;
temp_params.ch_width = CH_WIDTH_80MHZ;
chan_state1 = wlan_reg_get_5g_bonded_channel_state_for_pwrmode( chan_state1 = wlan_reg_get_5g_bonded_channel_state_for_pwrmode(
pdev, pdev,
ch_params.mhz_freq_seg0 - FREQ_OFFSET_10MHZ, ch_params.mhz_freq_seg0 - FREQ_OFFSET_10MHZ,
CH_WIDTH_80MHZ, &temp_params,
REG_CURRENT_PWR_MODE); REG_CURRENT_PWR_MODE);
if ((chan_state1 == CHANNEL_STATE_DISABLE) || if ((chan_state1 == CHANNEL_STATE_DISABLE) ||
(chan_state1 == CHANNEL_STATE_INVALID)) (chan_state1 == CHANNEL_STATE_INVALID))
return false; return false;
temp_params.ch_width = CH_WIDTH_80MHZ;
chan_state2 = wlan_reg_get_5g_bonded_channel_state_for_pwrmode( chan_state2 = wlan_reg_get_5g_bonded_channel_state_for_pwrmode(
pdev, pdev,
ch_params.mhz_freq_seg1 - FREQ_OFFSET_10MHZ, ch_params.mhz_freq_seg1 - FREQ_OFFSET_10MHZ,
CH_WIDTH_80MHZ, &temp_params,
REG_CURRENT_PWR_MODE); REG_CURRENT_PWR_MODE);
if ((chan_state2 == CHANNEL_STATE_DISABLE) || if ((chan_state2 == CHANNEL_STATE_DISABLE) ||
(chan_state2 == CHANNEL_STATE_INVALID)) (chan_state2 == CHANNEL_STATE_INVALID))

Parādīt failu

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

Parādīt failu

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

Parādīt failu

@@ -1161,11 +1161,17 @@ qdf_export_symbol(wlan_reg_get_5g_bonded_channel_state_for_freq);
enum channel_state enum channel_state
wlan_reg_get_5g_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev, wlan_reg_get_5g_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq, qdf_freq_t freq,
enum phy_ch_width bw, struct ch_params *ch_params,
enum supported_6g_pwr_types enum supported_6g_pwr_types
in_6g_pwr_type) 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)) { if (reg_is_ch_width_320(bw)) {
const struct bonded_channel_freq *bonded_ch_ptr_ptr = NULL; 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); in_6g_pwr_type);
} }
params.ch_width = bw; return reg_get_5g_bonded_channel_state_for_pwrmode(pdev, freq,
ch_params,
return reg_get_5g_bonded_channel_state_for_pwrmode(pdev, freq, &params,
in_6g_pwr_type); in_6g_pwr_type);
} }
#else #else
enum channel_state enum channel_state
wlan_reg_get_5g_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev, wlan_reg_get_5g_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq, qdf_freq_t freq,
enum phy_ch_width bw, struct ch_params *ch_params,
enum supported_6g_pwr_types enum supported_6g_pwr_types
in_6g_pwr_type) 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)) { if (reg_is_ch_width_320(bw)) {
const struct bonded_channel_freq *bonded_ch_ptr_ptr = NULL; 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); &bonded_ch_ptr_ptr);
} }
params.ch_width = bw; return reg_get_5g_bonded_channel_state_for_freq(pdev, freq, ch_params);
return reg_get_5g_bonded_channel_state_for_freq(pdev, freq, &params);
} }
#endif #endif