summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSenthil Balasubramanian2008-12-09 12:53:33 +0100
committerJohn W. Linville2008-12-12 20:01:37 +0100
commita07d3619faeea3f540dd55f86685136f8928b4ad (patch)
treed836b56689793fe6991cbce837a3387d4ad7bb15 /drivers
parentmac80211/cfg80211: check endianness in sparse runs (diff)
downloadkernel-qcow2-linux-a07d3619faeea3f540dd55f86685136f8928b4ad.tar.gz
kernel-qcow2-linux-a07d3619faeea3f540dd55f86685136f8928b4ad.tar.xz
kernel-qcow2-linux-a07d3619faeea3f540dd55f86685136f8928b4ad.zip
ath9k: BH shouldn't be enabled when hardirqs are disabled.
ath_tx_complete_buf uses a BH version of spinlock and so releasing the lock enables BH which is incorrect when called from sta_notify callback as MAC80211 disables hardirqs before the driver callback is called. As ath_tx_complete_buf is shared between user and softirq context using normal spinlock may not be appropriate. Though the proper fix would be to cleanup the context properly in the driver code, this would be an interim fix to avoid kernel warning. Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath9k/xmit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
index ec359c624831..e2e847db0891 100644
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -310,6 +310,7 @@ static void ath_tx_complete_buf(struct ath_softc *sc,
{
struct sk_buff *skb = bf->bf_mpdu;
struct ath_xmit_status tx_status;
+ unsigned long flags;
/*
* Set retry information.
@@ -340,9 +341,9 @@ static void ath_tx_complete_buf(struct ath_softc *sc,
/*
* Return the list of ath_buf of this mpdu to free queue
*/
- spin_lock_bh(&sc->sc_txbuflock);
+ spin_lock_irqsave(&sc->sc_txbuflock, flags);
list_splice_tail_init(bf_q, &sc->sc_txbuf);
- spin_unlock_bh(&sc->sc_txbuflock);
+ spin_unlock_irqrestore(&sc->sc_txbuflock, flags);
}
/*