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-Tag: upstream/snapshot3+hdmi~8871^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1fbc01a7b0f2cf5dc375ecde3833df2fbbfdc812;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.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 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)