Bug 13565 - Bad performance of wifi using zd1211rw driver
Summary: Bad performance of wifi using zd1211rw driver
Status: CLOSED CODE_FIX
Alias: None
Product: Networking
Classification: Unclassified
Component: Wireless (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: networking_wireless@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-18 12:46 UTC by Martin Dratva
Modified: 2010-11-23 16:40 UTC (History)
6 users (show)

See Also:
Kernel Version: 2.6.29 and 2.6.30
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments

Description Martin Dratva 2009-06-18 12:46:38 UTC
I have one machine, that has Arch Linux and Ubuntu installed.
I have Zyxel G-202 USB Wifi dongle, that uses zd1211rw driver included in kernel.

In Arch, when I try to copy files from this machine to my other PC (wired connection) I get upload 25-100 KB/s. In Ubuntu I get 1.5-2 MB/s.
When just browsing, everything is fine on Arch as well, but when I start torrents or anything what really uses a lot of bandwidth, my pings to router go up to 3000 ms, sometimes even 40 000 ms with occasional disconnects. This does not happen on Ubuntu. Torrents work fine there.

Ubuntu has 2.6.28 kernel, my fully updated Arch is on 2.6.29. 

I checked logs on both systems, everything looks fine, no errors and zd1211rw loading section in dmesg is the same :

Ubuntu:
[   25.184444] usb 1-3: firmware: requesting zd1211/zd1211b_ub
[   25.287503] usb 1-3: firmware: requesting zd1211/zd1211b_uphr
[   25.362855] zd1211rw 1-3:1.0: firmware version 4725
[   25.404846] zd1211rw 1-3:1.0: zd1211b chip 0586:3410 v4810 high 00-19-cb AL2230_RF pa0 g--NS

Arch:
usb 1-3: firmware: requesting zd1211/zd1211b_ub
usb 1-3: firmware: requesting zd1211/zd1211b_uphr
zd1211rw 1-3:1.0: firmware version 4725
zd1211rw 1-3:1.0: zd1211b chip 0586:3410 v4810 high 00-19-cb AL2230_RF pa0 g--NS

I tried to switch my Arch installation to 2.6.30 kernel, but the problem persisted. Then I downgraded kernel to 2.6.28 and this works just fine, so the problem exists in 2.6.29 and 2.6.30 kernel. 

If you need any additional info, I'll be happy to provide.
Comment 1 John W. Linville 2009-06-18 13:21:58 UTC
Are you capable of recompiling your kernel?  If so, please alter your configuration to select the PID rate control algorithm rather than Minstrel.  Does that change the behaviour for you?
Comment 2 Martin Dratva 2009-06-18 13:24:18 UTC
I should be able to do that, but I do not want to mess my system too much, so I will set a new testing environment for this issue. I will be back with requested info then.
Comment 3 Martin Dratva 2009-06-28 10:52:08 UTC
I downloaded sources for 2.6.30 kernel, but when I issued command make menuconfig, under

Networking support / Wireless / Rate control algorithm selection / Default rate control algorithm 

was only one possible selection -> Minstrel  

Do I do something wrong? I can not find PID selection anywhere.
Comment 4 Martin Dratva 2009-06-28 11:07:52 UTC
This is my current kernel's config (I tried also without make oldconfig)

bash# cat /home/raqua/config-oldconfig | grep -i CONFIG_MAC80211_RC
CONFIG_MAC80211_RC_MINSTREL=y
# CONFIG_MAC80211_RC_DEFAULT_PID is not set
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel"
Comment 5 John W. Linville 2009-07-01 17:30:20 UTC
CONFIG_EMBEDDED=y should make it available for you.
Comment 6 Errico Prota 2009-07-03 23:51:11 UTC
Hi! I have a strange behaviour with zd1211rw with vanilla kernel 2.6.30: in airodump-ng (rc3) I havent PWR of received signals (it's allways set to 0)...
Instead. PWR  works fine with kernel 2.6.29.4 (mandriva version)
Any ideas ?
Comment 7 Johannes Berg 2009-07-04 07:45:06 UTC
(In reply to comment #6)

Errico,

Don't hijack bugs. If you feel your problem warrants a bug report -- report it. If not, then don't, but don't EVER put an unrelated comment into somebody else's bug report. It completely messes up the bug.

As far as your problem is concerned, it's simply been disabled in the driver since it was reporting dB instead of dBm and I felt that wasn't useful -- if you want to do the required calibrations it will be easy to change it to report dBm which it can then report.
Comment 8 Errico Prota 2009-07-04 12:05:45 UTC
Sorry, I posted here because I think that was a regression in driver connected to bad performance...
How I can enable the signal report ? I am googled for solution, but info are outdated
Comment 9 Martin Dratva 2009-07-04 20:22:43 UTC
I recompiled kernel with PID rate control algorithm. This fixed the speed issue. I had no time to test it throughly, but I guess it is safe to say, that this was the problem. If you think that it is necessary to check it more I could manage that, but I have a bit limited access to that machine now. 
Let me know if I can help any way.

@Errico - please open a separate bug for yourself.
Comment 10 John W. Linville 2009-07-06 18:09:35 UTC
Martin, thanks for the report.  It confirms that not all of our drivers are providing adequate information to make Minstrel do a good job for them...
Comment 11 Martin Dratva 2009-07-31 18:00:57 UTC
I just bought a new usb dongle dwa-160 using ar9170 chipset and it appears to have the same problem. I do not have the custom kernel anymore, but I will make new one and try it again in a few weeks. I will report here. 
But so far, it has the same symptoms.
Comment 12 Martin Dratva 2010-01-07 18:49:39 UTC
Still a problem in 2.6.32.3
Comment 13 John W. Linville 2010-03-02 15:56:26 UTC
Daniel, any thoughts on what zd1211rw could be doing to work better with minstrel?  I'll send a link to Felix too (since he doesn't seem to be registered here)...

I'll add the Atheros guys also, due to the mention of ar9170 in comment 11.
Comment 14 Felix Fietkau 2010-03-02 16:41:22 UTC
tx status reporting in zd1211rw in 2.6.32.* is completely broken. The code in wireless-testing looks better, please try that.
As for ar9170: Its status reporting is broken as well (no accurate number of retransmission, hardcoded value) - I believe carl9170 fixes that.
Comment 15 Martin Dratva 2010-04-25 21:59:46 UTC
In 2.6.33 this has improved a lot. Performance now seems to be at the same speeds as PID has, but periodically networks starts to lag. My pings go to 80000ms and then all returns to normal. 
This is happening aprox. every 10 minutes. 
When I boot 2.6.32 kernel with PID, this problem disappears.
Comment 16 John W. Linville 2010-11-23 16:40:29 UTC
Closing on the basis of comment 15...

Note You need to log in before you can comment on or make changes to this bug.