From 126c387b239ace4ae5afa42884a91af41b491971 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 24 Jun 2010 22:59:23 +0200 Subject: [PATCH] compat: backport skb_queue_splice_init This is needed by iwmc3200wifi. Signed-off-by: Hauke Mehrtens --- include/linux/compat-2.6.28.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/linux/compat-2.6.28.h b/include/linux/compat-2.6.28.h index 2cab3201dba0..716054888fbd 100644 --- a/include/linux/compat-2.6.28.h +++ b/include/linux/compat-2.6.28.h @@ -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 -- 2.30.2