From: Lee, Chun-Yi Date: Thu, 18 Aug 2011 10:47:34 +0000 (+0800) Subject: acer-wmi: check the existence of internal wireless device when set capability X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1fbc01a7b0f2cf5dc375ecde3833df2fbbfdc812;p=linux-beck.git 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 --- diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 017b1a7eac8e..ca52639af2d1 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)