[PATCH 3/3] acer-wmi: check the existence of internal wireless device when set capability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
Cc: Matthew Garrett <mjg@xxxxxxxxxx>
Cc: Dmitry Torokhov <dtor@xxxxxxx>
Cc: Corentin Chary <corentincj@xxxxxxxxxx>
Cc: Thomas Renninger <trenn@xxxxxxx>
Signed-off-by: Lee, Chun-Yi <jlee@xxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux