diff --git a/main.c b/main.c index 22817849..8c09a179 100644 --- a/main.c +++ b/main.c @@ -417,10 +417,13 @@ mt76_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, mt76_clear(dev, MT_WCID_ADDR(msta->wcid.idx)+4, BIT(16 + tid)); break; case IEEE80211_AMPDU_TX_OPERATIONAL: + mtxq->aggr = true; + mtxq->send_bar = false; ieee80211_send_bar(vif, sta->addr, tid, cpu_to_le16(mtxq->agg_ssn)); break; case IEEE80211_AMPDU_TX_STOP_FLUSH: case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT: + mtxq->aggr = false; ieee80211_send_bar(vif, sta->addr, tid, cpu_to_le16(mtxq->agg_ssn)); break; case IEEE80211_AMPDU_TX_START: diff --git a/mt76.h b/mt76.h index f011d005..2eac8f1c 100644 --- a/mt76.h +++ b/mt76.h @@ -260,6 +260,7 @@ struct mt76_txq { u16 agg_ssn; bool send_bar; + bool aggr; }; struct mt76_reg_pair { diff --git a/tx.c b/tx.c index ef13b79c..df46fd8d 100644 --- a/tx.c +++ b/tx.c @@ -360,7 +360,7 @@ mt76_txq_schedule_list(struct mt76_dev *dev, struct mt76_queue *hwq) int cur; mtxq = list_first_entry(&hwq->swq, struct mt76_txq, list); - if (mtxq->send_bar) { + if (mtxq->send_bar && mtxq->aggr) { struct ieee80211_txq *txq = mtxq_to_txq(mtxq); mtxq->send_bar = false;