linux-nokia-n900: apply wifi cve fixes (MR 3558)
- Downgrade kernel from EOL 5.18 to LTS 5.15 in order to apply WiFi CVE fixes. It is currently not possible to upgrade to newer (5.19+) kernels due to a USB regression. - Modify 0005-iio-accel-st-accel-add-lis302dl.patch so it applies on 5.15.74 - Reinstate 0008-wl1251-specify-max.-IE-length.patch for nl80211 support. Patch was dropped because it is in mainline since 5.18 [ci:skip-vercheck]: downgrade [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
13046d8972
commit
c49180f8cf
4 changed files with 422 additions and 539 deletions
|
@ -1,20 +1,17 @@
|
||||||
diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h
|
diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h
|
||||||
index 96e66b2f4cd9e..5b0f54e33d9ef 100644
|
index 8750dea56fcb..586146ac6884 100644
|
||||||
--- a/drivers/iio/accel/st_accel.h
|
--- a/drivers/iio/accel/st_accel.h
|
||||||
+++ b/drivers/iio/accel/st_accel.h
|
+++ b/drivers/iio/accel/st_accel.h
|
||||||
@@ -36,8 +36,10 @@
|
@@ -61,6 +61,7 @@ enum st_accel_type {
|
||||||
#define LIS3DE_ACCEL_DEV_NAME "lis3de"
|
#define LIS3DE_ACCEL_DEV_NAME "lis3de"
|
||||||
#define LIS2DE12_ACCEL_DEV_NAME "lis2de12"
|
#define LIS2DE12_ACCEL_DEV_NAME "lis2de12"
|
||||||
#define LIS2HH12_ACCEL_DEV_NAME "lis2hh12"
|
#define LIS2HH12_ACCEL_DEV_NAME "lis2hh12"
|
||||||
+#define LIS302DL_ACCEL_DEV_NAME "lis302dl"
|
+#define LIS302DL_ACCEL_DEV_NAME "lis302dl"
|
||||||
#define SC7A20_ACCEL_DEV_NAME "sc7a20"
|
|
||||||
|
|
||||||
+
|
|
||||||
#ifdef CONFIG_IIO_BUFFER
|
#ifdef CONFIG_IIO_BUFFER
|
||||||
int st_accel_allocate_ring(struct iio_dev *indio_dev);
|
int st_accel_allocate_ring(struct iio_dev *indio_dev);
|
||||||
int st_accel_trig_set_state(struct iio_trigger *trig, bool state);
|
|
||||||
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
|
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
|
||||||
index 5c5da6fdb4902..673f3807f001c 100644
|
index f1e6ec380667..2adf8cf7307b 100644
|
||||||
--- a/drivers/iio/accel/st_accel_core.c
|
--- a/drivers/iio/accel/st_accel_core.c
|
||||||
+++ b/drivers/iio/accel/st_accel_core.c
|
+++ b/drivers/iio/accel/st_accel_core.c
|
||||||
@@ -444,6 +444,7 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
|
@@ -444,6 +444,7 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
|
||||||
|
@ -26,48 +23,17 @@ index 5c5da6fdb4902..673f3807f001c 100644
|
||||||
.ch = (struct iio_chan_spec *)st_accel_8bit_channels,
|
.ch = (struct iio_chan_spec *)st_accel_8bit_channels,
|
||||||
.odr = {
|
.odr = {
|
||||||
diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
|
diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
|
||||||
index 96adc4344f4a5..45ee0ddc133c9 100644
|
index cba57459e90a..466443101e8a 100644
|
||||||
--- a/drivers/iio/accel/st_accel_i2c.c
|
--- a/drivers/iio/accel/st_accel_i2c.c
|
||||||
+++ b/drivers/iio/accel/st_accel_i2c.c
|
+++ b/drivers/iio/accel/st_accel_i2c.c
|
||||||
@@ -108,6 +108,10 @@ static const struct of_device_id st_accel_of_match[] = {
|
@@ -107,6 +107,10 @@ static const struct of_device_id st_accel_of_match[] = {
|
||||||
|
.compatible = "st,lis2hh12",
|
||||||
.data = LIS2HH12_ACCEL_DEV_NAME,
|
.data = LIS2HH12_ACCEL_DEV_NAME,
|
||||||
},
|
},
|
||||||
{
|
+ {
|
||||||
+ .compatible = "st,lis302dl",
|
+ .compatible = "st,lis302dl",
|
||||||
+ .data = LIS302DL_ACCEL_DEV_NAME,
|
+ .data = LIS302DL_ACCEL_DEV_NAME,
|
||||||
+ },
|
+ },
|
||||||
+ {
|
|
||||||
.compatible = "silan,sc7a20",
|
|
||||||
.data = SC7A20_ACCEL_DEV_NAME,
|
|
||||||
},
|
|
||||||
@@ -146,6 +150,7 @@ static const struct i2c_device_id st_accel_id_table[] = {
|
|
||||||
{ LIS3DE_ACCEL_DEV_NAME },
|
|
||||||
{ LIS2DE12_ACCEL_DEV_NAME },
|
|
||||||
{ LIS2HH12_ACCEL_DEV_NAME },
|
|
||||||
+ { LIS302DL_ACCEL_DEV_NAME },
|
|
||||||
{ SC7A20_ACCEL_DEV_NAME },
|
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
diff --git a/drivers/iio/accel/st_accel_spi.c b/drivers/iio/accel/st_accel_spi.c
|
|
||||||
index 108b63d0146c5..6c0917750288c 100644
|
|
||||||
--- a/drivers/iio/accel/st_accel_spi.c
|
|
||||||
+++ b/drivers/iio/accel/st_accel_spi.c
|
|
||||||
@@ -92,6 +92,10 @@ static const struct of_device_id st_accel_of_match[] = {
|
|
||||||
.compatible = "st,lis3de",
|
|
||||||
.data = LIS3DE_ACCEL_DEV_NAME,
|
|
||||||
},
|
|
||||||
+ {
|
|
||||||
+ .compatible = "st,lis302dl",
|
|
||||||
+ .data = LIS302DL_ACCEL_DEV_NAME,
|
|
||||||
+ },
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
MODULE_DEVICE_TABLE(of, st_accel_of_match);
|
MODULE_DEVICE_TABLE(of, st_accel_of_match);
|
||||||
@@ -147,6 +151,7 @@ static const struct spi_device_id st_accel_id_table[] = {
|
|
||||||
{ LIS2DW12_ACCEL_DEV_NAME },
|
|
||||||
{ LIS3DHH_ACCEL_DEV_NAME },
|
|
||||||
{ LIS3DE_ACCEL_DEV_NAME },
|
|
||||||
+ { LIS302DL_ACCEL_DEV_NAME },
|
|
||||||
{},
|
|
||||||
};
|
|
||||||
MODULE_DEVICE_TABLE(spi, st_accel_id_table);
|
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
From 7538e4ec6211a0d0e3d4f3d3138e9c2a39a38b62 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Merlijn Wajer <merlijn@wizzup.org>
|
||||||
|
Date: Sun, 12 Dec 2021 23:13:08 +0100
|
||||||
|
Subject: [PATCH] wl1251: specify max. IE length
|
||||||
|
|
||||||
|
This fix is similar to commit 77c91295ea53 ("wil6210: specify max. IE
|
||||||
|
length"). Without the max IE length set, wpa_supplicant cannot operate
|
||||||
|
using the nl80211 interface.
|
||||||
|
|
||||||
|
This patch is a workaround - the number 512 is taken from the wlcore
|
||||||
|
driver, but note that per Paul Fertser:
|
||||||
|
|
||||||
|
there's no correct number because the driver will ignore the data
|
||||||
|
passed in extra IEs.
|
||||||
|
|
||||||
|
Suggested-by: Paul Fertser <fercerpav@gmail.com>
|
||||||
|
Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
|
||||||
|
---
|
||||||
|
drivers/net/wireless/ti/wl1251/main.c | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
|
||||||
|
index 136a0d3b23c9..a25a6143e65f 100644
|
||||||
|
--- a/drivers/net/wireless/ti/wl1251/main.c
|
||||||
|
+++ b/drivers/net/wireless/ti/wl1251/main.c
|
||||||
|
@@ -1520,6 +1520,12 @@ int wl1251_init_ieee80211(struct wl1251 *wl)
|
||||||
|
wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
||||||
|
BIT(NL80211_IFTYPE_ADHOC);
|
||||||
|
wl->hw->wiphy->max_scan_ssids = 1;
|
||||||
|
+
|
||||||
|
+ /* We set max_scan_ie_len to a random value to make wpa_supplicant scans not
|
||||||
|
+ * fail, as the driver will the ignore the extra passed IEs anyway
|
||||||
|
+ */
|
||||||
|
+ wl->hw->wiphy->max_scan_ie_len = 512;
|
||||||
|
+
|
||||||
|
wl->hw->wiphy->bands[NL80211_BAND_2GHZ] = &wl1251_band_2ghz;
|
||||||
|
|
||||||
|
wl->hw->queues = 4;
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
|
@ -2,13 +2,16 @@
|
||||||
# Co-Maintainer: Danct12 <danct12@disroot.org>
|
# Co-Maintainer: Danct12 <danct12@disroot.org>
|
||||||
|
|
||||||
pkgname=linux-nokia-n900
|
pkgname=linux-nokia-n900
|
||||||
pkgver=5.18.16
|
pkgver=5.15.74
|
||||||
pkgrel=2
|
pkgrel=0
|
||||||
pkgdesc="Mainline kernel fork for Nokia N900"
|
pkgdesc="Mainline kernel fork for Nokia N900"
|
||||||
arch="armv7"
|
arch="armv7"
|
||||||
url="https://kernel.org/"
|
url="https://kernel.org/"
|
||||||
license="GPL-2.0-only"
|
license="GPL-2.0-only"
|
||||||
options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-community"
|
options="!strip !check !tracedeps
|
||||||
|
pmb:cross-native
|
||||||
|
pmb:kconfigcheck-community
|
||||||
|
"
|
||||||
makedepends="bison findutils flex openssl-dev perl gmp-dev mpc1-dev mpfr-dev postmarketos-installkernel"
|
makedepends="bison findutils flex openssl-dev perl gmp-dev mpc1-dev mpfr-dev postmarketos-installkernel"
|
||||||
|
|
||||||
_carch="arm"
|
_carch="arm"
|
||||||
|
@ -32,6 +35,7 @@ source="
|
||||||
0005-iio-accel-st-accel-add-lis302dl.patch
|
0005-iio-accel-st-accel-add-lis302dl.patch
|
||||||
0006-ARM-dts-N900-use-iio-driver-for-accelerometer.patch
|
0006-ARM-dts-N900-use-iio-driver-for-accelerometer.patch
|
||||||
0007-Revert-ARM-omap3-enable-off-mode-automatically.patch
|
0007-Revert-ARM-omap3-enable-off-mode-automatically.patch
|
||||||
|
0008-wl1251-specify-max.-IE-length.patch
|
||||||
"
|
"
|
||||||
builddir="$srcdir/linux-$_kernver"
|
builddir="$srcdir/linux-$_kernver"
|
||||||
|
|
||||||
|
@ -60,14 +64,15 @@ package() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
dbbc9d1395898a498fa4947fceda1781344fa5d360240f753810daa4fa88e519833e2186c4e582a8f1836e6413e9e85f6563c7770523b704e8702d67622f98b5 linux-5.18.tar.xz
|
d25ad40b5bcd6a4c6042fd0fd84e196e7a58024734c3e9a484fd0d5d54a0c1d87db8a3c784eff55e43b6f021709dc685eb0efa18d2aec327e4f88a79f405705a linux-5.15.tar.xz
|
||||||
86b9fcaf7d441b5185730be480211c1e819f16077e65b7324e13ffcbb506bc9f92cffbf1b79dc65b1b2fab80ccdb071a78e581f4fbd484283c2765901ba296f6 linux-5.18.16.patch.xz
|
c48120c5067003deb6b6ee057a1e6a3b635e2c1ff72435ced83d894d1b4ee03ca792d72777185db94e844e7fb5a4a49a98e6c906eb2cfaef87b96b7c8de5f622 linux-5.15.74.patch.xz
|
||||||
f3dbd53731493d0938a59f124f27cf29e3b2beb3f23f45d8f5bb1175214d9188d9376f6daa508ac13205ac98c7e2ad7462dd0407a3918a5c7d5fc9f8c246cd28 config-nokia-n900.armv7
|
cc0d33417887c36877103e5f9efa939b73f7664029ce50921fb4682e5240fd858869e70f63179eb7a8a83f5e0fd498436c8666e12ce5f79cd9d8b2575310c3b0 config-nokia-n900.armv7
|
||||||
04a39253afd25a7de03dc45ff322161672005406543c44b97d2dc293f202de7de446aee9707a690a290641c55c7bed6e78bbe096ca323dd7d88d3207427c8d31 0001-ARM-dts-n900-increase-charge-current-limit-to-950mA.patch
|
04a39253afd25a7de03dc45ff322161672005406543c44b97d2dc293f202de7de446aee9707a690a290641c55c7bed6e78bbe096ca323dd7d88d3207427c8d31 0001-ARM-dts-n900-increase-charge-current-limit-to-950mA.patch
|
||||||
3cc2036ba264bd855358361aacb309ad1cf1660cb82a0978523508d1b3fe513676c58f6efc5bb64f7601b77392c19d2c609b6d83541db7e418c1737cff3973e8 0002-power-supply-bq27xxx-expose-battery-data-when-CI.patch
|
3cc2036ba264bd855358361aacb309ad1cf1660cb82a0978523508d1b3fe513676c58f6efc5bb64f7601b77392c19d2c609b6d83541db7e418c1737cff3973e8 0002-power-supply-bq27xxx-expose-battery-data-when-CI.patch
|
||||||
991237276bee4ff7bca24cf3a26afe3f12a2a604452793ad905a605890f761ac98374b5509cfbcab33c7b7ccf3da5cc286e70afe27b8e201387f403bf5025ae9 0003-wip-Revert-dma-direct-Fix-potential-NULL-pointer-der.patch
|
991237276bee4ff7bca24cf3a26afe3f12a2a604452793ad905a605890f761ac98374b5509cfbcab33c7b7ccf3da5cc286e70afe27b8e201387f403bf5025ae9 0003-wip-Revert-dma-direct-Fix-potential-NULL-pointer-der.patch
|
||||||
ea33adda06e1fb64b763c34f1f598bb00ccfdba5400d0996871138284b4cb8a51e021c7c0ace9d4bc16027530027fb2a443d5013c6f0b22ed3d64f36152c8854 0004-ARM-dts-omap3_n900-disable-thermal-for-now.patch
|
ea33adda06e1fb64b763c34f1f598bb00ccfdba5400d0996871138284b4cb8a51e021c7c0ace9d4bc16027530027fb2a443d5013c6f0b22ed3d64f36152c8854 0004-ARM-dts-omap3_n900-disable-thermal-for-now.patch
|
||||||
d5a78e68c10a51f4354a420475db2d10e0be92632df9588c9136dba5b0e5e0c8757f0d8e1bd4fdf99cbbf2f93c54d20eacee1c3a668070037afeac1fded1531a 0005-iio-accel-st-accel-add-lis302dl.patch
|
eb23d77ef3b03d90af43a22f37556c040f8ba69f91564d443615c9554c6ea4d19578730e8087b88751b5f673143cc557ac50bb81598f7f50aba08953c7604df8 0005-iio-accel-st-accel-add-lis302dl.patch
|
||||||
302aa8e6677e7ecfae473553806cdf5d47687c4f8e73322d0ace78486f9290ba503069ed6b41250fe38802b6c6091c7c4eac06ab387e011f1316b84ad5e2641d 0006-ARM-dts-N900-use-iio-driver-for-accelerometer.patch
|
302aa8e6677e7ecfae473553806cdf5d47687c4f8e73322d0ace78486f9290ba503069ed6b41250fe38802b6c6091c7c4eac06ab387e011f1316b84ad5e2641d 0006-ARM-dts-N900-use-iio-driver-for-accelerometer.patch
|
||||||
acf3beef5448da7f3be19b862ac2fef65379d9f1617246baaab296083901174d891526cd9bf781162d4406089969c311701dfded04219bafd3c5c7784bc4c2e6 0007-Revert-ARM-omap3-enable-off-mode-automatically.patch
|
acf3beef5448da7f3be19b862ac2fef65379d9f1617246baaab296083901174d891526cd9bf781162d4406089969c311701dfded04219bafd3c5c7784bc4c2e6 0007-Revert-ARM-omap3-enable-off-mode-automatically.patch
|
||||||
|
acaa153809c390957ee8d80caae440a41d84c78f045268ac226f05019dbdd69959b5cf56b6bac2e2c0300bcdb68649ffb847e7a0a333408bf5b4426fc969afe8 0008-wl1251-specify-max.-IE-length.patch
|
||||||
"
|
"
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue