aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/w83977af_ir.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/irda/w83977af_ir.c')
-rw-r--r--drivers/net/irda/w83977af_ir.c12
1 files changed, 8 insertions, 4 deletions
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;