<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/rfkill.h, branch linux-2.6.28.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2008-08-22T20:29:57+00:00</updated>
<entry>
<title>rfkill: introduce RFKILL_STATE_MAX</title>
<updated>2008-08-22T20:29:57+00:00</updated>
<author>
<name>Henrique de Moraes Holschuh</name>
<email>hmh@hmh.eng.br</email>
</author>
<published>2008-08-02T18:11:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96c87607ac8f9b0e641d11ba6e57f8ec0214ea1c'/>
<id>urn:sha1:96c87607ac8f9b0e641d11ba6e57f8ec0214ea1c</id>
<content type='text'>
While it is interesting to not add last-enum-markers because it allows gcc
to warn us of switch() statements missing a valid state, we really should
be handling memory corruption on a rfkill state with default clauses,
anyway.

So add RFKILL_STATE_MAX and use it where applicable.  It makes for safer
code in the long run.

Signed-off-by: Henrique de Moraes Holschuh &lt;hmh@hmh.eng.br&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>rfkill: add __must_check annotations</title>
<updated>2008-08-22T20:29:57+00:00</updated>
<author>
<name>Henrique de Moraes Holschuh</name>
<email>hmh@hmh.eng.br</email>
</author>
<published>2008-08-02T18:10:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=77fba13ccc3a2a3db100892a4a6cc5e2f8290cc7'/>
<id>urn:sha1:77fba13ccc3a2a3db100892a4a6cc5e2f8290cc7</id>
<content type='text'>
rfkill is not a small, mere detail in wireless support.  Once it starts
supporting rfkill and users start counting on that support, a wireless
device is at risk of operating in dangerous conditions should rfkill
support fail to properly activate.

Therefore, add the required __must_check annotations on some key functions
of the rfkill API, for which the wireless drivers absolutely MUST handle
the failure mode safely in order to avoid a potentially dangerous situation
where the wireless transmitter is left enabled when the user don't want it
to.

Signed-off-by: Henrique de Moraes Holschuh &lt;hmh@hmh.eng.br&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Cc: Matthew Garrett &lt;mjg@redhat.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>rfkill: add default global states (v2)</title>
<updated>2008-08-22T20:29:56+00:00</updated>
<author>
<name>Henrique de Moraes Holschuh</name>
<email>hmh@hmh.eng.br</email>
</author>
<published>2008-08-02T18:10:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9961920199ec88d6b581d3e38502088935925c04'/>
<id>urn:sha1:9961920199ec88d6b581d3e38502088935925c04</id>
<content type='text'>
Add a second set of global states, "rfkill_default_states", to track the
state that will be used when the first rfkill class of a given type is
registered, and also to save "undo" information when rfkill_epo is called.

Add a new exported function, rfkill_set_default(), which can be used by
platform drivers to restore radio state saved by the platform across
reboots or shutdown.

Also, fix rfkill_epo to properly update rfkill_states, but still preserve a
copy of the state so that we can undo the effect of rfkill_epo later if we
want to.  Add rfkill_restore_states() to restore rfkill_states from the
copy.

Signed-off-by: Henrique de Moraes Holschuh &lt;hmh@hmh.eng.br&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>rfkill: document the rfkill struct locking (v2)</title>
<updated>2008-07-29T20:36:33+00:00</updated>
<author>
<name>Henrique de Moraes Holschuh</name>
<email>hmh@hmh.eng.br</email>
</author>
<published>2008-07-22T00:18:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f1b23361a0f15497d4c6795a2935b2e98064ddfb'/>
<id>urn:sha1:f1b23361a0f15497d4c6795a2935b2e98064ddfb</id>
<content type='text'>
Reorder fields in struct rfkill and add comments to make it clear
which fields are protected by rfkill-&gt;mutex.

Signed-off-by: Henrique de Moraes Holschuh &lt;hmh@hmh.eng.br&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>rfkill: rename the rfkill_state states and add block-locked state</title>
<updated>2008-06-26T18:21:22+00:00</updated>
<author>
<name>Henrique de Moraes Holschuh</name>
<email>hmh@hmh.eng.br</email>
</author>
<published>2008-06-23T20:46:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5005657cbd0fd6f277f807c0612a6b6d4396a02c'/>
<id>urn:sha1:5005657cbd0fd6f277f807c0612a6b6d4396a02c</id>
<content type='text'>
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 &lt;hmh@hmh.eng.br&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>rfkill: add notifier chains support</title>
<updated>2008-06-26T18:21:21+00:00</updated>
<author>
<name>Henrique de Moraes Holschuh</name>
<email>hmh@hmh.eng.br</email>
</author>
<published>2008-06-23T20:23:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=79399a8d1908f6a406e82d23c5a9937e1722ed3a'/>
<id>urn:sha1:79399a8d1908f6a406e82d23c5a9937e1722ed3a</id>
<content type='text'>
Add a notifier chain for use by the rfkill class.  This notifier chain
signals the following events (more to be added when needed):

  1. rfkill: rfkill device state has changed

