diff options
author | Michael Buesch <mb@bu3sch.de> | 2008-06-20 12:02:08 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-27 09:09:16 -0400 |
commit | 923fd7036ff04381b265037469c79a2e7d0d6b67 (patch) | |
tree | 885e8dc54e26b251187264cedce032d0e8c740b6 /drivers/net/wireless/b43/main.c | |
parent | 9b839a7453dc7a25dbd367486017648182df541f (diff) |
b43: Add debugfs firmware debugging knob
This adds a firmware debugging knob to debugfs.
With this knob it's possible to enable advanced runtime firmware
checks.
For now it only implements one sanity check for the mac-suspend.
In future there'll probably be more.
If CONFIG_B43_DEBUG is disabled, these checks will collapse to nothing.
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.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index c14d522d69e3..82cca19137f4 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -2487,6 +2487,19 @@ static void b43_gpio_cleanup(struct b43_wldev *dev) | |||
2487 | /* http://bcm-specs.sipsolutions.net/EnableMac */ | 2487 | /* http://bcm-specs.sipsolutions.net/EnableMac */ |
2488 | void b43_mac_enable(struct b43_wldev *dev) | 2488 | void b43_mac_enable(struct b43_wldev *dev) |
2489 | { | 2489 | { |
2490 | if (b43_debug(dev, B43_DBG_FIRMWARE)) { | ||
2491 | u16 fwstate; | ||
2492 | |||
2493 | fwstate = b43_shm_read16(dev, B43_SHM_SHARED, | ||
2494 | B43_SHM_SH_UCODESTAT); | ||
2495 | if ((fwstate != B43_SHM_SH_UCODESTAT_SUSP) && | ||
2496 | (fwstate != B43_SHM_SH_UCODESTAT_SLEEP)) { | ||
2497 | b43err(dev->wl, "b43_mac_enable(): The firmware " | ||
2498 | "should be suspended, but current state is %u\n", | ||
2499 | fwstate); | ||
2500 | } | ||
2501 | } | ||
2502 | |||
2490 | dev->mac_suspended--; | 2503 | dev->mac_suspended--; |
2491 | B43_WARN_ON(dev->mac_suspended < 0); | 2504 | B43_WARN_ON(dev->mac_suspended < 0); |
2492 | if (dev->mac_suspended == 0) { | 2505 | if (dev->mac_suspended == 0) { |