qcacmn: Retrieve DFS channel parameters such as CAC, NOL, state

Add APIs to fetch the DFS channel parameters such as CAC, NOL and the
channel state to the user application.
struct dfs_cacelem is defined to store all the CAC related information
such as cac start time, cac completed time and the cac timeout.
dfs_cacelems is stored for NUM_5GHZ_CHANS in the dfs pdev object.
dfs_handle_cac_events() API is used to handle CAC related events such
as WLAN_EV_CAC_COMPLETED, WLAN_EV_CAC_RESET and radar during CAC.

CRs-Fixed: 3428828
Change-Id: I82f7aafeb20222d9722bed5a1a8c10b5703ac975
このコミットが含まれているのは:
Priyadarshnee Srinivasan
2023-03-06 22:03:07 +05:30
committed by Madan Koyyalamudi
コミット 70a7674b32
6個のファイルの変更95行の追加16行の削除

ファイルの表示

@@ -186,6 +186,7 @@ struct dfs_agile_cac_params {
* DFS channel.
* @CH_DFS_S_PRECAC_COMPLETED: Indicates that the PreCAC has been completed for
* the DFS channel.
* @CH_DFS_S_NON_DFS: Indicates that it is a non-DFS channel.
*/
enum channel_dfs_state {
CH_DFS_S_INVALID,
@@ -195,5 +196,6 @@ enum channel_dfs_state {
CH_DFS_S_NOL,
CH_DFS_S_PRECAC_STARTED,
CH_DFS_S_PRECAC_COMPLETED,
CH_DFS_S_NON_DFS,
};
#endif

ファイルの表示

@@ -81,7 +81,7 @@
/* WLAN 5GHz channel number 170 freq */
#define DFS_CHAN_170_FREQ (5852)
#define IS_CHAN_DFS(_flags) ((_flags) & REGULATORY_CHAN_RADAR)
extern struct dfs_to_mlme global_dfs_to_mlme;
@@ -977,4 +977,16 @@ QDF_STATUS dfs_init_chan_state_array(struct wlan_objmgr_pdev *pdev)
* Return: QDF_STATUS.
*/
QDF_STATUS utils_dfs_radar_enable(struct wlan_objmgr_pdev *pdev);
/**
* utils_dfs_convert_freq_to_index() - Converts a channel frequency
* to the DFS channel state array index. The input frequency should be a 5 GHz
* channel frequency and this check should be done in the caller.
*
* @freq: Input DFS channel frequency.
* @index: Output DFS channel state array index.
*
* Return: None.
*/
void utils_dfs_convert_freq_to_index(qdf_freq_t freq, int8_t *index);
#endif /* _WLAN_DFS_UTILS_API_H_ */