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

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

iwlagn: move iwlagn_stop_device to transport layer



Since iwlagn_stop_device was the only caller to the rx_stop / tx_stop,
these two don't need to be API any more.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.guy@intel.com>
parent 253a634c
Loading
Loading
Loading
Loading
+0 −39
Original line number Diff line number Diff line
@@ -2166,42 +2166,3 @@ int iwlagn_start_device(struct iwl_priv *priv)
	return 0;
}
void iwlagn_stop_device(struct iwl_priv *priv)
{
	unsigned long flags;

	/* stop and reset the on-board processor */
	iwl_write32(priv, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET);

	/* tell the device to stop sending interrupts */
	spin_lock_irqsave(&priv->lock, flags);
	iwl_disable_interrupts(priv);
	spin_unlock_irqrestore(&priv->lock, flags);
	trans_sync_irq(priv);

	/* device going down, Stop using ICT table */
	iwl_disable_ict(priv);

	/*
	 * If a HW restart happens during firmware loading,
	 * then the firmware loading might call this function
	 * and later it might be called again due to the
	 * restart. So don't process again if the device is
	 * already dead.
	 */
	if (test_bit(STATUS_DEVICE_ENABLED, &priv->status)) {
		trans_tx_stop(priv);
		trans_rx_stop(priv);

		/* Power-down device's busmaster DMA clocks */
		iwl_write_prph(priv, APMG_CLK_DIS_REG,
			       APMG_CLK_VAL_DMA_CLK_RQT);
		udelay(5);
	}

	/* Make sure (redundant) we've released our request to stay awake */
	iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);

	/* Stop the device, and put it in low power state */
	iwl_apm_stop(priv);
}
+1 −1
Original line number Diff line number Diff line
@@ -707,6 +707,6 @@ int iwlagn_run_init_ucode(struct iwl_priv *priv)
	iwlagn_remove_notification(priv, &calib_wait);
 out:
	/* Whatever happened, stop the device */
	iwlagn_stop_device(priv);
	trans_stop_device(priv);
	return ret;
}
+1 −1
Original line number Diff line number Diff line
@@ -1782,7 +1782,7 @@ static void __iwl_down(struct iwl_priv *priv)
		       test_bit(STATUS_EXIT_PENDING, &priv->status) <<
				STATUS_EXIT_PENDING;

	iwlagn_stop_device(priv);
	trans_stop_device(priv);

	dev_kfree_skb(priv->beacon_skb);
	priv->beacon_skb = NULL;
+0 −1
Original line number Diff line number Diff line
@@ -129,7 +129,6 @@ static inline void iwl_set_calib_hdr(struct iwl_calib_hdr *hdr, u8 cmd)
int iwl_prepare_card_hw(struct iwl_priv *priv);

int iwlagn_start_device(struct iwl_priv *priv);
void iwlagn_stop_device(struct iwl_priv *priv);

/* tx queue */
void iwlagn_set_wr_ptrs(struct iwl_priv *priv,
+3 −4
Original line number Diff line number Diff line
@@ -1236,11 +1236,10 @@ struct iwl_trans;
 * struct iwl_trans_ops - transport specific operations

 * @rx_init: inits the rx memory, allocate it if needed
 * @rx_stop: stop the rx
 * @rx_free: frees the rx memory
 * @tx_init:inits the tx memory, allocate if needed
 * @tx_stop: stop the tx
 * @tx_free: frees the tx memory
 * @stop_device:stops the whole device (embedded CPU put to reset)
 * @send_cmd:send a host command
 * @send_cmd_pdu:send a host command: flags can be CMD_*
 * @get_tx_cmd: returns a pointer to a new Tx cmd for the upper layer use
@@ -1254,13 +1253,13 @@ struct iwl_trans;
 */
struct iwl_trans_ops {
	int (*rx_init)(struct iwl_priv *priv);
	int (*rx_stop)(struct iwl_priv *priv);
	void (*rx_free)(struct iwl_priv *priv);

	int (*tx_init)(struct iwl_priv *priv);
	int (*tx_stop)(struct iwl_priv *priv);
	void (*tx_free)(struct iwl_priv *priv);

	void (*stop_device)(struct iwl_priv *priv);

	int (*send_cmd)(struct iwl_priv *priv, struct iwl_host_cmd *cmd);

	int (*send_cmd_pdu)(struct iwl_priv *priv, u8 id, u32 flags, u16 len,
Loading