diff options
Diffstat (limited to 'drivers/net/irda/nsc-ircc.c')
-rw-r--r-- | drivers/net/irda/nsc-ircc.c | 15 |
1 files changed, 9 insertions, 6 deletions
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; |