Browse Source

qcacmn: Add Global dispatcher support for Synthetic HW pulses

Provide Global function pointers for accessing DFS APIs that
1) allow or prevent the HW pulses. HW pulses are to be prevented
to detect the synthetic pulses.
2) query whether the HW pulses are allowed or not.

Change-Id: Id1e90ba6682afe747774b46da78f7ae6b56c94e6
CRs-Fixed: 2484584
Vignesh U 5 years ago
parent
commit
a0a995d824

+ 6 - 0
umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h

@@ -1267,6 +1267,9 @@ struct wlan_lmac_if_wifi_pos_rx_ops {
  *                                    timeout.
  * @dfs_reset_spoof_test:             Checks if radar detection is enabled.
  * @dfs_is_disable_radar_marking_set: Check if dis_radar_marking param is set.
+ * @dfs_allow_hw_pulses:              Set or unset dfs_allow_hw_pulses which
+ *                                    allow or disallow HW pulses.
+ * @dfs_is_hw_pulses_allowed:         Check if HW pulses are allowed or not.
  */
 struct wlan_lmac_if_dfs_rx_ops {
 	QDF_STATUS (*dfs_get_radars)(struct wlan_objmgr_pdev *pdev);
@@ -1375,6 +1378,9 @@ struct wlan_lmac_if_dfs_rx_ops {
 			bool value);
 	QDF_STATUS (*dfs_is_bw_reduction_needed)(struct wlan_objmgr_pdev *pdev,
 			bool *bw_reduce);
+	void (*dfs_allow_hw_pulses)(struct wlan_objmgr_pdev *pdev,
+				    bool allow_hw_pulses);
+	bool (*dfs_is_hw_pulses_allowed)(struct wlan_objmgr_pdev *pdev);
 };
 
 /**

+ 4 - 0
umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c

@@ -428,6 +428,10 @@ wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
 		utils_dfs_bw_reduce;
 	dfs_rx_ops->dfs_is_bw_reduction_needed =
 		utils_dfs_is_bw_reduce;
+	dfs_rx_ops->dfs_allow_hw_pulses =
+		ucfg_dfs_allow_hw_pulses;
+	dfs_rx_ops->dfs_is_hw_pulses_allowed =
+		ucfg_dfs_is_hw_pulses_allowed;
 
 	register_precac_auto_chan_rx_ops(dfs_rx_ops);