mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-27 04:54:41 +08:00
ath9k: rename rxflushlock to pcu_lock
The real way to lock RX is to contend on the PCU and reset, this will be fixed in the next patch but for now just do the renames so that the next patch which changes the locking order is crystal clear. This is part of a series that will help resolve the bug: https://bugzilla.kernel.org/show_bug.cgi?id=14624 For more details about this issue refer to: http://marc.info/?l=linux-wireless&m=128629803703756&w=2 Cc: stable@kernel.org Cc: Ben Greear <greearb@candelatech.com> Cc: Kyungwan Nam <kyungwan.nam@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Tested-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
7583c550c3
commit
b79b33c4ba
@ -310,7 +310,7 @@ struct ath_rx {
|
|||||||
u8 rxotherant;
|
u8 rxotherant;
|
||||||
u32 *rxlink;
|
u32 *rxlink;
|
||||||
unsigned int rxfilter;
|
unsigned int rxfilter;
|
||||||
spinlock_t rxflushlock;
|
spinlock_t pcu_lock;
|
||||||
spinlock_t rxbuflock;
|
spinlock_t rxbuflock;
|
||||||
struct list_head rxbuf;
|
struct list_head rxbuf;
|
||||||
struct ath_descdma rxdma;
|
struct ath_descdma rxdma;
|
||||||
|
@ -613,7 +613,7 @@ void ath9k_tasklet(unsigned long data)
|
|||||||
rxmask = (ATH9K_INT_RX | ATH9K_INT_RXEOL | ATH9K_INT_RXORN);
|
rxmask = (ATH9K_INT_RX | ATH9K_INT_RXEOL | ATH9K_INT_RXORN);
|
||||||
|
|
||||||
if (status & rxmask) {
|
if (status & rxmask) {
|
||||||
spin_lock_bh(&sc->rx.rxflushlock);
|
spin_lock_bh(&sc->rx.pcu_lock);
|
||||||
|
|
||||||
/* Check for high priority Rx first */
|
/* Check for high priority Rx first */
|
||||||
if ((ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) &&
|
if ((ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) &&
|
||||||
@ -621,7 +621,7 @@ void ath9k_tasklet(unsigned long data)
|
|||||||
ath_rx_tasklet(sc, 0, true);
|
ath_rx_tasklet(sc, 0, true);
|
||||||
|
|
||||||
ath_rx_tasklet(sc, 0, false);
|
ath_rx_tasklet(sc, 0, false);
|
||||||
spin_unlock_bh(&sc->rx.rxflushlock);
|
spin_unlock_bh(&sc->rx.pcu_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status & ATH9K_INT_TX) {
|
if (status & ATH9K_INT_TX) {
|
||||||
|
@ -317,7 +317,7 @@ int ath_rx_init(struct ath_softc *sc, int nbufs)
|
|||||||
struct ath_buf *bf;
|
struct ath_buf *bf;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
spin_lock_init(&sc->rx.rxflushlock);
|
spin_lock_init(&sc->rx.pcu_lock);
|
||||||
sc->sc_flags &= ~SC_OP_RXFLUSH;
|
sc->sc_flags &= ~SC_OP_RXFLUSH;
|
||||||
spin_lock_init(&sc->rx.rxbuflock);
|
spin_lock_init(&sc->rx.rxbuflock);
|
||||||
|
|
||||||
@ -533,13 +533,13 @@ bool ath_stoprecv(struct ath_softc *sc)
|
|||||||
|
|
||||||
void ath_flushrecv(struct ath_softc *sc)
|
void ath_flushrecv(struct ath_softc *sc)
|
||||||
{
|
{
|
||||||
spin_lock_bh(&sc->rx.rxflushlock);
|
spin_lock_bh(&sc->rx.pcu_lock);
|
||||||
sc->sc_flags |= SC_OP_RXFLUSH;
|
sc->sc_flags |= SC_OP_RXFLUSH;
|
||||||
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
|
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
|
||||||
ath_rx_tasklet(sc, 1, true);
|
ath_rx_tasklet(sc, 1, true);
|
||||||
ath_rx_tasklet(sc, 1, false);
|
ath_rx_tasklet(sc, 1, false);
|
||||||
sc->sc_flags &= ~SC_OP_RXFLUSH;
|
sc->sc_flags &= ~SC_OP_RXFLUSH;
|
||||||
spin_unlock_bh(&sc->rx.rxflushlock);
|
spin_unlock_bh(&sc->rx.pcu_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ath_beacon_dtim_pending_cab(struct sk_buff *skb)
|
static bool ath_beacon_dtim_pending_cab(struct sk_buff *skb)
|
||||||
|
Loading…
Reference in New Issue
Block a user