aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1201.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/zd1201.c')
-rw-r--r--drivers/net/wireless/zd1201.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c
index 6cb66a356c96..935b144d9b56 100644
--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -327,7 +327,6 @@ static void zd1201_usbrx(struct urb *urb)
327 memcpy(skb_put(skb, 6), &data[datalen-8], 6); 327 memcpy(skb_put(skb, 6), &data[datalen-8], 6);
328 memcpy(skb_put(skb, 2), &data[datalen-24], 2); 328 memcpy(skb_put(skb, 2), &data[datalen-24], 2);
329 memcpy(skb_put(skb, len), data, len); 329 memcpy(skb_put(skb, len), data, len);
330 skb->dev = zd->dev;
331 skb->dev->last_rx = jiffies; 330 skb->dev->last_rx = jiffies;
332 skb->protocol = eth_type_trans(skb, zd->dev); 331 skb->protocol = eth_type_trans(skb, zd->dev);
333 zd->stats.rx_packets++; 332 zd->stats.rx_packets++;
@@ -385,7 +384,6 @@ static void zd1201_usbrx(struct urb *urb)
385 memcpy(skb_put(skb, 2), &data[6], 2); 384 memcpy(skb_put(skb, 2), &data[6], 2);
386 memcpy(skb_put(skb, len), data+8, len); 385 memcpy(skb_put(skb, len), data+8, len);
387 } 386 }
388 skb->dev = zd->dev;
389 skb->dev->last_rx = jiffies; 387 skb->dev->last_rx = jiffies;
390 skb->protocol = eth_type_trans(skb, zd->dev); 388 skb->protocol = eth_type_trans(skb, zd->dev);
391 zd->stats.rx_packets++; 389 zd->stats.rx_packets++;
@@ -809,10 +807,10 @@ static int zd1201_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
809 txbuf[4] = 0x00; 807 txbuf[4] = 0x00;
810 txbuf[5] = 0x00; 808 txbuf[5] = 0x00;
811 809
812 memcpy(txbuf+6, skb->data+12, skb->len-12); 810 skb_copy_from_linear_data_offset(skb, 12, txbuf + 6, skb->len - 12);
813 if (pad) 811 if (pad)
814 txbuf[skb->len-12+6]=0; 812 txbuf[skb->len-12+6]=0;
815 memcpy(txbuf+skb->len-12+6+pad, skb->data, 12); 813 skb_copy_from_linear_data(skb, txbuf + skb->len - 12 + 6 + pad, 12);
816 *(__be16*)&txbuf[skb->len+6+pad] = htons(skb->len-12+6); 814 *(__be16*)&txbuf[skb->len+6+pad] = htons(skb->len-12+6);
817 txbuf[txbuflen-1] = 0; 815 txbuf[txbuflen-1] = 0;
818 816