diff options
| author | Mahesh A Saptasagar <c_msapta@qti.qualcomm.com> | 2014-06-02 21:46:23 +0530 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-06-13 11:49:50 -0700 |
| commit | 382d1ead4bcad4b90ab179259ee5feabbfca8a75 (patch) | |
| tree | 368d542679d5f1d1a2c9bbc45fdfbaec8243295f | |
| parent | f4878f137bddc23bff4a0a747fcfffd41a989312 (diff) | |
wlan: Protect suspend and resume cfg80211 ops functions from SSR
Protect wlan_suspend and wlan_resume cfg80211 ops functions
from accessing deallocated/unitialized data structures while
SSR is in progress.
Change-Id: If607798b8bc058185bccf2f9e7ef27c883deb36d
CRs-Fixed: 675456
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 9fa9b1aceac7..baa54d8b019a 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -10664,11 +10664,11 @@ static int wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy, } /* - * FUNCTION: wlan_hdd_cfg80211_resume_wlan + * FUNCTION: __wlan_hdd_cfg80211_resume_wlan * this is called when cfg80211 driver resume * driver updates latest sched_scan scan result(if any) to cfg80211 database */ -int wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) +int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) { hdd_context_t *pHddCtx = wiphy_priv(wiphy); hdd_adapter_t *pAdapter; @@ -10775,11 +10775,22 @@ void wlan_hdd_cfg80211_ready_to_suspend(void *callbackContext, boolean suspended } #endif +int wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) +{ + int ret; + + vos_ssr_protect(__func__); + ret = __wlan_hdd_cfg80211_resume_wlan(wiphy); + vos_ssr_unprotect(__func__); + + return ret; +} + /* - * FUNCTION: wlan_hdd_cfg80211_suspend_wlan + * FUNCTION: __wlan_hdd_cfg80211_suspend_wlan * this is called when cfg80211 driver suspends */ -int wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, +int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, struct cfg80211_wowlan *wow) { #ifdef QCA_CONFIG_SMP @@ -10921,6 +10932,17 @@ resume_tx: } +int wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, + struct cfg80211_wowlan *wow) +{ + int ret; + + vos_ssr_protect(__func__); + ret = __wlan_hdd_cfg80211_suspend_wlan(wiphy, wow); + vos_ssr_unprotect(__func__); + + return ret; +} /* cfg80211_ops */ static struct cfg80211_ops wlan_hdd_cfg80211_ops = { |
