backports: add some ubuntu trusty specific changes
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 19 Jul 2014 13:05:11 +0000 (15:05 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 23 Jul 2014 21:30:46 +0000 (23:30 +0200)
It is now possible to detect a ubuntu kernel see:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1327619

This uses the new define and adds some code depending on the ubuntu
trusty kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backport/backport-include/generated/utsrelease.h [new file with mode: 0644]
backport/backport-include/linux/skbuff.h
backport/backport-include/linux/u64_stats_sync.h
patches/collateral-evolutions/network/0028-select_queue/mac80211.patch
patches/collateral-evolutions/network/0028-select_queue/mwifiex.patch

diff --git a/backport/backport-include/generated/utsrelease.h b/backport/backport-include/generated/utsrelease.h
new file mode 100644 (file)
index 0000000..c1cf8af
--- /dev/null
@@ -0,0 +1,5 @@
+#include_next <generated/utsrelease.h>
+
+#ifndef UTS_UBUNTU_RELEASE_ABI
+#define UTS_UBUNTU_RELEASE_ABI 0
+#endif
index a70766386a10dc375b8623ad2860af357803fd6d..4b4ca5073fb422e33aa086c0dd1966f8e888be8e 100644 (file)
@@ -2,6 +2,7 @@
 #define __BACKPORT_SKBUFF_H
 #include_next <linux/skbuff.h>
 #include <linux/version.h>
+#include <generated/utsrelease.h>
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) && \
       (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(6,4)) && \
@@ -327,7 +328,9 @@ static inline void skb_frag_set_page(struct sk_buff *skb, int f,
 }
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) */
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) && RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) && \
+    RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0) && \
+    !(LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30)
 /*
  * Packet hash types specify the type of hash in skb_set_hash.
  *
index 03023225b53b4228c7c718c1cfec31306728ef40..2c68d41e8ace49e3a75c3c99a75b1a0d1a879ece 100644 (file)
@@ -2,6 +2,7 @@
 #define __BACKPORT_LINUX_U64_STATS_SYNC_H
 
 #include <linux/version.h>
+#include <generated/utsrelease.h>
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
 #include_next <linux/u64_stats_sync.h>
 #else
@@ -113,7 +114,8 @@ static inline bool u64_stats_fetch_retry(const struct u64_stats_sync *syncp,
 
 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) && \
+    !(LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30)
 static inline unsigned int u64_stats_fetch_begin_irq(const struct u64_stats_sync *syncp)
 {
 #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
index 12eea54ce7aeaa4bf1da6a38cd3f55d250a6f008..5b54658b293d8c83431fb596b5e9f46acde6ae53 100644 (file)
@@ -1,10 +1,11 @@
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
-@@ -1071,10 +1071,19 @@ static void ieee80211_uninit(struct net_
+@@ -1072,10 +1072,20 @@ static void ieee80211_uninit(struct net_
        ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev));
  }
  
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0) || \
++    (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30)
  static u16 ieee80211_netdev_select_queue(struct net_device *dev,
                                         struct sk_buff *skb,
                                         void *accel_priv,
  {
        return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb);
  }
-@@ -1090,10 +1099,19 @@ static const struct net_device_ops ieee8
+@@ -1091,10 +1101,20 @@ static const struct net_device_ops ieee8
        .ndo_select_queue       = ieee80211_netdev_select_queue,
  };
  
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0) || \
++    (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30)
  static u16 ieee80211_monitor_select_queue(struct net_device *dev,
                                          struct sk_buff *skb,
                                          void *accel_priv,
index f7222926419627a3e0234578092ae30b3130ac15..bf60981168f8a0c23f4501221c51de6e24ea7d70 100644 (file)
@@ -1,10 +1,11 @@
 --- a/drivers/net/wireless/mwifiex/main.c
 +++ b/drivers/net/wireless/mwifiex/main.c
-@@ -745,9 +745,18 @@ static struct net_device_stats *mwifiex_
+@@ -744,9 +744,19 @@ static struct net_device_stats *mwifiex_
        return &priv->stats;
  }
  
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0) || \
++    (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30)
  static u16
  mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb,
                                void *accel_priv, select_queue_fallback_t fallback)