From: Tim Gardner <timg-l6nL5VImRDY@public.gmane.org>
To: Matthew Garrett <mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] dell-laptop: Fix rfkill state queries
Date: Fri, 31 Jul 2009 07:19:28 -0600 [thread overview]
Message-ID: <4A72EF60.1090501@tpi.com> (raw)
In-Reply-To: <1249007138-27354-1-git-send-email-mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Matthew Garrett wrote:
> The current code in dell-laptop is confused about the hardware rfkill
> state. Fix it up such that it's always reported correctly.
>
> Signed-off-by: Matthew Garrett <mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> drivers/platform/x86/dell-laptop.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
> index 74909c4..9061111 100644
> --- a/drivers/platform/x86/dell-laptop.c
> +++ b/drivers/platform/x86/dell-laptop.c
> @@ -197,8 +197,8 @@ static void dell_rfkill_query(struct rfkill *rfkill, void *data)
> dell_send_request(&buffer, 17, 11);
> status = buffer.output[1];
>
> - if (status & BIT(bit))
> - rfkill_set_hw_state(rfkill, !!(status & BIT(16)));
> + rfkill_set_sw_state(rfkill, !!(status & BIT(bit)));
> + rfkill_set_hw_state(rfkill, !(status & BIT(16)));
> }
>
> static const struct rfkill_ops dell_rfkill_ops = {
This works on an Inspiron 1420 and XPS1330 as far as I was able to test.
The physical rfkill switch sets 'Hard blocked: yes' for 'phy0: Wireless
LAN', and everything returns to normal 'blocked: no' when the switch is
disabled. I was not able to figure out how to get BIT(16) cleared. Is
that a keyboard function? Anyways,
Tested-by: Tim Gardner <tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
rtg
--
Tim Gardner timg-l6nL5VImRDY@public.gmane.org www.tpi.com
OR 503-601-0234 x102 MT 406-443-5357
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Tim Gardner <timg@tpi.com>
To: Matthew Garrett <mjg@redhat.com>
Cc: linux-acpi@vger.kernel.org, johannes@sipsolutions.net,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH] dell-laptop: Fix rfkill state queries
Date: Fri, 31 Jul 2009 07:19:28 -0600 [thread overview]
Message-ID: <4A72EF60.1090501@tpi.com> (raw)
In-Reply-To: <1249007138-27354-1-git-send-email-mjg@redhat.com>
Matthew Garrett wrote:
> The current code in dell-laptop is confused about the hardware rfkill
> state. Fix it up such that it's always reported correctly.
>
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> ---
> drivers/platform/x86/dell-laptop.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
> index 74909c4..9061111 100644
> --- a/drivers/platform/x86/dell-laptop.c
> +++ b/drivers/platform/x86/dell-laptop.c
> @@ -197,8 +197,8 @@ static void dell_rfkill_query(struct rfkill *rfkill, void *data)
> dell_send_request(&buffer, 17, 11);
> status = buffer.output[1];
>
> - if (status & BIT(bit))
> - rfkill_set_hw_state(rfkill, !!(status & BIT(16)));
> + rfkill_set_sw_state(rfkill, !!(status & BIT(bit)));
> + rfkill_set_hw_state(rfkill, !(status & BIT(16)));
> }
>
> static const struct rfkill_ops dell_rfkill_ops = {
This works on an Inspiron 1420 and XPS1330 as far as I was able to test.
The physical rfkill switch sets 'Hard blocked: yes' for 'phy0: Wireless
LAN', and everything returns to normal 'blocked: no' when the switch is
disabled. I was not able to figure out how to get BIT(16) cleared. Is
that a keyboard function? Anyways,
Tested-by: Tim Gardner <tim.gardner@canonical.com>
rtg
--
Tim Gardner timg@tpi.com www.tpi.com
OR 503-601-0234 x102 MT 406-443-5357
next prev parent reply other threads:[~2009-07-31 13:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-31 2:25 [PATCH] dell-laptop: Fix rfkill state queries Matthew Garrett
[not found] ` <1249007138-27354-1-git-send-email-mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-07-31 13:19 ` Tim Gardner [this message]
2009-07-31 13:19 ` Tim Gardner
[not found] ` <4A72EF60.1090501-l6nL5VImRDY@public.gmane.org>
2009-07-31 13:36 ` Matthew Garrett
2009-07-31 13:36 ` Matthew Garrett
2009-12-10 4:56 ` Len Brown
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=4A72EF60.1090501@tpi.com \
--to=timg-l6nl5vimrdy@public.gmane.org \
--cc=johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org \
--cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.