diff options
author | Paul Mackerras <paulus@samba.org> | 2007-04-29 22:38:01 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-29 22:38:01 -0400 |
commit | 49e1900d4cc2e7bcecb681fe60f0990bec2dcce8 (patch) | |
tree | 253801ebf57e0a23856a2c7be129c2c178f62fdf /drivers/net/irda/w83977af_ir.c | |
parent | 34f6d749c0a328817d5e36274e53121c1db734dc (diff) | |
parent | b9099ff63c75216d6ca10bce5a1abcd9293c27e6 (diff) |
Merge branch 'linux-2.6' into for-2.6.22
Diffstat (limited to 'drivers/net/irda/w83977af_ir.c')
-rw-r--r-- | drivers/net/irda/w83977af_ir.c | 12 |
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; |