qcacmn: Add DFS APIs for Rolling CAC feature

Feature Description:
FCC/JP domains do not support PreCAC. However, we can always start
beaconning in a channel if we have completed CAC in that channel for more
than or equal to the CAC period of that channel.
If an Agile engine is available and the next channel is known, we can
start CAC in the next channel using agile, while continuing the Tx/Rx
in the current channel. And when we want to start beaconning in the
next channel after a radar detection (or after/for a user request) we can
do so without any new CAC. This allows us to jump to the new channel
without having to disrupt any ongoing data traffic. This type of
continuous CAC in the next channel while operating in the current channel
is known as Rolling CAC.

Following changes are implemented:
I)Per DFS PDEV:
1) 'dfs_agile_rcac_freq' to store agile RCAC frequency.
2) 'dfs_agile_rcac_ucfg' to enable/disable RCAC feature.

II)Per DFS PSOC:
1) 'dfs_rcac_timer' is the only RCAC timer for the device/Psoc. This will
be shared by pdev level dfs objects.
2) 'dfs_rcac_timer_running' to indicate if RCAC is running or not.

III) New APIs:
1. A dispatcher API 'ucfg_dfs_set_rcac_enable' to set rcac config.
2. A dispatcher API 'ucfg_dfs_get_rcac_enable' to get rcac_config.
3. A dispatcher API 'ucfg_dfs_set_rcac_freq' to set user configured
rcac freq.
4. A dispatcher API 'ucfg_dfs_get_rcac_freq' to get the user configured
rcac freq.
5. Rolling CAC timer init/deinit APIs.

CRs-Fixed: 2659666
Change-Id: Iae002b2ab77964fca4faf237b0d0a4e2f2afe4c2
This commit is contained in:
Priyadarshnee S
2020-04-08 14:12:51 +05:30
committed by nshrivas
vanhempi 87df3e8c2d
commit 4dab98d3ce
5 muutettua tiedostoa jossa 280 lisäystä ja 1 poistoa

Näytä tiedosto

@@ -195,6 +195,9 @@ static QDF_STATUS dfs_psoc_obj_create_notification(struct wlan_objmgr_psoc *psoc
/* Initialize precac timer here*/
dfs_zero_cac_timer_init(dfs_soc_obj);
/* Initialize Rolling CAC timer */
dfs_rcac_timer_init(dfs_soc_obj);
dfs_debug(NULL, WLAN_DEBUG_DFS1,
"DFS obj attach to psoc successfully");
@@ -222,6 +225,7 @@ static QDF_STATUS dfs_psoc_obj_destroy_notification(struct wlan_objmgr_psoc *pso
return QDF_STATUS_E_FAILURE;
}
dfs_rcac_timer_deinit(dfs_soc_obj);
dfs_zero_cac_timer_detach(dfs_soc_obj);
status = wlan_objmgr_psoc_component_obj_detach(psoc,

Näytä tiedosto

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
*
*
* Permission to use, copy, modify, and/or distribute this software for
@@ -448,3 +448,77 @@ QDF_STATUS ucfg_dfs_reinit_timers(struct wlan_objmgr_pdev *pdev)
}
qdf_export_symbol(ucfg_dfs_reinit_timers);
#ifdef QCA_SUPPORT_ADFS_RCAC
QDF_STATUS ucfg_dfs_set_rcac_enable(struct wlan_objmgr_pdev *pdev,
bool rcac_en)
{
struct wlan_dfs *dfs;
dfs = wlan_pdev_get_dfs_obj(pdev);
if (!dfs) {
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "null dfs");
return QDF_STATUS_E_FAILURE;
}
dfs_set_rcac_enable(dfs, rcac_en);
return QDF_STATUS_SUCCESS;
}
qdf_export_symbol(ucfg_dfs_set_rcac_enable);
QDF_STATUS ucfg_dfs_get_rcac_enable(struct wlan_objmgr_pdev *pdev,
uint8_t *rcac_en)
{
struct wlan_dfs *dfs;
dfs = wlan_pdev_get_dfs_obj(pdev);
if (!dfs) {
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "null dfs");
return QDF_STATUS_E_FAILURE;
}
dfs_get_rcac_enable(dfs, rcac_en);
return QDF_STATUS_SUCCESS;
}
qdf_export_symbol(ucfg_dfs_get_rcac_enable);
QDF_STATUS ucfg_dfs_set_rcac_freq(struct wlan_objmgr_pdev *pdev,
qdf_freq_t rcac_freq)
{
struct wlan_dfs *dfs;
dfs = wlan_pdev_get_dfs_obj(pdev);
if (!dfs) {
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "null dfs");
return QDF_STATUS_E_FAILURE;
}
dfs_set_rcac_freq(dfs, rcac_freq);
return QDF_STATUS_SUCCESS;
}
qdf_export_symbol(ucfg_dfs_set_rcac_freq);
QDF_STATUS ucfg_dfs_get_rcac_freq(struct wlan_objmgr_pdev *pdev,
qdf_freq_t *rcac_freq)
{
struct wlan_dfs *dfs;
dfs = wlan_pdev_get_dfs_obj(pdev);
if (!dfs) {
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "null dfs");
return QDF_STATUS_E_FAILURE;
}
dfs_get_rcac_freq(dfs, rcac_freq);
return QDF_STATUS_SUCCESS;
}
qdf_export_symbol(ucfg_dfs_get_rcac_freq);
#endif