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
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
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++);
}
}
#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_ */