qcacmn: Post various events to the RCAC state machine

Trigger Rolling CAC SM events from
 - NOL expiry (EV_RCAC_START) to trigger RCAC START with a
   new channel if possible and not already running.
 - Agile radar (EV_ADFS_RADAR_FOUND) to restart RCAC with a
   new random channel.
 - vdev restart (EV_RCAC_STOP) to stop the running RCAC when
   the primary channel changes. Start will be based on the
   availability of the new channel.

In case of the rolling CAC feature, a channel is programmed to
the agile detector on which CAC is running continuously.
Introduce an API that finds an RCAC completed channel and return
the channel params which will be used for the next channel
change.

Also add a boolean argument in  dfs_set_current_channel api to
indicate if the dfs current channel is updated in the API
"dfs_set_current_channel".

CRs-Fixed: 2674621
Change-Id: Ica54a57f131cd54e47138f1cbeef2dd0023390ed
This commit is contained in:
Vignesh Mohan
2020-04-20 17:23:10 +05:30
committed by nshrivas
parent 12cc7c6558
commit a208da2cfc
13 changed files with 182 additions and 65 deletions

View File

@@ -114,7 +114,8 @@ tgt_dfs_set_current_channel_for_freq(struct wlan_objmgr_pdev *pdev,
uint8_t dfs_chan_vhtop_freq_seg1,
uint8_t dfs_chan_vhtop_freq_seg2,
uint16_t dfs_chan_mhz_freq_seg1,
uint16_t dfs_chan_mhz_freq_seg2)
uint16_t dfs_chan_mhz_freq_seg2,
bool *is_channel_updated)
{
struct wlan_dfs *dfs;
@@ -135,7 +136,8 @@ tgt_dfs_set_current_channel_for_freq(struct wlan_objmgr_pdev *pdev,
dfs_chan_vhtop_freq_seg1,
dfs_chan_vhtop_freq_seg2,
dfs_chan_mhz_freq_seg1,
dfs_chan_mhz_freq_seg2);
dfs_chan_mhz_freq_seg2,
is_channel_updated);
return QDF_STATUS_SUCCESS;
}

View File

@@ -1621,11 +1621,10 @@ void utils_dfs_reset_dfs_prevchan(struct wlan_objmgr_pdev *pdev)
#ifdef QCA_SUPPORT_ADFS_RCAC
void utils_dfs_rcac_sm_deliver_evt(struct wlan_objmgr_pdev *pdev,
enum dfs_rcac_sm_evt event,
uint16_t event_data_len,
void *event_data)
enum dfs_rcac_sm_evt event)
{
struct wlan_dfs *dfs;
void *event_data;
if (!tgt_dfs_is_pdev_5ghz(pdev))
return;
@@ -1636,9 +1635,41 @@ void utils_dfs_rcac_sm_deliver_evt(struct wlan_objmgr_pdev *pdev,
return;
}
if (!dfs_is_agile_rcac_enabled(dfs))
return;
event_data = (void *)dfs;
dfs_rcac_sm_deliver_evt(dfs->dfs_soc_obj,
event,
event_data_len,
0,
event_data);
}
#endif /* QCA_SUPPORT_ADFS_RCAC */
QDF_STATUS utils_dfs_get_rcac_channel(struct wlan_objmgr_pdev *pdev,
struct ch_params *chan_params,
qdf_freq_t *target_chan_freq)
{
struct wlan_dfs *dfs = NULL;
QDF_STATUS status = QDF_STATUS_E_FAILURE;
if (!target_chan_freq)
return status;
*target_chan_freq = 0;
dfs = wlan_pdev_get_dfs_obj(pdev);
if (!dfs) {
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "null dfs");
return status;
}
if (!dfs_is_agile_rcac_enabled(dfs))
return status;
*target_chan_freq = dfs->dfs_rcac_param.rcac_pri_freq;
chan_params = &dfs->dfs_rcac_param.rcac_ch_params;
return QDF_STATUS_SUCCESS;
}
#endif