mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: add more conditions for stopping tx scheduling
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -375,6 +375,13 @@ mt76_release_buffered_frames(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_release_buffered_frames);
|
||||
|
||||
static bool
|
||||
mt76_txq_stopped(struct mt76_queue *q)
|
||||
{
|
||||
return q->stopped || q->blocked ||
|
||||
q->queued + MT_TXQ_FREE_THR >= q->ndesc;
|
||||
}
|
||||
|
||||
static int
|
||||
mt76_txq_send_burst(struct mt76_phy *phy, struct mt76_queue *q,
|
||||
struct mt76_txq *mtxq)
|
||||
@@ -413,10 +420,7 @@ mt76_txq_send_burst(struct mt76_phy *phy, struct mt76_queue *q,
|
||||
test_bit(MT76_RESET, &phy->state))
|
||||
return -EBUSY;
|
||||
|
||||
if (stop)
|
||||
break;
|
||||
|
||||
if (q->queued + MT_TXQ_FREE_THR >= q->ndesc)
|
||||
if (stop || mt76_txq_stopped(q))
|
||||
break;
|
||||
|
||||
skb = mt76_txq_dequeue(phy, mtxq);
|
||||
@@ -458,9 +462,6 @@ mt76_txq_schedule_list(struct mt76_phy *phy, enum mt76_txq_id qid)
|
||||
break;
|
||||
}
|
||||
|
||||
if (q->stopped || q->blocked)
|
||||
break;
|
||||
|
||||
if (dev->queue_ops->tx_cleanup &&
|
||||
q->queued + 2 * MT_TXQ_FREE_THR >= q->ndesc) {
|
||||
spin_unlock_bh(&q->lock);
|
||||
@@ -468,7 +469,7 @@ mt76_txq_schedule_list(struct mt76_phy *phy, enum mt76_txq_id qid)
|
||||
spin_lock_bh(&q->lock);
|
||||
}
|
||||
|
||||
if (q->queued + MT_TXQ_FREE_THR >= q->ndesc)
|
||||
if (mt76_txq_stopped(q))
|
||||
break;
|
||||
|
||||
txq = ieee80211_next_txq(phy->hw, qid);
|
||||
|
||||
Reference in New Issue
Block a user