linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to revert RFKILL_IOC_NOINPUT ioctl?
@ 2016-01-12 12:05 Bastien Nocera
  2016-01-12 13:05 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien Nocera @ 2016-01-12 12:05 UTC (permalink / raw)
  To: johannes, linux-wireless

Hey,

I recently implemented support for rfkill multimedia/keyboard keys in
GNOME:
http://www.hadess.net/2016/01/support-for-airplane-mode-keys.html

But, as my laptop doesn't have those keys (or rather it does have them,
but they're not supported by the thinkpad kernel driver), I assigned
the functionality temporarily to other keys. It worked well enough.

I realised looking at the rfkill kernel configuration, and noticed that
it wasn't possible to disable CONFIG_RFKILL_INPUT without enabling the
expert mode. "Why" would be the first question in this mail.

See https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org/thread/FWCOCU2ODZHK7AQVOWSFJLBXL744LYNO/

To make my GNOME code work, I'd need to disable rfkill-input. But if I
still wanted to allow rfkill-input to work when GNOME isn't running,
such as when switching to a console, or another less-capable desktop
environment. But there doesn't seem to be a counterpart
for RFKILL_IOC_NOINPUT. Any reason why?

See https://bugzilla.gnome.org/show_bug.cgi?id=760517

Cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to revert RFKILL_IOC_NOINPUT ioctl?
  2016-01-12 12:05 How to revert RFKILL_IOC_NOINPUT ioctl? Bastien Nocera
@ 2016-01-12 13:05 ` Johannes Berg
  2016-01-12 13:08   ` Bastien Nocera
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2016-01-12 13:05 UTC (permalink / raw)
  To: Bastien Nocera, linux-wireless

On Tue, 2016-01-12 at 13:05 +0100, Bastien Nocera wrote:
> 
> I realised looking at the rfkill kernel configuration, and noticed
> that it wasn't possible to disable CONFIG_RFKILL_INPUT without
> enabling the expert mode. "Why" would be the first question in this
> mail.

I guess the answer would be that at the time, you couldn't really get a
fully functional setup without it, and there wasn't really any default
userspace to deal with it. Perhaps there is now at least a bigger
chance that userspace will deal with it.

That said, I don't really see a need to disable this code since
userspace that wants to handle it should use the ioctl to disable the
in-kernel code (if it's at all present.)

> See https://lists.fedoraproject.org/archives/list/kernel@lists.fedora
> project.org/thread/FWCOCU2ODZHK7AQVOWSFJLBXL744LYNO/
> 
> To make my GNOME code work, I'd need to disable rfkill-input. But if
> I still wanted to allow rfkill-input to work when GNOME isn't
> running, such as when switching to a console, or another less-capable 
> desktop environment. But there doesn't seem to be a counterpart
> for RFKILL_IOC_NOINPUT. Any reason why?

It's automatically released when you close the fd.

johannes

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to revert RFKILL_IOC_NOINPUT ioctl?
  2016-01-12 13:05 ` Johannes Berg
@ 2016-01-12 13:08   ` Bastien Nocera
  0 siblings, 0 replies; 3+ messages in thread
From: Bastien Nocera @ 2016-01-12 13:08 UTC (permalink / raw)
  To: Johannes Berg, linux-wireless

On Tue, 2016-01-12 at 14:05 +0100, Johannes Berg wrote:
> On Tue, 2016-01-12 at 13:05 +0100, Bastien Nocera wrote:
> >  
> > I realised looking at the rfkill kernel configuration, and noticed
> > that it wasn't possible to disable CONFIG_RFKILL_INPUT without
> > enabling the expert mode. "Why" would be the first question in this
> > mail.
> 
> I guess the answer would be that at the time, you couldn't really get
> a
> fully functional setup without it, and there wasn't really any
> default
> userspace to deal with it. Perhaps there is now at least a bigger
> chance that userspace will deal with it.
> 
> That said, I don't really see a need to disable this code since
> userspace that wants to handle it should use the ioctl to disable the
> in-kernel code (if it's at all present.)

Right. I'll leave it there then.

> > See https://lists.fedoraproject.org/archives/list/kernel@lists.fedo
> > ra
> > project.org/thread/FWCOCU2ODZHK7AQVOWSFJLBXL744LYNO/
> > 
> > To make my GNOME code work, I'd need to disable rfkill-input. But
> > if
> > I still wanted to allow rfkill-input to work when GNOME isn't
> > running, such as when switching to a console, or another less-
> > capable 
> > desktop environment. But there doesn't seem to be a counterpart
> > for RFKILL_IOC_NOINPUT. Any reason why?
> 
> It's automatically released when you close the fd.

OK, good enough for me.

Cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-12 13:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-12 12:05 How to revert RFKILL_IOC_NOINPUT ioctl? Bastien Nocera
2016-01-12 13:05 ` Johannes Berg
2016-01-12 13:08   ` Bastien Nocera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).