[rt2x00-users] [bugzilla-daemon at bugzilla.kernel.org: [Bug 42828] rt2800pci unstable - chokes after too much I/O]

Stanislaw Gruszka sgruszka at redhat.com
Tue Nov 6 23:59:52 AEDT 2012


On Thu, Oct 18, 2012 at 08:48:22PM +0200, Andreas Hartmann wrote:
> > any insight on commit be03d4a45c09ee5100d3aaaedd087f19bc20d01f
> > regression described in kernel.org bug 42828 ?
> 
> Anyway, I retested with compat-wireless-3.5 rc5 and I can see a complete
> hanging connection after 3s of running netperf with
> 0011-Revert-rt2x00-Don-t-let-mac80211-send-a-BAR-when-an-.patch (2.4
> GHz, 40MHz) - the original problem and the reason for the patch.

Andreas, 

can you revert commit be03d4a45c09ee5100d3aaaedd087f19bc20d01f and test
below patch, does AP mode also hungs with that?

Stanislaw

diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 3af0cc4..e11d7a4 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -162,16 +162,17 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
 	ieee80211_free_txskb(&local->hw, skb);
 }
 
-static void ieee80211_check_pending_bar(struct sta_info *sta, u8 *addr, u8 tid)
+static bool ieee80211_send_pending_bar(struct sta_info *sta, u8 *addr, u8 tid)
 {
 	struct tid_ampdu_tx *tid_tx;
 
 	tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
 	if (!tid_tx || !tid_tx->bar_pending)
-		return;
+		return false;
 
 	tid_tx->bar_pending = false;
 	ieee80211_send_bar(&sta->sdata->vif, addr, tid, tid_tx->failed_bar_ssn);
+	return true;
 }
 
 static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
@@ -185,7 +186,7 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
 		u8 *qc = ieee80211_get_qos_ctl(hdr);
 		u16 tid = qc[0] & 0xf;
 
-		ieee80211_check_pending_bar(sta, hdr->addr1, tid);
+		ieee80211_send_pending_bar(sta, hdr->addr1, tid);
 	}
 
 	if (ieee80211_is_action(mgmt->frame_control) &&
@@ -409,10 +410,14 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 			qc = ieee80211_get_qos_ctl(hdr);
 			tid = qc[0] & 0xf;
-			ssn = ((le16_to_cpu(hdr->seq_ctrl) + 0x10)
-						& IEEE80211_SCTL_SEQ);
-			ieee80211_send_bar(&sta->sdata->vif, hdr->addr1,
-					   tid, ssn);
+
+			if (!ieee80211_send_pending_bar(&sta->sdata->vif,
+							hdr->addr1, tid)) {
+				ssn = ((le16_to_cpu(hdr->seq_ctrl) + 0x10) &
+						IEEE80211_SCTL_SEQ);
+				ieee80211_send_bar(&sta->sdata->vif, hdr->addr1,
+						   tid, ssn);
+			}
 		}
 
 		if (!acked && ieee80211_is_back_req(fc)) {




More information about the users mailing list