summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-07-19 15:05:11 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2014-08-10 20:39:26 +0200
commitf0d955f3b72dd29f222e70263009f6e519de0482 (patch)
treefefb4627debaa8339a8a6c1e593d990cd247bfbe
parentf58f9d6a1ed989576fef9b6fa00436c8aae76b6f (diff)
backports: add some ubuntu trusty specific changes
Upstream commit 22cdc9b32ee4fc4ce997f69ef7b4549ac95a1434 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>
-rw-r--r--backport/backport-include/generated/utsrelease.h5
-rw-r--r--backport/backport-include/linux/skbuff.h5
-rw-r--r--backport/backport-include/linux/u64_stats_sync.h4
-rw-r--r--patches/collateral-evolutions/network/0028-select_queue/mac80211.patch10
-rw-r--r--patches/collateral-evolutions/network/0028-select_queue/mwifiex.patch5
5 files changed, 21 insertions, 8 deletions
diff --git a/backport/backport-include/generated/utsrelease.h b/backport/backport-include/generated/utsrelease.h
new file mode 100644
index 00000000..c1cf8afe
--- /dev/null
+++ b/backport/backport-include/generated/utsrelease.h
@@ -0,0 +1,5 @@
+#include_next <generated/utsrelease.h>
+
+#ifndef UTS_UBUNTU_RELEASE_ABI
+#define UTS_UBUNTU_RELEASE_ABI 0
+#endif
diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h
index a7076638..4b4ca507 100644
--- a/backport/backport-include/linux/skbuff.h
+++ b/backport/backport-include/linux/skbuff.h
@@ -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.
*
diff --git a/backport/backport-include/linux/u64_stats_sync.h b/backport/backport-include/linux/u64_stats_sync.h
index 03023225..2c68d41e 100644
--- a/backport/backport-include/linux/u64_stats_sync.h
+++ b/backport/backport-include/linux/u64_stats_sync.h
@@ -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)
diff --git a/patches/collateral-evolutions/network/0028-select_queue/mac80211.patch b/patches/collateral-evolutions/network/0028-select_queue/mac80211.patch
index 12eea54c..5b54658b 100644
--- a/patches/collateral-evolutions/network/0028-select_queue/mac80211.patch
+++ b/patches/collateral-evolutions/network/0028-select_queue/mac80211.patch
@@ -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,
@@ -20,11 +21,12 @@
{
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,
diff --git a/patches/collateral-evolutions/network/0028-select_queue/mwifiex.patch b/patches/collateral-evolutions/network/0028-select_queue/mwifiex.patch
index f7222926..bf609811 100644
--- a/patches/collateral-evolutions/network/0028-select_queue/mwifiex.patch
+++ b/patches/collateral-evolutions/network/0028-select_queue/mwifiex.patch
@@ -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)