wifi: iwlwifi: support BIOS override for 5G9 in CA also in LARI version 8
commitb1e8102a40upstream. Commit6b3e87cc0c("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7f306c651f
commit
fd82d29c4c
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user