Skip to content

Commit 9286dfd

Browse files
mfenniakij-intel
authored andcommitted
platform/x86: asus-wmi: Fix spurious rfkill on UX8406MA
The Asus Zenbook Duo (UX8406MA) has a keyboard which can be placed on the laptop to connect it via USB, or can be removed from the laptop to reveal a hidden secondary display in which case the keyboard operates via Bluetooth. When it is placed on the secondary display to connect via USB, it emits a keypress for a wireless disable. This causes the rfkill system to be activated disconnecting the current wifi connection, which doesn't reflect the user's true intention. Detect this hardware and suppress any wireless switches from the keyboard; this keyboard does not have a wireless toggle capability so these presses are always spurious. Signed-off-by: Mathieu Fenniak <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent a24cd5c commit 9286dfd

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

drivers/platform/x86/asus-nb-wmi.c

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ static struct quirk_entry quirk_asus_ignore_fan = {
145145
.wmi_ignore_fan = true,
146146
};
147147

148+
static struct quirk_entry quirk_asus_zenbook_duo_kbd = {
149+
.ignore_key_wlan = true,
150+
};
151+
148152
static int dmi_matched(const struct dmi_system_id *dmi)
149153
{
150154
pr_info("Identified laptop model '%s'\n", dmi->ident);
@@ -516,6 +520,15 @@ static const struct dmi_system_id asus_quirks[] = {
516520
},
517521
.driver_data = &quirk_asus_ignore_fan,
518522
},
523+
{
524+
.callback = dmi_matched,
525+
.ident = "ASUS Zenbook Duo UX8406MA",
526+
.matches = {
527+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
528+
DMI_MATCH(DMI_PRODUCT_NAME, "UX8406MA"),
529+
},
530+
.driver_data = &quirk_asus_zenbook_duo_kbd,
531+
},
519532
{},
520533
};
521534

@@ -630,7 +643,12 @@ static void asus_nb_wmi_key_filter(struct asus_wmi_driver *asus_wmi, int *code,
630643
case 0x32: /* Volume Mute */
631644
if (atkbd_reports_vol_keys)
632645
*code = ASUS_WMI_KEY_IGNORE;
633-
646+
break;
647+
case 0x5D: /* Wireless console Toggle */
648+
case 0x5E: /* Wireless console Enable */
649+
case 0x5F: /* Wireless console Disable */
650+
if (quirks->ignore_key_wlan)
651+
*code = ASUS_WMI_KEY_IGNORE;
634652
break;
635653
}
636654
}

drivers/platform/x86/asus-wmi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ struct quirk_entry {
4040
bool wmi_force_als_set;
4141
bool wmi_ignore_fan;
4242
bool filter_i8042_e1_extended_codes;
43+
bool ignore_key_wlan;
4344
enum asus_wmi_tablet_switch_mode tablet_switch_mode;
4445
int wapf;
4546
/*

0 commit comments

Comments
 (0)