From: Ivo van Doorn <ivdoorn@gmail.com>
To: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: Re: [PATCH] rfkill: Fix device type check when toggling states
Date: Mon, 14 Apr 2008 23:03:32 +0200 [thread overview]
Message-ID: <200804142303.32587.IvDoorn@gmail.com> (raw)
In-Reply-To: <20080412153947.16498.12348.stgit@localhost>
On Saturday 12 April 2008, Carlos Corbacho wrote:
> rfkill_switch_all() is supposed to only switch all the interfaces of a
> given type, but does not actually do this; instead, it just switches
> everything currently in the same state.
>
> Add the necessary type check in.
>
> (This fixes a bug I've been seeing while developing an rfkill laptop
> driver, with both bluetooth and wireless simultaneously changing state
> after only pressing either KEY_WLAN or KEY_BLUETOOTH).
>
> Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Good catch.
John, could you push this to 2.6.25 as well? Thanks.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
> ---
>
> net/rfkill/rfkill.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>
> diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
> index 140a0a8..4e10a95 100644
> --- a/net/rfkill/rfkill.c
> +++ b/net/rfkill/rfkill.c
> @@ -92,7 +92,7 @@ void rfkill_switch_all(enum rfkill_type type, enum rfkill_state state)
> rfkill_states[type] = state;
>
> list_for_each_entry(rfkill, &rfkill_list, node) {
> - if (!rfkill->user_claim)
> + if ((!rfkill->user_claim) && (rfkill->type == type))
> rfkill_toggle_radio(rfkill, state);
> }
>
>
>
prev parent reply other threads:[~2008-04-14 21:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-12 15:39 [PATCH] rfkill: Fix device type check when toggling states Carlos Corbacho
2008-04-14 21:03 ` Ivo van Doorn [this message]
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=200804142303.32587.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=carlos@strangeworlds.co.uk \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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).