qcacmn: Implement API to support GETBAND functionality
Add GETBAND support by implementing API, ucfg_reg_get_band Change-Id: I91fabb367c53aed5ae13a0bb4272965f925d44bd CRs-Fixed: 2412777
This commit is contained in:

committed by
nshrivas

parent
cf1a001281
commit
5d32743e83
@@ -403,6 +403,38 @@ QDF_STATUS reg_set_band(struct wlan_objmgr_pdev *pdev,
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS reg_get_band(struct wlan_objmgr_pdev *pdev,
|
||||||
|
enum band_info *band)
|
||||||
|
{
|
||||||
|
struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj;
|
||||||
|
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||||
|
struct wlan_objmgr_psoc *psoc;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
psoc = wlan_pdev_get_psoc(pdev);
|
||||||
|
if (!psoc) {
|
||||||
|
reg_err("psoc is NULL");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
psoc_priv_obj = reg_get_psoc_obj(psoc);
|
||||||
|
if (!IS_VALID_PSOC_REG_OBJ(psoc_priv_obj)) {
|
||||||
|
reg_err("psoc reg component is NULL");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
reg_debug("getting band_info: %d", pdev_priv_obj->band_capability);
|
||||||
|
*band = pdev_priv_obj->band_capability;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DISABLE_CHANNEL_LIST
|
#ifdef DISABLE_CHANNEL_LIST
|
||||||
QDF_STATUS reg_restore_cached_channels(struct wlan_objmgr_pdev *pdev)
|
QDF_STATUS reg_restore_cached_channels(struct wlan_objmgr_pdev *pdev)
|
||||||
{
|
{
|
||||||
|
@@ -56,21 +56,30 @@ bool reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint32_t ch);
|
|||||||
/**
|
/**
|
||||||
* reg_set_band() - Sets the band information for the PDEV
|
* reg_set_band() - Sets the band information for the PDEV
|
||||||
* @pdev: The physical dev to set the band for
|
* @pdev: The physical dev to set the band for
|
||||||
* @band: The set band parameters to configure for the pysical device
|
* @band: The set band parameters to configure for the physical device
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
QDF_STATUS reg_set_band(struct wlan_objmgr_pdev *pdev, enum band_info band);
|
QDF_STATUS reg_set_band(struct wlan_objmgr_pdev *pdev, enum band_info band);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* reg_get_band() - Get the band information for the PDEV
|
||||||
|
* @pdev: The physical dev to get the band for
|
||||||
|
* @band: The band parameters of the physical device
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS reg_get_band(struct wlan_objmgr_pdev *pdev, enum band_info *band);
|
||||||
|
|
||||||
#ifdef DISABLE_CHANNEL_LIST
|
#ifdef DISABLE_CHANNEL_LIST
|
||||||
/**
|
/**
|
||||||
* reg_restore_cached_channels() - Cache the current state of the channles
|
* reg_restore_cached_channels() - Cache the current state of the channels
|
||||||
* @pdev: The physical dev to cache the channels for
|
* @pdev: The physical dev to cache the channels for
|
||||||
*/
|
*/
|
||||||
QDF_STATUS reg_restore_cached_channels(struct wlan_objmgr_pdev *pdev);
|
QDF_STATUS reg_restore_cached_channels(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* reg_cache_channel_state() - Cache the current state of the channles
|
* reg_cache_channel_state() - Cache the current state of the channels
|
||||||
* @pdev: The physical dev to cache the channels for
|
* @pdev: The physical dev to cache the channels for
|
||||||
* @channel_list: List of the channels for which states needs to be cached
|
* @channel_list: List of the channels for which states needs to be cached
|
||||||
* @num_channels: Number of channels in the list
|
* @num_channels: Number of channels in the list
|
||||||
|
@@ -31,12 +31,22 @@ typedef QDF_STATUS (*reg_event_cb)(void *status_struct);
|
|||||||
/**
|
/**
|
||||||
* ucfg_reg_set_band() - Sets the band information for the PDEV
|
* ucfg_reg_set_band() - Sets the band information for the PDEV
|
||||||
* @pdev: The physical pdev to set the band for
|
* @pdev: The physical pdev to set the band for
|
||||||
* @band: The set band parameter to configure for the pysical device
|
* @band: The set band parameter to configure for the physical device
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
QDF_STATUS ucfg_reg_set_band(struct wlan_objmgr_pdev *pdev,
|
QDF_STATUS ucfg_reg_set_band(struct wlan_objmgr_pdev *pdev,
|
||||||
enum band_info band);
|
enum band_info band);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_reg_get_band() - Gets the band information for the PDEV
|
||||||
|
* @pdev: The physical pdev to get the band for
|
||||||
|
* @band: The band parameter of the physical device
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS ucfg_reg_get_band(struct wlan_objmgr_pdev *pdev,
|
||||||
|
enum band_info *band);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ucfg_reg_notify_sap_event() - Notify regulatory domain for sap event
|
* ucfg_reg_notify_sap_event() - Notify regulatory domain for sap event
|
||||||
|
@@ -117,19 +117,19 @@ QDF_STATUS ucfg_reg_get_current_cc(struct wlan_objmgr_pdev *pdev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_REG_CLIENT
|
#ifdef CONFIG_REG_CLIENT
|
||||||
/**
|
|
||||||
* ucfg_reg_set_band() - Sets the band information for the PDEV
|
|
||||||
* @pdev: The physical pdev to set the band for
|
|
||||||
* @band: The set band parameter to configure for the pysical device
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS
|
|
||||||
*/
|
|
||||||
QDF_STATUS ucfg_reg_set_band(struct wlan_objmgr_pdev *pdev,
|
QDF_STATUS ucfg_reg_set_band(struct wlan_objmgr_pdev *pdev,
|
||||||
enum band_info band)
|
enum band_info band)
|
||||||
{
|
{
|
||||||
return reg_set_band(pdev, band);
|
return reg_set_band(pdev, band);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS ucfg_reg_get_band(struct wlan_objmgr_pdev *pdev,
|
||||||
|
enum band_info *band)
|
||||||
|
{
|
||||||
|
return reg_get_band(pdev, band);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ucfg_reg_notify_sap_event() - Notify regulatory domain for sap event
|
* ucfg_reg_notify_sap_event() - Notify regulatory domain for sap event
|
||||||
* @pdev: The physical dev to set the band for
|
* @pdev: The physical dev to set the band for
|
||||||
|
Reference in New Issue
Block a user