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