Browse Source

qcacld-3.0: Integrate DSC (cfg80211)

As part of DSC integration, replace remaining cds_ssr_protect/unprotect
with appropriate osif_sync op start/stop calls in cfg80211 callback
handlers.

Change-Id: Ie5c513e8ca51668d0ac7e2972e6db1556057f314
CRs-Fixed: 2410851
Dustin Brown 6 years ago
parent
commit
4376fedf86

+ 12 - 6
core/hdd/src/wlan_hdd_active_tos.c

@@ -23,6 +23,7 @@
  *
  */
 
+#include "osif_sync.h"
 #include <wlan_hdd_includes.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
@@ -222,13 +223,18 @@ int wlan_hdd_cfg80211_set_limit_offchan_param(struct wiphy *wiphy,
 					      const void *data, int data_len)
 
 {
-	int ret;
+	struct osif_vdev_sync *vdev_sync;
+	int errno;
 
-	cds_ssr_protect(__func__);
-	ret = __wlan_hdd_cfg80211_set_limit_offchan_param(wiphy, wdev, data,
-							  data_len);
-	cds_ssr_unprotect(__func__);
+	errno = osif_vdev_sync_op_start(wdev->netdev, &vdev_sync);
+	if (errno)
+		return errno;
 
-	return ret;
+	errno = __wlan_hdd_cfg80211_set_limit_offchan_param(wiphy, wdev, data,
+							    data_len);
+
+	osif_vdev_sync_op_stop(vdev_sync);
+
+	return errno;
 }
 

+ 12 - 6
core/hdd/src/wlan_hdd_bss_transition.c

@@ -23,6 +23,7 @@
  *
  */
 
+#include "osif_sync.h"
 #include <wlan_hdd_includes.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
@@ -259,13 +260,18 @@ int wlan_hdd_cfg80211_fetch_bss_transition_status(struct wiphy *wiphy,
 						  const void *data,
 						  int data_len)
 {
-	int ret;
+	struct osif_vdev_sync *vdev_sync;
+	int errno;
+
+	errno = osif_vdev_sync_op_start(wdev->netdev, &vdev_sync);
+	if (errno)
+		return errno;
+
+	errno = __wlan_hdd_cfg80211_fetch_bss_transition_status(wiphy, wdev,
+								data, data_len);
 
-	cds_ssr_protect(__func__);
-	ret = __wlan_hdd_cfg80211_fetch_bss_transition_status(wiphy, wdev,
-							      data, data_len);
-	cds_ssr_unprotect(__func__);
+	osif_vdev_sync_op_stop(vdev_sync);
 
-	return ret;
+	return errno;
 }
 

+ 6 - 3
core/hdd/src/wlan_hdd_cfg80211.c

@@ -2965,16 +2965,19 @@ void wlan_hdd_undo_acs(struct hdd_adapter *adapter)
  *
  * Return: None
  */
-
 static void wlan_hdd_cfg80211_start_pending_acs(struct work_struct *work)
 {
 	struct hdd_adapter *adapter = container_of(work, struct hdd_adapter,
 						   acs_pending_work.work);
+	struct osif_vdev_sync *vdev_sync;
+
+	if (osif_vdev_sync_op_start(adapter->dev, &vdev_sync))
+		return;
 
-	cds_ssr_protect(__func__);
 	wlan_hdd_cfg80211_start_acs(adapter);
-	cds_ssr_unprotect(__func__);
 	clear_bit(ACS_PENDING, &adapter->event_flags);
+
+	osif_vdev_sync_op_stop(vdev_sync);
 }
 
 /**

+ 13 - 7
core/hdd/src/wlan_hdd_concurrency_matrix.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -23,6 +23,7 @@
  *
  */
 
+#include "osif_sync.h"
 #include <wlan_hdd_includes.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
@@ -132,13 +133,18 @@ int wlan_hdd_cfg80211_get_concurrency_matrix(struct wiphy *wiphy,
 					     const void *data,
 					     int data_len)
 {
-	int ret;
+	struct osif_psoc_sync *psoc_sync;
+	int errno;
+
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	if (errno)
+		return errno;
+
+	errno = __wlan_hdd_cfg80211_get_concurrency_matrix(wiphy, wdev,
+							   data, data_len);
 
-	cds_ssr_protect(__func__);
-	ret = __wlan_hdd_cfg80211_get_concurrency_matrix(wiphy, wdev,
-							 data, data_len);
-	cds_ssr_unprotect(__func__);
+	osif_psoc_sync_op_stop(psoc_sync);
 
-	return ret;
+	return errno;
 }
 

+ 11 - 5
core/hdd/src/wlan_hdd_ota_test.c

@@ -23,6 +23,7 @@
  *
  */
 
+#include "osif_sync.h"
 #include <wlan_hdd_includes.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
