Re: [RFC] rfkill: rewrite

Johannes Berg
2009-03-30T18:01:33Z

[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]

On Mon, 2009-03-30 at 19:54 +0200, Ivo van Doorn wrote:

> > > wimax_report_rfkill_hw() -- device driver report to stack
> > >
> > > device reports a change in the hw rfkill key; switch the radio to
> > > whichever state AND report a key event through the input layer
> >
> > But reporting the key through the input layer is wrong, afaict.
>
> Why because it combines it with switching the radio?
> In rt2x00 all key events are going through the input layer as well,
> because it has no influence on the radio state of the device.
> (In other words, you can still happily send and receive all
> the data you want regardless of the key state).

Yes, but my understanding is (and I've just rewritten the code, heh)
that if the button switches the hardware kill directly then we don't
report an input event.

Except in very limited circumstances (like the thinkpad-acpi platform
driver Henrique explained) I think doing _both_
rfkill_force_state(hard-blocked) [in new API terms:
rfkill_set_hw_block(true)] _and_ input_report() is incorrect.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]