Skip to content

Commit

Permalink
ath9k: BH shouldn't be enabled when hardirqs are disabled.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Senthil Balasubramanian authored and John W. Linville committed Dec 12, 2008
1 parent b143923 commit a07d361
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit a07d361

Please sign in to comment.