@@ -131,12 +132,17 @@ int wlan_hdd_cfg80211_set_ota_test(struct wiphy *wiphy,
 				   const void *data,
 				   int data_len)
 {
-	int ret;
+	struct osif_vdev_sync *vdev_sync;
+	int errno;
 
-	cds_ssr_protect(__func__);
-	ret = __wlan_hdd_cfg80211_set_ota_test(wiphy, wdev, data, data_len);
-	cds_ssr_unprotect(__func__);
+	errno = osif_vdev_sync_op_start(wdev->netdev, &vdev_sync);
+	if (errno)
+		return errno;
 
-	return ret;
+	errno = __wlan_hdd_cfg80211_set_ota_test(wiphy, wdev, data, data_len);
+
+	osif_vdev_sync_op_stop(vdev_sync);
+
+	return errno;
 }
 

+ 23 - 12
core/hdd/src/wlan_hdd_p2p_listen_offload.c

@@ -23,6 +23,7 @@
  *
  */
 
+#include "osif_sync.h"
 #include <wlan_hdd_includes.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
@@ -250,14 +251,19 @@ int wlan_hdd_cfg80211_p2p_lo_start(struct wiphy *wiphy,
 				   const void *data,
 				   int data_len)
 {
-	int ret;
+	struct osif_vdev_sync *vdev_sync;
+	int errno;
+
+	errno = osif_vdev_sync_op_start(wdev->netdev, &vdev_sync);
+	if (errno)
+		return errno;
+
+	errno = __wlan_hdd_cfg80211_p2p_lo_start(wiphy, wdev,
+						 data, data_len);
 
-	cds_ssr_protect(__func__);
-	ret = __wlan_hdd_cfg80211_p2p_lo_start(wiphy, wdev,
-					       data, data_len);
-	cds_ssr_unprotect(__func__);
+	osif_vdev_sync_op_stop(vdev_sync);
 
-	return ret;
+	return errno;
 }
 
 /**
@@ -335,13 +341,18 @@ int wlan_hdd_cfg80211_p2p_lo_stop(struct wiphy *wiphy,
 				  const void *data,
 				  int data_len)
 {
-	int ret;
+	struct osif_vdev_sync *vdev_sync;
+	int errno;
+
+	errno = osif_vdev_sync_op_start(wdev->netdev, &vdev_sync);
+	if (errno)
+		return errno;
+
+	errno = __wlan_hdd_cfg80211_p2p_lo_stop(wiphy, wdev,
+						data, data_len);
 
-	cds_ssr_protect(__func__);
-	ret = __wlan_hdd_cfg80211_p2p_lo_stop(wiphy, wdev,
-					      data, data_len);
-	cds_ssr_unprotect(__func__);
+	osif_vdev_sync_op_stop(vdev_sync);
 
-	return ret;
+	return errno;
 }
 

+ 11 - 5
core/hdd/src/wlan_hdd_rssi_monitor.c

@@ -23,6 +23,7 @@
  *
  */
 
+#include "osif_sync.h"
 #include <wlan_hdd_includes.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
