rt2x00.serialmonkey.com

Support forum for the rt2x00 project
It is currently Fri Sep 10, 2010 7:33 am

All times are UTC


Forum rules


Important: Read Project restructuring announcement regarding the pending removal of the legacy drivers from this project.



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 97 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject:
PostPosted: Wed Feb 20, 2008 5:28 pm 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
I guess in a perfect world, pre-up would be better because it would ensure that all related configuration items are set before driver operations begin. e.g. the driver would not try to do a scan just before the operating mode was switched to monitor.

However, the driver isn't set up to be able to do that, which - I suspect - is why you needed the ifconfig command: it was effectively bringing the driver up before the following pre-ups were done.

So, in practical terms, using "up" commands simpifies things in the configuration script.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 21, 2008 12:02 am 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
Hi daniel_matthes,

Me again. I have a patch that's intended to resolve the "SIOCIFFLAGS: invalid argument" problem with 2.6.24 kernels. It appears to work in my environment, but that is very restricted. Could you try it?

If it works for you, you may also find that you can now do pre-up commands without having to first do "ifconfig wlan up".

The file is attached as preup1.patch.gz.

Thanks, in advance,


Attachments:
File comment: Fix "SIOCIFFLAGS: invalid argument".
preup1.patch.gz [9.42 KiB]
Downloaded 64 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 21, 2008 9:45 am 
Offline

Joined: Thu Oct 25, 2007 12:21 pm
Posts: 50
Hi Vern,

I've tested the driver rt73-cvs-2008022102 patched with preup1.patch. It doesn't work correctly.

After bringing up the device and running "iwconfig", I got the following output.

Code:
~ # iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     RT73 WLAN  ESSID:"FTZwlan" 
          Mode:Managed  Frequency=2.447 GHz  Bit Rate=54 Mb/s   
          RTS thr:off   Fragment thr:off
          Encryption key:0000-0000-00
          Link Quality=0/100  Signal level:-121 dBm  Noise level:-111 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


when i bring up the device after a bring down, I got the following error message

Code:
~ # ifdown wlan0
~ # ifup wlan0                     
SIOCSIFFLAGS: No such device
SIOCSIFFLAGS: No such device
route: SIOC[ADD|DEL]RT: Network is unreachable


/var/log/messages is attached

regards Daniel


Attachments:
messages.gz [5.03 KiB]
Downloaded 39 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 21, 2008 5:38 pm 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
Hi Daniel,

Jeez, you'd think I could have thought to do at least that much myself!

Veddy embarrassing - and thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 21, 2008 6:16 pm 
Offline

Joined: Sat Feb 16, 2008 2:12 pm
Posts: 17
Vern, is the (corrected) patch already checked in ?

Best,

Reinhard


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 21, 2008 10:37 pm 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
No.

I've modified the "preup1" patch enough that the driver will cycle through ups and downs without complaint - but it still doesn't work right. For example, after ifdown, then ifup, a scan operation does not return results.

So what I'd like to do is get that item resolved, then - if Daniel or you have the time and inclination - let him, or you, take another pass at it.

daniel_matthes:

Did "preup1" at least allow you to do preups without having to do ifconfig up?

Thanks again for your work,


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 9:20 am 
Offline

Joined: Thu Oct 25, 2007 12:21 pm
Posts: 50
Vern wrote:
Did "preup1" at least allow you to do preups without having to do ifconfig up?


Not realy. After reboot it seems to work. But after "ifdown/ifup" the same error occures.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 10:27 pm 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
Hi Daniel,

I've attached a modified version of the patch - preup2.patch.gz - that seems to work for me cycling through ifup -> ifdown -> ifup, etc. The main change is that it initializes the ASIC on every open.

It should also still allow you to do preup configuration without having to do an ifconfig first.

Could you try it and post your results here?

Thanks,


Attachments:
File comment: Initialize ASIC on every open.
preup2.patch.gz [14.43 KiB]
Downloaded 50 times
Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 24, 2008 9:46 pm 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
Hi Daniel,

I've discovered problems with preup2. I've posted a later version - preup3 - on "SIOSSIFFLAGS: Invalid argument" on ifconfig up on that should fix things. It would be very helpful to also see that there are no problems with it in an ARM environment, so would it be possible for you to try that version of the patch and report your results before getting it put into CVS?

Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 25, 2008 8:53 am 
Offline

Joined: Thu Oct 25, 2007 12:21 pm
Posts: 50
Hi Vern,

Sorry, but I can not test the patches before friday. Our team is from Today till Thursday on Nuremberg on the Embedded World exhibition. And they took along the WLAN USB stick.

