diff options
author | Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 2007-03-31 10:55:19 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:29 -0400 |
commit | 27d7ff46a3498d3debc6ba68fb8014c702b81170 (patch) | |
tree | b5a0c617cf8339524d3b1f1633e08eae7b94cf86 /net/ieee80211/ieee80211_rx.c | |
parent | 3dbad80ac7632f243b824d469301abb97ec634a1 (diff) |
[SK_BUFF]: Introduce skb_copy_to_linear_data{_offset}
To clearly state the intent of copying to linear sk_buffs, _offset being a
overly long variant but interesting for the sake of saving some bytes.
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Diffstat (limited to 'net/ieee80211/ieee80211_rx.c')
-rw-r--r-- | net/ieee80211/ieee80211_rx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c index 94e2b8e2ab26..6ae036b1920f 100644 --- a/net/ieee80211/ieee80211_rx.c +++ b/net/ieee80211/ieee80211_rx.c | |||
@@ -759,8 +759,9 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
759 | IEEE80211_FCTL_TODS) && skb->len >= ETH_HLEN + ETH_ALEN) { | 759 | IEEE80211_FCTL_TODS) && skb->len >= ETH_HLEN + ETH_ALEN) { |
760 | /* Non-standard frame: get addr4 from its bogus location after | 760 | /* Non-standard frame: get addr4 from its bogus location after |
761 | * the payload */ | 761 | * the payload */ |
762 | memcpy(skb->data + ETH_ALEN, | 762 | skb_copy_to_linear_data_offset(skb, ETH_ALEN, |
763 | skb->data + skb->len - ETH_ALEN, ETH_ALEN); | 763 | skb->data + skb->len - ETH_ALEN, |
764 | ETH_ALEN); | ||
764 | skb_trim(skb, skb->len - ETH_ALEN); | 765 | skb_trim(skb, skb->len - ETH_ALEN); |
765 | } | 766 | } |
766 | #endif | 767 | #endif |