Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1335509

Re: [PATCH 8/9] rfkill: Userspace control for airplane mode

From João Paulo Rechi Vita <jprvita@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 8/9] rfkill: Userspace control for airplane mode
Date 2016-02-16 16:20 +0100
Message-ID <r2PzY-18K-17@gated-at.bofh.it> (permalink)
References (1 earlier) <qZWeC-7eV-19@gated-at.bofh.it> <qZWHF-7Fq-39@gated-at.bofh.it> <r0Fv4-4sd-13@gated-at.bofh.it> <r0Ght-4Nm-37@gated-at.bofh.it> <r0GAP-5dx-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 10 February 2016 at 12:12, Johannes Berg <johannes@sipsolutions.net> wrote:
> On 2016-02-10 17:53, Dan Williams wrote:
>>
>> Yeah, I get that now.  It's just that to me, something called
>> "AIRPLANE_MODE_CHANGE" seems like it should actually change airplane
>> mode on/off, which implies killing radios.  I wouldn't have had the
>> problem if it was named AIRPLANE_MODE_INDICATOR_CHANGE, which makes it
>> clear this is simply an indicator and has no actual effect on anything
>> other than a LED.
>

I also agree the AIRPLANE_MODE_INDICATOR_* prefix makes things more
clear here. Thanks for the feedback, Dan!

>
> Yeah, I agree. I'm not even sure that it's a good idea to subsume this into
> the regular operations in the API, although that's obviously the easiest
> extension. I'll need to think about that a bit more with the code at hand
> though.
>

Initially I have thought about creating and additional RFKill switch
for that, but I think it would be a bit hackish since we would have to
treat it specially in sysfs attributes and probably other places, and
userspace would also need a special case when going through the list
of RFKill switches in the system. The proposed solution has equivalent
semantics to an RFKill switch, is backward-compatible (users would
only ignore the unknown operations and evens -- although gsd has a
"default:" case to abort execution on an unknown event) and does not
extend the RFKill event struct.

One alternative would be to move the control point to a separate
device, like /dev/rfkill-airplane-mode, but I'm not sure this is a
very elegant approach. Anyway, I'm open to work on changes to the API,
but it would be great if you could at least pick or reject the
non-polemical patches of the series, so I don't need to carry them
anymore.

--
João Paulo Rechi Vita
http://about.me/jprvita

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 8/9] rfkill: Userspace control for airplane mode Johannes Berg <johannes@sipsolutions.net> - 2016-02-10 17:10 +0100
  Re: [PATCH 8/9] rfkill: Userspace control for airplane mode Dan Williams <dcbw@redhat.com> - 2016-02-10 18:00 +0100
    Re: [PATCH 8/9] rfkill: Userspace control for airplane mode Johannes Berg <johannes@sipsolutions.net> - 2016-02-10 18:20 +0100
      Re: [PATCH 8/9] rfkill: Userspace control for airplane mode João Paulo Rechi Vita <jprvita@gmail.com> - 2016-02-16 16:20 +0100

csiph-web