mac80211: Fix compilation of iwlwifi driver
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run

The Intel iwlwifi mld driver uses some updated thermal functions. Adapt
the driver to compile again kernel 6.6 again.

Fixes: 9c82d49999 ("mac80211: iwlwifi fix BE200 probe")
Link: https://github.com/openwrt/openwrt/pull/19948
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Hauke Mehrtens 2025-09-03 22:42:48 +02:00
parent 350d8a0711
commit d751f1e57e

View file

@ -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",