From patchwork Fri Jul 31 02:25:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Garrett X-Patchwork-Id: 38438 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6V2PpWG010688 for ; Fri, 31 Jul 2009 02:25:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751688AbZGaCZt (ORCPT ); Thu, 30 Jul 2009 22:25:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751747AbZGaCZs (ORCPT ); Thu, 30 Jul 2009 22:25:48 -0400 Received: from cavan.codon.org.uk ([93.93.128.6]:47478 "EHLO cavan.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751557AbZGaCZs (ORCPT ); Thu, 30 Jul 2009 22:25:48 -0400 Received: from 78-86-230-144.zone2.bethere.co.uk ([78.86.230.144] helo=localhost.localdomain) by cavan.codon.org.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MWhoX-0007Jr-Ac; Fri, 31 Jul 2009 03:25:45 +0100 From: Matthew Garrett To: linux-acpi@vger.kernel.org Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org, timg@tpi.com, Matthew Garrett Subject: [PATCH] dell-laptop: Fix rfkill state queries Date: Fri, 31 Jul 2009 03:25:38 +0100 Message-Id: <1249007138-27354-1-git-send-email-mjg@redhat.com> X-Mailer: git-send-email 1.6.2.5 X-SA-Do-Not-Run: Yes X-SA-Exim-Connect-IP: 78.86.230.144 X-SA-Exim-Mail-From: mjg@redhat.com X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The current code in dell-laptop is confused about the hardware rfkill state. Fix it up such that it's always reported correctly. Signed-off-by: Matthew Garrett Tested-by: Tim Gardner --- drivers/platform/x86/dell-laptop.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index 74909c4..9061111 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c @@ -197,8 +197,8 @@ static void dell_rfkill_query(struct rfkill *rfkill, void *data) dell_send_request(&buffer, 17, 11); status = buffer.output[1]; - if (status & BIT(bit)) - rfkill_set_hw_state(rfkill, !!(status & BIT(16))); + rfkill_set_sw_state(rfkill, !!(status & BIT(bit))); + rfkill_set_hw_state(rfkill, !(status & BIT(16))); } static const struct rfkill_ops dell_rfkill_ops = {