Search Linux Wireless

Re: [PATCH V2] b43: rfkill: use HI enabled bit for all devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/11/17 RafaÅ MiÅecki <zajec5@xxxxxxxxx>:
> Devices which use LO enabled bit are covered by b43legacy
>
> Signed-off-by: RafaÅ MiÅecki <zajec5@xxxxxxxxx>
> ---
> V2: Dropped some not needed stuff as pointed by Michael, thanks!
>
> John: it's .38 ofc.
> ---
> Â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 78016ae..86bc0a0 100644
> --- a/drivers/net/wireless/b43/rfkill.c
> +++ b/drivers/net/wireless/b43/rfkill.c
> @@ -28,23 +28,8 @@
> Â/* Returns TRUE, if the radio is enabled in hardware. */
> Âbool b43_is_hw_radio_enabled(struct b43_wldev *dev)
> Â{
> - Â Â Â if (dev->phy.rev >= 3 || dev->phy.type == B43_PHYTYPE_LP) {
> - Â Â Â Â Â Â Â if (!(b43_read32(dev, B43_MMIO_RADIO_HWENABLED_HI)
> - Â Â Â Â Â Â Â Â Â Â & 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;

Is there any reason why this bool originally returned 1 or 0 instead
of true or false?

> + Â Â Â return !(b43_read32(dev, B43_MMIO_RADIO_HWENABLED_HI)
> + Â Â Â Â Â Â Â & B43_MMIO_RADIO_HWENABLED_HI_MASK);
> Â}
>
> Â/* The poll callback for the hardware button. */
> --
> 1.6.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
>



-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux