diff --git a/core/hdd/src/wlan_hdd_active_tos.c b/core/hdd/src/wlan_hdd_active_tos.c index 25b381fd11..74dece3c43 100644 --- a/core/hdd/src/wlan_hdd_active_tos.c +++ b/core/hdd/src/wlan_hdd_active_tos.c @@ -23,6 +23,7 @@ * */ +#include "osif_sync.h" #include #include #include @@ -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; } diff --git a/core/hdd/src/wlan_hdd_bss_transition.c b/core/hdd/src/wlan_hdd_bss_transition.c index 71bdcc2632..da842121b5 100644 --- a/core/hdd/src/wlan_hdd_bss_transition.c +++ b/core/hdd/src/wlan_hdd_bss_transition.c @@ -23,6 +23,7 @@ * */ +#include "osif_sync.h" #include #include #include @@ -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; - cds_ssr_protect(__func__); - ret = __wlan_hdd_cfg80211_fetch_bss_transition_status(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_fetch_bss_transition_status(wiphy, wdev, + data, data_len); + + osif_vdev_sync_op_stop(vdev_sync); + + return errno; } diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 15d38047b1..9f7e72a3e0 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/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); } /** diff --git a/core/hdd/src/wlan_hdd_concurrency_matrix.c b/core/hdd/src/wlan_hdd_concurrency_matrix.c index bb96208581..ea091bcb78 100644 --- a/core/hdd/src/wlan_hdd_concurrency_matrix.c +++ b/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 #include #include @@ -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; - cds_ssr_protect(__func__); - ret = __wlan_hdd_cfg80211_get_concurrency_matrix(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_cfg80211_get_concurrency_matrix(wiphy, wdev, + data, data_len); + + osif_psoc_sync_op_stop(psoc_sync); + + return errno; } diff --git a/core/hdd/src/wlan_hdd_ota_test.c b/core/hdd/src/wlan_hdd_ota_test.c index 1a6efb6fc9..8992efb6a6 100644 --- a/core/hdd/src/wlan_hdd_ota_test.c +++ b/core/hdd/src/wlan_hdd_ota_test.c @@ -23,6 +23,7 @@ * */ +#include "osif_sync.h" #include #include #include @@ -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; } diff --git a/core/hdd/src/wlan_hdd_p2p_listen_offload.c b/core/hdd/src/wlan_hdd_p2p_listen_offload.c index 0c9bada0dd..e562b932d7 100644 --- a/core/hdd/src/wlan_hdd_p2p_listen_offload.c +++ b/core/hdd/src/wlan_hdd_p2p_listen_offload.c @@ -23,6 +23,7 @@ * */ +#include "osif_sync.h" #include #include #include @@ -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; - cds_ssr_protect(__func__); - ret = __wlan_hdd_cfg80211_p2p_lo_start(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_p2p_lo_start(wiphy, wdev, + data, data_len); + + osif_vdev_sync_op_stop(vdev_sync); + + 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; - cds_ssr_protect(__func__); - ret = __wlan_hdd_cfg80211_p2p_lo_stop(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_p2p_lo_stop(wiphy, wdev, + data, data_len); + + osif_vdev_sync_op_stop(vdev_sync); + + return errno; } diff --git a/core/hdd/src/wlan_hdd_rssi_monitor.c b/core/hdd/src/wlan_hdd_rssi_monitor.c index 2fa9d4be28..1033d58f1f 100644 --- a/core/hdd/src/wlan_hdd_rssi_monitor.c +++ b/core/hdd/src/wlan_hdd_rssi_monitor.c @@ -23,6 +23,7 @@ * */ +#include "osif_sync.h" #include #include #include @@ -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; - cds_ssr_protect(__func__); - ret = __wlan_hdd_cfg80211_monitor_rssi(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_monitor_rssi(wiphy, wdev, data, data_len); + + osif_vdev_sync_op_stop(vdev_sync); + + return errno; } void hdd_rssi_threshold_breached(hdd_handle_t hdd_handle, diff --git a/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c b/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c index ef71c8f2be..f1c4903255 100644 --- a/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c +++ b/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; - cds_ssr_protect(__func__); - ret = __wlan_hdd_cfg80211_conditional_chan_switch(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_conditional_chan_switch(wiphy, wdev, + data, data_len); + + osif_vdev_sync_op_stop(vdev_sync); + + return errno; } diff --git a/core/hdd/src/wlan_hdd_sar_limits.c b/core/hdd/src/wlan_hdd_sar_limits.c index c500ddc6c7..bb94ec6b88 100644 --- a/core/hdd/src/wlan_hdd_sar_limits.c +++ b/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 #include #include @@ -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; } diff --git a/core/hdd/src/wlan_hdd_station_info.c b/core/hdd/src/wlan_hdd_station_info.c index 2c361c552c..e84e3804a3 100644 --- a/core/hdd/src/wlan_hdd_station_info.c +++ b/core/hdd/src/wlan_hdd_station_info.c @@ -23,6 +23,7 @@ * */ +#include "osif_sync.h" #include #include #include @@ -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; } diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 920ae6c2bf..2409ee1681 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/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 diff --git a/core/hdd/src/wlan_hdd_tx_power.c b/core/hdd/src/wlan_hdd_tx_power.c index 3339bc629b..0e23de0959 100644 --- a/core/hdd/src/wlan_hdd_tx_power.c +++ b/core/hdd/src/wlan_hdd_tx_power.c @@ -23,6 +23,7 @@ * */ +#include "osif_sync.h" #include #include #include @@ -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; - cds_ssr_protect(__func__); - ret = __wlan_hdd_cfg80211_txpower_scale(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_txpower_scale(wiphy, wdev, data, data_len); + + osif_vdev_sync_op_stop(vdev_sync); + + 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; - cds_ssr_protect(__func__); - ret = __wlan_hdd_cfg80211_txpower_scale_decr_db(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_txpower_scale_decr_db(wiphy, wdev, + data, data_len); + + osif_vdev_sync_op_stop(vdev_sync); + + return errno; }