aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap/hostap_80211_rx.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-19 18:30:44 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:32 -0400
commit459a98ed881802dee55897441bc7f77af614368e (patch)
treeb81f76632d8f2e21eb91ec3d885091a98398d93e /drivers/net/wireless/hostap/hostap_80211_rx.c
parent4c13eb6657fe9ef7b4dc8f1a405c902e9e5234e0 (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 'drivers/net/wireless/hostap/hostap_80211_rx.c')
-rw-r--r--drivers/net/wireless/hostap/hostap_80211_rx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c
index f78ee26d787..e4082f9d766 100644
--- a/drivers/net/wireless/hostap/hostap_80211_rx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_rx.c
@@ -167,7 +167,7 @@ hdr->f.status = s; hdr->f.len = l; hdr->f.data = d
167 167
168 ret = skb->len - phdrlen; 168 ret = skb->len - phdrlen;
169 skb->dev = dev; 169 skb->dev = dev;
170 skb->mac.raw = skb->data; 170 skb_reset_mac_header(skb);
171 skb_pull(skb, hdrlen); 171 skb_pull(skb, hdrlen);
172 if (prism_header) 172 if (prism_header)
173 skb_pull(skb, phdrlen); 173 skb_pull(skb, phdrlen);
@@ -1073,10 +1073,11 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
1073 1073
1074 if (skb2 != NULL) { 1074 if (skb2 != NULL) {
1075 /* send to wireless media */ 1075 /* send to wireless media */
1076 skb2->dev = dev;
1076 skb2->protocol = __constant_htons(ETH_P_802_3); 1077 skb2->protocol = __constant_htons(ETH_P_802_3);
1077 skb2->mac.raw = skb2->nh.raw = skb2->data; 1078 skb_reset_mac_header(skb2);
1079 skb2->nh.raw = skb2->data;
1078 /* skb2->nh.raw = skb2->data + ETH_HLEN; */ 1080 /* skb2->nh.raw = skb2->data + ETH_HLEN; */
1079 skb2->dev = dev;
1080 dev_queue_xmit(skb2); 1081 dev_queue_xmit(skb2);
1081 } 1082 }
1082 1083