From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Mathieu Fenniak" <mathieu@fenniak.net>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Sasha Levin" <sashal@kernel.org>,
corentin.chary@gmail.com, luke@ljones.dev, hdegoede@redhat.com,
platform-driver-x86@vger.kernel.org
Subject: [PATCH AUTOSEL 6.10 11/22] platform/x86: asus-wmi: Fix spurious rfkill on UX8406MA
Date: Tue, 3 Sep 2024 15:21:58 -0400 [thread overview]
Message-ID: <20240903192243.1107016-11-sashal@kernel.org> (raw)
In-Reply-To: <20240903192243.1107016-1-sashal@kernel.org>
From: Mathieu Fenniak <mathieu@fenniak.net>
[ Upstream commit 9286dfd5735b9cceb6a14bdf15e13400ccb60fe7 ]
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 <mathieu@fenniak.net>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240823135630.128447-1-mathieu@fenniak.net
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/asus-nb-wmi.c | 20 +++++++++++++++++++-
drivers/platform/x86/asus-wmi.h | 1 +
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index fceffe2082ec5..ed3633c5955d9 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -145,6 +145,10 @@ static struct quirk_entry quirk_asus_ignore_fan = {
.wmi_ignore_fan = true,
};
+static struct quirk_entry quirk_asus_zenbook_duo_kbd = {
+ .ignore_key_wlan = true,
+};
+
static int dmi_matched(const struct dmi_system_id *dmi)
{
pr_info("Identified laptop model '%s'\n", dmi->ident);
@@ -516,6 +520,15 @@ static const struct dmi_system_id asus_quirks[] = {
},
.driver_data = &quirk_asus_ignore_fan,
},
+ {
+ .callback = dmi_matched,
+ .ident = "ASUS Zenbook Duo UX8406MA",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "UX8406MA"),
+ },
+ .driver_data = &quirk_asus_zenbook_duo_kbd,
+ },
{},
};
@@ -630,7 +643,12 @@ static void asus_nb_wmi_key_filter(struct asus_wmi_driver *asus_wmi, int *code,
case 0x32: /* Volume Mute */
if (atkbd_reports_vol_keys)
*code = ASUS_WMI_KEY_IGNORE;
-
+ break;
+ case 0x5D: /* Wireless console Toggle */
+ case 0x5E: /* Wireless console Enable */
+ case 0x5F: /* Wireless console Disable */
+ if (quirks->ignore_key_wlan)
+ *code = ASUS_WMI_KEY_IGNORE;
break;
}
}
diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h
index cc30f18538472..d02f15fd3482f 100644
--- a/drivers/platform/x86/asus-wmi.h
+++ b/drivers/platform/x86/asus-wmi.h
@@ -40,6 +40,7 @@ struct quirk_entry {
bool wmi_force_als_set;
bool wmi_ignore_fan;
bool filter_i8042_e1_extended_codes;
+ bool ignore_key_wlan;
enum asus_wmi_tablet_switch_mode tablet_switch_mode;
int wapf;
/*
--
2.43.0
next prev parent reply other threads:[~2024-09-03 20:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 19:21 [PATCH AUTOSEL 6.10 01/22] ASoC: SOF: mediatek: Add missing board compatible Sasha Levin
2024-09-03 19:21 ` [PATCH AUTOSEL 6.10 02/22] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile Sasha Levin
2024-09-03 19:21 ` [PATCH AUTOSEL 6.10 03/22] ASoC: allow module autoloading for table db1200_pids Sasha Levin
2024-09-03 19:21 ` [PATCH AUTOSEL 6.10 04/22] ASoC: allow module autoloading for table board_ids Sasha Levin
2024-09-03 19:21 ` [PATCH AUTOSEL 6.10 05/22] ALSA: hda/realtek - Fixed ALC256 headphone no sound Sasha Levin
2024-09-03 19:21 ` [PATCH AUTOSEL 6.10 06/22] ALSA: hda/realtek - FIxed ALC285 " Sasha Levin
2024-09-03 19:21 ` [PATCH AUTOSEL 6.10 07/22] scsi: lpfc: Fix overflow build issue Sasha Levin
2024-09-03 19:21 ` [PATCH AUTOSEL 6.10 08/22] pinctrl: at91: make it work with current gpiolib Sasha Levin
2024-09-03 19:21 ` [PATCH AUTOSEL 6.10 09/22] hwmon: (asus-ec-sensors) remove VRM temp X570-E GAMING Sasha Levin
2024-09-03 19:21 ` [PATCH AUTOSEL 6.10 10/22] microblaze: don't treat zero reserved memory regions as error Sasha Levin
2024-09-03 19:21 ` Sasha Levin [this message]
2024-09-03 19:21 ` [PATCH AUTOSEL 6.10 12/22] platform/x86: x86-android-tablets: Make Lenovo Yoga Tab 3 X90F DMI match less strict Sasha Levin
2024-09-03 19:22 ` [PATCH AUTOSEL 6.10 13/22] net: ftgmac100: Ensure tx descriptor updates are visible Sasha Levin
2024-09-03 19:22 ` [PATCH AUTOSEL 6.10 14/22] LoongArch: Define ARCH_IRQ_INIT_FLAGS as IRQ_NOPROBE Sasha Levin
2024-09-03 19:22 ` [PATCH AUTOSEL 6.10 15/22] LoongArch: KVM: Invalidate guest steal time address on vCPU reset Sasha Levin
2024-09-03 19:22 ` [PATCH AUTOSEL 6.10 16/22] wifi: iwlwifi: lower message level for FW buffer destination Sasha Levin
2024-09-03 19:22 ` [PATCH AUTOSEL 6.10 17/22] wifi: iwlwifi: mvm: fix iwl_mvm_scan_fits() calculation Sasha Levin
2024-09-03 19:22 ` [PATCH AUTOSEL 6.10 18/22] wifi: iwlwifi: mvm: fix iwl_mvm_max_scan_ie_fw_cmd_room() Sasha Levin
2024-09-03 19:22 ` [PATCH AUTOSEL 6.10 19/22] wifi: iwlwifi: mvm: pause TCM when the firmware is stopped Sasha Levin
2024-09-03 19:22 ` [PATCH AUTOSEL 6.10 20/22] wifi: iwlwifi: mvm: don't wait for tx queues if firmware is dead Sasha Levin
2024-09-03 19:22 ` [PATCH AUTOSEL 6.10 21/22] wifi: mac80211: free skb on error path in ieee80211_beacon_get_ap() Sasha Levin
2024-09-03 19:22 ` [PATCH AUTOSEL 6.10 22/22] wifi: iwlwifi: clear trans->state earlier upon error Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240903192243.1107016-11-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=corentin.chary@gmail.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luke@ljones.dev \
--cc=mathieu@fenniak.net \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox