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>
This commit is contained in:

committed by
David S. Miller

parent
1d26643054
commit
21a4e46995
@@ -154,7 +154,7 @@ static int fs_enet_rx_napi(struct napi_struct *napi, int budget)
|
||||
|
||||
if (pkt_len <= fpi->rx_copybreak) {
|
||||
/* +2 to make IP header L1 cache aligned */
|
||||
skbn = dev_alloc_skb(pkt_len + 2);
|
||||
skbn = netdev_alloc_skb(dev, pkt_len + 2);
|
||||
if (skbn != NULL) {
|
||||
skb_reserve(skbn, 2); /* align IP header */
|
||||
skb_copy_from_linear_data(skb,
|
||||
@@ -165,7 +165,7 @@ static int fs_enet_rx_napi(struct napi_struct *napi, int budget)
|
||||
skbn = skbt;
|
||||
}
|
||||
} else {
|
||||
skbn = dev_alloc_skb(ENET_RX_FRSIZE);
|
||||
skbn = netdev_alloc_skb(dev, ENET_RX_FRSIZE);
|
||||
|
||||
if (skbn)
|
||||
skb_align(skbn, ENET_RX_ALIGN);
|
||||
@@ -286,7 +286,7 @@ static int fs_enet_rx_non_napi(struct net_device *dev)
|
||||
|
||||
if (pkt_len <= fpi->rx_copybreak) {
|
||||
/* +2 to make IP header L1 cache aligned */
|
||||
skbn = dev_alloc_skb(pkt_len + 2);
|
||||
skbn = netdev_alloc_skb(dev, pkt_len + 2);
|
||||
if (skbn != NULL) {
|
||||
skb_reserve(skbn, 2); /* align IP header */
|
||||
skb_copy_from_linear_data(skb,
|
||||
@@ -297,7 +297,7 @@ static int fs_enet_rx_non_napi(struct net_device *dev)
|
||||
skbn = skbt;
|
||||
}
|
||||
} else {
|
||||
skbn = dev_alloc_skb(ENET_RX_FRSIZE);
|
||||
skbn = netdev_alloc_skb(dev, ENET_RX_FRSIZE);
|
||||
|
||||
if (skbn)
|
||||
skb_align(skbn, ENET_RX_ALIGN);
|
||||
@@ -504,7 +504,7 @@ void fs_init_bds(struct net_device *dev)
|
||||
* Initialize the receive buffer descriptors.
|
||||
*/
|
||||
for (i = 0, bdp = fep->rx_bd_base; i < fep->rx_ring; i++, bdp++) {
|
||||
skb = dev_alloc_skb(ENET_RX_FRSIZE);
|
||||
skb = netdev_alloc_skb(dev, ENET_RX_FRSIZE);
|
||||
if (skb == NULL) {
|
||||
dev_warn(fep->dev,
|
||||
"Memory squeeze, unable to allocate skb\n");
|
||||
@@ -592,7 +592,7 @@ static struct sk_buff *tx_skb_align_workaround(struct net_device *dev,
|
||||
struct fs_enet_private *fep = netdev_priv(dev);
|
||||
|
||||
/* Alloc new skb */
|
||||
new_skb = dev_alloc_skb(skb->len + 4);
|
||||
new_skb = netdev_alloc_skb(dev, skb->len + 4);
|
||||
if (!new_skb) {
|
||||
if (net_ratelimit()) {
|
||||
dev_warn(fep->dev,
|
||||
|
Reference in New Issue
Block a user