aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2009-11-23 19:42:36 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-04 13:28:50 -0500
commit316a4d966cae3c2dec83ebb1ee1a3515f97b30ff (patch)
tree03c864dc62ad4b7aa72bfb9e2b0a916bec056268 /drivers/net/wireless/b43legacy
parentc2ff581acab16c6af56d9e8c1a579bf041ec00b1 (diff)
b43legacy: avoid PPC fault during resume
For PPC architecture with PHY Revision < 3, a read of the register B43_MMIO_HWENABLED_LO will cause a CPU fault unless b43legacy_status() returns a value of 2 (B43legacy_STAT_STARTED); however, one finds that the driver is unable to associate after resuming from hibernation unless this routine returns 1. To satisfy both conditions, the routine is rewritten to return TRUE whenever b43legacy_status() returns a value < 2. This patch fixes the second problem listed in the postings for Red Hat Bugzilla #538523. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy')
-rw-r--r--drivers/net/wireless/b43legacy/rfkill.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43legacy/rfkill.c b/drivers/net/wireless/b43legacy/rfkill.c
index 8783022db11e..d579df72b783 100644
--- a/drivers/net/wireless/b43legacy/rfkill.c
+++ b/drivers/net/wireless/b43legacy/rfkill.c
@@ -34,6 +34,13 @@ bool b43legacy_is_hw_radio_enabled(struct b43legacy_wldev *dev)
34 & B43legacy_MMIO_RADIO_HWENABLED_HI_MASK)) 34 & B43legacy_MMIO_RADIO_HWENABLED_HI_MASK))
35 return 1; 35 return 1;
36 } else { 36 } else {
37 /* To prevent CPU fault on PPC, do not read a register
38 * unless the interface is started; however, on resume
39 * for hibernation, this routine is entered early. When
40 * that happens, unconditionally return TRUE.
41 */
42 if (b43legacy_status(dev) < B43legacy_STAT_STARTED)
43 return 1;
37 if (b43legacy_read16(dev, B43legacy_MMIO_RADIO_HWENABLED_LO) 44 if (b43legacy_read16(dev, B43legacy_MMIO_RADIO_HWENABLED_LO)
38 & B43legacy_MMIO_RADIO_HWENABLED_LO_MASK) 45 & B43legacy_MMIO_RADIO_HWENABLED_LO_MASK)
39 return 1; 46 return 1;