All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lee, Chun-Yi" <joeyli.kernel@gmail.com>
To: mjg@redhat.com
Cc: platform-driver-x86@vger.kernel.org, "Lee,
	Chun-Yi" <jlee@suse.com>,
	Carlos Corbacho <carlos@strangeworlds.co.uk>,
	Dmitry Torokhov <dtor@mail.ru>,
	Corentin Chary <corentincj@iksaif.net>,
	Thomas Renninger <trenn@suse.de>
Subject: [PATCH 3/3] acer-wmi: check the existence of internal wireless device when set capability
Date: Thu, 18 Aug 2011 18:47:34 +0800	[thread overview]
Message-ID: <1313664454-2762-3-git-send-email-jlee@suse.com> (raw)
In-Reply-To: <1313664454-2762-2-git-send-email-jlee@suse.com>

That will be better to check the existence of internal wireless device
when we set wireless capability and generate killswitch for it. It can
avoid userland access wireless rfkill but the machine doesn't have internal
wireless device.

Tested on Acer Travelmate 8572

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
 drivers/platform/x86/acer-wmi.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index b663334..5130c63 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -1085,7 +1085,9 @@ static acpi_status WMID_set_capabilities(void)
 		return AE_ERROR;
 	}
 
-	interface->capability |= ACER_CAP_WIRELESS;
+	pr_info("Function bitmap for Communication Device: 0x%x\n", devices);
+	if (devices & 0x07)
+		interface->capability |= ACER_CAP_WIRELESS;
 	if (devices & 0x40)
 		interface->capability |= ACER_CAP_THREEG;
 	if (devices & 0x10)
-- 
1.6.0.2

      reply	other threads:[~2011-08-18 10:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-18 10:47 [PATCH 1/3] acer-wmi: add ACER_WMID_v2 interface flag to represent new notebooks Lee, Chun-Yi
2011-08-18 10:47 ` [PATCH 2/3] acer-wmi: check wireless capability flag before register rfkill Lee, Chun-Yi
2011-08-18 10:47   ` Lee, Chun-Yi [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=1313664454-2762-3-git-send-email-jlee@suse.com \
    --to=joeyli.kernel@gmail.com \
    --cc=carlos@strangeworlds.co.uk \
    --cc=corentincj@iksaif.net \
    --cc=dtor@mail.ru \
    --cc=jlee@suse.com \
    --cc=mjg@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=trenn@suse.de \
    /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.