summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnson <jjohnson@qca.qualcomm.com>2015-08-12 18:39:47 -0700
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-08-14 13:29:18 +0530
commit739ec4e45bb8fddd4b8f14f74e93df198119c675 (patch)
tree482caed90dd1785dbbb3be0bbb898ec7e720e646
parentb6a69baa409cad25812358d35a882599b64ad1c5 (diff)
qcacld-2.0: SSR-protect wlan_hdd_cfg80211_disable_dfs_chan_scan()
Currently wlan_hdd_cfg80211_disable_dfs_chan_scan() does not use the SSR protection wrapper. This can lead to unexpected behavior if the function is executing concurrently with SSR, so add the SSR protection wrapper. Change-Id: I6edb9b00b54a5b450ef5c2046b7bfd107702a2df CRs-Fixed: 889507
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c39
1 files changed, 34 insertions, 5 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index e23bf0e27431..51c01f4a9f27 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -7378,7 +7378,7 @@ int wlan_hdd_disable_dfs_chan_scan(hdd_context_t *pHddCtx,
}
/**
- * wlan_hdd_cfg80211_disable_dfs_chan_scan () - DFS scan vendor command
+ * __wlan_hdd_cfg80211_disable_dfs_chan_scan () - DFS scan vendor command
*
* @wiphy: wiphy device pointer
* @wdev: wireless device pointer
@@ -7391,10 +7391,10 @@ int wlan_hdd_disable_dfs_chan_scan(hdd_context_t *pHddCtx,
* Return: EOK or other error codes.
*/
-static int wlan_hdd_cfg80211_disable_dfs_chan_scan(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- const void *data,
- int data_len)
+static int __wlan_hdd_cfg80211_disable_dfs_chan_scan(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data,
+ int data_len)
{
struct net_device *dev = wdev->netdev;
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
@@ -7440,6 +7440,35 @@ static int wlan_hdd_cfg80211_disable_dfs_chan_scan(struct wiphy *wiphy,
return ret_val;
}
+/**
+ * wlan_hdd_cfg80211_disable_dfs_chan_scan () - DFS scan vendor command
+ *
+ * @wiphy: wiphy device pointer
+ * @wdev: wireless device pointer
+ * @data: Vendof command data buffer
+ * @data_len: Buffer length
+ *
+ * Handles QCA_WLAN_VENDOR_ATTR_SET_NO_DFS_FLAG_MAX. Validate it and
+ * call wlan_hdd_disable_dfs_chan_scan to send it to firmware.
+ *
+ * Return: EOK or other error codes.
+ */
+
+static int wlan_hdd_cfg80211_disable_dfs_chan_scan(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data,
+ int data_len)
+{
+ int ret;
+
+ vos_ssr_protect(__func__);
+ ret = __wlan_hdd_cfg80211_disable_dfs_chan_scan(wiphy, wdev,
+ data, data_len);
+ vos_ssr_unprotect(__func__);
+
+ return ret;
+}
+
static int wlan_hdd_config_acs(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter)
{
tsap_Config_t *sap_config;