Regards Daniel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 25, 2008 9:34 pm 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
Hi Daniel,

That's fine. Thanks again for your work. When and if you get a chance, making sure ARM operations are OK would be good.

Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 10, 2008 1:44 pm 
Offline

Joined: Thu Oct 25, 2007 12:21 pm
Posts: 50
Hi Vern,

Now I'm back from my winter holidays. Today I've tested a vanilla copy of rt73-cvs-2008031007.

I've tested the driver in two ways. At first by using 'ups' and further by using 'pre-ups' without entering 'pre-up ifconfig wlan0 up'.

Every time it's possible to bring up the device without errors. But after bringing up there are some problems.

When I bring up the device by using 'ups', after reboot its possible to ping the ap. When I bring down the wlan adapter and bring up the device again, after that it's not possible to ping the ap. By using 'pre-ups' it is also not possible to ping the ap after reboot.

--> so I've attached some /var/log/messages files ;-)

regards daniel


Attachments:
messages.tar.gz [12.88 KiB]
Downloaded 31 times
Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 11, 2008 1:08 am 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
Hi daniel,

I can't reproduce the problem. I can pretty much do ifup, ifdown, ifup, ... ad infinitem, and I see in my log that the open function is called each time ifup is done, and the close function is called each time ifdown is done.

In both your logs I only see the open function called once, and the close function called once - which would imply that ifup (or ifconfig <iface> up) is only done once, and ifdown (or ifconfig <iface> down) are also only done once.

So I'm a little puzzled, here. Can you provide some detail on your procedures?

Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 11, 2008 9:29 am 
Offline

Joined: Thu Oct 25, 2007 12:21 pm
Posts: 50
Hi Vern,

I've done a new test run. I've tested two different driver versions. At first I've tested a vanilla copy of rt73-cvs-2008022102 and then a copy of rt73-cvs-2008031007.

This is my test procedure:

0. /etc/network/interfaces is configured with 'ups'

1. reboot the system
2. /etc/init.d/rcS executes modprobe rt73
3. /etc/init.d/rcS executes ifup wlan0
4. ping <ap address>
5. ifdown -v wlan0
6. ifup -v wlan0
7. ping <ap address>
8. ifdown -v wlan0

By using the driver version 031007 step 7 does'nt work.

Further the step 6 output of driver version 022102 and version 031007 is different.

version 022102 output:

Code:
run-parts /etc/network/if-pre-up.d
ifconfig wlan0 192.168.0.5 netmask 255.255.255.0 broadcast 192.168.0.255                 up
rt73: driver version - 1.0.3.6 CVS
rt73: net_device supplies MAC, activating this one
rt73: Active MAC is: 00:19:5b:74:bf:3e.
rt73: Local MAC = 00:19:5b:74:bf:3e
route add default gw 192.168.0.3 wlan0
iwconfig wlan0 essid "FTZwlan"
iwconfig wlan0 mode Managed
iwconfig wlan0 channel 8
iwconfig wlan0 key on
iwpriv wlan0 set AuthMode=WPA2PSK
iwpriv wlan0 set EncrypType=AES
iwpriv wlan0 set WPAPSK=0a1b2c3d4e
run-parts /etc/network/if-up.d


version 0031007 output:

Code:
run-parts /etc/network/if-pre-up.d
ifconfig wlan0 192.168.0.5 netmask 255.255.255.0 broadcast 192.168.0.255                 up
rt73: driver version - 1.0.3.6 CVS
route add default gw 192.168.0.3 wlan0
iwconfig wlan0 essid "FTZwlan"
iwconfig wlan0 mode Managed
iwconfig wlan0 channel 8
iwconfig wlan0 key on
iwpriv wlan0 set AuthMode=WPA2PSK
iwpriv wlan0 set EncrypType=AES
iwpriv wlan0 set WPAPSK=0a1b2c3d4e
run-parts /etc/network/if-up.d


I've attached the log output.

Regards Daniel


Attachments:
messages_ups.tar.gz [22.83 KiB]
Downloaded 30 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 13, 2008 5:16 pm 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
Hi Daniel,

Nice catch. Thanks for the extra legwork. It turns out that parts of the chip setup are lost during close processing. As a result, there's some chip initialization that needs to be done when the device is re-opened.

The attached patch -reopen1.patch.gtz - fixes the re-open issues I've been able to identify in my own environment. Could you apply it to a vanilla copy of the latest CVS and see if it's OK in yours?

Thanks again for your efforts,


Attachments:
File comment: Does asic setup on every open.
reopen1.patch.gz [1.85 KiB]
Downloaded 36 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 97 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group