All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/x86: asus-wmi: Add quirk for ASUS Vivobook S14
@ 2025-03-18  0:54 Kevin Stravers
  2025-03-21 15:42 ` Ilpo Järvinen
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Stravers @ 2025-03-18  0:54 UTC (permalink / raw)
  To: corentin.chary, luke; +Cc: platform-driver-x86

 From 9af8ba6cfd6305d7696d6cfc8eedb12405cb572f Mon Sep 17 00:00:00 2001

From: Kevin Robert Stravers <kevin@stravers.net>
Date: Mon, 17 Mar 2025 20:41:44 -0400
Subject: [PATCH] platform/x86: asus-wmi: Add quirk for ASUS Vivobook S14

The ASUS Vivobook S14 will have wifi disabled on boot as well as
resumption from suspend if the asus-wmi driver invokes rfkill functions.

This patch disables asus-wmi's rfkill usage to prevent the wifi card
from being software disabled.
---
  drivers/platform/x86/asus-nb-wmi.c | 13 +++++++++++++
  drivers/platform/x86/asus-wmi.c    |  5 +++++
  2 files changed, 18 insertions(+)

diff --git a/drivers/platform/x86/asus-nb-wmi.c 
b/drivers/platform/x86/asus-nb-wmi.c
index 3f8b2a324efd..1e6fb9308560 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -150,6 +150,10 @@ static struct quirk_entry 
quirk_asus_zenbook_duo_kbd = {
      .ignore_key_wlan = true,
  };

+static struct quirk_entry quirk_asus_vivobook_s14 = {
+    .skip_rfkill = true,
+};
+
  static int dmi_matched(const struct dmi_system_id *dmi)
  {
      pr_info("Identified laptop model '%s'\n", dmi->ident);
@@ -530,6 +534,15 @@ static const struct dmi_system_id asus_quirks[] = {
          },
          .driver_data = &quirk_asus_zenbook_duo_kbd,
      },
+    {
+        .callback = dmi_matched,
+        .ident = "ASUS VivoBook S14",
+        .matches = {
+            DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+            DMI_MATCH(DMI_PRODUCT_NAME, "S5406SA"),
+        },
+        .driver_data = &quirk_asus_vivobook_s14,
+    },
      {},
  };

diff --git a/drivers/platform/x86/asus-wmi.c 
b/drivers/platform/x86/asus-wmi.c
index 38ef778e8c19..42e58a28c3e2 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -2138,6 +2138,8 @@ static int asus_new_rfkill(struct asus_wmi *asus,

  static void asus_wmi_rfkill_exit(struct asus_wmi *asus)
  {
+    if (asus->driver->quirks->skip_rfkill)
+        return;
      if (asus->driver->wlan_ctrl_by_user && ashs_present())
          return;

@@ -2188,6 +2190,9 @@ static void asus_wmi_rfkill_exit(struct asus_wmi 
*asus)

  static int asus_wmi_rfkill_init(struct asus_wmi *asus)
  {
+    if (asus->driver->quirks->skip_rfkill)
+        return 0;
+
      int result = 0;

      mutex_init(&asus->hotplug_lock);
-- 
2.48.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/x86: asus-wmi: Add quirk for ASUS Vivobook S14
  2025-03-18  0:54 [PATCH] platform/x86: asus-wmi: Add quirk for ASUS Vivobook S14 Kevin Stravers
@ 2025-03-21 15:42 ` Ilpo Järvinen
       [not found]   ` <a7bf6573-0d8c-4464-8841-df5df537249e@stravers.net>
  0 siblings, 1 reply; 3+ messages in thread
From: Ilpo Järvinen @ 2025-03-21 15:42 UTC (permalink / raw)
  To: Kevin Stravers; +Cc: corentin.chary, luke, platform-driver-x86

[-- Attachment #1: Type: text/plain, Size: 2893 bytes --]

On Mon, 17 Mar 2025, Kevin Stravers wrote:

> From 9af8ba6cfd6305d7696d6cfc8eedb12405cb572f Mon Sep 17 00:00:00 2001
> 
> From: Kevin Robert Stravers <kevin@stravers.net>
> Date: Mon, 17 Mar 2025 20:41:44 -0400
> Subject: [PATCH] platform/x86: asus-wmi: Add quirk for ASUS Vivobook S14
> 
> The ASUS Vivobook S14 will have wifi disabled on boot as well as
> resumption from suspend if the asus-wmi driver invokes rfkill functions.
> 
> This patch disables asus-wmi's rfkill usage to prevent the wifi card
> from being software disabled.
> ---

Hi Kevin,

Thank you for the patch. I tried to apply this but git am say the patch 
is corrupted so I cannot apply it. Please resubmit, thank you.

(It might be worth testing it first by emailing the patch only to yourself 
and checking that you can apply it before resubmitting publicly.)

--
 i.

>  drivers/platform/x86/asus-nb-wmi.c | 13 +++++++++++++
>  drivers/platform/x86/asus-wmi.c    |  5 +++++
>  2 files changed, 18 insertions(+)
> 
> diff --git a/drivers/platform/x86/asus-nb-wmi.c
> b/drivers/platform/x86/asus-nb-wmi.c
> index 3f8b2a324efd..1e6fb9308560 100644
> --- a/drivers/platform/x86/asus-nb-wmi.c
> +++ b/drivers/platform/x86/asus-nb-wmi.c
> @@ -150,6 +150,10 @@ static struct quirk_entry quirk_asus_zenbook_duo_kbd = {
>      .ignore_key_wlan = true,
>  };
> 
> +static struct quirk_entry quirk_asus_vivobook_s14 = {
> +    .skip_rfkill = true,
> +};
> +
>  static int dmi_matched(const struct dmi_system_id *dmi)
>  {
>      pr_info("Identified laptop model '%s'\n", dmi->ident);
> @@ -530,6 +534,15 @@ static const struct dmi_system_id asus_quirks[] = {
>          },
>          .driver_data = &quirk_asus_zenbook_duo_kbd,
>      },
> +    {
> +        .callback = dmi_matched,
> +        .ident = "ASUS VivoBook S14",
> +        .matches = {
> +            DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> +            DMI_MATCH(DMI_PRODUCT_NAME, "S5406SA"),
> +        },
> +        .driver_data = &quirk_asus_vivobook_s14,
> +    },
>      {},
>  };
> 
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index 38ef778e8c19..42e58a28c3e2 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -2138,6 +2138,8 @@ static int asus_new_rfkill(struct asus_wmi *asus,
> 
>  static void asus_wmi_rfkill_exit(struct asus_wmi *asus)
>  {
> +    if (asus->driver->quirks->skip_rfkill)
> +        return;
>      if (asus->driver->wlan_ctrl_by_user && ashs_present())
>          return;
> 
> @@ -2188,6 +2190,9 @@ static void asus_wmi_rfkill_exit(struct asus_wmi *asus)
> 
>  static int asus_wmi_rfkill_init(struct asus_wmi *asus)
>  {
> +    if (asus->driver->quirks->skip_rfkill)
> +        return 0;
> +
>      int result = 0;
> 
>      mutex_init(&asus->hotplug_lock);
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/x86: asus-wmi: Add quirk for ASUS Vivobook S14
       [not found]   ` <a7bf6573-0d8c-4464-8841-df5df537249e@stravers.net>
