diff options
author | Pradeep A Dalvi <netdev@pradeepdalvi.com> | 2012-02-04 21:50:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-06 11:52:27 -0500 |
commit | c056b734e54e12f38f34a2583a4824e6cecc16c1 (patch) | |
tree | 78e501091b9f99477e9b919c03fd5b1930a46198 /drivers/net/ethernet/i825xx | |
parent | 21a4e46995fa1a76281ac0281ff837f706231a37 (diff) |
netdev: ethernet dev_alloc_skb to netdev_alloc_skb
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet
- Removed extra skb->dev = dev after netdev_alloc_skb
Signed-off-by: Pradeep A Dalvi <netdev@pradeepdalvi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/i825xx')
-rw-r--r-- | drivers/net/ethernet/i825xx/3c505.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/i825xx/3c507.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/i825xx/3c523.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/i825xx/3c527.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/i825xx/82596.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/i825xx/eepro.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/i825xx/eexpress.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/i825xx/ether1.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/i825xx/lp486e.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/i825xx/ni52.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/i825xx/sun3_82586.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/i825xx/znet.c | 2 |
12 files changed, 15 insertions, 17 deletions
diff --git a/drivers/net/ethernet/i825xx/3c505.c b/drivers/net/ethernet/i825xx/3c505.c index ba82a266051d..6a5c21b82c51 100644 --- a/drivers/net/ethernet/i825xx/3c505.c +++ b/drivers/net/ethernet/i825xx/3c505.c | |||
@@ -583,7 +583,7 @@ static void receive_packet(struct net_device *dev, int len) | |||
583 | unsigned long flags; | 583 | unsigned long flags; |
584 | 584 | ||
585 | rlen = (len + 1) & ~1; | 585 | rlen = (len + 1) & ~1; |
586 | skb = dev_alloc_skb(rlen + 2); | 586 | skb = netdev_alloc_skb(dev, rlen + 2); |
587 | 587 | ||
588 | if (!skb) { | 588 | if (!skb) { |
589 | pr_warning("%s: memory squeeze, dropping packet\n", dev->name); | 589 | pr_warning("%s: memory squeeze, dropping packet\n", dev->name); |
diff --git a/drivers/net/ethernet/i825xx/3c507.c b/drivers/net/ethernet/i825xx/3c507.c index 1e945551c144..ed6925f11479 100644 --- a/drivers/net/ethernet/i825xx/3c507.c +++ b/drivers/net/ethernet/i825xx/3c507.c | |||
@@ -851,7 +851,7 @@ static void el16_rx(struct net_device *dev) | |||
851 | struct sk_buff *skb; | 851 | struct sk_buff *skb; |
852 | 852 | ||
853 | pkt_len &= 0x3fff; | 853 | pkt_len &= 0x3fff; |
854 | skb = dev_alloc_skb(pkt_len+2); | 854 | skb = netdev_alloc_skb(dev, pkt_len + 2); |
855 | if (skb == NULL) { | 855 | if (skb == NULL) { |
856 | pr_err("%s: Memory squeeze, dropping packet.\n", | 856 | pr_err("%s: Memory squeeze, dropping packet.\n", |
857 | dev->name); | 857 | dev->name); |
diff --git a/drivers/net/ethernet/i825xx/3c523.c b/drivers/net/ethernet/i825xx/3c523.c index d70d3df4c985..8451ecd4c1ec 100644 --- a/drivers/net/ethernet/i825xx/3c523.c +++ b/drivers/net/ethernet/i825xx/3c523.c | |||
@@ -983,7 +983,7 @@ static void elmc_rcv_int(struct net_device *dev) | |||
983 | if ((totlen = rbd->status) & RBD_LAST) { /* the first and the last buffer? */ | 983 | if ((totlen = rbd->status) & RBD_LAST) { /* the first and the last buffer? */ |
984 | totlen &= RBD_MASK; /* length of this frame */ | 984 | totlen &= RBD_MASK; /* length of this frame */ |
985 | rbd->status = 0; | 985 | rbd->status = 0; |
986 | skb = (struct sk_buff *) dev_alloc_skb(totlen + 2); | 986 | skb = netdev_alloc_skb(dev, totlen + 2); |
987 | if (skb != NULL) { | 987 | if (skb != NULL) { |
988 | skb_reserve(skb, 2); /* 16 byte alignment */ | 988 | skb_reserve(skb, 2); /* 16 byte alignment */ |
989 | skb_put(skb,totlen); | 989 | skb_put(skb,totlen); |
diff --git a/drivers/net/ethernet/i825xx/3c527.c b/drivers/net/ethernet/i825xx/3c527.c index 474b5e71a53a..ef43f3e951c5 100644 --- a/drivers/net/ethernet/i825xx/3c527.c +++ b/drivers/net/ethernet/i825xx/3c527.c | |||
@@ -1169,7 +1169,7 @@ static void mc32_rx_ring(struct net_device *dev) | |||
1169 | /* Try to save time by avoiding a copy on big frames */ | 1169 | /* Try to save time by avoiding a copy on big frames */ |
1170 | 1170 | ||
1171 | if ((length > RX_COPYBREAK) && | 1171 | if ((length > RX_COPYBREAK) && |
1172 | ((newskb=dev_alloc_skb(1532)) != NULL)) | 1172 | ((newskb = netdev_alloc_skb(dev, 1532)) != NULL)) |
1173 | { | 1173 | { |
1174 | skb=lp->rx_ring[rx_ring_tail].skb; | 1174 | skb=lp->rx_ring[rx_ring_tail].skb; |
1175 | skb_put(skb, length); | 1175 | skb_put(skb, length); |
@@ -1180,7 +1180,7 @@ static void mc32_rx_ring(struct net_device *dev) | |||
1180 | } | 1180 | } |
1181 | else | 1181 | else |
1182 | { | 1182 | { |
1183 | skb=dev_alloc_skb(length+2); | 1183 | skb = netdev_alloc_skb(dev, length + 2); |
1184 | 1184 | ||
1185 | if(skb==NULL) { | 1185 | if(skb==NULL) { |
1186 | dev->stats.rx_dropped++; | 1186 | dev->stats.rx_dropped++; |
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!! */ |
diff --git a/drivers/net/ethernet/i825xx/eepro.c b/drivers/net/ethernet/i825xx/eepro.c index 114cda7721fe..7a4ad4a07917 100644 --- a/drivers/net/ethernet/i825xx/eepro.c +++ b/drivers/net/ethernet/i825xx/eepro.c | |||
@@ -1563,7 +1563,7 @@ eepro_rx(struct net_device *dev) | |||
1563 | 1563 | ||
1564 | dev->stats.rx_bytes+=rcv_size; | 1564 | dev->stats.rx_bytes+=rcv_size; |
1565 | rcv_size &= 0x3fff; | 1565 | rcv_size &= 0x3fff; |
1566 | skb = dev_alloc_skb(rcv_size+5); | 1566 | skb = netdev_alloc_skb(dev, rcv_size + 5); |
1567 | if (skb == NULL) { | 1567 | if (skb == NULL) { |
1568 | printk(KERN_NOTICE "%s: Memory squeeze, dropping packet.\n", dev->name); | 1568 | printk(KERN_NOTICE "%s: Memory squeeze, dropping packet.\n", dev->name); |
1569 | dev->stats.rx_dropped++; | 1569 | dev->stats.rx_dropped++; |
diff --git a/drivers/net/ethernet/i825xx/eexpress.c b/drivers/net/ethernet/i825xx/eexpress.c index 3a9580f3d4dd..3fc649e54a32 100644 --- a/drivers/net/ethernet/i825xx/eexpress.c +++ b/drivers/net/ethernet/i825xx/eexpress.c | |||
@@ -955,7 +955,7 @@ static void eexp_hw_rx_pio(struct net_device *dev) | |||
955 | { | 955 | { |
956 | struct sk_buff *skb; | 956 | struct sk_buff *skb; |
957 | pkt_len &= 0x3fff; | 957 | pkt_len &= 0x3fff; |
958 | skb = dev_alloc_skb(pkt_len+16); | 958 | skb = netdev_alloc_skb(dev, pkt_len + 16); |
959 | if (skb == NULL) | 959 | if (skb == NULL) |
960 | { | 960 | { |
961 | printk(KERN_WARNING "%s: Memory squeeze, dropping packet\n",dev->name); | 961 | printk(KERN_WARNING "%s: Memory squeeze, dropping packet\n",dev->name); |
diff --git a/drivers/net/ethernet/i825xx/ether1.c b/drivers/net/ethernet/i825xx/ether1.c index 42e90a97c7a5..406a12b46404 100644 --- a/drivers/net/ethernet/i825xx/ether1.c +++ b/drivers/net/ethernet/i825xx/ether1.c | |||
@@ -867,7 +867,7 @@ ether1_recv_done (struct net_device *dev) | |||
867 | struct sk_buff *skb; | 867 | struct sk_buff *skb; |
868 | 868 | ||
869 | length = (length + 1) & ~1; | 869 | length = (length + 1) & ~1; |
870 | skb = dev_alloc_skb (length + 2); | 870 | skb = netdev_alloc_skb(dev, length + 2); |
871 | 871 | ||
872 | if (skb) { | 872 | if (skb) { |
873 | skb_reserve (skb, 2); | 873 | skb_reserve (skb, 2); |
diff --git a/drivers/net/ethernet/i825xx/lp486e.c b/drivers/net/ethernet/i825xx/lp486e.c index 02df5f5accb1..6c2952c8ea15 100644 --- a/drivers/net/ethernet/i825xx/lp486e.c +++ b/drivers/net/ethernet/i825xx/lp486e.c | |||
@@ -656,7 +656,7 @@ i596_rx_one(struct net_device *dev, struct i596_private *lp, | |||
656 | if (rfd->stat & RFD_STAT_OK) { | 656 | if (rfd->stat & RFD_STAT_OK) { |
657 | /* a good frame */ | 657 | /* a good frame */ |
658 | int pkt_len = (rfd->count & 0x3fff); | 658 | int pkt_len = (rfd->count & 0x3fff); |
659 | struct sk_buff *skb = dev_alloc_skb(pkt_len); | 659 | struct sk_buff *skb = netdev_alloc_skb(dev, pkt_len); |
660 | 660 | ||
661 | (*frames)++; | 661 | (*frames)++; |
662 | 662 | ||
diff --git a/drivers/net/ethernet/i825xx/ni52.c b/drivers/net/ethernet/i825xx/ni52.c index c0893715ef47..272976e1bb0f 100644 --- a/drivers/net/ethernet/i825xx/ni52.c +++ b/drivers/net/ethernet/i825xx/ni52.c | |||
@@ -964,7 +964,7 @@ static void ni52_rcv_int(struct net_device *dev) | |||
964 | /* the first and the last buffer? */ | 964 | /* the first and the last buffer? */ |
965 | totlen &= RBD_MASK; /* length of this frame */ | 965 | totlen &= RBD_MASK; /* length of this frame */ |
966 | writew(0x00, &rbd->status); | 966 | writew(0x00, &rbd->status); |
967 | skb = (struct sk_buff *)dev_alloc_skb(totlen+2); | 967 | skb = netdev_alloc_skb(dev, totlen + 2); |
968 | if (skb != NULL) { | 968 | if (skb != NULL) { |
969 | skb_reserve(skb, 2); | 969 | skb_reserve(skb, 2); |
970 | skb_put(skb, totlen); | 970 | skb_put(skb, totlen); |
diff --git a/drivers/net/ethernet/i825xx/sun3_82586.c b/drivers/net/ethernet/i825xx/sun3_82586.c index 296cf8a0ee51..cae17f4bc93e 100644 --- a/drivers/net/ethernet/i825xx/sun3_82586.c +++ b/drivers/net/ethernet/i825xx/sun3_82586.c | |||
@@ -778,7 +778,7 @@ static void sun3_82586_rcv_int(struct net_device *dev) | |||
778 | { | 778 | { |
779 | totlen &= RBD_MASK; /* length of this frame */ | 779 | totlen &= RBD_MASK; /* length of this frame */ |
780 | rbd->status = 0; | 780 | rbd->status = 0; |
781 | skb = (struct sk_buff *) dev_alloc_skb(totlen+2); | 781 | skb = netdev_alloc_skb(dev, totlen + 2); |
782 | if(skb != NULL) | 782 | if(skb != NULL) |
783 | { | 783 | { |
784 | skb_reserve(skb,2); | 784 | skb_reserve(skb,2); |
diff --git a/drivers/net/ethernet/i825xx/znet.c b/drivers/net/ethernet/i825xx/znet.c index 962b4c421f3f..a43649735a04 100644 --- a/drivers/net/ethernet/i825xx/znet.c +++ b/drivers/net/ethernet/i825xx/znet.c | |||
@@ -762,7 +762,7 @@ static void znet_rx(struct net_device *dev) | |||
762 | /* Malloc up new buffer. */ | 762 | /* Malloc up new buffer. */ |
763 | struct sk_buff *skb; | 763 | struct sk_buff *skb; |
764 | 764 | ||
765 | skb = dev_alloc_skb(pkt_len); | 765 | skb = netdev_alloc_skb(dev, pkt_len); |
766 | if (skb == NULL) { | 766 | if (skb == NULL) { |
767 | if (znet_debug) | 767 | if (znet_debug) |
768 | printk(KERN_WARNING "%s: Memory squeeze, dropping packet.\n", dev->name); | 768 | printk(KERN_WARNING "%s: Memory squeeze, dropping packet.\n", dev->name); |