aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/irda')
-rw-r--r--drivers/net/irda/ali-ircc.c9
-rw-r--r--drivers/net/irda/au1k_ir.c6
-rw-r--r--drivers/net/irda/donauboe.c8
-rw-r--r--drivers/net/irda/irda-usb.c6
-rw-r--r--drivers/net/irda/mcs7780.c38
-rw-r--r--drivers/net/irda/nsc-ircc.c15
-rw-r--r--drivers/net/irda/pxaficp_ir.c6
-rw-r--r--drivers/net/irda/sa1100_ir.c2
-rw-r--r--drivers/net/irda/smsc-ircc2.c5
-rw-r--r--drivers/net/irda/stir4200.c5
-rw-r--r--drivers/net/irda/via-ircc.c18
-rw-r--r--drivers/net/irda/vlsi_ir.c4
-rw-r--r--drivers/net/irda/w83977af_ir.c12
13 files changed, 70 insertions, 64 deletions
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c
index cebf8c374bc5..f9c889c0dd07 100644
--- a/drivers/net/irda/ali-ircc.c
+++ b/drivers/net/irda/ali-ircc.c
@@ -1472,9 +1472,8 @@ static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev)
1472 1472
1473 self->stats.tx_bytes += skb->len; 1473 self->stats.tx_bytes += skb->len;
1474 1474
1475 memcpy(self->tx_fifo.queue[self->tx_fifo.free].start, skb->data, 1475 skb_copy_from_linear_data(skb, self->tx_fifo.queue[self->tx_fifo.free].start,
1476 skb->len); 1476 skb->len);
1477
1478 self->tx_fifo.len++; 1477 self->tx_fifo.len++;
1479 self->tx_fifo.free++; 1478 self->tx_fifo.free++;
1480 1479
@@ -1924,7 +1923,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
1924 1923
1925 /* Copy frame without CRC, CRC is removed by hardware*/ 1924 /* Copy frame without CRC, CRC is removed by hardware*/
1926 skb_put(skb, len); 1925 skb_put(skb, len);
1927 memcpy(skb->data, self->rx_buff.data, len); 1926 skb_copy_to_linear_data(skb, self->rx_buff.data, len);
1928 1927
1929 /* Move to next frame */ 1928 /* Move to next frame */
1930 self->rx_buff.data += len; 1929 self->rx_buff.data += len;
@@ -1932,7 +1931,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
1932 self->stats.rx_packets++; 1931 self->stats.rx_packets++;
1933 1932
1934 skb->dev = self->netdev; 1933 skb->dev = self->netdev;
1935 skb->mac.raw = skb->data; 1934 skb_reset_mac_header(skb);
1936 skb->protocol = htons(ETH_P_IRDA); 1935 skb->protocol = htons(ETH_P_IRDA);
1937 netif_rx(skb); 1936 netif_rx(skb);
1938 self->netdev->last_rx = jiffies; 1937 self->netdev->last_rx = jiffies;
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c
index 37914dc5b90e..4dbdfaaf37bf 100644
--- a/drivers/net/irda/au1k_ir.c
+++ b/drivers/net/irda/au1k_ir.c
@@ -526,7 +526,7 @@ static int au1k_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev)
526 526
527 if (aup->speed == 4000000) { 527 if (aup->speed == 4000000) {
528 /* FIR */ 528 /* FIR */
529 memcpy((void *)pDB->vaddr, skb->data, skb->len); 529 skb_copy_from_linear_data(skb, pDB->vaddr, skb->len);
530 ptxd->count_0 = skb->len & 0xff; 530 ptxd->count_0 = skb->len & 0xff;
531 ptxd->count_1 = (skb->len >> 8) & 0xff; 531 ptxd->count_1 = (skb->len >> 8) & 0xff;
532 532
@@ -604,9 +604,9 @@ static int au1k_irda_rx(struct net_device *dev)
604 skb_put(skb, count); 604 skb_put(skb, count);
605 else 605 else
606 skb_put(skb, count-2); 606 skb_put(skb, count-2);
607 memcpy(skb->data, (void *)pDB->vaddr, count-2); 607 skb_copy_to_linear_data(skb, 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..3ca47bf6dfec 100644
--- a/drivers/net/irda/donauboe.c
+++ b/drivers/net/irda/donauboe.c
@@ -1119,7 +1119,7 @@ dumpbufs(skb->data,skb->len,'>');
1119 else 1119 else
1120 { 1120 {
1121 len = skb->len; 1121 len = skb->len;
1122 memcpy (self->tx_bufs[self->txs], skb->data, len); 1122 skb_copy_from_linear_data(skb, self->tx_bufs[self->txs], len);
1123 } 1123 }
1124 self->ring->tx[self->txs].len = len & 0x0fff; 1124 self->ring->tx[self->txs].len = len & 0x0fff;
1125 1125
@@ -1282,11 +1282,11 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<');
1282 skb_reserve (skb, 1); 1282 skb_reserve (skb, 1);
1283 1283
1284 skb_put (skb, len); 1284 skb_put (skb, len);
1285 memcpy (skb->data, self->rx_bufs[self->rxs], len); 1285 skb_copy_to_linear_data(skb, self->rx_bufs[self->rxs],
1286 1286 len);
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..0ac240ca905b 100644
--- a/drivers/net/irda/irda-usb.c
+++ b/drivers/net/irda/irda-usb.c
@@ -441,7 +441,7 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev)
441 goto drop; 441 goto drop;
442 } 442 }
443 443
444 memcpy(self->tx_buff + self->header_length, skb->data, skb->len); 444 skb_copy_from_linear_data(skb, self->tx_buff + self->header_length, skb->len);
445 445
446 /* Change setting for next frame */ 446 /* Change setting for next frame */
447 if (self->capability & IUC_STIR421X) { 447 if (self->capability & IUC_STIR421X) {
@@ -902,7 +902,7 @@ static void irda_usb_receive(struct urb *urb)
902 902
903 if(docopy) { 903 if(docopy) {
904 /* Copy packet, so we can recycle the original */ 904 /* Copy packet, so we can recycle the original */
905 memcpy(newskb->data, skb->data, urb->actual_length); 905 skb_copy_from_linear_data(skb, newskb->data, urb->actual_length);
906 /* Deliver this new skb */ 906 /* Deliver this new skb */
907 dataskb = newskb; 907 dataskb = newskb;
908 /* And hook the old skb to the URB 908 /* And hook the old skb to the URB
@@ -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..0de867288a47 100644
--- a/drivers/net/irda/mcs7780.c
+++ b/drivers/net/irda/mcs7780.c
@@ -200,14 +200,14 @@ static inline int mcs_setup_transceiver_vishay(struct mcs_cb *mcs)
200/* Setup a communication between mcs7780 and agilent chip. */ 200/* Setup a communication between mcs7780 and agilent chip. */
201static inline int mcs_setup_transceiver_agilent(struct mcs_cb *mcs) 201static inline int mcs_setup_transceiver_agilent(struct mcs_cb *mcs)
202{ 202{
203 IRDA_WARNING("This transceiver type is not supported yet."); 203 IRDA_WARNING("This transceiver type is not supported yet.\n");
204 return 1; 204 return 1;
205} 205}
206 206
207/* Setup a communication between mcs7780 and sharp chip. */ 207/* Setup a communication between mcs7780 and sharp chip. */
208static inline int mcs_setup_transceiver_sharp(struct mcs_cb *mcs) 208static inline int mcs_setup_transceiver_sharp(struct mcs_cb *mcs)
209{ 209{
210 IRDA_WARNING("This transceiver type is not supported yet."); 210 IRDA_WARNING("This transceiver type is not supported yet.\n");
211 return 1; 211 return 1;
212} 212}
213 213
@@ -279,7 +279,7 @@ static inline int mcs_setup_transceiver(struct mcs_cb *mcs)
279 break; 279 break;
280 280
281 default: 281 default:
282 IRDA_WARNING("Unknown transceiver type: %d", 282 IRDA_WARNING("Unknown transceiver type: %d\n",
283 mcs->transceiver_type); 283 mcs->transceiver_type);
284 ret = 1; 284 ret = 1;
285 } 285 }
@@ -318,7 +318,7 @@ static inline int mcs_setup_transceiver(struct mcs_cb *mcs)
318 return ret; 318 return ret;
319 319
320error: 320error:
321 IRDA_ERROR("%s", msg); 321 IRDA_ERROR("%s\n", msg);
322 return ret; 322 return ret;
323} 323}
324 324
@@ -353,7 +353,7 @@ static unsigned mcs_wrap_fir_skb(const struct sk_buff *skb, __u8 *buf)
353 buf[0] = len & 0xff; 353 buf[0] = len & 0xff;
354 buf[1] = (len >> 8) & 0xff; 354 buf[1] = (len >> 8) & 0xff;
355 /* copy the data into the tx buffer. */ 355 /* copy the data into the tx buffer. */
356 memcpy(buf+2, skb->data, skb->len); 356 skb_copy_from_linear_data(skb, buf + 2, skb->len);
357 /* put the fcs in the last four bytes in little endian order. */ 357 /* put the fcs in the last four bytes in little endian order. */
358 buf[len - 4] = fcs & 0xff; 358 buf[len - 4] = fcs & 0xff;
359 buf[len - 3] = (fcs >> 8) & 0xff; 359 buf[len - 3] = (fcs >> 8) & 0xff;
@@ -377,7 +377,7 @@ static unsigned mcs_wrap_mir_skb(const struct sk_buff *skb, __u8 *buf)
377 buf[0] = len & 0xff; 377 buf[0] = len & 0xff;
378 buf[1] = (len >> 8) & 0xff; 378 buf[1] = (len >> 8) & 0xff;
379 /* copy the data */ 379 /* copy the data */
380 memcpy(buf+2, skb->data, skb->len); 380 skb_copy_from_linear_data(skb, buf + 2, skb->len);
381 /* put the fcs in last two bytes in little endian order. */ 381 /* put the fcs in last two bytes in little endian order. */
382 buf[len - 2] = fcs & 0xff; 382 buf[len - 2] = fcs & 0xff;
383 buf[len - 1] = (fcs >> 8) & 0xff; 383 buf[len - 1] = (fcs >> 8) & 0xff;
@@ -426,9 +426,9 @@ static void mcs_unwrap_mir(struct mcs_cb *mcs, __u8 *buf, int len)
426 } 426 }
427 427
428 skb_reserve(skb, 1); 428 skb_reserve(skb, 1);
429 memcpy(skb->data, buf, new_len); 429 skb_copy_to_linear_data(skb, 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
@@ -479,9 +479,9 @@ static void mcs_unwrap_fir(struct mcs_cb *mcs, __u8 *buf, int len)
479 } 479 }
480 480
481 skb_reserve(skb, 1); 481 skb_reserve(skb, 1);
482 memcpy(skb->data, buf, new_len); 482 skb_copy_to_linear_data(skb, 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
@@ -587,7 +587,7 @@ static int mcs_speed_change(struct mcs_cb *mcs)
587 } while(cnt++ < 100 && (rval & MCS_IRINTX)); 587 } while(cnt++ < 100 && (rval & MCS_IRINTX));
588 588
589 if(cnt >= 100) { 589 if(cnt >= 100) {
590 IRDA_ERROR("unable to change speed"); 590 IRDA_ERROR("unable to change speed\n");
591 ret = -EIO; 591 ret = -EIO;
592 goto error; 592 goto error;
593 } 593 }
@@ -638,7 +638,7 @@ static int mcs_speed_change(struct mcs_cb *mcs)
638 638
639 default: 639 default:
640 ret = 1; 640 ret = 1;
641 IRDA_WARNING("Unknown transceiver type: %d", 641 IRDA_WARNING("Unknown transceiver type: %d\n",
642 mcs->transceiver_type); 642 mcs->transceiver_type);
643 } 643 }
644 if (unlikely(ret)) 644 if (unlikely(ret))
@@ -733,7 +733,7 @@ static int mcs_net_open(struct net_device *netdev)
733 sprintf(hwname, "usb#%d", mcs->usbdev->devnum); 733 sprintf(hwname, "usb#%d", mcs->usbdev->devnum);
734 mcs->irlap = irlap_open(netdev, &mcs->qos, hwname); 734 mcs->irlap = irlap_open(netdev, &mcs->qos, hwname);
735 if (!mcs->irlap) { 735 if (!mcs->irlap) {
736 IRDA_ERROR("mcs7780: irlap_open failed"); 736 IRDA_ERROR("mcs7780: irlap_open failed\n");
737 goto error2; 737 goto error2;
738 } 738 }
739 739
@@ -862,7 +862,7 @@ static int mcs_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
862 mcs->out_buf, wraplen, mcs_send_irq, mcs); 862 mcs->out_buf, wraplen, mcs_send_irq, mcs);
863 863
864 if ((ret = usb_submit_urb(mcs->tx_urb, GFP_ATOMIC))) { 864 if ((ret = usb_submit_urb(mcs->tx_urb, GFP_ATOMIC))) {
865 IRDA_ERROR("failed tx_urb: %d", ret); 865 IRDA_ERROR("failed tx_urb: %d\n", ret);
866 switch (ret) { 866 switch (ret) {
867 case -ENODEV: 867 case -ENODEV:
868 case -EPIPE: 868 case -EPIPE:
@@ -897,7 +897,7 @@ static int mcs_probe(struct usb_interface *intf,
897 if (!ndev) 897 if (!ndev)
898 goto error1; 898 goto error1;
899 899
900 IRDA_DEBUG(1, "MCS7780 USB-IrDA bridge found at %d.", udev->devnum); 900 IRDA_DEBUG(1, "MCS7780 USB-IrDA bridge found at %d.\n", udev->devnum);
901 901
902 /* what is it realy for? */ 902 /* what is it realy for? */
903 SET_MODULE_OWNER(ndev); 903 SET_MODULE_OWNER(ndev);
@@ -905,7 +905,7 @@ static int mcs_probe(struct usb_interface *intf,
905 905
906 ret = usb_reset_configuration(udev); 906 ret = usb_reset_configuration(udev);
907 if (ret != 0) { 907 if (ret != 0) {
908 IRDA_ERROR("mcs7780: usb reset configuration failed"); 908 IRDA_ERROR("mcs7780: usb reset configuration failed\n");
909 goto error2; 909 goto error2;
910 } 910 }
911 911
@@ -950,7 +950,7 @@ static int mcs_probe(struct usb_interface *intf,
950 if (ret != 0) 950 if (ret != 0)
951 goto error2; 951 goto error2;
952 952
953 IRDA_DEBUG(1, "IrDA: Registered MosChip MCS7780 device as %s", 953 IRDA_DEBUG(1, "IrDA: Registered MosChip MCS7780 device as %s\n",
954 ndev->name); 954 ndev->name);
955 955
956 mcs->transceiver_type = transceiver_type; 956 mcs->transceiver_type = transceiver_type;
@@ -981,7 +981,7 @@ static void mcs_disconnect(struct usb_interface *intf)
981 free_netdev(mcs->netdev); 981 free_netdev(mcs->netdev);
982 982
983 usb_set_intfdata(intf, NULL); 983 usb_set_intfdata(intf, NULL);
984 IRDA_DEBUG(0, "MCS7780 now disconnected."); 984 IRDA_DEBUG(0, "MCS7780 now disconnected.\n");
985} 985}
986 986
987/* Module insertion */ 987/* Module insertion */
@@ -992,7 +992,7 @@ static int __init mcs_init(void)
992 /* register this driver with the USB subsystem */ 992 /* register this driver with the USB subsystem */
993 result = usb_register(&mcs_driver); 993 result = usb_register(&mcs_driver);
994 if (result) 994 if (result)
995 IRDA_ERROR("usb_register failed. Error number %d", result); 995 IRDA_ERROR("usb_register failed. Error number %d\n", result);
996 996
997 return result; 997 return result;
998} 998}
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index 29b5ccd29d0b..d96c89751a71 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -1466,9 +1466,8 @@ static int nsc_ircc_hard_xmit_fir(struct sk_buff *skb, struct net_device *dev)
1466 1466
1467 self->stats.tx_bytes += skb->len; 1467 self->stats.tx_bytes += skb->len;
1468 1468
1469 memcpy(self->tx_fifo.queue[self->tx_fifo.free].start, skb->data, 1469 skb_copy_from_linear_data(skb, self->tx_fifo.queue[self->tx_fifo.free].start,
1470 skb->len); 1470 skb->len);
1471
1472 self->tx_fifo.len++; 1471 self->tx_fifo.len++;
1473 self->tx_fifo.free++; 1472 self->tx_fifo.free++;
1474 1473
@@ -1869,10 +1868,14 @@ static int nsc_ircc_dma_receive_complete(struct nsc_ircc_cb *self, int iobase)
1869 /* Copy frame without CRC */ 1868 /* Copy frame without CRC */
1870 if (self->io.speed < 4000000) { 1869 if (self->io.speed < 4000000) {
1871 skb_put(skb, len-2); 1870 skb_put(skb, len-2);
1872 memcpy(skb->data, self->rx_buff.data, len-2); 1871 skb_copy_to_linear_data(skb,
1872 self->rx_buff.data,
1873 len - 2);
1873 } else { 1874 } else {
1874 skb_put(skb, len-4); 1875 skb_put(skb, len-4);
1875 memcpy(skb->data, self->rx_buff.data, len-4); 1876 skb_copy_to_linear_data(skb,
1877 self->rx_buff.data,
1878 len - 4);
1876 } 1879 }
1877 1880
1878 /* Move to next frame */ 1881 /* Move to next frame */
@@ -1881,7 +1884,7 @@ static int nsc_ircc_dma_receive_complete(struct nsc_ircc_cb *self, int iobase)
1881 self->stats.rx_packets++; 1884 self->stats.rx_packets++;
1882 1885
1883 skb->dev = self->netdev; 1886 skb->dev = self->netdev;
1884 skb->mac.raw = skb->data; 1887 skb_reset_mac_header(skb);
1885 skb->protocol = htons(ETH_P_IRDA); 1888 skb->protocol = htons(ETH_P_IRDA);
1886 netif_rx(skb); 1889 netif_rx(skb);
1887 self->netdev->last_rx = jiffies; 1890 self->netdev->last_rx = jiffies;
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index 2272156af31e..fb196fd91855 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -386,12 +386,12 @@ static void pxa_irda_fir_irq_eif(struct pxa_irda *si, struct net_device *dev, in
386 386
387 /* Align IP header to 20 bytes */ 387 /* Align IP header to 20 bytes */
388 skb_reserve(skb, 1); 388 skb_reserve(skb, 1);
389 memcpy(skb->data, si->dma_rx_buff, len); 389 skb_copy_to_linear_data(skb, si->dma_rx_buff, len);
390 skb_put(skb, len); 390 skb_put(skb, len);
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
@@ -484,7 +484,7 @@ static int pxa_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev)
484 unsigned long mtt = irda_get_mtt(skb); 484 unsigned long mtt = irda_get_mtt(skb);
485 485
486 si->dma_tx_buff_len = skb->len; 486 si->dma_tx_buff_len = skb->len;
487 memcpy(si->dma_tx_buff, skb->data, skb->len); 487 skb_copy_from_linear_data(skb, si->dma_tx_buff, skb->len);
488 488
489 if (mtt) 489 if (mtt)
490 while ((unsigned)(OSCR - si->last_oscr)/4 < mtt) 490 while ((unsigned)(OSCR - si->last_oscr)/4 < mtt)
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..198bf3bfa70f 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -315,6 +315,7 @@ static struct smsc_chip __initdata lpc_chips_flat[] =
315{ 315{
316 /* Base address 0x2E or 0x4E */ 316 /* Base address 0x2E or 0x4E */
317 { "47N227", KEY55_1|FIR|SERx4, 0x5a, 0x00 }, 317 { "47N227", KEY55_1|FIR|SERx4, 0x5a, 0x00 },
318 { "47N227", KEY55_1|FIR|SERx4, 0x7a, 0x00 },
318 { "47N267", KEY55_1|FIR|SERx4, 0x5e, 0x00 }, 319 { "47N267", KEY55_1|FIR|SERx4, 0x5e, 0x00 },
319 { NULL } 320 { NULL }
320}; 321};
@@ -1161,7 +1162,7 @@ static int smsc_ircc_hard_xmit_fir(struct sk_buff *skb, struct net_device *dev)
1161 self->new_speed = speed; 1162 self->new_speed = speed;
1162 } 1163 }
1163 1164
1164 memcpy(self->tx_buff.head, skb->data, skb->len); 1165 skb_copy_from_linear_data(skb, self->tx_buff.head, skb->len);
1165 1166
1166 self->tx_buff.len = skb->len; 1167 self->tx_buff.len = skb->len;
1167 self->tx_buff.data = self->tx_buff.head; 1168 self->tx_buff.data = self->tx_buff.head;
@@ -1412,7 +1413,7 @@ static void smsc_ircc_dma_receive_complete(struct smsc_ircc_cb *self)
1412 self->stats.rx_bytes += len; 1413 self->stats.rx_bytes += len;
1413 1414
1414 skb->dev = self->netdev; 1415 skb->dev = self->netdev;
1415 skb->mac.raw = skb->data; 1416 skb_reset_mac_header(skb);
1416 skb->protocol = htons(ETH_P_IRDA); 1417 skb->protocol = htons(ETH_P_IRDA);
1417 netif_rx(skb); 1418 netif_rx(skb);
1418} 1419}
diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c
index 20d306fea4cb..755aa444a4dd 100644
--- a/drivers/net/irda/stir4200.c
+++ b/drivers/net/irda/stir4200.c
@@ -52,7 +52,6 @@
52#include <linux/kthread.h> 52#include <linux/kthread.h>
53#include <linux/freezer.h> 53#include <linux/freezer.h>
54#include <net/irda/irda.h> 54#include <net/irda/irda.h>
55#include <net/irda/irlap.h>
56#include <net/irda/irda_device.h> 55#include <net/irda/irda_device.h>
57#include <net/irda/wrapper.h> 56#include <net/irda/wrapper.h>
58#include <net/irda/crc.h> 57#include <net/irda/crc.h>
@@ -349,7 +348,7 @@ static void fir_eof(struct stir_cb *stir)
349 } 348 }
350 skb_reserve(nskb, 1); 349 skb_reserve(nskb, 1);
351 skb = nskb; 350 skb = nskb;
352 memcpy(nskb->data, rx_buff->data, len); 351 skb_copy_to_linear_data(nskb, rx_buff->data, len);
353 } else { 352 } else {
354 nskb = dev_alloc_skb(rx_buff->truesize); 353 nskb = dev_alloc_skb(rx_buff->truesize);
355 if (unlikely(!nskb)) { 354 if (unlikely(!nskb)) {
@@ -364,7 +363,7 @@ static void fir_eof(struct stir_cb *stir)
364 363
365 skb_put(skb, len); 364 skb_put(skb, len);
366 365
367 skb->mac.raw = skb->data; 366 skb_reset_mac_header(skb);
368 skb->protocol = htons(ETH_P_IRDA); 367 skb->protocol = htons(ETH_P_IRDA);
369 skb->dev = stir->netdev; 368 skb->dev = stir->netdev;
370 369
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
index c3ed9b3067e5..ff5358574d0a 100644
--- a/drivers/net/irda/via-ircc.c
+++ b/drivers/net/irda/via-ircc.c
@@ -925,8 +925,8 @@ static int via_ircc_hard_xmit_fir(struct sk_buff *skb,
925 925
926 self->tx_fifo.tail += skb->len; 926 self->tx_fifo.tail += skb->len;
927 self->stats.tx_bytes += skb->len; 927 self->stats.tx_bytes += skb->len;
928 memcpy(self->tx_fifo.queue[self->tx_fifo.free].start, skb->data, 928 skb_copy_from_linear_data(skb,
929 skb->len); 929 self->tx_fifo.queue[self->tx_fifo.free].start, skb->len);
930 self->tx_fifo.len++; 930 self->tx_fifo.len++;
931 self->tx_fifo.free++; 931 self->tx_fifo.free++;
932//F01 if (self->tx_fifo.len == 1) { 932//F01 if (self->tx_fifo.len == 1) {
@@ -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;
@@ -1189,7 +1189,7 @@ F01_E */
1189 skb_reserve(skb, 1); 1189 skb_reserve(skb, 1);
1190 skb_put(skb, len - 4); 1190 skb_put(skb, len - 4);
1191 1191
1192 memcpy(skb->data, self->rx_buff.data, len - 4); 1192 skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4);
1193 IRDA_DEBUG(2, "%s(): len=%x.rx_buff=%p\n", __FUNCTION__, 1193 IRDA_DEBUG(2, "%s(): len=%x.rx_buff=%p\n", __FUNCTION__,
1194 len - 4, self->rx_buff.data); 1194 len - 4, self->rx_buff.data);
1195 1195
@@ -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
@@ -1234,7 +1234,7 @@ static int upload_rxdata(struct via_ircc_cb *self, int iobase)
1234 } 1234 }
1235 skb_reserve(skb, 1); 1235 skb_reserve(skb, 1);
1236 skb_put(skb, len - 4 + 1); 1236 skb_put(skb, len - 4 + 1);
1237 memcpy(skb->data, self->rx_buff.data, len - 4 + 1); 1237 skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4 + 1);
1238 st_fifo->tail++; 1238 st_fifo->tail++;
1239 st_fifo->len++; 1239 st_fifo->len++;
1240 if (st_fifo->tail > MAX_RX_WINDOW) 1240 if (st_fifo->tail > MAX_RX_WINDOW)
@@ -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)) {
@@ -1303,7 +1303,7 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
1303 } 1303 }
1304 skb_reserve(skb, 1); 1304 skb_reserve(skb, 1);
1305 skb_put(skb, len - 4); 1305 skb_put(skb, len - 4);
1306 memcpy(skb->data, self->rx_buff.data, len - 4); 1306 skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4);
1307 1307
1308 IRDA_DEBUG(2, "%s(): len=%x.head=%x\n", __FUNCTION__, 1308 IRDA_DEBUG(2, "%s(): len=%x.head=%x\n", __FUNCTION__,
1309 len - 4, st_fifo->head); 1309 len - 4, st_fifo->head);
@@ -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..c4be973867a6 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
@@ -993,7 +993,7 @@ static int vlsi_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev)
993 goto drop; 993 goto drop;
994 } 994 }
995 else 995 else
996 memcpy(rd->buf, skb->data, len); 996 skb_copy_from_linear_data(skb, rd->buf, len);
997 } 997 }
998 998
999 rd->skb = skb; /* remember skb for tx-complete stats */ 999 rd->skb = skb; /* remember skb for tx-complete stats */
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c
index 4212657fa4f9..5182e800cc18 100644
--- a/drivers/net/irda/w83977af_ir.c
+++ b/drivers/net/irda/w83977af_ir.c
@@ -529,7 +529,7 @@ int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev)
529 /* Decide if we should use PIO or DMA transfer */ 529 /* Decide if we should use PIO or DMA transfer */
530 if (self->io.speed > PIO_MAX_SPEED) { 530 if (self->io.speed > PIO_MAX_SPEED) {
531 self->tx_buff.data = self->tx_buff.head; 531 self->tx_buff.data = self->tx_buff.head;
532 memcpy(self->tx_buff.data, skb->data, skb->len); 532 skb_copy_from_linear_data(skb, self->tx_buff.data, skb->len);
533 self->tx_buff.len = skb->len; 533 self->tx_buff.len = skb->len;
534 534
535 mtt = irda_get_mtt(skb); 535 mtt = irda_get_mtt(skb);
@@ -908,10 +908,14 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self)
908 /* Copy frame without CRC */ 908 /* Copy frame without CRC */
909 if (self->io.speed < 4000000) { 909 if (self->io.speed < 4000000) {
910 skb_put(skb, len-2); 910 skb_put(skb, len-2);
911 memcpy(skb->data, self->rx_buff.data, len-2); 911 skb_copy_to_linear_data(skb,
912 self->rx_buff.data,
913 len - 2);
912 } else { 914 } else {
913 skb_put(skb, len-4); 915 skb_put(skb, len-4);
914 memcpy(skb->data, self->rx_buff.data, len-4); 916 skb_copy_to_linear_data(skb,
917 self->rx_buff.data,
918 len - 4);
915 } 919 }
916 920
917 /* Move to next frame */ 921 /* Move to next frame */
@@ -919,7 +923,7 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self)
919 self->stats.rx_packets++; 923 self->stats.rx_packets++;
920 924
921 skb->dev = self->netdev; 925 skb->dev = self->netdev;
922 skb->mac.raw = skb->data; 926 skb_reset_mac_header(skb);
923 skb->protocol = htons(ETH_P_IRDA); 927 skb->protocol = htons(ETH_P_IRDA);
924 netif_rx(skb); 928 netif_rx(skb);
925 self->netdev->last_rx = jiffies; 929 self->netdev->last_rx = jiffies;