aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-05-17 12:05:08 +0300
committerJohannes Berg <johannes.berg@intel.com>2022-05-18 12:53:53 +0200
commitd1f6530c3e373ddd7c76b05646052a27eead14ad (patch)
tree0b28709e3e606c69c34dba574c53b53fb5931ec6 /drivers/net/wireless/intel/iwlwifi/fw/acpi.c
parentiwlwifi: mvm: clean up authorized condition (diff)
downloadlinux-dev-d1f6530c3e373ddd7c76b05646052a27eead14ad.tar.xz
linux-dev-d1f6530c3e373ddd7c76b05646052a27eead14ad.zip
iwlwifi: fw: init SAR GEO table only if data is present
When no table data was read from ACPI, then filling the data and returning success here will fill zero values, which means transmit power will be limited to 0 dBm. This is clearly not intended. Return an error from iwl_sar_geo_init() if there's no data to fill into the command structure. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com> Fixes: 78a19d5285d9 ("iwlwifi: mvm: Read the PPAG and SAR tables at INIT stage") Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20220517120044.bc45923b74e9.Id2b4362234b7f8ced82c591b95d4075dd2ec12f4@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to '')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/acpi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
index 33aae639ad37..e6d64152c81a 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
@@ -937,6 +937,9 @@ int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
{
int i, j;
+ if (!fwrt->geo_enabled)
+ return -ENODATA;
+
if (!iwl_sar_geo_support(fwrt))
return -EOPNOTSUPP;