qcacmn: Add a public API to check if channel is in NOL

Add necessary wrapper functions so that other components/umac
can check if a HT20 channel is in NOL.

Change-Id: Ie2cda1fe8f71d829e261ebdcf4563a4c2ff352ae
CRs-Fixed: 2180879
This commit is contained in:
Shashikala Prabhu 2018-07-27 16:01:27 +05:30 • committed by nshrivas
commit ce86ecdfd3
4 changed files with 34 additions and 10 deletions

View file

@ -2321,4 +2321,15 @@ int dfs_second_segment_radar_disable(struct wlan_dfs *dfs);
*/
void dfs_task_testtimer_reset(struct wlan_dfs *dfs);
/**
* dfs_freq_is_in_nol() - check if given channel in nol list
* @dfs: Pointer to wlan_dfs structure
* @freq: channel frequency
*
* check if given channel in nol list.
*
* Return: true if channel in nol, false else
*/
bool dfs_freq_is_in_nol(struct wlan_dfs *dfs, uint32_t freq);
#endif /* _DFS_H_ */

View file

@ -1206,16 +1206,7 @@ static void dfs_remove_cur_ch_from_list(
return;
}
/**
* dfs_freq_is_in_nol()- check if given channel in nol list
* @dfs: dfs handler
* @freq: channel frequency.
*
* check if given channel in nol list.
*
* Return: true if channel in nol, false else
*/
static bool dfs_freq_is_in_nol(struct wlan_dfs *dfs, uint32_t freq)
bool dfs_freq_is_in_nol(struct wlan_dfs *dfs, uint32_t freq)
{
struct dfs_nolelem *nol;

View file

@ -97,6 +97,17 @@ QDF_STATUS utils_dfs_cac_valid_reset(struct wlan_objmgr_pdev *pdev,
*/
QDF_STATUS utils_dfs_reset(struct wlan_objmgr_pdev *pdev);
/**
* utils_dfs_freq_is_in_nol() - check if given channel in nol list
* @pdev: Pointer to DFS pdev object
* @freq: channel frequency
*
* check if given channel in nol list.
*
* Return: true if channel in nol, false else
*/
bool utils_dfs_freq_is_in_nol(struct wlan_objmgr_pdev *pdev, uint32_t freq);
/**
* utils_dfs_reset_precaclists() - Clears and initiakizes precac_required_list,
* precac_done_list and precac_nol_list.

View file

@ -57,6 +57,17 @@ QDF_STATUS utils_dfs_reset(struct wlan_objmgr_pdev *pdev)
return QDF_STATUS_SUCCESS;
}
bool utils_dfs_freq_is_in_nol(struct wlan_objmgr_pdev *pdev, uint32_t freq)
{
struct wlan_dfs *dfs;
dfs = global_dfs_to_mlme.pdev_get_comp_private_obj(pdev);
if (!dfs)
return false;
return dfs_freq_is_in_nol(dfs, freq);
}
QDF_STATUS utils_dfs_cac_valid_reset(struct wlan_objmgr_pdev *pdev,
uint8_t prevchan_ieee,
uint32_t prevchan_flags)