diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2020-07-15 14:46:27 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-07-21 19:01:18 +0200 |
commit | 75b10f0cbd0b9ff5d6a8f0c3ee5ce4193cd0450a (patch) | |
tree | 7e7bae139e7be69112a2070a053275b862527653 /drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | |
parent | cdcba424814d79e3dbffa06668f72099288a23f6 (diff) | |
download | linux-stable-75b10f0cbd0b9ff5d6a8f0c3ee5ce4193cd0450a.tar.gz linux-stable-75b10f0cbd0b9ff5d6a8f0c3ee5ce4193cd0450a.tar.bz2 linux-stable-75b10f0cbd0b9ff5d6a8f0c3ee5ce4193cd0450a.zip |
mt76: mt76u: add mt76_skb_adjust_pad utility routine
Introduce mt76_skb_adjust_pad to reuse the code adding sdio support to
mt7615 driver and remove code duplication. Move 4B header configuration
for usb devices out of mt76_skb_adjust_pad
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c index 0180b6200b17..37321e656776 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c @@ -56,8 +56,9 @@ int mt76x02u_skb_dma_info(struct sk_buff *skb, int port, u32 flags) */ info = FIELD_PREP(MT_TXD_INFO_LEN, round_up(skb->len, 4)) | FIELD_PREP(MT_TXD_INFO_DPORT, port) | flags; + put_unaligned_le32(info, skb_push(skb, sizeof(info))); - return mt76u_skb_dma_info(skb, info); + return mt76_skb_adjust_pad(skb); } int mt76x02u_tx_prepare_skb(struct mt76_dev *mdev, void *data, |