From patchwork Mon Feb 15 10:24:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ike Panhc X-Patchwork-Id: 8312371 Return-Path: X-Original-To: patchwork-platform-driver-x86@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E7063C02AA for ; Mon, 15 Feb 2016 10:25:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 316EA204A2 for ; Mon, 15 Feb 2016 10:25:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F1732040F for ; Mon, 15 Feb 2016 10:25:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752707AbcBOKYb (ORCPT ); Mon, 15 Feb 2016 05:24:31 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:53031 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752692AbcBOKYa (ORCPT ); Mon, 15 Feb 2016 05:24:30 -0500 Received: from 1.general.ikepanhc.us.vpn ([10.172.69.54] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1aVGKS-0007zq-Hk; Mon, 15 Feb 2016 10:24:29 +0000 From: Ike Panhc To: Darren Hart 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 Message-Id: <1455531863-1294-1-git-send-email-ike.pan@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455531813-1256-1-git-send-email-ike.pan@canonical.com> References: <1455531813-1256-1-git-send-email-ike.pan@canonical.com> Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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)