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, Larry Finger wrote:
> Henrique de Moraes Holschuh wrote:
> > IMHO if tx power off is handled by the wireless device driver through the
> > software rfkill line, it DOES MEAN the radio goes into rfkill SOFT_BLOCK.
> > 
> > As long as the rfkill class is kept syncronized with reality through the use
> > of rfkill_force_state(), this WILL work just fine, because no input events
> > that change any other devices are ever sent by the rfkill core.
> > 
> > Now, if any input event generation (by the wireless device driver, since
> > rfkill core NEVER does it) is in the picture, it could be more complicated
> > (or not... after all, an *INPUT DEVICE* switch would simply *always* match
> > the *particular* hardware rfkill input line it is tied to, regardless of
> > radio state -- the input device does not CARE at all about the software
> > rfkill lines, other hardware rfkill lines, wireless tx power state, or phase
> > of the moon).
> 
> OK, now I'm totally confused. I realize that English is probably not
> your first language, but simple declarative sentences would be nice.

I will try :)

> The situation with b43 is as follows:
> 
> (a) When the hardware switch is off, the radio is hardware blocked.
>
> (b) When the hardware switch is on, the radio should follow whatever
> mac80211 and userland wants.

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

If the hardware "soft switch" bit is write-only, you have no choice but to
use the mac80211 value like your V2 patch does, BTW.

> What should b43 do to make this happen? Does V2 do it right?

Read the software switch state from the hardware instead of using what
mac80211/user wants.  That's all.

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