[solved]"SIOSSIFFLAGS: Invalid argument" on ifconfig up on

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

Woody Suwalski

14-01-2008 21:23:57

I have an rt73 device from Asus. Seems to work OK on 2.6.21, but not on 2.6.24.

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 - 1.0.3.6 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 delay the registration logic????

andva

06-02-2008 02:14:08

I can confirm the exact same behavior on Ubuntu Hoary. The driver works on 2.6.22 but not on 2.6.24. I have run it with debug turned on and observed the same as Woody.

I have a D-Link DWL-G122 USB dongle which has always worked perfectly with rt73.

Looking at the CVS changelog for rt73, it seems that the driver was prepared for 2.6.24 support, but that 2.6.24 support was not actually tested (no doubt because the preparation was made before the kernel release). The "preparation" done with the code, whatever that was, was successful current CVS versions compile and insert cleanly with 2.6.24, whereas older ones (eg. the September 2007 version I have been compiling as the "default" on my 2.6.20-22 kernels) complain about missing symbols while compiling. However, the driver does not work, so this is a moot point ;)

As Woody has said, I suppose that there is something about 2.6.24 which is not yet implemented correctly on rt73. As this seems to be a 2.6.24-related problem, I would suggest editing the thread title to reflect it.

Best regards

doctia

08-02-2008 13:34:49

i have a slackware with two kernels, 2.6.20 and 2.6.24.
using both them, i can compile successfully the driver,
but on 2.6.24 "ifconfig wlan0 up" give me that error message, while working well on 2.6.20.

so i confirm again that the driver seems not working on 2.6.24 kernel for now

Vern

08-02-2008 18:06:37

I stupidly upgraded to 2.6.24 and have the same problem with that kernel. 2.6.23 was OK.

I may (or may not) get around to taking a look at it. In the meantime stay away from 2.6.24 or use the nextgen driver. It seems that better than half the time I have to spend on this stuff is spent tracking kernel internal ABI breaks (I said breaks). Since 2.6.15 or so, every single point change has broken something.

doctia

08-02-2008 21:37:53

as for me i am passing from 2.6.20 to 2.6.24 but i will not throw away the 2.6.20 kernel for a long time i think,
so i would suggest u to keep also the old one ,
at boot u could choose the one u prefer at the moment...

in 2.6.24 things seems good...all the other hardware i have seems work well, (for now, i have it from 2 days);
i hope the next tarball for rt73 will fix this problem, the older one worked so well, i used it with aircrack-ng and it was perfect.

who knows how much time could require developing the tarball compatible with the 2.6.24 kernel...

fidor

09-02-2008 01:45:25

Hi

I've found temporary workaround
after you load module you must set manually mac address. After that everything works fine, ie.

modprobe rt73
ip link set wlan0 address 000000000011
ifconfig wlan0 up
ifconfig wlan0
wlan0 Link encapEthernet HWaddr 000000000011
inet6 addr fe80200fffe0011/64 ScopeLink
UP BROADCAST RUNNING MULTICAST MTU1500 Metric1
RX packets1377 errors0 dropped0 overruns0 frame0
TX packets1650 errors0 dropped0 overruns0 carrier0
collisions0 txqueuelen1000
RX bytes145992 (142.5 KiB) TX bytes108966 (106.4 KiB)

doctia

09-02-2008 11:56:07

thank you fidor,
i really appreciated that !
this was my last hardware not working on kernel 2.6.24!
i tried and it worked for me too!

defcon

11-02-2008 12:05:08

thanks so much fidor for that work around, im running ubuntu hardy heron and the serialmonkey driver is "totally borked" with this bug, any idea when this bug will be fixed?

kronat

11-02-2008 12:27:06

I confirm this bug, using rt74usb driver from 2.6.24 kernel.

I do not try the mac-address workaround.

defcon

12-02-2008 03:47:53

ok the set mac address fix works fine, but for some reason my ralink device is saying wlan2 instead of wlan0 and the correct alias is set.

defcon

12-02-2008 07:07:48

ok the set mac address fix works fine, but for some reason my ralink device is saying wlan2 instead of wlan0 and the correct alias is set.[/quoteexzorg6f]
ok If anyone else has this issue, i fixed it by just modifying the udev rule to this
nano /etc/udev/rules.d/70-persistent-net.rules
-
# USB device 0x050d0x705a (rt73)
SUBSYSTEM=="net", ACTION=="add", ATTR{type}=="1", NAME="wlan0"

gawlitza

12-02-2008 22:54:45

error

gawlitza

12-02-2008 22:56:15

error

gawlitza

12-02-2008 22:57:36

Hello, very good, after setting hardware address with "ifconfig wlan0 hw ether 000000000011" (or any other value) the driver works fine under kernel 2.6.24. Now it's ok. Thank you very mutch ! M. Gawlitza

robotangel

12-02-2008 23:01:34

Thanks for the MAC-Tip, I will try it now but I assume it'll work.
When can we expect a fix, because rt2x00 from 2.6.24 (CVS doesn't compile, somehow, I don't want to use it longer than needed anyway) is quite.. Let's say "limited"...

Greetings from Germany
robo

realsuamor

17-02-2008 11:49:17

Hi,

I can too confirm that the problems appears on my low latency 2.6.24 kernel too. And the workaround is very helpful, thank you fidor!

