lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070911125910.3a1ea9c6.randy.dunlap@oracle.com>
Date:	Tue, 11 Sep 2007 12:59:10 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Ivo van Doorn <ivdoorn@...il.com>
Cc:	davem@...emloft.net, Dmitry Torokhov <dtor@...ightbb.com>,
	netdev@...r.kernel.org,
	Inaky Perez-Gonzalez <inaky@...ux.intel.com>
Subject: Re: [PATCH 3/3 v2] rfkill: Add rfkill documentation

On Tue, 11 Sep 2007 19:01:01 +0200 Ivo van Doorn wrote:

Almost done.  See below.


>  Documentation/rfkill.txt |   89 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 89 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/rfkill.txt
> 
> diff --git a/Documentation/rfkill.txt b/Documentation/rfkill.txt
> new file mode 100644
> index 0000000..0f35134
> --- /dev/null
> +++ b/Documentation/rfkill.txt
> @@ -0,0 +1,89 @@
+===============================================================================
> +1: Implementation details
> +
> +The rfkill switch subsystem offers support for keys often found on laptops
> +to enable wireless devices like WiFi and Bluetooth.
> +
> +This is done by providing the user 3 possibilities:
> + 1 - The rfkill system handles all events, userspace is not aware of events;
> + 2 - The rfkill system handles all events, userspace is informed about the event;
> + 3 - The rfkill system does not handle events, userspace handles all events;

In the above 3 lines,
change "events," to "events;"
and then end each line with a period (".").


> +The buttons to enable and disable the wireless radios are important in
> +situations where the user is for example using his laptop on a location where
> +wireless radios _must_ be disabled (e.g. airplanes).
> +Because of this requirement, userspace support for the keys should not be
> +made mandatory. Because userspace might want to perform some additional smarter
> +tasks when the key is pressed, rfkill still provides userspace the possibility
> +to take over the task to handle the key events.
> +
> +The system inside the kernel has been split into 2 separate sections:
> +	1 - RFKILL
> +	2 - RFKILL_INPUT
> +
> +The first option enables rfkill support and will make sure userspace will
> +be notified of any events through the input device. It also creates several
> +sysfs entries which can be used by userspace. See section "Userspace support".
> +
> +The second option provides an rfkill input handler. This handler will
> +listen to all rfkill key events and will toggle the radio accordingly.
> +With this option enabled userspace could either do nothing or simply
> +perform monitoring tasks.
> +
> +====================================
> +2: Driver support

...

> +====================================
> +3: Userspace support
> +
> +For each key an input device will be created which will send out the correct
> +key event when the rfkill key has been pressed.
> +
> +The following sysfs entries will be created:
> +
> +	name: Name assigned by driver to this key (interface or driver name).
> +	type: Name of the key type ("wlan", "bluetooth", etc).
> +	state: Current state of the key. 1: On, 0: Off.
> +	claim: 1: Userspace handles events, 0: Kernel handles events
> +
> +Both the "state" and "claim" entries are also writable. For the "state" entry
> +this means that when 1 or 0 is written all radios, not yet in the requested
> +state, will be will be toggled accordingly.
> +For the "claim" entry writing 1 to it means that the kernel no longer handles
> +handle key events even though RFKILL_INPUT input was enabled. When "claim" has

  Drop "handle" above.

> +been set to 0, userspace should make sure that it listens for the input events
> +or check the sysfs "state" entry regularly to correctly perform the required
> +tasks when the rkfill key is pressed.

Thanks.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