brcm80211: util: remove pointer traversal from brcmu_pkt_buf_free_skb

The function brcmu_pkt_buf_free_skb() was following the next pointer
to free all linked packets. However, it is only called with unlinked
packets so this can be removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Arend van Spriel
2011-11-10 20:30:30 +01:00
committed by John W. Linville
parent 9a95e60e06
commit 53ee4bc467

View File

@@ -41,14 +41,7 @@ EXPORT_SYMBOL(brcmu_pkt_buf_get_skb);
/* Free the driver packet. Free the tag if present */
void brcmu_pkt_buf_free_skb(struct sk_buff *skb)
{
struct sk_buff *nskb;
int nest = 0;
/* perversion: we use skb->next to chain multi-skb packets */
while (skb) {
nskb = skb->next;
skb->next = NULL;
WARN_ON(skb->next);
if (skb->destructor)
/* cannot kfree_skb() on hard IRQ (net/core/skbuff.c) if
* destructor exists
@@ -59,10 +52,6 @@ void brcmu_pkt_buf_free_skb(struct sk_buff *skb)
* does not exist
*/
dev_kfree_skb(skb);
nest++;
skb = nskb;
}
}
EXPORT_SYMBOL(brcmu_pkt_buf_free_skb);