diff --git a/mt76x2.h b/mt76x2.h index 267f65eb..9da5f42f 100644 --- a/mt76x2.h +++ b/mt76x2.h @@ -214,9 +214,6 @@ void mt76x2_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q, void mt76x2_pre_tbtt_tasklet(unsigned long data); -void mt76x2_txq_init(struct mt76x2_dev *dev, struct ieee80211_txq *txq); - - void mt76x2_rx_poll_complete(struct mt76_dev *dev, enum mt76_rxq_id q); void mt76x2_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q, struct sk_buff *skb); diff --git a/mt76x2_main.c b/mt76x2_main.c index 65e89f9f..98e8eb13 100644 --- a/mt76x2_main.c +++ b/mt76x2_main.c @@ -50,6 +50,26 @@ mt76x2_stop(struct ieee80211_hw *hw) mutex_unlock(&dev->mutex); } +static void +mt76x2_txq_init(struct mt76x2_dev *dev, struct ieee80211_txq *txq) +{ + struct mt76_txq *mtxq; + + if (!txq) + return; + + mtxq = (struct mt76_txq *) txq->drv_priv; + if (txq->sta) { + struct mt76x2_sta *sta = (struct mt76x2_sta *) txq->sta->drv_priv; + mtxq->wcid = &sta->wcid; + } else { + struct mt76x2_vif *mvif = (struct mt76x2_vif *) txq->vif->drv_priv; + mtxq->wcid = &mvif->group_wcid; + } + + mt76_txq_init(&dev->mt76, txq); +} + static int mt76x2_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { diff --git a/mt76x2_tx.c b/mt76x2_tx.c index 925a8b25..c77b9502 100644 --- a/mt76x2_tx.c +++ b/mt76x2_tx.c @@ -172,21 +172,3 @@ void mt76x2_pre_tbtt_tasklet(unsigned long arg) spin_unlock_bh(&q->lock); } -void mt76x2_txq_init(struct mt76x2_dev *dev, struct ieee80211_txq *txq) -{ - struct mt76_txq *mtxq; - - if (!txq) - return; - - mtxq = (struct mt76_txq *) txq->drv_priv; - if (txq->sta) { - struct mt76x2_sta *sta = (struct mt76x2_sta *) txq->sta->drv_priv; - mtxq->wcid = &sta->wcid; - } else { - struct mt76x2_vif *mvif = (struct mt76x2_vif *) txq->vif->drv_priv; - mtxq->wcid = &mvif->group_wcid; - } - - mt76_txq_init(&dev->mt76, txq); -}