qcacmn: Replace channel with frequency for 6G

Replace WLAN_REG_IS_24GHZ_CH with WLAN_REG_IS_24GHZ_CH_FREQ

Change-Id: Ia2ff3a317f0286b0a6ca4d8642007e1a608c3e3d
CRs-Fixed: 2714721
This commit is contained in:
Jianmin Zhu
2020-06-18 08:36:29 +08:00
committed by nshrivas
父節點 1a387e156e
當前提交 4f9ae24e67
共有 3 個文件被更改,包括 37 次插入7 次删除

查看文件

@@ -858,8 +858,8 @@ static void utils_dfs_get_channel_list(struct wlan_objmgr_pdev *pdev,
chan_num = dfs->dfs_curchan->dfs_ch_ieee;
center_freq = dfs->dfs_curchan->dfs_ch_freq;
is_curchan_5g = WLAN_REG_IS_5GHZ_CH(chan_num);
is_curchan_24g = WLAN_REG_IS_24GHZ_CH(chan_num);
is_curchan_5g = WLAN_REG_IS_5GHZ_CH_FREQ(center_freq);
is_curchan_24g = WLAN_REG_IS_24GHZ_CH_FREQ(center_freq);
is_curchan_49g = WLAN_REG_IS_49GHZ_FREQ(center_freq);
for (i = 0; i < *num_chan; i++) {
@@ -870,13 +870,13 @@ static void utils_dfs_get_channel_list(struct wlan_objmgr_pdev *pdev,
if (!dfs_mlme_check_allowed_prim_chanlist(pdev, chan_num))
continue;
if ((is_curchan_5g) && WLAN_REG_IS_5GHZ_CH(chan_num)) {
if ((is_curchan_5g) && WLAN_REG_IS_5GHZ_CH_FREQ(center_freq)) {
chan_list[j].dfs_ch_ieee = chan_num;
chan_list[j].dfs_ch_freq = center_freq;
chan_list[j].dfs_ch_flagext = flagext;
j++;
} else if ((is_curchan_24g) &&
WLAN_REG_IS_24GHZ_CH(chan_num)) {
WLAN_REG_IS_24GHZ_CH_FREQ(center_freq)) {
chan_list[j].dfs_ch_ieee = chan_num;
chan_list[j].dfs_ch_freq = center_freq;
j++;

查看文件

@@ -555,6 +555,20 @@ enum channel_state wlan_reg_get_bonded_channel_state(
enum phy_ch_width bw, uint8_t sec_ch);
#endif /* CONFIG_CHAN_NUM_API */
/**
* wlan_reg_get_bonded_channel_state_for_freq() - Get bonded channel freq state
* @freq: channel frequency
* @bw: channel band width
* @sec_freq: secondary frequency
*
* Return: channel state
*/
enum channel_state
wlan_reg_get_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
enum phy_ch_width bw,
qdf_freq_t sec_freq);
/**
* wlan_reg_set_dfs_region() - set the dfs region
* @pdev: pdev ptr

查看文件

@@ -243,9 +243,10 @@ qdf_export_symbol(wlan_reg_get_bw_value);
*
* Return: channel state
*/
enum channel_state wlan_reg_get_bonded_channel_state(
struct wlan_objmgr_pdev *pdev, uint8_t ch,
enum phy_ch_width bw, uint8_t sec_ch)
enum channel_state
wlan_reg_get_bonded_channel_state(struct wlan_objmgr_pdev *pdev,
uint8_t ch,
enum phy_ch_width bw, uint8_t sec_ch)
{
if (WLAN_REG_IS_24GHZ_CH(ch))
return reg_get_2g_bonded_channel_state(pdev, ch,
@@ -254,6 +255,7 @@ enum channel_state wlan_reg_get_bonded_channel_state(
return reg_get_5g_bonded_channel_state(pdev, ch,
bw);
}
#endif /* CONFIG_CHAN_NUM_API */
/**
@@ -1106,6 +1108,20 @@ wlan_reg_get_5g_bonded_channel_and_state_for_freq(struct wlan_objmgr_pdev *pdev,
bonded_chan_ptr_ptr);
}
enum channel_state
wlan_reg_get_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
enum phy_ch_width bw,
qdf_freq_t sec_freq)
{
if (WLAN_REG_IS_24GHZ_CH_FREQ(freq))
return reg_get_2g_bonded_channel_state_for_freq(pdev, freq,
sec_freq, bw);
else
return reg_get_5g_bonded_channel_state_for_freq(pdev, freq,
bw);
}
qdf_export_symbol(wlan_reg_get_5g_bonded_channel_and_state_for_freq);
#endif /* CONFIG CHAN FREQ API */