diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-09-02 13:39:00 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-09-24 18:10:18 +0200 |
commit | 2bffddedfcd48b6391c735f35aeabf17a4745cd5 (patch) | |
tree | cea11dbace9ad87b0b1f19c842797dd6f75903a3 /drivers/net/wireless/mediatek/mt76/tx.c | |
parent | dd57a95cfddc12653582d99a5127b39795c7f657 (diff) | |
download | linux-stable-2bffddedfcd48b6391c735f35aeabf17a4745cd5.tar.gz linux-stable-2bffddedfcd48b6391c735f35aeabf17a4745cd5.tar.bz2 linux-stable-2bffddedfcd48b6391c735f35aeabf17a4745cd5.zip |
mt76: remove retry_q from struct mt76_txq and related code
Since the switch to using AQL by default, mtxq->retry_q is never filled anymore
Remove it to get rid of a few more unnecessary cycles in the tx path
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/tx.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/tx.c | 51 |
1 files changed, 6 insertions, 45 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c index 007444385797..bf7a6b3a8db0 100644 --- a/drivers/net/wireless/mediatek/mt76/tx.c +++ b/drivers/net/wireless/mediatek/mt76/tx.c @@ -301,23 +301,13 @@ mt76_tx(struct mt76_phy *phy, struct ieee80211_sta *sta, EXPORT_SYMBOL_GPL(mt76_tx); static struct sk_buff * -mt76_txq_dequeue(struct mt76_phy *phy, struct mt76_txq *mtxq, bool ps) +mt76_txq_dequeue(struct mt76_phy *phy, struct mt76_txq *mtxq) { struct ieee80211_txq *txq = mtxq_to_txq(mtxq); struct ieee80211_tx_info *info; bool ext_phy = phy != &phy->dev->phy; struct sk_buff *skb; - skb = skb_dequeue(&mtxq->retry_q); - if (skb) { - u8 tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK; - - if (ps && skb_queue_empty(&mtxq->retry_q)) - ieee80211_sta_set_buffered(txq->sta, tid, false); - - return skb; - } - skb = ieee80211_tx_dequeue(phy->hw, txq); if (!skb) return NULL; @@ -367,7 +357,7 @@ mt76_release_buffered_frames(struct ieee80211_hw *hw, struct ieee80211_sta *sta, continue; do { - skb = mt76_txq_dequeue(phy, mtxq, true); + skb = mt76_txq_dequeue(phy, mtxq); if (!skb) break; @@ -410,7 +400,7 @@ mt76_txq_send_burst(struct mt76_phy *phy, struct mt76_queue *q, if (atomic_read(&wcid->non_aql_packets) >= MT_MAX_NON_AQL_PKT) return 0; - skb = mt76_txq_dequeue(phy, mtxq, false); + skb = mt76_txq_dequeue(phy, mtxq); if (!skb) return 0; @@ -434,7 +424,7 @@ mt76_txq_send_burst(struct mt76_phy *phy, struct mt76_queue *q, if (q->queued + MT_TXQ_FREE_THR >= q->ndesc) break; - skb = mt76_txq_dequeue(phy, mtxq, false); + skb = mt76_txq_dequeue(phy, mtxq); if (!skb) break; @@ -499,8 +489,7 @@ mt76_txq_schedule_list(struct mt76_phy *phy, enum mt76_txq_id qid) } ret += mt76_txq_send_burst(phy, q, mtxq); - ieee80211_return_txq(phy->hw, txq, - !skb_queue_empty(&mtxq->retry_q)); + ieee80211_return_txq(phy->hw, txq, false); } spin_unlock_bh(&q->lock); @@ -562,8 +551,8 @@ void mt76_stop_tx_queues(struct mt76_dev *dev, struct ieee80211_sta *sta, if (!txq) continue; + hwq = dev->q_tx[mt76_txq_get_qid(txq)]; mtxq = (struct mt76_txq *)txq->drv_priv; - hwq = mtxq->q; spin_lock_bh(&hwq->lock); mtxq->send_bar = mtxq->aggr && send_bar; @@ -584,34 +573,6 @@ void mt76_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq) } EXPORT_SYMBOL_GPL(mt76_wake_tx_queue); -void mt76_txq_remove(struct mt76_dev *dev, struct ieee80211_txq *txq) -{ - struct ieee80211_hw *hw; - struct mt76_txq *mtxq; - struct sk_buff *skb; - - if (!txq) - return; - - mtxq = (struct mt76_txq *)txq->drv_priv; - - while ((skb = skb_dequeue(&mtxq->retry_q)) != NULL) { - hw = mt76_tx_status_get_hw(dev, skb); - ieee80211_free_txskb(hw, skb); - } -} -EXPORT_SYMBOL_GPL(mt76_txq_remove); - -void mt76_txq_init(struct mt76_dev *dev, struct ieee80211_txq *txq) -{ - struct mt76_txq *mtxq = (struct mt76_txq *)txq->drv_priv; - - skb_queue_head_init(&mtxq->retry_q); - - mtxq->q = dev->q_tx[mt76_txq_get_qid(txq)]; -} -EXPORT_SYMBOL_GPL(mt76_txq_init); - u8 mt76_ac_to_hwq(u8 ac) { static const u8 wmm_queue_map[] = { |