Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

zd1211rw: detect stalled beacon interrupt faster

As USB_INT_ID_RETRY_FAILED can override USB_INT_ID_REGS, beacon interrupt
(CR_INTERRUPT) might be lost. Problem is that when device trigger CR_INTERRUPT
it disables HW interrupt. Now if USB_INT_ID_REGS with CR_INTERRUPT gets lost,
beacon interrupt stays disabled until beacon watchdog notices the stall. This
happen very often on heavy TX. Improve watchdog to trigger earlier, after three
missing beacon interrupts.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Jussi Kivilinna and committed by
John W. Linville
55f7782e dde4673b

+2 -1
+2 -1
drivers/net/wireless/zd1211rw/zd_mac.c
··· 1429 1429 spin_lock_irq(&mac->lock); 1430 1430 interval = mac->beacon.interval; 1431 1431 period = mac->beacon.period; 1432 - timeout = mac->beacon.last_update + msecs_to_jiffies(interval) + HZ; 1432 + timeout = mac->beacon.last_update + 1433 + msecs_to_jiffies(interval * 1024 / 1000) * 3; 1433 1434 spin_unlock_irq(&mac->lock); 1434 1435 1435 1436 if (interval > 0 && time_is_before_jiffies(timeout)) {