From: Johannes Berg Date: Sun, 4 May 2025 10:26:18 +0000 (+0300) Subject: wifi: iwlwifi: trans: move ext_32khz_clock_valid to config X-Git-Tag: v6.16-rc1~132^2~46^2~8^2~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf9aabf44b2c26963be578d715749da847802736;p=thirdparty%2Fkernel%2Flinux.git wifi: iwlwifi: trans: move ext_32khz_clock_valid to config This value is used for the device start, so it's really part of the configuration. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250504132447.637ed7514587.I6c8fdeb3e2078a5fe9b755391e3ef7258ef2b279@changeid --- diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h index 362e52b24a14a..a9d14e78b68d0 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h @@ -421,6 +421,7 @@ struct iwl_dump_sanitize_ops { * @dsbr_urm_permanent: switch to URM permanently * @mbx_addr_0_step: step address data 0 * @mbx_addr_1_step: step address data 1 + * @ext_32khz_clock_valid: if true, the external 32 KHz clock can be used */ struct iwl_trans_config { u8 cmd_queue; @@ -441,7 +442,8 @@ struct iwl_trans_config { u8 rx_mpdu_cmd, rx_mpdu_cmd_hdr_size; u8 dsbr_urm_fw_dependent:1, - dsbr_urm_permanent:1; + dsbr_urm_permanent:1, + ext_32khz_clock_valid:1; u32 mbx_addr_0_step; u32 mbx_addr_1_step; @@ -882,7 +884,6 @@ struct iwl_trans_info { * @restart.mode: reset/restart error mode information * @restart.during_reset: error occurred during previous software reset * @trans_specific: data for the specific transport this is allocated for/with - * @ext_32khz_clock_valid: if true, the external 32 KHz clock can be used * @request_top_reset: TOP reset was requested, used by the reset * worker that should be scheduled (with appropriate reason) * @do_top_reset: indication to the (PCIe) transport/context-info @@ -905,8 +906,6 @@ struct iwl_trans { bool reduced_cap_sku; bool step_urm; - bool ext_32khz_clock_valid; - bool pm_support; bool ltr_enabled; u8 pnvm_loaded:1; diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mld.c b/drivers/net/wireless/intel/iwlwifi/mld/mld.c index 578941098b58d..dfb9908de09df 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/mld.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/mld.c @@ -328,10 +328,16 @@ iwl_mld_configure_trans(struct iwl_op_mode *op_mode) struct iwl_mld *mld = IWL_OP_MODE_GET_MLD(op_mode); static const u8 no_reclaim_cmds[] = {TX_CMD}; struct iwl_trans *trans = mld->trans; + u32 eckv_value; iwl_bios_setup_step(trans, &mld->fwrt); iwl_uefi_get_step_table(trans); + if (iwl_bios_get_eckv(&mld->fwrt, &eckv_value)) + IWL_DEBUG_RADIO(mld, "ECKV table doesn't exist in BIOS\n"); + else + trans->conf.ext_32khz_clock_valid = !!eckv_value; + trans->conf.rx_buf_size = iwl_amsdu_size_to_rxb_size(); trans->conf.command_groups = iwl_mld_groups; trans->conf.command_groups_size = ARRAY_SIZE(iwl_mld_groups); @@ -369,7 +375,6 @@ iwl_op_mode_mld_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, struct ieee80211_hw *hw; struct iwl_op_mode *op_mode; struct iwl_mld *mld; - u32 eckv_value; int ret; /* Allocate and initialize a new hardware device */ @@ -391,10 +396,6 @@ iwl_op_mode_mld_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, iwl_mld_get_bios_tables(mld); iwl_uefi_get_sgom_table(trans, &mld->fwrt); - if (iwl_bios_get_eckv(&mld->fwrt, &eckv_value)) - IWL_DEBUG_RADIO(mld, "ECKV table doesn't exist in BIOS\n"); - else - trans->ext_32khz_clock_valid = !!eckv_value; mld->bios_enable_puncturing = iwl_uefi_get_puncturing(&mld->fwrt); iwl_mld_hw_set_regulatory(mld); diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c index e06c137d193e8..05876aea42e3f 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c @@ -138,7 +138,7 @@ int iwl_pcie_ctxt_info_gen3_alloc(struct iwl_trans *trans, if (trans->conf.dsbr_urm_permanent) control_flags_ext |= IWL_PRPH_SCRATCH_EXT_URM_PERM; - if (trans->ext_32khz_clock_valid) + if (trans->conf.ext_32khz_clock_valid) control_flags_ext |= IWL_PRPH_SCRATCH_EXT_32KHZ_CLK_VALID; /* Allocate prph scratch */