OpenWrt Forum Archive

Topic: TP-Link WR1043ND Wi-Fi & reboot problems

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

When I use the internet via wi-fi, in the log appear these messages:

[  648.390000] ath: phy0: Failed to stop TX DMA, queues=0x005!
[  648.690000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[  649.100000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[  650.950000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[  652.580000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[  652.990000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[15345.520000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[15360.670000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[15363.440000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[15364.770000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[15367.640000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[15370.200000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[15374.090000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[15374.700000] ath: phy0: Failed to stop TX DMA, queues=0x004!

And the connection is not stable. Please help.

Tp-Link WR1043ND V2.1
OpenWrt Barrier Breaker r41055 / LuCI Trunk (svn-r10276)

P.S
In addition, router does not restart using cli or web interface.

(Last edited by Vahe91 on 9 Jun 2014, 21:19)

This bug is one of the most annoying on openwrt I run into. They have been much more common on AA, BB works fine for me, mainly because I moved my router closer, the appears much more often when you have weak signal.

This worked for me:

# 1. vi /etc/config/checktxdma.sh and paste following

if dmesg | grep -q  "Failed to stop TX DMA" ; then
  wifi
fi

# 2. make it executable using chmod +x /etc/config/checktxdma.sh

# 3. add to cron using crontab -e

# minuto(0-59) hora(0-23) mesdia(1-31) mes(1-12) diasemana(0-6) comando
*/1 * * * * /etc/config/checktxdma.sh

Whenever this occurs, script will detect it and restarts wifi, which solves the problem for a while. Not a cure, but at least this allowed me to use me openwrt in a place with weak signal.

(Last edited by nozombian on 10 Jun 2014, 06:53)

nozombian wrote:

This bug is one of the most annoying on openwrt I run into. They have been much more common on AA, BB works fine for me, mainly because I moved my router closer, the appears much more often when you have weak signal.

This worked for me:

# 1. vi /etc/config/checktxdma.sh and paste following

if dmesg | grep -q  "Failed to stop TX DMA" ; then
  wifi
fi

# 2. make it executable using chmod +x /etc/config/checktxdma.sh

# 3. add to cron using crontab -e

# minuto(0-59) hora(0-23) mesdia(1-31) mes(1-12) diasemana(0-6) comando
*/1 * * * * /etc/config/checktxdma.sh

Whenever this occurs, script will detect it and restarts wifi, which solves the problem for a while. Not a cure, but at least this allowed me to use me openwrt in a place with weak signal.

I'm sorry, but are you sure of this script ? Will it not go into "wifi" loop if you have just a single error in dmesg?

fcecamor wrote:

Will it not go into "wifi" loop if you have just a single error in dmesg?

Yeah, that...

You are right, this would really restart wifi every minute after first tx dma occurence sad I never noticed that because I invoked the script only once in a longer period smile Luckily I don't need it anymore, I run into tx dma long time ago, maybe yet on AA.

It would be probably better to test iwinfo wlan0 assoclist and when noone is connected, restart of wifi would not hurt. TX DMA probably kicks all the clients out anyway.

(Last edited by nozombian on 12 Jun 2014, 06:51)

Problem with Wi-Fi was not resolved in the latest trunk.

I have a lot of trouble on a TL-WR2543N with wifi disconnects, too. As the bug seems not fixed the idea for a restart script maybe will keep the wifi incidents short.

I put a little bit of logic and checking into a script and testing it on my router in crontab every minute. It keeps the number of lines from dmesg output in file /tmp/dmesg.lines. If number of lines is greater then last run it checks the new lines for string "Failed to stop TX DMA, queues=0x004". If string was found wifi will be restarted.

Here is my script:
=======================================
if [ ! -s /tmp/dmesg.lines ]; then
    echo 0 > /tmp/dmesg.lines
fi

OLINES=$(cat /tmp/dmesg.lines)
NLINES=$(dmesg | wc -l)

if [ $NLINES -gt $OLINES ]; then
    let GLINES=$OLINES+1
    if dmesg | tail +$GLINES | grep -q "Failed to stop TX DMA, queues=0x004"; then
        wifi
    fi
fi
   
echo $NLINES > /tmp/dmesg.lines
=======================================

Shucks, now I have to confirm this seems to be evergreen :-( Still not fixed.

[62256.650000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[62279.280000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[88513.510000] ath: phy0: Failed to stop TX DMA, queues=0x00d!
[88568.080000] ath: phy0: Failed to stop TX DMA, queues=0x004!
[88813.250000] ath: phy0: Failed to stop TX DMA, queues=0x00d!
[88976.260000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[88976.770000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[88978.920000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[88981.070000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[88997.560000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[88999.300000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89082.550000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[89083.990000] ath: phy0: Failed to stop TX DMA, queues=0x00d!
[89101.500000] ath: phy0: Failed to stop TX DMA, queues=0x18c!
[89103.960000] ath: phy0: Failed to stop TX DMA, queues=0x18c!
[89108.470000] ath: phy0: Failed to stop TX DMA, queues=0x18c!
[89125.360000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[89138.360000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89159.350000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[89181.780000] ath: phy0: Failed to stop TX DMA, queues=0x00d!
[89188.230000] ath: phy0: Failed to stop TX DMA, queues=0x00d!
[89194.270000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89247.110000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89249.670000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89251.620000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89278.040000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89293.500000] ath: phy0: Failed to stop TX DMA, queues=0x00d!
[89300.970000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[89369.280000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89457.030000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89459.010000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[89464.500000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[89468.600000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[89473.520000] ath: phy0: Failed to stop TX DMA, queues=0x00d!
[89517.180000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[89589.740000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[89603.260000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[89609.710000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89620.770000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89621.590000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89623.740000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89666.540000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89713.440000] ath: phy0: Failed to stop TX DMA, queues=0x00d!
[89740.880000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[89778.780000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89881.480000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[89927.370000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[89961.350000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90038.160000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90039.600000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90073.490000] ath: phy0: Failed to stop TX DMA, queues=0x10d!
[90178.250000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90187.760000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90205.180000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90232.120000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90263.550000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90273.570000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90293.030000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90293.540000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90293.960000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90301.440000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90308.190000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90318.420000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90339.140000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90370.760000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90385.810000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90394.710000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90414.170000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90441.300000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90452.470000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90454.320000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90457.070000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90463.010000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90493.760000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90503.610000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90641.380000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90664.940000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90667.510000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90667.810000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90668.940000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90670.170000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90671.700000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90672.420000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90673.350000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90674.370000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90674.670000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90675.290000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90675.800000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90676.830000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90679.040000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90679.630000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90680.300000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90683.480000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90685.530000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90691.770000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90692.090000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90693.000000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90693.720000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90697.710000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90701.910000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90715.430000] ath: phy0: Failed to stop TX DMA, queues=0x10c!
[90794.240000] ath: phy0: Failed to stop TX DMA, queues=0x00c!
[90794.690000] ath: phy0: Failed to stop TX DMA, queues=0x00d!
[90854.600000] ath: phy0: Failed to stop TX DMA, queues=0x00d!
[91415.230000] ath: phy0: Failed to stop TX DMA, queues=0x104!
[92608.710000] ath: phy0: Failed to stop TX DMA, queues=0x104!
[148382.720000] ath: phy0: Failed to stop TX DMA, queues=0x104!
[156728.580000] ath: phy0: Failed to stop TX DMA, queues=0x085!
[170823.500000] ath: phy0: Failed to stop TX DMA, queues=0x104!

tl-wr1043nd v2 CHAOS CALMER (Bleeding Edge, r42309), this started when I moved my laptop to a more distant room, where the signal is weaker than usual. So it is probably still the same bug which happens mostly when you have only one or two wifi bars.

(Last edited by nozombian on 3 Oct 2014, 14:16)

The discussion might have continued from here.