Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4967)

Unified Diff: chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/main.c

Issue 3367013: CHROMEOS: ath9k: fix power save race conditions (Closed) Base URL: ssh://gitrw.chromium.org/kernel.git
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/recv.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/main.c
diff --git a/chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/main.c b/chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/main.c
index 3caa32316e7b4567c5cbb7372aef8330b8d2a747..06d68fcc99ed73ccb47bcd534d8c37779a873986 100644
--- a/chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/main.c
+++ b/chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/main.c
@@ -1556,6 +1556,8 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
* IEEE80211_CONF_CHANGE_PS is only passed by mac80211 for STA mode.
*/
if (changed & IEEE80211_CONF_CHANGE_PS) {
+ unsigned long flags;
+ spin_lock_irqsave(&sc->sc_pm_lock, flags);
if (conf->flags & IEEE80211_CONF_PS) {
sc->ps_flags |= PS_ENABLED;
/*
@@ -1570,7 +1572,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
sc->ps_enabled = false;
sc->ps_flags &= ~(PS_ENABLED |
PS_NULLFUNC_COMPLETED);
- ath9k_setpower(sc, ATH9K_PM_AWAKE);
+ ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE);
if (!(ah->caps.hw_caps &
ATH9K_HW_CAP_AUTOSLEEP)) {
ath9k_hw_setrxabort(sc->sc_ah, 0);
@@ -1585,6 +1587,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
}
}
}
+ spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
}
if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
« no previous file with comments | « no previous file | chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/recv.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698