[rt2570 (USB)] SIOCSIFFLAGS: Invalid argument

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=4452

TiMiD

19-11-2007 13:11:23

Hello,

I'm trying to get my usb stick (a Buffalo WLI-U2-KG54-AI) to work with my linux box.
As I need the master mode I'm trying to do it with the legacy drivers.

But it doesn't work.

When I type ifconfig rausb0 up I get
[codeu2a3zw04]
SIOCSIFFLAGS: Invalid argument
[/codeu2a3zw04]
In fact, every "ifconfig" command seems to fail and the iwconfig commands require the network to be up


ifconfig rausb0 gives me
[codeu2a3zw04]
rausb0 Lien encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
[/codeu2a3zw04]
which is weird (mac 000000000000)

The module is loaded
[codeu2a3zw04]
lsmod
Module Size Used by
rt2570 167272 0
[/codeu2a3zw04]

and the card seems detected
dmesg
[codeu2a3zw04]
usb 1-3: new high speed USB device using ehci_hcd and address 17
usb 1-3: configuration #1 chosen from 1 choice
idVendor = 0x411, idProduct = 0x67
usbcore: registered new interface driver rt2570
[/codeu2a3zw04]

I'm using gentoo linux with a 2.6.24-rc3 kernel and a recent CVS snapshot of the drivers rt2570-cvs-2007111905 (everything compiles fine)

The rt2x00 seems to work well but unfortunately it seems that it's currently impossible to create an access point

Any help would be appreciated

Thanks

IvD

19-11-2007 18:38:27


As I need the master mode I'm trying to do it with the legacy drivers.
[/quote2h98tf7x]

Legacy drivers do not support master mode and never will.
As you already stated rt2x00 has currently disabled master mode, but it will be reenabled later.

TiMiD

20-11-2007 08:04:50

Ok, good to know !

By the way, is there any version of the rt2x00 drivers that supports master mode (even if that obliges to downgrade my bleeding edge kernel) ?

I searched on the forum, but there is no clean answer

IvD

20-11-2007 18:59:09

It was disabled because it didn't work, so no there is no version to go back to at this time.

Vern

06-03-2008 22:53:21

Hi TiMiD,

The attached patch - preup1.patch.gz - should fix the "Invalid argument" part of your problem under 2.6.24. It does not address the master mode part.

Try it if you like, and if it works OK for you under 2.6.24, I'll see if I can get it into CVS.

Thanks in advance,

Vern

09-03-2008 17:41:06

Well, I see we have 14 downloads. Looks promising.

Do any downloaders have results? Does it work OK? Are there problems related to the patch?

Thanks,

sobol

09-03-2008 20:09:03

Hi
Yup, that worked I can bring up the interface now.
The only problem now is that it doesn't work by "rausb0" name
but rather as "wlan0" which is odd. Can you put the original name
back ?

Well, I see we have 14 downloads. Looks promising.

Do any downloaders have results? Does it work OK? Are there problems related to the patch?

Thanks,[/quote3qf1jro1]

IvD

09-03-2008 20:12:52

wlan0 is a correct name for a wireless lan interface, rausb0 isn't.
It's bad name that shouldn't be used at all.

If you really want the name back, than just change your module alias line in /etc/modprobe.conf

sobol

09-03-2008 20:26:10

Then why is your cvs version adding this alias as default for rt2570 module,
and why such a change is applied in patch which suppose to fix something else.

In general i don't mind any naming scheme.
It is just confusing that cvs driver is setting one standard
and the patch change it.

wlan0 is a correct name for a wireless lan interface, rausb0 isn't.
It's bad name that shouldn't be used at all.

If you really want the name back, than just change your module alias line in /etc/modprobe.conf[/quote1kvf84g1]

IvD

09-03-2008 20:42:58

Well as far as I know the wlan changes were made almost a year ago. So I am not sure why rt2570 still has the rausb naming...

Vern

09-03-2008 20:51:39

Hi sobol,

Thanks for the feedback. Glad to see you can bring the interface up.
Then why is your cvs version adding this alias as default for rt2570 module, ...[/quote3mhpfauu]
The patch doesn't change the default; its's still "rausb0" (actually "rausb%"). So I suspect you've got some kind of "ifname=wlan1" module parameter laying around somewhere that gets tagged on to the modprobe command line. I snarfle along the bottom so much that all I can really point you to would be something in /etc iwith "module" as part of its name (or maybe "hotplug" - or something like that).

Thanks again - and post here if you find something that resolves the point,

sobol

11-03-2008 20:48:51

Hi Vern

I've managed to fix problem with interface naming.
Wlan0 was cached in /etc/udev/rules.d/70-persistent-net.rules, strangely without patch it always worked under rausb0.

