asus-wmi: Add quirk_no_rfkill_wapf4 for the Asus X456UF
authorJoão Paulo Rechi Vita <jprvita@gmail.com>
Mon, 13 Jun 2016 20:57:35 +0000 (16:57 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Nov 2019 17:25:28 +0000 (18:25 +0100)
[ Upstream commit a961a285b479977fa21f12f71cd62f28adaba17c ]

The Asus X456UF has an airplane-mode indicator LED and the WMI WLAN user
bit set, so asus-wmi uses ASUS_WMI_DEVID_WLAN_LED (0x00010002) to store
the wlan state, which has a side-effect of driving the airplane mode
indicator LED in an inverted fashion.

quirk_no_rfkill prevents asus-wmi from registering RFKill switches at
all for this laptop and allows asus-wireless to drive the LED through
the ASHS ACPI device.  This laptop already has a quirk for setting
WAPF=4, so this commit creates a new quirk, quirk_no_rfkill_wapf4, which
both disables rfkill and sets WAPF=4.

Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
Reported-by: Carlo Caione <carlo@endlessm.com>
Reviewed-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/asus-nb-wmi.c

index 5390846fa1e64cc37339dc9c3e1c24b7dd9f134f..904f210327a1c1b8cd182b65eb696089b1f01e2e 100644 (file)
@@ -82,6 +82,11 @@ static struct quirk_entry quirk_no_rfkill = {
        .no_rfkill = true,
 };
 
+static struct quirk_entry quirk_no_rfkill_wapf4 = {
+       .wapf = 4,
+       .no_rfkill = true,
+};
+
 static int dmi_matched(const struct dmi_system_id *dmi)
 {
        quirks = dmi->driver_data;
@@ -164,7 +169,7 @@ static const struct dmi_system_id asus_quirks[] = {
                        DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
                        DMI_MATCH(DMI_PRODUCT_NAME, "X456UF"),
                },
-               .driver_data = &quirk_asus_wapf4,
+               .driver_data = &quirk_no_rfkill_wapf4,
        },
        {
                .callback = dmi_matched,