diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2018-09-04 16:41:13 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-09-19 12:29:23 +0200 |
commit | 493703aa9e3c861bcfd5f28ac1b0117e77d829fa (patch) | |
tree | 9f47330377bc3a863f6a0aceb69cfe74b87d55e7 /drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | |
parent | 74ff45393bf866043eb31c5e9a7b528b6698710e (diff) | |
download | linux-stable-493703aa9e3c861bcfd5f28ac1b0117e77d829fa.tar.gz linux-stable-493703aa9e3c861bcfd5f28ac1b0117e77d829fa.tar.bz2 linux-stable-493703aa9e3c861bcfd5f28ac1b0117e77d829fa.zip |
mt76x0: reserve enough space in mac80211
Allocate skg with enough headroom by mac80211 , this eliminate need
to add extra skb headroom by the mt76x0 driver.
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 | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/tx.c b/drivers/net/wireless/mediatek/mt76/mt76x0/tx.c index fa902ac227ec..35db38523e3b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/tx.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/tx.c @@ -55,18 +55,6 @@ void mt76x0_tx_status(struct mt76x0_dev *dev, struct sk_buff *skb) spin_unlock(&dev->mac_lock); } -static int mt76x0_skb_rooms(struct mt76x0_dev *dev, struct sk_buff *skb) -{ - int hdr_len = ieee80211_get_hdrlen_from_skb(skb); - u32 need_head; - - need_head = sizeof(struct mt76x02_txwi) + 4; - if (hdr_len % 4) - need_head += 2; - - return skb_cow(skb, need_head); -} - static struct mt76x02_txwi * mt76x0_push_txwi(struct mt76x0_dev *dev, struct sk_buff *skb, struct ieee80211_sta *sta, struct mt76_wcid *wcid, @@ -158,10 +146,7 @@ void mt76x0_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, BUILD_BUG_ON(ARRAY_SIZE(info->status.status_driver_data) < 1); info->status.status_driver_data[0] = (void *)(unsigned long)pkt_len; - if (mt76x0_skb_rooms(dev, skb) || mt76x0_insert_hdr_pad(skb)) { - ieee80211_free_txskb(dev->mt76.hw, skb); - return; - } + mt76x0_insert_hdr_pad(skb); if (sta) { msta = (struct mt76x02_sta *) sta->drv_priv; |