mirror of
https://github.com/proski/madwifi
synced 2024-11-22 06:21:47 +03:00
Avoid triggering lockdep checker in ath_hw_reset()
Use spin_lock_irqsave_nested() instead of spin_lock_irqsave(). Use a separate counter for the locking subclass, so that we don't exceed the maximal value of 8. We have 10 queues, but inactive queues don't get a locking subclass number. Provide a replacement for spin_lock_irqsave_nested() for kernels older than 2.6.19. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3995 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
parent
407bde2595
commit
b424bc2d8b
@ -1633,7 +1633,7 @@ static HAL_BOOL ath_hw_reset(struct ath_softc *sc, HAL_OPMODE opmode,
|
||||
HAL_BOOL ret;
|
||||
unsigned long __axq_lockflags[HAL_NUM_TX_QUEUES];
|
||||
struct ath_txq * txq;
|
||||
int i;
|
||||
int i, lclass = 0;
|
||||
u_int8_t old_privFlags = sc->sc_curchan.privFlags;
|
||||
|
||||
/* ath_hal_reset() resets all TXDP pointers, so we need to
|
||||
@ -1643,7 +1643,8 @@ static HAL_BOOL ath_hw_reset(struct ath_softc *sc, HAL_OPMODE opmode,
|
||||
for (i = 0; i < HAL_NUM_TX_QUEUES; i++) {
|
||||
if (ATH_TXQ_SETUP(sc, i)) {
|
||||
txq = &sc->sc_txq[i];
|
||||
spin_lock_irqsave(&txq->axq_lock, __axq_lockflags[i]);
|
||||
spin_lock_irqsave_nested(&txq->axq_lock,
|
||||
__axq_lockflags[i], lclass++);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,6 +210,13 @@ typedef unsigned long resource_size_t;
|
||||
#define request_module(_fmt, _modname) request_module(_modname)
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
|
||||
#ifndef spin_lock_irqsave_nested
|
||||
#define spin_lock_irqsave_nested(_lock, _flags, _subclass) \
|
||||
spin_lock_irqsave(_lock, _flags)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _ATH_COMPAT_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user