wifi: iwlwifi: trans: remove SCD base address validation
authorJohannes Berg <johannes.berg@intel.com>
Sat, 3 May 2025 19:44:33 +0000 (22:44 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 7 May 2025 03:08:00 +0000 (06:08 +0300)
We pass this parameter around a lot of places just to
validate what the firmware told us against the hardware
with a warning, which seems to never trigger. Remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224232.5405014d7f88.I3b74a1fd51a39c6df5674f2994189092d1635e7f@changeid
drivers/net/wireless/intel/iwlwifi/dvm/ucode.c
drivers/net/wireless/intel/iwlwifi/iwl-trans.c
drivers/net/wireless/intel/iwlwifi/iwl-trans.h
drivers/net/wireless/intel/iwlwifi/mld/fw.c
drivers/net/wireless/intel/iwlwifi/mvm/fw.c
drivers/net/wireless/intel/iwlwifi/pcie/internal.h
drivers/net/wireless/intel/iwlwifi/pcie/trans.c
drivers/net/wireless/intel/iwlwifi/pcie/tx.c

index d504fa178cbe5c71be3d28d04999e12877a02382..ac90191a39735646c14783cb4c064b47832ee5ca 100644 (file)
@@ -223,7 +223,7 @@ static int iwl_alive_notify(struct iwl_priv *priv)
        int ret;
        int i;
 
-       iwl_trans_fw_alive(priv->trans, 0);
+       iwl_trans_fw_alive(priv->trans);
 
        if (priv->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN &&
            priv->nvm_data->sku_cap_ipan_enable) {
index f632008cc82c8815cb01da0e05e5bb89478272c8..42db76dfc5b60a28ad47cbbdd6e5211575c8d50e 100644 (file)
@@ -577,7 +577,7 @@ iwl_trans_release_nic_access(struct iwl_trans *trans)
 }
 IWL_EXPORT_SYMBOL(iwl_trans_release_nic_access);
 
-void iwl_trans_fw_alive(struct iwl_trans *trans, u32 scd_addr)
+void iwl_trans_fw_alive(struct iwl_trans *trans)
 {
        might_sleep();
 
@@ -586,7 +586,7 @@ void iwl_trans_fw_alive(struct iwl_trans *trans, u32 scd_addr)
        if (trans->trans_cfg->gen2)
                iwl_trans_pcie_gen2_fw_alive(trans);
        else
-               iwl_trans_pcie_fw_alive(trans, scd_addr);
+               iwl_trans_pcie_fw_alive(trans);
 }
 IWL_EXPORT_SYMBOL(iwl_trans_fw_alive);
 
index 5ab28953a683cfeb1fadbf9775cf33b346616c0b..c5779e963deffbcdf21e5d92946b49fd04ac3f47 100644 (file)
@@ -947,7 +947,7 @@ int iwl_trans_start_hw(struct iwl_trans *trans);
 
 void iwl_trans_op_mode_leave(struct iwl_trans *trans);
 
-void iwl_trans_fw_alive(struct iwl_trans *trans, u32 scd_addr);
+void iwl_trans_fw_alive(struct iwl_trans *trans);
 
 int iwl_trans_start_fw(struct iwl_trans *trans, const struct iwl_fw *fw,
                       enum iwl_ucode_type ucode_type, bool run_in_rfkill);
index c2ee4b2a752374740efb007a33841a4ad1414140..bd19de665a37b5074b3cb311ee6964356bdf7196 100644 (file)
@@ -262,7 +262,7 @@ static int iwl_mld_load_fw_wait_alive(struct iwl_mld *mld)
                return -EIO;
        }
 
-       iwl_trans_fw_alive(mld->trans, 0);
+       iwl_trans_fw_alive(mld->trans);
 
        return 0;
 }
index 2ef5a48a970de2977f6c52361f7cc5bd4cf073aa..3de4c5f8bdff54b5e84bda7223b270de4ef60fd6 100644 (file)
@@ -30,7 +30,6 @@
 
 struct iwl_mvm_alive_data {
        bool valid;
-       u32 scd_base_addr;
 };
 
 static int iwl_send_tx_ant_cfg(struct iwl_mvm *mvm, u8 valid_tx_ant)
@@ -244,7 +243,6 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
                }
        }
 
