From: Dan Williams <dcbw@redhat.com>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: John Linville <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, Ivo van Doorn <ivdoorn@gmail.com>,
Matthew Garrett <mjg@redhat.com>,
Thomas Renninger <trenn@suse.de>,
Fabien Crespel <fabien@crespel.net>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH 1/2] rfkill: rename the rfkill_state states and add block-locked state
Date: Fri, 27 Jun 2008 17:39:47 -0400 [thread overview]
Message-ID: <1214602787.9373.11.camel@localhost.localdomain> (raw)
In-Reply-To: <20080627213524.GA8266@khazad-dum.debian.net>
On Fri, 2008-06-27 at 18:35 -0300, Henrique de Moraes Holschuh wrote:
> On Fri, 27 Jun 2008, Dan Williams wrote:
> > On Mon, 2008-06-23 at 17:46 -0300, Henrique de Moraes Holschuh wrote:
> > > The current naming of rfkill_state causes a lot of confusion: not only the
> > > "kill" in rfkill suggests negative logic, but also the fact that rfkill cannot
> > > turn anything on (it can just force something off or stop forcing something
> > > off) is often forgotten.
> > >
> > > Rename RFKILL_STATE_OFF to RFKILL_STATE_SOFT_BLOCKED (transmitter is blocked
> > > and will not operate; state can be changed by a toggle_radio request), and
> > > RFKILL_STATE_ON to RFKILL_STATE_UNBLOCKED (transmitter is not blocked, and may
> > > operate).
> > >
> > > Also, add a new third state, RFKILL_STATE_HARD_BLOCKED (transmitter is blocked
> > > and will not operate; state cannot be changed through a toggle_radio request),
> > > which is used by drivers to indicate a wireless transmiter was blocked by a
> > > hardware rfkill line that accepts no overrides.
> > >
> > > Keep the old names as #defines, but document them as deprecated. This way,
> > > drivers can be converted to the new names *and* verified to actually use rfkill
> > > correctly one by one.
> > >
> > > Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
> > > Cc: Ivo van Doorn <IvDoorn@gmail.com>
> >
> > Thanks for doing this!
> >
> > So with this patch, in the case where ex. hp-wmi advertises a killswitch
> > and the wlan driver itself doesn't have one, when NM wants to softkill
> > the radio, should NM do a SIOCSIWTXPOW or softblock the hp-wmi
> > killswitch? Or would the wlan driver implement an rfkill handler and
>
> I thought a lot about it, and I personally feel it is better to keep
> SIOCSIWTXPOW separate from rfkill. This is a driver layer thing, and rfkill
> doesn't care either way, but IMHO it is less confusing for the user if
> iwconfig txpower doesn't change the rfkill status of a device.
>
> This means NM would be trying to set the class/rfkill*/state to
> RFKILL_STATE_SOFT_BLOCKED for the devices it wants to block.
>
> And the way to be able to do it without going insane really is to start
> adding rfkill subsystem support to all wireless network drivers, so your
> WLAN devices will all have a rfkill class related to them.
Right, but that's the part we don't yet have, correct? Can I just start
adding rfkill capability with the patchset you just posted to drivers
like airo and atmel even though they don't have killswitches themselves?
That's the conceptual problem here; cards like airo and atmel don't have
killswitches, and since /sys/class/rfkill/rfkillX are _switches_ right
now, it gets confusing when a device that isn't a killswitch would start
providing rfkillX.
Dan
> > thus have /sys/class/rfkill/rfkillX as well? My understanding of what
> > would happen here got buried in all the mails last time around. If the
> > transmitter is not tied to a physical killswitch, but the killswitch is
> > provided by another module (laptop specific driver for example), do we
> > assume the rfkill state is authoritative or do we check each radio via
> > it's own specific method?
>
> Unless HAL can tell you about it, and you teach HAL the topology for every
> laptop model (something I consider Not Doable), you really are supposed to
> try to ignore as much as possible the topology of kill switches.
>
> So, you add topology agnostic UIs to NM that let the user:
> 1. Easily try to set the state of all devices of a given type
> 2. Try to set the state of a particular device.
> 3. Try to set the state of all devices (shortcut to "for all types, do (1)
> above).
>
> hp-wmi's and thinkpad-acpi's softswitches would show up just like any
> another device. The user would quickly learn that changing the state of
> these devices has an effect of hardblocking others.
>
> When I get to improving the interface to the global state (i.e. add the
> attributes needed to implement rfkill-input in userspace), you will be
> able to do more, or to do the above in an easier way.
>
next prev parent reply other threads:[~2008-06-27 21:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-23 20:46 [GIT PATCH] rfkill rework batch 2 (new) Henrique de Moraes Holschuh
2008-06-23 20:46 ` [PATCH 1/2] rfkill: rename the rfkill_state states and add block-locked state Henrique de Moraes Holschuh
2008-06-23 20:55 ` Ivo van Doorn
2008-06-27 18:23 ` Dan Williams
2008-06-27 21:35 ` Henrique de Moraes Holschuh
2008-06-27 21:39 ` Dan Williams [this message]
2008-06-27 22:12 ` Henrique de Moraes Holschuh
2008-06-23 20:46 ` [PATCH 2/2] rfkill: improve documentation for kernel drivers Henrique de Moraes Holschuh
2008-06-23 20:58 ` Ivo van Doorn
-- strict thread matches above, loose matches on Subject: below --
2008-06-22 15:51 [RFC] rfkill rfkill_state enhancements and new docs Henrique de Moraes Holschuh
2008-06-22 15:51 ` [PATCH 1/2] rfkill: rename the rfkill_state states and add block-locked state Henrique de Moraes Holschuh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1214602787.9373.11.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=fabien@crespel.net \
--cc=hmh@hmh.eng.br \
--cc=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mjg@redhat.com \
--cc=trenn@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).