summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnson <jjohnson@qca.qualcomm.com>2015-08-12 20:17:08 -0700
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-08-14 13:29:21 +0530
commit12fac4ab67491f05e4b8e820ff5fd2c4d336c0c0 (patch)
tree690969778b4d8a49dddef87193a0d1bb4cae7c73
parent5ae10888ad92f0b2751ce0dc73be83e891b230db (diff)
qcacld-2.0: SSR-protect wlan_hdd_cfg80211_dcc_update_ndl()
Currently wlan_hdd_cfg80211_dcc_update_ndl() 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: I622466db231911e3a0ee07d753f21f7a0243feec CRs-Fixed: 889507
-rw-r--r--CORE/HDD/src/wlan_hdd_ocb.c34
1 files changed, 29 insertions, 5 deletions
diff --git a/CORE/HDD/src/wlan_hdd_ocb.c b/CORE/HDD/src/wlan_hdd_ocb.c
index 0e6adc73ea84..70d50f77a92f 100644
--- a/CORE/HDD/src/wlan_hdd_ocb.c
+++ b/CORE/HDD/src/wlan_hdd_ocb.c
@@ -1953,7 +1953,7 @@ static void hdd_dcc_update_ndl_callback(void *context_ptr, void *response_ptr)
}
/**
- * wlan_hdd_cfg80211_dcc_update_ndl() - Interface for update dcc cmd
+ * __wlan_hdd_cfg80211_dcc_update_ndl() - Interface for update dcc cmd
* @wiphy: pointer to the wiphy
* @wdev: pointer to the wdev
* @data: The netlink data
@@ -1961,10 +1961,10 @@ static void hdd_dcc_update_ndl_callback(void *context_ptr, void *response_ptr)
*
* Return: 0 on success.
*/
-int wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- const void *data,
- int data_len)
+static int __wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data,
+ int data_len)
{
hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
struct net_device *dev = wdev->netdev;
@@ -2084,6 +2084,30 @@ end:
}
/**
+ * wlan_hdd_cfg80211_dcc_update_ndl() - Interface for update dcc cmd
+ * @wiphy: pointer to the wiphy
+ * @wdev: pointer to the wdev
+ * @data: The netlink data
+ * @data_len: The length of the netlink data in bytes
+ *
+ * Return: 0 on success.
+ */
+int wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data,
+ int data_len)
+{
+ int ret;
+
+ vos_ssr_protect(__func__);
+ ret = __wlan_hdd_cfg80211_dcc_update_ndl(wiphy, wdev,
+ data, data_len);
+ vos_ssr_unprotect(__func__);
+
+ return ret;
+}
+
+/**
* wlan_hdd_dcc_stats_event_callback() - Callback to get stats event
* @context_ptr: request context
* @response_ptr: response data