Skip to content

Commit

Permalink
enic: use netdev_alloc_skb
Browse files Browse the repository at this point in the history
Use netdev_alloc_skb rather than dev_alloc_skb

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Scott Feldman authored and David S. Miller committed Sep 4, 2009
1 parent ea0d7d9 commit d19e22d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/net/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,11 +869,12 @@ static void enic_free_rq_buf(struct vnic_rq *rq, struct vnic_rq_buf *buf)
dev_kfree_skb_any(buf->os_buf);
}

static inline struct sk_buff *enic_rq_alloc_skb(unsigned int size)
static inline struct sk_buff *enic_rq_alloc_skb(struct net_device *netdev,
unsigned int size)
{
struct sk_buff *skb;

skb = dev_alloc_skb(size + NET_IP_ALIGN);
skb = netdev_alloc_skb(netdev, size + NET_IP_ALIGN);

if (skb)
skb_reserve(skb, NET_IP_ALIGN);
Expand All @@ -884,12 +885,13 @@ static inline struct sk_buff *enic_rq_alloc_skb(unsigned int size)
static int enic_rq_alloc_buf(struct vnic_rq *rq)
{
struct enic *enic = vnic_dev_priv(rq->vdev);
struct net_device *netdev = enic->netdev;
struct sk_buff *skb;
unsigned int len = enic->netdev->mtu + ETH_HLEN;
unsigned int len = netdev->mtu + ETH_HLEN;
unsigned int os_buf_index = 0;
dma_addr_t dma_addr;

skb = enic_rq_alloc_skb(len);
skb = enic_rq_alloc_skb(netdev, len);
if (!skb)
return -ENOMEM;

Expand Down

0 comments on commit d19e22d

Please sign in to comment.