]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
brcmutil: simplify brcmu_pkt_free_skb()
authorArend van Spriel <arend@broadcom.com>
Wed, 17 Apr 2013 19:25:52 +0000 (21:25 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 22 Apr 2013 19:20:21 +0000 (15:20 -0400)
The function brcmu_pkt_free_skb() use skb->destructor to decide
how the sk_buff should be freed. However, when running AP mode
with iptables configured this results in a kernel warning.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmutil/utils.c

index bf5e50fc21ba8653413c943dd774ae35000d1064..0f7e1c7b6f58c914b5b6f8d42814481d057d3d5d 100644 (file)
@@ -45,17 +45,9 @@ void brcmu_pkt_buf_free_skb(struct sk_buff *skb)
 {
        if (!skb)
                return;
+
        WARN_ON(skb->next);
-       if (skb->destructor)
-               /* cannot kfree_skb() on hard IRQ (net/core/skbuff.c) if
-                * destructor exists
-                */
-               dev_kfree_skb_any(skb);
-       else
-               /* can free immediately (even in_irq()) if destructor
-                * does not exist
-                */
-               dev_kfree_skb(skb);
+       dev_kfree_skb_any(skb);
 }
 EXPORT_SYMBOL(brcmu_pkt_buf_free_skb);