Topic: RT5350 WiFI terrible performance for CC and newer.

Hello All,

Has anyone else experienced issues with WiFi performance on RT5350 using CC stable 15.05 and latest trunk(r47806)?

here is my experience...

get latest trunk.
configured rt5350 generic build for Poray M4-8M (the unit I happen to be working with)
build using all defaults to create a generic system for testing wifi
enable wifi by editing /etc/config/wireless
scp a file...

the file transfer starts but after about 150K stops.  ssh to the box works but very sluggish.

If I go back to r36813 (pre mt7620 support).  And follow the above procedure the WiFi works great.   I can transfer files with scp without issue and login via SSH is snappy.

I suspect that adding support for the MT7620 has broken something in the RT5350 WiFi.   

Has anyone else experienced any issues similar to these?  Any idea how to go about fixing this? all hints are appreciated.

Thanks,

--luis

Re: RT5350 WiFI terrible performance for CC and newer.

here is more...

don't ask me how i discovered this but deleting this patch
target/linux/ramips/patches-3.18/0011-MIPS-ralink-add-rt2880-wmac-clock.patch

fixes the wifi on my rt5350 system.  Rebuilding the system I get very nice wifi performance
root@OpenWrt:/tmp# scp axcel@192.168.0.101:latest.d/exp-m4.bin .
Login for axcel@192.168.0.101
Password:
exp-m4.bin                                    100% 5888KB   1.2MB/s   00:05   

this same file will NOT transfer when the patch is present.  I only get 150K before the transfer halts.

So the $64K question is... why does this

From bf4f5250117cd65a78903b8ce302499806416ed1 Mon Sep 17 00:00:00 2001
From: John Crispin <blogic@openwrt.org>
Date: Mon, 4 Aug 2014 09:52:22 +0200
Subject: [PATCH 11/57] MIPS: ralink: add rt2880 wmac clock

Signed-off-by: John Crispin <blogic@openwrt.org>
---
arch/mips/ralink/rt288x.c |    3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- a/arch/mips/ralink/rt288x.c
+++ b/arch/mips/ralink/rt288x.c
@@ -76,7 +76,7 @@ struct ralink_pinmux rt_gpio_pinmux = {

void __init ralink_clk_init(void)
{
-    unsigned long cpu_rate;
+    unsigned long cpu_rate, wmac_rate = 40000000;
    u32 t = rt_sysc_r32(SYSC_REG_SYSTEM_CONFIG);
    t = ((t >> SYSTEM_CONFIG_CPUCLK_SHIFT) & SYSTEM_CONFIG_CPUCLK_MASK);

@@ -101,6 +101,7 @@ void __init ralink_clk_init(void)
    ralink_clk_add("300500.uart", cpu_rate / 2);
    ralink_clk_add("300c00.uartlite", cpu_rate / 2);
    ralink_clk_add("400000.ethernet", cpu_rate / 2);
+    ralink_clk_add("480000.wmac", wmac_rate);
}

void __init ralink_of_remap(void)


break RT5350 WiFi?

Re: RT5350 WiFI terrible performance for CC and newer.

So interestingly, the file rt288x.c which is the basis of that patch doesnt even get built for rt5350.  rt5350 uses rt305x.c as the basis for its build so I suspect that is not the actual problem.

In my case, when wireless reception is flawless, I get excellent performance but as the RF environment degrades, the performance suffers considerably.  The performance degradation is not in line with the environment.

Furthermore, when rt5350 is connected as a station, I NEVER see bitrates above 54 mbps in 802.11n HT mode.
The same is not true for running the chip as a wireless access point.

I am experiencing a similar issue and I am rolling back to Openwrt BB to verify your observations.   Do you have any other information that might be helpful?

Re: RT5350 WiFI terrible performance for CC and newer.

Thanks for replying... We would like to get this fixed so that we can move to CC... in the mean time we just rolled back to an early version of BB (r36813) which has been working fine for a long time.

5 (edited by mskeff 2017-05-17 23:09:50)

Re: RT5350 WiFI terrible performance for CC and newer.

What is the significance of 36813?  is that the commit hash?

Please let me know how I can specifically build r36813.  Thanks

Re: RT5350 WiFI terrible performance for CC and newer.

r36813 is the svn commit version number...  it corresponds to git

commit 2dfa092d52ab24ba1e432b5b0a5d61ed2472531b
Author: nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date:   Fri May 31 15:42:23 2013 +0000


    usbmode: fix hotplug script name
   
    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
   
    git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36813 3c298f89-4303-0410-b956-a3cf2f4a3e73

7 (edited by bfka 2017-05-19 13:14:41)

Re: RT5350 WiFI terrible performance for CC and newer.

Soooo. I don't know from where to start, but I will try. I have a bunch of garbage D-link go-rt-n150 (rt5350f) radios and out of curiosity I've decided to upgrade the stock 8MB RAM and 2MB flash. So far so good. I ended up with 32MB RAM and 4MB flash (at that moment I did not mange to find 8 or 16). For openwrt I choose DIR-300 B7 which is the same as the above one and everything went fine, until now...I Used to play with 3G USB modem. On top of 3g I run PPTP client which also run flawlessly and overall result was perfect, except Wi-IF. N was not there at all, just 54Mbps max, but working as expected. Today I've replaced 4MB flash with 16MB and the wireless seems dead to me, and I don't know why?!? With 4MB flash, at some point during bootup, kernel throws me some kind of error and prints the affected stack, but everything working normally. The problem is I want more flash storage to be able to install more things (I'm new to openwrt) and replace flash. That message is missing from kernel log today, as Wifi behave strangely. After client supply WPA psk, connection stops at "receiving DHCP address". On 10 attempts -  2 or 3 was successful, but non the less - ping from router to wifi client is horrible and also no traffic actually get passed. I don't know what to think. Is it issues with CC or somehow I've managed to screw the wifi chip itself? Tomorrow I will put old 4MB flash back (with kernel complaining about something) and see what's going on...

19.05.17
In the end I actually copied whole 4MB flash into 16MB, and not the u-boot only. The error in kernel is back, and everything is working normal. if someone is interested in, I can provide ssh login to router itself...

8 (edited by mskeff 2017-05-19 19:40:34)

Re: RT5350 WiFI terrible performance for CC and newer.

I got this rev building but its not terribly reliable.   As a result, I have a few questions about your environment.

Are you flashing the firmware as a factory image or doing it as a txrx firmware update?  I have in the past noticed that omitting the special factory partition at SPI location 0x40000-0x4ffff causes huge instability.

What options do you have in your /etc/config/wireless file?

Can you upload a compiled build to somewhere?  I use iperf to do benchmarking so please install that if you can.  Thank you.

lsoltero wrote:

r36813 is the svn commit version number...  it corresponds to git

commit 2dfa092d52ab24ba1e432b5b0a5d61ed2472531b
Author: nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date:   Fri May 31 15:42:23 2013 +0000


    usbmode: fix hotplug script name
   
    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
   
    git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36813 3c298f89-4303-0410-b956-a3cf2f4a3e73