-       alive_data->scd_base_addr = le32_to_cpu(lmac1->dbg_ptrs.scd_base_ptr);
        alive_data->valid = status == IWL_ALIVE_STATUS_OK;
 
        IWL_DEBUG_FW(mvm,
@@ -429,7 +427,7 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
        /* if reached this point, Alive notification was received */
        iwl_mei_alive_notif(true);
 
-       iwl_trans_fw_alive(mvm->trans, alive_data.scd_base_addr);
+       iwl_trans_fw_alive(mvm->trans);
 
        ret = iwl_pnvm_load(mvm->trans, &mvm->notif_wait,
                            &mvm->fw->ucode_capa);
index c48cbedbcbfacb0b3985e0019586f320c8b0410a..07b4b28b052f51d085b7627963b0c563a585d6c2 100644 (file)
@@ -633,7 +633,7 @@ struct iwl_tso_page_info {
                                      IWL_TSO_PAGE_DATA_SIZE))
 
 int iwl_pcie_tx_init(struct iwl_trans *trans);
-void iwl_pcie_tx_start(struct iwl_trans *trans, u32 scd_base_addr);
+void iwl_pcie_tx_start(struct iwl_trans *trans);
 int iwl_pcie_tx_stop(struct iwl_trans *trans);
 void iwl_pcie_tx_free(struct iwl_trans *trans);
 bool iwl_trans_pcie_txq_enable(struct iwl_trans *trans, int queue, u16 ssn,
@@ -1131,7 +1131,7 @@ bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans);
 void iwl_trans_pcie_release_nic_access(struct iwl_trans *trans);
 
 /* transport gen 1 exported functions */
-void iwl_trans_pcie_fw_alive(struct iwl_trans *trans, u32 scd_addr);
+void iwl_trans_pcie_fw_alive(struct iwl_trans *trans);
 int iwl_trans_pcie_start_fw(struct iwl_trans *trans,
                            const struct iwl_fw *fw,
                            const struct fw_img *img,
index 4e81785b144bbabb7ebcdb851633ae9f7f1e152b..8bc5c9b2f17a0fd6a3ac42943773e0f584fc6769 100644 (file)
@@ -1425,10 +1425,10 @@ out:
        return ret;
 }
 
-void iwl_trans_pcie_fw_alive(struct iwl_trans *trans, u32 scd_addr)
+void iwl_trans_pcie_fw_alive(struct iwl_trans *trans)
 {
        iwl_pcie_reset_ict(trans);
-       iwl_pcie_tx_start(trans, scd_addr);
+       iwl_pcie_tx_start(trans);
 }
 
 void iwl_trans_pcie_handle_stop_rfkill(struct iwl_trans *trans,
index cf9ec491c086caa855d742aa11d1f214e78909f4..fcddf32196e16a8d72c5b9b156489f016b0076c4 100644 (file)
@@ -477,7 +477,7 @@ static void iwl_pcie_txq_free(struct iwl_trans *trans, int txq_id)
        memset(txq, 0, sizeof(*txq));
 }
 
-void iwl_pcie_tx_start(struct iwl_trans *trans, u32 scd_base_addr)
+void iwl_pcie_tx_start(struct iwl_trans *trans)
 {
        struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
        int nq = trans->trans_cfg->base_params->num_of_queues;
@@ -495,9 +495,6 @@ void iwl_pcie_tx_start(struct iwl_trans *trans, u32 scd_base_addr)
        trans_pcie->scd_base_addr =
                iwl_read_prph(trans, SCD_SRAM_BASE_ADDR);
 
-       WARN_ON(scd_base_addr != 0 &&
-               scd_base_addr != trans_pcie->scd_base_addr);
-
        /* reset context data, TX status and translation data */
        iwl_trans_pcie_write_mem(trans, trans_pcie->scd_base_addr +
                                        SCD_CONTEXT_MEM_LOWER_BOUND,
@@ -573,7 +570,7 @@ void iwl_trans_pcie_tx_reset(struct iwl_trans *trans)
         * while we were in WoWLAN in which case SCD_SRAM_BASE_ADDR will
         * contain garbage.
         */
-       iwl_pcie_tx_start(trans, 0);
+       iwl_pcie_tx_start(trans);
 }
 
 static void iwl_pcie_tx_stop_fh(struct iwl_trans *trans)