diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2010-11-17 16:14:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-22 15:48:50 -0500 |
commit | 8ce469999552b0c3325350cd9b4be417f2bbfc23 (patch) | |
tree | 8b1c2b487da63d35fbb6c38c6364f100379f7136 /drivers/net | |
parent | 8933f90c777c5728822206a2313c9c1361f5274f (diff) |
b43: rfkill: use HI enabled bit for all devices
Devices which use LO enabled bit are covered by b43legacy
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/b43/rfkill.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c index 78016ae21c50..86bc0a0f735c 100644 --- a/drivers/net/wireless/b43/rfkill.c +++ b/drivers/net/wireless/b43/rfkill.c | |||
@@ -28,23 +28,8 @@ | |||
28 | /* Returns TRUE, if the radio is enabled in hardware. */ | 28 | /* Returns TRUE, if the radio is enabled in hardware. */ |
29 | bool b43_is_hw_radio_enabled(struct b43_wldev *dev) | 29 | bool b43_is_hw_radio_enabled(struct b43_wldev *dev) |
30 | { | 30 | { |
31 | if (dev->phy.rev >= 3 || dev->phy.type == B43_PHYTYPE_LP) { | 31 | return !(b43_read32(dev, B43_MMIO_RADIO_HWENABLED_HI) |
32 | if (!(b43_read32(dev, B43_MMIO_RADIO_HWENABLED_HI) | 32 | & B43_MMIO_RADIO_HWENABLED_HI_MASK); |
33 | & B43_MMIO_RADIO_HWENABLED_HI_MASK)) | ||
34 | return 1; | ||
35 | } else { | ||
36 | /* To prevent CPU fault on PPC, do not read a register | ||
37 | * unless the interface is started; however, on resume | ||
38 | * for hibernation, this routine is entered early. When | ||
39 | * that happens, unconditionally return TRUE. | ||
40 | */ | ||
41 | if (b43_status(dev) < B43_STAT_STARTED) | ||
42 | return 1; | ||
43 | if (b43_read16(dev, B43_MMIO_RADIO_HWENABLED_LO) | ||
44 | & B43_MMIO_RADIO_HWENABLED_LO_MASK) | ||
45 | return 1; | ||
46 | } | ||
47 | return 0; | ||
48 | } | 33 | } |
49 | 34 | ||
50 | /* The poll callback for the hardware button. */ | 35 | /* The poll callback for the hardware button. */ |