aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/enic
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/enic')
-rw-r--r--drivers/net/enic/enic_main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index bc5cb225ddac..73f01075287d 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -869,11 +869,12 @@ static void enic_free_rq_buf(struct vnic_rq *rq, struct vnic_rq_buf *buf)
869 dev_kfree_skb_any(buf->os_buf); 869 dev_kfree_skb_any(buf->os_buf);
870} 870}
871 871
872static inline struct sk_buff *enic_rq_alloc_skb(unsigned int size) 872static inline struct sk_buff *enic_rq_alloc_skb(struct net_device *netdev,
873 unsigned int size)
873{ 874{
874 struct sk_buff *skb; 875 struct sk_buff *skb;
875 876
876 skb = dev_alloc_skb(size + NET_IP_ALIGN); 877 skb = netdev_alloc_skb(netdev, size + NET_IP_ALIGN);
877 878
878 if (skb) 879 if (skb)
879 skb_reserve(skb, NET_IP_ALIGN); 880 skb_reserve(skb, NET_IP_ALIGN);
@@ -884,12 +885,13 @@ static inline struct sk_buff *enic_rq_alloc_skb(unsigned int size)
884static int enic_rq_alloc_buf(struct vnic_rq *rq) 885static int enic_rq_alloc_buf(struct vnic_rq *rq)
885{ 886{
886 struct enic *enic = vnic_dev_priv(rq->vdev); 887 struct enic *enic = vnic_dev_priv(rq->vdev);
888 struct net_device *netdev = enic->netdev;
887 struct sk_buff *skb; 889 struct sk_buff *skb;
888 unsigned int len = enic->netdev->mtu + ETH_HLEN; 890 unsigned int len = netdev->mtu + ETH_HLEN;
889 unsigned int os_buf_index = 0; 891 unsigned int os_buf_index = 0;
890 dma_addr_t dma_addr; 892 dma_addr_t dma_addr;
891 893
892 skb = enic_rq_alloc_skb(len); 894 skb = enic_rq_alloc_skb(netdev, len);
893 if (!skb) 895 if (!skb)
894 return -ENOMEM; 896 return -ENOMEM;
895 897