iwlwifi: move disable/enable interrupts to iwl-core.c
This patch moves iwl_enable_interrupts and iwl_disable_interrupts functions to iwl-core.c Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
c93007efaa
commit
0ad91a35bc
3 changed files with 31 additions and 22 deletions
|
@ -1255,13 +1255,6 @@ static void iwl_print_rx_config_cmd(struct iwl_priv *priv)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void iwl_enable_interrupts(struct iwl_priv *priv)
|
||||
{
|
||||
IWL_DEBUG_ISR("Enabling interrupts\n");
|
||||
set_bit(STATUS_INT_ENABLED, &priv->status);
|
||||
iwl_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK);
|
||||
}
|
||||
|
||||
/* call this function to flush any scheduled tasklet */
|
||||
static inline void iwl_synchronize_irq(struct iwl_priv *priv)
|
||||
{
|
||||
|
@ -1270,21 +1263,6 @@ static inline void iwl_synchronize_irq(struct iwl_priv *priv)
|
|||
tasklet_kill(&priv->irq_tasklet);
|
||||
}
|
||||
|
||||
static inline void iwl_disable_interrupts(struct iwl_priv *priv)
|
||||
{
|
||||
clear_bit(STATUS_INT_ENABLED, &priv->status);
|
||||
|
||||
/* disable interrupts from uCode/NIC to host */
|
||||
iwl_write32(priv, CSR_INT_MASK, 0x00000000);
|
||||
|
||||
/* acknowledge/clear/reset any interrupts still pending
|
||||
* from uCode or flow handler (Rx/Tx DMA) */
|
||||
iwl_write32(priv, CSR_INT, 0xffffffff);
|
||||
iwl_write32(priv, CSR_FH_INT_STATUS, 0xffffffff);
|
||||
IWL_DEBUG_ISR("Disabled interrupts\n");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* iwl_irq_handle_error - called for HW or SW error interrupt from card
|
||||
*/
|
||||
|
|
|
@ -961,6 +961,30 @@ void iwl_uninit_drv(struct iwl_priv *priv)
|
|||
}
|
||||
EXPORT_SYMBOL(iwl_uninit_drv);
|
||||
|
||||
|
||||
void iwl_disable_interrupts(struct iwl_priv *priv)
|
||||
{
|
||||
clear_bit(STATUS_INT_ENABLED, &priv->status);
|
||||
|
||||
/* disable interrupts from uCode/NIC to host */
|
||||
iwl_write32(priv, CSR_INT_MASK, 0x00000000);
|
||||
|
||||
/* acknowledge/clear/reset any interrupts still pending
|
||||
* from uCode or flow handler (Rx/Tx DMA) */
|
||||
iwl_write32(priv, CSR_INT, 0xffffffff);
|
||||
iwl_write32(priv, CSR_FH_INT_STATUS, 0xffffffff);
|
||||
IWL_DEBUG_ISR("Disabled interrupts\n");
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_disable_interrupts);
|
||||
|
||||
void iwl_enable_interrupts(struct iwl_priv *priv)
|
||||
{
|
||||
IWL_DEBUG_ISR("Enabling interrupts\n");
|
||||
set_bit(STATUS_INT_ENABLED, &priv->status);
|
||||
iwl_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK);
|
||||
}
|
||||
EXPORT_SYMBOL(iwl_enable_interrupts);
|
||||
|
||||
int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags)
|
||||
{
|
||||
u32 stat_flags = 0;
|
||||
|
@ -1336,6 +1360,7 @@ void iwl_rf_kill_ct_config(struct iwl_priv *priv)
|
|||
}
|
||||
EXPORT_SYMBOL(iwl_rf_kill_ct_config);
|
||||
|
||||
|
||||
/*
|
||||
* CARD_STATE_CMD
|
||||
*
|
||||
|
|
|
@ -312,6 +312,12 @@ int iwl_send_cmd_pdu_async(struct iwl_priv *priv, u8 id, u16 len,
|
|||
|
||||
int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd);
|
||||
|
||||
/*****************************************************
|
||||
* PCI *
|
||||
*****************************************************/
|
||||
void iwl_disable_interrupts(struct iwl_priv *priv);
|
||||
void iwl_enable_interrupts(struct iwl_priv *priv);
|
||||
|
||||
/*****************************************************
|
||||
* Error Handling Debugging
|
||||
******************************************************/
|
||||
|
|
Loading…
Reference in a new issue