aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1211rw
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2011-06-20 07:42:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-06-22 16:09:47 -0400
commit55f7782e14032c70051aa92d882b4effda407ad5 (patch)
tree33f753949bac16ba057b0d5481dc0cf6fcc7044e /drivers/net/wireless/zd1211rw
parentdde4673b8d73dd873e1a62774728e4b7f972facd (diff)
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>
Diffstat (limited to 'drivers/net/wireless/zd1211rw')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index b67c52d9c36c..cabfae1e70b1 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -1429,7 +1429,8 @@ static void beacon_watchdog_handler(struct work_struct *work)
1429 spin_lock_irq(&mac->lock); 1429 spin_lock_irq(&mac->lock);
1430 interval = mac->beacon.interval; 1430 interval = mac->beacon.interval;
1431 period = mac->beacon.period; 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 spin_unlock_irq(&mac->lock); 1434 spin_unlock_irq(&mac->lock);
1434 1435
1435 if (interval > 0 && time_is_before_jiffies(timeout)) { 1436 if (interval > 0 && time_is_before_jiffies(timeout)) {