Modify

Opened 7 years ago

Closed 7 years ago

Last modified 22 months ago

#4968 closed defect (worksforme)

ar71xx/mac80211/ath9k: accesspoint degenerates over time

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: ath9k mac80211 ar71xx Cc:

Description

I've been trying out trunk r15106 on a TP-LINK TL-WR941ND (ar71xx platform with mac80211/ath9k wifi driver) for a week or so.

It works fine for the first couple of minutes/hours but then slowly begins to deteriorate: it becomes increasingly difficult to associate with it (client times out) and once associated packetloss increases to the 50-75% range and roundtrip times increase to 10-20 seconds. After 24 hours it is almost certainly completely dead.

How to reproduce:

  1. Setup a client that connects to the router and pings it overnight.

Expected result: Client should still be pinging the router next day.

Actual result: Client has lost association and cannot connect again, or packetloss is 50-75%.

Attachments (0)

Change History (5)

comment:1 Changed 7 years ago by anonymous

I tried updating compat-wireless to 2008-04-20 and hostapd to latest git snapshot. Still same problem. After enabling debug and sifting through some code I came up with this fix in mac80211:

[code]
--- compat-wireless-2009-04-20-orig/net/mac80211/agg-rx.c 2009-04-26 15:46:47.000000000 +0200
+++ compat-wireless-2009-04-20/net/mac80211/agg-rx.c 2009-04-26 17:50:15.000000000 +0200
@@ -210,7 +210,7 @@

  • and if buffer size does not exceeds max value */

/* XXX: check own ht delayed BA capability?? */
if (((ba_policy != 1)

  • && (!(sta->sta.ht_cap.cap & IEEE80211_HT_CAP_DELAY_BA)))
+ && (!(sta->sta.ht_cap.cap & IEEE80211_HT_CAP_DELAY_BA))
/* own capab: */ !0)
(buf_size > IEEE80211_MAX_AMPDU_BUF)) {

status = WLAN_STATUS_INVALID_QOS_PARAM;

#ifdef CONFIG_MAC80211_HT_DEBUG

code

Now the AP is very stable. :)

There is however more stuff related to power save on kernel 2.6.28 which is broken. I tried this patch and it does "work" but I'm not sure it is much better than before:

[code]
--- compat-wireless-2009-04-20-orig/net/mac80211/rx.c 2009-04-26 15:46:47.000000000 +0200
+++ compat-wireless-2009-04-20/net/mac80211/rx.c 2009-04-27 19:15:22.000000000 +0200
@@ -806,28 +806,29 @@

/* Send all buffered frames to the station */
while ((skb = skb_dequeue(&sta->tx_filtered)) != NULL) {

-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,28))

  • dev_kfree_skb(skb);

-#else

  • sent++;

+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))

skb->requeue = 1;

  • dev_queue_xmit(skb); #endif

+ sent++;
+#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
+ printk(KERN_DEBUG "%s: STA %pM aid %d send TX filtered frame "
+ "since STA not sleeping anymore\n", sdata->dev->name,
+ sta->sta.addr, sta->sta.aid);
+#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
+ dev_queue_xmit(skb);

}
while ((skb = skb_dequeue(&sta->ps_tx_buf)) != NULL) {

local->total_ps_buffered--;

#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))

+ skb->requeue = 1;
+#endif

sent++;

#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG

printk(KERN_DEBUG "%s: STA %pM aid %d send PS frame "

"since STA not sleeping anymore\n", sdata->dev->name,
sta->sta.addr, sta->sta.aid);

#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */

  • skb->requeue = 1;

dev_queue_xmit(skb);

-#else

  • dev_kfree_skb(skb);

-#endif

}


return sent;

code

comment:2 Changed 7 years ago by anonymous

Oops, patches should have been

--- compat-wireless-2009-04-20-orig/net/mac80211/agg-rx.c	2009-04-26 15:46:47.000000000 +0200
+++ compat-wireless-2009-04-20/net/mac80211/agg-rx.c	2009-04-26 17:50:15.000000000 +0200
@@ -210,7 +210,7 @@
 	 * and if buffer size does not exceeds max value */
 	/* XXX: check own ht delayed BA capability?? */
 	if (((ba_policy != 1)
-		&& (!(sta->sta.ht_cap.cap & IEEE80211_HT_CAP_DELAY_BA)))
+		&& (!(sta->sta.ht_cap.cap & IEEE80211_HT_CAP_DELAY_BA)) || /* own capab: */ !0)
 		|| (buf_size > IEEE80211_MAX_AMPDU_BUF)) {
 		status = WLAN_STATUS_INVALID_QOS_PARAM;
 #ifdef CONFIG_MAC80211_HT_DEBUG

and

--- compat-wireless-2009-04-20-orig/net/mac80211/rx.c	2009-04-26 15:46:47.000000000 +0200
+++ compat-wireless-2009-04-20/net/mac80211/rx.c	2009-04-27 19:15:22.000000000 +0200
@@ -806,28 +806,29 @@
 
 	/* Send all buffered frames to the station */
 	while ((skb = skb_dequeue(&sta->tx_filtered)) != NULL) {
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,28))
-		dev_kfree_skb(skb);
-#else
-		sent++;
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
 		skb->requeue = 1;
-		dev_queue_xmit(skb);
 #endif
+		sent++;
+#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
+		printk(KERN_DEBUG "%s: STA %pM aid %d send TX filtered frame "
+		       "since STA not sleeping anymore\n", sdata->dev->name,
+		       sta->sta.addr, sta->sta.aid);
+#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
+		dev_queue_xmit(skb);
 	}
 	while ((skb = skb_dequeue(&sta->ps_tx_buf)) != NULL) {
 		local->total_ps_buffered--;
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
+		skb->requeue = 1;
+#endif
 		sent++;
 #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
 		printk(KERN_DEBUG "%s: STA %pM aid %d send PS frame "
 		       "since STA not sleeping anymore\n", sdata->dev->name,
 		       sta->sta.addr, sta->sta.aid);
 #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
-		skb->requeue = 1;
 		dev_queue_xmit(skb);
-#else
-		dev_kfree_skb(skb);
-#endif
 	}
 
 	return sent;

comment:3 Changed 7 years ago by mcgrof

can you please provide a URL to a patch not for compat-wireless but for wireless-testing as of today? This patch is hard to read here. Also if you can explain your logic that would help. Best is to just post a patch to linux-wireless as RFC.

Then if you want you can post a patch to compat-wireless. Reviewing this on this web interface is just hard to read. It'll be good to split it up between a wireless-testing patch and a compat-wireless patch.

comment:4 Changed 7 years ago by nbd

  • Resolution set to worksforme
  • Status changed from new to closed

apparently this issue is resolved in newer versions. Here's my iperf result of an over-night data transfer:
[ 3] 0.0-32240.9 sec 242 GBytes 64.5 Mbits/sec

comment:5 Changed 22 months ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.