[openwrt/openwrt] mac80211: Fix compilation of iwlwifi driver
LEDE Commits
lede-commits at lists.infradead.org
Thu Sep 4 03:11:18 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d751f1e57ea6d7461ae9bb2f4aadecc5d1165b19
commit d751f1e57ea6d7461ae9bb2f4aadecc5d1165b19
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Wed Sep 3 22:42:48 2025 +0200
mac80211: Fix compilation of iwlwifi driver
The Intel iwlwifi mld driver uses some updated thermal functions. Adapt
the driver to compile again kernel 6.6 again.
Fixes: 9c82d499995b ("mac80211: iwlwifi fix BE200 probe")
Link: https://github.com/openwrt/openwrt/pull/19948
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
.../patches/build/020-intel-mld-compile.patch | 54 ++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/package/kernel/mac80211/patches/build/020-intel-mld-compile.patch b/package/kernel/mac80211/patches/build/020-intel-mld-compile.patch
new file mode 100644
index 0000000000..b501ec770f
--- /dev/null
+++ b/package/kernel/mac80211/patches/build/020-intel-mld-compile.patch
@@ -0,0 +1,54 @@
+Fix Intel mld thermal compilation
+
+Do the same changes done also in iwlwifi/mvm/tt.c in the iwlwifi/mld/thermal.c file.
+
+This fixes the compilation.
+
+--- a/drivers/net/wireless/intel/iwlwifi/mld/thermal.c
++++ b/drivers/net/wireless/intel/iwlwifi/mld/thermal.c
+@@ -209,9 +209,15 @@ unlock:
+ return ret;
+ }
+
++#if LINUX_VERSION_IS_GEQ(6,11,0)
+ static int iwl_mld_tzone_set_trip_temp(struct thermal_zone_device *device,
+ const struct thermal_trip *trip,
+ int temp)
++#else
++static int iwl_mld_tzone_set_trip_temp(struct thermal_zone_device *device,
++ int trip,
++ int temp)
++#endif
+ {
+ struct iwl_mld *mld = thermal_zone_device_priv(device);
+ int ret;
+@@ -248,18 +254,29 @@ static void iwl_mld_thermal_zone_registe
+ [0 ... IWL_MAX_DTS_TRIPS - 1] = {
+ .temperature = THERMAL_TEMP_INVALID,
+ .type = THERMAL_TRIP_PASSIVE,
++#if LINUX_VERSION_IS_GEQ(6,9,0)
+ .flags = THERMAL_TRIP_FLAG_RW_TEMP,
++#endif
+ },
+ };
+
+ BUILD_BUG_ON(ARRAY_SIZE(name) >= THERMAL_NAME_LENGTH);
+
+ sprintf(name, "iwlwifi_%u", atomic_inc_return(&counter) & 0xFF);
++#if LINUX_VERSION_IS_GEQ(6,9,0)
+ mld->tzone =
+ thermal_zone_device_register_with_trips(name, trips,
+ IWL_MAX_DTS_TRIPS,
+ mld, &tzone_ops,
+ NULL, 0, 0);
++#else
++ mld->tzone =
++ thermal_zone_device_register_with_trips(name, trips,
++ IWL_MAX_DTS_TRIPS, 0,
++ mld, &tzone_ops,
++ NULL, 0, 0);
++#endif
++
+ if (IS_ERR(mld->tzone)) {
+ IWL_DEBUG_TEMP(mld,
+ "Failed to register to thermal zone (err = %ld)\n",
More information about the lede-commits
mailing list