qcacmn: Add a dispatcher API to determine if RCAC is supported
Add a dispatcher API ucfg_dfs_is_agile_rcac_enabled() to determine if RCAC is supported for the given pdev. Change the prototype of dfs_get_rcac_enable() to store rcac config in a bool datatype. Also, do a structure copy of ch_params of RCAC channel in utils_dfs_get_rcac_channel(). CRs-Fixed: 2679975 Change-Id: I4b033463fc8111144bfffd3bb7e7d2bef6568c46
Este cometimento está contido em:

cometido por
nshrivas

ascendente
edab7cf824
cometimento
78bb108d7c
@@ -623,11 +623,11 @@ ucfg_dfs_set_rcac_enable(struct wlan_objmgr_pdev *pdev,
|
||||
*/
|
||||
#ifdef QCA_SUPPORT_ADFS_RCAC
|
||||
QDF_STATUS ucfg_dfs_get_rcac_enable(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t *rcac_en);
|
||||
bool *rcac_en);
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
ucfg_dfs_get_rcac_enable(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t *rcac_en)
|
||||
bool *rcac_en)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -669,4 +669,27 @@ ucfg_dfs_get_rcac_freq(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ucfg_dfs_is_agile_rcac_enabled() - Determine if Rolling CAC is supported
|
||||
* or not.
|
||||
* @pdev: Pointer to struct wlan_objmgr_pdev.
|
||||
*
|
||||
* Following are the conditions needed to assertain that rolling CAC
|
||||
* is enabled:
|
||||
* 1. DFS domain of the PDEV must be FCC or MKK.
|
||||
* 2. User has enabled Rolling CAC configuration.
|
||||
* 3. FW capability to support ADFS.
|
||||
*
|
||||
* Return: True if RCAC support is enabled, false otherwise.
|
||||
*/
|
||||
#ifdef QCA_SUPPORT_ADFS_RCAC
|
||||
bool ucfg_dfs_is_agile_rcac_enabled(struct wlan_objmgr_pdev *pdev);
|
||||
#else
|
||||
static inline bool
|
||||
ucfg_dfs_is_agile_rcac_enabled(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _WLAN_DFS_UCFG_API_H_ */
|
||||
|
@@ -469,7 +469,7 @@ QDF_STATUS ucfg_dfs_set_rcac_enable(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_export_symbol(ucfg_dfs_set_rcac_enable);
|
||||
|
||||
QDF_STATUS ucfg_dfs_get_rcac_enable(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t *rcac_en)
|
||||
bool *rcac_en)
|
||||
{
|
||||
struct wlan_dfs *dfs;
|
||||
|
||||
@@ -521,4 +521,19 @@ QDF_STATUS ucfg_dfs_get_rcac_freq(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
|
||||
qdf_export_symbol(ucfg_dfs_get_rcac_freq);
|
||||
|
||||
bool ucfg_dfs_is_agile_rcac_enabled(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
struct wlan_dfs *dfs;
|
||||
|
||||
dfs = wlan_pdev_get_dfs_obj(pdev);
|
||||
if (!dfs) {
|
||||
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "null dfs");
|
||||
return false;
|
||||
}
|
||||
|
||||
return dfs_is_agile_rcac_enabled(dfs);
|
||||
}
|
||||
|
||||
qdf_export_symbol(ucfg_dfs_is_agile_rcac_enabled);
|
||||
#endif
|
||||
|
@@ -1668,7 +1668,7 @@ QDF_STATUS utils_dfs_get_rcac_channel(struct wlan_objmgr_pdev *pdev,
|
||||
return status;
|
||||
|
||||
*target_chan_freq = dfs->dfs_rcac_param.rcac_pri_freq;
|
||||
chan_params = &dfs->dfs_rcac_param.rcac_ch_params;
|
||||
*chan_params = dfs->dfs_rcac_param.rcac_ch_params;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador