Skip to content

Commit d43c01d

Browse files
jmberg-intelMiriam-Rachel
authored andcommitted
wifi: iwlwifi: trans: remove SCD base address validation
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
1 parent 8f75612 commit d43c01d

File tree

8 files changed

+12
-17
lines changed

8 files changed

+12
-17
lines changed

drivers/net/wireless/intel/iwlwifi/dvm/ucode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ static int iwl_alive_notify(struct iwl_priv *priv)
223223
int ret;
224224
int i;
225225

226-
iwl_trans_fw_alive(priv->trans, 0);
226+
iwl_trans_fw_alive(priv->trans);
227227

228228
if (priv->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN &&
229229
priv->nvm_data->sku_cap_ipan_enable) {

drivers/net/wireless/intel/iwlwifi/iwl-trans.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ iwl_trans_release_nic_access(struct iwl_trans *trans)
577577
}
578578
IWL_EXPORT_SYMBOL(iwl_trans_release_nic_access);
579579

580-
void iwl_trans_fw_alive(struct iwl_trans *trans, u32 scd_addr)
580+
void iwl_trans_fw_alive(struct iwl_trans *trans)
581581
{
582582
might_sleep();
583583

@@ -586,7 +586,7 @@ void iwl_trans_fw_alive(struct iwl_trans *trans, u32 scd_addr)
586586
if (trans->trans_cfg->gen2)
587587
iwl_trans_pcie_gen2_fw_alive(trans);
588588
else
589-
iwl_trans_pcie_fw_alive(trans, scd_addr);
589+
iwl_trans_pcie_fw_alive(trans);
590590
}
591591
IWL_EXPORT_SYMBOL(iwl_trans_fw_alive);
592592

drivers/net/wireless/intel/iwlwifi/iwl-trans.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ int iwl_trans_start_hw(struct iwl_trans *trans);
947947

948948
void iwl_trans_op_mode_leave(struct iwl_trans *trans);
949949

950-
void iwl_trans_fw_alive(struct iwl_trans *trans, u32 scd_addr);
950+
void iwl_trans_fw_alive(struct iwl_trans *trans);
951951

952952
int iwl_trans_start_fw(struct iwl_trans *trans, const struct iwl_fw *fw,
953953
enum iwl_ucode_type ucode_type, bool run_in_rfkill);

drivers/net/wireless/intel/iwlwifi/mld/fw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static int iwl_mld_load_fw_wait_alive(struct iwl_mld *mld)
262262
return -EIO;
263263
}
264264

265-
iwl_trans_fw_alive(mld->trans, 0);
265+
iwl_trans_fw_alive(mld->trans);
266266

267267
return 0;
268268
}

drivers/net/wireless/intel/iwlwifi/mvm/fw.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
struct iwl_mvm_alive_data {
3232
bool valid;
33-
u32 scd_base_addr;
3433
};
3534

3635
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,
244243
}
245244
}
246245

247-
alive_data->scd_base_addr = le32_to_cpu(lmac1->dbg_ptrs.scd_base_ptr);
248246
alive_data->valid = status == IWL_ALIVE_STATUS_OK;
249247

250248
IWL_DEBUG_FW(mvm,
@@ -429,7 +427,7 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
429427
/* if reached this point, Alive notification was received */
430428
iwl_mei_alive_notif(true);
431429

432-
iwl_trans_fw_alive(mvm->trans, alive_data.scd_base_addr);
430+
iwl_trans_fw_alive(mvm->trans);
433431

434432
ret = iwl_pnvm_load(mvm->trans, &mvm->notif_wait,
435433
&mvm->fw->ucode_capa);

drivers/net/wireless/intel/iwlwifi/pcie/internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ struct iwl_tso_page_info {
633633
IWL_TSO_PAGE_DATA_SIZE))
634634

635635
int iwl_pcie_tx_init(struct iwl_trans *trans);
636-
void iwl_pcie_tx_start(struct iwl_trans *trans, u32 scd_base_addr);
636+
void iwl_pcie_tx_start(struct iwl_trans *trans);
637637
int iwl_pcie_tx_stop(struct iwl_trans *trans);
638638
void iwl_pcie_tx_free(struct iwl_trans *trans);
639639
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);
11311131
void iwl_trans_pcie_release_nic_access(struct iwl_trans *trans);
11321132

11331133
/* transport gen 1 exported functions */
1134-
void iwl_trans_pcie_fw_alive(struct iwl_trans *trans, u32 scd_addr);
1134+
void iwl_trans_pcie_fw_alive(struct iwl_trans *trans);
11351135
int iwl_trans_pcie_start_fw(struct iwl_trans *trans,
11361136
const struct iwl_fw *fw,
11371137
const struct fw_img *img,

drivers/net/wireless/intel/iwlwifi/pcie/trans.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,10 +1425,10 @@ int iwl_trans_pcie_start_fw(struct iwl_trans *trans,
14251425
return ret;
14261426
}
14271427

1428-
void iwl_trans_pcie_fw_alive(struct iwl_trans *trans, u32 scd_addr)
1428+
void iwl_trans_pcie_fw_alive(struct iwl_trans *trans)
14291429
{
14301430
iwl_pcie_reset_ict(trans);
1431-
iwl_pcie_tx_start(trans, scd_addr);
1431+
iwl_pcie_tx_start(trans);
14321432
}
14331433

14341434
void iwl_trans_pcie_handle_stop_rfkill(struct iwl_trans *trans,

drivers/net/wireless/intel/iwlwifi/pcie/tx.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ static void iwl_pcie_txq_free(struct iwl_trans *trans, int txq_id)
477477
memset(txq, 0, sizeof(*txq));
478478
}
479479

480-
void iwl_pcie_tx_start(struct iwl_trans *trans, u32 scd_base_addr)
480+
void iwl_pcie_tx_start(struct iwl_trans *trans)
481481
{
482482
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
483483
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)
495495
trans_pcie->scd_base_addr =
496496
iwl_read_prph(trans, SCD_SRAM_BASE_ADDR);
497497

498-
WARN_ON(scd_base_addr != 0 &&
499-
scd_base_addr != trans_pcie->scd_base_addr);
500-
501498
/* reset context data, TX status and translation data */
502499
iwl_trans_pcie_write_mem(trans, trans_pcie->scd_base_addr +
503500
SCD_CONTEXT_MEM_LOWER_BOUND,
@@ -573,7 +570,7 @@ void iwl_trans_pcie_tx_reset(struct iwl_trans *trans)
573570
* while we were in WoWLAN in which case SCD_SRAM_BASE_ADDR will
574571
* contain garbage.
575572
*/
576-
iwl_pcie_tx_start(trans, 0);
573+
iwl_pcie_tx_start(trans);
577574
}
578575

579576
static void iwl_pcie_tx_stop_fh(struct iwl_trans *trans)

0 commit comments

Comments
 (0)