From patchwork Mon Jun 27 17:01:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keng-Yu Lin X-Patchwork-Id: 102338 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id EFFF9B6F7C for ; Tue, 28 Jun 2011 18:29:10 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QbTfA-00045l-FB; Tue, 28 Jun 2011 08:28:52 +0000 Received: from mail-wy0-f177.google.com ([74.125.82.177]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QbFBT-0007Tf-LS for kernel-team@lists.ubuntu.com; Mon, 27 Jun 2011 17:01:15 +0000 Received: by wyf23 with SMTP id 23so4030128wyf.8 for ; Mon, 27 Jun 2011 10:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:date:message-id :x-mailer:in-reply-to:references; bh=l+oJOH3GBE2ovPXUOs516duC7qcgtfBxVDsMp126acM=; b=J06jy5rdIXGDyku1S9wmSpCgtKOVVOUB9e5gsFMVXkHyqipysFrCLGctdC28GQ8fpZ 91PjZu93VELoRzamec/dDR++jUlQrLd03vVGtZ79nYxo3JZoYmgRn+woD5YVQSb5Vxas R7n+Cux17tM2VqX7qfMmUn0yshlA4G+jnRQz0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=udYkOSe892sbl05x14z5HwN2GU53WSKe2pyA7WkG7+qtF3t2ZW48ZIHE5Pzin4ogOZ PD7HOHV/7l5SQD787g5vZbbVwZIMrKyiDW5be8Qv9fTrzFu+10RbrieYTJLAzh7dYAmu RzZQ/SuZjA4ERwz9vy8i2M0TLaeuVkddprm6E= Received: by 10.216.65.203 with SMTP id f53mr2805456wed.54.1309194075451; Mon, 27 Jun 2011 10:01:15 -0700 (PDT) Received: from localhost ([83.141.95.158]) by mx.google.com with ESMTPS id b70sm2873437wek.44.2011.06.27.10.01.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 27 Jun 2011 10:01:14 -0700 (PDT) From: Keng-Yu Lin To: kernel-team@lists.ubuntu.com Subject: [PATCH] Revert: "dell-laptop: Toggle the unsupported hardware killswitch" Date: Mon, 27 Jun 2011 18:01:11 +0100 Message-Id: <1309194071-7295-2-git-send-email-kengyu@canonical.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1309194071-7295-1-git-send-email-kengyu@canonical.com> References: <1309194071-7295-1-git-send-email-kengyu@canonical.com> X-Mailman-Approved-At: Tue, 28 Jun 2011 08:28:50 +0000 Cc: victor.palau@canonical.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com This reverts commit a3d77411e8b2ad661958c1fbee65beb476ec6d70, as it causes a mess in the wireless rfkill status on some models. It is probably a bad idea to toggle the rfkill for all dell models without the respect to the claim that it is hardware-controlled. BugLink: http://bugs.launchpad.net/bugs/775281 Signed-off-by: Keng-Yu Lin Acked-by: Tim Gardner Acked-by: Leann Ogasawara --- drivers/platform/x86/dell-laptop.c | 24 ++---------------------- 1 files changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index ad24ef3..34657f9 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c @@ -290,12 +290,9 @@ static int dell_rfkill_set(void *data, bool blocked) dell_send_request(buffer, 17, 11); /* If the hardware switch controls this radio, and the hardware - switch is disabled, don't allow changing the software state. - If the hardware switch is reported as not supported, always - fire the SMI to toggle the killswitch. */ + switch is disabled, don't allow changing the software state */ if ((hwswitch_state & BIT(hwswitch_bit)) && - !(buffer->output[1] & BIT(16)) && - (buffer->output[1] & BIT(0))) { + !(buffer->output[1] & BIT(16))) { ret = -EINVAL; goto out; } @@ -401,23 +398,6 @@ static const struct file_operations dell_debugfs_fops = { static void dell_update_rfkill(struct work_struct *ignored) { - int status; - - get_buffer(); - dell_send_request(buffer, 17, 11); - status = buffer->output[1]; - release_buffer(); - - /* if hardware rfkill is not supported, set it explicitly */ - if (!(status & BIT(0))) { - if (wifi_rfkill) - dell_rfkill_set((void *)1, !((status & BIT(17)) >> 17)); - if (bluetooth_rfkill) - dell_rfkill_set((void *)2, !((status & BIT(18)) >> 18)); - if (wwan_rfkill) - dell_rfkill_set((void *)3, !((status & BIT(19)) >> 19)); - } - if (wifi_rfkill) dell_rfkill_query(wifi_rfkill, (void *)1); if (bluetooth_rfkill)