Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ce46999 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by John W. Linville
Browse files

b43: rfkill: use HI enabled bit for all devices



Devices which use LO enabled bit are covered by b43legacy

Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8933f90c
Loading
Loading
Loading
Loading
+2 −17
Original line number Original line Diff line number Diff line
@@ -28,23 +28,8 @@
/* Returns TRUE, if the radio is enabled in hardware. */
/* Returns TRUE, if the radio is enabled in hardware. */
bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
{
{
	if (dev->phy.rev >= 3 || dev->phy.type == B43_PHYTYPE_LP) {
	return !(b43_read32(dev, B43_MMIO_RADIO_HWENABLED_HI)
		if (!(b43_read32(dev, B43_MMIO_RADIO_HWENABLED_HI)
		& B43_MMIO_RADIO_HWENABLED_HI_MASK);
		      & B43_MMIO_RADIO_HWENABLED_HI_MASK))
			return 1;
	} else {
		/* To prevent CPU fault on PPC, do not read a register
		 * unless the interface is started; however, on resume
		 * for hibernation, this routine is entered early. When
		 * that happens, unconditionally return TRUE.
		 */
		if (b43_status(dev) < B43_STAT_STARTED)
			return 1;
		if (b43_read16(dev, B43_MMIO_RADIO_HWENABLED_LO)
		    & B43_MMIO_RADIO_HWENABLED_LO_MASK)
			return 1;
	}
	return 0;
}
}


/* The poll callback for the hardware button. */
/* The poll callback for the hardware button. */