mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 12:33:18 -04:00
wifi: iwlwifi: pcie: move invalid TX CMD into PCIe
There's no reason for this to be in the generic transport struct, move it into the PCIe code. 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/20250503224231.d4916769a25b.Ife9b0283e50023efb6b3f44e81a6ff3885fe5a8d@changeid
This commit is contained in:
committed by
Miri Korenblit
parent
cd6d6de694
commit
7f1ec1033c
@@ -878,7 +878,6 @@ struct iwl_txq {
|
||||
* @mbx_addr_1_step: step address data 1
|
||||
* @pcie_link_speed: current PCIe link speed (%PCI_EXP_LNKSTA_CLS_*),
|
||||
* only valid for discrete (not integrated) NICs
|
||||
* @invalid_tx_cmd: invalid TX command buffer
|
||||
* @reduced_cap_sku: reduced capability supported SKU
|
||||
* @step_urm: STEP is in URM, no support for MCS>9 in 320 MHz
|
||||
* @restart: restart worker data
|
||||
@@ -962,8 +961,6 @@ struct iwl_trans {
|
||||
|
||||
u8 pcie_link_speed;
|
||||
|
||||
struct iwl_dma_ptr invalid_tx_cmd;
|
||||
|
||||
struct {
|
||||
struct work_struct wk;
|
||||
struct iwl_fw_error_dump_mode mode;
|
||||
|
||||
@@ -423,6 +423,7 @@ struct iwl_pcie_txqs {
|
||||
* @me_present: WiAMT/CSME is detected as present (1), not present (0)
|
||||
* or unknown (-1, so can still use it as a boolean safely)
|
||||
* @me_recheck_wk: worker to recheck WiAMT/CSME presence
|
||||
* @invalid_tx_cmd: invalid TX command buffer
|
||||
*/
|
||||
struct iwl_trans_pcie {
|
||||
struct iwl_rxq *rxq;
|
||||
@@ -525,6 +526,8 @@ struct iwl_trans_pcie {
|
||||
|
||||
s8 me_present;
|
||||
struct delayed_work me_recheck_wk;
|
||||
|
||||
struct iwl_dma_ptr invalid_tx_cmd;
|
||||
};
|
||||
|
||||
static inline struct iwl_trans_pcie *
|
||||
@@ -758,10 +761,12 @@ int iwl_txq_gen2_set_tb(struct iwl_trans *trans,
|
||||
static inline void iwl_txq_set_tfd_invalid_gen2(struct iwl_trans *trans,
|
||||
struct iwl_tfh_tfd *tfd)
|
||||
{
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
|
||||
tfd->num_tbs = 0;
|
||||
|
||||
iwl_txq_gen2_set_tb(trans, tfd, trans->invalid_tx_cmd.dma,
|
||||
trans->invalid_tx_cmd.size);
|
||||
iwl_txq_gen2_set_tb(trans, tfd, trans_pcie->invalid_tx_cmd.dma,
|
||||
trans_pcie->invalid_tx_cmd.size);
|
||||
}
|
||||
|
||||
void iwl_txq_gen2_tfd_unmap(struct iwl_trans *trans,
|
||||
|
||||
@@ -2026,11 +2026,14 @@ void iwl_trans_pcie_free_pnvm_dram_regions(struct iwl_dram_regions *dram_regions
|
||||
|
||||
static void iwl_pcie_free_invalid_tx_cmd(struct iwl_trans *trans)
|
||||
{
|
||||
iwl_pcie_free_dma_ptr(trans, &trans->invalid_tx_cmd);
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
|
||||
iwl_pcie_free_dma_ptr(trans, &trans_pcie->invalid_tx_cmd);
|
||||
}
|
||||
|
||||
static int iwl_pcie_alloc_invalid_tx_cmd(struct iwl_trans *trans)
|
||||
{
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
struct iwl_cmd_header_wide bad_cmd = {
|
||||
.cmd = INVALID_WR_PTR_CMD,
|
||||
.group_id = DEBUG_GROUP,
|
||||
@@ -2040,11 +2043,11 @@ static int iwl_pcie_alloc_invalid_tx_cmd(struct iwl_trans *trans)
|
||||
};
|
||||
int ret;
|
||||
|
||||
ret = iwl_pcie_alloc_dma_ptr(trans, &trans->invalid_tx_cmd,
|
||||
ret = iwl_pcie_alloc_dma_ptr(trans, &trans_pcie->invalid_tx_cmd,
|
||||
sizeof(bad_cmd));
|
||||
if (ret)
|
||||
return ret;
|
||||
memcpy(trans->invalid_tx_cmd.addr, &bad_cmd, sizeof(bad_cmd));
|
||||
memcpy(trans_pcie->invalid_tx_cmd.addr, &bad_cmd, sizeof(bad_cmd));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -280,10 +280,12 @@ iwl_txq_gen1_tfd_tb_get_addr(struct iwl_tfd *tfd, u8 idx)
|
||||
static void iwl_txq_set_tfd_invalid_gen1(struct iwl_trans *trans,
|
||||
struct iwl_tfd *tfd)
|
||||
{
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
|
||||
tfd->num_tbs = 0;
|
||||
|
||||
iwl_pcie_gen1_tfd_set_tb(tfd, 0, trans->invalid_tx_cmd.dma,
|
||||
trans->invalid_tx_cmd.size);
|
||||
iwl_pcie_gen1_tfd_set_tb(tfd, 0, trans_pcie->invalid_tx_cmd.dma,
|
||||
trans_pcie->invalid_tx_cmd.size);
|
||||
}
|
||||
|
||||
static void iwl_txq_gen1_tfd_unmap(struct iwl_trans *trans,
|
||||
|
||||
Reference in New Issue
Block a user