From: Lee, Chun-Yi Date: Sat, 21 May 2011 23:33:52 +0000 (+0800) Subject: acer-wmi: check the existence of internal 3G device when set capability X-Git-Tag: v3.0-rc1~4^2^2~4 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8d1a266eee5f8b822449fe19d1735189377ef47;p=pandora-kernel.git acer-wmi: check the existence of internal 3G device when set capability That will be better to check the existence of internal 3G device when we set threeg capability and generate killswitch for threeg. It can avoid userland access 3G rfkill but the machine doesn't have internal 3G device. Reference: bko#32862 https://bugzilla.kernel.org/show_bug.cgi?id=32862 Tested on Acer Aspire 8930G, Acer Travelmate 8572 Tested-by: Hector Martin 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 57c6c8a4db24..92ee4d637270 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -889,7 +889,8 @@ static acpi_status WMID_set_capabilities(void) dmi_walk(type_aa_dmi_decode, NULL); if (!has_type_aa) { interface->capability |= ACER_CAP_WIRELESS; - interface->capability |= ACER_CAP_THREEG; + if (devices & 0x40) + interface->capability |= ACER_CAP_THREEG; if (devices & 0x10) interface->capability |= ACER_CAP_BLUETOOTH; }