mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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 <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
8c0a25d6a3
commit
c0cbef79eb
+5
-3
@@ -252,7 +252,8 @@ mt7663u_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
|
||||
{
|
||||
struct mt7615_sta *msta = container_of(wcid, struct mt7615_sta, wcid);
|
||||
struct mt7615_dev *dev = container_of(mdev, struct mt7615_dev, mt76);
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_info->skb);
|
||||
struct sk_buff *skb = tx_info->skb;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
|
||||
if ((info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) &&
|
||||
!msta->rate_probe) {
|
||||
@@ -262,9 +263,10 @@ mt7663u_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
|
||||
msta->rates);
|
||||
spin_unlock_bh(&dev->mt76.lock);
|
||||
}
|
||||
mt7663u_mac_write_txwi(dev, wcid, qid, sta, tx_info->skb);
|
||||
mt7663u_mac_write_txwi(dev, wcid, qid, sta, skb);
|
||||
|
||||
return mt76u_skb_dma_info(tx_info->skb, tx_info->skb->len);
|
||||
put_unaligned_le32(skb->len, skb_push(skb, sizeof(skb->len)));
|
||||
return mt76_skb_adjust_pad(skb);
|
||||
}
|
||||
|
||||
static bool mt7663u_tx_status_data(struct mt76_dev *mdev, u8 *update)
|
||||
|
||||
Reference in New Issue
Block a user