aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/main.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-06-20 11:44:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-27 09:09:16 -0400
commit9b839a7453dc7a25dbd367486017648182df541f (patch)
treef2b12183594aba5f0e278210239fc41071f05ba8 /drivers/net/wireless/b43/main.c
parent9ae705cfd390f9077eec856ea4dff374d166de33 (diff)
b43: Add simple firmware watchdog
This adds a simple firmware watchdog for the opensource firmware. This will check every 15 seconds, if the firmware zeroed out the watchdog register. The firmware will do this in its eventloop. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r--drivers/net/wireless/b43/main.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 69272b9bdb6..c14d522d69e 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2807,6 +2807,21 @@ static void b43_periodic_every30sec(struct b43_wldev *dev)
2807static void b43_periodic_every15sec(struct b43_wldev *dev) 2807static void b43_periodic_every15sec(struct b43_wldev *dev)
2808{ 2808{
2809 struct b43_phy *phy = &dev->phy; 2809 struct b43_phy *phy = &dev->phy;
2810 u16 wdr;
2811
2812 if (dev->fw.opensource) {
2813 /* Check if the firmware is still alive.
2814 * It will reset the watchdog counter to 0 in its idle loop. */
2815 wdr = b43_shm_read16(dev, B43_SHM_SCRATCH, B43_WATCHDOG_REG);
2816 if (unlikely(wdr)) {
2817 b43err(dev->wl, "Firmware watchdog: The firmware died!\n");
2818 b43_controller_restart(dev, "Firmware watchdog");
2819 return;
2820 } else {
2821 b43_shm_write16(dev, B43_SHM_SCRATCH,
2822 B43_WATCHDOG_REG, 1);
2823 }
2824 }
2810 2825
2811 if (phy->type == B43_PHYTYPE_G) { 2826 if (phy->type == B43_PHYTYPE_G) {
2812 //TODO: update_aci_moving_average 2827 //TODO: update_aci_moving_average