summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/zd1211rw/zd_chip.c
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2011-01-31 21:49:52 +0300
committerJohn W. Linville <linville@tuxdriver.com>2011-02-05 00:29:51 +0300
commita0fd751f0924e0eefa36592f1d358c4ab18b44c5 (patch)
tree35505bb17a07f66dc18b0c456bd5086efe01918c /drivers/net/wireless/zd1211rw/zd_chip.c
parent212e1a5b9df0a51d54d7841467f3f01baa1b82f1 (diff)
downloadlinux-a0fd751f0924e0eefa36592f1d358c4ab18b44c5.tar.xz
zd1211rw: add TX watchdog and device resetting
When doing transfers at high speed for long time, tx queue can freeze. So add tx watchdog. TX-watchdog checks for locked tx-urbs and reset hardware when such is detected. Merely unlinking urb was not enough, device have to be reseted. Hw settings are restored so that any open link will stay on after reset. 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/zd_chip.c')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_chip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
index 907e6562cb59..54f68f134ea7 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -1448,6 +1448,7 @@ int zd_chip_enable_rxtx(struct zd_chip *chip)
mutex_lock(&chip->mutex);
zd_usb_enable_tx(&chip->usb);
r = zd_usb_enable_rx(&chip->usb);
+ zd_tx_watchdog_enable(&chip->usb);
mutex_unlock(&chip->mutex);
return r;
}
@@ -1455,6 +1456,7 @@ int zd_chip_enable_rxtx(struct zd_chip *chip)
void zd_chip_disable_rxtx(struct zd_chip *chip)
{
mutex_lock(&chip->mutex);
+ zd_tx_watchdog_disable(&chip->usb);
zd_usb_disable_rx(&chip->usb);
zd_usb_disable_tx(&chip->usb);
mutex_unlock(&chip->mutex);