From patchwork Fri Jul 31 13:37:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Darren Salt X-Patchwork-Id: 38512 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 n6VDuZHp006601 for ; Fri, 31 Jul 2009 13:56:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751541AbZGaN4d (ORCPT ); Fri, 31 Jul 2009 09:56:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751460AbZGaN4d (ORCPT ); Fri, 31 Jul 2009 09:56:33 -0400 Received: from lon1-post-1.mail.demon.net ([195.173.77.148]:36167 "EHLO lon1-post-1.mail.demon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751389AbZGaN4c (ORCPT ); Fri, 31 Jul 2009 09:56:32 -0400 Received: from youmustbejoking.demon.co.uk ([80.176.152.238] helo=pentagram.youmustbejoking.demon.co.uk) by lon1-post-1.mail.demon.net with esmtp (Exim 4.69) id 1MWsaz-00000H-YO; Fri, 31 Jul 2009 13:56:31 +0000 Received: from [192.168.0.5] (helo=flibble.youmustbejoking.demon.co.uk) by pentagram.youmustbejoking.demon.co.uk with esmtp (Exim 4.69) (envelope-from ) id 1MWsay-0006k4-CQ; Fri, 31 Jul 2009 14:56:28 +0100 Date: Fri, 31 Jul 2009 14:37:42 +0100 From: Darren Salt To: linux-wireless@vger.kernel.org Cc: IvDoorn@gmail.com Subject: [rt2800pci] Problems with (and without) rfkill Message-ID: <5088EED148%linux@youmustbejoking.demon.co.uk> Mail-Followup-To: linux-wireless@vger.kernel.org, linux@youmustbejoking.demon.co.uk, IvDoorn@gmail.com User-Agent: Messenger-Pro/2.59.0.3093 (Qt/4.5.1) (Linux-x86_64) X-NuLabour-Date: Fri, 9009 Dec 1984 14:37:42 +0100 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 192.168.0.5 X-SA-Exim-Mail-From: linux@youmustbejoking.demon.co.uk X-SA-Exim-Scanned: No (on pentagram.youmustbejoking.demon.co.uk); SAEximRunCond expanded to false Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org I've had a play with the rt2x00 tree (11c3222a) and hit some problems on my EeePC 901. First, I was seeing "SIOCSIFFLAGS: unknown error 132" (which turns out to be ERFKILL) when trying to bring up the interface. "rfkill list" shows that phy0 is hard-blocked¹; since there's no switch for this, the only way to "unblock" it is to patch the driver. I used the following patch for this². However, this isn't the end of the problems: I get an oops instead while trying to bring up the interface (configured via /etc/network/interfaces and using WPA2; the configuration is known good for rt2860sta). ¹ phy0 is only present when eeepc-wlan is not blocked, which isn't surprising because the card is effectively unplugged when eeepc-wlan is blocked. ² I also tried just having rt2800pci_rfkill_poll() just return 0, but that makes no difference. diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x index 8a22e65..f934325 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c @@ -380,7 +380,12 @@ static int rt2800pci_rfkill_poll(struct rt2x00_dev *rt2x00d u32 reg; rt2x00pci_register_read(rt2x00dev, GPIO_CTRL_CFG, ®); - return rt2x00_get_field32(reg, GPIO_CTRL_CFG_BIT2); + /*return rt2x00_get_field32(reg, GPIO_CTRL_CFG_BIT2);*/ + if (rt2x00_get_field32(reg, GPIO_CTRL_CFG_BIT2)) { + rt2x00_set_field32(®, GPIO_CTRL_CFG_BIT2, 0); + rt2x00pci_register_write(rt2x00dev, GPIO_CTRL_CFG, reg); + } + return 0; } #ifdef CONFIG_RT2X00_LIB_LEDS