From 01c63035b6da7e71ad653569124aab0301a57441 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 4 Sep 2016 18:05:27 +0200 Subject: [PATCH] move mt76_remove_hdr_pad to mt76x2_mac.c Signed-off-by: Felix Fietkau --- mt76x2_mac.c | 9 ++++++++- util.c | 8 -------- util.h | 1 - 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/mt76x2_mac.c b/mt76x2_mac.c index c524c64f..5f9309a3 100644 --- a/mt76x2_mac.c +++ b/mt76x2_mac.c @@ -224,6 +224,13 @@ void mt76x2_mac_write_txwi(struct mt76x2_dev *dev, struct mt76x2_txwi *txwi, txwi->len_ctl = cpu_to_le16(skb->len); } +static void mt76x2_remove_hdr_pad(struct sk_buff *skb) +{ + int len = ieee80211_get_hdrlen_from_skb(skb); + memmove(skb->data + 2, skb->data, len); + skb_pull(skb, 2); +} + int mt76x2_mac_process_rx(struct mt76x2_dev *dev, struct sk_buff *skb, void *rxi) { struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); @@ -233,7 +240,7 @@ int mt76x2_mac_process_rx(struct mt76x2_dev *dev, struct sk_buff *skb, void *rxi int len; if (rxwi->rxinfo & cpu_to_le32(MT_RXINFO_L2PAD)) - mt76_remove_hdr_pad(skb); + mt76x2_remove_hdr_pad(skb); if (rxwi->rxinfo & cpu_to_le32(MT_RXINFO_DECRYPT)) { status->flag |= RX_FLAG_DECRYPTED; diff --git a/util.c b/util.c index 21c81210..e0598176 100644 --- a/util.c +++ b/util.c @@ -17,14 +17,6 @@ #include #include "mt76.h" -void mt76_remove_hdr_pad(struct sk_buff *skb) -{ - int len = ieee80211_get_hdrlen_from_skb(skb); - memmove(skb->data + 2, skb->data, len); - skb_pull(skb, 2); -} -EXPORT_SYMBOL_GPL(mt76_remove_hdr_pad); - int mt76_insert_hdr_pad(struct sk_buff *skb) { int len = ieee80211_get_hdrlen_from_skb(skb); diff --git a/util.h b/util.h index 6366b35f..60a45521 100644 --- a/util.h +++ b/util.h @@ -23,7 +23,6 @@ _var = (((_var) + 1) % _size) int mt76_insert_hdr_pad(struct sk_buff *skb); -void mt76_remove_hdr_pad(struct sk_buff *skb); int mt76_wcid_alloc(unsigned long *mask, int size); static inline void