b43legacy: avoid PPC fault during resume
authorLarry Finger <Larry.Finger@lwfinger.net>
Tue, 24 Nov 2009 00:42:36 +0000 (18:42 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 22:05:16 +0000 (14:05 -0800)
commite75a313897fa83be86afb38a6e4415e923cdca80
treedaae190e2f54a62f32b3172669642d9739fda87c
parent3263c617570ed7c7292ea484d1fdf31687d110ee
b43legacy: avoid PPC fault during resume

commit 316a4d966cae3c2dec83ebb1ee1a3515f97b30ff upstream.

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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/b43legacy/rfkill.c