@@ -163,13 +164,18 @@ int
 wlan_hdd_cfg80211_monitor_rssi(struct wiphy *wiphy, struct wireless_dev *wdev,
 			       const void *data, int data_len)
 {
-	int ret;
+	struct osif_vdev_sync *vdev_sync;
+	int errno;
+
+	errno = osif_vdev_sync_op_start(wdev->netdev, &vdev_sync);
+	if (errno)
+		return errno;
+
+	errno = __wlan_hdd_cfg80211_monitor_rssi(wiphy, wdev, data, data_len);
 
-	cds_ssr_protect(__func__);
-	ret = __wlan_hdd_cfg80211_monitor_rssi(wiphy, wdev, data, data_len);
-	cds_ssr_unprotect(__func__);
+	osif_vdev_sync_op_stop(vdev_sync);
 
-	return ret;
+	return errno;
 }
 
 void hdd_rssi_threshold_breached(hdd_handle_t hdd_handle,

+ 11 - 6
core/hdd/src/wlan_hdd_sap_cond_chan_switch.c

@@ -541,13 +541,18 @@ int wlan_hdd_cfg80211_conditional_chan_switch(struct wiphy *wiphy,
 					      const void *data,
 					      int data_len)
 {
-	int ret;
+	struct osif_vdev_sync *vdev_sync;
+	int errno;
+
+	errno = osif_vdev_sync_op_start(wdev->netdev, &vdev_sync);
+	if (errno)
+		return errno;
 
-	cds_ssr_protect(__func__);
-	ret = __wlan_hdd_cfg80211_conditional_chan_switch(wiphy, wdev,
-							  data, data_len);
-	cds_ssr_unprotect(__func__);
+	errno = __wlan_hdd_cfg80211_conditional_chan_switch(wiphy, wdev,
+							    data, data_len);
 
-	return ret;
+	osif_vdev_sync_op_stop(vdev_sync);
+
+	return errno;
 }
 

+ 12 - 6
core/hdd/src/wlan_hdd_sar_limits.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -23,6 +23,7 @@
  *
  */
 
+#include "osif_sync.h"
 #include <wlan_hdd_includes.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
@@ -309,12 +310,17 @@ int wlan_hdd_cfg80211_get_sar_power_limits(struct wiphy *wiphy,
 					   const void *data,
 					   int data_len)
 {
-	int ret;
+	struct osif_psoc_sync *psoc_sync;
+	int errno;
 
-	cds_ssr_protect(__func__);
-	ret = __wlan_hdd_get_sar_power_limits(wiphy, wdev, data, data_len);
-	cds_ssr_unprotect(__func__);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	if (errno)
+		return errno;
 
-	return ret;
+	errno = __wlan_hdd_get_sar_power_limits(wiphy, wdev, data, data_len);
+
+	osif_psoc_sync_op_stop(psoc_sync);
+
+	return errno;
 }
 

+ 11 - 5
core/hdd/src/wlan_hdd_station_info.c

@@ -23,6 +23,7 @@
  *
  */
 
+#include "osif_sync.h"
 #include <wlan_hdd_includes.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
@@ -1233,12 +1234,17 @@ int32_t hdd_cfg80211_get_station_cmd(struct wiphy *wiphy,
 				     const void *data,
 				     int data_len)
 {
-	int ret;
+	struct osif_vdev_sync *vdev_sync;
+	int errno;
 
-	cds_ssr_protect(__func__);
-	ret = __hdd_cfg80211_get_station_cmd(wiphy, wdev, data, data_len);
-	cds_ssr_unprotect(__func__);
+	errno = osif_vdev_sync_op_start(wdev->netdev, &vdev_sync);
+	if (errno)
+		return errno;
 
-	return ret;
+	errno = __hdd_cfg80211_get_station_cmd(wiphy, wdev, data, data_len);
+
+	osif_vdev_sync_op_stop(vdev_sync);
+
+	return errno;
 }
 

+ 13 - 8
core/hdd/src/wlan_hdd_stats.c

@@ -1551,17 +1551,22 @@ __wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy,
  * Return: 0 if success, non-zero for failure
  */
 int wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy,
-				struct wireless_dev *wdev,
-				const void *data,
-				int data_len)
+				   struct wireless_dev *wdev,
+				   const void *data,
+				   int data_len)
 {
-	int ret = 0;
+	struct osif_vdev_sync *vdev_sync;
+	int errno;
 
-	cds_ssr_protect(__func__);
-	ret = __wlan_hdd_cfg80211_ll_stats_get(wiphy, wdev, data, data_len);
-	cds_ssr_unprotect(__func__);
+	errno = osif_vdev_sync_op_start(wdev->netdev, &vdev_sync);
+	if (errno)
+		return errno;
 
-	return ret;
+	errno = __wlan_hdd_cfg80211_ll_stats_get(wiphy, wdev, data, data_len);
+
+	osif_vdev_sync_op_stop(vdev_sync);
+
+	return errno;
 }
 
 const struct

+ 22 - 12
core/hdd/src/wlan_hdd_tx_power.c

@@ -23,6 +23,7 @@
  *
  */
 
+#include "osif_sync.h"
 #include <wlan_hdd_includes.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
@@ -102,14 +103,18 @@ int wlan_hdd_cfg80211_txpower_scale(struct wiphy *wiphy,
 				    const void *data,
 				    int data_len)
 {
-	int ret;
+	struct osif_vdev_sync *vdev_sync;
+	int errno;
+
+	errno = osif_vdev_sync_op_start(wdev->netdev, &vdev_sync);
+	if (errno)
+		return errno;
+
+	errno = __wlan_hdd_cfg80211_txpower_scale(wiphy, wdev, data, data_len);
 
-	cds_ssr_protect(__func__);
-	ret = __wlan_hdd_cfg80211_txpower_scale(wiphy, wdev,
-						data, data_len);
-	cds_ssr_unprotect(__func__);
+	osif_vdev_sync_op_stop(vdev_sync);
 
-	return ret;
+	return errno;
 }
 
 static const struct nla_policy txpower_scale_decr_db_policy
@@ -180,13 +185,18 @@ int wlan_hdd_cfg80211_txpower_scale_decr_db(struct wiphy *wiphy,
 					    const void *data,
 					    int data_len)
 {
-	int ret;
+	struct osif_vdev_sync *vdev_sync;
+	int errno;
+
+	errno = osif_vdev_sync_op_start(wdev->netdev, &vdev_sync);
+	if (errno)
+		return errno;
+
+	errno = __wlan_hdd_cfg80211_txpower_scale_decr_db(wiphy, wdev,
+							  data, data_len);
 
-	cds_ssr_protect(__func__);
-	ret = __wlan_hdd_cfg80211_txpower_scale_decr_db(wiphy, wdev,
-							data, data_len);
-	cds_ssr_unprotect(__func__);
+	osif_vdev_sync_op_stop(vdev_sync);
 
-	return ret;
+	return errno;
 }