From: Johannes Berg <johannes@sipsolutions.net>
To: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Cc: "John W. Linville" <linville@tuxdriver.com>,
Troy Moure <twmoure@szypr.net>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH] acer-wmi: fix rfkill conversion
Date: Sun, 19 Jul 2009 10:53:38 +0200 [thread overview]
Message-ID: <1247993618.4204.3.camel@johannes.local> (raw)
In-Reply-To: <4A62DDDC.5090100@tuffmail.co.uk>
[-- Attachment #1: Type: text/plain, Size: 2056 bytes --]
On Sun, 2009-07-19 at 09:48 +0100, Alan Jenkins wrote:
> On 6/17/09, Troy Moure <twmoure@szypr.net> wrote:
> > Commit 19d337dff95cbf76ed ("rfkill: rewrite") incorrectly reversed
> > the meaning of 'state' in acer_rfkill_update() when it changed
> > rfkill_force_state() to rfkill_set_sw_state(). Fix it.
> >
> > Signed-off-by: Troy Moure <twmoure@szypr.net>
> > ---
> > This fixes the rfkill switch on my Acer laptop, which was behaving
> > backwards (the state reported in the logs was the opposite of the
> > state indicated by the LED).
>
> I think there's another reversal error that you didn't notice :-). I
> found that acer-wmi disables the wireless when it is loaded.
Ahrg.
> The core tries to initialize the wireless to enabled, but the polarity
> is wrong in acer_rfkill_set(). It ends up disabling the wireless
> instead.
>
> Here's a patch for it.
I really should go back and audit it again, but every instance takes me
about 5 minutes to do the (not state != unblocked) thing in my
head ... :/
Thanks!
johannes
> --->
> From 75953366b4958a77019729662a997f5d361a7529 Mon Sep 17 00:00:00 2001
> From: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
> Date: Sun, 19 Jul 2009 09:29:21 +0100
> Subject: [PATCH] acer-wmi: fix rfkill conversion
>
> Fix another polarity error introduced by the rfkill rewrite,
> this time in acer_rfkill_set().
>
> Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
> ---
> drivers/platform/x86/acer-wmi.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
> index be2fd6f..fb45f5e 100644
> --- a/drivers/platform/x86/acer-wmi.c
> +++ b/drivers/platform/x86/acer-wmi.c
> @@ -973,7 +973,7 @@ static int acer_rfkill_set(void *data, bool blocked)
> {
> acpi_status status;
> u32 cap = (unsigned long)data;
> - status = set_u32(!!blocked, cap);
> + status = set_u32(!blocked, cap);
> if (ACPI_FAILURE(status))
> return -ENODEV;
> return 0;
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
prev parent reply other threads:[~2009-07-19 8:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 10:51 [PATCH] acer-wmi: fix rfkill conversion Troy Moure
2009-06-17 11:15 ` Johannes Berg
2009-07-19 8:48 ` Alan Jenkins
2009-07-19 8:53 ` Johannes Berg [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=1247993618.4204.3.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=alan-jenkins@tuffmail.co.uk \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=twmoure@szypr.net \
/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