rt2x00 broken? again. (Latest GIT & rt2500)

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

Amp_God

30-10-2007 18:10:24

Hi,

Card assosiates with the AP succesfully, and works for some time, but then pings go sky-high (3000ms+) suddenly.

and from time to time the whole connection disconnects.

Quality varies between 65%-89%. (every few secs)

OS= Debian/GNU Linux 4.0
Card=0005.0 Network controller RaLink RT2500 802.11g Cardbus/mini-PCI (rev 01)
Kernel=Linux ThunderBird 2.6.24-rc1 #1 Tue Oct 30 000918 EET 2007 i686 GNU/Linux

variation I
[code3o51ph19]
wlan0 IEEE 802.11g ESSID:"JAMI Students"
Mode:Managed Frequency:2.432 GHz Access Point: 00:0D:0B:CB:94:1D
Bit Rate=1 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2346 B
Encryption key:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx
Link Quality=65/100 Signal level=-66 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
[/code3o51ph19]

variation II
[code3o51ph19]
wlan0 IEEE 802.11g ESSID:"JAMI Students"
Mode:Managed Frequency:2.432 GHz Access Point: 00:0D:0B:CB:94:1D
Bit Rate=1 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2346 B
Encryption key:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx
Link Quality=89/100 Signal level=-66 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
[/code3o51ph19]

bug(s) with the antennas again?

Hazzl

04-11-2007 11:26:57

I have similar performance issues with all versions of rt2x00 since 2.0.10 on a rt2500pci including current git HEAD. The last thing I remember when I had acceptable performance was before the antenna selection code got merged.

I'm sitting right next to the ap and I get link qualities between 50 and 75%. What's worse I only get connected with a BitRate of 1Mb/s

The logs with debugging enabled seem normal
[quote2pg2bgsi]
Nov 4 121257 eressea kernel [ 280.863746] ACPI PCI Interrupt 00000104.0[A] -> GSI 18 (level, low) -> IRQ 17
Nov 4 121257 eressea kernel [ 280.924067] phy1 -> rt2x00_set_chip Info - Chipset detected - rt 0201, rf 0003, rev 00000004.
Nov 4 121344 eressea kernel [ 327.735401] input rt2500pci as /devices/pci000000/0000001e.0/00000104.0/input/input9
Nov 4 121344 eressea kernel [ 327.850397] ADDRCONF(NETDEV_UP) wlan0 link is not ready
Nov 4 121354 eressea kernel [ 337.764818] phy1 -> rt2x00rfkill_toggle_radio Info - Hardware button pressed, disabling radio.
Nov 4 121358 eressea kernel [ 341.762315] phy1 -> rt2x00rfkill_toggle_radio Info - Hardware button pressed, enabling radio.
Nov 4 121553 eressea kernel [ 456.921208] phy1 -> rt2x00mac_conf_tx Info - Configured TX ring 0 - CWmin 4, CWmax 10, Aifs 2.
Nov 4 121553 eressea kernel [ 456.921250] phy1 -> rt2x00mac_conf_tx Info - Configured TX ring 1 - CWmin 4, CWmax 10, Aifs 2.
Nov 4 121553 eressea kernel [ 456.921273] phy1 -> rt2x00mac_conf_tx Info - Configured TX ring 7 - CWmin 5, CWmax 10, Aifs 2.
Nov 4 121553 eressea kernel [ 456.929964] ADDRCONF(NETDEV_CHANGE) wlan0 link becomes ready
[/quote2pg2bgsi]

Using my distro's kernel (which packages rt2x00 v2.0.4) I get good performance. Is there anything I could do to debug this serious performance regression?

Hazzl

10-11-2007 15:30:57

I did some benchmarks today. Copying files over my LAN / WLAN. I am accessing a SMB share on a Windows XP machine using Samba 3.0.26a (from gutsy repos)

I get following results (just two runs for each measurement)

[quote3mitg4gm]Ethernet
5,05 MB/s

Legacy (1.1.0-b4)
1,62 MB/s

v2.0.4(gutsy)
1,51 MB/s

v2.0.12(git HEAD)
0,06 MB/s[/quote3mitg4gm]

I wanted to attach register dumps for each of the drivers for debugging purposes. But running ethtool -d wlan0 or ethtool -e wlan0 as suggested on the Wiki didn't return any results.

How do I produce these dumps? Is there any further information that would help tracking this performance regression down?

AdamBaker

10-11-2007 17:40:21

I've attached the script I use to dump registers. It requires that

1) you have built the driver with debugfs support

2) You have mounted the debugfs file system on /proc/sys/debug (change the script if you want it elsewhere)

3) You run it as root.

4) You run it after connecting.

The most interesting registers to compare between a not working and working version are BBP registers 2 and 14 as they are TX and RX antenna control but look in rt2500pci.h to see what other registers are supposed to do.

Hazzl

11-11-2007 10:46:08

Thanks for the script! I'm attaching two regdumps, one for legacy, one for v2.0.12

Unfortunately, I'm not able to compare the two as I'm not able to see the BBP registers in the legacy dump. I'm not sure gutsy is compiled with debugfs support. I'll have to reboot to check wink But maybe somebody else here can see what is going on.

Observing the test run more closely, I can make out that the transfer speed briefly drops to 0 every 2-5 seconds. This seems to indicate that the driver tries switching around something (my hunch the antennas) which goes awfully bad.

Hazzl

11-11-2007 10:57:19

While the kernel provided with Gutsy has debugfs enabled, they didn't enable debugfs support for their rt2500pci module. (

Will you guys be able to track down the problem based on the legacy-dump? Or should I recompile my v2.0.4 module to enable debugfs?

Amp_God

23-11-2007 14:46:06

AdamBaker
Your dumping script doesnt seem to work, neither doest the older dumper...
Newer doesnt print anything (even when debugfs mounted on /proc/sys/debug).

older printout
[code1dikwfgy]
CSR
rt2x00.dump.sh: line 31: ((: 0<: syntax error: operand expected (error token is "<")

EEPROM
rt2x00.dump.sh: line 38: ((: 0<: syntax error: operand expected (error token is "<")

BBP
rt2x00.dump.sh: line 45: ((: 0<: syntax error: operand expected (error token is "<")
[/code1dikwfgy]

Update
Updated kernel to the latest git and the problem still persists.
Apparently the driver doesnt change the initial connection speed automatically.

If the connection is on 1M, the lag to the network is huuge, but
if i force it to 11M, lag drops to ~5ms p

Speed detection broken? + The network loses its performance over time, reboot fixes performance for a while.

uname
[code1dikwfgy]
Linux ThunderBird 2.6.24-rc3 #1 Wed Nov 21 21:14:35 EET 2007 x86_64 GNU/Linux
[/code1dikwfgy]

iwconfig (forced 11M bitrate)
[code1dikwfgy]
wlan0 IEEE 802.11g ESSID:"xxxx"
Mode:Managed Frequency:2.432 GHz Access Point: 00:0D:0B:CB:94:1D
Bit Rate=11 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr=512 B Fragment thr=1664 B
Encryption key:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx
Link Quality=88/100 Signal level=-69 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
[/code1dikwfgy]

Hazzl

06-01-2008 18:59:05

I don't know about Amp_God but my perfomance issues have been fixed completely. I've compiled the most recent git and I now get 2.3 MB/s where before I go a maximum of 1.6 MB/s! D

Of course ,this is with a new samba, so the results are not strictly speaking comparable. Nevertheless these are certainly great results!

Thanks a lot for your work Ivo!