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

Unified Diff: chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/recv.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 | « chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/main.c ('k') | no next file » | 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/recv.c
diff --git a/chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/recv.c b/chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/recv.c
index 534a91bcc1d980a28d26ae3ebdef57e2c99566ca..e6e425dc3178d2eece7080b11c16988daf4a0e95 100644
--- a/chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/recv.c
+++ b/chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/recv.c
@@ -1099,6 +1099,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
u8 rx_status_len = ah->caps.rx_status_len;
u64 tsf = 0;
u32 tsf_lower = 0;
+ unsigned long flags;
if (edma)
dma_type = DMA_BIDIRECTIONAL;
@@ -1207,11 +1208,13 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
sc->rx.rxotherant = 0;
}
+ spin_lock_irqsave(&sc->sc_pm_lock, flags);
if (unlikely(ath9k_check_auto_sleep(sc) ||
(sc->ps_flags & (PS_WAIT_FOR_BEACON |
PS_WAIT_FOR_CAB |
PS_WAIT_FOR_PSPOLL_DATA))))
ath_rx_ps(sc, skb);
+ spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
ath_rx_send_to_mac80211(hw, sc, skb, rxs);
« no previous file with comments | « chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/main.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698