qcacmn: Add API to get current dfs domain

Add API to get current DFS domain from regulatory component

Change-Id: Iabe4abb0966791e68130ff2d1a7305768893bfcc
CRs-Fixed: 2078153
This commit is contained in:
Abhijit Pradhan 2017-07-18 13:34:15 +05:30 • committed by snandini
commit af06bcbb63
5 changed files with 28 additions and 4 deletions

View file

@ -83,6 +83,23 @@ wlan_lmac_if_get_dfs_rx_ops(struct wlan_objmgr_psoc *psoc)
return &psoc->soc_cb.rx_ops.dfs_rx_ops;
}
/**
* wlan_lmac_if_get_reg_rx_ops() - retrieve the reg rx_ops
* @psoc: psoc context
*
* API to retrieve the reg rx_ops from the psoc context
*
* Return: reg_rx_ops pointer
*/
static inline struct wlan_lmac_if_reg_rx_ops *
wlan_lmac_if_get_reg_rx_ops(struct wlan_objmgr_psoc *psoc)
{
if (!psoc)
return NULL;
return &psoc->soc_cb.rx_ops.reg_rx_ops;
}
/**
* mgmt_txrx_get_nbuf() - retrieve nbuf from mgmt desc_id
* @psoc: psoc context

View file

@ -595,6 +595,8 @@ struct wlan_lmac_if_reg_rx_ops {
bool val);
QDF_STATUS (*reg_set_11d_offloaded)(struct wlan_objmgr_psoc *psoc,
bool val);
QDF_STATUS (*get_dfs_region)(struct wlan_objmgr_pdev *pdev,
enum dfs_reg *dfs_reg);
};
#ifdef CONVERGED_P2P_ENABLE

View file

@ -205,6 +205,9 @@ static void wlan_lmac_if_umac_reg_rx_ops_register(
rx_ops->reg_rx_ops.reg_set_11d_offloaded =
tgt_reg_set_11d_offloaded;
rx_ops->reg_rx_ops.get_dfs_region =
wlan_reg_get_dfs_region;
}
#ifdef CONVERGED_P2P_ENABLE

View file

@ -127,9 +127,9 @@ void wlan_reg_set_channel_params(struct wlan_objmgr_pdev *pdev, uint8_t ch,
* wlan_reg_get_dfs_region () - Get the current dfs region
* @dfs_reg: pointer to dfs region
*
* Return: None
* Return: Status
*/
void wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev,
QDF_STATUS wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev,
enum dfs_reg *dfs_reg);
/**

View file

@ -131,15 +131,17 @@ void wlan_reg_set_channel_params(struct wlan_objmgr_pdev *pdev, uint8_t ch,
* wlan_reg_get_dfs_region () - Get the current dfs region
* @dfs_reg: pointer to dfs region
*
* Return: None
* Return: Status
*/
void wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev,
QDF_STATUS wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev,
enum dfs_reg *dfs_reg)
{
/*
* Get the current dfs region
*/
reg_get_dfs_region(pdev, dfs_reg);
return QDF_STATUS_SUCCESS;
}
uint32_t wlan_reg_get_channel_reg_power(struct wlan_objmgr_pdev *pdev,