Commit f451bc6a authored by Johannes Berg's avatar Johannes Berg Committed by Miri Korenblit
Browse files

wifi: iwlwifi: pcie: move wait_command_queue into PCIe



There's no reason for this to be declared in the transport
struct, so move the item to the PCIe struct.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224231.793f625c5c2d.I64ebb402255d84c2ad045a65e5a4e4891ead5b26@changeid
parent 7f1ec103
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -310,9 +310,6 @@ int iwl_trans_init(struct iwl_trans *trans)
	if (!trans->dev_cmd_pool)
		return -ENOMEM;

	/* Initialize the wait queue for commands */
	init_waitqueue_head(&trans->wait_command_queue);

	return 0;
}

+0 −2
Original line number Diff line number Diff line
@@ -854,7 +854,6 @@ struct iwl_txq {
 * @command_groups: pointer to command group name list array
 * @command_groups_size: array size of @command_groups
 * @wide_cmd_header: true when ucode supports wide command header format
 * @wait_command_queue: wait queue for sync commands
 * @num_rx_queues: number of RX queues allocated by the transport;
 *	the transport must set this before calling iwl_drv_start()
 * @iml_len: the length of the image loader
@@ -934,7 +933,6 @@ struct iwl_trans {
	int command_groups_size;
	bool wide_cmd_header;

	wait_queue_head_t wait_command_queue;
	u8 num_rx_queues;

	size_t iml_len;
+3 −0
Original line number Diff line number Diff line
@@ -424,6 +424,7 @@ struct iwl_pcie_txqs {
 *	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
 * @wait_command_queue: wait queue for sync commands
 */
struct iwl_trans_pcie {
	struct iwl_rxq *rxq;
@@ -528,6 +529,8 @@ struct iwl_trans_pcie {
	struct delayed_work me_recheck_wk;

	struct iwl_dma_ptr invalid_tx_cmd;

	wait_queue_head_t wait_command_queue;
};

static inline struct iwl_trans_pcie *
+3 −3
Original line number Diff line number Diff line
@@ -1691,7 +1691,7 @@ static void iwl_pcie_irq_handle_error(struct iwl_trans *trans)
			    APMG_PS_CTRL_VAL_RESET_REQ))) {
		clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status);
		iwl_op_mode_wimax_active(trans->op_mode);
		wake_up(&trans->wait_command_queue);
		wake_up(&trans_pcie->wait_command_queue);
		return;
	}

@@ -1706,7 +1706,7 @@ static void iwl_pcie_irq_handle_error(struct iwl_trans *trans)
	iwl_trans_fw_error(trans, IWL_ERR_TYPE_IRQ);

	clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status);
	wake_up(&trans->wait_command_queue);
	wake_up(&trans_pcie->wait_command_queue);
}

static u32 iwl_pcie_int_cause_non_ict(struct iwl_trans *trans)
@@ -1821,7 +1821,7 @@ void iwl_pcie_handle_rfkill_irq(struct iwl_trans *trans, bool from_irq)
				       &trans->status))
			IWL_DEBUG_RF_KILL(trans,
					  "Rfkill while SYNC HCMD in flight\n");
		wake_up(&trans->wait_command_queue);
		wake_up(&trans_pcie->wait_command_queue);
	} else {
		clear_bit(STATUS_RFKILL_HW, &trans->status);
		if (trans_pcie->opmode_down)
+3 −0
Original line number Diff line number Diff line
@@ -3828,6 +3828,9 @@ iwl_trans_pcie_alloc(struct pci_dev *pdev,

	trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);

	/* Initialize the wait queue for commands */
	init_waitqueue_head(&trans_pcie->wait_command_queue);

	if (trans->trans_cfg->gen2) {
		trans_pcie->txqs.tfd.addr_size = 64;
		trans_pcie->txqs.tfd.max_tbs = IWL_TFH_NUM_TBS;
Loading