linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: dragoran <drago01@gmail.com>
Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net
Subject: Re: [PATCH V3] Add iwlwifi wireless drivers
Date: Tue, 4 Sep 2007 20:58:15 +0200	[thread overview]
Message-ID: <200709042058.15463.IvDoorn@gmail.com> (raw)
In-Reply-To: <f6ca9fed0709041118o2dcd4b18mcb25f2b93f648479@mail.gmail.com>

On Tuesday 04 September 2007, dragoran wrote:
> On 9/4/07, Ivo van Doorn <ivdoorn@gmail.com> wrote:
> > On Tuesday 04 September 2007, dragoran wrote:
> > > >+static ssize_t show_rf_kill(struct device *d,
> > > >+                        struct device_attribute *attr, char *buf)
> > > >+{
> > > >+    /*
> > > >+     * 0 - RF kill not enabled
> > > >+     * 1 - SW based RF kill active (sysfs)
> > > >+     * 2 - HW based RF kill active
> > > >+     * 3 - Both HW and SW based RF kill active
> > > >
> > > >that as well, along with all the other sysfs bits. Also, how about using
> > > >the generic rfkill infrastructure Ivo did?
> > >
> > > is the generic rfkill interface already stable and merged into the linus tree?
> >
> > Yes. It currently is only missing users.
> 
> ok thats great ;) is the (userspace) interface defined somewhere? or
> should I read the code to understand how it works? (would like to add
> support to hal)

There isn't a documentation file for it, so best thing to do would be looking at the code.
basically hal only needs to check the sysfs files:

	name -> Name of device/interface
	type -> wlan, bluetooth, irda
	state -> Current device state. 0: Off, 1: On
	claim -> 0: Kernel handles events, 1: Userspace handles events

"name" and "type" are read-only
"claim" and "state" are read/writable

Note that there is a bug in 2.6.22 which causes the "state" file to be read-only,
this has been fixed in 2.6.23-rc.

> > > if not please leave this for now to not break userspace (hal).
> > > hal currently is using this on all ipw* and iwl* drivers to get and
> > > set the rfkill status. And NM uses this interface to set/get rfkill
> > > status.
> > >
> > > So please don't remove this yet until the proper interface is merged
> > > too (which should be better anyway because this one requires polling)
> >
> > The input-polldev interface could be used for polling if it is required.
> 
> shouldn't the new interface send events so that polling isn't required?

Not really, rfkill was intended for a generic interface, which would make
the rfkill buttons work with or without intervention of userspace. So polling
is required unless the hardware generates interrupts when the button is called.

Ivo

  reply	other threads:[~2007-09-04 18:48 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-04 17:56 [PATCH V3] Add iwlwifi wireless drivers dragoran
2007-09-04 18:15 ` Ivo van Doorn
2007-09-04 18:18   ` dragoran
2007-09-04 18:58     ` Ivo van Doorn [this message]
2007-09-04 19:08       ` dragoran
2007-09-04 21:18         ` Ivo van Doorn
2007-09-05  1:17       ` Inaky Perez-Gonzalez
2007-09-06 16:47         ` Ivo van Doorn
2007-09-06 17:54           ` Inaky Perez-Gonzalez
2007-09-06 18:13             ` Ivo van Doorn
  -- strict thread matches above, loose matches on Subject: below --
2007-09-04  3:04 Zhu Yi
2007-09-04 14:04 ` Johannes Berg
2007-09-05  1:38   ` Zhu Yi
2007-09-05 11:28     ` Johannes Berg
2007-09-07  2:28       ` Zhu Yi
2007-09-07 13:43         ` Johannes Berg
2007-09-04 15:55 ` Christoph Hellwig
2007-09-04 16:34 ` Johannes Berg
2007-09-04 17:57   ` Tomas Winkler
2007-09-06 11:00 ` Johannes Berg
2007-09-07  6:31   ` Zhu Yi
2007-09-07 13:40     ` Johannes Berg
2007-09-10  2:09       ` Zhu Yi
2007-09-10 10:42         ` Johannes Berg
2007-09-10 14:20           ` Tomas Winkler
2007-09-11 10:23             ` Johannes Berg
2007-09-11 17:37               ` Tomas Winkler
2007-09-11 20:52                 ` Michael Buesch
2007-05-16 21:45 [PATCH] " James Ketrenos
2007-05-22 21:50 ` [PATCH v3] " James Ketrenos
2007-05-23  1:06   ` Jeff Garzik
2007-05-23 15:16     ` James Ketrenos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200709042058.15463.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=drago01@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).