backport-iwlwifi icon indicating copy to clipboard operation
backport-iwlwifi copied to clipboard

Error thorws while install in ubuntu 20.*.*

Open elaa0505 opened this issue 3 years ago • 6 comments

./././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

elaa0505 avatar Oct 07 '21 16:10 elaa0505

Got the same error in Ubuntu 21.10. Looks like just compilation error, it's strange it's not resolved for 2 months already.

aryabchenko avatar Dec 28 '21 15:12 aryabchenko

@msuman3 can you pls take a look?

aryabchenko avatar Dec 28 '21 15:12 aryabchenko

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;

bergkvist avatar Dec 30 '21 00:12 bergkvist

Seems like this field existing depends on CONFIG_ACPI being defined in runtime.h in the same folder: image

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)

bergkvist avatar Dec 30 '21 00:12 bergkvist

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:

image

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 avatar Dec 30 '21 01:12 bergkvist

@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.

aryabchenko avatar Jan 16 '22 12:01 aryabchenko