aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pasemi_mac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pasemi_mac.c')
-rw-r--r--drivers/net/pasemi_mac.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c
index ca773580cc51..07475bb7d860 100644
--- a/drivers/net/pasemi_mac.c
+++ b/drivers/net/pasemi_mac.c
@@ -503,13 +503,8 @@ static void pasemi_mac_replenish_rx_ring(const struct net_device *dev,
503 /* Entry in use? */ 503 /* Entry in use? */
504 WARN_ON(*buff); 504 WARN_ON(*buff);
505 505
506 /* skb might still be in there for recycle on short receives */ 506 skb = dev_alloc_skb(BUF_SIZE);
507 if (info->skb) 507 skb_reserve(skb, LOCAL_SKB_ALIGN);
508 skb = info->skb;
509 else {
510 skb = dev_alloc_skb(BUF_SIZE);
511 skb_reserve(skb, LOCAL_SKB_ALIGN);
512 }
513 508
514 if (unlikely(!skb)) 509 if (unlikely(!skb))
515 break; 510 break;
@@ -666,21 +661,7 @@ static int pasemi_mac_clean_rx(struct pasemi_mac_rxring *rx,
666 goto next; 661 goto next;
667 } 662 }
668 663
669 if (len < 256) { 664 info->skb = NULL;
670 struct sk_buff *new_skb;
671
672 new_skb = netdev_alloc_skb(mac->netdev,
673 len + LOCAL_SKB_ALIGN);
674 if (new_skb) {
675 skb_reserve(new_skb, LOCAL_SKB_ALIGN);
676 memcpy(new_skb->data, skb->data, len);
677 /* save the skb in buffer_info as good */
678 skb = new_skb;
679 }
680 /* else just continue with the old one */
681 } else
682 info->skb = NULL;
683
684 info->dma = 0; 665 info->dma = 0;
685 666
686 if (likely((macrx & XCT_MACRX_HTY_M) == XCT_MACRX_HTY_IPV4_OK)) { 667 if (likely((macrx & XCT_MACRX_HTY_M) == XCT_MACRX_HTY_IPV4_OK)) {