diff options
author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2018-09-06 11:18:23 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-09-19 12:29:33 +0200 |
commit | 8c6adb7862d41297a58ad568197f2f535eb10d4b (patch) | |
tree | e6bb691b48a94011c9bd011f57464a95cf0fabb6 /drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | |
parent | 41868f984e71d4ff3100e0b3b81bfa747d05c273 (diff) | |
download | linux-stable-8c6adb7862d41297a58ad568197f2f535eb10d4b.tar.gz linux-stable-8c6adb7862d41297a58ad568197f2f535eb10d4b.tar.bz2 linux-stable-8c6adb7862d41297a58ad568197f2f535eb10d4b.zip |
mt76x0: introduce mt76x0_tx_prepare_skb routine
Add mt76x0_tx_prepare_skb routine as tx txwi handler.
mt76x0_tx_prepare_skb will be used by mt76-usb layer
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x0/tx.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/tx.c b/drivers/net/wireless/mediatek/mt76/mt76x0/tx.c index de2643d54a1e..4cafd30d2c0a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/tx.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/tx.c @@ -116,6 +116,21 @@ void mt76x0_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, trace_mt76x0_tx(&dev->mt76, skb, msta, txwi); } +int mt76x0_tx_prepare_skb(struct mt76_dev *mdev, void *data, + struct sk_buff *skb, struct mt76_queue *q, + struct mt76_wcid *wcid, struct ieee80211_sta *sta, + u32 *tx_info) +{ + struct mt76x0_dev *dev = container_of(mdev, struct mt76x0_dev, mt76); + struct mt76x02_txwi *txwi; + int len = skb->len; + + mt76x02_insert_hdr_pad(skb); + txwi = mt76x0_push_txwi(dev, skb, sta, wcid, len); + + return mt76x02_set_txinfo(skb, wcid, q2ep(q->hw_idx)); +} + void mt76x0_tx_stat(struct work_struct *work) { struct mt76x0_dev *dev = container_of(work, struct mt76x0_dev, |