* [PATCH] iwlwifi: mvm: Avoid use of GEO_TX_POWER_LIMIT when not supported
@ 2020-03-14 10:57 Jonathan McDowell
2020-03-17 10:21 ` Luca Coelho
0 siblings, 1 reply; 2+ messages in thread
From: Jonathan McDowell @ 2020-03-14 10:57 UTC (permalink / raw)
To: linux-wireless
Cc: Intel Linux Wireless, Ihab Zhaika, johannes.berg,
emmanuel.grumbach, luciano.coelho, linux-kernel
Commit 39c1a9728f93 refactored the SAR table support and inadvertently
added a call to GEO_TX_POWER_LIMIT without checking that the firmware
supported it. This caused a regression for device + firmware
combinations lacking the support. Add a check in iwl_mvm_sar_init to
prevent this.
Fixes: 39c1a9728f93 (iwlwifi: refactor the SAR tables from mvm to acpi)
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206395
Cc: stable@vger.kernel.org # 5.5
Signed-Off-By: Jonathan McDowell <noodles@earth.li>
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 54c094e88474..4a8a4cb2c553 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1007,6 +1007,13 @@ static int iwl_mvm_sar_init(struct iwl_mvm *mvm)
if (ret == -ENOENT)
return 1;
+ /*
+ * If our firmware doesn't support GEO_TX_POWER_LIMIT then skip trying
+ * to use it.
+ */
+ if (!iwl_sar_geo_support(&mvm->fwrt))
+ return 1;
+
return ret;
}
--
... Don't do it!
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iwlwifi: mvm: Avoid use of GEO_TX_POWER_LIMIT when not supported
2020-03-14 10:57 [PATCH] iwlwifi: mvm: Avoid use of GEO_TX_POWER_LIMIT when not supported Jonathan McDowell
@ 2020-03-17 10:21 ` Luca Coelho
0 siblings, 0 replies; 2+ messages in thread
From: Luca Coelho @ 2020-03-17 10:21 UTC (permalink / raw)
To: Jonathan McDowell, linux-wireless
Cc: Intel Linux Wireless, Ihab Zhaika, johannes.berg,
emmanuel.grumbach, linux-kernel
On Sat, 2020-03-14 at 10:57 +0000, Jonathan McDowell wrote:
> Commit 39c1a9728f93 refactored the SAR table support and inadvertently
> added a call to GEO_TX_POWER_LIMIT without checking that the firmware
> supported it. This caused a regression for device + firmware
> combinations lacking the support. Add a check in iwl_mvm_sar_init to
> prevent this.
>
> Fixes: 39c1a9728f93 (iwlwifi: refactor the SAR tables from mvm to acpi)
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206395
> Cc: stable@vger.kernel.org # 5.5
> Signed-Off-By: Jonathan McDowell <noodles@earth.li>
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> index 54c094e88474..4a8a4cb2c553 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> @@ -1007,6 +1007,13 @@ static int iwl_mvm_sar_init(struct iwl_mvm *mvm)
> if (ret == -ENOENT)
> return 1;
>
> + /*
> + * If our firmware doesn't support GEO_TX_POWER_LIMIT then skip trying
> + * to use it.
> + */
> + if (!iwl_sar_geo_support(&mvm->fwrt))
> + return 1;
> +
> return ret;
> }
Thanks, Jonathan! We already have an internal patch that fixes this
(also fixes another symptom of the same bug). I'll send it out now.
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-17 10:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-14 10:57 [PATCH] iwlwifi: mvm: Avoid use of GEO_TX_POWER_LIMIT when not supported Jonathan McDowell
2020-03-17 10:21 ` Luca Coelho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).