aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fs_enet
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/fs_enet')
-rw-r--r--drivers/net/fs_enet/fs_enet-main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index 4a05c14bf7ec..e2ddd617493a 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -160,7 +160,8 @@ static int fs_enet_rx_napi(struct net_device *dev, int *budget)
160 skbn = dev_alloc_skb(pkt_len + 2); 160 skbn = dev_alloc_skb(pkt_len + 2);
161 if (skbn != NULL) { 161 if (skbn != NULL) {
162 skb_reserve(skbn, 2); /* align IP header */ 162 skb_reserve(skbn, 2); /* align IP header */
163 memcpy(skbn->data, skb->data, pkt_len); 163 skb_copy_from_linear_data(skb,
164 skbn->data, pkt_len);
164 /* swap */ 165 /* swap */
165 skbt = skb; 166 skbt = skb;
166 skb = skbn; 167 skb = skbn;
@@ -170,7 +171,6 @@ static int fs_enet_rx_napi(struct net_device *dev, int *budget)
170 skbn = dev_alloc_skb(ENET_RX_FRSIZE); 171 skbn = dev_alloc_skb(ENET_RX_FRSIZE);
171 172
172 if (skbn != NULL) { 173 if (skbn != NULL) {
173 skb->dev = dev;
174 skb_put(skb, pkt_len); /* Make room */ 174 skb_put(skb, pkt_len); /* Make room */
175 skb->protocol = eth_type_trans(skb, dev); 175 skb->protocol = eth_type_trans(skb, dev);
176 received++; 176 received++;
@@ -294,7 +294,8 @@ static int fs_enet_rx_non_napi(struct net_device *dev)
294 skbn = dev_alloc_skb(pkt_len + 2); 294 skbn = dev_alloc_skb(pkt_len + 2);
295 if (skbn != NULL) { 295 if (skbn != NULL) {
296 skb_reserve(skbn, 2); /* align IP header */ 296 skb_reserve(skbn, 2); /* align IP header */
297 memcpy(skbn->data, skb->data, pkt_len); 297 skb_copy_from_linear_data(skb,
298 skbn->data, pkt_len);
298 /* swap */ 299 /* swap */
299 skbt = skb; 300 skbt = skb;
300 skb = skbn; 301 skb = skbn;
@@ -304,7 +305,6 @@ static int fs_enet_rx_non_napi(struct net_device *dev)
304 skbn = dev_alloc_skb(ENET_RX_FRSIZE); 305 skbn = dev_alloc_skb(ENET_RX_FRSIZE);
305 306
306 if (skbn != NULL) { 307 if (skbn != NULL) {
307 skb->dev = dev;
308 skb_put(skb, pkt_len); /* Make room */ 308 skb_put(skb, pkt_len); /* Make room */
309 skb->protocol = eth_type_trans(skb, dev); 309 skb->protocol = eth_type_trans(skb, dev);
310 received++; 310 received++;
@@ -516,7 +516,6 @@ void fs_init_bds(struct net_device *dev)
516 break; 516 break;
517 } 517 }
518 fep->rx_skbuff[i] = skb; 518 fep->rx_skbuff[i] = skb;
519 skb->dev = dev;
520 CBDW_BUFADDR(bdp, 519 CBDW_BUFADDR(bdp,
521 dma_map_single(fep->dev, skb->data, 520 dma_map_single(fep->dev, skb->data,
522 L1_CACHE_ALIGN(PKT_MAXBUF_SIZE), 521 L1_CACHE_ALIGN(PKT_MAXBUF_SIZE),