From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
To: linux-wireless@vger.kernel.org
Cc: Daniel Drake <dsd@gentoo.org>,
"John W. Linville" <linville@tuxdriver.com>,
Ulrich Kunitz <kune@deine-taler.de>
Subject: [PATCH 6/6] zd1211rw: detect stalled beacon interrupt faster
Date: Mon, 20 Jun 2011 14:42:54 +0300 [thread overview]
Message-ID: <20110620114254.964.92160.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110620114228.964.35459.stgit@localhost6.localdomain6>
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>
---
drivers/net/wireless/zd1211rw/zd_mac.c | 3 ++-
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 b67c52d..cabfae1 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)
spin_lock_irq(&mac->lock);
interval = mac->beacon.interval;
period = mac->beacon.period;
- timeout = mac->beacon.last_update + msecs_to_jiffies(interval) + HZ;
+ timeout = mac->beacon.last_update +
+ msecs_to_jiffies(interval * 1024 / 1000) * 3;
spin_unlock_irq(&mac->lock);
if (interval > 0 && time_is_before_jiffies(timeout)) {
prev parent reply other threads:[~2011-06-20 11:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-20 11:42 [PATCH 1/6] zd1211rw: fix invalid signal values from device Jussi Kivilinna
2011-06-20 11:42 ` [PATCH 2/6] zd1211rw: make 'handle_rx_packet: invalid, small RX packet' message debug-only Jussi Kivilinna
2011-06-20 11:42 ` [PATCH 3/6] zd1211rw: only update HW beacon if new beacon differs from currect Jussi Kivilinna
2011-07-02 12:34 ` Walter Goldens
2011-07-04 14:37 ` Jussi Kivilinna
2011-06-20 11:42 ` [PATCH 4/6] zd1211rw: handle lost read-reg interrupts Jussi Kivilinna
2011-06-20 11:42 ` [PATCH 5/6] zd1211rw: don't let zd_mac_config_beacon() run too long from beacon interrupt handler Jussi Kivilinna
2011-06-20 11:42 ` Jussi Kivilinna [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110620114254.964.92160.stgit@localhost6.localdomain6 \
--to=jussi.kivilinna@mbnet.fi \
--cc=dsd@gentoo.org \
--cc=kune@deine-taler.de \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox