diff options
Diffstat (limited to 'drivers/net/ethernet/i825xx/82596.c')
-rw-r--r-- | drivers/net/ethernet/i825xx/82596.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ethernet/i825xx/82596.c b/drivers/net/ethernet/i825xx/82596.c index f2408a4d5d9c..6aa927af382c 100644 --- a/drivers/net/ethernet/i825xx/82596.c +++ b/drivers/net/ethernet/i825xx/82596.c | |||
@@ -549,14 +549,13 @@ static inline int init_rx_bufs(struct net_device *dev) | |||
549 | /* First build the Receive Buffer Descriptor List */ | 549 | /* First build the Receive Buffer Descriptor List */ |
550 | 550 | ||
551 | for (i = 0, rbd = lp->rbds; i < rx_ring_size; i++, rbd++) { | 551 | for (i = 0, rbd = lp->rbds; i < rx_ring_size; i++, rbd++) { |
552 | struct sk_buff *skb = dev_alloc_skb(PKT_BUF_SZ); | 552 | struct sk_buff *skb = netdev_alloc_skb(dev, PKT_BUF_SZ); |
553 | 553 | ||
554 | if (skb == NULL) { | 554 | if (skb == NULL) { |
555 | remove_rx_bufs(dev); | 555 | remove_rx_bufs(dev); |
556 | return -ENOMEM; | 556 | return -ENOMEM; |
557 | } | 557 | } |
558 | 558 | ||
559 | skb->dev = dev; | ||
560 | rbd->v_next = rbd+1; | 559 | rbd->v_next = rbd+1; |
561 | rbd->b_next = WSWAPrbd(virt_to_bus(rbd+1)); | 560 | rbd->b_next = WSWAPrbd(virt_to_bus(rbd+1)); |
562 | rbd->b_addr = WSWAPrbd(virt_to_bus(rbd)); | 561 | rbd->b_addr = WSWAPrbd(virt_to_bus(rbd)); |
@@ -810,7 +809,7 @@ static inline int i596_rx(struct net_device *dev) | |||
810 | struct sk_buff *newskb; | 809 | struct sk_buff *newskb; |
811 | 810 | ||
812 | /* Get fresh skbuff to replace filled one. */ | 811 | /* Get fresh skbuff to replace filled one. */ |
813 | newskb = dev_alloc_skb(PKT_BUF_SZ); | 812 | newskb = netdev_alloc_skb(dev, PKT_BUF_SZ); |
814 | if (newskb == NULL) { | 813 | if (newskb == NULL) { |
815 | skb = NULL; /* drop pkt */ | 814 | skb = NULL; /* drop pkt */ |
816 | goto memory_squeeze; | 815 | goto memory_squeeze; |
@@ -819,7 +818,6 @@ static inline int i596_rx(struct net_device *dev) | |||
819 | skb_put(skb, pkt_len); | 818 | skb_put(skb, pkt_len); |
820 | rx_in_place = 1; | 819 | rx_in_place = 1; |
821 | rbd->skb = newskb; | 820 | rbd->skb = newskb; |
822 | newskb->dev = dev; | ||
823 | rbd->v_data = newskb->data; | 821 | rbd->v_data = newskb->data; |
824 | rbd->b_data = WSWAPchar(virt_to_bus(newskb->data)); | 822 | rbd->b_data = WSWAPchar(virt_to_bus(newskb->data)); |
825 | #ifdef __mc68000__ | 823 | #ifdef __mc68000__ |
@@ -827,7 +825,7 @@ static inline int i596_rx(struct net_device *dev) | |||
827 | #endif | 825 | #endif |
828 | } | 826 | } |
829 | else | 827 | else |
830 | skb = dev_alloc_skb(pkt_len + 2); | 828 | skb = netdev_alloc_skb(dev, pkt_len + 2); |
831 | memory_squeeze: | 829 | memory_squeeze: |
832 | if (skb == NULL) { | 830 | if (skb == NULL) { |
833 | /* XXX tulip.c can defer packets here!! */ | 831 | /* XXX tulip.c can defer packets here!! */ |