qcacmn: Initialize DFS radar table based on dfsdomain

* Initialize the radar table based on dfsdomain for country
  KOREA and CHINA.
* Move UMAC related APIs from lmac_api.c to utils_api.c  file.

Change-Id: I9dc2acdf23fc10469884d23bb91f352d2ac259ca
CRs-Fixed: 2110760
这个提交包含在:
Shashikala Prabhu
2017-10-06 09:31:56 +05:30
提交者 Nandini Suresh
父节点 b432fc0ef7
当前提交 41eff4f752
修改 12 个文件,包含 74 行新增113 行删除

查看文件

@@ -75,12 +75,6 @@ uint64_t lmac_get_tsf64(struct wlan_objmgr_pdev *pdev);
*/
void lmac_dfs_disable(struct wlan_objmgr_pdev *pdev, int no_cac);
/**
* lmac_get_dfsdomain() - Get DFS domain.
* @pdev: Pointer to PDEV structure.
*/
int lmac_get_dfsdomain(struct wlan_objmgr_pdev *pdev);
/**
* lmac_dfs_enable() - Enable DFS.
* @pdev: Pointer to PDEV structure.
@@ -147,12 +141,6 @@ uint16_t lmac_get_ah_devid(struct wlan_objmgr_pdev *pdev);
*/
uint32_t lmac_get_ext_busy(struct wlan_objmgr_pdev *pdev);
/**
* lmac_is_countryCode_KOREA_ROC3() - Check is county code Korea.
* @pdev: Pointer to PDEV structure.
*/
bool lmac_is_countryCode_KOREA_ROC3(struct wlan_objmgr_pdev *pdev);
/**
* lmac_set_use_cac_prssi() - Set use_cac_prssi value.
* @pdev: Pointer to PDEV structure.
@@ -165,12 +153,6 @@ void lmac_set_use_cac_prssi(struct wlan_objmgr_pdev *pdev);
*/
uint32_t lmac_get_target_type(struct wlan_objmgr_pdev *pdev);
/**
* lmac_is_countryCode_CHINA() - Check is country code CHINA.
* @pdev: Pointer to PDEV structure.
*/
bool lmac_is_countryCode_CHINA(struct wlan_objmgr_pdev *pdev);
/**
* lmac_get_phymode_info() - Get phymode info.
* @pdev: Pointer to PDEV structure.

查看文件

@@ -432,8 +432,19 @@ uint32_t utils_dfs_chan_to_freq(uint8_t chan);
* @pdev: Pointer to DFS pdev object.
* @flags: New channel flags
* @flagext: New Extended flags
*
* Return: QDF_STATUS
*/
QDF_STATUS utils_dfs_update_cur_chan_flags(struct wlan_objmgr_pdev *pdev,
uint64_t flags,
uint16_t flagext);
/**
* utils_get_dfsdomain() - Get DFS domain.
* @pdev: Pointer to PDEV structure.
*
* Return: DFS domain.
*/
int utils_get_dfsdomain(struct wlan_objmgr_pdev *pdev);
#endif /* _WLAN_DFS_UTILS_API_H_ */

查看文件

@@ -85,15 +85,6 @@ void lmac_dfs_disable(struct wlan_objmgr_pdev *pdev, int no_cac)
dfs_tx_ops->dfs_disable(pdev, no_cac);
}
int lmac_get_dfsdomain(struct wlan_objmgr_pdev *pdev)
{
enum dfs_reg dfsdomain;
wlan_reg_get_dfs_region(pdev, &dfsdomain);
return dfsdomain;
}
void lmac_dfs_enable(struct wlan_objmgr_pdev *pdev,
int *is_fastclk,
int32_t pe_firpwr,
@@ -204,24 +195,6 @@ uint32_t lmac_get_ext_busy(struct wlan_objmgr_pdev *pdev)
return ext_chan_busy;
}
bool lmac_is_countryCode_KOREA_ROC3(struct wlan_objmgr_pdev *pdev)
{
struct wlan_objmgr_psoc *psoc;
struct wlan_lmac_if_dfs_tx_ops *dfs_tx_ops;
bool ctry_korea = false;
psoc = wlan_pdev_get_psoc(pdev);
dfs_tx_ops = &psoc->soc_cb.tx_ops.dfs_tx_ops;
if (dfs_tx_ops->dfs_is_countryCode_KOREA_ROC3)
dfs_tx_ops->dfs_is_countryCode_KOREA_ROC3(pdev,
&ctry_korea);
return ctry_korea;
}
void lmac_set_use_cac_prssi(struct wlan_objmgr_pdev *pdev)
{
struct wlan_objmgr_psoc *psoc;
@@ -251,22 +224,6 @@ uint32_t lmac_get_target_type(struct wlan_objmgr_pdev *pdev)
return target_type;
}
bool lmac_is_countryCode_CHINA(struct wlan_objmgr_pdev *pdev)
{
struct wlan_objmgr_psoc *psoc;
struct wlan_lmac_if_dfs_tx_ops *dfs_tx_ops;
bool country_china = false;
psoc = wlan_pdev_get_psoc(pdev);
dfs_tx_ops = &psoc->soc_cb.tx_ops.dfs_tx_ops;
if (dfs_tx_ops->dfs_is_countryCode_CHINA)
dfs_tx_ops->dfs_is_countryCode_CHINA(pdev, &country_china);
return country_china;
}
uint32_t lmac_get_phymode_info(struct wlan_objmgr_pdev *pdev,
uint32_t chan_mode)
{

查看文件

@@ -761,3 +761,12 @@ uint32_t utils_dfs_chan_to_freq(uint8_t chan)
return DFS_5_GHZ_BASE_FREQ + (chan * DFS_CHAN_SPACING_5MHZ);
}
EXPORT_SYMBOL(utils_dfs_chan_to_freq);
int utils_get_dfsdomain(struct wlan_objmgr_pdev *pdev)
{
enum dfs_reg dfsdomain;
wlan_reg_get_dfs_region(pdev, &dfsdomain);
return dfsdomain;
}