diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-19 18:30:44 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:24:32 -0400 |
commit | 459a98ed881802dee55897441bc7f77af614368e (patch) | |
tree | b81f76632d8f2e21eb91ec3d885091a98398d93e /net/ieee80211 | |
parent | 4c13eb6657fe9ef7b4dc8f1a405c902e9e5234e0 (diff) |
[SK_BUFF]: Introduce skb_reset_mac_header(skb)
For the common, open coded 'skb->mac.raw = skb->data' operation, so that we can
later turn skb->mac.raw into a offset, reducing the size of struct sk_buff in
64bit land while possibly keeping it as a pointer on 32bit.
This one touches just the most simple case, next will handle the slightly more
"complex" cases.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee80211')
-rw-r--r-- | net/ieee80211/ieee80211_rx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c index d5f5c6616689..f39bf7c41012 100644 --- a/net/ieee80211/ieee80211_rx.c +++ b/net/ieee80211/ieee80211_rx.c | |||
@@ -42,7 +42,7 @@ static void ieee80211_monitor_rx(struct ieee80211_device *ieee, | |||
42 | u16 fc = le16_to_cpu(hdr->frame_ctl); | 42 | u16 fc = le16_to_cpu(hdr->frame_ctl); |
43 | 43 | ||
44 | skb->dev = ieee->dev; | 44 | skb->dev = ieee->dev; |
45 | skb->mac.raw = skb->data; | 45 | skb_reset_mac_header(skb); |
46 | skb_pull(skb, ieee80211_get_hdrlen(fc)); | 46 | skb_pull(skb, ieee80211_get_hdrlen(fc)); |
47 | skb->pkt_type = PACKET_OTHERHOST; | 47 | skb->pkt_type = PACKET_OTHERHOST; |
48 | skb->protocol = __constant_htons(ETH_P_80211_RAW); | 48 | skb->protocol = __constant_htons(ETH_P_80211_RAW); |
@@ -789,10 +789,11 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
789 | 789 | ||
790 | if (skb2 != NULL) { | 790 | if (skb2 != NULL) { |
791 | /* send to wireless media */ | 791 | /* send to wireless media */ |
792 | skb2->dev = dev; | ||
792 | skb2->protocol = __constant_htons(ETH_P_802_3); | 793 | skb2->protocol = __constant_htons(ETH_P_802_3); |
793 | skb2->mac.raw = skb2->nh.raw = skb2->data; | 794 | skb_reset_mac_header(skb2); |
795 | skb2->nh.raw = skb2->data; | ||
794 | /* skb2->nh.raw = skb2->data + ETH_HLEN; */ | 796 | /* skb2->nh.raw = skb2->data + ETH_HLEN; */ |
795 | skb2->dev = dev; | ||
796 | dev_queue_xmit(skb2); | 797 | dev_queue_xmit(skb2); |
797 | } | 798 | } |
798 | #endif | 799 | #endif |