@ 2025-03-21 16:43     ` Ilpo Järvinen
  0 siblings, 0 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2025-03-21 16:43 UTC (permalink / raw)
  To: Kevin Stravers; +Cc: corentin.chary, luke, platform-driver-x86

On Fri, 21 Mar 2025, Kevin Stravers wrote:

> 
> Sorry about that, the email client formatted tabs as spaces. This should be the corre
> ct patch.

Hi,

This now has other issues. It had some html in that comment above and 
please resend not as a reply to any thread but in own thread.

> >From 9af8ba6cfd6305d7696d6cfc8eedb12405cb572f Mon Sep 17 00:00:00 2001
> From: Kevin Robert Stravers <kevin@stravers.net>
> Date: Mon, 17 Mar 2025 20:41:44 -0400
> Subject: [PATCH] platform/x86: asus-wmi: Add quirk for ASUS Vivobook S14
> 
> The ASUS Vivobook S14 will have wifi disabled on boot as well as
> resumption from suspend if the asus-wmi driver invokes rfkill functions.
> 
> This patch disables asus-wmi's rfkill usage to prevent the wifi card
> from being software disabled.
> ---
>  drivers/platform/x86/asus-nb-wmi.c | 13 +++++++++++++
>  drivers/platform/x86/asus-wmi.c    |  5 +++++
>  2 files changed, 18 insertions(+)
> 
> diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
> index 3f8b2a324efd..1e6fb9308560 100644
> --- a/drivers/platform/x86/asus-nb-wmi.c
> +++ b/drivers/platform/x86/asus-nb-wmi.c
> @@ -150,6 +150,10 @@ static struct quirk_entry quirk_asus_zenbook_duo_kbd = {
>  	.ignore_key_wlan = true,
>  };
>  
> +static struct quirk_entry quirk_asus_vivobook_s14 = {
> +	.skip_rfkill = true,
> +};
> +
>  static int dmi_matched(const struct dmi_system_id *dmi)
>  {
>  	pr_info("Identified laptop model '%s'\n", dmi->ident);
> @@ -530,6 +534,15 @@ static const struct dmi_system_id asus_quirks[] = {
>  		},
>  		.driver_data = &quirk_asus_zenbook_duo_kbd,
>  	},
> +	{
> +		.callback = dmi_matched,
> +		.ident = "ASUS VivoBook S14",
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "S5406SA"),
> +		},
> +		.driver_data = &quirk_asus_vivobook_s14,
> +	},
>  	{},
>  };
>  
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index 38ef778e8c19..42e58a28c3e2 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -2138,6 +2138,8 @@ static int asus_new_rfkill(struct asus_wmi *asus,
>  
>  static void asus_wmi_rfkill_exit(struct asus_wmi *asus)
>  {
> +	if (asus->driver->quirks->skip_rfkill)
> +		return;
>  	if (asus->driver->wlan_ctrl_by_user && ashs_present())
>  		return;
>  
> @@ -2188,6 +2190,9 @@ static void asus_wmi_rfkill_exit(struct asus_wmi *asus)
>  
>  static int asus_wmi_rfkill_init(struct asus_wmi *asus)
>  {
> +	if (asus->driver->quirks->skip_rfkill)
> +		return 0;
> +
>  	int result = 0;
>  
>  	mutex_init(&asus->hotplug_lock);
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-21 16:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-18  0:54 [PATCH] platform/x86: asus-wmi: Add quirk for ASUS Vivobook S14 Kevin Stravers
2025-03-21 15:42 ` Ilpo Järvinen
     [not found]   ` <a7bf6573-0d8c-4464-8841-df5df537249e@stravers.net>
2025-03-21 16:43     ` Ilpo Järvinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.