qtnfmac: use __netdev_alloc_skb_ip_align
authorSergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Tue, 15 Aug 2017 13:06:33 +0000 (16:06 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 17 Aug 2017 07:05:00 +0000 (10:05 +0300)
Replace __dev_alloc_skb and explicit NET_IP_ALIGN alignment by built-in
__netdev_alloc_skb_ip_align function.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c

index 08b35dc30bc80cd31a23ef0d4a4dd4f023bf7515..079aa1693ff57cb21740fa3c13d80a1e22bb806d 100644 (file)
@@ -429,8 +429,7 @@ static int skb2rbd_attach(struct qtnf_pcie_bus_priv *priv, u16 rx_bd_index)
        struct sk_buff *skb;
        dma_addr_t paddr;
 
-       skb = __dev_alloc_skb(SKB_BUF_SIZE + NET_IP_ALIGN,
-                             GFP_ATOMIC);
+       skb = __netdev_alloc_skb_ip_align(NULL, SKB_BUF_SIZE, GFP_ATOMIC);
        if (!skb) {
                priv->rx_skb[rx_bd_index] = NULL;
                return -ENOMEM;
@@ -438,8 +437,6 @@ static int skb2rbd_attach(struct qtnf_pcie_bus_priv *priv, u16 rx_bd_index)
 
        priv->rx_skb[rx_bd_index] = skb;
 
-       skb_reserve(skb, NET_IP_ALIGN);
-
        rxbd = &priv->rx_bd_vbase[rx_bd_index];
 
        paddr = pci_map_single(priv->pdev, skb->data,