diff options
| author | Jeff Johnson <jjohnson@qca.qualcomm.com> | 2015-08-13 14:24:54 -0700 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-08-19 15:11:17 +0530 |
| commit | 0a00eeaba299835d6ee46bd702a10ccf9e622791 (patch) | |
| tree | 81e401f6bcb9f609938fd1a2504d2ab2d5038f36 | |
| parent | 30d3c65ab03b34d65017e2edac95bebcf9945009 (diff) | |
qcacld-2.0: SSR-protect wlan_hdd_cfg80211_set_ap_channel_width()
Currently wlan_hdd_cfg80211_set_ap_channel_width() 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: I6d35881235463b492e0375c0d268653b25862f0f
CRs-Fixed: 889507
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 1cd8790e8dc4..07c6e1547dc6 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -21373,9 +21373,18 @@ int wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, } #ifdef QCA_HT_2040_COEX -int wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy, - struct net_device *dev, - struct cfg80211_chan_def *chandef) +/** + * __wlan_hdd_cfg80211_set_ap_channel_width() - set ap channel bandwidth + * @wiphy: Pointer to wiphy + * @dev: Pointer to network device + * @chandef: Pointer to channel definition parameter + * + * Return: 0 for success, non-zero for failure + */ +static int +__wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_chan_def *chandef) { hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); hdd_context_t *pHddCtx; @@ -21448,6 +21457,28 @@ int wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy, return 0; } + +/** + * wlan_hdd_cfg80211_set_ap_channel_width() - set ap channel bandwidth + * @wiphy: Pointer to wiphy + * @dev: Pointer to network device + * @chandef: Pointer to channel definition parameter + * + * Return: 0 for success, non-zero for failure + */ +static int +wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_chan_def *chandef) +{ + int ret; + + vos_ssr_protect(__func__); + ret = __wlan_hdd_cfg80211_set_ap_channel_width(wiphy, dev, chandef); + vos_ssr_unprotect(__func__); + + return ret; +} #endif #ifdef FEATURE_WLAN_EXTSCAN |
