* rt73usb not working since linux 3.4
@ 2012-06-26 16:03 Andreas Messer
2012-06-26 17:18 ` John W. Linville
2012-07-11 16:50 ` Olive
0 siblings, 2 replies; 9+ messages in thread
From: Andreas Messer @ 2012-06-26 16:03 UTC (permalink / raw)
To: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]
Dear all,
updating my pc from linux kernel 3.3 to linux kernel 3.4 broke my wlan. I'm
using rt2571 based wlan module from qcom: LR802UKG, which is wired to an
internal usb port of my media center pc. The rfkill switch is hardwired to
make wlan active all the time. This setup is (almost) properly working since
about three years now. (If i ignore the occasional vendor_request_error
things)
When I use kernel 3.4., i get a lot of additional devices reported by the
kernel - three leds and a rfkill switch which have not been there before. (or
at least I did not notice them) The wlan device now refuses to go online,
saying that the kill switch is active, which of course can not be as it is
working with linux kernel 3.3. Furthermore, the driver reports three leds, but
my wlan device has only one, so probably a bad eeprom? i dont know...
Anyway, I noticed, that when I set the radio led to brightness 255, which
takes a lot of time and gives me some vendor_request_errors, the rfkill switch
gets turned off (sys/class/rfkill/../hard = 0). Unfortunately, this doesn't
help to bring the interface online: After doing that I get frequent
vendor_request_failed messages, even the PC becomes stuck on shutdown.
(Probably NetworkManager waiting for something...)
So, what can I do to track down the problem?
Cheers,
Andreas
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rt73usb not working since linux 3.4
2012-06-26 16:03 rt73usb not working since linux 3.4 Andreas Messer
@ 2012-06-26 17:18 ` John W. Linville
2012-07-24 17:33 ` Andreas Messer
2012-07-11 16:50 ` Olive
1 sibling, 1 reply; 9+ messages in thread
From: John W. Linville @ 2012-06-26 17:18 UTC (permalink / raw)
To: Andreas Messer; +Cc: linux-wireless
On Tue, Jun 26, 2012 at 06:03:56PM +0200, Andreas Messer wrote:
> Dear all,
>
> updating my pc from linux kernel 3.3 to linux kernel 3.4 broke my wlan. I'm
> using rt2571 based wlan module from qcom: LR802UKG, which is wired to an
> internal usb port of my media center pc. The rfkill switch is hardwired to
> make wlan active all the time. This setup is (almost) properly working since
> about three years now. (If i ignore the occasional vendor_request_error
> things)
> When I use kernel 3.4., i get a lot of additional devices reported by the
> kernel - three leds and a rfkill switch which have not been there before. (or
> at least I did not notice them) The wlan device now refuses to go online,
> saying that the kill switch is active, which of course can not be as it is
> working with linux kernel 3.3. Furthermore, the driver reports three leds, but
> my wlan device has only one, so probably a bad eeprom? i dont know...
> Anyway, I noticed, that when I set the radio led to brightness 255, which
> takes a lot of time and gives me some vendor_request_errors, the rfkill switch
> gets turned off (sys/class/rfkill/../hard = 0). Unfortunately, this doesn't
> help to bring the interface online: After doing that I get frequent
> vendor_request_failed messages, even the PC becomes stuck on shutdown.
> (Probably NetworkManager waiting for something...)
> So, what can I do to track down the problem?
Andreas,
Hmmm...well, perhaps you can start by doing a git bisect to narrow-down
the commit that started this problem for you? It may take serveral
iterations, if you can only narrow it down to 3.3 working and 3.4 not
working. But, at least that should point us in the right direction.
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rt73usb not working since linux 3.4
2012-06-26 16:03 rt73usb not working since linux 3.4 Andreas Messer
2012-06-26 17:18 ` John W. Linville
@ 2012-07-11 16:50 ` Olive
2012-07-14 20:28 ` Olive
1 sibling, 1 reply; 9+ messages in thread
From: Olive @ 2012-07-11 16:50 UTC (permalink / raw)
To: linux-wireless
On Tue, 26 Jun 2012 18:03:56 +0200
Andreas Messer <andi@bastelmap.de> wrote:
> Dear all,
>
> updating my pc from linux kernel 3.3 to linux kernel 3.4 broke my
> wlan. I'm using rt2571 based wlan module from qcom: LR802UKG, which
> is wired to an internal usb port of my media center pc. The rfkill
> switch is hardwired to make wlan active all the time. This setup is
> (almost) properly working since about three years now. (If i ignore
> the occasional vendor_request_error things)
> When I use kernel 3.4., i get a lot of additional devices reported by
> the kernel - three leds and a rfkill switch which have not been there
> before. (or at least I did not notice them) The wlan device now
> refuses to go online, saying that the kill switch is active, which of
> course can not be as it is working with linux kernel 3.3.
> Furthermore, the driver reports three leds, but my wlan device has
> only one, so probably a bad eeprom? i dont know... Anyway, I noticed,
> that when I set the radio led to brightness 255, which takes a lot of
> time and gives me some vendor_request_errors, the rfkill switch gets
> turned off (sys/class/rfkill/../hard = 0). Unfortunately, this
> doesn't help to bring the interface online: After doing that I get
> frequent vendor_request_failed messages, even the PC becomes stuck on
> shutdown. (Probably NetworkManager waiting for something...) So, what
> can I do to track down the problem?
>
> Cheers,
> Andreas
I have the same problem with a rt73usb too and with the
kernel 3.4.4-2-ARCH (Archlinux). The solution was to recompile the
kernel with the option CONFIG_RFKILL unset (really unset not as a
module). Then everything works properly (exept you cannot disable it
with rfkill). I did not had this problem before the kernel 3.4 (but I do
not know if rfkill actually works, or if the wlan was always enabled).
Olive
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rt73usb not working since linux 3.4
2012-07-11 16:50 ` Olive
@ 2012-07-14 20:28 ` Olive
0 siblings, 0 replies; 9+ messages in thread
From: Olive @ 2012-07-14 20:28 UTC (permalink / raw)
To: linux-wireless
>
> I have the same problem with a rt73usb too and with the
> kernel 3.4.4-2-ARCH (Archlinux). The solution was to recompile the
> kernel with the option CONFIG_RFKILL unset (really unset not as a
> module). Then everything works properly (exept you cannot disable it
> with rfkill). I did not had this problem before the kernel 3.4 (but I
> do not know if rfkill actually works, or if the wlan was always
> enabled).
The strange thing is that after having disabled the CONFIG_RFKIL , the
wireless works even if I physically put a physical switch in the off
position. Anyway I prefer having a wireless card that works whgen it
shouldn't than vice versa.
Olive
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rt73usb not working since linux 3.4
2012-06-26 17:18 ` John W. Linville
@ 2012-07-24 17:33 ` Andreas Messer
2012-08-23 18:51 ` Andreas Messer
0 siblings, 1 reply; 9+ messages in thread
From: Andreas Messer @ 2012-07-24 17:33 UTC (permalink / raw)
To: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1768 bytes --]
Hello Again,
Am Dienstag, 26. Juni 2012, 13:18:35 schrieb John W. Linville:
> On Tue, Jun 26, 2012 at 06:03:56PM +0200, Andreas Messer wrote:
> > Dear all,
> >
> > updating my pc from linux kernel 3.3 to linux kernel 3.4 broke my wlan.
> > I'm
> > using rt2571 based wlan module from qcom: LR802UKG, which is wired to an
> > internal usb port of my media center pc. The rfkill switch is hardwired to
> > make wlan active all the time. This setup is (almost) properly working
> > since about three years now. (If i ignore the occasional
> > vendor_request_error things)
> > The wlan device now refuses to go
> > online, saying that the kill switch is active, which of course can not be
> > as it is working with linux kernel 3.3.
> > [...]
> > So, what can I do to track down the problem?
>
> Andreas,
>
> Hmmm...well, perhaps you can start by doing a git bisect to narrow-down
> the commit that started this problem for you? It may take serveral
> iterations, if you can only narrow it down to 3.3 working and 3.4 not
> working. But, at least that should point us in the right direction.
>
> John
first of all, sorry for the long delay. After some hours of compiling and
checking, I have found the following things: The problem is introduced
somewhere between v3.3.8 and v3.4, actually the commit 7e29629 already shows
the problem. So range is v3.3.8...7e29629. I thing there is something wrong
with initialization of the chip because of the following behaviour: If I boot
from power-off into 7e29629 the kill switch reports to be in state 1
(/sys/../hard = 1). If I first boot into 3.3.8 and afterwards re-boot into
7e29629, the kill switch reports to be in state 0 and the WLAN connection
builds up properly.
Hope that helps somehow.
Cheers,
Andreas
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rt73usb not working since linux 3.4
2012-07-24 17:33 ` Andreas Messer
@ 2012-08-23 18:51 ` Andreas Messer
2012-08-26 18:22 ` Gertjan van Wingerde
0 siblings, 1 reply; 9+ messages in thread
From: Andreas Messer @ 2012-08-23 18:51 UTC (permalink / raw)
To: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1849 bytes --]
Hey there,
Am Dienstag, 24. Juli 2012, 19:33:34 schrieb Andreas Messer:
> Hello Again,
>
> Am Dienstag, 26. Juni 2012, 13:18:35 schrieb John W. Linville:
> > On Tue, Jun 26, 2012 at 06:03:56PM +0200, Andreas Messer wrote:
> > > Dear all,
> > >
> > > updating my pc from linux kernel 3.3 to linux kernel 3.4 broke my wlan.
I have spent some more time on investigating the cause of the bug and found
the problem. Actually I'm not sure which is the right solution. The problem is
caused by the following points:
1) The rt73 hardware registers are not initialized before bringing the
corresponding network interface up ('ifconfig wlan0 up')
2) Bringing the interface up is not possible because of the kill switch
3) The GPIO input pin for the kill switch is still in 'output mode' (the
default power on value), therefore the register will always read
'killswitch on'
So something like a deadlock. While looking through the code, I have seen,
that the whole rt2xx driver uses here the same concept, that the hardware
register initialization and firmware-download does not happen before the
interface is brought up. Im not sure if that is the right concept, shouldn't
be the hardware initialized properly on loading the driver already? I mean, if
values are read from the hardware in order to e.g. read the kill switch state
shouldn't bethe hardware in a defined state before that? Anyway, it would be
possible to solve this bug easily by only setting up the correct value of the
CSR13 register right after reading the eeprom. For simple testing I have
written the correct gpio mask to CSR13 using the debugfs interface and the
wlan interface immediately was brought up and connected successfully with my
Network.
So which is the right solution? I could make & test a patch for the simple
solution easily.
Cheers
Andreas
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rt73usb not working since linux 3.4
2012-08-23 18:51 ` Andreas Messer
@ 2012-08-26 18:22 ` Gertjan van Wingerde
2012-08-27 16:33 ` Andreas Messer
0 siblings, 1 reply; 9+ messages in thread
From: Gertjan van Wingerde @ 2012-08-26 18:22 UTC (permalink / raw)
To: Andreas Messer; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 2900 bytes --]
Hi Andreas,
On 08/23/12 20:51, Andreas Messer wrote:
> Hey there,
>
> Am Dienstag, 24. Juli 2012, 19:33:34 schrieb Andreas Messer:
>> Hello Again,
>>
>> Am Dienstag, 26. Juni 2012, 13:18:35 schrieb John W. Linville:
>>> On Tue, Jun 26, 2012 at 06:03:56PM +0200, Andreas Messer wrote:
>>>> Dear all,
>>>>
>>>> updating my pc from linux kernel 3.3 to linux kernel 3.4 broke my wlan.
>
> I have spent some more time on investigating the cause of the bug and found
> the problem. Actually I'm not sure which is the right solution. The problem is
> caused by the following points:
>
> 1) The rt73 hardware registers are not initialized before bringing the
> corresponding network interface up ('ifconfig wlan0 up')
>
> 2) Bringing the interface up is not possible because of the kill switch
>
> 3) The GPIO input pin for the kill switch is still in 'output mode' (the
> default power on value), therefore the register will always read
> 'killswitch on'
>
> So something like a deadlock. While looking through the code, I have seen,
> that the whole rt2xx driver uses here the same concept, that the hardware
> register initialization and firmware-download does not happen before the
> interface is brought up. Im not sure if that is the right concept, shouldn't
> be the hardware initialized properly on loading the driver already? I mean, if
> values are read from the hardware in order to e.g. read the kill switch state
> shouldn't bethe hardware in a defined state before that? Anyway, it would be
> possible to solve this bug easily by only setting up the correct value of the
> CSR13 register right after reading the eeprom. For simple testing I have
> written the correct gpio mask to CSR13 using the debugfs interface and the
> wlan interface immediately was brought up and connected successfully with my
> Network.
>
> So which is the right solution? I could make & test a patch for the simple
> solution easily.
>
Thanks for you extensive analysis. You seem to be absolutely right that
we need to properly setup the GPIO direction of the rfkill switch GPIO
pin. And it seems that all rt2x00 drivers (not only rt73usb) are
suffering from this.
The reason why we do most of the initialization at interface up is that
that is the earliest possible time we can get the firmware image from
userspace. A lot of the register programming we have to do for
initialization depend on the firmware being uploaded and running, hence
we initialize most at interface up time.
However, the correct fix IMHO here is to set the GPIO direction of the
rfkill switch GPIO pin to input at driver load time.
Find attached a patch that does this for all the rt2x00 devices. I hope
you are able to test whether this patch fixes the problem for you.
Once you have verified that the patch works, I will submit the changes
as a proper patch series for inclusion upstream.
---
Gertjan
[-- Attachment #2: rt2x00-rfkill-fix.patch --]
[-- Type: text/plain, Size: 21459 bytes --]
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 8b9dbd7..6458ab8 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -205,7 +205,7 @@ static int rt2400pci_rfkill_poll(struct rt2x00_dev *rt2x00dev)
u32 reg;
rt2x00pci_register_read(rt2x00dev, GPIOCSR, ®);
- return rt2x00_get_field32(reg, GPIOCSR_BIT0);
+ return rt2x00_get_field32(reg, GPIOCSR_VAL0);
}
#ifdef CONFIG_RT2X00_LIB_LEDS
@@ -1611,6 +1611,7 @@ static int rt2400pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
static int rt2400pci_probe_hw(struct rt2x00_dev *rt2x00dev)
{
int retval;
+ u32 reg;
/*
* Allocate eeprom data.
@@ -1624,6 +1625,14 @@ static int rt2400pci_probe_hw(struct rt2x00_dev *rt2x00dev)
return retval;
/*
+ * Enable rfkill polling by setting GPIO direction of the
+ * rfkill switch GPIO pin correctly.
+ */
+ rt2x00pci_register_read(rt2x00dev, GPIOCSR, ®);
+ rt2x00_set_field32(®, GPIOCSR_DIR0, 1);
+ rt2x00pci_register_write(rt2x00dev, GPIOCSR, reg);
+
+ /*
* Initialize hw specifications.
*/
retval = rt2400pci_probe_hw_mode(rt2x00dev);
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.h b/drivers/net/wireless/rt2x00/rt2400pci.h
index d3a4a68..e4b07f0 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.h
+++ b/drivers/net/wireless/rt2x00/rt2400pci.h
@@ -660,16 +660,26 @@
/*
* GPIOCSR: GPIO control register.
+ * GPIOCSR_VALx: Actual GPIO pin x value
+ * GPIOCSR_DIRx: GPIO direction: 0 = output; 1 = input
*/
#define GPIOCSR 0x0120
-#define GPIOCSR_BIT0 FIELD32(0x00000001)
-#define GPIOCSR_BIT1 FIELD32(0x00000002)
-#define GPIOCSR_BIT2 FIELD32(0x00000004)
-#define GPIOCSR_BIT3 FIELD32(0x00000008)
-#define GPIOCSR_BIT4 FIELD32(0x00000010)
-#define GPIOCSR_BIT5 FIELD32(0x00000020)
-#define GPIOCSR_BIT6 FIELD32(0x00000040)
-#define GPIOCSR_BIT7 FIELD32(0x00000080)
+#define GPIOCSR_VAL0 FIELD32(0x00000001)
+#define GPIOCSR_VAL1 FIELD32(0x00000002)
+#define GPIOCSR_VAL2 FIELD32(0x00000004)
+#define GPIOCSR_VAL3 FIELD32(0x00000008)
+#define GPIOCSR_VAL4 FIELD32(0x00000010)
+#define GPIOCSR_VAL5 FIELD32(0x00000020)
+#define GPIOCSR_VAL6 FIELD32(0x00000040)
+#define GPIOCSR_VAL7 FIELD32(0x00000080)
+#define GPIOCSR_DIR0 FIELD32(0x00000100)
+#define GPIOCSR_DIR1 FIELD32(0x00000200)
+#define GPIOCSR_DIR2 FIELD32(0x00000400)
+#define GPIOCSR_DIR3 FIELD32(0x00000800)
+#define GPIOCSR_DIR4 FIELD32(0x00001000)
+#define GPIOCSR_DIR5 FIELD32(0x00002000)
+#define GPIOCSR_DIR6 FIELD32(0x00004000)
+#define GPIOCSR_DIR7 FIELD32(0x00008000)
/*
* BBPPCSR: BBP Pin control register.
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index d2cf8a4..68bca14 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -205,7 +205,7 @@ static int rt2500pci_rfkill_poll(struct rt2x00_dev *rt2x00dev)
u32 reg;
rt2x00pci_register_read(rt2x00dev, GPIOCSR, ®);
- return rt2x00_get_field32(reg, GPIOCSR_BIT0);
+ return rt2x00_get_field32(reg, GPIOCSR_VAL0);
}
#ifdef CONFIG_RT2X00_LIB_LEDS
@@ -1929,6 +1929,7 @@ static int rt2500pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
static int rt2500pci_probe_hw(struct rt2x00_dev *rt2x00dev)
{
int retval;
+ u32 reg;
/*
* Allocate eeprom data.
@@ -1942,6 +1943,14 @@ static int rt2500pci_probe_hw(struct rt2x00_dev *rt2x00dev)
return retval;
/*
+ * Enable rfkill polling by setting GPIO direction of the
+ * rfkill switch GPIO pin correctly.
+ */
+ rt2x00pci_register_read(rt2x00dev, GPIOCSR, ®);
+ rt2x00_set_field32(®, GPIOCSR_DIR0, 1);
+ rt2x00pci_register_write(rt2x00dev, GPIOCSR, reg);
+
+ /*
* Initialize hw specifications.
*/
retval = rt2500pci_probe_hw_mode(rt2x00dev);
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.h b/drivers/net/wireless/rt2x00/rt2500pci.h
index 2aad7ba..9c10068 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.h
+++ b/drivers/net/wireless/rt2x00/rt2500pci.h
@@ -789,16 +789,18 @@
/*
* GPIOCSR: GPIO control register.
+ * GPIOCSR_VALx: GPIO value
+ * GPIOCSR_DIRx: GPIO direction: 0 = output; 1 = input
*/
#define GPIOCSR 0x0120
-#define GPIOCSR_BIT0 FIELD32(0x00000001)
-#define GPIOCSR_BIT1 FIELD32(0x00000002)
-#define GPIOCSR_BIT2 FIELD32(0x00000004)
-#define GPIOCSR_BIT3 FIELD32(0x00000008)
-#define GPIOCSR_BIT4 FIELD32(0x00000010)
-#define GPIOCSR_BIT5 FIELD32(0x00000020)
-#define GPIOCSR_BIT6 FIELD32(0x00000040)
-#define GPIOCSR_BIT7 FIELD32(0x00000080)
+#define GPIOCSR_VAL0 FIELD32(0x00000001)
+#define GPIOCSR_VAL1 FIELD32(0x00000002)
+#define GPIOCSR_VAL2 FIELD32(0x00000004)
+#define GPIOCSR_VAL3 FIELD32(0x00000008)
+#define GPIOCSR_VAL4 FIELD32(0x00000010)
+#define GPIOCSR_VAL5 FIELD32(0x00000020)
+#define GPIOCSR_VAL6 FIELD32(0x00000040)
+#define GPIOCSR_VAL7 FIELD32(0x00000080)
#define GPIOCSR_DIR0 FIELD32(0x00000100)
#define GPIOCSR_DIR1 FIELD32(0x00000200)
#define GPIOCSR_DIR2 FIELD32(0x00000400)
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 3aae36b..f95b551 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -283,7 +283,7 @@ static int rt2500usb_rfkill_poll(struct rt2x00_dev *rt2x00dev)
u16 reg;
rt2500usb_register_read(rt2x00dev, MAC_CSR19, ®);
- return rt2x00_get_field32(reg, MAC_CSR19_BIT7);
+ return rt2x00_get_field16(reg, MAC_CSR19_VAL7);
}
#ifdef CONFIG_RT2X00_LIB_LEDS
@@ -1768,6 +1768,7 @@ static int rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
static int rt2500usb_probe_hw(struct rt2x00_dev *rt2x00dev)
{
int retval;
+ u16 reg;
/*
* Allocate eeprom data.
@@ -1781,6 +1782,14 @@ static int rt2500usb_probe_hw(struct rt2x00_dev *rt2x00dev)
return retval;
/*
+ * Enable rfkill polling by setting GPIO direction of the
+ * rfkill switch GPIO pin correctly.
+ */
+ rt2500usb_register_read(rt2x00dev, MAC_CSR19, ®);
+ rt2x00_set_field16(®, MAC_CSR19_DIR0, 0);
+ rt2500usb_register_write(rt2x00dev, MAC_CSR19, reg);
+
+ /*
* Initialize hw specifications.
*/
retval = rt2500usb_probe_hw_mode(rt2x00dev);
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.h b/drivers/net/wireless/rt2x00/rt2500usb.h
index b493306..ef7b420 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.h
+++ b/drivers/net/wireless/rt2x00/rt2500usb.h
@@ -187,16 +187,26 @@
/*
* MAC_CSR19: GPIO control register.
+ * MAC_CSR19_VALx: GPIO value
+ * MAC_CSR19_DIRx: GPIO direction: 0 = input; 1 = output
*/
#define MAC_CSR19 0x0426
-#define MAC_CSR19_BIT0 FIELD32(0x0001)
-#define MAC_CSR19_BIT1 FIELD32(0x0002)
-#define MAC_CSR19_BIT2 FIELD32(0x0004)
-#define MAC_CSR19_BIT3 FIELD32(0x0008)
-#define MAC_CSR19_BIT4 FIELD32(0x0010)
-#define MAC_CSR19_BIT5 FIELD32(0x0020)
-#define MAC_CSR19_BIT6 FIELD32(0x0040)
-#define MAC_CSR19_BIT7 FIELD32(0x0080)
+#define MAC_CSR19_VAL0 FIELD16(0x0001)
+#define MAC_CSR19_VAL1 FIELD16(0x0002)
+#define MAC_CSR19_VAL2 FIELD16(0x0004)
+#define MAC_CSR19_VAL3 FIELD16(0x0008)
+#define MAC_CSR19_VAL4 FIELD16(0x0010)
+#define MAC_CSR19_VAL5 FIELD16(0x0020)
+#define MAC_CSR19_VAL6 FIELD16(0x0040)
+#define MAC_CSR19_VAL7 FIELD16(0x0080)
+#define MAC_CSR19_DIR0 FIELD16(0x0100)
+#define MAC_CSR19_DIR1 FIELD16(0x0200)
+#define MAC_CSR19_DIR2 FIELD16(0x0400)
+#define MAC_CSR19_DIR3 FIELD16(0x0800)
+#define MAC_CSR19_DIR4 FIELD32(0x1000)
+#define MAC_CSR19_DIR5 FIELD16(0x2000)
+#define MAC_CSR19_DIR6 FIELD16(0x4000)
+#define MAC_CSR19_DIR7 FIELD16(0x8000)
/*
* MAC_CSR20: LED control register.
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index e252e9b..e13916f 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -439,26 +439,33 @@
#define WMM_TXOP1_CFG_AC3TXOP FIELD32(0xffff0000)
/*
- * GPIO_CTRL_CFG:
- * GPIOD: GPIO direction, 0: Output, 1: Input
- */
-#define GPIO_CTRL_CFG 0x0228
-#define GPIO_CTRL_CFG_BIT0 FIELD32(0x00000001)
-#define GPIO_CTRL_CFG_BIT1 FIELD32(0x00000002)
-#define GPIO_CTRL_CFG_BIT2 FIELD32(0x00000004)
-#define GPIO_CTRL_CFG_BIT3 FIELD32(0x00000008)
-#define GPIO_CTRL_CFG_BIT4 FIELD32(0x00000010)
-#define GPIO_CTRL_CFG_BIT5 FIELD32(0x00000020)
-#define GPIO_CTRL_CFG_BIT6 FIELD32(0x00000040)
-#define GPIO_CTRL_CFG_BIT7 FIELD32(0x00000080)
-#define GPIO_CTRL_CFG_GPIOD_BIT0 FIELD32(0x00000100)
-#define GPIO_CTRL_CFG_GPIOD_BIT1 FIELD32(0x00000200)
-#define GPIO_CTRL_CFG_GPIOD_BIT2 FIELD32(0x00000400)
-#define GPIO_CTRL_CFG_GPIOD_BIT3 FIELD32(0x00000800)
-#define GPIO_CTRL_CFG_GPIOD_BIT4 FIELD32(0x00001000)
-#define GPIO_CTRL_CFG_GPIOD_BIT5 FIELD32(0x00002000)
-#define GPIO_CTRL_CFG_GPIOD_BIT6 FIELD32(0x00004000)
-#define GPIO_CTRL_CFG_GPIOD_BIT7 FIELD32(0x00008000)
+ * GPIO_CTRL:
+ * GPIO_CTRL_VALx: GPIO value
+ * GPIO_CTRL_DIRx: GPIO direction: 0 = output; 1 = input
+ */
+#define GPIO_CTRL 0x0228
+#define GPIO_CTRL_VAL0 FIELD32(0x00000001)
+#define GPIO_CTRL_VAL1 FIELD32(0x00000002)
+#define GPIO_CTRL_VAL2 FIELD32(0x00000004)
+#define GPIO_CTRL_VAL3 FIELD32(0x00000008)
+#define GPIO_CTRL_VAL4 FIELD32(0x00000010)
+#define GPIO_CTRL_VAL5 FIELD32(0x00000020)
+#define GPIO_CTRL_VAL6 FIELD32(0x00000040)
+#define GPIO_CTRL_VAL7 FIELD32(0x00000080)
+#define GPIO_CTRL_DIR0 FIELD32(0x00000100)
+#define GPIO_CTRL_DIR1 FIELD32(0x00000200)
+#define GPIO_CTRL_DIR2 FIELD32(0x00000400)
+#define GPIO_CTRL_DIR3 FIELD32(0x00000800)
+#define GPIO_CTRL_DIR4 FIELD32(0x00001000)
+#define GPIO_CTRL_DIR5 FIELD32(0x00002000)
+#define GPIO_CTRL_DIR6 FIELD32(0x00004000)
+#define GPIO_CTRL_DIR7 FIELD32(0x00008000)
+#define GPIO_CTRL_VAL8 FIELD32(0x00010000)
+#define GPIO_CTRL_VAL9 FIELD32(0x00020000)
+#define GPIO_CTRL_VAL10 FIELD32(0x00040000)
+#define GPIO_CTRL_DIR8 FIELD32(0x01000000)
+#define GPIO_CTRL_DIR9 FIELD32(0x02000000)
+#define GPIO_CTRL_DIR10 FIELD32(0x04000000)
/*
* MCU_CMD_CFG
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index cb8c2ac..c3cae1d 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -923,8 +923,8 @@ int rt2800_rfkill_poll(struct rt2x00_dev *rt2x00dev)
rt2800_register_read(rt2x00dev, WLAN_FUN_CTRL, ®);
return rt2x00_get_field32(reg, WLAN_GPIO_IN_BIT0);
} else {
- rt2800_register_read(rt2x00dev, GPIO_CTRL_CFG, ®);
- return rt2x00_get_field32(reg, GPIO_CTRL_CFG_BIT2);
+ rt2800_register_read(rt2x00dev, GPIO_CTRL, ®);
+ return rt2x00_get_field32(reg, GPIO_CTRL_VAL2);
}
}
EXPORT_SYMBOL_GPL(rt2800_rfkill_poll);
@@ -1570,10 +1570,10 @@ static void rt2800_set_ant_diversity(struct rt2x00_dev *rt2x00dev,
rt2800_mcu_request(rt2x00dev, MCU_ANT_SELECT, 0xff,
eesk_pin, 0);
- rt2800_register_read(rt2x00dev, GPIO_CTRL_CFG, ®);
- rt2x00_set_field32(®, GPIO_CTRL_CFG_GPIOD_BIT3, 0);
- rt2x00_set_field32(®, GPIO_CTRL_CFG_BIT3, gpio_bit3);
- rt2800_register_write(rt2x00dev, GPIO_CTRL_CFG, reg);
+ rt2800_register_read(rt2x00dev, GPIO_CTRL, ®);
+ rt2x00_set_field32(®, GPIO_CTRL_DIR3, 0);
+ rt2x00_set_field32(®, GPIO_CTRL_VAL3, gpio_bit3);
+ rt2800_register_write(rt2x00dev, GPIO_CTRL, reg);
}
void rt2800_config_ant(struct rt2x00_dev *rt2x00dev, struct antenna_setup *ant)
@@ -1995,13 +1995,13 @@ static void rt2800_config_channel_rf3052(struct rt2x00_dev *rt2x00dev,
rt2800_rfcsr_write(rt2x00dev, 29, 0x9f);
}
- rt2800_register_read(rt2x00dev, GPIO_CTRL_CFG, ®);
- rt2x00_set_field32(®, GPIO_CTRL_CFG_GPIOD_BIT7, 0);
+ rt2800_register_read(rt2x00dev, GPIO_CTRL, ®);
+ rt2x00_set_field32(®, GPIO_CTRL_DIR7, 0);
if (rf->channel <= 14)
- rt2x00_set_field32(®, GPIO_CTRL_CFG_BIT7, 1);
+ rt2x00_set_field32(®, GPIO_CTRL_VAL7, 1);
else
- rt2x00_set_field32(®, GPIO_CTRL_CFG_BIT7, 0);
- rt2800_register_write(rt2x00dev, GPIO_CTRL_CFG, reg);
+ rt2x00_set_field32(®, GPIO_CTRL_VAL7, 0);
+ rt2800_register_write(rt2x00dev, GPIO_CTRL, reg);
rt2800_rfcsr_read(rt2x00dev, 7, &rfcsr);
rt2x00_set_field8(&rfcsr, RFCSR7_RF_TUNING, 1);
@@ -3587,16 +3587,16 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
if (test_bit(CAPABILITY_BT_COEXIST, &rt2x00dev->cap_flags)) {
u32 reg;
- rt2800_register_read(rt2x00dev, GPIO_CTRL_CFG, ®);
- rt2x00_set_field32(®, GPIO_CTRL_CFG_GPIOD_BIT3, 0);
- rt2x00_set_field32(®, GPIO_CTRL_CFG_GPIOD_BIT6, 0);
- rt2x00_set_field32(®, GPIO_CTRL_CFG_BIT3, 0);
- rt2x00_set_field32(®, GPIO_CTRL_CFG_BIT6, 0);
+ rt2800_register_read(rt2x00dev, GPIO_CTRL, ®);
+ rt2x00_set_field32(®, GPIO_CTRL_DIR3, 0);
+ rt2x00_set_field32(®, GPIO_CTRL_DIR6, 0);
+ rt2x00_set_field32(®, GPIO_CTRL_VAL3, 0);
+ rt2x00_set_field32(®, GPIO_CTRL_VAL6, 0);
if (ant == 0)
- rt2x00_set_field32(®, GPIO_CTRL_CFG_BIT3, 1);
+ rt2x00_set_field32(®, GPIO_CTRL_VAL3, 1);
else if (ant == 1)
- rt2x00_set_field32(®, GPIO_CTRL_CFG_BIT6, 1);
- rt2800_register_write(rt2x00dev, GPIO_CTRL_CFG, reg);
+ rt2x00_set_field32(®, GPIO_CTRL_VAL6, 1);
+ rt2800_register_write(rt2x00dev, GPIO_CTRL, reg);
}
/* This chip has hardware antenna diversity*/
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index 98aa426..0965540 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -983,6 +983,7 @@ static int rt2800pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev)
{
int retval;
+ u32 reg;
/*
* Allocate eeprom data.
@@ -996,6 +997,14 @@ static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev)
return retval;
/*
+ * Enable rfkill polling by setting GPIO direction of the
+ * rfkill switch GPIO pin correctly.
+ */
+ rt2x00pci_register_read(rt2x00dev, GPIO_CTRL, ®);
+ rt2x00_set_field32(®, GPIO_CTRL_DIR2, 1);
+ rt2x00pci_register_write(rt2x00dev, GPIO_CTRL, reg);
+
+ /*
* Initialize hw specifications.
*/
retval = rt2800_probe_hw_mode(rt2x00dev);
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 6cf3365..f545d2f 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -736,6 +736,7 @@ static int rt2800usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev)
{
int retval;
+ u32 reg;
/*
* Allocate eeprom data.
@@ -749,6 +750,14 @@ static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev)
return retval;
/*
+ * Enable rfkill polling by setting GPIO direction of the
+ * rfkill switch GPIO pin correctly.
+ */
+ rt2x00usb_register_read(rt2x00dev, GPIO_CTRL, ®);
+ rt2x00_set_field32(®, GPIO_CTRL_DIR2, 1);
+ rt2x00usb_register_write(rt2x00dev, GPIO_CTRL, reg);
+
+ /*
* Initialize hw specifications.
*/
retval = rt2800_probe_hw_mode(rt2x00dev);
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 3f7bc5c..2673e05 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -243,7 +243,7 @@ static int rt61pci_rfkill_poll(struct rt2x00_dev *rt2x00dev)
u32 reg;
rt2x00pci_register_read(rt2x00dev, MAC_CSR13, ®);
- return rt2x00_get_field32(reg, MAC_CSR13_BIT5);
+ return rt2x00_get_field32(reg, MAC_CSR13_VAL5);
}
#ifdef CONFIG_RT2X00_LIB_LEDS
@@ -715,11 +715,11 @@ static void rt61pci_config_antenna_2529_rx(struct rt2x00_dev *rt2x00dev,
rt2x00pci_register_read(rt2x00dev, MAC_CSR13, ®);
- rt2x00_set_field32(®, MAC_CSR13_BIT4, p1);
- rt2x00_set_field32(®, MAC_CSR13_BIT12, 0);
+ rt2x00_set_field32(®, MAC_CSR13_DIR4, 0);
+ rt2x00_set_field32(®, MAC_CSR13_VAL4, p1);
- rt2x00_set_field32(®, MAC_CSR13_BIT3, !p2);
- rt2x00_set_field32(®, MAC_CSR13_BIT11, 0);
+ rt2x00_set_field32(®, MAC_CSR13_DIR3, 0);
+ rt2x00_set_field32(®, MAC_CSR13_VAL3, !p2);
rt2x00pci_register_write(rt2x00dev, MAC_CSR13, reg);
}
@@ -2832,6 +2832,7 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
static int rt61pci_probe_hw(struct rt2x00_dev *rt2x00dev)
{
int retval;
+ u32 reg;
/*
* Disable power saving.
@@ -2850,6 +2851,14 @@ static int rt61pci_probe_hw(struct rt2x00_dev *rt2x00dev)
return retval;
/*
+ * Enable rfkill polling by setting GPIO direction of the
+ * rfkill switch GPIO pin correctly.
+ */
+ rt2x00pci_register_read(rt2x00dev, MAC_CSR13, ®);
+ rt2x00_set_field32(®, MAC_CSR13_DIR5, 1);
+ rt2x00pci_register_write(rt2x00dev, MAC_CSR13, reg);
+
+ /*
* Initialize hw specifications.
*/
retval = rt61pci_probe_hw_mode(rt2x00dev);
diff --git a/drivers/net/wireless/rt2x00/rt61pci.h b/drivers/net/wireless/rt2x00/rt61pci.h
index e3cd6db..9bc6b60 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.h
+++ b/drivers/net/wireless/rt2x00/rt61pci.h
@@ -357,21 +357,22 @@ struct hw_pairwise_ta_entry {
/*
* MAC_CSR13: GPIO.
+ * MAC_CSR13_VALx: GPIO value
+ * MAC_CSR13_DIRx: GPIO direction: 0 = output; 1 = input
*/
#define MAC_CSR13 0x3034
-#define MAC_CSR13_BIT0 FIELD32(0x00000001)
-#define MAC_CSR13_BIT1 FIELD32(0x00000002)
-#define MAC_CSR13_BIT2 FIELD32(0x00000004)
-#define MAC_CSR13_BIT3 FIELD32(0x00000008)
-#define MAC_CSR13_BIT4 FIELD32(0x00000010)
-#define MAC_CSR13_BIT5 FIELD32(0x00000020)
-#define MAC_CSR13_BIT6 FIELD32(0x00000040)
-#define MAC_CSR13_BIT7 FIELD32(0x00000080)
-#define MAC_CSR13_BIT8 FIELD32(0x00000100)
-#define MAC_CSR13_BIT9 FIELD32(0x00000200)
-#define MAC_CSR13_BIT10 FIELD32(0x00000400)
-#define MAC_CSR13_BIT11 FIELD32(0x00000800)
-#define MAC_CSR13_BIT12 FIELD32(0x00001000)
+#define MAC_CSR13_VAL0 FIELD32(0x00000001)
+#define MAC_CSR13_VAL1 FIELD32(0x00000002)
+#define MAC_CSR13_VAL2 FIELD32(0x00000004)
+#define MAC_CSR13_VAL3 FIELD32(0x00000008)
+#define MAC_CSR13_VAL4 FIELD32(0x00000010)
+#define MAC_CSR13_VAL5 FIELD32(0x00000020)
+#define MAC_CSR13_DIR0 FIELD32(0x00000100)
+#define MAC_CSR13_DIR1 FIELD32(0x00000200)
+#define MAC_CSR13_DIR2 FIELD32(0x00000400)
+#define MAC_CSR13_DIR3 FIELD32(0x00000800)
+#define MAC_CSR13_DIR4 FIELD32(0x00001000)
+#define MAC_CSR13_DIR5 FIELD32(0x00002000)
/*
* MAC_CSR14: LED control register.
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index ba6e434..cfa9f37 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -189,7 +189,7 @@ static int rt73usb_rfkill_poll(struct rt2x00_dev *rt2x00dev)
u32 reg;
rt2x00usb_register_read(rt2x00dev, MAC_CSR13, ®);
- return rt2x00_get_field32(reg, MAC_CSR13_BIT7);
+ return rt2x00_get_field32(reg, MAC_CSR13_VAL7);
}
#ifdef CONFIG_RT2X00_LIB_LEDS
@@ -2177,6 +2177,7 @@ static int rt73usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
static int rt73usb_probe_hw(struct rt2x00_dev *rt2x00dev)
{
int retval;
+ u32 reg;
/*
* Allocate eeprom data.
@@ -2190,6 +2191,14 @@ static int rt73usb_probe_hw(struct rt2x00_dev *rt2x00dev)
return retval;
/*
+ * Enable rfkill polling by setting GPIO direction of the
+ * rfkill switch GPIO pin correctly.
+ */
+ rt2x00usb_register_read(rt2x00dev, MAC_CSR13, ®);
+ rt2x00_set_field32(®, MAC_CSR13_DIR7, 0);
+ rt2x00usb_register_write(rt2x00dev, MAC_CSR13, reg);
+
+ /*
* Initialize hw specifications.
*/
retval = rt73usb_probe_hw_mode(rt2x00dev);
diff --git a/drivers/net/wireless/rt2x00/rt73usb.h b/drivers/net/wireless/rt2x00/rt73usb.h
index 9f6b470..7577e0b 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.h
+++ b/drivers/net/wireless/rt2x00/rt73usb.h
@@ -267,21 +267,26 @@ struct hw_pairwise_ta_entry {
/*
* MAC_CSR13: GPIO.
+ * MAC_CSR13_VALx: GPIO value
+ * MAC_CSR13_DIRx: GPIO direction: 0 = input; 1 = output
*/
#define MAC_CSR13 0x3034
-#define MAC_CSR13_BIT0 FIELD32(0x00000001)
-#define MAC_CSR13_BIT1 FIELD32(0x00000002)
-#define MAC_CSR13_BIT2 FIELD32(0x00000004)
-#define MAC_CSR13_BIT3 FIELD32(0x00000008)
-#define MAC_CSR13_BIT4 FIELD32(0x00000010)
-#define MAC_CSR13_BIT5 FIELD32(0x00000020)
-#define MAC_CSR13_BIT6 FIELD32(0x00000040)
-#define MAC_CSR13_BIT7 FIELD32(0x00000080)
-#define MAC_CSR13_BIT8 FIELD32(0x00000100)
-#define MAC_CSR13_BIT9 FIELD32(0x00000200)
-#define MAC_CSR13_BIT10 FIELD32(0x00000400)
-#define MAC_CSR13_BIT11 FIELD32(0x00000800)
-#define MAC_CSR13_BIT12 FIELD32(0x00001000)
+#define MAC_CSR13_VAL0 FIELD32(0x00000001)
+#define MAC_CSR13_VAL1 FIELD32(0x00000002)
+#define MAC_CSR13_VAL2 FIELD32(0x00000004)
+#define MAC_CSR13_VAL3 FIELD32(0x00000008)
+#define MAC_CSR13_VAL4 FIELD32(0x00000010)
+#define MAC_CSR13_VAL5 FIELD32(0x00000020)
+#define MAC_CSR13_VAL6 FIELD32(0x00000040)
+#define MAC_CSR13_VAL7 FIELD32(0x00000080)
+#define MAC_CSR13_DIR0 FIELD32(0x00000100)
+#define MAC_CSR13_DIR1 FIELD32(0x00000200)
+#define MAC_CSR13_DIR2 FIELD32(0x00000400)
+#define MAC_CSR13_DIR3 FIELD32(0x00000800)
+#define MAC_CSR13_DIR4 FIELD32(0x00001000)
+#define MAC_CSR13_DIR5 FIELD32(0x00002000)
+#define MAC_CSR13_DIR6 FIELD32(0x00004000)
+#define MAC_CSR13_DIR7 FIELD32(0x00008000)
/*
* MAC_CSR14: LED control register.
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: rt73usb not working since linux 3.4
2012-08-26 18:22 ` Gertjan van Wingerde
@ 2012-08-27 16:33 ` Andreas Messer
2012-08-27 17:26 ` Gertjan van Wingerde
0 siblings, 1 reply; 9+ messages in thread
From: Andreas Messer @ 2012-08-27 16:33 UTC (permalink / raw)
To: Gertjan van Wingerde; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1766 bytes --]
Hey Gertjan,
Am Sonntag, 26. August 2012, 20:22:56 schrieb Gertjan van Wingerde:
> Hi Andreas,
>
> On 08/23/12 20:51, Andreas Messer wrote:
> > Hey there,
> >
> > Am Dienstag, 24. Juli 2012, 19:33:34 schrieb Andreas Messer:
> >> Hello Again,
> >>
> >> Am Dienstag, 26. Juni 2012, 13:18:35 schrieb John W. Linville:
> >>> On Tue, Jun 26, 2012 at 06:03:56PM +0200, Andreas Messer wrote:
> >>>> Dear all,
> >>>>
> >>>> updating my pc from linux kernel 3.3 to linux kernel 3.4 broke my wlan.
> >
> > I have spent some more time on investigating the cause of the bug and
> > found
> > the problem. Actually I'm not sure which is the right solution. The
> > problem is caused by the following points:
> >
> > 1) The rt73 hardware registers are not initialized before bringing the
> >
> > corresponding network interface up ('ifconfig wlan0 up')
> >
> > 2) Bringing the interface up is not possible because of the kill switch
> >
> > 3) The GPIO input pin for the kill switch is still in 'output mode' (the
> >
> > default power on value), therefore the register will always read
> > 'killswitch on'
> >
> > [...]
> [...]
> The reason why we do most of the initialization at interface up is that
> that is the earliest possible time we can get the firmware image from
> userspace. A lot of the register programming we have to do for
> initialization depend on the firmware being uploaded and running, hence
> we initialize most at interface up time.
> [...]
Thanks for that explanation. Didn't know that about the firmware.
> Find attached a patch that does this for all the rt2x00 devices. I hope
> you are able to test whether this patch fixes the problem for you.
Yep, the patch works fine for me. (Tested on latest git snapshot)
Cheers
Andreas
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rt73usb not working since linux 3.4
2012-08-27 16:33 ` Andreas Messer
@ 2012-08-27 17:26 ` Gertjan van Wingerde
0 siblings, 0 replies; 9+ messages in thread
From: Gertjan van Wingerde @ 2012-08-27 17:26 UTC (permalink / raw)
To: Andreas Messer; +Cc: linux-wireless
Hi Andreas,
On 27 aug. 2012, at 18:33, Andreas Messer <andi@bastelmap.de> wrote:
> Hey Gertjan,
>
> Am Sonntag, 26. August 2012, 20:22:56 schrieb Gertjan van Wingerde:
>> Hi Andreas,
>>
>> On 08/23/12 20:51, Andreas Messer wrote:
>>> Hey there,
>>>
>>> Am Dienstag, 24. Juli 2012, 19:33:34 schrieb Andreas Messer:
>>>> Hello Again,
>>>>
>>>> Am Dienstag, 26. Juni 2012, 13:18:35 schrieb John W. Linville:
>>>>> On Tue, Jun 26, 2012 at 06:03:56PM +0200, Andreas Messer wrote:
>>>>>> Dear all,
>>>>>>
>>>>>> updating my pc from linux kernel 3.3 to linux kernel 3.4 broke my wlan.
>>>
>>> I have spent some more time on investigating the cause of the bug and
>>> found
>>> the problem. Actually I'm not sure which is the right solution. The
>>> problem is caused by the following points:
>>>
>>> 1) The rt73 hardware registers are not initialized before bringing the
>>>
>>> corresponding network interface up ('ifconfig wlan0 up')
>>>
>>> 2) Bringing the interface up is not possible because of the kill switch
>>>
>>> 3) The GPIO input pin for the kill switch is still in 'output mode' (the
>>>
>>> default power on value), therefore the register will always read
>>> 'killswitch on'
>>>
>>> [...]
>> [...]
>> The reason why we do most of the initialization at interface up is that
>> that is the earliest possible time we can get the firmware image from
>> userspace. A lot of the register programming we have to do for
>> initialization depend on the firmware being uploaded and running, hence
>> we initialize most at interface up time.
>> [...]
>
> Thanks for that explanation. Didn't know that about the firmware.
>
>> Find attached a patch that does this for all the rt2x00 devices. I hope
>> you are able to test whether this patch fixes the problem for you.
>
> Yep, the patch works fine for me. (Tested on latest git snapshot)
>
Thanks for testing. I'll submit the patch-set upstream later this week.
---
Gertjan
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-08-27 17:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-26 16:03 rt73usb not working since linux 3.4 Andreas Messer
2012-06-26 17:18 ` John W. Linville
2012-07-24 17:33 ` Andreas Messer
2012-08-23 18:51 ` Andreas Messer
2012-08-26 18:22 ` Gertjan van Wingerde
2012-08-27 16:33 ` Andreas Messer
2012-08-27 17:26 ` Gertjan van Wingerde
2012-07-11 16:50 ` Olive
2012-07-14 20:28 ` Olive
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.