[rt2x00-users] Test patch (Was: rt2800pci unstable - chokes after too much I/O)

Stanislaw Gruszka sgruszka at redhat.com
Sat Oct 20 00:28:29 AEDT 2012


On Thu, Oct 18, 2012 at 11:04:06PM +0100, Francisco Pina Martins wrote:
> I am not sure how to find the "rf" and "rev" values.

We have that information already from your dmesg.

Below is patch based on Andreas idea to difference AP and STA
modes, please check it.

[ However I think someone (probably me) need to investigate
this problem more deeply to find some better solution. ]

Stanislaw

diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 69097d1..82f2873 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -279,7 +279,7 @@ void rt2x00lib_txdone(struct queue_entry *entry,
 	unsigned int header_length, i;
 	u8 rate_idx, rate_flags, retry_rates;
 	u8 skbdesc_flags = skbdesc->flags;
-	bool success;
+	bool success, is_ap;
 
 	/*
 	 * Unmap the skb.
@@ -340,6 +340,8 @@ void rt2x00lib_txdone(struct queue_entry *entry,
 	retry_rates = test_bit(TXDONE_FALLBACK, &txdesc->flags) ?
 	    (txdesc->retry + 1) : 1;
 
+	is_ap = tx_info->control.vif->type == NL80211_IFTYPE_AP;
+
 	/*
 	 * Initialize TX status
 	 */
@@ -391,10 +393,9 @@ void rt2x00lib_txdone(struct queue_entry *entry,
 		tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
 		tx_info->status.ampdu_len = 1;
 		tx_info->status.ampdu_ack_len = success ? 1 : 0;
-		/*
-		 * TODO: Need to tear down BA session here
-		 * if not successful.
-		 */
+
+		if (!success && !is_ap)
+			tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;
 	}
 
 	if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) {






More information about the users mailing list