* [PATCH v4.20] iwlwifi: mvm: don't send GEO_TX_POWER_LIMIT to old firmwares
@ 2018-12-14 16:30 Luca Coelho
2018-12-17 13:18 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Luca Coelho @ 2018-12-14 16:30 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Emmanuel Grumbach, stable, Luca Coelho
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Old firmware versions don't support this command. Sending it
to any firmware before -41.ucode will crash the firmware.
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=201975
Fixes: 66e839030fd6 ("iwlwifi: fix wrong WGDS_WIFI_DATA_SIZE")
CC: <stable@vger.kernel.org> #4.19+
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 2ba890445c35..1689bead1b4f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -881,6 +881,15 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)
int ret, i, j;
u16 cmd_wide_id = WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT);
+ /*
+ * This command is not supported on earlier firmware versions.
+ * Unfortunately, we don't have a TLV API flag to rely on, so
+ * rely on the major version which is in the first byte of
+ * ucode_ver.
+ */
+ if (IWL_UCODE_SERIAL(mvm->fw->ucode_ver) < 41)
+ return 0;
+
ret = iwl_mvm_sar_get_wgds_table(mvm);
if (ret < 0) {
IWL_DEBUG_RADIO(mvm,
--
2.19.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v4.20] iwlwifi: mvm: don't send GEO_TX_POWER_LIMIT to old firmwares
2018-12-14 16:30 [PATCH v4.20] iwlwifi: mvm: don't send GEO_TX_POWER_LIMIT to old firmwares Luca Coelho
@ 2018-12-17 13:18 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2018-12-17 13:18 UTC (permalink / raw)
To: Luca Coelho; +Cc: linux-wireless, Emmanuel Grumbach, stable, Luca Coelho
Luca Coelho <luca@coelho.fi> wrote:
> From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
>
> Old firmware versions don't support this command. Sending it
> to any firmware before -41.ucode will crash the firmware.
>
> This fixes https://bugzilla.kernel.org/show_bug.cgi?id=201975
>
> Fixes: 66e839030fd6 ("iwlwifi: fix wrong WGDS_WIFI_DATA_SIZE")
> CC: <stable@vger.kernel.org> #4.19+
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Patch applied to wireless-drivers.git, thanks.
eca1e56ceedd iwlwifi: mvm: don't send GEO_TX_POWER_LIMIT to old firmwares
--
https://patchwork.kernel.org/patch/10731399/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-17 13:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-14 16:30 [PATCH v4.20] iwlwifi: mvm: don't send GEO_TX_POWER_LIMIT to old firmwares Luca Coelho
2018-12-17 13:18 ` Kalle Valo
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).