diff options
| author | Saul Wold <sgw@linux.intel.com> | 2017-09-28 11:33:50 -0700 |
|---|---|---|
| committer | Saul Wold <sgw@linux.intel.com> | 2017-09-28 11:33:50 -0700 |
| commit | 9f9b61b91f0901dc63aa0fcfd36f1152b5661b55 (patch) | |
| tree | 987f4e13232461ea6cf7a1f2196a3cf4ee2a0d77 /common | |
| parent | a1518230dcf8d1f59e981e874e38ab293db0e60f (diff) | |
| download | meta-intel-9f9b61b91f0901dc63aa0fcfd36f1152b5661b55.tar.gz | |
backport-iwlwifi: Fix version check for Intel Production Kernel
This patch is only used with the Intel Production kernel as it has a back
port of the HRTimer code which iwlwifi uses so modify the kernel version check.
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'common')
| -rw-r--r-- | common/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch | 87 | ||||
| -rw-r--r-- | common/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb | 12 |
2 files changed, 96 insertions, 3 deletions
diff --git a/common/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch b/common/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch new file mode 100644 index 00000000..4fdc36f7 --- /dev/null +++ b/common/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | From ecb29b78ce946c802058be0c46a0d20432f412e5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Saul Wold <sgw@linux.intel.com> | ||
| 3 | Date: Thu, 28 Sep 2017 10:51:15 -0700 | ||
| 4 | Subject: [PATCH] hrtimer: fix version numbers because production kernel has | ||
| 5 | update | ||
| 6 | |||
| 7 | Decrease the version check because the OTC production kernel which is | ||
| 8 | 4.9 includes the HRTimer code that this is using. | ||
| 9 | |||
| 10 | Upstream-Status: [Backport] It's been backported into the older kernel | ||
| 11 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
| 12 | --- | ||
| 13 | backport-include/linux/hrtimer.h | 2 +- | ||
| 14 | drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +- | ||
| 15 | drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 +- | ||
| 16 | drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c | 2 +- | ||
| 17 | net/mac80211/tx.c | 2 +- | ||
| 18 | 5 files changed, 5 insertions(+), 5 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/backport-include/linux/hrtimer.h b/backport-include/linux/hrtimer.h | ||
| 21 | index bdcf106e1..ae128852d 100644 | ||
| 22 | --- a/backport-include/linux/hrtimer.h | ||
| 23 | +++ b/backport-include/linux/hrtimer.h | ||
| 24 | @@ -4,7 +4,7 @@ | ||
| 25 | #include_next <linux/hrtimer.h> | ||
| 26 | #include <linux/interrupt.h> | ||
| 27 | |||
| 28 | -#if LINUX_VERSION_IS_LESS(4,10,0) | ||
| 29 | +#if LINUX_VERSION_IS_LESS(4,9,0) | ||
| 30 | static inline void backport_hrtimer_start(struct hrtimer *timer, s64 time, | ||
| 31 | const enum hrtimer_mode mode) | ||
| 32 | { | ||
| 33 | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c | ||
| 34 | index cf1f95a01..e6f1ff294 100644 | ||
| 35 | --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c | ||
| 36 | +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c | ||
| 37 | @@ -1310,7 +1310,7 @@ static void iwl_mvm_tx_lat_add_ts_ack(struct sk_buff *skb) | ||
| 38 | s64 ts_1 = ktime_to_ns(skb->tstamp) >> 32; | ||
| 39 | s64 diff = temp - ts_1; | ||
| 40 | |||
| 41 | -#if LINUX_VERSION_IS_LESS(4,10,0) | ||
| 42 | +#if LINUX_VERSION_IS_LESS(4,9,0) | ||
| 43 | skb->tstamp.tv64 += diff; | ||
| 44 | #else | ||
| 45 | skb->tstamp += diff; | ||
| 46 | diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c | ||
| 47 | index df81bce25..ad664bacd 100644 | ||
| 48 | --- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c | ||
| 49 | +++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c | ||
| 50 | @@ -1955,7 +1955,7 @@ static void iwl_trans_pci_tx_lat_add_ts_write(struct sk_buff *skb) | ||
| 51 | s64 ts_1 = ktime_to_ns(skb->tstamp) >> 32; | ||
| 52 | s64 diff = temp - ts_1; | ||
| 53 | |||
| 54 | -#if LINUX_VERSION_IS_LESS(4,10,0) | ||
| 55 | +#if LINUX_VERSION_IS_LESS(4,9,0) | ||
| 56 | skb->tstamp.tv64 += diff << 16; | ||
| 57 | #else | ||
| 58 | skb->tstamp += diff << 16; | ||
| 59 | diff --git a/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c b/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c | ||
| 60 | index e4d45bcf7..cdd0ba9a2 100644 | ||
| 61 | --- a/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c | ||
| 62 | +++ b/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c | ||
| 63 | @@ -796,7 +796,7 @@ void iwl_slv_tx_lat_add_ts_write(struct iwl_trans_slv *trans_slv, | ||
| 64 | |||
| 65 | ts_1 = ktime_to_ns(data_entry->skb->tstamp) >> 32; | ||
| 66 | diff = temp - ts_1; | ||
| 67 | -#if LINUX_VERSION_IS_LESS(4,10,0) | ||
| 68 | +#if LINUX_VERSION_IS_LESS(4,9,0) | ||
| 69 | data_entry->skb->tstamp.tv64 += diff << 16; | ||
| 70 | #else | ||
| 71 | data_entry->skb->tstamp += diff << 16; | ||
| 72 | diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c | ||
| 73 | index 94a348688..0f226c413 100644 | ||
| 74 | --- a/net/mac80211/tx.c | ||
| 75 | +++ b/net/mac80211/tx.c | ||
| 76 | @@ -2278,7 +2278,7 @@ static void ieee80211_tx_latency_start_msrmnt(struct ieee80211_local *local, | ||
| 77 | if (!tx_latency && !tx_consec && !tx_thrshld) | ||
| 78 | return; | ||
| 79 | temp = ktime_to_ms(ktime_get()); | ||
| 80 | -#if LINUX_VERSION_IS_LESS(4,10,0) | ||
| 81 | +#if LINUX_VERSION_IS_LESS(4,9,0) | ||
| 82 | skb->tstamp.tv64 += temp << 32; | ||
| 83 | #else | ||
| 84 | skb->tstamp += temp << 32; | ||
| 85 | -- | ||
| 86 | 2.13.5 | ||
| 87 | |||
diff --git a/common/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb b/common/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb index 7c756a9a..d391045f 100644 --- a/common/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb +++ b/common/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb | |||
| @@ -20,9 +20,15 @@ inherit module | |||
| 20 | PV = "30" | 20 | PV = "30" |
| 21 | SRCREV = "b31221a99488021300e7f89d2ecf9bdd2bc52dd2" | 21 | SRCREV = "b31221a99488021300e7f89d2ecf9bdd2bc52dd2" |
| 22 | 22 | ||
| 23 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/LinuxCore${PV}" | 23 | # Add a patch for Intel's Production Kernel as it's got a backport of HRTimers |
| 24 | SRC_URI += "file://0001-Makefile.real-skip-host-install-scripts.patch" | 24 | PK_PATCH = "${@bb.utils.contains('PREFERRED_PROVIDER_virtual/kernel','linux-intel','file://0001-hrtimer-fix-version-numbers-because-production-kerne.patch','',d)}" |
| 25 | SRC_URI += "file://iwlwifi.conf" | 25 | |
| 26 | SRC_URI = " \ | ||
| 27 | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/LinuxCore${PV} \ | ||
| 28 | file://0001-Makefile.real-skip-host-install-scripts.patch \ | ||
| 29 | ${PK_PATCH} \ | ||
| 30 | file://iwlwifi.conf \ | ||
| 31 | " | ||
| 26 | 32 | ||
| 27 | S = "${WORKDIR}/git" | 33 | S = "${WORKDIR}/git" |
| 28 | 34 | ||
