aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/802/fddi.c2
-rw-r--r--net/802/hippi.c2
-rw-r--r--net/802/tr.c2
-rw-r--r--net/atm/br2684.c2
-rw-r--r--net/atm/clip.c2
-rw-r--r--net/ax25/ax25_in.c2
-rw-r--r--net/bluetooth/bnep/core.c2
-rw-r--r--net/bridge/br_device.c2
-rw-r--r--net/core/dev.c4
-rw-r--r--net/core/netpoll.c2
-rw-r--r--net/core/skbuff.c2
-rw-r--r--net/decnet/dn_route.c2
-rw-r--r--net/ethernet/eth.c2
-rw-r--r--net/ieee80211/ieee80211_rx.c7
-rw-r--r--net/ipv4/ip_gre.c2
-rw-r--r--net/ipv4/ip_output.c2
-rw-r--r--net/ipv4/route.c3
-rw-r--r--net/ipv6/ip6_output.c2
-rw-r--r--net/ipv6/route.c2
-rw-r--r--net/irda/irlap_frame.c3
-rw-r--r--net/irda/wrapper.c2
-rw-r--r--net/llc/llc_output.c2
-rw-r--r--net/netrom/nr_dev.c2
-rw-r--r--net/wanrouter/wanmain.c2
24 files changed, 30 insertions, 27 deletions
diff --git a/net/802/fddi.c b/net/802/fddi.c
index f8a0c9f6fec9..91dde41b5481 100644
--- a/net/802/fddi.c
+++ b/net/802/fddi.c
@@ -131,7 +131,7 @@ __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev)
131 */ 131 */
132 132
133 skb->dev = dev; 133 skb->dev = dev;
134 skb->mac.raw = skb->data; /* point to frame control (FC) */ 134 skb_reset_mac_header(skb); /* point to frame control (FC) */
135 135
136 if(fddi->hdr.llc_8022_1.dsap==0xe0) 136 if(fddi->hdr.llc_8022_1.dsap==0xe0)
137 { 137 {
diff --git a/net/802/hippi.c b/net/802/hippi.c
index 138302c14ee6..d87190038edb 100644
--- a/net/802/hippi.c
+++ b/net/802/hippi.c
@@ -131,7 +131,7 @@ __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev)
131 * set the raw address here. 131 * set the raw address here.
132 */ 132 */
133 skb->dev = dev; 133 skb->dev = dev;
134 skb->mac.raw = skb->data; 134 skb_reset_mac_header(skb);
135 hip = (struct hippi_hdr *)skb->mac.raw; 135 hip = (struct hippi_hdr *)skb->mac.raw;
136 skb_pull(skb, HIPPI_HLEN); 136 skb_pull(skb, HIPPI_HLEN);
137 137
diff --git a/net/802/tr.c b/net/802/tr.c
index 987d91559bcc..eb2de0d16208 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -194,7 +194,7 @@ __be16 tr_type_trans(struct sk_buff *skb, struct net_device *dev)
194 unsigned riflen=0; 194 unsigned riflen=0;
195 195
196 skb->dev = dev; 196 skb->dev = dev;
197 skb->mac.raw = skb->data; 197 skb_reset_mac_header(skb);
198 trh = tr_hdr(skb); 198 trh = tr_hdr(skb);
199 199
200 if(trh->saddr[0] & TR_RII) 200 if(trh->saddr[0] & TR_RII)
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index c444f5eda22d..900d42ca8a50 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -458,7 +458,7 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
458 /* FIXME: tcpdump shows that pointer to mac header is 2 bytes earlier, 458 /* FIXME: tcpdump shows that pointer to mac header is 2 bytes earlier,
459 than should be. What else should I set? */ 459 than should be. What else should I set? */
460 skb_pull(skb, plen); 460 skb_pull(skb, plen);
461 skb->mac.raw = ((char *) (skb->data)) - ETH_HLEN; 461 skb->mac.raw = skb->data - ETH_HLEN;
462 skb->pkt_type = PACKET_HOST; 462 skb->pkt_type = PACKET_HOST;
463#ifdef CONFIG_BR2684_FAST_TRANS 463#ifdef CONFIG_BR2684_FAST_TRANS
464 skb->protocol = ((u16 *) skb->data)[-1]; 464 skb->protocol = ((u16 *) skb->data)[-1];
diff --git a/net/atm/clip.c b/net/atm/clip.c
index 8c3825816085..ccba24ffb966 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -213,7 +213,7 @@ static void clip_push(struct atm_vcc *vcc, struct sk_buff *skb)
213 return; 213 return;
214 } 214 }
215 ATM_SKB(skb)->vcc = vcc; 215 ATM_SKB(skb)->vcc = vcc;
216 skb->mac.raw = skb->data; 216 skb_reset_mac_header(skb);
217 if (!clip_vcc->encap 217 if (!clip_vcc->encap
218 || skb->len < RFC1483LLC_LEN 218 || skb->len < RFC1483LLC_LEN
219 || memcmp(skb->data, llc_oui, sizeof (llc_oui))) 219 || memcmp(skb->data, llc_oui, sizeof (llc_oui)))
diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c
index 4a6b26becadc..6d11b0633d5a 100644
--- a/net/ax25/ax25_in.c
+++ b/net/ax25/ax25_in.c
@@ -122,7 +122,7 @@ int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb)
122 } 122 }
123 123
124 skb_pull(skb, 1); /* Remove PID */ 124 skb_pull(skb, 1); /* Remove PID */
125 skb->mac.raw = skb->nh.raw; 125 skb_reset_mac_header(skb);
126 skb->nh.raw = skb->data; 126 skb->nh.raw = skb->data;
127 skb->dev = ax25->ax25_dev->dev; 127 skb->dev = ax25->ax25_dev->dev;
128 skb->pkt_type = PACKET_HOST; 128 skb->pkt_type = PACKET_HOST;
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c
index f7ade186bf93..b1c2fa96c69e 100644
--- a/net/bluetooth/bnep/core.c
+++ b/net/bluetooth/bnep/core.c
@@ -326,7 +326,7 @@ static inline int bnep_rx_frame(struct bnep_session *s, struct sk_buff *skb)
326 return 0; 326 return 0;
327 } 327 }
328 328
329 skb->mac.raw = skb->data; 329 skb_reset_mac_header(skb);
330 330
331 /* Verify and pull out header */ 331 /* Verify and pull out header */
332 if (!skb_pull(skb, __bnep_rx_hlen[type & BNEP_TYPE_MASK])) 332 if (!skb_pull(skb, __bnep_rx_hlen[type & BNEP_TYPE_MASK]))
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 905a39c33a16..b22ada529cc3 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -37,7 +37,7 @@ int br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
37 br->statistics.tx_packets++; 37 br->statistics.tx_packets++;
38 br->statistics.tx_bytes += skb->len; 38 br->statistics.tx_bytes += skb->len;
39 39
40 skb->mac.raw = skb->data; 40 skb_reset_mac_header(skb);
41 skb_pull(skb, ETH_HLEN); 41 skb_pull(skb, ETH_HLEN);
42 42
43 if (dest[0] & 1) 43 if (dest[0] & 1)
diff --git a/net/core/dev.c b/net/core/dev.c
index 424d6d0e98f8..2fcaf5bc4a9c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1066,7 +1066,7 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
1066 set by sender, so that the second statement is 1066 set by sender, so that the second statement is
1067 just protection against buggy protocols. 1067 just protection against buggy protocols.
1068 */ 1068 */
1069 skb2->mac.raw = skb2->data; 1069 skb_reset_mac_header(skb2);
1070 1070
1071 if (skb2->nh.raw < skb2->data || 1071 if (skb2->nh.raw < skb2->data ||
1072 skb2->nh.raw > skb2->tail) { 1072 skb2->nh.raw > skb2->tail) {
@@ -1206,7 +1206,7 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
1206 1206
1207 BUG_ON(skb_shinfo(skb)->frag_list); 1207 BUG_ON(skb_shinfo(skb)->frag_list);
1208 1208
1209 skb->mac.raw = skb->data; 1209 skb_reset_mac_header(skb);
1210 skb->mac_len = skb->nh.raw - skb->data; 1210 skb->mac_len = skb->nh.raw - skb->data;
1211 __skb_pull(skb, skb->mac_len); 1211 __skb_pull(skb, skb->mac_len);
1212 1212
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 32a9f80b5f19..0ad3896bbf62 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -324,7 +324,7 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
324 iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); 324 iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl);
325 325
326 eth = (struct ethhdr *) skb_push(skb, ETH_HLEN); 326 eth = (struct ethhdr *) skb_push(skb, ETH_HLEN);
327 skb->mac.raw = skb->data; 327 skb_reset_mac_header(skb);
328 skb->protocol = eth->h_proto = htons(ETH_P_IP); 328 skb->protocol = eth->h_proto = htons(ETH_P_IP);
329 memcpy(eth->h_source, np->local_mac, 6); 329 memcpy(eth->h_source, np->local_mac, 6);
330 memcpy(eth->h_dest, np->remote_mac, 6); 330 memcpy(eth->h_dest, np->remote_mac, 6);
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 336958fbbcb2..8f6ebd0d3693 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1928,7 +1928,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features)
1928 nskb->mac_len = skb->mac_len; 1928 nskb->mac_len = skb->mac_len;
1929 1929
1930 skb_reserve(nskb, headroom); 1930 skb_reserve(nskb, headroom);
1931 nskb->mac.raw = nskb->data; 1931 skb_reset_mac_header(nskb);
1932 nskb->nh.raw = nskb->data + skb->mac_len; 1932 nskb->nh.raw = nskb->data + skb->mac_len;
1933 nskb->h.raw = nskb->nh.raw + (skb->h.raw - skb->nh.raw); 1933 nskb->h.raw = nskb->nh.raw + (skb->h.raw - skb->nh.raw);
1934 memcpy(skb_put(nskb, doffset), skb->data, doffset); 1934 memcpy(skb_put(nskb, doffset), skb->data, doffset);
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index c1b5502f195b..ef94ca56d7bd 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1537,7 +1537,7 @@ int dn_cache_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, void *arg)
1537 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); 1537 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
1538 if (skb == NULL) 1538 if (skb == NULL)
1539 return -ENOBUFS; 1539 return -ENOBUFS;
1540 skb->mac.raw = skb->data; 1540 skb_reset_mac_header(skb);
1541 cb = DN_SKB_CB(skb); 1541 cb = DN_SKB_CB(skb);
1542 1542
1543 if (rta[RTA_SRC-1]) 1543 if (rta[RTA_SRC-1])
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 01ecbe42b1e7..0ac2524f3b68 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -157,7 +157,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
157 unsigned char *rawp; 157 unsigned char *rawp;
158 158
159 skb->dev = dev; 159 skb->dev = dev;
160 skb->mac.raw = skb->data; 160 skb_reset_mac_header(skb);
161 skb_pull(skb, ETH_HLEN); 161 skb_pull(skb, ETH_HLEN);
162 eth = eth_hdr(skb); 162 eth = eth_hdr(skb);
163 163
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
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 9151da642318..88f8aae873f4 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -616,7 +616,7 @@ static int ipgre_rcv(struct sk_buff *skb)
616 offset += 4; 616 offset += 4;
617 } 617 }
618 618
619 skb->mac.raw = skb->nh.raw; 619 skb_reset_mac_header(skb);
620 skb->nh.raw = __pskb_pull(skb, offset); 620 skb->nh.raw = __pskb_pull(skb, offset);
621 skb_postpull_rcsum(skb, skb->h.raw, offset); 621 skb_postpull_rcsum(skb, skb->h.raw, offset);
622 skb->pkt_type = PACKET_HOST; 622 skb->pkt_type = PACKET_HOST;
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 5db301b33372..ddba857bd243 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -95,7 +95,7 @@ __inline__ void ip_send_check(struct iphdr *iph)
95/* dev_loopback_xmit for use with netfilter. */ 95/* dev_loopback_xmit for use with netfilter. */
96static int ip_dev_loopback_xmit(struct sk_buff *newskb) 96static int ip_dev_loopback_xmit(struct sk_buff *newskb)
97{ 97{
98 newskb->mac.raw = newskb->data; 98 skb_reset_mac_header(newskb);
99 __skb_pull(newskb, newskb->nh.raw - newskb->data); 99 __skb_pull(newskb, newskb->nh.raw - newskb->data);
100 newskb->pkt_type = PACKET_LOOPBACK; 100 newskb->pkt_type = PACKET_LOOPBACK;
101 newskb->ip_summed = CHECKSUM_UNNECESSARY; 101 newskb->ip_summed = CHECKSUM_UNNECESSARY;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 0b3d7bf40f4e..29ee7be45aa6 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2747,7 +2747,8 @@ int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg)
2747 /* Reserve room for dummy headers, this skb can pass 2747 /* Reserve room for dummy headers, this skb can pass
2748 through good chunk of routing engine. 2748 through good chunk of routing engine.
2749 */ 2749 */
2750 skb->mac.raw = skb->nh.raw = skb->data; 2750 skb_reset_mac_header(skb);
2751 skb->nh.raw = skb->data;
2751 2752
2752 /* Bugfix: need to give ip_route_input enough of an IP header to not gag. */ 2753 /* Bugfix: need to give ip_route_input enough of an IP header to not gag. */
2753 skb->nh.iph->protocol = IPPROTO_ICMP; 2754 skb->nh.iph->protocol = IPPROTO_ICMP;
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 7e25043d826c..a5f4562b5d29 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -88,7 +88,7 @@ static inline int ip6_output_finish(struct sk_buff *skb)
88/* dev_loopback_xmit for use with netfilter. */ 88/* dev_loopback_xmit for use with netfilter. */
89static int ip6_dev_loopback_xmit(struct sk_buff *newskb) 89static int ip6_dev_loopback_xmit(struct sk_buff *newskb)
90{ 90{
91 newskb->mac.raw = newskb->data; 91 skb_reset_mac_header(newskb);
92 __skb_pull(newskb, newskb->nh.raw - newskb->data); 92 __skb_pull(newskb, newskb->nh.raw - newskb->data);
93 newskb->pkt_type = PACKET_LOOPBACK; 93 newskb->pkt_type = PACKET_LOOPBACK;
94 newskb->ip_summed = CHECKSUM_UNNECESSARY; 94 newskb->ip_summed = CHECKSUM_UNNECESSARY;
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index cc08cc48e9e9..0aa4762f53f7 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2218,7 +2218,7 @@ int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg)
2218 /* Reserve room for dummy headers, this skb can pass 2218 /* Reserve room for dummy headers, this skb can pass
2219 through good chunk of routing engine. 2219 through good chunk of routing engine.
2220 */ 2220 */
2221 skb->mac.raw = skb->data; 2221 skb_reset_mac_header(skb);
2222 skb_reserve(skb, MAX_HEADER + sizeof(struct ipv6hdr)); 2222 skb_reserve(skb, MAX_HEADER + sizeof(struct ipv6hdr));
2223 2223
2224 rt = (struct rt6_info*) ip6_route_output(NULL, &fl); 2224 rt = (struct rt6_info*) ip6_route_output(NULL, &fl);
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c
index 0b04603e9c47..1b7e2490e2e1 100644
--- a/net/irda/irlap_frame.c
+++ b/net/irda/irlap_frame.c
@@ -93,7 +93,8 @@ void irlap_queue_xmit(struct irlap_cb *self, struct sk_buff *skb)
93{ 93{
94 /* Some common init stuff */ 94 /* Some common init stuff */
95 skb->dev = self->netdev; 95 skb->dev = self->netdev;
96 skb->h.raw = skb->nh.raw = skb->mac.raw = skb->data; 96 skb_reset_mac_header(skb);
97 skb->h.raw = skb->nh.raw = skb->data;
97 skb->protocol = htons(ETH_P_IRDA); 98 skb->protocol = htons(ETH_P_IRDA);
98 skb->priority = TC_PRIO_BESTEFFORT; 99 skb->priority = TC_PRIO_BESTEFFORT;
99 100
diff --git a/net/irda/wrapper.c b/net/irda/wrapper.c
index 5abfb71aae8d..2acc66dfb558 100644
--- a/net/irda/wrapper.c
+++ b/net/irda/wrapper.c
@@ -256,7 +256,7 @@ async_bump(struct net_device *dev,
256 256
257 /* Feed it to IrLAP layer */ 257 /* Feed it to IrLAP layer */
258 dataskb->dev = dev; 258 dataskb->dev = dev;
259 dataskb->mac.raw = dataskb->data; 259 skb_reset_mac_header(dataskb);
260 dataskb->protocol = htons(ETH_P_IRDA); 260 dataskb->protocol = htons(ETH_P_IRDA);
261 261
262 netif_rx(dataskb); 262 netif_rx(dataskb);
diff --git a/net/llc/llc_output.c b/net/llc/llc_output.c
index f4291f349e92..729e25108275 100644
--- a/net/llc/llc_output.c
+++ b/net/llc/llc_output.c
@@ -52,7 +52,7 @@ int llc_mac_hdr_init(struct sk_buff *skb,
52 if (da) { 52 if (da) {
53 memcpy(trh->daddr, da, dev->addr_len); 53 memcpy(trh->daddr, da, dev->addr_len);
54 tr_source_route(skb, trh, dev); 54 tr_source_route(skb, trh, dev);
55 skb->mac.raw = skb->data; 55 skb_reset_mac_header(skb);
56 } 56 }
57 break; 57 break;
58 } 58 }
diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c
index 9a97ed6e6910..17c3f1ef83e9 100644
--- a/net/netrom/nr_dev.c
+++ b/net/netrom/nr_dev.c
@@ -56,7 +56,7 @@ int nr_rx_ip(struct sk_buff *skb, struct net_device *dev)
56 56
57 /* Spoof incoming device */ 57 /* Spoof incoming device */
58 skb->dev = dev; 58 skb->dev = dev;
59 skb->mac.raw = skb->nh.raw; 59 skb_reset_mac_header(skb);
60 skb->nh.raw = skb->data; 60 skb->nh.raw = skb->data;
61 skb->pkt_type = PACKET_HOST; 61 skb->pkt_type = PACKET_HOST;
62 62
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c
index 5d2d93dc0837..c49e223084f1 100644
--- a/net/wanrouter/wanmain.c
+++ b/net/wanrouter/wanmain.c
@@ -339,7 +339,7 @@ __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev)
339 skb->protocol = ethertype; 339 skb->protocol = ethertype;
340 skb->pkt_type = PACKET_HOST; /* Physically point to point */ 340 skb->pkt_type = PACKET_HOST; /* Physically point to point */
341 skb_pull(skb, cnt); 341 skb_pull(skb, cnt);
342 skb->mac.raw = skb->data; 342 skb_reset_mac_header(skb);
343 return ethertype; 343 return ethertype;
344} 344}
345 345