Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1334359

[PATCH 1/2] ideapad: No hardware switch after 2016

From Ike Panhc <ike.pan@canonical.com>
Newsgroups linux.kernel
Subject [PATCH 1/2] ideapad: No hardware switch after 2016
Date 2016-02-15 11:30 +0100
Message-ID <r2ozM-824-25@gated-at.bofh.it> (permalink)
References <r2ozM-824-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


There are complains on few ideapads that wireless is always hard
blocked but there is no physical radio switch. For now, we need
each user to report its dmi information and ignore hard blocks
on their ideapad. With more and more ideapads available in market
to maintain the dmi table becomes never-ended job.

I've checked lenovo website and for recent design none of the
ideapads has radio switch. I do not believe there will be in the
future. Therefore to disable hard block according to BIOS date is
reasonable approach.

This patch will disable rfkill hardblock if BIOS year > 2015.

Signed-off-by: Ike Panhc <ike.pan@canonical.com>
---
 drivers/platform/x86/ideapad-laptop.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index d78ee15..1b39074d 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -938,7 +938,10 @@ static int ideapad_acpi_add(struct platform_device *pdev)
 	priv->cfg = cfg;
 	priv->adev = adev;
 	priv->platform_device = pdev;
-	priv->has_hw_rfkill_switch = !dmi_check_system(no_hw_rfkill_list);
+	if (!dmi_get_date(DMI_BIOS_DATE, &i, NULL, NULL))
+		i = 2015;
+	priv->has_hw_rfkill_switch = (i < 2016) &&
+		!dmi_check_system(no_hw_rfkill_list);
 
 	ret = ideapad_sysfs_init(priv);
 	if (ret)
-- 
1.9.1

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/2] Disable rfkill hardblock if BIOS date > 2016 Ike Panhc <ike.pan@canonical.com> - 2016-02-15 11:30 +0100
  [PATCH 1/2] ideapad: No hardware switch after 2016 Ike Panhc <ike.pan@canonical.com> - 2016-02-15 11:30 +0100
    Re: [PATCH 1/2] ideapad: No hardware switch after 2016 Bjørn Mork <bjorn@mork.no> - 2016-02-15 13:10 +0100
      Re: [PATCH 1/2] ideapad: No hardware switch after 2016 Ike Panhc <ike.pan@canonical.com> - 2016-02-15 18:10 +0100
        Re: [PATCH 1/2] ideapad: No hardware switch after 2016 Bjørn Mork <bjorn@mork.no> - 2016-02-15 18:40 +0100
          Re: [PATCH 1/2] ideapad: No hardware switch after 2016 Ike Panhc <ike.pan@canonical.com> - 2016-02-16 03:10 +0100
            Re: [PATCH 1/2] ideapad: No hardware switch after 2016 Darren Hart <dvhart@infradead.org> - 2016-02-17 08:20 +0100

csiph-web