linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ideapad-laptop: Add several models to no_hw_rfkill
@ 2017-07-04  5:26 Yang Jiaxun
  2017-07-04 10:30 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Jiaxun @ 2017-07-04  5:26 UTC (permalink / raw)
  To: ike.pan; +Cc: dvhart, andy, platform-driver-x86, linux-kernel

 From 8db74a4eef334f614bf727232e5b88f67f824862 Mon Sep 17 00:00:00 2001
From: Yang Jiaxun <yjx@flygoat.com>
Date: Tue, 4 Jul 2017 11:28:41 +0800
Subject: [PATCH] ideapad-laptop: Add several models to no_hw_rfkill

Some Lenovo ideapad models do not have hardware rfkill switches, but 
trying to read the rfkill switches through the ideapad-laptop module. It 
caused to always reported blocking breaking wifi.

Fix it by adding those models to no_hw_rfkill list.

Signed-off-by: Yang Jiaxun <yjx@flygoat.com>
---
  drivers/platform/x86/ideapad-laptop.c | 78 
+++++++++++++++++++++++++++++++++--
  1 file changed, 74 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/ideapad-laptop.c 
b/drivers/platform/x86/ideapad-laptop.c
index 527e5d9..3ebc5c7 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -909,17 +909,87 @@ static const struct dmi_system_id 
no_hw_rfkill_list[] = {
          },
      },
      {
+        .ident = "Lenovo V310-14IKB",
+        .matches = {
+            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-14IKB"),
+        },
+    },
+    {
+        .ident = "Lenovo V310-14ISK",
+        .matches = {
+            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-14ISK"),
+        },
+    },
+    {
+        .ident = "Lenovo V310-15IKB",
+        .matches = {
+            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-15IKB"),
+        },
+    },
+    {
          .ident = "Lenovo V310-15ISK",
          .matches = {
-                DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
-                DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-15ISK"),
+            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-15ISK"),
+        },
+    },
+    {
+        .ident = "Lenovo ideapad 300-15IBR",
+        .matches = {
+            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 300-15IBR"),
+        },
+    },
+    {
+        .ident = "Lenovo ideapad 300-15IKB",
+        .matches = {
+            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 300-15IKB"),
+        },
+    },
+    {
+        .ident = "Lenovo ideapad 300S-11IBR",
+        .matches = {
+            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 300S-11BR"),
+        },
+    },
+    {
+        .ident = "Lenovo ideapad 310-15ABR",
+        .matches = {
+            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15ABR"),
+        },
+    },
+    {
+        .ident = "Lenovo ideapad 310-15IAP",
+        .matches = {
+            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15IAP"),
+        },
+    },
+    {
+        .ident = "Lenovo ideapad 310-15ISK",
+        .matches = {
+            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15ISK"),
          },
      },
      {
          .ident = "Lenovo ideapad 310-15IKB",
          .matches = {
-                DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
-                DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15IKB"),
+            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15IKB"),
+        },
+    },
+    {
+        .ident = "Lenovo ideapad Y700-14ISK",
+        .matches = {
+            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad Y700-14ISK"),
          },
      },
      {
-- 
2.7.4

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

* Re: [PATCH] ideapad-laptop: Add several models to no_hw_rfkill
  2017-07-04  5:26 [PATCH] ideapad-laptop: Add several models to no_hw_rfkill Yang Jiaxun
@ 2017-07-04 10:30 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2017-07-04 10:30 UTC (permalink / raw)
  To: Yang Jiaxun
  Cc: Ike Panhc, dvhart, Andy Shevchenko, Platform Driver, linux-kernel

On Tue, Jul 4, 2017 at 8:26 AM, Yang Jiaxun <yjx@flygoat.com> wrote:
> From 8db74a4eef334f614bf727232e5b88f67f824862 Mon Sep 17 00:00:00 2001
> From: Yang Jiaxun <yjx@flygoat.com>
> Date: Tue, 4 Jul 2017 11:28:41 +0800
> Subject: [PATCH] ideapad-laptop: Add several models to no_hw_rfkill
>
> Some Lenovo ideapad models do not have hardware rfkill switches, but trying
> to read the rfkill switches through the ideapad-laptop module. It caused to
> always reported blocking breaking wifi.
>
> Fix it by adding those models to no_hw_rfkill list.

Thanks for the patch, though...

Please, fix your email client that our patchwork can track.

Moreover, fix the indentation in the way it's already done in the
driver (your patch should not have "-" (minus) lines AFAIU).

>
> Signed-off-by: Yang Jiaxun <yjx@flygoat.com>
> ---
>  drivers/platform/x86/ideapad-laptop.c | 78
> +++++++++++++++++++++++++++++++++--
>  1 file changed, 74 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/platform/x86/ideapad-laptop.c
> b/drivers/platform/x86/ideapad-laptop.c
> index 527e5d9..3ebc5c7 100644
> --- a/drivers/platform/x86/ideapad-laptop.c
> +++ b/drivers/platform/x86/ideapad-laptop.c
> @@ -909,17 +909,87 @@ static const struct dmi_system_id no_hw_rfkill_list[]
> = {
>          },
>      },
>      {
> +        .ident = "Lenovo V310-14IKB",
> +        .matches = {
> +            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-14IKB"),
> +        },
> +    },
> +    {
> +        .ident = "Lenovo V310-14ISK",
> +        .matches = {
> +            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-14ISK"),
> +        },
> +    },
> +    {
> +        .ident = "Lenovo V310-15IKB",
> +        .matches = {
> +            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-15IKB"),
> +        },
> +    },
> +    {
>          .ident = "Lenovo V310-15ISK",
>          .matches = {
> -                DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> -                DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-15ISK"),
> +            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-15ISK"),
> +        },
> +    },
> +    {
> +        .ident = "Lenovo ideapad 300-15IBR",
> +        .matches = {
> +            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 300-15IBR"),
> +        },
> +    },
> +    {
> +        .ident = "Lenovo ideapad 300-15IKB",
> +        .matches = {
> +            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 300-15IKB"),
> +        },
> +    },
> +    {
> +        .ident = "Lenovo ideapad 300S-11IBR",
> +        .matches = {
> +            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 300S-11BR"),
> +        },
> +    },
> +    {
> +        .ident = "Lenovo ideapad 310-15ABR",
> +        .matches = {
> +            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15ABR"),
> +        },
> +    },
> +    {
> +        .ident = "Lenovo ideapad 310-15IAP",
> +        .matches = {
> +            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15IAP"),
> +        },
> +    },
> +    {
> +        .ident = "Lenovo ideapad 310-15ISK",
> +        .matches = {
> +            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15ISK"),
>          },
>      },
>      {
>          .ident = "Lenovo ideapad 310-15IKB",
>          .matches = {
> -                DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> -                DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15IKB"),
> +            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15IKB"),
> +        },
> +    },
> +    {
> +        .ident = "Lenovo ideapad Y700-14ISK",
> +        .matches = {
> +            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +            DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad Y700-14ISK"),
>          },
>      },
>      {
> --
> 2.7.4
>



-- 
With Best Regards,
Andy Shevchenko

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

end of thread, other threads:[~2017-07-05  5:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-04  5:26 [PATCH] ideapad-laptop: Add several models to no_hw_rfkill Yang Jiaxun
2017-07-04 10:30 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).