compat: backport skb_queue_splice_init
authorHauke Mehrtens <hauke@hauke-m.de>
Thu, 24 Jun 2010 20:59:23 +0000 (22:59 +0200)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Fri, 25 Jun 2010 04:07:57 +0000 (21:07 -0700)
This is needed by iwmc3200wifi.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/linux/compat-2.6.28.h

index 2cab320..7160548 100644 (file)
@@ -146,6 +146,23 @@ static inline void skb_queue_splice(const struct sk_buff_head *list,
        }
 }
 
+/**
+ *     skb_queue_splice - join two skb lists and reinitialise the emptied list
+ *     @list: the new list to add
+ *     @head: the place to add it in the first list
+ *
+ *     The list at @list is reinitialised
+ */
+static inline void skb_queue_splice_init(struct sk_buff_head *list,
+                                        struct sk_buff_head *head)
+{
+       if (!skb_queue_empty(list)) {
+               __skb_queue_splice(list, (struct sk_buff *) head, head->next);
+               head->qlen += list->qlen;
+               __skb_queue_head_init(list);
+       }
+}
+
 /**
  *     skb_queue_splice_tail - join two skb lists and reinitialise the emptied list
  *     @list: the new list to add