backport-iwlwifi
backport-iwlwifi copied to clipboard
Error thorws while install in ubuntu 20.*.*
./././backport-iwlwifi/drivers/net/wireless/intel/iwlwifi/fw/uefi.c:312:13: error: ‘struct iwl_fw_runtime’ has no member named ‘geo_enabled’; did you mean ‘tpc_enabled’? 312 | if (!fwrt->geo_enabled) | ^~~~~~~~~~~ | tpc_enabled
Got the same error in Ubuntu 21.10. Looks like just compilation error, it's strange it's not resolved for 2 months already.
@msuman3 can you pls take a look?
Simply removing the check worked for me:
diff --git a/iwlwifi-stack-dev/drivers/net/wireless/intel/iwlwifi/fw/uefi.c b/iwlwifi-stack-dev/drivers/net/wireless/intel/iwlwifi/fw/uefi.c
index 530ebd7..7e89f2a 100644
--- a/iwlwifi-stack-dev/drivers/net/wireless/intel/iwlwifi/fw/uefi.c
+++ b/iwlwifi-stack-dev/drivers/net/wireless/intel/iwlwifi/fw/uefi.c
@@ -315,9 +315,6 @@ void iwl_uefi_get_sgom_table(struct iwl_trans *trans,
unsigned long package_size;
int err, ret;
- if (!fwrt->geo_enabled)
- return;
-
sgom_efivar = kzalloc(sizeof(*sgom_efivar), GFP_KERNEL);
if (!sgom_efivar)
return;
Seems like this field existing depends on CONFIG_ACPI
being defined in runtime.h
in the same folder:
So maybe something like this should work:
diff --git a/iwlwifi-stack-dev/drivers/net/wireless/intel/iwlwifi/fw/uefi.c b/iwlwifi-stack-dev/drivers/net/wireless/intel/iwlwifi/fw/uefi.c
index 530ebd7..e98f4b1 100644
--- a/iwlwifi-stack-dev/drivers/net/wireless/intel/iwlwifi/fw/uefi.c
+++ b/iwlwifi-stack-dev/drivers/net/wireless/intel/iwlwifi/fw/uefi.c
@@ -315,8 +315,10 @@ void iwl_uefi_get_sgom_table(struct iwl_trans *trans,
unsigned long package_size;
int err, ret;
+ #ifdef CONFIG_ACPI
if (!fwrt->geo_enabled)
return;
+ #endif
sgom_efivar = kzalloc(sizeof(*sgom_efivar), GFP_KERNEL);
if (!sgom_efivar)
Turns out this is actually caused by the source I used (https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git) being slightly different:

So I'm guessing this issue was created based on this: https://askubuntu.com/questions/1046589/backport-for-iwlwifi (which is how I also ended up here)
@bergkvist thanks for your work and comments, I also tried to delete these 2 lines and module has compiled. And yes, it looks like outdated code.