Переглянути джерело

qcacld-3.0: Initial dsc psoc deployement for vendor command

Integrate dsc psoc infrastructure to the vendor commands.

Change-Id: Ic50d7ec0bd32c835e3125a9c895b74cae4d15f09
CRs-Fixed: 2362332
Arunk Khandavalli 6 роки тому
батько
коміт
99716d177a

+ 126 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -118,6 +118,9 @@
 #include <wlan_hdd_sar_limits.h>
 #include <wlan_hdd_ota_test.h>
 #include "wlan_policy_mgr_ucfg.h"
+#include <wlan_hdd_dsc.h>
+#include "wlan_mlme_ucfg_api.h"
+#include "wlan_mlme_public_struct.h"
 #include "wlan_extscan_ucfg_api.h"
 #include "wlan_mlme_ucfg_api.h"
 #include "wlan_pmo_cfg.h"
@@ -819,12 +822,19 @@ wlan_hdd_cfg80211_get_tdls_capabilities(struct wiphy *wiphy,
 					int data_len)
 {
 	int ret;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_get_tdls_capabilities(wiphy, wdev,
 							data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
 	return ret;
 }
 
@@ -1567,11 +1577,18 @@ static int is_driver_dfs_capable(struct wiphy *wiphy,
 				 int data_len)
 {
 	int ret;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+	QDF_STATUS status;
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __is_driver_dfs_capable(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
 	return ret;
 }
 
@@ -3237,12 +3254,20 @@ wlan_hdd_cfg80211_get_supported_features(struct wiphy *wiphy,
 					const void *data, int data_len)
 {
 	int ret = 0;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_get_supported_features(wiphy, wdev,
 						data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
+
 	return ret;
 }
 
@@ -3542,12 +3567,20 @@ wlan_hdd_cfg80211_get_features(struct wiphy *wiphy,
 		const void *data, int data_len)
 {
 	int ret;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_get_features(wiphy, wdev,
 					       data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
+
 	return ret;
 }
 
@@ -4351,12 +4384,20 @@ static int wlan_hdd_cfg80211_disable_dfs_chan_scan(struct wiphy *wiphy,
 						   int data_len)
 {
 	int ret;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_disable_dfs_chan_scan(wiphy, wdev,
 							data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
+
 	return ret;
 }
 
@@ -4744,10 +4785,18 @@ wlan_hdd_cfg80211_get_wifi_info(struct wiphy *wiphy,
 {
 	int ret;
 
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
+
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_get_wifi_info(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
 	return ret;
 }
 
@@ -4826,12 +4875,20 @@ wlan_hdd_cfg80211_get_logger_supp_feature(struct wiphy *wiphy,
 		const void *data, int data_len)
 {
 	int ret;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_get_logger_supp_feature(wiphy, wdev,
 							  data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
+
 	return ret;
 }
 
@@ -6814,12 +6871,20 @@ static int wlan_hdd_cfg80211_wifi_logger_start(struct wiphy *wiphy,
 		int data_len)
 {
 	int ret = 0;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_wifi_logger_start(wiphy,
 			wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
+
 	return ret;
 }
 
@@ -6927,11 +6992,18 @@ static int wlan_hdd_cfg80211_wifi_logger_get_ring_data(struct wiphy *wiphy,
 		int data_len)
 {
 	int ret = 0;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_wifi_logger_get_ring_data(wiphy,
 			wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
+	dsc_psoc_op_stop(dsc_psoc);
 
 	return ret;
 }
@@ -7546,12 +7618,20 @@ static int wlan_hdd_cfg80211_get_preferred_freq_list(struct wiphy *wiphy,
 						 int data_len)
 {
 	int ret = 0;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_get_preferred_freq_list(wiphy, wdev,
 						data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
+
 	return ret;
 }
 
@@ -7969,11 +8049,19 @@ static int wlan_hdd_cfg80211_acs_dfs_mode(struct wiphy *wiphy,
 		const void *data, int data_len)
 {
 	int ret;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_acs_dfs_mode(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
+
 	return ret;
 }
 
@@ -8327,11 +8415,19 @@ static int wlan_hdd_cfg80211_avoid_freq(struct wiphy *wiphy,
 		const void *data, int data_len)
 {
 	int ret;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+	QDF_STATUS status;
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_avoid_freq(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
+
 	return ret;
 }
 
@@ -8758,12 +8854,19 @@ static int wlan_hdd_cfg80211_get_wakelock_stats(struct wiphy *wiphy,
 						const void *data, int data_len)
 {
 	int ret;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_get_wakelock_stats(wiphy, wdev, data,
 								data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
 	return ret;
 }
 
@@ -8841,11 +8944,18 @@ static int wlan_hdd_cfg80211_get_bus_size(struct wiphy *wiphy,
 					  const void *data, int data_len)
 {
 	int ret;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_get_bus_size(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
 	return ret;
 }
 
@@ -9651,12 +9761,20 @@ static int wlan_hdd_cfg80211_set_sar_power_limits(struct wiphy *wiphy,
 						  int data_len)
 {
 	int ret;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+	QDF_STATUS status;
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_set_sar_power_limits(wiphy, wdev, data,
 					      data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
+
 	return ret;
 }
 
@@ -10212,11 +10330,19 @@ static int wlan_hdd_cfg80211_set_trace_level(struct wiphy *wiphy,
 						int data_len)
 {
 	int ret;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_set_trace_level(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
+
 	return ret;
 }
 

+ 9 - 0
core/hdd/src/wlan_hdd_ext_scan.c

@@ -27,6 +27,7 @@
 
 #include "wlan_hdd_ext_scan.h"
 #include "wlan_hdd_regulatory.h"
+#include <wlan_hdd_dsc.h>
 #include "cds_utils.h"
 #include "cds_sched.h"
 #include <qca_vendor.h>
@@ -2494,12 +2495,20 @@ int wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
 					const void *data, int data_len)
 {
 	int ret = 0;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_extscan_get_valid_channels(wiphy, wdev, data,
 			data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
+
 	return ret;
 }
 

+ 9 - 0
core/hdd/src/wlan_hdd_he.c

@@ -25,6 +25,7 @@
 
 #include "wlan_hdd_main.h"
 #include "wlan_hdd_he.h"
+#include <wlan_hdd_dsc.h>
 #include "wma_he.h"
 #include "wlan_utility.h"
 #include "wlan_mlme_ucfg_api.h"
@@ -209,10 +210,18 @@ int wlan_hdd_cfg80211_get_he_cap(struct wiphy *wiphy,
 				 int data_len)
 {
 	int ret;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_get_he_cap(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
+
 	return ret;
 }

+ 9 - 0
core/hdd/src/wlan_hdd_nan.c

@@ -31,6 +31,7 @@
 #include "nan_api.h"
 #include "wlan_hdd_main.h"
 #include "wlan_hdd_nan.h"
+#include <wlan_hdd_dsc.h>
 #include <qca_vendor.h>
 #include "cfg_nan_api.h"
 
@@ -103,11 +104,19 @@ int wlan_hdd_cfg80211_nan_request(struct wiphy *wiphy,
 
 {
 	int ret;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_nan_request(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
+
 	return ret;
 }
 

+ 8 - 0
core/hdd/src/wlan_hdd_nan_datapath.c

@@ -28,6 +28,7 @@
 #include <linux/etherdevice.h>
 #include "wlan_hdd_includes.h"
 #include "wlan_hdd_p2p.h"
+#include <wlan_hdd_dsc.h>
 #include "wma_api.h"
 #include "wlan_hdd_assoc.h"
 #include "sme_nan_datapath.h"
@@ -408,11 +409,18 @@ int wlan_hdd_cfg80211_process_ndp_cmd(struct wiphy *wiphy,
 	struct wireless_dev *wdev, const void *data, int data_len)
 {
 	int ret;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_cfg80211_process_ndp_cmd(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
 	return ret;
 }
 

+ 8 - 0
core/hdd/src/wlan_hdd_scan.c

@@ -34,6 +34,7 @@
 #include "wlan_hdd_p2p.h"
 #include "wlan_hdd_trace.h"
 #include "wlan_hdd_scan.h"
+#include <wlan_hdd_dsc.h>
 #include "wlan_policy_mgr_api.h"
 #include "wlan_hdd_power.h"
 #include "wma_api.h"
@@ -1236,6 +1237,12 @@ int wlan_hdd_vendor_abort_scan(
 	const void *data, int data_len)
 {
 	int ret;
+	QDF_STATUS status;
+	struct dsc_psoc *dsc_psoc = hdd_dsc_psoc_from_wiphy(wiphy);
+
+	status = dsc_psoc_op_start(dsc_psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return qdf_status_to_os_return(status);
 
 	cds_ssr_protect(__func__);
 	ret = __wlan_hdd_vendor_abort_scan(wiphy,
@@ -1243,6 +1250,7 @@ int wlan_hdd_vendor_abort_scan(
 					   data_len);
 	cds_ssr_unprotect(__func__);
 
+	dsc_psoc_op_stop(dsc_psoc);
 	return ret;
 }