From: Ike Panhc <ike.pan@canonical.com>
To: Darren Hart <dvhart@infradead.org>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] ideapad: No hardware switch after 2016
Date: Mon, 15 Feb 2016 18:24:23 +0800 [thread overview]
Message-ID: <1455531863-1294-1-git-send-email-ike.pan@canonical.com> (raw)
In-Reply-To: <1455531813-1256-1-git-send-email-ike.pan@canonical.com>
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
next prev parent reply other threads:[~2016-02-15 10:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-15 10:23 [PATCH v2 0/2] Disable rfkill hardblock if BIOS date > 2016 Ike Panhc
2016-02-15 10:24 ` Ike Panhc [this message]
2016-02-15 12:08 ` [PATCH 1/2] ideapad: No hardware switch after 2016 Bjørn Mork
2016-02-15 17:05 ` Ike Panhc
2016-02-15 17:32 ` Bjørn Mork
2016-02-16 2:04 ` Ike Panhc
2016-02-17 7:15 ` Darren Hart
2016-02-15 10:24 ` [PATCH 2/2] ideapad: show has_hw_rfkill_switch in debugfs Ike Panhc
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=1455531863-1294-1-git-send-email-ike.pan@canonical.com \
--to=ike.pan@canonical.com \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@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
all inboxes | Powered by JetHome®