ソースを参照

qcacld-3.0: Rename hdd_psoc_sync to osif_psoc_sync

Change I556e9d2833edd2bd26266496b6000347649c5fbe moved hdd_dsc to osif,
but retained the existing naming. Rename hdd_psoc_sync to a more
appropriate osif_psoc_sync.

Change-Id: Ic877c0d4efc7e74426c048c440a49f72ee1b5b0f
CRs-Fixed: 2396513
Dustin Brown 6 年 前
コミット
363b479eb4

+ 57 - 57
core/hdd/src/wlan_hdd_cfg80211.c

@@ -815,10 +815,10 @@ wlan_hdd_cfg80211_get_tdls_capabilities(struct wiphy *wiphy,
 					const void *data,
 					int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -827,7 +827,7 @@ wlan_hdd_cfg80211_get_tdls_capabilities(struct wiphy *wiphy,
 							  data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -1570,10 +1570,10 @@ static int is_driver_dfs_capable(struct wiphy *wiphy,
 				 const void *data,
 				 int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -1581,7 +1581,7 @@ static int is_driver_dfs_capable(struct wiphy *wiphy,
 	errno = __is_driver_dfs_capable(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -3257,10 +3257,10 @@ wlan_hdd_cfg80211_get_supported_features(struct wiphy *wiphy,
 					struct wireless_dev *wdev,
 					const void *data, int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -3269,7 +3269,7 @@ wlan_hdd_cfg80211_get_supported_features(struct wiphy *wiphy,
 							   data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -3564,10 +3564,10 @@ wlan_hdd_cfg80211_get_features(struct wiphy *wiphy,
 		struct wireless_dev *wdev,
 		const void *data, int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -3575,7 +3575,7 @@ wlan_hdd_cfg80211_get_features(struct wiphy *wiphy,
 	errno = __wlan_hdd_cfg80211_get_features(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -4396,10 +4396,10 @@ static int wlan_hdd_cfg80211_disable_dfs_chan_scan(struct wiphy *wiphy,
 						   const void *data,
 						   int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -4408,7 +4408,7 @@ static int wlan_hdd_cfg80211_disable_dfs_chan_scan(struct wiphy *wiphy,
 							  data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -4795,10 +4795,10 @@ wlan_hdd_cfg80211_get_wifi_info(struct wiphy *wiphy,
 		struct wireless_dev *wdev,
 		const void *data, int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -4806,7 +4806,7 @@ wlan_hdd_cfg80211_get_wifi_info(struct wiphy *wiphy,
 	errno = __wlan_hdd_cfg80211_get_wifi_info(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -4885,10 +4885,10 @@ wlan_hdd_cfg80211_get_logger_supp_feature(struct wiphy *wiphy,
 		struct wireless_dev *wdev,
 		const void *data, int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -4897,7 +4897,7 @@ wlan_hdd_cfg80211_get_logger_supp_feature(struct wiphy *wiphy,
 							    data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -7210,10 +7210,10 @@ static int wlan_hdd_cfg80211_wifi_logger_start(struct wiphy *wiphy,
 		const void *data,
 		int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -7222,7 +7222,7 @@ static int wlan_hdd_cfg80211_wifi_logger_start(struct wiphy *wiphy,
 						      data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -7330,10 +7330,10 @@ static int wlan_hdd_cfg80211_wifi_logger_get_ring_data(struct wiphy *wiphy,
 		const void *data,
 		int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -7342,7 +7342,7 @@ static int wlan_hdd_cfg80211_wifi_logger_get_ring_data(struct wiphy *wiphy,
 							      data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -7956,10 +7956,10 @@ static int wlan_hdd_cfg80211_get_preferred_freq_list(struct wiphy *wiphy,
 						 *wdev, const void *data,
 						 int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -7968,7 +7968,7 @@ static int wlan_hdd_cfg80211_get_preferred_freq_list(struct wiphy *wiphy,
 							    data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -8386,10 +8386,10 @@ static int wlan_hdd_cfg80211_acs_dfs_mode(struct wiphy *wiphy,
 		struct wireless_dev *wdev,
 		const void *data, int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -8397,7 +8397,7 @@ static int wlan_hdd_cfg80211_acs_dfs_mode(struct wiphy *wiphy,
 	errno = __wlan_hdd_cfg80211_acs_dfs_mode(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -8753,10 +8753,10 @@ static int wlan_hdd_cfg80211_avoid_freq(struct wiphy *wiphy,
 		struct wireless_dev *wdev,
 		const void *data, int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -8764,7 +8764,7 @@ static int wlan_hdd_cfg80211_avoid_freq(struct wiphy *wiphy,
 	errno = __wlan_hdd_cfg80211_avoid_freq(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -9182,10 +9182,10 @@ static int wlan_hdd_cfg80211_get_wakelock_stats(struct wiphy *wiphy,
 						struct wireless_dev *wdev,
 						const void *data, int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -9194,7 +9194,7 @@ static int wlan_hdd_cfg80211_get_wakelock_stats(struct wiphy *wiphy,
 						       data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -9272,10 +9272,10 @@ static int wlan_hdd_cfg80211_get_bus_size(struct wiphy *wiphy,
 					  struct wireless_dev *wdev,
 					  const void *data, int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -9283,7 +9283,7 @@ static int wlan_hdd_cfg80211_get_bus_size(struct wiphy *wiphy,
 	errno = __wlan_hdd_cfg80211_get_bus_size(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -10090,10 +10090,10 @@ static int wlan_hdd_cfg80211_set_sar_power_limits(struct wiphy *wiphy,
 						  const void *data,
 						  int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -10101,7 +10101,7 @@ static int wlan_hdd_cfg80211_set_sar_power_limits(struct wiphy *wiphy,
 	errno = __wlan_hdd_set_sar_power_limits(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -10667,10 +10667,10 @@ static int wlan_hdd_cfg80211_set_trace_level(struct wiphy *wiphy,
 						const void *data,
 						int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -10679,7 +10679,7 @@ static int wlan_hdd_cfg80211_set_trace_level(struct wiphy *wiphy,
 						    data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -18623,10 +18623,10 @@ static int __wlan_hdd_cfg80211_set_wiphy_params(struct wiphy *wiphy,
  */
 static int wlan_hdd_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -18634,7 +18634,7 @@ static int wlan_hdd_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
 	errno = __wlan_hdd_cfg80211_set_wiphy_params(wiphy, changed);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -19972,10 +19972,10 @@ static int wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
 #endif
 				      void *data, int len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -19983,7 +19983,7 @@ static int wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
 	errno = __wlan_hdd_cfg80211_testmode(wiphy, data, len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -20287,10 +20287,10 @@ static int __wlan_hdd_cfg80211_set_mon_ch(struct wiphy *wiphy,
 static int wlan_hdd_cfg80211_set_mon_ch(struct wiphy *wiphy,
 				       struct cfg80211_chan_def *chandef)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -20298,7 +20298,7 @@ static int wlan_hdd_cfg80211_set_mon_ch(struct wiphy *wiphy,
 	errno = __wlan_hdd_cfg80211_set_mon_ch(wiphy, chandef);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }

+ 20 - 20
core/hdd/src/wlan_hdd_driver_ops.c

@@ -454,30 +454,30 @@ static int hdd_soc_probe(struct device *dev,
 			 enum qdf_bus_type bus_type)
 {
 	struct dsc_driver *dsc_driver = hdd_driver_get()->dsc_driver;
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
 	hdd_info("probing driver");
 
-	errno = hdd_psoc_sync_create_with_trans(dsc_driver, &psoc_sync);
+	errno = osif_psoc_sync_create_with_trans(dsc_driver, &psoc_sync);
 	if (errno)
 		return errno;
 
-	hdd_psoc_sync_register(dev, psoc_sync);
+	osif_psoc_sync_register(dev, psoc_sync);
 	errno = __hdd_soc_probe(dev, bdev, bid, bus_type);
 	if (errno)
 		goto destroy_sync;
 
-	hdd_psoc_sync_trans_stop(psoc_sync);
+	osif_psoc_sync_trans_stop(psoc_sync);
 
 	return 0;
 
 destroy_sync:
-	hdd_psoc_sync_unregister(dev);
-	hdd_psoc_sync_wait_for_ops(psoc_sync);
+	osif_psoc_sync_unregister(dev);
+	osif_psoc_sync_wait_for_ops(psoc_sync);
 
-	hdd_psoc_sync_trans_stop(psoc_sync);
-	hdd_psoc_sync_destroy(psoc_sync);
+	osif_psoc_sync_trans_stop(psoc_sync);
+	osif_psoc_sync_destroy(psoc_sync);
 
 	return errno;
 }
@@ -544,11 +544,11 @@ static int hdd_soc_recovery_reinit(struct device *dev,
 				   const struct hif_bus_id *bid,
 				   enum qdf_bus_type bus_type)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
 	/* SSR transition is initiated at the beginning of soc shutdown */
-	errno = hdd_psoc_sync_trans_resume(dev, &psoc_sync);
+	errno = osif_psoc_sync_trans_resume(dev, &psoc_sync);
 	QDF_BUG(!errno);
 	if (errno)
 		return errno;
@@ -557,7 +557,7 @@ static int hdd_soc_recovery_reinit(struct device *dev,
 	if (errno)
 		return errno;
 
-	hdd_psoc_sync_trans_stop(psoc_sync);
+	osif_psoc_sync_trans_stop(psoc_sync);
 
 	return 0;
 }
@@ -611,21 +611,21 @@ static void __hdd_soc_remove(struct device *dev)
  */
 static void hdd_soc_remove(struct device *dev)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
 	/* by design, this will fail to lookup if we never probed the SoC */
-	errno = hdd_psoc_sync_trans_start_wait(dev, &psoc_sync);
+	errno = osif_psoc_sync_trans_start_wait(dev, &psoc_sync);
 	if (errno)
 		return;
 
-	hdd_psoc_sync_unregister(dev);
-	hdd_psoc_sync_wait_for_ops(psoc_sync);
+	osif_psoc_sync_unregister(dev);
+	osif_psoc_sync_wait_for_ops(psoc_sync);
 
 	__hdd_soc_remove(dev);
 
-	hdd_psoc_sync_trans_stop(psoc_sync);
-	hdd_psoc_sync_destroy(psoc_sync);
+	osif_psoc_sync_trans_stop(psoc_sync);
+	osif_psoc_sync_destroy(psoc_sync);
 }
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT
@@ -777,15 +777,15 @@ unlock:
  */
 static void hdd_soc_recovery_shutdown(struct device *dev)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_trans_start_wait(dev, &psoc_sync);
+	errno = osif_psoc_sync_trans_start_wait(dev, &psoc_sync);
 	QDF_BUG(!errno);
 	if (errno)
 		return;
 
-	hdd_psoc_sync_wait_for_ops(psoc_sync);
+	osif_psoc_sync_wait_for_ops(psoc_sync);
 
 	__hdd_soc_recovery_shutdown();
 

+ 3 - 3
core/hdd/src/wlan_hdd_ext_scan.c

@@ -2486,10 +2486,10 @@ int wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
 					struct wireless_dev *wdev,
 					const void *data, int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -2498,7 +2498,7 @@ int wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
 							       data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }

+ 3 - 3
core/hdd/src/wlan_hdd_he.c

@@ -202,10 +202,10 @@ int wlan_hdd_cfg80211_get_he_cap(struct wiphy *wiphy,
 				 const void *data,
 				 int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -213,7 +213,7 @@ int wlan_hdd_cfg80211_get_he_cap(struct wiphy *wiphy,
 	errno = __wlan_hdd_cfg80211_get_he_cap(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }

+ 4 - 4
core/hdd/src/wlan_hdd_main.c

@@ -9266,22 +9266,22 @@ void hdd_psoc_idle_timer_stop(struct hdd_context *hdd_ctx)
  */
 static void hdd_psoc_idle_shutdown(struct hdd_context *hdd_ctx)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
 	hdd_enter();
 
-	errno = hdd_psoc_sync_trans_start(hdd_ctx->parent_dev, &psoc_sync);
+	errno = osif_psoc_sync_trans_start(hdd_ctx->parent_dev, &psoc_sync);
 	if (errno) {
 		hdd_info("psoc busy, abort idle shutdown; errno:%d", errno);
 		goto exit;
 	}
 
-	hdd_psoc_sync_wait_for_ops(psoc_sync);
+	osif_psoc_sync_wait_for_ops(psoc_sync);
 
 	QDF_BUG(!hdd_wlan_stop_modules(hdd_ctx, false));
 
-	hdd_psoc_sync_trans_stop(psoc_sync);
+	osif_psoc_sync_trans_stop(psoc_sync);
 
 exit:
 	hdd_exit();

+ 3 - 3
core/hdd/src/wlan_hdd_nan.c

@@ -95,10 +95,10 @@ int wlan_hdd_cfg80211_nan_request(struct wiphy *wiphy,
 				  int data_len)
 
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -106,7 +106,7 @@ int wlan_hdd_cfg80211_nan_request(struct wiphy *wiphy,
 	errno = __wlan_hdd_cfg80211_nan_request(wiphy, wdev, data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }

+ 3 - 3
core/hdd/src/wlan_hdd_nan_datapath.c

@@ -408,10 +408,10 @@ static int __wlan_hdd_cfg80211_process_ndp_cmd(struct wiphy *wiphy,
 int wlan_hdd_cfg80211_process_ndp_cmd(struct wiphy *wiphy,
 	struct wireless_dev *wdev, const void *data, int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -420,7 +420,7 @@ int wlan_hdd_cfg80211_process_ndp_cmd(struct wiphy *wiphy,
 						    data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }

+ 12 - 12
core/hdd/src/wlan_hdd_power.c

@@ -1659,10 +1659,10 @@ exit_with_code:
 
 int wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -1670,7 +1670,7 @@ int wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
 	errno = __wlan_hdd_cfg80211_resume_wlan(wiphy);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -1861,10 +1861,10 @@ resume_tx:
 int wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
 				   struct cfg80211_wowlan *wow)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -1872,7 +1872,7 @@ int wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
 	errno = __wlan_hdd_cfg80211_suspend_wlan(wiphy, wow);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -2085,10 +2085,10 @@ int wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
 				  enum nl80211_tx_power_setting type,
 				  int mbm)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -2096,7 +2096,7 @@ int wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
 	errno = __wlan_hdd_cfg80211_set_txpower(wiphy, wdev, type, mbm);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -2184,10 +2184,10 @@ int wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
 					 struct wireless_dev *wdev,
 					 int *dbm)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -2195,7 +2195,7 @@ int wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
 	errno = __wlan_hdd_cfg80211_get_txpower(wiphy, wdev, dbm);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }

+ 6 - 6
core/hdd/src/wlan_hdd_scan.c

@@ -1216,10 +1216,10 @@ int wlan_hdd_vendor_abort_scan(
 	struct wiphy *wiphy, struct wireless_dev *wdev,
 	const void *data, int data_len)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -1227,7 +1227,7 @@ int wlan_hdd_vendor_abort_scan(
 	errno = __wlan_hdd_vendor_abort_scan(wiphy, data, data_len);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return errno;
 }
@@ -1520,10 +1520,10 @@ static void __wlan_hdd_cfg80211_abort_scan(struct wiphy *wiphy,
 void wlan_hdd_cfg80211_abort_scan(struct wiphy *wiphy,
 				  struct wireless_dev *wdev)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	int errno;
 
-	errno = hdd_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
+	errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync);
 	if (errno)
 		return;
 
@@ -1531,7 +1531,7 @@ void wlan_hdd_cfg80211_abort_scan(struct wiphy *wiphy,
 	__wlan_hdd_cfg80211_abort_scan(wiphy, wdev);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 }
 #endif
 

+ 9 - 9
core/hdd/src/wlan_hdd_sysfs.c

@@ -59,7 +59,7 @@ static ssize_t show_driver_version(struct kobject *kobj,
 				   char *buf)
 {
 	struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	ssize_t length;
 	int errno;
 
@@ -67,7 +67,7 @@ static ssize_t show_driver_version(struct kobject *kobj,
 	if (errno)
 		return errno;
 
-	errno = hdd_psoc_sync_op_start(hdd_ctx->parent_dev, &psoc_sync);
+	errno = osif_psoc_sync_op_start(hdd_ctx->parent_dev, &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -75,7 +75,7 @@ static ssize_t show_driver_version(struct kobject *kobj,
 	length = __show_driver_version(buf);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return length;
 }
@@ -107,7 +107,7 @@ static ssize_t show_fw_version(struct kobject *kobj,
 			       char *buf)
 {
 	struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	ssize_t length;
 	int errno;
 
@@ -115,7 +115,7 @@ static ssize_t show_fw_version(struct kobject *kobj,
 	if (errno)
 		return errno;
 
-	errno = hdd_psoc_sync_op_start(hdd_ctx->parent_dev, &psoc_sync);
+	errno = osif_psoc_sync_op_start(hdd_ctx->parent_dev, &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -123,7 +123,7 @@ static ssize_t show_fw_version(struct kobject *kobj,
 	length = __show_fw_version(hdd_ctx, buf);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return length;
 };
@@ -260,7 +260,7 @@ static ssize_t show_device_power_stats(struct kobject *kobj,
 				       char *buf)
 {
 	struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	ssize_t length;
 	int errno;
 
@@ -268,7 +268,7 @@ static ssize_t show_device_power_stats(struct kobject *kobj,
 	if (errno)
 		return errno;
 
-	errno = hdd_psoc_sync_op_start(hdd_ctx->parent_dev, &psoc_sync);
+	errno = osif_psoc_sync_op_start(hdd_ctx->parent_dev, &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -276,7 +276,7 @@ static ssize_t show_device_power_stats(struct kobject *kobj,
 	length = __show_device_power_stats(hdd_ctx, buf);
 	cds_ssr_unprotect(__func__);
 
-	hdd_psoc_sync_op_stop(psoc_sync);
+	osif_psoc_sync_op_stop(psoc_sync);
 
 	return length;
 }

+ 50 - 50
os_if/sync/inc/osif_psoc_sync.h

@@ -24,23 +24,23 @@
 #include "qdf_types.h"
 
 /**
- * struct hdd_psoc_sync - opaque synchronization handle for a psoc
+ * struct osif_psoc_sync - opaque synchronization handle for a psoc
  */
-struct hdd_psoc_sync;
+struct osif_psoc_sync;
 
 /**
- * hdd_psoc_sync_create() - create a psoc synchronization context
+ * osif_psoc_sync_create() - create a psoc synchronization context
  * @dsc_driver: parent dsc_driver to the psoc
  * @out_psoc_sync: out parameter for the new synchronization context
  *
  * Return: Errno
  */
 qdf_must_check int
-hdd_psoc_sync_create(struct dsc_driver *dsc_driver,
-		     struct hdd_psoc_sync **out_psoc_sync);
+osif_psoc_sync_create(struct dsc_driver *dsc_driver,
+		      struct osif_psoc_sync **out_psoc_sync);
 
 /**
- * hdd_psoc_sync_create_with_trans() - create a psoc synchronization context
+ * osif_psoc_sync_create_with_trans() - create a psoc synchronization context
  * @dsc_driver: parent dsc_driver to the psoc
  * @out_psoc_sync: out parameter for the new synchronization context
  *
@@ -48,58 +48,58 @@ hdd_psoc_sync_create(struct dsc_driver *dsc_driver,
  *
  * Return: Errno
  */
-#define hdd_psoc_sync_create_with_trans(dsc_driver, out_psoc_sync) \
-	__hdd_psoc_sync_create_with_trans(dsc_driver, out_psoc_sync, __func__)
+#define osif_psoc_sync_create_with_trans(dsc_driver, out_psoc_sync) \
+	__osif_psoc_sync_create_with_trans(dsc_driver, out_psoc_sync, __func__)
 
 qdf_must_check int
-__hdd_psoc_sync_create_with_trans(struct dsc_driver *dsc_driver,
-				  struct hdd_psoc_sync **out_psoc_sync,
-				  const char *desc);
+__osif_psoc_sync_create_with_trans(struct dsc_driver *dsc_driver,
+				   struct osif_psoc_sync **out_psoc_sync,
+				   const char *desc);
 
 /**
- * hdd_psoc_sync_destroy() - destroy a psoc synchronization context
+ * osif_psoc_sync_destroy() - destroy a psoc synchronization context
  * @psoc_sync: the context to destroy
  *
  * Return: none
  */
-void hdd_psoc_sync_destroy(struct hdd_psoc_sync *psoc_sync);
+void osif_psoc_sync_destroy(struct osif_psoc_sync *psoc_sync);
 
 /**
- * hdd_psoc_sync_register() - register a psoc for operations/transitions
+ * osif_psoc_sync_register() - register a psoc for operations/transitions
  * @dev: the device to use as the operation/transition lookup key
  * @psoc_sync: the psoc synchronization context to register
  *
  * Return: none
  */
-void hdd_psoc_sync_register(struct device *dev,
-			    struct hdd_psoc_sync *psoc_sync);
+void osif_psoc_sync_register(struct device *dev,
+			     struct osif_psoc_sync *psoc_sync);
 
 /**
- * hdd_psoc_sync_unregister() - unregister a psoc for operations/transitions
+ * osif_psoc_sync_unregister() - unregister a psoc for operations/transitions
  * @dev: the device originally used to register the psoc_sync context
  *
  * Return: the psoc synchronization context that was registered for @dev
  */
-struct hdd_psoc_sync *hdd_psoc_sync_unregister(struct device *dev);
+struct osif_psoc_sync *osif_psoc_sync_unregister(struct device *dev);
 
 /**
- * hdd_psoc_sync_trans_start() - attempt to start a transition on @dev
+ * osif_psoc_sync_trans_start() - attempt to start a transition on @dev
  * @dev: the device to transition
  * @out_psoc_sync: out parameter for the synchronization context registered with
  *	@dev, populated on success
  *
  * Return: Errno
  */
-#define hdd_psoc_sync_trans_start(dev, out_psoc_sync) \
-	__hdd_psoc_sync_trans_start(dev, out_psoc_sync, __func__)
+#define osif_psoc_sync_trans_start(dev, out_psoc_sync) \
+	__osif_psoc_sync_trans_start(dev, out_psoc_sync, __func__)
 
 qdf_must_check int
-__hdd_psoc_sync_trans_start(struct device *dev,
-			    struct hdd_psoc_sync **out_psoc_sync,
-			    const char *desc);
+__osif_psoc_sync_trans_start(struct device *dev,
+			     struct osif_psoc_sync **out_psoc_sync,
+			     const char *desc);
 
 /**
- * hdd_psoc_sync_trans_start_wait() - attempt to start a transition on @dev,
+ * osif_psoc_sync_trans_start_wait() - attempt to start a transition on @dev,
  *	blocking if a conflicting transition is in flight
  * @dev: the device to transition
  * @out_psoc_sync: out parameter for the synchronization context registered with
@@ -107,77 +107,77 @@ __hdd_psoc_sync_trans_start(struct device *dev,
  *
  * Return: Errno
  */
-#define hdd_psoc_sync_trans_start_wait(dev, out_psoc_sync) \
-	__hdd_psoc_sync_trans_start_wait(dev, out_psoc_sync, __func__)
+#define osif_psoc_sync_trans_start_wait(dev, out_psoc_sync) \
+	__osif_psoc_sync_trans_start_wait(dev, out_psoc_sync, __func__)
 
 qdf_must_check int
-__hdd_psoc_sync_trans_start_wait(struct device *dev,
-				 struct hdd_psoc_sync **out_psoc_sync,
-				 const char *desc);
+__osif_psoc_sync_trans_start_wait(struct device *dev,
+				  struct osif_psoc_sync **out_psoc_sync,
+				  const char *desc);
 
 /**
- * hdd_psoc_sync_trans_resume() - resume a transition on @dev
+ * osif_psoc_sync_trans_resume() - resume a transition on @dev
  * @dev: the device under transition
  * @out_psoc_sync: out parameter for the synchronization context registered with
  *	@dev, populated on success
  *
  * Return: Errno
  */
-int hdd_psoc_sync_trans_resume(struct device *dev,
-			       struct hdd_psoc_sync **out_psoc_sync);
+int osif_psoc_sync_trans_resume(struct device *dev,
+				struct osif_psoc_sync **out_psoc_sync);
 
 /**
- * hdd_psoc_sync_trans_stop() - stop a transition associated with @psoc_sync
+ * osif_psoc_sync_trans_stop() - stop a transition associated with @psoc_sync
  * @psoc_sync: the synchonization context tracking the transition
  *
  * Return: none
  */
-void hdd_psoc_sync_trans_stop(struct hdd_psoc_sync *psoc_sync);
+void osif_psoc_sync_trans_stop(struct osif_psoc_sync *psoc_sync);
 
 /**
- * hdd_psoc_sync_assert_trans_protected() - assert that @dev is currently
+ * osif_psoc_sync_assert_trans_protected() - assert that @dev is currently
  *	protected by a transition
  * @dev: the device to check
  *
  * Return: none
  */
-void hdd_psoc_sync_assert_trans_protected(struct device *dev);
+void osif_psoc_sync_assert_trans_protected(struct device *dev);
 
 /**
- * hdd_psoc_sync_op_start() - attempt to start an operation on @dev
+ * osif_psoc_sync_op_start() - attempt to start an operation on @dev
  * @dev: the device to operate against
  * @out_psoc_sync: out parameter for the synchronization context registered with
  *	@dev, populated on success
  *
  * Return: Errno
  */
-#define hdd_psoc_sync_op_start(dev, out_psoc_sync) \
-	__hdd_psoc_sync_op_start(dev, out_psoc_sync, __func__)
+#define osif_psoc_sync_op_start(dev, out_psoc_sync) \
+	__osif_psoc_sync_op_start(dev, out_psoc_sync, __func__)
 
 qdf_must_check int
-__hdd_psoc_sync_op_start(struct device *dev,
-			 struct hdd_psoc_sync **out_psoc_sync,
-			 const char *func);
+__osif_psoc_sync_op_start(struct device *dev,
+			  struct osif_psoc_sync **out_psoc_sync,
+			  const char *func);
 
 /**
- * hdd_psoc_sync_op_stop() - stop an operation associated with @psoc_sync
+ * osif_psoc_sync_op_stop() - stop an operation associated with @psoc_sync
  * @psoc_sync: the synchonization context tracking the operation
  *
  * Return: none
  */
-#define hdd_psoc_sync_op_stop(dev) \
-	__hdd_psoc_sync_op_stop(dev, __func__)
+#define osif_psoc_sync_op_stop(dev) \
+	__osif_psoc_sync_op_stop(dev, __func__)
 
-void __hdd_psoc_sync_op_stop(struct hdd_psoc_sync *psoc_sync,
-			     const char *func);
+void __osif_psoc_sync_op_stop(struct osif_psoc_sync *psoc_sync,
+			      const char *func);
 
 /**
- * hdd_psoc_sync_wait_for_ops() - wait until all @psoc_sync operations complete
+ * osif_psoc_sync_wait_for_ops() - wait until all @psoc_sync operations complete
  * @psoc_sync: the synchonization context tracking the operations
  *
  * Return: None
  */
-void hdd_psoc_sync_wait_for_ops(struct hdd_psoc_sync *psoc_sync);
+void osif_psoc_sync_wait_for_ops(struct osif_psoc_sync *psoc_sync);
 
 #endif /* __OSIF_PSOC_SYNC_H */
 

+ 100 - 98
os_if/sync/src/osif_psoc_sync.c

@@ -28,35 +28,36 @@
 #include "wlan_dsc_vdev.h"
 
 /**
- * struct hdd_psoc_sync - a psoc synchronization context
+ * struct osif_psoc_sync - a psoc synchronization context
  * @dev: the device used as a lookup key
  * @dsc_psoc: the dsc_psoc used for synchronization
  * @in_use: indicates if the context is being used
  */
-struct hdd_psoc_sync {
+struct osif_psoc_sync {
 	struct device *dev;
 	struct dsc_psoc *dsc_psoc;
 	bool in_use;
 };
 
-static struct hdd_psoc_sync __hdd_psoc_sync_arr[WLAN_MAX_PSOCS];
-static qdf_spinlock_t __hdd_psoc_sync_lock;
+static struct osif_psoc_sync __osif_psoc_sync_arr[WLAN_MAX_PSOCS];
+static qdf_spinlock_t __osif_psoc_sync_lock;
 
-#define hdd_psoc_sync_lock_create() qdf_spinlock_create(&__hdd_psoc_sync_lock)
-#define hdd_psoc_sync_lock_destroy() qdf_spinlock_destroy(&__hdd_psoc_sync_lock)
-#define hdd_psoc_sync_lock() qdf_spin_lock_bh(&__hdd_psoc_sync_lock)
-#define hdd_psoc_sync_unlock() qdf_spin_unlock_bh(&__hdd_psoc_sync_lock)
-#define hdd_psoc_sync_lock_assert() \
-	QDF_BUG(qdf_spin_is_locked(&__hdd_psoc_sync_lock))
+#define osif_psoc_sync_lock_create() qdf_spinlock_create(&__osif_psoc_sync_lock)
+#define osif_psoc_sync_lock_destroy() \
+	qdf_spinlock_destroy(&__osif_psoc_sync_lock)
+#define osif_psoc_sync_lock() qdf_spin_lock_bh(&__osif_psoc_sync_lock)
+#define osif_psoc_sync_unlock() qdf_spin_unlock_bh(&__osif_psoc_sync_lock)
+#define osif_psoc_sync_lock_assert() \
+	QDF_BUG(qdf_spin_is_locked(&__osif_psoc_sync_lock))
 
-static struct hdd_psoc_sync *hdd_psoc_sync_lookup(struct device *dev)
+static struct osif_psoc_sync *osif_psoc_sync_lookup(struct device *dev)
 {
 	int i;
 
-	hdd_psoc_sync_lock_assert();
+	osif_psoc_sync_lock_assert();
 
-	for (i = 0; i < QDF_ARRAY_SIZE(__hdd_psoc_sync_arr); i++) {
-		struct hdd_psoc_sync *psoc_sync = __hdd_psoc_sync_arr + i;
+	for (i = 0; i < QDF_ARRAY_SIZE(__osif_psoc_sync_arr); i++) {
+		struct osif_psoc_sync *psoc_sync = __osif_psoc_sync_arr + i;
 
 		if (psoc_sync->dev == dev)
 			return psoc_sync;
@@ -65,14 +66,14 @@ static struct hdd_psoc_sync *hdd_psoc_sync_lookup(struct device *dev)
 	return NULL;
 }
 
-static struct hdd_psoc_sync *hdd_psoc_sync_get(void)
+static struct osif_psoc_sync *osif_psoc_sync_get(void)
 {
 	int i;
 
-	hdd_psoc_sync_lock_assert();
+	osif_psoc_sync_lock_assert();
 
-	for (i = 0; i < QDF_ARRAY_SIZE(__hdd_psoc_sync_arr); i++) {
-		struct hdd_psoc_sync *psoc_sync = __hdd_psoc_sync_arr + i;
+	for (i = 0; i < QDF_ARRAY_SIZE(__osif_psoc_sync_arr); i++) {
+		struct osif_psoc_sync *psoc_sync = __osif_psoc_sync_arr + i;
 
 		if (!psoc_sync->in_use) {
 			psoc_sync->in_use = true;
@@ -83,18 +84,18 @@ static struct hdd_psoc_sync *hdd_psoc_sync_get(void)
 	return NULL;
 }
 
-static void hdd_psoc_sync_put(struct hdd_psoc_sync *psoc_sync)
+static void osif_psoc_sync_put(struct osif_psoc_sync *psoc_sync)
 {
-	hdd_psoc_sync_lock_assert();
+	osif_psoc_sync_lock_assert();
 
 	qdf_mem_zero(psoc_sync, sizeof(*psoc_sync));
 }
 
-int hdd_psoc_sync_create(struct dsc_driver *dsc_driver,
-			 struct hdd_psoc_sync **out_psoc_sync)
+int osif_psoc_sync_create(struct dsc_driver *dsc_driver,
+			  struct osif_psoc_sync **out_psoc_sync)
 {
 	QDF_STATUS status;
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 
 	QDF_BUG(dsc_driver);
 	if (!dsc_driver)
@@ -104,9 +105,9 @@ int hdd_psoc_sync_create(struct dsc_driver *dsc_driver,
 	if (!out_psoc_sync)
 		return -EINVAL;
 
-	hdd_psoc_sync_lock();
-	psoc_sync = hdd_psoc_sync_get();
-	hdd_psoc_sync_unlock();
+	osif_psoc_sync_lock();
+	psoc_sync = osif_psoc_sync_get();
+	osif_psoc_sync_unlock();
 	if (!psoc_sync)
 		return -ENOMEM;
 
@@ -119,22 +120,22 @@ int hdd_psoc_sync_create(struct dsc_driver *dsc_driver,
 	return 0;
 
 sync_put:
-	hdd_psoc_sync_lock();
-	hdd_psoc_sync_put(psoc_sync);
-	hdd_psoc_sync_unlock();
+	osif_psoc_sync_lock();
+	osif_psoc_sync_put(psoc_sync);
+	osif_psoc_sync_unlock();
 
 	return qdf_status_to_os_return(status);
 }
 
-int __hdd_psoc_sync_create_with_trans(struct dsc_driver *dsc_driver,
-				      struct hdd_psoc_sync **out_psoc_sync,
-				      const char *desc)
+int __osif_psoc_sync_create_with_trans(struct dsc_driver *dsc_driver,
+				       struct osif_psoc_sync **out_psoc_sync,
+				       const char *desc)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 	QDF_STATUS status;
 	int errno;
 
-	errno = hdd_psoc_sync_create(dsc_driver, &psoc_sync);
+	errno = osif_psoc_sync_create(dsc_driver, &psoc_sync);
 	if (errno)
 		return errno;
 
@@ -147,12 +148,12 @@ int __hdd_psoc_sync_create_with_trans(struct dsc_driver *dsc_driver,
 	return 0;
 
 sync_destroy:
-	hdd_psoc_sync_destroy(psoc_sync);
+	osif_psoc_sync_destroy(psoc_sync);
 
 	return qdf_status_to_os_return(status);
 }
 
-void hdd_psoc_sync_destroy(struct hdd_psoc_sync *psoc_sync)
+void osif_psoc_sync_destroy(struct osif_psoc_sync *psoc_sync)
 {
 	QDF_BUG(psoc_sync);
 	if (!psoc_sync)
@@ -160,56 +161,57 @@ void hdd_psoc_sync_destroy(struct hdd_psoc_sync *psoc_sync)
 
 	dsc_psoc_destroy(&psoc_sync->dsc_psoc);
 
-	hdd_psoc_sync_lock();
-	hdd_psoc_sync_put(psoc_sync);
-	hdd_psoc_sync_unlock();
+	osif_psoc_sync_lock();
+	osif_psoc_sync_put(psoc_sync);
+	osif_psoc_sync_unlock();
 }
 
-void hdd_psoc_sync_register(struct device *dev,
-			    struct hdd_psoc_sync *psoc_sync)
+void osif_psoc_sync_register(struct device *dev,
+			     struct osif_psoc_sync *psoc_sync)
 {
 	QDF_BUG(dev);
 	QDF_BUG(psoc_sync);
 	if (!psoc_sync)
 		return;
 
-	hdd_psoc_sync_lock();
+	osif_psoc_sync_lock();
 	psoc_sync->dev = dev;
-	hdd_psoc_sync_unlock();
+	osif_psoc_sync_unlock();
 }
 
-struct hdd_psoc_sync *hdd_psoc_sync_unregister(struct device *dev)
+struct osif_psoc_sync *osif_psoc_sync_unregister(struct device *dev)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 
 	QDF_BUG(dev);
 	if (!dev)
 		return NULL;
 
-	hdd_psoc_sync_lock();
-	psoc_sync = hdd_psoc_sync_lookup(dev);
+	osif_psoc_sync_lock();
+	psoc_sync = osif_psoc_sync_lookup(dev);
 	if (psoc_sync)
 		psoc_sync->dev = NULL;
-	hdd_psoc_sync_unlock();
+	osif_psoc_sync_unlock();
 
 	return psoc_sync;
 }
 
 typedef QDF_STATUS (*psoc_start_func)(struct dsc_psoc *, const char *);
 
-static int __hdd_psoc_sync_start_callback(struct device *dev,
-					  struct hdd_psoc_sync **out_psoc_sync,
-					  const char *desc,
-					  psoc_start_func psoc_start_cb)
+static int
+__osif_psoc_sync_start_callback(struct device *dev,
+				struct osif_psoc_sync **out_psoc_sync,
+				const char *desc,
+				psoc_start_func psoc_start_cb)
 {
 	QDF_STATUS status;
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 
-	hdd_psoc_sync_lock_assert();
+	osif_psoc_sync_lock_assert();
 
 	*out_psoc_sync = NULL;
 
-	psoc_sync = hdd_psoc_sync_lookup(dev);
+	psoc_sync = osif_psoc_sync_lookup(dev);
 	if (!psoc_sync)
 		return -EAGAIN;
 
@@ -222,30 +224,30 @@ static int __hdd_psoc_sync_start_callback(struct device *dev,
 	return 0;
 }
 
-int __hdd_psoc_sync_trans_start(struct device *dev,
-				struct hdd_psoc_sync **out_psoc_sync,
-				const char *desc)
+int __osif_psoc_sync_trans_start(struct device *dev,
+				 struct osif_psoc_sync **out_psoc_sync,
+				 const char *desc)
 {
 	int errno;
 
-	hdd_psoc_sync_lock();
-	errno = __hdd_psoc_sync_start_callback(dev, out_psoc_sync, desc,
-					       dsc_psoc_trans_start);
-	hdd_psoc_sync_unlock();
+	osif_psoc_sync_lock();
+	errno = __osif_psoc_sync_start_callback(dev, out_psoc_sync, desc,
+						dsc_psoc_trans_start);
+	osif_psoc_sync_unlock();
 
 	return errno;
 }
 
-int __hdd_psoc_sync_trans_start_wait(struct device *dev,
-				     struct hdd_psoc_sync **out_psoc_sync,
-				     const char *desc)
+int __osif_psoc_sync_trans_start_wait(struct device *dev,
+				      struct osif_psoc_sync **out_psoc_sync,
+				      const char *desc)
 {
 	int errno;
 
-	hdd_psoc_sync_lock();
-	errno = __hdd_psoc_sync_start_callback(dev, out_psoc_sync, desc,
-					       dsc_psoc_trans_start_wait);
-	hdd_psoc_sync_unlock();
+	osif_psoc_sync_lock();
+	errno = __osif_psoc_sync_start_callback(dev, out_psoc_sync, desc,
+						dsc_psoc_trans_start_wait);
+	osif_psoc_sync_unlock();
 
 	return errno;
 }
@@ -257,82 +259,82 @@ static QDF_STATUS __assert_trans_cb(struct dsc_psoc *dsc_psoc, const char *desc)
 	return QDF_STATUS_SUCCESS;
 }
 
-int hdd_psoc_sync_trans_resume(struct device *dev,
-			       struct hdd_psoc_sync **out_psoc_sync)
+int osif_psoc_sync_trans_resume(struct device *dev,
+				struct osif_psoc_sync **out_psoc_sync)
 {
 	int errno;
 
-	hdd_psoc_sync_lock();
-	errno = __hdd_psoc_sync_start_callback(dev, out_psoc_sync, NULL,
-					       __assert_trans_cb);
-	hdd_psoc_sync_unlock();
+	osif_psoc_sync_lock();
+	errno = __osif_psoc_sync_start_callback(dev, out_psoc_sync, NULL,
+						__assert_trans_cb);
+	osif_psoc_sync_unlock();
 
 	return errno;
 }
 
-void hdd_psoc_sync_trans_stop(struct hdd_psoc_sync *psoc_sync)
+void osif_psoc_sync_trans_stop(struct osif_psoc_sync *psoc_sync)
 {
 	dsc_psoc_trans_stop(psoc_sync->dsc_psoc);
 }
 
-void hdd_psoc_sync_assert_trans_protected(struct device *dev)
+void osif_psoc_sync_assert_trans_protected(struct device *dev)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 
-	hdd_psoc_sync_lock();
+	osif_psoc_sync_lock();
 
-	psoc_sync = hdd_psoc_sync_lookup(dev);
+	psoc_sync = osif_psoc_sync_lookup(dev);
 	QDF_BUG(psoc_sync);
 	if (psoc_sync)
 		dsc_psoc_assert_trans_protected(psoc_sync->dsc_psoc);
 
-	hdd_psoc_sync_unlock();
+	osif_psoc_sync_unlock();
 }
 
-int __hdd_psoc_sync_op_start(struct device *dev,
-			     struct hdd_psoc_sync **out_psoc_sync,
-			     const char *func)
+int __osif_psoc_sync_op_start(struct device *dev,
+			      struct osif_psoc_sync **out_psoc_sync,
+			      const char *func)
 {
 	int errno;
 
-	hdd_psoc_sync_lock();
-	errno = __hdd_psoc_sync_start_callback(dev, out_psoc_sync, func,
-					       _dsc_psoc_op_start);
-	hdd_psoc_sync_unlock();
+	osif_psoc_sync_lock();
+	errno = __osif_psoc_sync_start_callback(dev, out_psoc_sync, func,
+						_dsc_psoc_op_start);
+	osif_psoc_sync_unlock();
 
 	return errno;
 }
 
-void __hdd_psoc_sync_op_stop(struct hdd_psoc_sync *psoc_sync,
-			     const char *func)
+void __osif_psoc_sync_op_stop(struct osif_psoc_sync *psoc_sync,
+			      const char *func)
 {
 	_dsc_psoc_op_stop(psoc_sync->dsc_psoc, func);
 }
 
-void hdd_psoc_sync_wait_for_ops(struct hdd_psoc_sync *psoc_sync)
+void osif_psoc_sync_wait_for_ops(struct osif_psoc_sync *psoc_sync)
 {
 	dsc_psoc_wait_for_ops(psoc_sync->dsc_psoc);
 }
 
 void osif_psoc_sync_init(void)
 {
-	hdd_psoc_sync_lock_create();
+	osif_psoc_sync_lock_create();
 }
 
 void osif_psoc_sync_deinit(void)
 {
-	hdd_psoc_sync_lock_destroy();
+	osif_psoc_sync_lock_destroy();
 }
 
 static QDF_STATUS
 __osif_psoc_sync_dsc_vdev_create(struct device *dev,
 				 struct dsc_vdev **out_dsc_vdev)
 {
-	struct hdd_psoc_sync *psoc_sync;
+	struct osif_psoc_sync *psoc_sync;
 
-	hdd_psoc_sync_lock_assert();
+	osif_psoc_sync_lock_assert();
 
-	psoc_sync = hdd_psoc_sync_lookup(dev);
+	psoc_sync = osif_psoc_sync_lookup(dev);
 	if (!psoc_sync)
 		return QDF_STATUS_E_INVAL;
 
@@ -344,9 +346,9 @@ QDF_STATUS osif_psoc_sync_dsc_vdev_create(struct device *dev,
 {
 	QDF_STATUS status;
 
-	hdd_psoc_sync_lock();
+	osif_psoc_sync_lock();
 	status = __osif_psoc_sync_dsc_vdev_create(dev, out_dsc_vdev);
-	hdd_psoc_sync_unlock();
+	osif_psoc_sync_unlock();
 
 	return status;
 }