Backport skb_queue_splice_tail_init to kernel 2.6.27.
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 28 Mar 2009 16:27:17 +0000 (17:27 +0100)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 30 Mar 2009 17:17:11 +0000 (10:17 -0700)
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat/compat.diff
compat/compat.h
config.mk

index 1b6bc128238464ca863b7dc627cd3f7334a7f203..f0ea11f27454e9184236f657908089d95ae73760 100644 (file)
@@ -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,
  };
index 7e4b9b136a2a3047df7384ebe969fb4a064d76bf..855a02cd9102a9d8ccf5d3a4d5f4d022a0e453b5 100644 (file)
 
 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))
index 00ab7286573ba7847d3ee6ce1035ba1bd7232a78..c346a4c1b165973d9493a4b31ecb949b2dcb8a90 100644 (file)
--- 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