Search Linux Wireless

Re: [RFC V2] b43: A patch for control of the radio LED using rfkill

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

 



On Thu, 18 Sep 2008, Henrique de Moraes Holschuh wrote:
> On Thu, 18 Sep 2008, Michael Buesch wrote:
> > On Thursday 18 September 2008 18:49:01 Larry Finger wrote:
> > > Henrique de Moraes Holschuh wrote:
> > > > The problem is in the "should".
> > > > 
> > > > Maybe something else than b43 (like firmware) changed the radio software
> > > > rfkill bit, and it does not match what mac80211 and userland requested
> > > > anymore.
> > > > 
> > > > What you need to pass to rfkill_force_state() is what the radio is currently
> > > > doing.  So, the state you need to send to rfkill_force_state has to be based
> > > > on the real state of the hardware's "soft switch bit".
> > > 
> > > The hardware does not have such a bit. Once it is initialized and
> > > mac80211 sends it a packet, it will try to send it. That is true even
> > > if the hardware switch is off. It just will not succeed.
> > 
> > Right, b43 does have two "bits". One read-only bit that tells the hardware
> > block state. This state can only be changed by physically pressing rfkill
> > button. The other "bit" is a read/write "bit" to turn off the radio in software.
> > If _either_ one bit is blocking the radio, it will be physically blocked.
> 
> A software-emulated rfkill line is still a SW rfkill line, and the rfkill
> core needs to know about it [but you don't want to have set txpower off
> state mixed in whatever you send back to the rfkill core].

I forgot to add that you don't always need to do a rfkill_force_state() just
because a SW rfkill line changed.

If that change can only come through the rfkill core (i.e. through the
toggle_radio() hook), the rfkill core already knows about it.

You *still* take the sw rfkill line into account when you do
rfkill_force_state().  It just might not be reason enough to actually call
rfkill_force_state().

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
--
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