Regarding more feedback.
Unfortunately my first tests were short and brief .
I had more time Today to play with the driver and I
found connectivity problem.

My wireless server= wiki

When i log on to wiki, from console I can ping any host and it will work reliable.

src = wiki, dst = any host, ping = ok

While if i connect to wiki the connection gradually dies( get slower and slower ) within 1-2 minutes from first ssh session. If I then go to the server console and try ping any machine or gateway it will not respond.
Ifconfig showing interface up.

src = wan/lan, dst= wiki, ping dies within 2 mins

Build against
rt2570-cvs-2008031110 and rt2570-cvs-2008030716
kernel - linux-2.6.24.3
patch= preup1.patch

Hi sobol,

Thanks for the feedback. Glad to see you can bring the interface up.
Then why is your cvs version adding this alias as default for rt2570 module, ...[/quote3irzzzc0]
The patch doesn't change the default; its's still "rausb0" (actually "rausb%"). So I suspect you've got some kind of "ifname=wlan1" module parameter laying around somewhere that gets tagged on to the modprobe command line. I snarfle along the bottom so much that all I can really point you to would be something in /etc iwith "module" as part of its name (or maybe "hotplug" - or something like that).

Thanks again - and post here if you find something that resolves the point,[/quote3irzzzc0]

Vern

12-03-2008 02:03:21

if i connect to wiki the connection gradually dies( get slower and slower ) within 1-2 minutes from first ssh session. If I then go to the server console and try ping any machine or gateway it will not respond.[/quote17h0gjsb] Hoo boy.

Well, can you build with debug enabled, add debug=31 to your modprobe line, then run to the point where ping does not respond? After that, please gzip /var/log/debug and attach it to a posting here.

Thanks,

sobol

13-03-2008 23:49:25

Hi Vern
Here it comes ( in attachment ). This is a log from whole session, since booting up to actual hang.

Also just for the reference here is an interface screen ( no errors ), just before I lost contact with server.

root@wiki~# ifconfig
lo Link encapLocal Loopback
inet addr127.0.0.1 Mask255.0.0.0
UP LOOPBACK RUNNING MTU16436 Metric1
RX packets0 errors0 dropped0 overruns0 frame0
TX packets0 errors0 dropped0 overruns0 carrier0
collisions0 txqueuelen0
RX bytes0 (0.0 b) TX bytes0 (0.0 b)

rausb0 Link encapEthernet HWaddr 001217732DFE
inet addr192.168.0.100 Bcast192.168.0.255 Mask255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU1500 Metric1
RX packets453 errors0 dropped0 overruns0 frame0
TX packets422 errors0 dropped0 overruns0 carrier0
collisions0 txqueuelen1000
RX bytes302484 (295.3 KB) TX bytes288816 (282.0 KB)


ps. quick fix to bring interface up without patch on module,
add this line to /etc/network/interfaces

iface rausb0 inet dhcp
[b17v2za6s]pre-up ifconfig rausb0 hw ether 001217732DFE[/b17v2za6s] ( enter own mac here )
pre-up ifconfig rausb0 up
pre-up iwpriv rausb0 auth 3
pre-up iwpriv rausb0 enc 3
pre-up iwconfig rausb0 essid wiki
pre-up iwpriv rausb0 wpapsk XXXXXXXXXX
pre-up iwconfig rausb0 essid wiki
auto rausb0



if i connect to wiki the connection gradually dies( get slower and slower ) within 1-2 minutes from first ssh session. If I then go to the server console and try ping any machine or gateway it will not respond.[/quote17v2za6s] Hoo boy.

Well, can you build with debug enabled, add debug=31 to your modprobe line, then run to the point where ping does not respond? After that, please gzip /var/log/debug and attach it to a posting here.

Thanks,[/quote17v2za6s]

Vern

15-03-2008 18:45:32

Hi sobol,

Well, I looked thru your log. To be honest, I don't see anything really abnormal there. (Doesn't mean nothing'w wrong; just that I don't see it.)

Maybe some items to check[list1bq95rvp]1. Your log shows about 1135 PM. What happens if you're on, say 1130 AM?
2. What rate does iwconfig show just after coming up? What rate does it show after things have gone south?
3. Is it possible you're running up against provider service limits?[/listu1bq95rvp]Sorry I can't be more helpful, here.

If none of those things help resolve the issue, could you try a log with *just* the ping that times out? i.e. Make sure nothing else is going on. Wait until ping says it fails, then "echo -n >/var/log/debug", and do the ping again. If it fails, gzip /var/log/debug and attach it to a posting here. I can unrar, but gzip is more convenient.

Thanks,

Vern

20-03-2008 16:27:20

Well, I see we now have 25 downloads.

Nothing more from sobol. No one else has complained. So, you should see this in the hourly tarball fairly soon.