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, 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].

Since nothing can change an emulater rfkill line behind your driver's back
(bugs and memory corruption don't count :p), you can just use the desired
state of that rfkill line, since it will always match reality.

So yes, V2 is correct, as long as whatever you are reading from mac80211
doesn't have "set txpower off" stuff mixed in it (as I said, I don't know
mac80211).

-- 
  "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