summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2020-03-25 11:58:01 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2020-03-25 11:58:01 -0700
commita87b76b9377e3f17de3758b3b1985b8338bda40d (patch)
tree48694dc262bc4bccd2392bef219135107fc4cb2d
parentUpdated to 5.5.10.a (diff)
downloadlinux-libre-hardened-a87b76b9377e3f17de3758b3b1985b8338bda40d.tar.xz
Updated to 5.5.11.a
-rw-r--r--0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch152
-rw-r--r--PKGBUILD9
2 files changed, 158 insertions, 3 deletions
diff --git a/0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch b/0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch
new file mode 100644
index 0000000..af462ee
--- /dev/null
+++ b/0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch
@@ -0,0 +1,152 @@
+From ec701fa986108fae10bee7cfe269e12210521c5f Mon Sep 17 00:00:00 2001
+From: Golan Ben Ami <golan.ben.ami@intel.com>
+Date: Wed, 18 Mar 2020 08:12:54 +0200
+Subject: iwlwifi: don't send GEO_TX_POWER_LIMIT if no wgds table
+
+The GEO_TX_POWER_LIMIT command was sent although
+there is no wgds table, so the fw got wrong SAR values
+from the driver.
+
+Fix this by avoiding sending the command if no wgds
+tables are available.
+
+Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
+Fixes: 39c1a9728f93 ("iwlwifi: refactor the SAR tables from mvm to acpi")
+Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
+Tested-By: Jonathan McDowell <noodles@earth.li>
+Tested-by: Len Brown <len.brown@intel.com>
+---
+ drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 14 ++++++++------
+ drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 14 ++++++++------
+ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 9 ++++++++-
+ 3 files changed, 24 insertions(+), 13 deletions(-)
+
+diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
+index 48d375a86d86..ba2aff3af0fe 100644
+--- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
++++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
+@@ -6,7 +6,7 @@
+ * GPL LICENSE SUMMARY
+ *
+ * Copyright(c) 2017 Intel Deutschland GmbH
+- * Copyright (C) 2019 Intel Corporation
++ * Copyright (C) 2019 - 2020 Intel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+@@ -27,7 +27,7 @@
+ * BSD LICENSE
+ *
+ * Copyright(c) 2017 Intel Deutschland GmbH
+- * Copyright (C) 2019 Intel Corporation
++ * Copyright (C) 2019 - 2020 Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+@@ -491,13 +491,13 @@ int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt,
+ }
+ IWL_EXPORT_SYMBOL(iwl_validate_sar_geo_profile);
+
+-void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
+- struct iwl_per_chain_offset_group *table)
++int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
++ struct iwl_per_chain_offset_group *table)
+ {
+ int ret, i, j;
+
+ if (!iwl_sar_geo_support(fwrt))
+- return;
++ return -EOPNOTSUPP;
+
+ ret = iwl_sar_get_wgds_table(fwrt);
+ if (ret < 0) {
+@@ -505,7 +505,7 @@ void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
+ "Geo SAR BIOS table invalid or unavailable. (%d)\n",
+ ret);
+ /* we don't fail if the table is not available */
+- return;
++ return -ENOENT;
+ }
+
+ BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES * ACPI_WGDS_NUM_BANDS *
+@@ -530,5 +530,7 @@ void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
+ i, j, value[1], value[2], value[0]);
+ }
+ }
++
++ return 0;
+ }
+ IWL_EXPORT_SYMBOL(iwl_sar_geo_init);
+diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h
+index 4a6e8262974b..5590e5cc8fbb 100644
+--- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h
++++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h
+@@ -6,7 +6,7 @@
+ * GPL LICENSE SUMMARY
+ *
+ * Copyright(c) 2017 Intel Deutschland GmbH
+- * Copyright(c) 2018 - 2019 Intel Corporation
++ * Copyright(c) 2018 - 2020 Intel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+@@ -27,7 +27,7 @@
+ * BSD LICENSE
+ *
+ * Copyright(c) 2017 Intel Deutschland GmbH
+- * Copyright(c) 2018 - 2019 Intel Corporation
++ * Copyright(c) 2018 - 2020 Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+@@ -171,8 +171,9 @@ bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt);
+ int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt,
+ struct iwl_host_cmd *cmd);
+
+-void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
+- struct iwl_per_chain_offset_group *table);
++int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
++ struct iwl_per_chain_offset_group *table);
++
+ #else /* CONFIG_ACPI */
+
+ static inline void *iwl_acpi_get_object(struct device *dev, acpi_string method)
+@@ -243,9 +244,10 @@ static inline int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt,
+ return -ENOENT;
+ }
+
+-static inline void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
+- struct iwl_per_chain_offset_group *table)
++static inline int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
++ struct iwl_per_chain_offset_group *table)
+ {
++ return -ENOENT;
+ }
+
+ #endif /* CONFIG_ACPI */
+diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+index c09624d8d7ee..81b7da5815eb 100644
+--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
++++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+@@ -749,10 +749,17 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)
+ u16 cmd_wide_id = WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT);
+ union geo_tx_power_profiles_cmd cmd;
+ u16 len;
++ int ret;
+
+ cmd.geo_cmd.ops = cpu_to_le32(IWL_PER_CHAIN_OFFSET_SET_TABLES);
+
+- iwl_sar_geo_init(&mvm->fwrt, cmd.geo_cmd.table);
++ ret = iwl_sar_geo_init(&mvm->fwrt, cmd.geo_cmd.table);
++ /*
++ * It is a valid scenario to not support SAR, or miss wgds table,
++ * but in that case there is no need to send the command.
++ */
++ if (ret)
++ return 0;
+
+ cmd.geo_cmd.table_revision = cpu_to_le32(mvm->fwrt.geo_rev);
+
+--
+cgit v1.2.2-1-gc45e
+
diff --git a/PKGBUILD b/PKGBUILD
index b71a825..c9c0d90 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,7 +19,7 @@ _pkgbase=linux-hardened
pkgbase=linux-libre-hardened
_supver=5
_majver=5
-_minver=10
+_minver=11
_hardenedver=a
_gccpatchver='20191217'
_gccpatchger='9.1'
@@ -57,6 +57,7 @@ source=(
0008-drm-i915-gem-Reinitialise-the-local-list-before-repeating.patch
0009-drm-i915-Add-a-simple-is-bound-check-before-unbinding.patch
0010-drm-i915-Introduce-a-vma.kref.patch
+ 0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch
graysky_bdver2-hotfix.patch
kernel_gcc_patch-${_gccpatchver}.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/${_gccpatchver}.tar.gz
ath9k-regdom-hack.patch
@@ -72,7 +73,7 @@ validpgpkeys=(
)
b2sums=('a4d4c927af24f61aba451cc21117c5a508ab2037b81ca6add19b4838940f8f321c8bf14b2d35e388f93801d92b296a998c15d2aac92dc2df761322e7ea37dd1d'
'SKIP'
- '47f256a790f3607750792a7a8df0e7a7ffcfe1945b5f0a92cef7ef22f8e5b68423d7136d21518ebd9e460e4e115f77d2f61890dd1290641f1f38199fd167afdb'
+ '63d2a7fdc1462c9d56a420d58b5223c9b9512835ff23364784ec5312762345f483bb59a2029511e34181dbaf67b16cb4e3a52eb21933f662004747069249d24e'
'SKIP'
'2e822cf7d4ff8b7458e22d3ce110fd8534e17a9aac2feace41c591f70697e1fab7bd9ce307c60a6361fbe525d10dab74c8b76fcb5276cd27f6e945f8fdfcc25c'
'd8027cd96a447ea0987a67f3e65d157bb3d396069a944b140610f74c663677fe45e171e96a92dfd5eda8f71a5c715fd8114ee0e60b7620bc401a2a548bcf83cc'
@@ -83,12 +84,13 @@ b2sums=('a4d4c927af24f61aba451cc21117c5a508ab2037b81ca6add19b4838940f8f321c8bf14
'c1410e2d53dd7afb6d68f75c557774e37f466a5b5b7432ec6802b2c2a9644c8a6b5fcd38a76781b9229a9cb2cf4c0c55129ee050918577937d91dd7ee789f3b8'
'63e9e6ceda80243910c073ec81555f2781d75ac4b3cb5000c1328f2624f7be840684b0f383768020e82bce502aa90a1c8729f7b3e91c099652075a42da2187cf'
'078bb20a03b7e43ad0685b0c3f6a54f1c4bd32d25e0f6c6434100c6f5f5bc27cd6281bf2134b7c7034e6aa448d895d23c20d32f7d1cc40e55f0735af777694a3'
+ '7b56fe6d171bc9f5154fd6dd89e6678f7e65f26d53551ebc758142a3440cb796b8f7badc361b1e19ff70dfc842dce235fb3b476d35994cb0022157ae64e28cf3'
'1892bd22775eac3bcc4d37f4fd30c95346bf3a0888cbbff57fd614973b525390dff2e315ce35b2e498523cceaab94ff21a80475dee8df3de4dd8fc0fab07d74e'
'd76bd0bf237ea2bb7999fd3715cb664d89148cb0ade8057d57cdb40bc0a7954336e50ee077312e5e192398b0f35f055786deb98af9130d57e60f2ea040fbb66f'
'2e58bb89b247b1678355368956e67c1de51fcde97a227b2162f6771e30f17fa5520faafe7be4b6816a542e7ae10d05f64c6b6354f352c12746d4b8da632936dd'
'fde132f3705d908e6f2147c78a2193289916d72304ca5efa2229d79fc3e57a857314ce94e71425caef2f7f7b6cf87f05ef86335dc8bd4be78e7035afe608005a'
'59e91b346412d1be04cede5c8bf975c171f0d9fdb1aa034fb377f9f12ff837c99d8fb3af95316354a977d0f495d373863a61fbc5f4d9a6a532330aa6993c4b14'
- '8aa3026391f4c2033a4466cbe5250731ea62fdd7632b599825fcc81ece57260f21cf74a6df4046de184397461d10d8fdb3c744b592eaa22b72cf41915548d33f'
+ '6f59344e8a2d162625fef9bfcce9f9af5af734e6ba330996f635cfc5b890dd932118a81f0534d0b0d9537306636d82d6949b93b9b37514d14d11addb576c0bcf'
'SKIP')
export KBUILD_BUILD_HOST=$pkgbase
@@ -116,6 +118,7 @@ prepare() {
patch -p1 -i ../0008-drm-i915-gem-Reinitialise-the-local-list-before-repeating.patch
patch -p1 -i ../0009-drm-i915-Add-a-simple-is-bound-check-before-unbinding.patch
patch -p1 -i ../0010-drm-i915-Introduce-a-vma.kref.patch
+ patch -p1 -i ../0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch
# linux hardened patch