From: Hauke Mehrtens Date: Sat, 28 Mar 2009 16:27:17 +0000 (+0100) Subject: Backport skb_queue_splice_tail_init to kernel 2.6.27. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9c1ca2ab07fe2de5aa5718cdfbd8280a1014495d;p=openwrt%2Fstaging%2Fblogic.git Backport skb_queue_splice_tail_init to kernel 2.6.27. Signed-off-by: Hauke Mehrtens --- diff --git a/compat/compat.diff b/compat/compat.diff index 1b6bc1282384..f0ea11f27454 100644 --- a/compat/compat.diff +++ b/compat/compat.diff @@ -357,7 +357,7 @@ index a0c860f..9c6f214 100644 #ifdef CONFIG_MAC80211_VERBOSE_DEBUG if (net_ratelimit()) -@@ -797,6 +799,7 @@ +@@ -796,6 +798,7 @@ } EXPORT_SYMBOL(ieee80211_alloc_hw); @@ -365,7 +365,7 @@ index a0c860f..9c6f214 100644 static const struct net_device_ops ieee80211_master_ops = { .ndo_start_xmit = ieee80211_master_start_xmit, .ndo_open = ieee80211_master_open, -@@ -804,12 +807,22 @@ +@@ -803,12 +806,22 @@ .ndo_set_multicast_list = ieee80211_master_set_multicast_list, .ndo_select_queue = ieee80211_select_queue, }; diff --git a/compat/compat.h b/compat/compat.h index 7e4b9b136a2a..855a02cd9102 100644 --- a/compat/compat.h +++ b/compat/compat.h @@ -28,6 +28,55 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); + +/** + * __skb_queue_head_init - initialize non-spinlock portions of sk_buff_head + * @list: queue to initialize + * + * This initializes only the list and queue length aspects of + * an sk_buff_head object. This allows to initialize the list + * aspects of an sk_buff_head without reinitializing things like + * the spinlock. It can also be used for on-stack sk_buff_head + * objects where the spinlock is known to not be used. + */ +static inline void __skb_queue_head_init(struct sk_buff_head *list) +{ + list->prev = list->next = (struct sk_buff *)list; + list->qlen = 0; +} + +static inline void __skb_queue_splice(const struct sk_buff_head *list, + struct sk_buff *prev, + struct sk_buff *next) +{ + struct sk_buff *first = list->next; + struct sk_buff *last = list->prev; + + first->prev = prev; + prev->next = first; + + last->next = next; + next->prev = last; +} + +/** + * skb_queue_splice_tail - 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 + * + * Each of the lists is a queue. + * The list at @list is reinitialised + */ +static inline void skb_queue_splice_tail_init(struct sk_buff_head *list, + struct sk_buff_head *head) +{ + if (!skb_queue_empty(list)) { + __skb_queue_splice(list, head->prev, (struct sk_buff *) head); + head->qlen += list->qlen; + __skb_queue_head_init(list); + } +} /* From include/linux/skbuff.h */ + #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) */ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) diff --git a/config.mk b/config.mk index 00ab7286573b..c346a4c1b165 100644 --- a/config.mk +++ b/config.mk @@ -262,7 +262,6 @@ CONFIG_AT76C50X_USB=m # Activate AR9170 support only on kernel >= 2.6.29. # The needed USB poison feature was added in this kernel release. ifeq ($(shell test $(KERNEL_SUBLEVEL) -ge 29 && echo yes),yes) -CONFIG_AR9170_COMMON=m CONFIG_AR9170_USB=m CONFIG_AR9170_LEDS=y endif