diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-17 19:22:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:07:46 -0500 |
commit | 354eca9820f1efbf11978585640f1b2e92d4c5b4 (patch) | |
tree | 6898a89c5ebd85f6bdaa38d660daa36c48930096 | |
parent | 18c52e7c3e3d0e7fbddd0334b58030bb89554cb9 (diff) |
libertas: submit RSSI command on tx timeout, to check whether module is dead
We don't necessarily want to reset the device on a TX timeout. But more
often than not, the real cause is that the firmware has crapped itself,
not just that the network is busy. So submit any harmless command, and
if _that_ times out, then the error handling code will reset the module,
as appropriate.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 9677b0d77160..74353e1d72ff 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -476,6 +476,13 @@ static void lbs_tx_timeout(struct net_device *dev) | |||
476 | to kick it somehow? */ | 476 | to kick it somehow? */ |
477 | lbs_host_to_card_done(priv); | 477 | lbs_host_to_card_done(priv); |
478 | 478 | ||
479 | /* More often than not, this actually happens because the | ||
480 | firmware has crapped itself -- rather than just a very | ||
481 | busy medium. So send a harmless command, and if/when | ||
482 | _that_ times out, we'll kick it in the head. */ | ||
483 | lbs_prepare_and_send_command(priv, CMD_802_11_RSSI, 0, | ||
484 | 0, 0, NULL); | ||
485 | |||
479 | lbs_deb_leave(LBS_DEB_TX); | 486 | lbs_deb_leave(LBS_DEB_TX); |
480 | } | 487 | } |
481 | 488 | ||