mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
move tx queue wake to common code outside of locked section, fixes queue wake on mt7603
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -134,6 +134,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
|
||||
{
|
||||
struct mt76_queue *q = &dev->q_tx[qid];
|
||||
struct mt76_queue_entry entry;
|
||||
bool wake = false;
|
||||
int last;
|
||||
|
||||
if (!q->ndesc)
|
||||
@@ -153,8 +154,10 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
|
||||
if (entry.skb)
|
||||
dev->drv->tx_complete_skb(dev, q, &entry, flush);
|
||||
|
||||
if (entry.txwi)
|
||||
if (entry.txwi) {
|
||||
mt76_put_txwi(dev, entry.txwi);
|
||||
wake = true;
|
||||
}
|
||||
|
||||
q->tail = (q->tail + 1) % q->ndesc;
|
||||
q->queued--;
|
||||
@@ -168,7 +171,11 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
|
||||
else
|
||||
mt76_dma_sync_idx(dev, q);
|
||||
|
||||
wake = wake && qid < IEEE80211_NUM_ACS && q->queued < q->ndesc - 8;
|
||||
spin_unlock_bh(&q->lock);
|
||||
|
||||
if (wake)
|
||||
ieee80211_wake_queue(dev->hw, qid);
|
||||
}
|
||||
|
||||
static void *
|
||||
|
||||
@@ -41,8 +41,6 @@ void mt76x2_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
|
||||
void mt76x2_tx_complete(struct mt76x2_dev *dev, struct sk_buff *skb)
|
||||
{
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
struct mt76_queue *q;
|
||||
int qid = skb_get_queue_mapping(skb);
|
||||
|
||||
if (info->flags & IEEE80211_TX_CTL_AMPDU) {
|
||||
ieee80211_free_txskb(mt76_hw(dev), skb);
|
||||
@@ -52,10 +50,6 @@ void mt76x2_tx_complete(struct mt76x2_dev *dev, struct sk_buff *skb)
|
||||
info->flags |= IEEE80211_TX_STAT_ACK;
|
||||
ieee80211_tx_status(mt76_hw(dev), skb);
|
||||
}
|
||||
|
||||
q = &dev->mt76.q_tx[qid];
|
||||
if (q->queued < q->ndesc - 8)
|
||||
ieee80211_wake_queue(mt76_hw(dev), qid);
|
||||
}
|
||||
|
||||
int mt76x2_tx_prepare_skb(struct mt76_dev *mdev, void *txwi,
|
||||
|
||||
Reference in New Issue
Block a user