Browse Source

qcacmn: Clean ucfg_mlme components from wlan_hdd_cfg80211_start_bss

Get the tx_leakage_threshold value directly in
tgt_dfs_set_tx_leakage_threshold from
ucfg_mlme_get_sap_tx_leakage_threshold instead
of passing from wlan_hdd_cfg80211_start_bss.

Change-Id: If8f5b85c03c01b984b7c05d72d40baca0e19c3cc
CRs-Fixed: 2418358
Harprit Chhabada 6 years ago
parent
commit
2a1bc9e488

+ 2 - 5
umac/dfs/dispatcher/inc/wlan_dfs_tgt_api.h

@@ -277,16 +277,13 @@ QDF_STATUS tgt_dfs_destroy_object(struct wlan_objmgr_pdev *pdev);
 /**
  * tgt_dfs_set_tx_leakage_threshold() - set tx_leakage_threshold.
  * @pdev: Pointer to DFS pdev object.
- * @tx_leakage_threshold: tx leakage threshold for dfs.
  *
  * Return QDF_STATUS.
  */
-QDF_STATUS tgt_dfs_set_tx_leakage_threshold(struct wlan_objmgr_pdev *pdev,
-		uint16_t tx_leakage_threshold);
+QDF_STATUS tgt_dfs_set_tx_leakage_threshold(struct wlan_objmgr_pdev *pdev);
 #else
 static inline QDF_STATUS tgt_dfs_set_tx_leakage_threshold
-		(struct wlan_objmgr_pdev *pdev,
-		uint16_t tx_leakage_threshold)
+		(struct wlan_objmgr_pdev *pdev)
 {
 	return QDF_STATUS_SUCCESS;
 }

+ 16 - 2
umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c

@@ -33,6 +33,9 @@
 #include "../../core/src/dfs_process_radar_found_ind.h"
 #include <qdf_module.h>
 #include "../../core/src/dfs_partial_offload_radar.h"
+#ifdef QCA_MCL_DFS_SUPPORT
+#include "wlan_mlme_ucfg_api.h"
+#endif
 
 struct wlan_lmac_if_dfs_tx_ops *
 wlan_psoc_get_dfs_txops(struct wlan_objmgr_psoc *psoc)
@@ -301,18 +304,29 @@ QDF_STATUS tgt_dfs_destroy_object(struct wlan_objmgr_pdev *pdev)
 qdf_export_symbol(tgt_dfs_destroy_object);
 
 #ifdef QCA_MCL_DFS_SUPPORT
-QDF_STATUS tgt_dfs_set_tx_leakage_threshold(struct wlan_objmgr_pdev *pdev,
-		uint16_t tx_leakage_threshold)
+QDF_STATUS tgt_dfs_set_tx_leakage_threshold(struct wlan_objmgr_pdev *pdev)
 {
 	struct wlan_dfs *dfs;
+	uint32_t tx_leakage_threshold = 0;
+	struct wlan_objmgr_psoc *psoc;
+
+	psoc = wlan_pdev_get_psoc(pdev);
+	if (!psoc) {
+		dfs_err(NULL, WLAN_DEBUG_DFS_ALWAYS, "psoc is null");
+		return QDF_STATUS_E_FAILURE;
+	}
 
 	dfs = wlan_pdev_get_dfs_obj(pdev);
 	if (!dfs) {
 		dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,  "dfs is NULL");
 		return  QDF_STATUS_E_FAILURE;
 	}
+	ucfg_mlme_get_sap_tx_leakage_threshold(psoc,
+					       &tx_leakage_threshold);
 
 	dfs->tx_leakage_threshold = tx_leakage_threshold;
+	dfs_debug(dfs, WLAN_DEBUG_DFS_ALWAYS,
+		  "dfs tx_leakage_threshold = %d", dfs->tx_leakage_threshold);
 
 	return QDF_STATUS_SUCCESS;
 }