Commit c960e2b3 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Kalle Valo

qtnfmac: Simplify code in _attach functions

There is no need to re-implement 'netdev_alloc_skb_ip_align()' here.
Keep the code simple.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarSergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200407193233.9439-1-christophe.jaillet@wanadoo.fr
parent ec4d3e3a
...@@ -286,7 +286,7 @@ static int pearl_skb2rbd_attach(struct qtnf_pcie_pearl_state *ps, u16 index) ...@@ -286,7 +286,7 @@ static int pearl_skb2rbd_attach(struct qtnf_pcie_pearl_state *ps, u16 index)
struct sk_buff *skb; struct sk_buff *skb;
dma_addr_t paddr; dma_addr_t paddr;
skb = __netdev_alloc_skb_ip_align(NULL, SKB_BUF_SIZE, GFP_ATOMIC); skb = netdev_alloc_skb_ip_align(NULL, SKB_BUF_SIZE);
if (!skb) { if (!skb) {
priv->rx_skb[index] = NULL; priv->rx_skb[index] = NULL;
return -ENOMEM; return -ENOMEM;
......
...@@ -247,7 +247,7 @@ topaz_skb2rbd_attach(struct qtnf_pcie_topaz_state *ts, u16 index, u32 wrap) ...@@ -247,7 +247,7 @@ topaz_skb2rbd_attach(struct qtnf_pcie_topaz_state *ts, u16 index, u32 wrap)
struct sk_buff *skb; struct sk_buff *skb;
dma_addr_t paddr; dma_addr_t paddr;
skb = __netdev_alloc_skb_ip_align(NULL, SKB_BUF_SIZE, GFP_ATOMIC); skb = netdev_alloc_skb_ip_align(NULL, SKB_BUF_SIZE);
if (!skb) { if (!skb) {
ts->base.rx_skb[index] = NULL; ts->base.rx_skb[index] = NULL;
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment