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 /drivers/net | |
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 'drivers/net')
44 files changed, 61 insertions, 60 deletions
diff --git a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c index dba5e5165452..28cb79cee910 100644 --- a/drivers/net/appletalk/cops.c +++ b/drivers/net/appletalk/cops.c | |||
@@ -853,7 +853,7 @@ static void cops_rx(struct net_device *dev) | |||
853 | return; | 853 | return; |
854 | } | 854 | } |
855 | 855 | ||
856 | skb->mac.raw = skb->data; /* Point to entire packet. */ | 856 | skb_reset_mac_header(skb); /* Point to entire packet. */ |
857 | skb_pull(skb,3); | 857 | skb_pull(skb,3); |
858 | skb->h.raw = skb->data; /* Point to data (Skip header). */ | 858 | skb->h.raw = skb->data; /* Point to data (Skip header). */ |
859 | 859 | ||
diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c index 2ea44ce49810..12682439f8bd 100644 --- a/drivers/net/appletalk/ltpc.c +++ b/drivers/net/appletalk/ltpc.c | |||
@@ -770,7 +770,7 @@ static int sendup_buffer (struct net_device *dev) | |||
770 | skb->data[0] = dnode; | 770 | skb->data[0] = dnode; |
771 | skb->data[1] = snode; | 771 | skb->data[1] = snode; |
772 | skb->data[2] = llaptype; | 772 | skb->data[2] = llaptype; |
773 | skb->mac.raw = skb->data; /* save pointer to llap header */ | 773 | skb_reset_mac_header(skb); /* save pointer to llap header */ |
774 | skb_pull(skb,3); | 774 | skb_pull(skb,3); |
775 | 775 | ||
776 | /* copy ddp(s,e)hdr + contents */ | 776 | /* copy ddp(s,e)hdr + contents */ |
diff --git a/drivers/net/arcnet/arc-rawmode.c b/drivers/net/arcnet/arc-rawmode.c index 6318814a11a8..e0a18e7c73cb 100644 --- a/drivers/net/arcnet/arc-rawmode.c +++ b/drivers/net/arcnet/arc-rawmode.c | |||
@@ -110,7 +110,7 @@ static void rx(struct net_device *dev, int bufnum, | |||
110 | 110 | ||
111 | pkt = (struct archdr *) skb->data; | 111 | pkt = (struct archdr *) skb->data; |
112 | 112 | ||
113 | skb->mac.raw = skb->data; | 113 | skb_reset_mac_header(skb); |
114 | skb_pull(skb, ARC_HDR_SIZE); | 114 | skb_pull(skb, ARC_HDR_SIZE); |
115 | 115 | ||
116 | /* up to sizeof(pkt->soft) has already been copied from the card */ | 116 | /* up to sizeof(pkt->soft) has already been copied from the card */ |
diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c index 66485585ab39..6c764b66e9cc 100644 --- a/drivers/net/arcnet/capmode.c +++ b/drivers/net/arcnet/capmode.c | |||
@@ -122,10 +122,8 @@ static void rx(struct net_device *dev, int bufnum, | |||
122 | } | 122 | } |
123 | skb_put(skb, length + ARC_HDR_SIZE + sizeof(int)); | 123 | skb_put(skb, length + ARC_HDR_SIZE + sizeof(int)); |
124 | skb->dev = dev; | 124 | skb->dev = dev; |
125 | 125 | skb_reset_mac_header(skb); | |
126 | pkt = (struct archdr *) skb->data; | 126 | pkt = (struct archdr *)skb->mac.raw; |
127 | |||
128 | skb->mac.raw = skb->data; | ||
129 | skb_pull(skb, ARC_HDR_SIZE); | 127 | skb_pull(skb, ARC_HDR_SIZE); |
130 | 128 | ||
131 | /* up to sizeof(pkt->soft) has already been copied from the card */ | 129 | /* up to sizeof(pkt->soft) has already been copied from the card */ |
@@ -270,9 +268,8 @@ static int ack_tx(struct net_device *dev, int acked) | |||
270 | skb_put(ackskb, length + ARC_HDR_SIZE ); | 268 | skb_put(ackskb, length + ARC_HDR_SIZE ); |
271 | ackskb->dev = dev; | 269 | ackskb->dev = dev; |
272 | 270 | ||
273 | ackpkt = (struct archdr *) ackskb->data; | 271 | skb_reset_mac_header(ackskb); |
274 | 272 | ackpkt = (struct archdr *)ackskb->mac.raw; | |
275 | ackskb->mac.raw = ackskb->data; | ||
276 | /* skb_pull(ackskb, ARC_HDR_SIZE); */ | 273 | /* skb_pull(ackskb, ARC_HDR_SIZE); */ |
277 | 274 | ||
278 | 275 | ||
diff --git a/drivers/net/arcnet/rfc1051.c b/drivers/net/arcnet/rfc1051.c index 6d6c69f036ef..2de8877ece29 100644 --- a/drivers/net/arcnet/rfc1051.c +++ b/drivers/net/arcnet/rfc1051.c | |||
@@ -94,7 +94,7 @@ static unsigned short type_trans(struct sk_buff *skb, struct net_device *dev) | |||
94 | int hdr_size = ARC_HDR_SIZE + RFC1051_HDR_SIZE; | 94 | int hdr_size = ARC_HDR_SIZE + RFC1051_HDR_SIZE; |
95 | 95 | ||
96 | /* Pull off the arcnet header. */ | 96 | /* Pull off the arcnet header. */ |
97 | skb->mac.raw = skb->data; | 97 | skb_reset_mac_header(skb); |
98 | skb_pull(skb, hdr_size); | 98 | skb_pull(skb, hdr_size); |
99 | 99 | ||
100 | if (pkt->hard.dest == 0) | 100 | if (pkt->hard.dest == 0) |
diff --git a/drivers/net/arcnet/rfc1201.c b/drivers/net/arcnet/rfc1201.c index bee34226abfa..460a095000c2 100644 --- a/drivers/net/arcnet/rfc1201.c +++ b/drivers/net/arcnet/rfc1201.c | |||
@@ -96,7 +96,7 @@ static unsigned short type_trans(struct sk_buff *skb, struct net_device *dev) | |||
96 | int hdr_size = ARC_HDR_SIZE + RFC1201_HDR_SIZE; | 96 | int hdr_size = ARC_HDR_SIZE + RFC1201_HDR_SIZE; |
97 | 97 | ||
98 | /* Pull off the arcnet header. */ | 98 | /* Pull off the arcnet header. */ |
99 | skb->mac.raw = skb->data; | 99 | skb_reset_mac_header(skb); |
100 | skb_pull(skb, hdr_size); | 100 | skb_pull(skb, hdr_size); |
101 | 101 | ||
102 | if (pkt->hard.dest == 0) | 102 | if (pkt->hard.dest == 0) |
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 3fb354d9c515..e3c9e2e56d14 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -884,7 +884,7 @@ static int ad_lacpdu_send(struct port *port) | |||
884 | } | 884 | } |
885 | 885 | ||
886 | skb->dev = slave->dev; | 886 | skb->dev = slave->dev; |
887 | skb->mac.raw = skb->data; | 887 | skb_reset_mac_header(skb); |
888 | skb->nh.raw = skb->data + ETH_HLEN; | 888 | skb->nh.raw = skb->data + ETH_HLEN; |
889 | skb->protocol = PKT_TYPE_LACPDU; | 889 | skb->protocol = PKT_TYPE_LACPDU; |
890 | skb->priority = TC_PRIO_CONTROL; | 890 | skb->priority = TC_PRIO_CONTROL; |
@@ -928,7 +928,7 @@ static int ad_marker_send(struct port *port, struct marker *marker) | |||
928 | skb_reserve(skb, 16); | 928 | skb_reserve(skb, 16); |
929 | 929 | ||
930 | skb->dev = slave->dev; | 930 | skb->dev = slave->dev; |
931 | skb->mac.raw = skb->data; | 931 | skb_reset_mac_header(skb); |
932 | skb->nh.raw = skb->data + ETH_HLEN; | 932 | skb->nh.raw = skb->data + ETH_HLEN; |
933 | skb->protocol = PKT_TYPE_LACPDU; | 933 | skb->protocol = PKT_TYPE_LACPDU; |
934 | 934 | ||
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index 217a2eedee0a..916162ca0c98 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
@@ -890,7 +890,7 @@ static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[]) | |||
890 | data = skb_put(skb, size); | 890 | data = skb_put(skb, size); |
891 | memcpy(data, &pkt, size); | 891 | memcpy(data, &pkt, size); |
892 | 892 | ||
893 | skb->mac.raw = data; | 893 | skb_reset_mac_header(skb); |
894 | skb->nh.raw = data + ETH_HLEN; | 894 | skb->nh.raw = data + ETH_HLEN; |
895 | skb->protocol = pkt.type; | 895 | skb->protocol = pkt.type; |
896 | skb->priority = TC_PRIO_CONTROL; | 896 | skb->priority = TC_PRIO_CONTROL; |
@@ -1266,7 +1266,7 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev) | |||
1266 | u8 *hash_start = NULL; | 1266 | u8 *hash_start = NULL; |
1267 | int res = 1; | 1267 | int res = 1; |
1268 | 1268 | ||
1269 | skb->mac.raw = (unsigned char *)skb->data; | 1269 | skb_reset_mac_header(skb); |
1270 | eth_data = eth_hdr(skb); | 1270 | eth_data = eth_hdr(skb); |
1271 | 1271 | ||
1272 | /* make sure that the curr_active_slave and the slaves list do | 1272 | /* make sure that the curr_active_slave and the slaves list do |
diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c index 199e5066acf3..ebcf35e4cf5b 100644 --- a/drivers/net/cxgb3/cxgb3_offload.c +++ b/drivers/net/cxgb3/cxgb3_offload.c | |||
@@ -783,7 +783,7 @@ static int do_trace(struct t3cdev *dev, struct sk_buff *skb) | |||
783 | skb->protocol = htons(0xffff); | 783 | skb->protocol = htons(0xffff); |
784 | skb->dev = dev->lldev; | 784 | skb->dev = dev->lldev; |
785 | skb_pull(skb, sizeof(*p)); | 785 | skb_pull(skb, sizeof(*p)); |
786 | skb->mac.raw = skb->data; | 786 | skb_reset_mac_header(skb); |
787 | netif_receive_skb(skb); | 787 | netif_receive_skb(skb); |
788 | return 0; | 788 | return 0; |
789 | } | 789 | } |
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 8946f7aa97cd..b5cf2a60834d 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c | |||
@@ -1620,7 +1620,8 @@ static inline int rx_offload(struct t3cdev *tdev, struct sge_rspq *rq, | |||
1620 | unsigned int gather_idx) | 1620 | unsigned int gather_idx) |
1621 | { | 1621 | { |
1622 | rq->offload_pkts++; | 1622 | rq->offload_pkts++; |
1623 | skb->mac.raw = skb->nh.raw = skb->h.raw = skb->data; | 1623 | skb_reset_mac_header(skb); |
1624 | skb->nh.raw = skb->h.raw = skb->data; | ||
1624 | 1625 | ||
1625 | if (rq->polling) { | 1626 | if (rq->polling) { |
1626 | rx_gather[gather_idx++] = skb; | 1627 | rx_gather[gather_idx++] = skb; |
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c index cebf8c374bc5..0f10758226fa 100644 --- a/drivers/net/irda/ali-ircc.c +++ b/drivers/net/irda/ali-ircc.c | |||
@@ -1932,7 +1932,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) | |||
1932 | self->stats.rx_packets++; | 1932 | self->stats.rx_packets++; |
1933 | 1933 | ||
1934 | skb->dev = self->netdev; | 1934 | skb->dev = self->netdev; |
1935 | skb->mac.raw = skb->data; | 1935 | skb_reset_mac_header(skb); |
1936 | skb->protocol = htons(ETH_P_IRDA); | 1936 | skb->protocol = htons(ETH_P_IRDA); |
1937 | netif_rx(skb); | 1937 | netif_rx(skb); |
1938 | self->netdev->last_rx = jiffies; | 1938 | self->netdev->last_rx = jiffies; |
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c index 37914dc5b90e..27afd0f367d6 100644 --- a/drivers/net/irda/au1k_ir.c +++ b/drivers/net/irda/au1k_ir.c | |||
@@ -606,7 +606,7 @@ static int au1k_irda_rx(struct net_device *dev) | |||
606 | skb_put(skb, count-2); | 606 | skb_put(skb, count-2); |
607 | memcpy(skb->data, (void *)pDB->vaddr, count-2); | 607 | memcpy(skb->data, (void *)pDB->vaddr, count-2); |
608 | skb->dev = dev; | 608 | skb->dev = dev; |
609 | skb->mac.raw = skb->data; | 609 | skb_reset_mac_header(skb); |
610 | skb->protocol = htons(ETH_P_IRDA); | 610 | skb->protocol = htons(ETH_P_IRDA); |
611 | netif_rx(skb); | 611 | netif_rx(skb); |
612 | prxd->count_0 = 0; | 612 | prxd->count_0 = 0; |
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index 11af0ae7510e..ddfa6c38a16b 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c | |||
@@ -1286,7 +1286,7 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<'); | |||
1286 | 1286 | ||
1287 | self->stats.rx_packets++; | 1287 | self->stats.rx_packets++; |
1288 | skb->dev = self->netdev; | 1288 | skb->dev = self->netdev; |
1289 | skb->mac.raw = skb->data; | 1289 | skb_reset_mac_header(skb); |
1290 | skb->protocol = htons (ETH_P_IRDA); | 1290 | skb->protocol = htons (ETH_P_IRDA); |
1291 | } | 1291 | } |
1292 | else | 1292 | else |
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index 1d510bdc9b84..6ef375a095f4 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c | |||
@@ -921,7 +921,7 @@ static void irda_usb_receive(struct urb *urb) | |||
921 | 921 | ||
922 | /* Ask the networking layer to queue the packet for the IrDA stack */ | 922 | /* Ask the networking layer to queue the packet for the IrDA stack */ |
923 | dataskb->dev = self->netdev; | 923 | dataskb->dev = self->netdev; |
924 | dataskb->mac.raw = dataskb->data; | 924 | skb_reset_mac_header(dataskb); |
925 | dataskb->protocol = htons(ETH_P_IRDA); | 925 | dataskb->protocol = htons(ETH_P_IRDA); |
926 | len = dataskb->len; | 926 | len = dataskb->len; |
927 | netif_rx(dataskb); | 927 | netif_rx(dataskb); |
diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c index f0c61f3b2a82..3ff1f4b33c06 100644 --- a/drivers/net/irda/mcs7780.c +++ b/drivers/net/irda/mcs7780.c | |||
@@ -428,7 +428,7 @@ static void mcs_unwrap_mir(struct mcs_cb *mcs, __u8 *buf, int len) | |||
428 | skb_reserve(skb, 1); | 428 | skb_reserve(skb, 1); |
429 | memcpy(skb->data, buf, new_len); | 429 | memcpy(skb->data, buf, new_len); |
430 | skb_put(skb, new_len); | 430 | skb_put(skb, new_len); |
431 | skb->mac.raw = skb->data; | 431 | skb_reset_mac_header(skb); |
432 | skb->protocol = htons(ETH_P_IRDA); | 432 | skb->protocol = htons(ETH_P_IRDA); |
433 | skb->dev = mcs->netdev; | 433 | skb->dev = mcs->netdev; |
434 | 434 | ||
@@ -481,7 +481,7 @@ static void mcs_unwrap_fir(struct mcs_cb *mcs, __u8 *buf, int len) | |||
481 | skb_reserve(skb, 1); | 481 | skb_reserve(skb, 1); |
482 | memcpy(skb->data, buf, new_len); | 482 | memcpy(skb->data, buf, new_len); |
483 | skb_put(skb, new_len); | 483 | skb_put(skb, new_len); |
484 | skb->mac.raw = skb->data; | 484 | skb_reset_mac_header(skb); |
485 | skb->protocol = htons(ETH_P_IRDA); | 485 | skb->protocol = htons(ETH_P_IRDA); |
486 | skb->dev = mcs->netdev; | 486 | skb->dev = mcs->netdev; |
487 | 487 | ||
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c index 29b5ccd29d0b..8ce7dad582f4 100644 --- a/drivers/net/irda/nsc-ircc.c +++ b/drivers/net/irda/nsc-ircc.c | |||
@@ -1881,7 +1881,7 @@ static int nsc_ircc_dma_receive_complete(struct nsc_ircc_cb *self, int iobase) | |||
1881 | self->stats.rx_packets++; | 1881 | self->stats.rx_packets++; |
1882 | 1882 | ||
1883 | skb->dev = self->netdev; | 1883 | skb->dev = self->netdev; |
1884 | skb->mac.raw = skb->data; | 1884 | skb_reset_mac_header(skb); |
1885 | skb->protocol = htons(ETH_P_IRDA); | 1885 | skb->protocol = htons(ETH_P_IRDA); |
1886 | netif_rx(skb); | 1886 | netif_rx(skb); |
1887 | self->netdev->last_rx = jiffies; | 1887 | self->netdev->last_rx = jiffies; |
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index 2272156af31e..f35d7d42624e 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c | |||
@@ -391,7 +391,7 @@ static void pxa_irda_fir_irq_eif(struct pxa_irda *si, struct net_device *dev, in | |||
391 | 391 | ||
392 | /* Feed it to IrLAP */ | 392 | /* Feed it to IrLAP */ |
393 | skb->dev = dev; | 393 | skb->dev = dev; |
394 | skb->mac.raw = skb->data; | 394 | skb_reset_mac_header(skb); |
395 | skb->protocol = htons(ETH_P_IRDA); | 395 | skb->protocol = htons(ETH_P_IRDA); |
396 | netif_rx(skb); | 396 | netif_rx(skb); |
397 | 397 | ||
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c index 937372d00398..056639f72bec 100644 --- a/drivers/net/irda/sa1100_ir.c +++ b/drivers/net/irda/sa1100_ir.c | |||
@@ -504,7 +504,7 @@ static void sa1100_irda_fir_error(struct sa1100_irda *si, struct net_device *dev | |||
504 | 504 | ||
505 | skb_put(skb, len); | 505 | skb_put(skb, len); |
506 | skb->dev = dev; | 506 | skb->dev = dev; |
507 | skb->mac.raw = skb->data; | 507 | skb_reset_mac_header(skb); |
508 | skb->protocol = htons(ETH_P_IRDA); | 508 | skb->protocol = htons(ETH_P_IRDA); |
509 | si->stats.rx_packets++; | 509 | si->stats.rx_packets++; |
510 | si->stats.rx_bytes += len; | 510 | si->stats.rx_bytes += len; |
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index 31c623381ea8..103a2d18ed2f 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c | |||
@@ -1412,7 +1412,7 @@ static void smsc_ircc_dma_receive_complete(struct smsc_ircc_cb *self) | |||
1412 | self->stats.rx_bytes += len; | 1412 | self->stats.rx_bytes += len; |
1413 | 1413 | ||
1414 | skb->dev = self->netdev; | 1414 | skb->dev = self->netdev; |
1415 | skb->mac.raw = skb->data; | 1415 | skb_reset_mac_header(skb); |
1416 | skb->protocol = htons(ETH_P_IRDA); | 1416 | skb->protocol = htons(ETH_P_IRDA); |
1417 | netif_rx(skb); | 1417 | netif_rx(skb); |
1418 | } | 1418 | } |
diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c index 20d306fea4cb..a22175f4ea81 100644 --- a/drivers/net/irda/stir4200.c +++ b/drivers/net/irda/stir4200.c | |||
@@ -364,7 +364,7 @@ static void fir_eof(struct stir_cb *stir) | |||
364 | 364 | ||
365 | skb_put(skb, len); | 365 | skb_put(skb, len); |
366 | 366 | ||
367 | skb->mac.raw = skb->data; | 367 | skb_reset_mac_header(skb); |
368 | skb->protocol = htons(ETH_P_IRDA); | 368 | skb->protocol = htons(ETH_P_IRDA); |
369 | skb->dev = stir->netdev; | 369 | skb->dev = stir->netdev; |
370 | 370 | ||
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c index c3ed9b3067e5..5ff416314604 100644 --- a/drivers/net/irda/via-ircc.c +++ b/drivers/net/irda/via-ircc.c | |||
@@ -1125,7 +1125,7 @@ static int via_ircc_dma_receive_complete(struct via_ircc_cb *self, | |||
1125 | self->stats.rx_bytes += len; | 1125 | self->stats.rx_bytes += len; |
1126 | self->stats.rx_packets++; | 1126 | self->stats.rx_packets++; |
1127 | skb->dev = self->netdev; | 1127 | skb->dev = self->netdev; |
1128 | skb->mac.raw = skb->data; | 1128 | skb_reset_mac_header(skb); |
1129 | skb->protocol = htons(ETH_P_IRDA); | 1129 | skb->protocol = htons(ETH_P_IRDA); |
1130 | netif_rx(skb); | 1130 | netif_rx(skb); |
1131 | return TRUE; | 1131 | return TRUE; |
@@ -1198,7 +1198,7 @@ F01_E */ | |||
1198 | self->stats.rx_bytes += len; | 1198 | self->stats.rx_bytes += len; |
1199 | self->stats.rx_packets++; | 1199 | self->stats.rx_packets++; |
1200 | skb->dev = self->netdev; | 1200 | skb->dev = self->netdev; |
1201 | skb->mac.raw = skb->data; | 1201 | skb_reset_mac_header(skb); |
1202 | skb->protocol = htons(ETH_P_IRDA); | 1202 | skb->protocol = htons(ETH_P_IRDA); |
1203 | netif_rx(skb); | 1203 | netif_rx(skb); |
1204 | 1204 | ||
@@ -1244,7 +1244,7 @@ static int upload_rxdata(struct via_ircc_cb *self, int iobase) | |||
1244 | self->stats.rx_bytes += len; | 1244 | self->stats.rx_bytes += len; |
1245 | self->stats.rx_packets++; | 1245 | self->stats.rx_packets++; |
1246 | skb->dev = self->netdev; | 1246 | skb->dev = self->netdev; |
1247 | skb->mac.raw = skb->data; | 1247 | skb_reset_mac_header(skb); |
1248 | skb->protocol = htons(ETH_P_IRDA); | 1248 | skb->protocol = htons(ETH_P_IRDA); |
1249 | netif_rx(skb); | 1249 | netif_rx(skb); |
1250 | if (st_fifo->len < (MAX_RX_WINDOW + 2)) { | 1250 | if (st_fifo->len < (MAX_RX_WINDOW + 2)) { |
@@ -1313,7 +1313,7 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase) | |||
1313 | self->stats.rx_bytes += len; | 1313 | self->stats.rx_bytes += len; |
1314 | self->stats.rx_packets++; | 1314 | self->stats.rx_packets++; |
1315 | skb->dev = self->netdev; | 1315 | skb->dev = self->netdev; |
1316 | skb->mac.raw = skb->data; | 1316 | skb_reset_mac_header(skb); |
1317 | skb->protocol = htons(ETH_P_IRDA); | 1317 | skb->protocol = htons(ETH_P_IRDA); |
1318 | netif_rx(skb); | 1318 | netif_rx(skb); |
1319 | } //while | 1319 | } //while |
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c index 3457e9d8b667..79b407f3a49a 100644 --- a/drivers/net/irda/vlsi_ir.c +++ b/drivers/net/irda/vlsi_ir.c | |||
@@ -595,7 +595,7 @@ static int vlsi_process_rx(struct vlsi_ring *r, struct ring_descr *rd) | |||
595 | rd->skb = NULL; | 595 | rd->skb = NULL; |
596 | skb->dev = ndev; | 596 | skb->dev = ndev; |
597 | memcpy(skb_put(skb,len), rd->buf, len); | 597 | memcpy(skb_put(skb,len), rd->buf, len); |
598 | skb->mac.raw = skb->data; | 598 | skb_reset_mac_header(skb); |
599 | if (in_interrupt()) | 599 | if (in_interrupt()) |
600 | netif_rx(skb); | 600 | netif_rx(skb); |
601 | else | 601 | else |
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c index 4212657fa4f9..bee445130952 100644 --- a/drivers/net/irda/w83977af_ir.c +++ b/drivers/net/irda/w83977af_ir.c | |||
@@ -919,7 +919,7 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self) | |||
919 | self->stats.rx_packets++; | 919 | self->stats.rx_packets++; |
920 | 920 | ||
921 | skb->dev = self->netdev; | 921 | skb->dev = self->netdev; |
922 | skb->mac.raw = skb->data; | 922 | skb_reset_mac_header(skb); |
923 | skb->protocol = htons(ETH_P_IRDA); | 923 | skb->protocol = htons(ETH_P_IRDA); |
924 | netif_rx(skb); | 924 | netif_rx(skb); |
925 | self->netdev->last_rx = jiffies; | 925 | self->netdev->last_rx = jiffies; |
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index ee26ef52289f..de092658db6c 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
@@ -368,7 +368,7 @@ static __be16 myri_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
368 | struct ethhdr *eth; | 368 | struct ethhdr *eth; |
369 | unsigned char *rawp; | 369 | unsigned char *rawp; |
370 | 370 | ||
371 | skb->mac.raw = (((unsigned char *)skb->data) + MYRI_PAD_LEN); | 371 | skb->mac.raw = skb->data + MYRI_PAD_LEN; |
372 | skb_pull(skb, dev->hard_header_len); | 372 | skb_pull(skb, dev->hard_header_len); |
373 | eth = eth_hdr(skb); | 373 | eth = eth_hdr(skb); |
374 | 374 | ||
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index ef58e4128782..18f1790aab9a 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -1685,7 +1685,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb) | |||
1685 | skb_pull_rcsum(skb, 2); | 1685 | skb_pull_rcsum(skb, 2); |
1686 | skb->dev = ppp->dev; | 1686 | skb->dev = ppp->dev; |
1687 | skb->protocol = htons(npindex_to_ethertype[npi]); | 1687 | skb->protocol = htons(npindex_to_ethertype[npi]); |
1688 | skb->mac.raw = skb->data; | 1688 | skb_reset_mac_header(skb); |
1689 | netif_rx(skb); | 1689 | netif_rx(skb); |
1690 | ppp->dev->last_rx = jiffies; | 1690 | ppp->dev->last_rx = jiffies; |
1691 | } | 1691 | } |
diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c index b9fa4fbb1398..1de3eec1a792 100644 --- a/drivers/net/sb1000.c +++ b/drivers/net/sb1000.c | |||
@@ -834,7 +834,7 @@ printk("cm0: IP identification: %02x%02x fragment offset: %02x%02x\n", buffer[3 | |||
834 | goto dropped_frame; | 834 | goto dropped_frame; |
835 | } | 835 | } |
836 | skb->dev = dev; | 836 | skb->dev = dev; |
837 | skb->mac.raw = skb->data; | 837 | skb_reset_mac_header(skb); |
838 | skb->protocol = (unsigned short) buffer[NewDatagramHeaderSkip + 16]; | 838 | skb->protocol = (unsigned short) buffer[NewDatagramHeaderSkip + 16]; |
839 | insw(ioaddr, skb_put(skb, NewDatagramDataSize), | 839 | insw(ioaddr, skb_put(skb, NewDatagramDataSize), |
840 | NewDatagramDataSize / 2); | 840 | NewDatagramDataSize / 2); |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index a57aa010cb25..288d8559f8c5 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -256,7 +256,7 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, | |||
256 | 256 | ||
257 | switch (tun->flags & TUN_TYPE_MASK) { | 257 | switch (tun->flags & TUN_TYPE_MASK) { |
258 | case TUN_TUN_DEV: | 258 | case TUN_TUN_DEV: |
259 | skb->mac.raw = skb->data; | 259 | skb_reset_mac_header(skb); |
260 | skb->protocol = pi.proto; | 260 | skb->protocol = pi.proto; |
261 | skb->dev = tun->dev; | 261 | skb->dev = tun->dev; |
262 | break; | 262 | break; |
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index 5b82e4fd0d73..c198511ec3f5 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c | |||
@@ -773,7 +773,7 @@ static int sppp_rx_done(struct channel_data *chan) | |||
773 | } | 773 | } |
774 | chan->rx_skb->protocol = htons(ETH_P_WAN_PPP); | 774 | chan->rx_skb->protocol = htons(ETH_P_WAN_PPP); |
775 | chan->rx_skb->dev = chan->pppdev.dev; | 775 | chan->rx_skb->dev = chan->pppdev.dev; |
776 | chan->rx_skb->mac.raw = chan->rx_skb->data; | 776 | skb_reset_mac_header(chan->rx_skb) |
777 | chan->stats.rx_packets++; | 777 | chan->stats.rx_packets++; |
778 | chan->stats.rx_bytes += chan->cosa->rxsize; | 778 | chan->stats.rx_bytes += chan->cosa->rxsize; |
779 | netif_rx(chan->rx_skb); | 779 | netif_rx(chan->rx_skb); |
diff --git a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c index a631d1c2fa14..016b3ff3ea5e 100644 --- a/drivers/net/wan/cycx_x25.c +++ b/drivers/net/wan/cycx_x25.c | |||
@@ -834,7 +834,7 @@ static void cycx_x25_irq_rx(struct cycx_device *card, struct cycx_x25_cmd *cmd) | |||
834 | ++chan->ifstats.rx_packets; | 834 | ++chan->ifstats.rx_packets; |
835 | chan->ifstats.rx_bytes += pktlen; | 835 | chan->ifstats.rx_bytes += pktlen; |
836 | 836 | ||
837 | skb->mac.raw = skb->data; | 837 | skb_reset_mac_header(skb); |
838 | netif_rx(skb); | 838 | netif_rx(skb); |
839 | dev->last_rx = jiffies; /* timestamp */ | 839 | dev->last_rx = jiffies; /* timestamp */ |
840 | } | 840 | } |
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index 736987559432..66be20c292b6 100644 --- a/drivers/net/wan/dlci.c +++ b/drivers/net/wan/dlci.c | |||
@@ -176,7 +176,7 @@ static void dlci_receive(struct sk_buff *skb, struct net_device *dev) | |||
176 | if (process) | 176 | if (process) |
177 | { | 177 | { |
178 | /* we've set up the protocol, so discard the header */ | 178 | /* we've set up the protocol, so discard the header */ |
179 | skb->mac.raw = skb->data; | 179 | skb_reset_mac_header(skb); |
180 | skb_pull(skb, header); | 180 | skb_pull(skb, header); |
181 | dlp->stats.rx_bytes += skb->len; | 181 | dlp->stats.rx_bytes += skb->len; |
182 | netif_rx(skb); | 182 | netif_rx(skb); |
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index c45d6a83339d..58a53b6d9b42 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c | |||
@@ -864,7 +864,7 @@ fst_tx_dma_complete(struct fst_card_info *card, struct fst_port_info *port, | |||
864 | static __be16 farsync_type_trans(struct sk_buff *skb, struct net_device *dev) | 864 | static __be16 farsync_type_trans(struct sk_buff *skb, struct net_device *dev) |
865 | { | 865 | { |
866 | skb->dev = dev; | 866 | skb->dev = dev; |
867 | skb->mac.raw = skb->data; | 867 | skb_reset_mac_header(skb); |
868 | skb->pkt_type = PACKET_HOST; | 868 | skb->pkt_type = PACKET_HOST; |
869 | return htons(ETH_P_CUST); | 869 | return htons(ETH_P_CUST); |
870 | } | 870 | } |
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index 2b54f1bc3a0d..6d288839ddaa 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c | |||
@@ -1667,7 +1667,7 @@ static int lmc_rx (struct net_device *dev) /*fold00*/ | |||
1667 | skb_put (skb, len); | 1667 | skb_put (skb, len); |
1668 | skb->protocol = lmc_proto_type(sc, skb); | 1668 | skb->protocol = lmc_proto_type(sc, skb); |
1669 | skb->protocol = htons(ETH_P_WAN_PPP); | 1669 | skb->protocol = htons(ETH_P_WAN_PPP); |
1670 | skb->mac.raw = skb->data; | 1670 | skb_reset_mac_header(skb); |
1671 | // skb->nh.raw = skb->data; | 1671 | // skb->nh.raw = skb->data; |
1672 | skb->dev = dev; | 1672 | skb->dev = dev; |
1673 | lmc_proto_netif(sc, skb); | 1673 | lmc_proto_netif(sc, skb); |
@@ -1705,7 +1705,7 @@ static int lmc_rx (struct net_device *dev) /*fold00*/ | |||
1705 | memcpy(skb_put(nsb, len), skb->data, len); | 1705 | memcpy(skb_put(nsb, len), skb->data, len); |
1706 | 1706 | ||
1707 | nsb->protocol = lmc_proto_type(sc, skb); | 1707 | nsb->protocol = lmc_proto_type(sc, skb); |
1708 | nsb->mac.raw = nsb->data; | 1708 | skb_reset_mac_header(nsb); |
1709 | // nsb->nh.raw = nsb->data; | 1709 | // nsb->nh.raw = nsb->data; |
1710 | nsb->dev = dev; | 1710 | nsb->dev = dev; |
1711 | lmc_proto_netif(sc, nsb); | 1711 | lmc_proto_netif(sc, nsb); |
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c index 62184dee377c..edbc55528be5 100644 --- a/drivers/net/wan/pc300_drv.c +++ b/drivers/net/wan/pc300_drv.c | |||
@@ -1755,7 +1755,7 @@ cpc_trace(struct net_device *dev, struct sk_buff *skb_main, char rx_tx) | |||
1755 | 1755 | ||
1756 | skb->dev = dev; | 1756 | skb->dev = dev; |
1757 | skb->protocol = htons(ETH_P_CUST); | 1757 | skb->protocol = htons(ETH_P_CUST); |
1758 | skb->mac.raw = skb->data; | 1758 | skb_reset_mac_header(skb); |
1759 | skb->pkt_type = PACKET_HOST; | 1759 | skb->pkt_type = PACKET_HOST; |
1760 | skb->len = 10 + skb_main->len; | 1760 | skb->len = 10 + skb_main->len; |
1761 | 1761 | ||
diff --git a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c index 5873c346e7e9..de02a07259cf 100644 --- a/drivers/net/wan/pc300_tty.c +++ b/drivers/net/wan/pc300_tty.c | |||
@@ -1003,7 +1003,7 @@ static void cpc_tty_trace(pc300dev_t *dev, char* buf, int len, char rxtx) | |||
1003 | skb_put (skb, 10 + len); | 1003 | skb_put (skb, 10 + len); |
1004 | skb->dev = dev->dev; | 1004 | skb->dev = dev->dev; |
1005 | skb->protocol = htons(ETH_P_CUST); | 1005 | skb->protocol = htons(ETH_P_CUST); |
1006 | skb->mac.raw = skb->data; | 1006 | skb_reset_mac_header(skb); |
1007 | skb->pkt_type = PACKET_HOST; | 1007 | skb->pkt_type = PACKET_HOST; |
1008 | skb->len = 10 + len; | 1008 | skb->len = 10 + len; |
1009 | 1009 | ||
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index e50b1482d792..692a23f9834d 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -3411,7 +3411,7 @@ badrx: | |||
3411 | OUT4500( apriv, EVACK, EV_RX); | 3411 | OUT4500( apriv, EVACK, EV_RX); |
3412 | 3412 | ||
3413 | if (test_bit(FLAG_802_11, &apriv->flags)) { | 3413 | if (test_bit(FLAG_802_11, &apriv->flags)) { |
3414 | skb->mac.raw = skb->data; | 3414 | skb_reset_mac_header(skb); |
3415 | skb->pkt_type = PACKET_OTHERHOST; | 3415 | skb->pkt_type = PACKET_OTHERHOST; |
3416 | skb->dev = apriv->wifidev; | 3416 | skb->dev = apriv->wifidev; |
3417 | skb->protocol = htons(ETH_P_802_2); | 3417 | skb->protocol = htons(ETH_P_802_2); |
@@ -3746,7 +3746,7 @@ void mpi_receive_802_11 (struct airo_info *ai) | |||
3746 | wireless_spy_update(ai->dev, sa, &wstats); | 3746 | wireless_spy_update(ai->dev, sa, &wstats); |
3747 | } | 3747 | } |
3748 | #endif /* IW_WIRELESS_SPY */ | 3748 | #endif /* IW_WIRELESS_SPY */ |
3749 | skb->mac.raw = skb->data; | 3749 | skb_reset_mac_header(skb); |
3750 | skb->pkt_type = PACKET_OTHERHOST; | 3750 | skb->pkt_type = PACKET_OTHERHOST; |
3751 | skb->dev = ai->wifidev; | 3751 | skb->dev = ai->wifidev; |
3752 | skb->protocol = htons(ETH_P_802_2); | 3752 | skb->protocol = htons(ETH_P_802_2); |
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c index f78ee26d787a..e4082f9d766b 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 | ||
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c index 4a5be70c0419..159baef18e4a 100644 --- a/drivers/net/wireless/hostap/hostap_80211_tx.c +++ b/drivers/net/wireless/hostap/hostap_80211_tx.c | |||
@@ -237,7 +237,7 @@ int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
237 | iface->stats.tx_packets++; | 237 | iface->stats.tx_packets++; |
238 | iface->stats.tx_bytes += skb->len; | 238 | iface->stats.tx_bytes += skb->len; |
239 | 239 | ||
240 | skb->mac.raw = skb->data; | 240 | skb_reset_mac_header(skb); |
241 | meta = (struct hostap_skb_tx_data *) skb->cb; | 241 | meta = (struct hostap_skb_tx_data *) skb->cb; |
242 | memset(meta, 0, sizeof(*meta)); | 242 | memset(meta, 0, sizeof(*meta)); |
243 | meta->magic = HOSTAP_SKB_TX_DATA_MAGIC; | 243 | meta->magic = HOSTAP_SKB_TX_DATA_MAGIC; |
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index efb8cf3bd8ad..cc18f9686d27 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c | |||
@@ -982,7 +982,8 @@ static void prism2_send_mgmt(struct net_device *dev, | |||
982 | meta->tx_cb_idx = tx_cb_idx; | 982 | meta->tx_cb_idx = tx_cb_idx; |
983 | 983 | ||
984 | skb->dev = dev; | 984 | skb->dev = dev; |
985 | skb->mac.raw = skb->nh.raw = skb->data; | 985 | skb_reset_mac_header(skb); |
986 | skb->nh.raw = skb->data; | ||
986 | dev_queue_xmit(skb); | 987 | dev_queue_xmit(skb); |
987 | } | 988 | } |
988 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ | 989 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index 3079378fb8cd..9003ff7d151a 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -2217,7 +2217,7 @@ static void hostap_tx_callback(local_info_t *local, | |||
2217 | memcpy(skb_put(skb, len), payload, len); | 2217 | memcpy(skb_put(skb, len), payload, len); |
2218 | 2218 | ||
2219 | skb->dev = local->dev; | 2219 | skb->dev = local->dev; |
2220 | skb->mac.raw = skb->data; | 2220 | skb_reset_mac_header(skb); |
2221 | 2221 | ||
2222 | cb->func(skb, ok, cb->data); | 2222 | cb->func(skb, ok, cb->data); |
2223 | } | 2223 | } |
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c index 9077e6edde34..0e29ff762879 100644 --- a/drivers/net/wireless/hostap/hostap_main.c +++ b/drivers/net/wireless/hostap/hostap_main.c | |||
@@ -1063,7 +1063,8 @@ int prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u16 stype, | |||
1063 | meta->iface = netdev_priv(dev); | 1063 | meta->iface = netdev_priv(dev); |
1064 | 1064 | ||
1065 | skb->dev = dev; | 1065 | skb->dev = dev; |
1066 | skb->mac.raw = skb->nh.raw = skb->data; | 1066 | skb_reset_mac_header(skb); |
1067 | skb->nh.raw = skb->data; | ||
1067 | dev_queue_xmit(skb); | 1068 | dev_queue_xmit(skb); |
1068 | 1069 | ||
1069 | return 0; | 1070 | return 0; |
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index c878a2f3239c..b04c56a25cc5 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -8133,7 +8133,7 @@ static void ipw_handle_mgmt_packet(struct ipw_priv *priv, | |||
8133 | skb->dev = priv->ieee->dev; | 8133 | skb->dev = priv->ieee->dev; |
8134 | 8134 | ||
8135 | /* Point raw at the ieee80211_stats */ | 8135 | /* Point raw at the ieee80211_stats */ |
8136 | skb->mac.raw = skb->data; | 8136 | skb_reset_mac_header(skb); |
8137 | 8137 | ||
8138 | skb->pkt_type = PACKET_OTHERHOST; | 8138 | skb->pkt_type = PACKET_OTHERHOST; |
8139 | skb->protocol = __constant_htons(ETH_P_80211_STATS); | 8139 | skb->protocol = __constant_htons(ETH_P_80211_STATS); |
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 3f9d78d059b5..f1415bff527f 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -770,7 +770,7 @@ static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid, | |||
770 | 770 | ||
771 | /* Copy the 802.11 header to the skb */ | 771 | /* Copy the 802.11 header to the skb */ |
772 | memcpy(skb_put(skb, hdrlen), &(desc->frame_ctl), hdrlen); | 772 | memcpy(skb_put(skb, hdrlen), &(desc->frame_ctl), hdrlen); |
773 | skb->mac.raw = skb->data; | 773 | skb_reset_mac_header(skb); |
774 | 774 | ||
775 | /* If any, copy the data from the card to the skb */ | 775 | /* If any, copy the data from the card to the skb */ |
776 | if (datalen > 0) { | 776 | if (datalen > 0) { |
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c index fc2e0f3a896e..6ebfff034242 100644 --- a/drivers/net/wireless/prism54/islpci_eth.c +++ b/drivers/net/wireless/prism54/islpci_eth.c | |||
@@ -303,7 +303,7 @@ islpci_monitor_rx(islpci_private *priv, struct sk_buff **skb) | |||
303 | skb_pull(*skb, sizeof (struct rfmon_header)); | 303 | skb_pull(*skb, sizeof (struct rfmon_header)); |
304 | 304 | ||
305 | (*skb)->protocol = htons(ETH_P_802_2); | 305 | (*skb)->protocol = htons(ETH_P_802_2); |
306 | (*skb)->mac.raw = (*skb)->data; | 306 | skb_reset_mac_header(*skb); |
307 | (*skb)->pkt_type = PACKET_OTHERHOST; | 307 | (*skb)->pkt_type = PACKET_OTHERHOST; |
308 | 308 | ||
309 | return 0; | 309 | return 0; |
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c index f5ce1c6063d8..2a299a0676a6 100644 --- a/drivers/net/wireless/strip.c +++ b/drivers/net/wireless/strip.c | |||
@@ -2009,7 +2009,7 @@ static void deliver_packet(struct strip *strip_info, STRIP_Header * header, | |||
2009 | packetlen); | 2009 | packetlen); |
2010 | skb->dev = get_strip_dev(strip_info); | 2010 | skb->dev = get_strip_dev(strip_info); |
2011 | skb->protocol = header->protocol; | 2011 | skb->protocol = header->protocol; |
2012 | skb->mac.raw = skb->data; | 2012 | skb_reset_mac_header(skb); |
2013 | 2013 | ||
2014 | /* Having put a fake header on the front of the sk_buff for the */ | 2014 | /* Having put a fake header on the front of the sk_buff for the */ |
2015 | /* benefit of tools like tcpdump, skb_pull now 'consumes' that */ | 2015 | /* benefit of tools like tcpdump, skb_pull now 'consumes' that */ |