Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed6a3803 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Wey-Yi Guy
Browse files

iwlwifi: add fw_alive to transport layer API, kill tx_start



Define a new handler in the transport layer API: fw_alive.
Move iwl_reset_ict to this new handler, and move the content
of tx_start to this handler.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 96d28e00
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1243,9 +1243,6 @@ int iwl_alive_start(struct iwl_priv *priv)
	int ret = 0;
	struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];

	/*TODO: this should go to the transport layer */
	iwl_reset_ict(trans(priv));

	IWL_DEBUG_INFO(priv, "Runtime Alive received.\n");

	/* After the ALIVE response, we can send host commands to the uCode */
+0 −2
Original line number Diff line number Diff line
@@ -73,8 +73,6 @@ struct iwlagn_ucode_capabilities {

extern struct ieee80211_ops iwlagn_hw_ops;

int iwl_reset_ict(struct iwl_trans *trans);

static inline void iwl_set_calib_hdr(struct iwl_calib_hdr *hdr, u8 cmd)
{
	hdr->op_code = cmd;
+1 −1
Original line number Diff line number Diff line
@@ -258,7 +258,7 @@ void iwl_rx_queue_update_write_ptr(struct iwl_trans *trans,
/*****************************************************
* ICT
******************************************************/
int iwl_reset_ict(struct iwl_trans *trans);
void iwl_reset_ict(struct iwl_trans *trans);
void iwl_disable_ict(struct iwl_trans *trans);
int iwl_alloc_isr_ict(struct iwl_trans *trans);
void iwl_free_isr_ict(struct iwl_trans *trans);
+2 −4
Original line number Diff line number Diff line
@@ -1213,7 +1213,7 @@ int iwl_alloc_isr_ict(struct iwl_trans *trans)
/* Device is going up inform it about using ICT interrupt table,
 * also we need to tell the driver to start using ICT interrupt.
 */
int iwl_reset_ict(struct iwl_trans *trans)
void iwl_reset_ict(struct iwl_trans *trans)
{
	u32 val;
	unsigned long flags;
@@ -1221,7 +1221,7 @@ int iwl_reset_ict(struct iwl_trans *trans)
		IWL_TRANS_GET_PCIE_TRANS(trans);

	if (!trans_pcie->ict_tbl)
		return 0;
		return;

	spin_lock_irqsave(&trans->shrd->lock, flags);
	iwl_disable_interrupts(trans);
@@ -1241,8 +1241,6 @@ int iwl_reset_ict(struct iwl_trans *trans)
	iwl_write32(bus(trans), CSR_INT, trans_pcie->inta_mask);
	iwl_enable_interrupts(trans);
	spin_unlock_irqrestore(&trans->shrd->lock, flags);

	return 0;
}

/* Device is going down disable ict interrupt usage */
+8 −2
Original line number Diff line number Diff line
@@ -835,7 +835,7 @@ static void iwl_trans_txq_set_sched(struct iwl_trans *trans, u32 mask)
	iwl_write_prph(bus(trans), SCD_TXFACT, mask);
}

static void iwl_trans_pcie_tx_start(struct iwl_trans *trans)
static void iwl_tx_start(struct iwl_trans *trans)
{
	const struct queue_to_fifo_ac *queue_to_fifo;
	struct iwl_trans_pcie *trans_pcie =
@@ -948,6 +948,12 @@ static void iwl_trans_pcie_tx_start(struct iwl_trans *trans)
			  APMG_PCIDEV_STT_VAL_L1_ACT_DIS);
}

static void iwl_trans_pcie_fw_alive(struct iwl_trans *trans)
{
	iwl_reset_ict(trans);
	iwl_tx_start(trans);
}

/**
 * iwlagn_txq_ctx_stop - Stop all Tx DMA channels
 */
@@ -1903,11 +1909,11 @@ static int iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans,
const struct iwl_trans_ops trans_ops_pcie = {
	.alloc = iwl_trans_pcie_alloc,
	.request_irq = iwl_trans_pcie_request_irq,
	.fw_alive = iwl_trans_pcie_fw_alive,
	.start_device = iwl_trans_pcie_start_device,
	.prepare_card_hw = iwl_trans_pcie_prepare_card_hw,
	.stop_device = iwl_trans_pcie_stop_device,

	.tx_start = iwl_trans_pcie_tx_start,
	.wake_any_queue = iwl_trans_pcie_wake_any_queue,

	.send_cmd = iwl_trans_pcie_send_cmd,
Loading