A pointer to the rfkill struct will be passed as a parameter.

The notifier message types have been added to include/linux/rfkill.h
instead of to include/linux/notifier.h in order to avoid the madness of
modifying a header used globally (and that triggers an almost full tree
rebuild every time it is touched) with information that is of interest only
to code that includes the rfkill.h header.

Signed-off-by: Henrique de Moraes Holschuh &lt;hmh@hmh.eng.br&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>rfkill: add the WWAN radio type</title>
<updated>2008-06-26T18:21:20+00:00</updated>
<author>
<name>Henrique de Moraes Holschuh</name>
<email>hmh@hmh.eng.br</email>
</author>
<published>2008-06-23T20:23:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=477576a073699783abb53ae14993d5d41c66301d'/>
<id>urn:sha1:477576a073699783abb53ae14993d5d41c66301d</id>
<content type='text'>
Unfortunately, instead of adding a generic Wireless WAN type, a technology-
specific type (WiMAX) was added.  That's useless for other WWAN devices,
such as EDGE, UMTS, X-RTT and other such radios.

Add a WWAN rfkill type for generic wireless WAN devices.  No keys are added
as most devices really want to use KEY_WLAN for WWAN control (in a cycle of
none, WLAN, WWAN, WLAN+WWAN) and need no specific keycode added.

Signed-off-by: Henrique de Moraes Holschuh &lt;hmh@hmh.eng.br&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Cc: Iñaky Pérez-González &lt;inaky.perez-gonzalez@intel.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>rfkill: add read-write rfkill switch support</title>
<updated>2008-06-26T18:21:20+00:00</updated>
<author>
<name>Henrique de Moraes Holschuh</name>
<email>hmh@hmh.eng.br</email>
</author>
<published>2008-06-23T20:23:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=801e49af4c1a9b988ba0d25de2b368c99c3bf2b3'/>
<id>urn:sha1:801e49af4c1a9b988ba0d25de2b368c99c3bf2b3</id>
<content type='text'>
Currently, rfkill support for read/write rfkill switches is hacked through
a round-trip over the input layer and rfkill-input to let a driver sync
rfkill-&gt;state to hardware changes.

This is buggy and sub-optimal.  It causes real problems.  It is best to
think of the rfkill class as supporting only write-only switches at the
moment.

In order to implement the read/write functionality properly:

Add a get_state() hook that is called by the class every time it needs to
fetch the current state of the switch.  Add a call to this hook every time
the *current* state of the radio plays a role in a decision.

Also add a force_state() method that can be used to forcefully syncronize
the class' idea of the current state of the switch.  This allows for a
faster implementation of the read/write functionality, as a driver which
get events on switch changes can avoid the need for a get_state() hook.

If the get_state() hook is left as NULL, current behaviour is maintained,
so this change is fully backwards compatible with the current rfkill
drivers.

For hardware that issues events when the rfkill state changes, leave
get_state() NULL in the rfkill struct, set the initial state properly
before registering with the rfkill class, and use the force_state() method
in the driver to keep the rfkill interface up-to-date.

get_state() can be called by the class from atomic context. It must not
sleep.

Signed-off-by: Henrique de Moraes Holschuh &lt;hmh@hmh.eng.br&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Cc: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>rfkill: clarify meaning of rfkill states</title>
<updated>2008-06-26T18:21:19+00:00</updated>
<author>
<name>Henrique de Moraes Holschuh</name>
<email>hmh@hmh.eng.br</email>
</author>
<published>2008-06-23T20:22:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f3146aff7f283c8699e0c97df6307a705786eeba'/>
<id>urn:sha1:f3146aff7f283c8699e0c97df6307a705786eeba</id>
<content type='text'>
rfkill really should have been named rfswitch.  As it is, one can get
confused whether RFKILL_STATE_ON means the KILL switch is on (and
therefore, the radio is being *blocked* from operating), or whether it
means the RADIO rf output is on.

Clearly state that RFKILL_STATE_ON means the radio is *unblocked* from
operating (i.e. there is no rf killing going on).

Signed-off-by: Henrique de Moraes Holschuh &lt;hmh@hmh.eng.br&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Cc: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>rfkill: add the WiMAX radio type</title>
<updated>2008-02-01T03:26:46+00:00</updated>
<author>
<name>Iñaky Pérez-González</name>
<email>inaky.perez-gonzalez@intel.com</email>
</author>
<published>2008-01-23T21:40:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=303d9bf6bb64ead8e3f1d7e29904a4025502e591'/>
<id>urn:sha1:303d9bf6bb64ead8e3f1d7e29904a4025502e591</id>
<content type='text'>
Teach rfkill about wimax radios.

Had to define a KEY_WIMAX as a 'key for disabling only wimax radios',
as other radio technologies have. This makes sense as hardware has
specific keys for disabling specific radios.

The RFKILL enabling part is, otherwise, a copy and paste of any other
radio technology.

Signed-off-by: Inaky Perez-Gonzalez &lt;inaky@linux.intel.com&gt;
Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
