Re: [PATCH 14/15] rfkill: do not allow userspace to override ALL RADIOS OFF

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Henrique de Moraes Holschuh
Date: Tuesday, May 27, 2008 - 10:41 am

On Tue, 27 May 2008 16:38:04 +0200, "Ivo van Doorn" <ivdoorn@gmail.com> said:

You don't have a SW_RFKILL_ALL switch :-)   It is the same as my ThinkPad T43,
it does *NOT* have a SW_RFKILL_ALL switch, and it has a wireless config hotkey,
which is handled in firmware.  The firmware can wire-kill the Intel WLAN card,
and it can also unplug(!) the internal Bluetooth device from the internal USB
bus.

You'd typically assign KEY_WLAN or something else to those keys, but NOT a 
(fictitious) KEY_RFKILL_ALL.

So, my ThinkPad T43 would NEVER issue *_RFKILL_ALL events by default.


Works just like a ThinkPad before you set its hotkey mask to request the firmware
to hands-off the hotkeys, then.


Those keys definately are *NOT* to have *_RFKILL_ALL attached to them by default,
I agree.


Then you assume it is just a normal key.  If the user wants to promote that
key to the Wireless EPO key, he changes the default assignment of KEY_WLAN to
KEY_RFKILL_ALL (although I didn't propose a KEY_RFKILL_ALL yet).


Correct.

This is *explicitly* documented by the patches.  The broadcomm driver has to assume
it is a slave rfkill device, and NEVER report any input events.  It has no knowledge
of which platform the broadcomm chip was installed into, after all.  OTOH, it *will*
report the status change through the rfkill notify chain and also through the rfkill
uevents, and either a platform module for your laptop, or HAL (in userspace) can
trap those, and issue the relevant input events.

*IF* you get the events only through the broadcomm device, that is. If you get them
from ACPI as well, you probably want to let the ACPI driver issue the input events.


We document it *throughoutly*, and add a big fat warning about the misuse of
RFKILL_ALL.   It should be enough.   Will you consider ACKing a new version of
the patchset which documents better the *_RFKILL_ALL events?

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

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] rfkill class rework, Henrique de Moraes H ..., (Sun May 18, 11:47 am)
[PATCH 01/15] ACPI: thinkpad-acpi: fix initialization erro ..., Henrique de Moraes H ..., (Sun May 18, 11:47 am)
[PATCH 02/15] ACPI: thinkpad-acpi: fix LED handling on old ..., Henrique de Moraes H ..., (Sun May 18, 11:47 am)
[PATCH 03/15] Input: rename SW_RADIO to SW_RFKILL_ALL (v2), Henrique de Moraes H ..., (Sun May 18, 11:47 am)
[PATCH 04/15] rfkill: clarify meaning of rfkill states, Henrique de Moraes H ..., (Sun May 18, 11:47 am)
[PATCH 05/15] rfkill: fix minor typo in kernel doc, Henrique de Moraes H ..., (Sun May 18, 11:47 am)
[PATCH 06/15] rfkill: handle SW_RFKILL_ALL events, Henrique de Moraes H ..., (Sun May 18, 11:47 am)
[PATCH 07/15] rfkill: add parameter to disable radios by d ..., Henrique de Moraes H ..., (Sun May 18, 11:47 am)
[PATCH 08/15] rfkill: add read-write rfkill switch support, Henrique de Moraes H ..., (Sun May 18, 11:47 am)
[PATCH 09/15] rfkill: add the WWAN radio type, Henrique de Moraes H ..., (Sun May 18, 11:47 am)
[PATCH 10/15] rfkill: rework suspend and resume handlers, Henrique de Moraes H ..., (Sun May 18, 11:48 am)
[PATCH 11/15] rfkill: add notifier chains support, Henrique de Moraes H ..., (Sun May 18, 11:48 am)
[PATCH 12/15] rfkill: add type string helper, Henrique de Moraes H ..., (Sun May 18, 11:48 am)
[PATCH 13/15] rfkill: add uevent notifications, Henrique de Moraes H ..., (Sun May 18, 11:48 am)
[PATCH 14/15] rfkill: do not allow userspace to override A ..., Henrique de Moraes H ..., (Sun May 18, 11:48 am)
[PATCH 15/15] rfkill: document rw rfkill switches and clar ..., Henrique de Moraes H ..., (Sun May 18, 11:48 am)
Re: [PATCH 11/15] rfkill: add notifier chains support, Thomas Renninger, (Mon May 19, 1:44 am)
Re: [PATCH 11/15] rfkill: add notifier chains support, Henrique de Moraes H ..., (Mon May 19, 6:10 am)
Re: [PATCH 15/15] rfkill: document rw rfkill switches and ..., Henrique de Moraes H ..., (Mon May 19, 3:04 pm)
Re: [PATCH 05/15] rfkill: fix minor typo in kernel doc, Ivo van Doorn, (Tue May 20, 3:08 am)
Re: [PATCH 06/15] rfkill: handle SW_RFKILL_ALL events, Ivo van Doorn, (Tue May 20, 3:08 am)
Re: [PATCH 09/15] rfkill: add the WWAN radio type, Ivo van Doorn, (Tue May 20, 3:08 am)
Re: [PATCH 11/15] rfkill: add notifier chains support, Ivo van Doorn, (Tue May 20, 3:09 am)
Re: [PATCH 12/15] rfkill: add type string helper, Ivo van Doorn, (Tue May 20, 3:09 am)
Re: [PATCH 13/15] rfkill: add uevent notifications, Ivo van Doorn, (Tue May 20, 3:09 am)
Re: [PATCH 15/15] rfkill: document rw rfkill switches and ..., Henrique de Moraes H ..., (Tue May 20, 8:54 am)
Re: [PATCH 09/15] rfkill: add the WWAN radio type, Henrique de Moraes H ..., (Tue May 20, 6:12 pm)
Re: [PATCH 15/15] rfkill: document rw rfkill switches and ..., Henrique de Moraes H ..., (Tue May 20, 6:44 pm)
Re: [PATCH 09/15] rfkill: add the WWAN radio type, Inaky Perez-Gonzalez, (Tue May 20, 8:35 pm)
Re: [PATCH 09/15] rfkill: add the WWAN radio type, Henrique de Moraes H ..., (Tue May 20, 8:42 pm)
Re: [PATCH 09/15] rfkill: add the WWAN radio type, Inaky Perez-Gonzalez, (Tue May 20, 11:48 pm)
Re: [PATCH 09/15] rfkill: add the WWAN radio type, Henrique de Moraes H ..., (Wed May 21, 7:07 am)
Re: [PATCH 14/15] rfkill: do not allow userspace to overri ..., Henrique de Moraes H ..., (Thu May 22, 1:51 pm)
Re: [PATCH 14/15] rfkill: do not allow userspace to overri ..., Henrique de Moraes H ..., (Tue May 27, 7:08 am)
Re: [PATCH 14/15] rfkill: do not allow userspace to overri ..., Henrique de Moraes H ..., (Tue May 27, 10:41 am)
[PATCH 15/15] rfkill: document rw rfkill switches and clar ..., Henrique de Moraes H ..., (Wed May 28, 5:45 pm)
Re: [PATCH 15/15] rfkill: document rw rfkill switches and ..., Henrique de Moraes H ..., (Thu May 29, 9:26 am)
Re: [PATCH 15/15] rfkill: document rw rfkill switches and ..., Henrique de Moraes H ..., (Thu May 29, 10:22 am)
Re: [PATCH 15/15] rfkill: document rw rfkill switches and ..., Henrique de Moraes H ..., (Thu May 29, 10:46 am)
Re: [PATCH 15/15] rfkill: document rw rfkill switches and ..., Dmitry Torokhov, (Thu May 29, 11:58 am)
Re: [PATCH 15/15] rfkill: document rw rfkill switches and ..., Henrique de Moraes H ..., (Thu May 29, 2:16 pm)
[PATCH] Input: rename SW_RADIO to SW_RFKILL_ALL (v2), Henrique de Moraes H ..., (Thu May 29, 2:25 pm)
Re: [PATCH 15/15] rfkill: document rw rfkill switches and ..., Henrique de Moraes H ..., (Tue Jun 3, 8:11 pm)