From a519065a39ebe65156a8225c0dda3d73f6a47d69 Mon Sep 17 00:00:00 2001 From: Priyadarshnee S Date: Wed, 8 Apr 2020 11:58:13 +0530 Subject: [PATCH] qcacmn: Add RX-ops to invoke Rolling CAC DFS APIs Provide global function pointers for accessing DFS APIs that 1. Configures (enable/disable) rolling CAC feature. 2. Retrieves the current configuration of rolling CAC feature. 3. Programs a rolling CAC frequency. 4. Retrieves the current rolling CAC frequency. CRs-Fixed: 2659495 Change-Id: I7fc63d150f4dc1cb5db4d671ff21c01caaf38aaf --- .../lmac_if/inc/wlan_lmac_if_def.h | 10 ++++++++ .../lmac_if/src/wlan_lmac_if.c | 24 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h index 1c58f91766d3..4155de700756 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h +++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h @@ -1626,6 +1626,16 @@ struct wlan_lmac_if_dfs_rx_ops { uint16_t low_5g_freq, uint16_t high_5g_freq); void (*dfs_complete_deferred_tasks)(struct wlan_objmgr_pdev *pdev); +#ifdef QCA_SUPPORT_ADFS_RCAC + QDF_STATUS (*dfs_set_rcac_enable)(struct wlan_objmgr_pdev *pdev, + bool rcac_en); + QDF_STATUS (*dfs_get_rcac_enable)(struct wlan_objmgr_pdev *pdev, + uint8_t *rcac_en); + QDF_STATUS (*dfs_set_rcac_freq)(struct wlan_objmgr_pdev *pdev, + qdf_freq_t rcac_freq); + QDF_STATUS (*dfs_get_rcac_freq)(struct wlan_objmgr_pdev *pdev, + qdf_freq_t *rcac_freq); +#endif }; /** diff --git a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c b/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c index 520fe331914e..26f2f4cbf395 100644 --- a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c +++ b/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c @@ -478,6 +478,29 @@ static void register_dfs_rx_ops_for_ieee(struct wlan_lmac_if_dfs_rx_ops *rx_ops) } #endif +/* + * register_rcac_dfs_rx_ops() - Register DFS RX-Ops for Rolling CAC specific + * APIs. + * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops. + */ +#ifdef QCA_SUPPORT_ADFS_RCAC +static void register_rcac_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) +{ + if (!rx_ops) + return; + + rx_ops->dfs_set_rcac_enable = ucfg_dfs_set_rcac_enable; + rx_ops->dfs_get_rcac_enable = ucfg_dfs_get_rcac_enable; + rx_ops->dfs_set_rcac_freq = ucfg_dfs_set_rcac_freq; + rx_ops->dfs_get_rcac_freq = ucfg_dfs_get_rcac_freq; +} +#else +static inline void +register_rcac_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) +{ +} +#endif + static QDF_STATUS wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) { @@ -562,6 +585,7 @@ wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) register_precac_auto_chan_rx_ops_freq(dfs_rx_ops); register_dfs_rx_ops_for_freq(dfs_rx_ops); register_dfs_rx_ops_for_ieee(dfs_rx_ops); + register_rcac_dfs_rx_ops(dfs_rx_ops); return QDF_STATUS_SUCCESS; }