iwlwifi: fw: init SAR GEO table only if data is present
authorJohannes Berg <johannes.berg@intel.com>
Tue, 17 May 2022 09:05:08 +0000 (12:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:26:17 +0000 (10:26 +0200)
commit5963aa661f27085c2c0107b73a813ac41b398562
tree5e2f2a3890e2dfafad39e80e2260a712a55c4208
parent82c8e7bbdd06c7ed58e22450cc5b37f33a25bb2c
iwlwifi: fw: init SAR GEO table only if data is present

commit d1f6530c3e373ddd7c76b05646052a27eead14ad upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/intel/iwlwifi/fw/acpi.c