diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2016-07-10 15:56:38 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2016-07-13 19:16:30 +0200 |
commit | d79c30ef7dfc13b4711d854212c183d5d3adc8f3 (patch) | |
tree | 799b133e3fef1066e8d7390dd7e499fea5f8bb10 /patches | |
parent | a1b5483bf9b78c941ee2f5d1b534232918d2fdeb (diff) |
patches: make iwlwifi use the old thermal APIs
The thermal API changed in the last kernel versions, make iwlwifi use
the correct interface for each kernel version.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/collateral-evolutions/network/0070-thermal/iwlwifi.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/network/0070-thermal/iwlwifi.patch b/patches/collateral-evolutions/network/0070-thermal/iwlwifi.patch new file mode 100644 index 00000000..1b37844c --- /dev/null +++ b/patches/collateral-evolutions/network/0070-thermal/iwlwifi.patch @@ -0,0 +1,56 @@ +--- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c +@@ -637,7 +637,11 @@ send: + } + + static int iwl_mvm_tzone_get_temp(struct thermal_zone_device *device, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) ++ unsigned long *temperature) ++#else + int *temperature) ++#endif + { + struct iwl_mvm *mvm = (struct iwl_mvm *)device->devdata; + int ret; +@@ -662,7 +666,11 @@ out: + } + + static int iwl_mvm_tzone_get_trip_temp(struct thermal_zone_device *device, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) ++ int trip, unsigned long *temp) ++#else + int trip, int *temp) ++#endif + { + struct iwl_mvm *mvm = (struct iwl_mvm *)device->devdata; + +@@ -685,8 +693,13 @@ static int iwl_mvm_tzone_get_trip_type(s + return 0; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) + static int iwl_mvm_tzone_set_trip_temp(struct thermal_zone_device *device, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) ++ int trip, unsigned long temp) ++#else + int trip, int temp) ++#endif + { + struct iwl_mvm *mvm = (struct iwl_mvm *)device->devdata; + struct iwl_mvm_thermal_device *tzone; +@@ -739,12 +752,15 @@ out: + mutex_unlock(&mvm->mutex); + return ret; + } ++#endif /* >= 3.6 */ + + static struct thermal_zone_device_ops tzone_ops = { + .get_temp = iwl_mvm_tzone_get_temp, + .get_trip_temp = iwl_mvm_tzone_get_trip_temp, + .get_trip_type = iwl_mvm_tzone_get_trip_type, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) + .set_trip_temp = iwl_mvm_tzone_set_trip_temp, ++#endif + }; + + /* make all trips writable */ |