summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens2025-09-03 20:42:48 +0000
committerHauke Mehrtens2025-09-04 10:10:06 +0000
commitd751f1e57ea6d7461ae9bb2f4aadecc5d1165b19 (patch)
tree32bcc0e8c9a33505bb75ba56e273a7fb17bd880d
parent350d8a0711f05d525badec3e5c05f0ae94044db1 (diff)
downloadopenwrt-d751f1e57ea6d7461ae9bb2f4aadecc5d1165b19.tar.gz
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@hauke-m.de>
-rw-r--r--package/kernel/mac80211/patches/build/020-intel-mld-compile.patch54
1 files changed, 54 insertions, 0 deletions
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",