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/irda | |
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/irda')
-rw-r--r-- | drivers/net/irda/ali-ircc.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/au1k_ir.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/donauboe.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/irda-usb.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/mcs7780.c | 4 | ||||
-rw-r--r-- | drivers/net/irda/nsc-ircc.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/pxaficp_ir.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/sa1100_ir.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/smsc-ircc2.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/stir4200.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/via-ircc.c | 8 | ||||
-rw-r--r-- | drivers/net/irda/vlsi_ir.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/w83977af_ir.c | 2 |
13 files changed, 17 insertions, 17 deletions
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; |