From 1fbc01a7b0f2cf5dc375ecde3833df2fbbfdc812 Mon Sep 17 00:00:00 2001 From: "Lee, Chun-Yi" Date: Thu, 18 Aug 2011 18:47:34 +0800 Subject: [PATCH] acer-wmi: check the existence of internal wireless device when set capability 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 Cc: Matthew Garrett Cc: Dmitry Torokhov Cc: Corentin Chary Cc: Thomas Renninger Signed-off-by: Lee, Chun-Yi Signed-off-by: Matthew Garrett --- drivers/platform/x86/acer-wmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 017b1a7..ca52639 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -1094,7 +1094,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) -- 2.7.4