Commit a6701111 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: remove empty flag in mt76_txq_schedule_list

Remove empty flag in mt76_txq_schedule_list and mt76_txq_send_burst
since we just need retry_q length to notify mac80211 to reschedule the
current tx queue
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent b0b2373d
...@@ -378,7 +378,7 @@ EXPORT_SYMBOL_GPL(mt76_release_buffered_frames); ...@@ -378,7 +378,7 @@ EXPORT_SYMBOL_GPL(mt76_release_buffered_frames);
static int static int
mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_sw_queue *sq, mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_sw_queue *sq,
struct mt76_txq *mtxq, bool *empty) struct mt76_txq *mtxq)
{ {
struct ieee80211_txq *txq = mtxq_to_txq(mtxq); struct ieee80211_txq *txq = mtxq_to_txq(mtxq);
enum mt76_txq_id qid = mt76_txq_get_qid(txq); enum mt76_txq_id qid = mt76_txq_get_qid(txq);
...@@ -392,16 +392,12 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_sw_queue *sq, ...@@ -392,16 +392,12 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_sw_queue *sq,
bool probe; bool probe;
int idx; int idx;
if (test_bit(MT_WCID_FLAG_PS, &wcid->flags)) { if (test_bit(MT_WCID_FLAG_PS, &wcid->flags))
*empty = true;
return 0; return 0;
}
skb = mt76_txq_dequeue(dev, mtxq, false); skb = mt76_txq_dequeue(dev, mtxq, false);
if (!skb) { if (!skb)
*empty = true;
return 0; return 0;
}
info = IEEE80211_SKB_CB(skb); info = IEEE80211_SKB_CB(skb);
if (!(wcid->tx_info & MT_WCID_TX_INFO_SET)) if (!(wcid->tx_info & MT_WCID_TX_INFO_SET))
...@@ -431,10 +427,8 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_sw_queue *sq, ...@@ -431,10 +427,8 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_sw_queue *sq,
return -EBUSY; return -EBUSY;
skb = mt76_txq_dequeue(dev, mtxq, false); skb = mt76_txq_dequeue(dev, mtxq, false);
if (!skb) { if (!skb)
*empty = true;
break; break;
}
info = IEEE80211_SKB_CB(skb); info = IEEE80211_SKB_CB(skb);
cur_ampdu = info->flags & IEEE80211_TX_CTL_AMPDU; cur_ampdu = info->flags & IEEE80211_TX_CTL_AMPDU;
...@@ -481,8 +475,6 @@ mt76_txq_schedule_list(struct mt76_dev *dev, enum mt76_txq_id qid) ...@@ -481,8 +475,6 @@ mt76_txq_schedule_list(struct mt76_dev *dev, enum mt76_txq_id qid)
spin_lock_bh(&hwq->lock); spin_lock_bh(&hwq->lock);
while (1) { while (1) {
bool empty = false;
if (sq->swq_queued >= 4) if (sq->swq_queued >= 4)
break; break;
...@@ -513,10 +505,9 @@ mt76_txq_schedule_list(struct mt76_dev *dev, enum mt76_txq_id qid) ...@@ -513,10 +505,9 @@ mt76_txq_schedule_list(struct mt76_dev *dev, enum mt76_txq_id qid)
spin_lock_bh(&hwq->lock); spin_lock_bh(&hwq->lock);
} }
ret += mt76_txq_send_burst(dev, sq, mtxq, &empty); ret += mt76_txq_send_burst(dev, sq, mtxq);
if (skb_queue_empty(&mtxq->retry_q)) ieee80211_return_txq(dev->hw, txq,
empty = true; !skb_queue_empty(&mtxq->retry_q));
ieee80211_return_txq(dev->hw, txq, !empty);
} }
spin_unlock_bh(&hwq->lock); spin_unlock_bh(&hwq->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment