qcacmn: Address compilation error in non-6G PFs

The structure members of regulatory pdev private object,
is_6g_channel_list_populated and super_chan_list are 6G specific but are
used outside the 6G macro 'CONFIG_BAND_6GHZ'. It is used in get channel
list API reg_get_pwrmode_chan_list(), that is commonly called for all the
bands.

Move the 6G portion of get channel list API to a separate API
reg_get_6g_pwrmode_chan_list() that is empty for non-6G platforms.

Change-Id: If9aeedbf157536d10912f4ee1d92f42146b19759
此提交包含在:
Vignesh U
2022-02-08 14:27:11 +05:30
提交者 Madan Koyyalamudi
父節點 e577592d1a
當前提交 809a5a3602

查看文件

@@ -2649,6 +2649,33 @@ copy_from_super_chan_info_to_reg_channel(struct regulatory_channel *chan,
chan->psd_flag = sc_entry.reg_chan_pwr[in_6g_pwr_mode].psd_flag;
chan->psd_eirp = sc_entry.reg_chan_pwr[in_6g_pwr_mode].psd_eirp;
}
static QDF_STATUS
reg_get_6g_pwrmode_chan_list(struct wlan_regulatory_pdev_priv_obj
*pdev_priv_obj,
struct regulatory_channel *chan_list,
enum supported_6g_pwr_types in_6g_pwr_mode)
{
uint8_t i;
/*
* If 6GHz channel list is present, populate it with desired
* power type
*/
if (!pdev_priv_obj->is_6g_channel_list_populated) {
reg_debug("6G channel list is empty");
return QDF_STATUS_SUCCESS;
}
/* Copy the regulatory_channel fields from super_chan_info */
for (i = 0; i < NUM_6GHZ_CHANNELS; i++)
copy_from_super_chan_info_to_reg_channel(
&chan_list[i + MIN_6GHZ_CHANNEL],
pdev_priv_obj->super_chan_list[i],
in_6g_pwr_mode);
return QDF_STATUS_SUCCESS;
}
#else
static void
reg_populate_6g_band_channels(struct cur_reg_rule *reg_rule_5g,
@@ -2665,6 +2692,15 @@ copy_from_super_chan_info_to_reg_channel(struct regulatory_channel *chan,
in_6g_pwr_mode)
{
}
static inline QDF_STATUS
reg_get_6g_pwrmode_chan_list(struct wlan_regulatory_pdev_priv_obj
*pdev_priv_obj,
struct regulatory_channel *chan_list,
enum supported_6g_pwr_types in_6g_pwr_mode)
{
return QDF_STATUS_E_INVAL;
}
#endif /* CONFIG_BAND_6GHZ */
QDF_STATUS reg_get_pwrmode_chan_list(struct wlan_objmgr_pdev *pdev,
@@ -2673,7 +2709,6 @@ QDF_STATUS reg_get_pwrmode_chan_list(struct wlan_objmgr_pdev *pdev,
{
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
struct wlan_objmgr_psoc *psoc;
uint8_t i;
if (!pdev) {
reg_err_rl("invalid pdev");
@@ -2695,23 +2730,8 @@ QDF_STATUS reg_get_pwrmode_chan_list(struct wlan_objmgr_pdev *pdev,
if (in_6g_pwr_mode == REG_CURRENT_PWR_MODE)
return QDF_STATUS_SUCCESS;
/*
* If 6GHz channel list is present, populate it with desired
* power type
*/
if (!pdev_priv_obj->is_6g_channel_list_populated) {
reg_debug("6G channel list is empty");
return QDF_STATUS_SUCCESS;
}
/* Copy the regulatory_channel fields from super_chan_info */
for (i = 0; i < NUM_6GHZ_CHANNELS; i++)
copy_from_super_chan_info_to_reg_channel(
&chan_list[i + MIN_6GHZ_CHANNEL],
pdev_priv_obj->super_chan_list[i],
in_6g_pwr_mode);
return QDF_STATUS_SUCCESS;
return reg_get_6g_pwrmode_chan_list(pdev_priv_obj, chan_list,
in_6g_pwr_mode);
}
#ifdef CONFIG_REG_CLIENT