* [PATCH 6.6] wifi: iwlwifi: support BIOS override for 5G9 in CA also in LARI version 8
@ 2025-03-20 13:22 Emmanuel Grumbach
2025-03-20 13:29 ` Grumbach, Emmanuel
2025-03-20 16:03 ` Sasha Levin
0 siblings, 2 replies; 3+ messages in thread
From: Emmanuel Grumbach @ 2025-03-20 13:22 UTC (permalink / raw)
To: stable; +Cc: frankgor, Miri Korenblit, Johannes Berg, Emmanuel Grumbach
From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
commit b1e8102a4048003097c7054cbc00bbda91a5ced7 upstream
Commit 6b3e87cc0ca5 ("iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD
cmd v9")
added a few bits to iwl_lari_config_change_cmd::oem_unii4_allow_bitmap
if the FW has LARI version >= 9.
But we also need to send those bits for version 8 if the FW is capable
of this feature (indicated with capability bits)
Add the FW capability bit, and set the additional bits in the cmd when
the version is 8 and the FW capability bit is set.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20241226174257.dc5836f84514.I1e38f94465a36731034c94b9811de10cb6ee5921@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
drivers/net/wireless/intel/iwlwifi/fw/file.h | 4 ++-
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 37 ++++++++++++++++++--
2 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/file.h b/drivers/net/wireless/intel/iwlwifi/fw/file.h
index b36e9613a52c..b1687e6d3ad2 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/file.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h
@@ -372,6 +372,8 @@ typedef unsigned int __bitwise iwl_ucode_tlv_capa_t;
* channels even when these are not enabled.
* @IWL_UCODE_TLV_CAPA_DUMP_COMPLETE_SUPPORT: Support for indicating dump collection
* complete to FW.
+ * @IWL_UCODE_TLV_CAPA_BIOS_OVERRIDE_5G9_FOR_CA: supports (de)activating 5G9
+ * for CA from BIOS.
*
* @NUM_IWL_UCODE_TLV_CAPA: number of bits used
*/
@@ -468,7 +470,7 @@ enum iwl_ucode_tlv_capa {
IWL_UCODE_TLV_CAPA_OFFLOAD_BTM_SUPPORT = (__force iwl_ucode_tlv_capa_t)113,
IWL_UCODE_TLV_CAPA_STA_EXP_MFP_SUPPORT = (__force iwl_ucode_tlv_capa_t)114,
IWL_UCODE_TLV_CAPA_SNIFF_VALIDATE_SUPPORT = (__force iwl_ucode_tlv_capa_t)116,
-
+ IWL_UCODE_TLV_CAPA_BIOS_OVERRIDE_5G9_FOR_CA = (__force iwl_ucode_tlv_capa_t)123,
#ifdef __CHECKER__
/* sparse says it cannot increment the previous enum member */
#define NUM_IWL_UCODE_TLV_CAPA 128
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 80b5c20d3a48..c597492668fa 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1195,11 +1195,30 @@ static u8 iwl_mvm_eval_dsm_rfi(struct iwl_mvm *mvm)
return DSM_VALUE_RFI_DISABLE;
}
+enum iwl_dsm_unii4_bitmap {
+ DSM_VALUE_UNII4_US_OVERRIDE_MSK = BIT(0),
+ DSM_VALUE_UNII4_US_EN_MSK = BIT(1),
+ DSM_VALUE_UNII4_ETSI_OVERRIDE_MSK = BIT(2),
+ DSM_VALUE_UNII4_ETSI_EN_MSK = BIT(3),
+ DSM_VALUE_UNII4_CANADA_OVERRIDE_MSK = BIT(4),
+ DSM_VALUE_UNII4_CANADA_EN_MSK = BIT(5),
+};
+
+#define DSM_UNII4_ALLOW_BITMAP (DSM_VALUE_UNII4_US_OVERRIDE_MSK |\
+ DSM_VALUE_UNII4_US_EN_MSK |\
+ DSM_VALUE_UNII4_ETSI_OVERRIDE_MSK |\
+ DSM_VALUE_UNII4_ETSI_EN_MSK |\
+ DSM_VALUE_UNII4_CANADA_OVERRIDE_MSK |\
+ DSM_VALUE_UNII4_CANADA_EN_MSK)
+
static void iwl_mvm_lari_cfg(struct iwl_mvm *mvm)
{
int ret;
u32 value;
struct iwl_lari_config_change_cmd_v6 cmd = {};
+ u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw,
+ WIDE_ID(REGULATORY_AND_NVM_GROUP,
+ LARI_CONFIG_CHANGE), 1);
cmd.config_bitmap = iwl_acpi_get_lari_config_bitmap(&mvm->fwrt);
@@ -1211,8 +1230,22 @@ static void iwl_mvm_lari_cfg(struct iwl_mvm *mvm)
ret = iwl_acpi_get_dsm_u32(mvm->fwrt.dev, 0,
DSM_FUNC_ENABLE_UNII4_CHAN,
&iwl_guid, &value);
- if (!ret)
- cmd.oem_unii4_allow_bitmap = cpu_to_le32(value);
+ if (!ret) {
+ u32 _value = cpu_to_le32(value);
+
+ _value &= DSM_UNII4_ALLOW_BITMAP;
+
+ /* Since version 9, bits 4 and 5 are supported
+ * regardless of this capability.
+ */
+ if (cmd_ver < 9 &&
+ !fw_has_capa(&mvm->fw->ucode_capa,
+ IWL_UCODE_TLV_CAPA_BIOS_OVERRIDE_5G9_FOR_CA))
+ _value &= ~(DSM_VALUE_UNII4_CANADA_OVERRIDE_MSK |
+ DSM_VALUE_UNII4_CANADA_EN_MSK);
+
+ cmd.oem_unii4_allow_bitmap = cpu_to_le32(_value);
+ }
ret = iwl_acpi_get_dsm_u32(mvm->fwrt.dev, 0,
DSM_FUNC_ACTIVATE_CHANNEL,
--
2.48.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 6.6] wifi: iwlwifi: support BIOS override for 5G9 in CA also in LARI version 8
2025-03-20 13:22 [PATCH 6.6] wifi: iwlwifi: support BIOS override for 5G9 in CA also in LARI version 8 Emmanuel Grumbach
@ 2025-03-20 13:29 ` Grumbach, Emmanuel
2025-03-20 16:03 ` Sasha Levin
1 sibling, 0 replies; 3+ messages in thread
From: Grumbach, Emmanuel @ 2025-03-20 13:29 UTC (permalink / raw)
To: stable@vger.kernel.org
Cc: Korenblit, Miriam Rachel, Berg, Johannes, Gorgenyi, Frank
Hello stable kernel maintainers,
On Thu, 2025-03-20 at 15:22 +0200, Emmanuel Grumbach wrote:
> From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
>
> commit b1e8102a4048003097c7054cbc00bbda91a5ced7 upstream
>
> Commit 6b3e87cc0ca5 ("iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD
> cmd v9")
> added a few bits to
> iwl_lari_config_change_cmd::oem_unii4_allow_bitmap
> if the FW has LARI version >= 9.
> But we also need to send those bits for version 8 if the FW is
> capable
> of this feature (indicated with capability bits)
> Add the FW capability bit, and set the additional bits in the cmd
> when
> the version is 8 and the FW capability bit is set.
>
> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
> Reviewed-by: Johannes Berg <johannes.berg@intel.com>
> Link:
> https://patch.msgid.link/20241226174257.dc5836f84514.I1e38f94465a36731034c94b9811de10cb6ee5921@changeid
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> ---
> drivers/net/wireless/intel/iwlwifi/fw/file.h | 4 ++-
> drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 37
> ++++++++++++++++++--
> 2 files changed, 38 insertions(+), 3 deletions(-)
I didn't want to alter the commit log of this patch, but this patch has
a bigger impact that just enabling a feature in the firmware. It checks
that the firmware actually supports that feature and this fixes crashes
that were reported on certain device / platform combinations that made
wifi unusable.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 6.6] wifi: iwlwifi: support BIOS override for 5G9 in CA also in LARI version 8
2025-03-20 13:22 [PATCH 6.6] wifi: iwlwifi: support BIOS override for 5G9 in CA also in LARI version 8 Emmanuel Grumbach
2025-03-20 13:29 ` Grumbach, Emmanuel
@ 2025-03-20 16:03 ` Sasha Levin
1 sibling, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2025-03-20 16:03 UTC (permalink / raw)
To: stable; +Cc: Emmanuel Grumbach, Sasha Levin
[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected.
No action required from the submitter.
The upstream commit SHA1 provided is correct: b1e8102a4048003097c7054cbc00bbda91a5ced7
WARNING: Author mismatch between patch and upstream commit:
Backport author: Emmanuel Grumbach<emmanuel.grumbach@intel.com>
Commit author: Miri Korenblit<miriam.rachel.korenblit@intel.com>
Status in newer kernel trees:
6.13.y | Not found
6.12.y | Not found
Note: The patch differs from the upstream commit:
---
1: b1e8102a40480 < -: ------------- wifi: iwlwifi: support BIOS override for 5G9 in CA also in LARI version 8
-: ------------- > 1: 16be59b9ee600 wifi: iwlwifi: support BIOS override for 5G9 in CA also in LARI version 8
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.6.y | Success | Success |
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-20 16:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-20 13:22 [PATCH 6.6] wifi: iwlwifi: support BIOS override for 5G9 in CA also in LARI version 8 Emmanuel Grumbach
2025-03-20 13:29 ` Grumbach, Emmanuel
2025-03-20 16:03 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox