From: Dan Williams <dcbw@redhat.com>
To: Mark Wallis <mwallis@serialmonkey.com>
Cc: netdev@vger.kernel.org, David Zeuthen <davidz@redhat.com>
Subject: Re: Hardware button support for Wireless cards
Date: Mon, 15 May 2006 10:37:35 -0400 [thread overview]
Message-ID: <1147703855.2193.47.camel@localhost.localdomain> (raw)
In-Reply-To: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAAC4AAAAAAAAAWMRZS97Em0WybTChcxl4cAEALirLb4lrrkmZC6EvT+GpyAAAAABE9gAAEAAAALs6jNngvN9OooViTUM1CgIBAAAAAA==@serialmonkey.com>
On Mon, 2006-05-15 at 22:57 +1000, Mark Wallis wrote:
> Hi everyone,
>
> Currently, in our rt2x00 (using the devicescape stack) we are firing off an
> ACPI event so that the hardware button can be handled in userspace. This
> allows the user to basically do whatever they want when this button is
> pressed - including bringing down the wireless interface. The problem here
> is no distro's currently contain scripts to run from this event so for many
> users it just "doesn't work" without them manually having to write scripts
> to handle the ACPI even themselves.
>
> Some people are saying that instead of throwing and ACPI event we should be
> either use hotplug or internally just disable the radio and somehow inform
> the dscape stack that the radio has been disabled.
>
> What are peoples thoughts here, should we
>
> A. be handling this within our drivers and doing "what the user expects" and
> disabling the hardware radio, or
> B. should we be firing an ACPI event and getting the distro's to add scripts
> so when this event is fired they bring down all the wireless interfaces.
(had this issue in the back of my head for a while already...)
Isn't the rf-kill switch specific to the manufacturer lots of times? Is
the switch connected directly to the card, or is it incumbent on the
driver to notice the event and disable the card via software? We need
to handle this for Bluetooth too, in situations where there's both a
bluetooth and an 802.11 card in the box. Does the rf-kill apply to
both? Or just to one?
WRT to disabling the radio, I'm not sure it makes a difference either
way. Hitting a button generally means "do this _NOW_", so it makes
sense for the driver to disable the radio and then send out the event.
Apps need to be able to deal with these resources going out from
underneath them, and I'm not sure it makes sense to wait around for some
scripts to run that just might possibly at some future point disable it,
but you're never sure.
In the end, an ACPI event is probably fine. I must stress that we NEED
to have a common event structure for this, such that every driver and
card presents the same interface. I don't want to have to write stuff
for each of 3 or 4 different cards to notice the rf-kill stuff. Witness
all the extra binaries that each driver has already for this sort of
thing. What interface does the ipw[2|3]xxx driver and hardware present?
What common bits can be drawn out from both?
Ideally, here's what would happen: the driver/card/whatever generates
an ACPI event, which is noticed by HAL. HAL sets a property on the
_exact_ device which the event is for, and propagates the signal out
over dbus. Any interested application can listen for, and respond to,
the rf-kill signal. (or, the event can be handled by acpid and the
distro can run scripts for it. 01dsk001. whatever)
But this means a few things. We need:
1) common interface/signal for _all_ cards and drivers
2) Enough information to identify which specific pci/pcmcia/etc device
the event is for (or system-wide?)
Dan
next prev parent reply other threads:[~2006-05-15 14:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-15 12:57 Hardware button support for Wireless cards Mark Wallis
2006-05-15 13:25 ` Jiri Benc
2006-05-15 13:59 ` Ivo van Doorn
2006-05-15 14:06 ` Sergey Vlasov
2006-05-15 14:37 ` Dan Williams [this message]
2006-05-15 15:12 ` Ivo van Doorn
2006-05-15 16:20 ` Jouni Malinen
2006-05-16 3:10 ` Mark Wallis
2006-05-25 15:15 ` [RFC PATCH 0/2] " Ivo van Doorn
2006-05-15 16:19 ` David Zeuthen
2006-05-15 15:27 ` Jason Lunz
2006-05-15 16:01 ` Michael Buesch
2006-05-15 19:12 ` Dan Williams
2006-05-15 19:32 ` Michael Buesch
2006-05-15 19:46 ` Jason Lunz
2006-05-15 21:42 ` Ivo van Doorn
2006-05-15 20:08 ` John W. Linville
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=1147703855.2193.47.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=davidz@redhat.com \
--cc=mwallis@serialmonkey.com \
--cc=netdev@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).