aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/xmit.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-06-04 10:54:07 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-06 15:20:32 -0400
commit07c15a3ffd68ff1a3276daa26885b277f19e4abd (patch)
tree54e487efbff040565f647b99b3e49111533140ad /drivers/net/wireless/ath/ath9k/xmit.c
parentb74713d04effbacd3d126ce94cec18742187b6ce (diff)
ath9k: Fix powersave locking
The 'ps_flags' is used/accessed in a variety of contexts and requires proper locking. Use 'sc_pm_lock' appropriately. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/xmit.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index bb74780903d5..f777ddcd1172 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1994,6 +1994,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
1994 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 1994 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
1995 struct ieee80211_hdr * hdr = (struct ieee80211_hdr *)skb->data; 1995 struct ieee80211_hdr * hdr = (struct ieee80211_hdr *)skb->data;
1996 int q, padpos, padsize; 1996 int q, padpos, padsize;
1997 unsigned long flags;
1997 1998
1998 ath_dbg(common, XMIT, "TX complete: skb: %p\n", skb); 1999 ath_dbg(common, XMIT, "TX complete: skb: %p\n", skb);
1999 2000
@@ -2012,6 +2013,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
2012 skb_pull(skb, padsize); 2013 skb_pull(skb, padsize);
2013 } 2014 }
2014 2015
2016 spin_lock_irqsave(&sc->sc_pm_lock, flags);
2015 if ((sc->ps_flags & PS_WAIT_FOR_TX_ACK) && !txq->axq_depth) { 2017 if ((sc->ps_flags & PS_WAIT_FOR_TX_ACK) && !txq->axq_depth) {
2016 sc->ps_flags &= ~PS_WAIT_FOR_TX_ACK; 2018 sc->ps_flags &= ~PS_WAIT_FOR_TX_ACK;
2017 ath_dbg(common, PS, 2019 ath_dbg(common, PS,
@@ -2021,6 +2023,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
2021 PS_WAIT_FOR_PSPOLL_DATA | 2023 PS_WAIT_FOR_PSPOLL_DATA |
2022 PS_WAIT_FOR_TX_ACK)); 2024 PS_WAIT_FOR_TX_ACK));
2023 } 2025 }
2026 spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
2024 2027
2025 q = skb_get_queue_mapping(skb); 2028 q = skb_get_queue_mapping(skb);
2026 if (txq == sc->tx.txq_map[q]) { 2029 if (txq == sc->tx.txq_map[q]) {