aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/iwlwifi
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2017-11-07 10:32:26 -0800
committerSaul Wold <sgw@linux.intel.com>2017-11-20 15:33:02 -0800
commitd53dbb38c43da3fd04fed9a55e7b3b9e2c512b9a (patch)
treefbe372dba00d45bbf9fbfbb3726708dc2590daeb /recipes-kernel/iwlwifi
parent5adbf6df4fd89e7531ccccfb9cec7a5314d635f0 (diff)
downloadmeta-intel-d53dbb38c43da3fd04fed9a55e7b3b9e2c512b9a.tar.gz
meta-intel-d53dbb38c43da3fd04fed9a55e7b3b9e2c512b9a.tar.bz2
meta-intel-d53dbb38c43da3fd04fed9a55e7b3b9e2c512b9a.zip
meta-intel: Reorganize the layout to remove common
Remove the concept of the common directory and move all the recipes-* dirs to the top level as a normal layer would be. layer.conf is updated appropriately Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'recipes-kernel/iwlwifi')
-rw-r--r--recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch36
-rw-r--r--recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch87
-rw-r--r--recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf12
-rw-r--r--recipes-kernel/iwlwifi/backport-iwlwifi_git.bb56
4 files changed, 191 insertions, 0 deletions
diff --git a/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch b/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch
new file mode 100644
index 00000000..1d4137ba
--- /dev/null
+++ b/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch
@@ -0,0 +1,36 @@
+From f69ff2fd27903ee052309179271f708d720a2f94 Mon Sep 17 00:00:00 2001
+From: Mikko Ylinen <mikko.ylinen@linux.intel.com>
+Date: Thu, 10 Aug 2017 21:12:51 +0300
+Subject: [PATCH] Makefile.real: skip host install scripts
+
+The scripts run in install target are relevant (and working)
+only if the driver installation is run on the build host.
+
+Skip the scripts when cross-compiling.
+
+Upstream-Status: Inappropriate [Cross-Compile]
+
+Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com>
+---
+ Makefile.real | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/Makefile.real b/Makefile.real
+index ba09f99..f5075de 100644
+--- a/Makefile.real
++++ b/Makefile.real
+@@ -104,11 +104,6 @@ install: modules
+ @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \
+ INSTALL_MOD_DIR=$(KMODDIR) $(KMODPATH_ARG) \
+ modules_install
+- @./scripts/blacklist.sh $(KLIB)/ $(KLIB)/$(KMODDIR)
+- @./scripts/compress_modules.sh $(KLIB)/$(KMODDIR)
+- @./scripts/check_depmod.sh
+- @/sbin/depmod -a
+- @./scripts/update-initramfs.sh $(KLIB)
+ @echo
+ @echo Your backported driver modules should be installed now.
+ @echo Reboot.
+--
+2.1.4
+
diff --git a/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch b/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch
new file mode 100644
index 00000000..4fdc36f7
--- /dev/null
+++ b/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch
@@ -0,0 +1,87 @@
+From ecb29b78ce946c802058be0c46a0d20432f412e5 Mon Sep 17 00:00:00 2001
+From: Saul Wold <sgw@linux.intel.com>
+Date: Thu, 28 Sep 2017 10:51:15 -0700
+Subject: [PATCH] hrtimer: fix version numbers because production kernel has
+ update
+
+Decrease the version check because the OTC production kernel which is
+4.9 includes the HRTimer code that this is using.
+
+Upstream-Status: [Backport] It's been backported into the older kernel
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+---
+ backport-include/linux/hrtimer.h | 2 +-
+ drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +-
+ drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 +-
+ drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c | 2 +-
+ net/mac80211/tx.c | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/backport-include/linux/hrtimer.h b/backport-include/linux/hrtimer.h
+index bdcf106e1..ae128852d 100644
+--- a/backport-include/linux/hrtimer.h
++++ b/backport-include/linux/hrtimer.h
+@@ -4,7 +4,7 @@
+ #include_next <linux/hrtimer.h>
+ #include <linux/interrupt.h>
+
+-#if LINUX_VERSION_IS_LESS(4,10,0)
++#if LINUX_VERSION_IS_LESS(4,9,0)
+ static inline void backport_hrtimer_start(struct hrtimer *timer, s64 time,
+ const enum hrtimer_mode mode)
+ {
+diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+index cf1f95a01..e6f1ff294 100644
+--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
++++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+@@ -1310,7 +1310,7 @@ static void iwl_mvm_tx_lat_add_ts_ack(struct sk_buff *skb)
+ s64 ts_1 = ktime_to_ns(skb->tstamp) >> 32;
+ s64 diff = temp - ts_1;
+
+-#if LINUX_VERSION_IS_LESS(4,10,0)
++#if LINUX_VERSION_IS_LESS(4,9,0)
+ skb->tstamp.tv64 += diff;
+ #else
+ skb->tstamp += diff;
+diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
+index df81bce25..ad664bacd 100644
+--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
++++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
+@@ -1955,7 +1955,7 @@ static void iwl_trans_pci_tx_lat_add_ts_write(struct sk_buff *skb)
+ s64 ts_1 = ktime_to_ns(skb->tstamp) >> 32;
+ s64 diff = temp - ts_1;
+
+-#if LINUX_VERSION_IS_LESS(4,10,0)
++#if LINUX_VERSION_IS_LESS(4,9,0)
+ skb->tstamp.tv64 += diff << 16;
+ #else
+ skb->tstamp += diff << 16;
+diff --git a/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c b/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c
+index e4d45bcf7..cdd0ba9a2 100644
+--- a/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c
++++ b/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c
+@@ -796,7 +796,7 @@ void iwl_slv_tx_lat_add_ts_write(struct iwl_trans_slv *trans_slv,
+
+ ts_1 = ktime_to_ns(data_entry->skb->tstamp) >> 32;
+ diff = temp - ts_1;
+-#if LINUX_VERSION_IS_LESS(4,10,0)
++#if LINUX_VERSION_IS_LESS(4,9,0)
+ data_entry->skb->tstamp.tv64 += diff << 16;
+ #else
+ data_entry->skb->tstamp += diff << 16;
+diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
+index 94a348688..0f226c413 100644
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -2278,7 +2278,7 @@ static void ieee80211_tx_latency_start_msrmnt(struct ieee80211_local *local,
+ if (!tx_latency && !tx_consec && !tx_thrshld)
+ return;
+ temp = ktime_to_ms(ktime_get());
+-#if LINUX_VERSION_IS_LESS(4,10,0)
++#if LINUX_VERSION_IS_LESS(4,9,0)
+ skb->tstamp.tv64 += temp << 32;
+ #else
+ skb->tstamp += temp << 32;
+--
+2.13.5
+
diff --git a/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf b/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf
new file mode 100644
index 00000000..a0e5f6ff
--- /dev/null
+++ b/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf
@@ -0,0 +1,12 @@
+# /etc/modprobe.d/iwlwifi.conf
+# iwlwifi will dynamically load either iwldvm or iwlmvm depending on the
+# microcode file installed on the system. When removing iwlwifi, first
+# remove the iwl?vm module and then iwlwifi.
+remove iwlwifi (/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm16 -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) && /sbin/modprobe -r mac80211
+
+#options iwlwifi lar_disable=1
+#options iwlwifi nvm_file="nvm-sfp-b2-open.bin"
+options iwlmvm power_scheme=1
+
+# PCI BUS
+
diff --git a/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb b/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb
new file mode 100644
index 00000000..d391045f
--- /dev/null
+++ b/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb
@@ -0,0 +1,56 @@
+SUMMARY = "Intel Wireless LinuxCore kernel driver"
+DESCRIPTION = "Intel Wireless LinuxCore kernel driver"
+SECTION = "kernel"
+LICENSE = "GPLv2"
+
+REQUIRED_DISTRO_FEATURES = "wifi"
+
+LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+inherit module
+
+# For some iwfwifi LinuxCore supported wireless chips, the best/latest
+# firmware blobs are found in the iwlwifi's linux-firmware.git fork.
+#
+# See: https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/core_release
+#
+# When updating this recipe, ensure that the proper firmware is included from
+# either the linux-firmware or iwlwifi-firmware repos.
+
+PV = "30"
+SRCREV = "b31221a99488021300e7f89d2ecf9bdd2bc52dd2"
+
+# Add a patch for Intel's Production Kernel as it's got a backport of HRTimers
+PK_PATCH = "${@bb.utils.contains('PREFERRED_PROVIDER_virtual/kernel','linux-intel','file://0001-hrtimer-fix-version-numbers-because-production-kerne.patch','',d)}"
+
+SRC_URI = " \
+ git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/LinuxCore${PV} \
+ file://0001-Makefile.real-skip-host-install-scripts.patch \
+ ${PK_PATCH} \
+ file://iwlwifi.conf \
+ "
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = "INSTALL_MOD_PATH=${D} KLIB_BUILD=${KBUILD_OUTPUT}"
+
+do_configure() {
+ CC=gcc CFLAGS= LDFLAGS= make defconfig-iwlwifi-public KLIB_BUILD=${KBUILD_OUTPUT}
+}
+
+MODULES_INSTALL_TARGET="install"
+
+do_install_append() {
+ ## install configs and service scripts
+ install -d ${D}${sysconfdir}/modprobe.d
+ install -m 0644 ${WORKDIR}/iwlwifi.conf ${D}${sysconfdir}/modprobe.d
+}
+
+SYSTEMD_AUTO_ENABLE_${PN} = "enable"
+
+RDEPENDS_${PN} = "linux-firmware-iwlwifi"
+
+KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi"
+KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi"
+
+KERNEL_MODULE_PACKAGE_PREFIX = "backport-iwlwifi"