qcacmn: Move reg_set_ap_pwr_and_update_chan_list to reg_services_common.c
Currently, reg_set_ap_pwr_and_update_chan_list is defined in reg_utils.c which is compiled only for MCL. Move the definition of reg_set_ap_pwr_and_update_chan_list to reg_services_common.c so that it can be compiled and used by WIN APIs. Change-Id: I433d2790b0d017290c2bdd3b06985d834a99629b CRs-Fixed: 2964544
This commit is contained in:
committed by
Madan Koyyalamudi
parent
8534447cef
commit
7220f18549
@@ -5567,6 +5567,28 @@ QDF_STATUS reg_get_client_power_for_6ghz_ap(struct wlan_objmgr_pdev *pdev,
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS reg_set_ap_pwr_and_update_chan_list(struct wlan_objmgr_pdev *pdev,
|
||||
enum reg_6g_ap_type ap_pwr_type)
|
||||
{
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
QDF_STATUS status;
|
||||
|
||||
pdev_priv_obj = reg_get_pdev_obj(pdev);
|
||||
if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
|
||||
reg_err("pdev reg component is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
status = reg_set_cur_6g_ap_pwr_type(pdev, ap_pwr_type);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
reg_debug("failed to set AP power type to %d", ap_pwr_type);
|
||||
return status;
|
||||
}
|
||||
|
||||
reg_compute_pdev_current_chan_list(pdev_priv_obj);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool reg_is_regdb_offloaded(struct wlan_objmgr_psoc *psoc)
|
||||
|
@@ -1513,6 +1513,18 @@ QDF_STATUS reg_get_client_power_for_6ghz_ap(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_freq_t chan_freq,
|
||||
bool *is_psd, uint16_t *tx_power,
|
||||
uint16_t *eirp_psd_power);
|
||||
|
||||
/**
|
||||
* reg_set_ap_pwr_and_update_chan_list() - Set the AP power mode and recompute
|
||||
* the current channel list
|
||||
*
|
||||
* @pdev: pdev ptr
|
||||
* @ap_pwr_type: the AP power type to update to
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS reg_set_ap_pwr_and_update_chan_list(struct wlan_objmgr_pdev *pdev,
|
||||
enum reg_6g_ap_type ap_pwr_type);
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
reg_set_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev,
|
||||
@@ -1598,6 +1610,13 @@ QDF_STATUS reg_get_client_power_for_6ghz_ap(struct wlan_objmgr_pdev *pdev,
|
||||
*eirp_psd_power = 0;
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline
|
||||
QDF_STATUS reg_set_ap_pwr_and_update_chan_list(struct wlan_objmgr_pdev *pdev,
|
||||
enum reg_6g_ap_type ap_pwr_type)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HOST_FIND_CHAN
|
||||
|
@@ -759,29 +759,6 @@ enum reg_6g_ap_type reg_decide_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev)
|
||||
|
||||
return ap_pwr_type;
|
||||
}
|
||||
|
||||
QDF_STATUS reg_set_ap_pwr_and_update_chan_list(struct wlan_objmgr_pdev *pdev,
|
||||
enum reg_6g_ap_type ap_pwr_type)
|
||||
{
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
QDF_STATUS status;
|
||||
|
||||
pdev_priv_obj = reg_get_pdev_obj(pdev);
|
||||
if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
|
||||
reg_err("pdev reg component is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
status = reg_set_cur_6g_ap_pwr_type(pdev, ap_pwr_type);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
reg_debug("failed to set AP power type to %d", ap_pwr_type);
|
||||
return status;
|
||||
}
|
||||
|
||||
reg_compute_pdev_current_chan_list(pdev_priv_obj);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* CONFIG_BAND_6GHZ */
|
||||
|
||||
#endif /* CONFIG_REG_CLIENT */
|
||||
|
@@ -383,31 +383,12 @@ bool reg_ignore_default_country(struct wlan_regulatory_psoc_priv_obj *soc_reg,
|
||||
* Return: AP power type
|
||||
*/
|
||||
enum reg_6g_ap_type reg_decide_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev);
|
||||
|
||||
/**
|
||||
* reg_set_ap_pwr_and_update_chan_list() - Set the AP power mode and recompute
|
||||
* the current channel list
|
||||
*
|
||||
* @pdev: pdev ptr
|
||||
* @ap_pwr_type: the AP power type to update to
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS reg_set_ap_pwr_and_update_chan_list(struct wlan_objmgr_pdev *pdev,
|
||||
enum reg_6g_ap_type ap_pwr_type);
|
||||
#else
|
||||
static inline enum reg_6g_ap_type
|
||||
reg_decide_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
return REG_CURRENT_MAX_AP_TYPE;
|
||||
}
|
||||
|
||||
static inline
|
||||
QDF_STATUS reg_set_ap_pwr_and_update_chan_list(struct wlan_objmgr_pdev *pdev,
|
||||
enum reg_6g_ap_type ap_pwr_type)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
#endif /* CONFIG_BAND_6GHZ */
|
||||
#else
|
||||
static inline QDF_STATUS reg_read_current_country(struct wlan_objmgr_psoc *psoc,
|
||||
@@ -512,13 +493,6 @@ reg_decide_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
return REG_CURRENT_MAX_AP_TYPE;
|
||||
}
|
||||
|
||||
static inline
|
||||
QDF_STATUS reg_set_ap_pwr_and_update_chan_list(struct wlan_objmgr_pdev *pdev,
|
||||
enum reg_6g_ap_type ap_pwr_type)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
#endif /* CONFIG_REG_CLIENT */
|
||||
|
||||
#if defined(WLAN_FEATURE_DSRC) && defined(CONFIG_REG_CLIENT)
|
||||
|
Reference in New Issue
Block a user