Can't bring up rt2570 interface

Live forum:


04-01-2008 04:06:37

I've been using the rt2570 driver for quite a while successfully, currently on 2.6.22.

I tried using it on 2.6.24, but although it builds and installs correctly, I don't seem to be able to bring the interface up! The module appears to load correctly, detects the device at least, but "ifconfig rausb0 up" yields the favorite "SIOCSIFFLAGS Invalid argument". I can't scan or anything until bringing the interface up either.

Any ideas? Did something change in the kernel that breaks the legacy driver? Even with the module built as debug and loaded with debug=31 I don't get additional debug entries (after the initiial module loading).



04-01-2008 19:05:59

What does the configuration for your interface look like?


04-01-2008 19:13:27

The interface isn't configured at that point. I'm manually insmod'ing the driver, it shows up in `ip link` and I then try to bring the interface up to do a scan as a sanity check which is when it fails (on the `ifconfig rausb0 up`). I don't believe I have to do any other configuration, I haven't in the past at least, please correct me if I'm wrong or that has changed.


04-01-2008 19:26:11

Does "dmesg" report anything?
What does "ifconfig -a" and "iwconfig" report after you insmod'ed the driver?


05-01-2008 05:22:06

Here is the output requested - everything looks pretty normal except that the MAC address displayed is all zero which is quite curious, and not the behavior I get under 2.6.22.

relevant dmesg (on loading)
rt2570: enter rtusb init( )
idVendor = 0x1044, idProduct = 0x8007
rt2570: usbdevice->name rausb0
rt2570: BulkOutMaxPacketSize 64
rt2570: INIT bRadio=1
usbcore: registered new interface driver rt2570

ip link
5: rausb0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff

ifconfig -a
rausb0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

rausb0 RT2500USB WLAN
Link Quality:0 Signal level:136 Noise level:113
Rx invalid nwid:0 invalid crypt:0 invalid misc:0


06-01-2008 16:08:01

Okay, more information and better direction.

I was having the trouble under Ubuntu with their 2.6.24 kernel, but working fine under Debian with a 2.6.22 kernel which is what made me think it was kernel releated. Last night I upgraded from Debian etch to sid and this morning it broke in exactly the same way while running the exact same 2.6.22 kernel.

I checked and the symptom was the same that I noticed above - an all-zero LLADDR. I pulled the actual address from the udev persistent-net file (first time that's actually been useful instead of a hindrance) and set it manually. After that it let me use the interface exactly as expected.

I'm going to go through and see what could have caused this, but it will likely be a needle/haystack search. Any pointers or likely culprits to help narrow the search?


06-01-2008 16:40:16

The issue is because of a broken initialization.


06-01-2008 21:22:59

Hi Guys,

I can't produce the problem with Debian etch and kernel 2.6.23. Can somebody do this stuff under script so I can see *exactly* what messages appear?

If you can also compile with debug enabled and run with debug=31, then attach a gzipped copy of the debug log, that would help a lot, too.



07-01-2008 15:46:08

Again, the problem doesn't appear to be the kernel version, but some system library (what provide the support for MAC address things, libc or something related?).

As I indicated in my message, it worked fine under Debian etch, but not once I upgraded to sid (not sure about lenny, I assume it will have the same problem of not working).

IvD - you say it's a "broken initialization" - I'm assuming you're talking about initializing the interface once the driver is loaded. What component does this - I'm not sure where to direct the problem, is it the driver, or some system library that needs a bug filed against it.

Woody Suwalski

09-01-2008 20:40:21

Not exactly (running on Etch, with the rt73 driver)

I made a test with 2.6.21 kernel - can ifconfig wlan0 up

With 2.6.24 - no go.... HW address is all NULL, in debug I can see
loading firmware OK == (status 0, loaded 2048)
and then keeps re-trying
rt73_get_ether_stats --->
So nothing really useful - ifconfig up does not produce any reaction...

The device works OK with rt73usb driver from 2.6.24-rc7 kernel....


10-01-2008 02:54:18

I retested with Debian sid, using the kernel from etch (2.6.18-5-k7) and still get a null MAC address, which is why I'm asserting that the kernel version doesn't indepently dictate the results.... Still not sure where to look next though.

Woody Suwalski

14-01-2008 21:18:45

After a bit of digging - it looks that USB subsystem has now different logic on 2.6.24.

On 2.6.21 (where drivers seems OK) I see
7>[363421.940000] rt73 2048 bytes written to device.
<7>[363421.940000] rt73 wmsRTUSBFirmwareRun()=0x0.
<7>[363421.940000] rt73 wmsRTUSBSetLED()=0x0.
<7>[363421.940000] rt73 <-- LoadFirmware (status 0, loaded 2048)
<6>[363421.940000] usbcore registered new interface driver rt73
<7>[363422.100000] rt73 rt73_get_wireless_stats --->
<7>[363424.680000] rt73 rt73_get_ether_stats --->
<7>[363425.110000] rt73 rt73_get_wireless_stats --->
<7>[363425.250000] rt73 rt73_get_ether_stats --->
<7>[363425.280000] rt73 rt73_get_wireless_stats --->
<7>[363428.120000] rt73 rt73_get_wireless_stats --->
<7>[363430.250000] rt73 rt73_get_ether_stats --->
<7>[363430.280000] rt73 rt73_get_wireless_stats --->
<7>[363431.130000] rt73 rt73_get_wireless_stats --->
<7>[363434.140000] rt73 rt73_get_wireless_stats --->
<7>[363435.250000] rt73 rt73_get_ether_stats --->
<7>[363435.280000] rt73 rt73_get_wireless_stats --->
<7>[363437.150000] rt73 rt73_get_wireless_stats --->
<4>[363437.910000] rt73 driver version - CVS
<7>[363437.910000] rt73 --> PortCfgInit
<7>[363437.910000] rt73 <-- PortCfgInit

On 2.6.24 the usbcore message appears right at the module insmod, and it means waaaay before the firmware is loaded and activated.
I suspect that system is checking the device capabilities at that point, and there are none yet (before firmware?). Hence later it would not even consider talking to the device????

How to fix that logic????


14-01-2008 21:33:09

I'll have to verify later, but since I'm using the rt2570 driver with an interface that doesn't require an external firmware, I'm not sure that that is the root cause, although it may very well be a side-effect. It may be indicative of a reordering that *does* result in the new behavior however.


24-01-2008 21:01:01

Once I had the same issue.
I then gave the interface a mac by hand and then ifconfig rausb0 up worked.

[code3p4l2ck8]idVendor = 0x13b1, idProduct = 0xd
usbcore: registered new interface driver rt2570
***rt2x00***: Info - Mac address changed to: 00:00:00:00:00:01.
***rt2x00***: Info - Mac address changed to: 00:00:00:00:00:11.
RT25usb Driver version 1.0.0
***rt2x00***: net_device supplies MAC, activating this one
***rt2x00***: Active MAC is: 00:00:00:00:00:11.[/code3p4l2ck8]

This is what happens after that.