aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amd/pcnet32.c
diff options
context:
space:
mode:
authorPradeep A Dalvi <netdev@pradeepdalvi.com>2012-02-04 21:49:09 -0500
committerDavid S. Miller <davem@davemloft.net>2012-02-06 11:41:20 -0500
commit1d266430546acf01438ae42d0a7370db4817e2ad (patch)
tree149268ba8ad2b3288ae001e5ab28146e4361a6d0 /drivers/net/ethernet/amd/pcnet32.c
parent3238a9be4d7ad95c741bcfe6c147406eeef62d95 (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/amd/pcnet32.c')
-rw-r--r--drivers/net/ethernet/amd/pcnet32.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
index 1bb388f62e5b..86b6d8e4e6cd 100644
--- a/drivers/net/ethernet/amd/pcnet32.c
+++ b/drivers/net/ethernet/amd/pcnet32.c
@@ -588,11 +588,11 @@ static void pcnet32_realloc_rx_ring(struct net_device *dev,
588 /* now allocate any new buffers needed */ 588 /* now allocate any new buffers needed */
589 for (; new < size; new++) { 589 for (; new < size; new++) {
590 struct sk_buff *rx_skbuff; 590 struct sk_buff *rx_skbuff;
591 new_skb_list[new] = dev_alloc_skb(PKT_BUF_SKB); 591 new_skb_list[new] = netdev_alloc_skb(dev, PKT_BUF_SKB);
592 rx_skbuff = new_skb_list[new]; 592 rx_skbuff = new_skb_list[new];
593 if (!rx_skbuff) { 593 if (!rx_skbuff) {
594 /* keep the original lists and buffers */ 594 /* keep the original lists and buffers */
595 netif_err(lp, drv, dev, "%s dev_alloc_skb failed\n", 595 netif_err(lp, drv, dev, "%s netdev_alloc_skb failed\n",
596 __func__); 596 __func__);
597 goto free_all_new; 597 goto free_all_new;
598 } 598 }
@@ -909,7 +909,7 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
909 /* Initialize Transmit buffers. */ 909 /* Initialize Transmit buffers. */
910 size = data_len + 15; 910 size = data_len + 15;
911 for (x = 0; x < numbuffs; x++) { 911 for (x = 0; x < numbuffs; x++) {
912 skb = dev_alloc_skb(size); 912 skb = netdev_alloc_skb(dev, size);
913 if (!skb) { 913 if (!skb) {
914 netif_printk(lp, hw, KERN_DEBUG, dev, 914 netif_printk(lp, hw, KERN_DEBUG, dev,
915 "Cannot allocate skb at line: %d!\n", 915 "Cannot allocate skb at line: %d!\n",
@@ -1152,7 +1152,7 @@ static void pcnet32_rx_entry(struct net_device *dev,
1152 if (pkt_len > rx_copybreak) { 1152 if (pkt_len > rx_copybreak) {
1153 struct sk_buff *newskb; 1153 struct sk_buff *newskb;
1154 1154
1155 newskb = dev_alloc_skb(PKT_BUF_SKB); 1155 newskb = netdev_alloc_skb(dev, PKT_BUF_SKB);
1156 if (newskb) { 1156 if (newskb) {
1157 skb_reserve(newskb, NET_IP_ALIGN); 1157 skb_reserve(newskb, NET_IP_ALIGN);
1158 skb = lp->rx_skbuff[entry]; 1158 skb = lp->rx_skbuff[entry];
@@ -1172,7 +1172,7 @@ static void pcnet32_rx_entry(struct net_device *dev,
1172 } else 1172 } else
1173 skb = NULL; 1173 skb = NULL;
1174 } else 1174 } else
1175 skb = dev_alloc_skb(pkt_len + NET_IP_ALIGN); 1175 skb = netdev_alloc_skb(dev, pkt_len + NET_IP_ALIGN);
1176 1176
1177 if (skb == NULL) { 1177 if (skb == NULL) {
1178 netif_err(lp, drv, dev, "Memory squeeze, dropping packet\n"); 1178 netif_err(lp, drv, dev, "Memory squeeze, dropping packet\n");
@@ -2271,11 +2271,11 @@ static int pcnet32_init_ring(struct net_device *dev)
2271 for (i = 0; i < lp->rx_ring_size; i++) { 2271 for (i = 0; i < lp->rx_ring_size; i++) {
2272 struct sk_buff *rx_skbuff = lp->rx_skbuff[i]; 2272 struct sk_buff *rx_skbuff = lp->rx_skbuff[i];
2273 if (rx_skbuff == NULL) { 2273 if (rx_skbuff == NULL) {
2274 lp->rx_skbuff[i] = dev_alloc_skb(PKT_BUF_SKB); 2274 lp->rx_skbuff[i] = netdev_alloc_skb(dev, PKT_BUF_SKB);
2275 rx_skbuff = lp->rx_skbuff[i]; 2275 rx_skbuff = lp->rx_skbuff[i];
2276 if (!rx_skbuff) { 2276 if (!rx_skbuff) {
2277 /* there is not much we can do at this point */ 2277 /* there is not much we can do at this point */
2278 netif_err(lp, drv, dev, "%s dev_alloc_skb failed\n", 2278 netif_err(lp, drv, dev, "%s netdev_alloc_skb failed\n",
2279 __func__); 2279 __func__);
2280 return -1; 2280 return -1;
2281 } 2281 }