浏览代码

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
Priyadarshnee S 5 年之前
父节点
当前提交
a519065a39

+ 10 - 0
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
 };
 
 /**

+ 24 - 0
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;
 }