2019-01-19 11:18:14

by Yang Fan

[permalink] [raw]
Subject: [PATCH v2] platform/x86: ideapad-laptop: Fix no_hw_rfkill_list for Lenovo RESCUER R720-15IKBN

Commit ae7c8cba3221 ("platform/x86: ideapad-laptop: add lenovo RESCUER
R720-15IKBN to no_hw_rfkill_list") added
DMI_MATCH(DMI_BOARD_NAME, "80WW")
for Lenovo RESCUER R720-15IKBN.

But DMI_BOARD_NAME does not match 80WW on Lenovo RESCUER R720-15IKBN,
thus cause Wireless LAN still be hard blocked.

On Lenovo RESCUER R720-15IKBN:
~$ cat /sys/class/dmi/id/sys_vendor
LENOVO
~$ cat /sys/class/dmi/id/board_name
Provence-5R3
~$ cat /sys/class/dmi/id/product_name
80WW
~$ cat /sys/class/dmi/id/product_version
Lenovo R720-15IKBN

So on Lenovo RESCUER R720-15IKBN:
DMI_SYS_VENDOR should match "LENOVO",
DMI_BOARD_NAME should match "Provence-5R3",
DMI_PRODUCT_NAME should match "80WW",
DMI_PRODUCT_VERSION should match "Lenovo R720-15IKBN".

Fix it, and in according with other entries in no_hw_rfkill_list,
use DMI_PRODUCT_VERSION instead of DMI_BOARD_NAME.

Fixes: ae7c8cba3221 ("platform/x86: ideapad-laptop: add lenovo
RESCUER R720-15IKBN to no_hw_rfkill_list")
Signed-off-by: Yang Fan <[email protected]>
---
drivers/platform/x86/ideapad-laptop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 1589dffab9faf..8b53a9ceb897c 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -989,7 +989,7 @@ static const struct dmi_system_id no_hw_rfkill_list[] = {
.ident = "Lenovo RESCUER R720-15IKBN",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_BOARD_NAME, "80WW"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo R720-15IKBN"),
},
},
{


2019-01-26 21:34:18

by Darren Hart

[permalink] [raw]
Subject: Re: [PATCH v2] platform/x86: ideapad-laptop: Fix no_hw_rfkill_list for Lenovo RESCUER R720-15IKBN

On Sat, Jan 19, 2019 at 07:16:33PM +0800, Yang Fan wrote:
> Commit ae7c8cba3221 ("platform/x86: ideapad-laptop: add lenovo RESCUER
> R720-15IKBN to no_hw_rfkill_list") added
> DMI_MATCH(DMI_BOARD_NAME, "80WW")
> for Lenovo RESCUER R720-15IKBN.
>
> But DMI_BOARD_NAME does not match 80WW on Lenovo RESCUER R720-15IKBN,
> thus cause Wireless LAN still be hard blocked.
>
> On Lenovo RESCUER R720-15IKBN:
> ~$ cat /sys/class/dmi/id/sys_vendor
> LENOVO
> ~$ cat /sys/class/dmi/id/board_name
> Provence-5R3
> ~$ cat /sys/class/dmi/id/product_name
> 80WW
> ~$ cat /sys/class/dmi/id/product_version
> Lenovo R720-15IKBN
>
> So on Lenovo RESCUER R720-15IKBN:
> DMI_SYS_VENDOR should match "LENOVO",
> DMI_BOARD_NAME should match "Provence-5R3",
> DMI_PRODUCT_NAME should match "80WW",
> DMI_PRODUCT_VERSION should match "Lenovo R720-15IKBN".
>
> Fix it, and in according with other entries in no_hw_rfkill_list,
> use DMI_PRODUCT_VERSION instead of DMI_BOARD_NAME.
>
> Fixes: ae7c8cba3221 ("platform/x86: ideapad-laptop: add lenovo
> RESCUER R720-15IKBN to no_hw_rfkill_list")
> Signed-off-by: Yang Fan <[email protected]>

Thanks for the patch, queued for testing.

--
Darren Hart
VMware Open Source Technology Center