I have a Edimax 7318USg here, just for reference, more information in "my" thread[/url3gnnpgzc].

I also want to point out that the rt73 driver is one of the best for me, as I have for some reason wpa_supplicant 0.60 failing on all 4 WLAN cards I tried (two of them based on rt73).

Edit
I'm writing this now with an active rt73 connection, very nice )
I had some problems though to get it up (even kernel oopses), maybe related to my iwl4965 card.

Reinhard

Vern

24-02-2008 21:32:45

I have an rt73 device from Asus. Seems to work OK on 2.6.21, but not on 2.6.24.[/quote2m7rgucd]
The attached patch file - preup3.patch.gz - should fix this problem.

I've gone through a couple of earlier versions of the patch trying to establish that it provides pre-up configuration properly, and works OK on ARM machines (see rt73 on ARM without hotplug or udev[/url2m7rgucd]). After finally getting my homemade AP working under 2.6.24, I discovered some synchronization problems in infrastructure mode, which should now be fixed. Could you apply it to a vanilla copy of the latest CVS and post your results here?

If indeed it works OK, I'll see about getting it put into CVS.

Thanks,

defcon

24-02-2008 21:53:53

awesome vern, your the best, im going to have to try this when I get home from work, how exactly do I apply the patch?

Vern

24-02-2008 22:30:05

Hey defcon,

Glad to see you're game
[list1wjka0lf]1. Download the gzipped patch file to a suitable directory.
2. Before logging in, or after logging out, click on the download tab at the top of the page, select the rt73 tarball under "Enhanced legacy drivers", and download it.
3. cd to the download directory and untar the tarball.
4. cd ./rt73*/Module
5.zcat <path-to-downloaded-patch-file>|patch
6. Build and install as usual.[/listu1wjka0lf]
The README and TESTING files have info on using debug mode. If the patched driver doesn't work for you, then please attach a gzipped copy of /var/log/debug to a posting here, along with a brief description of the problem. If possible, also attaching a gzipped script file of the commands used to elicit the problem would also be good.

Thanks,

P.S. I might be awesome if I wasn't on the third try at this thing.

Linkin

25-02-2008 14:54:13

Thanks Vern, the patch is working great so far.

defcon

25-02-2008 19:36:23

Unfortunate it doesnt work for me, here is my system info
Linux version 2.6.24-7-generic (buildd@palmer) (gcc version 4.2.3 (Ubuntu 4.2.3-1ubuntu1)) #1 SMP Thu Feb 7 012958 UTC 2008
I am running a Intel Hyperthreaded 3.0ghz, Running Ubuntu Hardy Heron alpha 5 latest updates
I am unable to ping any host, but I can connect to my wireless router.

Vern

25-02-2008 21:31:16

I am unable to ping any host, but I can connect to my wireless router.[/quote1evagjh5]
Being able to connect to your router using WPAPSK shows that the driver successfully exchanges data frames with it.

Wrt. the ping problem This *may* be a network layer problem. Can you access the net with your browser?

If so, could you check your firewall settings (iptables-save)?

If not, do that plus routing (route -n) and ip addressing (ifconfig <iface>, iwconfig <iface>); then attach the output - preferably as a gzipped script file - to a posting here.

Thanks,

defcon

25-02-2008 22:16:12

I have attached, iwconfig, ifconfig, route -n, iptables-save, and a screenshot of wireshark/ping
Thanks for looking into this
defcon

defcon

25-02-2008 22:18:30

[edit]I am no longer getting "SIOSSIFFLAGS" error, I can connect fine, my router switched channels on me so I had to edit /etc/network/interfaces
the driver should be fine for cvs to my looks, thanks allot vern

Vern

25-02-2008 22:48:02

Hi defcon,

Well, I guess we can rule out firewall rules as a potential problem cause. Thanks for the work.

2-3 minutes to connect is wierd. As a Hail Mary question, have you tried this when the driver is compiled with debug *off*?

If so, turn on debugging, and do a run that includes everything from modprobe up to and including the time that a successful connection is established. Post a gzipped copy of just /var/log/debug here, and I'll take a look at it.

And - thanks again,

[edit] What did you change in /etc/network/interfaces?

defcon

25-02-2008 23:01:02

Vern, I believe the issue is fixed, This is my interfaces file, I had to change the channel to the correct channel. Btw is there any way to shorten my config to do the same?

auto wlan0
iface wlan0 inet static
address 192.168.1.66
netmask 255.255.255.0
gateway 192.168.1.254
pre-up ifconfig wlan0 up
pre-up iwconfig wlan0 essid 2WIRE659
pre-up iwconfig wlan0 mode managed
pre-up iwpriv wlan0 set Channel=9
pre-up iwpriv wlan0 set AuthMode=WPAPSK
pre-up iwpriv wlan0 set EncrypType=TKIP
pre-up iwpriv wlan0 set WPAPSK=mykey
pre-up iwpriv wlan0 set TxRate=0
mtu 1500

Vern

26-02-2008 04:50:22

Hi defcon,

That's good news. You should soon see the patch in CVS.

Re. shortening your config

The patch removes the need for "pre-up ifconfig wlan0 up". I think what that was really doing was forcing the driver "up" before doing the rest of the pre-ups (which sorta obviated the point of the pre-ups).

You should also be able to get away with removing "mtu 1500".

That's about it.

Thanks again,