mt76: move mt76x02_insert_hdr_pad in mt76-core module

Move mt76x02_insert_hdr_pad in m76-core and rename it in
mt76_insert_hdr_pad in order to be used in mt76_dma_tx_queue_skb.
This is a preliminary patch in order to properly support tx dma
mapping for new chipsets (e.g. mt7615)

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2019-03-14 22:09:32 +01:00
committed by Felix Fietkau
parent 312f6fc6f6
commit 0fe6386820
5 changed files with 16 additions and 22 deletions
+1 -4
View File
@@ -155,7 +155,6 @@ int mt76x02_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
struct mt76x02_txwi *txwi = txwi_ptr;
int qsel = MT_QSEL_EDCA;
int pid;
int ret;
if (qid == MT_TXQ_PSD && wcid && wcid->idx < 128)
mt76x02_mac_wcid_set_drop(dev, wcid->idx, false);
@@ -165,9 +164,7 @@ int mt76x02_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
pid = mt76_tx_status_skb_add(mdev, wcid, skb);
txwi->pktid = pid;
ret = mt76x02_insert_hdr_pad(skb);
if (ret < 0)
return ret;
mt76_insert_hdr_pad(skb);
if (pid >= MT_PACKET_ID_FIRST)
qsel = MT_QSEL_MGMT;