OpenWrt Forum Archive

Topic: Problem with TP-Link TL-WR841N/ND v7 - wireless performance

The content of this topic has been archived on 8 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi

I've bought 3 TP-Link TL-WR841N, and I'm using 1 as a router, dhcp server  and access point and the other 2 as access points only. I flashed all with OpenWrt and they are working, but the one that is configured as a router is giving me some problems, because of the wireless performance - the network is very slow, pings fail and have erratic delays, but the signal is good and there is no one using the same wireless channel. The other two that are configures as access points work well, and I have a good internet speed with them, so the router is working well because it is used for the internet access, it seems that the problem is only with the AP functionality on the one configured as router. Reading the logs i found that I have errors on dmesg that keep on growing, similar to this one:

[626430.440000] ath: phy0: Failed to stop TX DMA, queues=0x100!

I have not this error on the other two configured as access points. Any help would be appreciated, and please ask for any additional information if necessary.

Fernando

Full dmesg:

root@OpenWrt:~# dmesg
[    0.000000] Linux version 3.3.7 (openwrt@huchra) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Fri Jun 1 00:16:34 PDT 2012
[    0.000000] MyLoader: sysp=aaaaaaaa, boardp=aaaaaaaa, parts=aaaaaaaa
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR7241 rev 1
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:5.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 80314410, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8128 pages, LIFO batch:0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=TL-WR841N-v7 console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 29000k/32768k available (2200k kernel code, 3768k reserved, 570k data, 200k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.090000] gpiochip_add: registered GPIOs 0 to 17 on device: ath79
[    0.100000] MIPS: machine is TP-LINK TL-WR841N/ND v7
[    0.500000] registering PCI controller with io_map_base unset
[    0.510000] bio: create slab <bio-0> at 0
[    0.520000] PCI host bridge to bus 0000:00
[    0.520000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x17ffffff]
[    0.530000] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.530000] pci 0000:00:00.0: [168c:002e] type 0 class 0x000280
[    0.530000] pci 0000:00:00.0: fixup device configuration
[    0.540000] pci 0000:00:00.0: reg 10: [mem 0x10000000-0x1000ffff 64bit]
[    0.540000] pci 0000:00:00.0: supports D1
[    0.540000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.540000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
[    0.540000] pci 0000:00:00.0: using irq 40 for pin 1
[    0.550000] Switching to clocksource MIPS
[    0.550000] NET: Registered protocol family 2
[    0.560000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.560000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.570000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.570000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.580000] TCP reno registered
[    0.580000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.590000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.600000] NET: Registered protocol family 1
[    0.600000] PCI: CLS 0 bytes, default 32
[    0.620000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.620000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.630000] msgmni has been set to 56
[    0.640000] io scheduler noop registered
[    0.640000] io scheduler deadline registered (default)
[    0.650000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.680000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.690000] console [ttyS0] enabled, bootconsole disabled
[    0.700000] m25p80 spi0.0: found s25sl032a, expected m25p80
[    0.710000] m25p80 spi0.0: s25sl032a (4096 Kbytes)
[    0.710000] 5 tp-link partitions found on MTD device spi0.0
[    0.720000] Creating 5 MTD partitions on "spi0.0":
[    0.720000] 0x000000000000-0x000000020000 : "u-boot"
[    0.730000] 0x000000020000-0x00000011ca00 : "kernel"
[    0.730000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.750000] 0x00000011ca00-0x0000003f0000 : "rootfs"
[    0.750000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.770000] mtd: partition "rootfs" set to be root filesystem
[    0.770000] mtd: partition "rootfs_data" created automatically, ofs=290000, len=160000
[    0.780000] 0x000000290000-0x0000003f0000 : "rootfs_data"
[    0.790000] 0x0000003f0000-0x000000400000 : "art"
[    0.800000] 0x000000020000-0x0000003f0000 : "firmware"
[    1.050000] ag71xx_mdio: probed
[    1.050000] eth0: Atheros AG71xx at 0xba000000, irq 5
[    1.650000] eth0: Found an AR7240/AR9330 built-in switch
[    2.880000] eth1: Atheros AG71xx at 0xb9000000, irq 4
[    3.490000] ag71xx ag71xx.0: eth1: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[    3.500000] TCP westwood registered
[    3.500000] NET: Registered protocol family 17
[    3.500000] Bridge firewalling registered
[    3.510000] 8021q: 802.1Q VLAN Support v1.8
[    3.520000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    3.530000] Freeing unused kernel memory: 200k freed
[    6.770000] Registered led device: tp-link:green:system
[    6.770000] Registered led device: tp-link:green:qss
[    7.480000] eth0: link up (1000Mbps/Full duplex)
[   10.100000] JFFS2 notice: (429) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 11 of xref (0 dead, 4 orphan) found.
[   10.350000] eth0: link down
[   11.650000] Compat-wireless backport release: compat-wireless-2012-05-16-3-gde86a47
[   11.660000] Backport based on wireless-testing.git master-2012-05-29
[   11.660000] compat.git: wireless-testing.git
[   11.820000] cfg80211: Calling CRDA to update world regulatory domain
[   11.820000] cfg80211: World regulatory domain updated:
[   11.830000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   11.840000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.850000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   11.850000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   11.860000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.870000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.080000] usbcore: registered new interface driver usbfs
[   12.090000] usbcore: registered new interface driver hub
[   12.100000] usbcore: registered new device driver usb
[   12.580000] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[   12.590000] ath: EEPROM regdomain: 0x0
[   12.590000] ath: EEPROM indicates default country code should be used
[   12.590000] ath: doing EEPROM country->regdmn map search
[   12.590000] ath: country maps to regdmn code: 0x3a
[   12.590000] ath: Country alpha2 being used: US
[   12.590000] ath: Regpair used: 0x3a
[   12.590000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   12.600000] Registered led device: ath9k-phy0
[   12.600000] ieee80211 phy0: Atheros AR9287 Rev:2 mem=0xb0000000, irq=40
[   12.600000] cfg80211: Calling CRDA for country: US
[   12.610000] cfg80211: Regulatory domain changed to country: US
[   12.610000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   12.620000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   12.630000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[   12.640000] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.640000] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.650000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.660000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[   12.730000] PPP generic driver version 2.4.2
[   12.880000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.990000] NET: Registered protocol family 24
[   13.020000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   13.050000] nf_conntrack version 0.5.0 (456 buckets, 1824 max)
[   13.280000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   18.400000] device eth0 entered promiscuous mode
[   19.190000] eth0: link up (1000Mbps/Full duplex)
[   19.190000] br-lan: port 1(eth0) entered forwarding state
[   19.200000] br-lan: port 1(eth0) entered forwarding state
[   21.070000] eth1: link up (100Mbps/Full duplex)
[   21.200000] br-lan: port 1(eth0) entered forwarding state
[   21.220000] device wlan0 entered promiscuous mode
[   21.290000] br-lan: port 2(wlan0) entered forwarding state
[   21.300000] br-lan: port 2(wlan0) entered forwarding state
[   23.300000] br-lan: port 2(wlan0) entered forwarding state
[10588.530000] ath: phy0: Failed to stop TX DMA, queues=0x100!
[35203.210000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[133845.400000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[146230.530000] ath: phy0: Failed to stop TX DMA, queues=0x008!
[155588.920000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[163335.540000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[165974.320000] ath: phy0: Failed to stop TX DMA, queues=0x008!
[208010.100000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[221738.720000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[222324.500000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[223769.700000] ath: phy0: Failed to stop TX DMA, queues=0x008!
[228596.700000] ath: phy0: Failed to stop TX DMA, queues=0x008!
[231639.960000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[242050.010000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[278344.710000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[278819.160000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[284732.290000] ath: phy0: Failed to stop TX DMA, queues=0x100!
[300713.870000] ath: phy0: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x42000020 DMADBG_7=0x000042c0
[300713.880000] ath: phy0: Could not stop RX, we could be confusing the DMA engine when we start RX up
[307929.790000] ath: phy0: Failed to stop TX DMA, queues=0x100!
[327996.270000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[336837.700000] ath: phy0: Failed to stop TX DMA, queues=0x104!
[380644.160000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[466087.290000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[520925.710000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[552664.170000] ath: phy0: Failed to stop TX DMA, queues=0x008!
[563056.150000] ath: phy0: Failed to stop TX DMA, queues=0x100!
[615269.160000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[624596.060000] ath: phy0: Failed to stop TX DMA, queues=0x100!
[626430.440000] ath: phy0: Failed to stop TX DMA, queues=0x100!

Ping performance example, from a PC connected to the router through wireless, -39dBm signal strenght, ping to the router IP address:

C:\Users\9132>ping 192.168.3.254

Pinging 192.168.3.254 with 32 bytes of data:
Reply from 192.168.3.254: bytes=32 time=10ms TTL=64
Reply from 192.168.3.254: bytes=32 time=3116ms TTL=64
Request timed out.
Reply from 192.168.3.254: bytes=32 time=3494ms TTL=64

Ping statistics for 192.168.3.254:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 10ms, Maximum = 3494ms, Average = 2206ms

Hii sabidabi, thanks for your reply! I've changed to r32130 and the problem seems to be the same, and as it was said before, the problem is only on the wireless connection, using it as a router through the LAN ports work perfectly well even when the wireless is completelly broken. What seems strange to me is that I have three exactly equal routers (and firmware), two working as wireless access points only and one as an access point and router, and this problem only occurs on the one that is working as a router. It only manifests on the wireless channel, but it seems to be related to some interaction between the wireless and the routing functions, since it doesn't manifest on the units that have no routing functions (nothing connected on the WAN port and DHCP server disabled).

Fernando

Fernando, If all the routers have the same wireless configuration, this might be a valuable information for fixing the problem. I have referenced your post from the bug report, so the developer would look at it to see if this information might lead him to the root cause.

Hi Sabidabi, I confirm that all the routers have the same wireless configuration (802.11g+n, no encryption, access filtered by mac address, the mac address list is the same on all units). Currently I have disabled the wireless on the unit that is acting as a router and added an external AP (a TP-LINK TL-WR703N also running OpenWRT) to one of the LAN ports and all is working smoothly now. I have not monitored if I am still getting the "Failed to stop TX DMA" error, but everything is working normally, for more than a week without any rebooting (in the first days I was monitoring the log for the new AP, the TP-LINK TL-WR703N and found one or two errors "Failed to stop TX DMA", but there was no performance loss). In summary, now I have three TP-Link TL-WR841N/ND v7, one working as a router only, the other two working as AP only, and a TP-LINK TL-WR703N working as a AP. All the units working as AP are directly connected to the LAN ports of the one working as a router. If I activate the Wireless interface of the one that is working as a router, it stills behave well as a router (to the LAN ports), but the wireless performance is very bad, lots of lost pings, unpredictable roundtrip time, failed connections, etc. This does not happen on the units working as AP only, I've never reboot them (for more than one month now for the first two). If anyone needs any aditional diagnose on my system please let me know. Of course I want to remove the aditional TP-LINK TL-WR703N working a an AP, it is only there to be able to have wireless on the same floor where I have the router, if this problem is solved I can activate again the wireless interface on the router and remove this unit and put it where it belongs :-)

Fernando

Fernando,

Interesting theory. Did you verify it by swapping out your main router for one of the identical devices? If I read your description correctly, it does not seem to rule out a hardware issue in the wifi part of the device you're using as a router.

Hello Nbd

Yes, you are right, I have to make this aditional test to see if it is not an hardware issue on the wifi part of the router. I'll keep you posted when I am able to do this test, probabbly only possible in a few days.

Best regards

Fernando

The discussion might have continued from here.