diff options
| author | Jeff Johnson <jjohnson@qca.qualcomm.com> | 2015-08-12 20:03:45 -0700 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-08-14 13:29:21 +0530 |
| commit | f337c8137236956a4efaa4ab4ee2f87f3756fa69 (patch) | |
| tree | ddacac574b7d788da49171aa4878ad0932a2da13 | |
| parent | 186dea58c67b2937c6cec0dea23a92b489d5be89 (diff) | |
qcacld-2.0: SSR-protect wlan_hdd_cfg80211_ocb_get_tsf_timer()
Currently wlan_hdd_cfg80211_ocb_get_tsf_timer() 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: I564eb7a96c2306aa419384677070cf0474ece015
CRs-Fixed: 889507
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_ocb.c | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/CORE/HDD/src/wlan_hdd_ocb.c b/CORE/HDD/src/wlan_hdd_ocb.c index 898cd5967f0f..2c190839bef8 100644 --- a/CORE/HDD/src/wlan_hdd_ocb.c +++ b/CORE/HDD/src/wlan_hdd_ocb.c @@ -1464,7 +1464,7 @@ static void hdd_ocb_get_tsf_timer_callback(void *context_ptr, } /** - * wlan_hdd_cfg80211_ocb_get_tsf_timer() - Interface for get TSF timer cmd + * __wlan_hdd_cfg80211_ocb_get_tsf_timer() - Interface for get TSF timer cmd * @wiphy: pointer to the wiphy * @wdev: pointer to the wdev * @data: The netlink data @@ -1472,10 +1472,11 @@ static void hdd_ocb_get_tsf_timer_callback(void *context_ptr, * * Return: 0 on success. */ -int wlan_hdd_cfg80211_ocb_get_tsf_timer(struct wiphy *wiphy, - struct wireless_dev *wdev, - const void *data, - int data_len) +static int +__wlan_hdd_cfg80211_ocb_get_tsf_timer(struct wiphy *wiphy, + struct wireless_dev *wdev, + const void *data, + int data_len) { struct sk_buff *nl_resp = 0; hdd_context_t *hdd_ctx = wiphy_priv(wiphy); @@ -1582,6 +1583,30 @@ end: } /** + * wlan_hdd_cfg80211_ocb_get_tsf_timer() - Interface for get TSF timer 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_ocb_get_tsf_timer(struct wiphy *wiphy, + struct wireless_dev *wdev, + const void *data, + int data_len) +{ + int ret; + + vos_ssr_protect(__func__); + ret = __wlan_hdd_cfg80211_ocb_get_tsf_timer(wiphy, wdev, + data, data_len); + vos_ssr_unprotect(__func__); + + return ret; +} + +/** * hdd_dcc_get_stats_callback() - Callback to get stats command * @context_ptr: request context * @response_ptr: response data |
