aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c25
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-helpers.h21
3 files changed, 21 insertions, 27 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 976004f6c7dc..6aea02644809 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1749,31 +1749,6 @@ void iwl_uninit_drv(struct iwl_priv *priv)
1749} 1749}
1750EXPORT_SYMBOL(iwl_uninit_drv); 1750EXPORT_SYMBOL(iwl_uninit_drv);
1751 1751
1752
1753void iwl_disable_interrupts(struct iwl_priv *priv)
1754{
1755 clear_bit(STATUS_INT_ENABLED, &priv->status);
1756
1757 /* disable interrupts from uCode/NIC to host */
1758 iwl_write32(priv, CSR_INT_MASK, 0x00000000);
1759
1760 /* acknowledge/clear/reset any interrupts still pending
1761 * from uCode or flow handler (Rx/Tx DMA) */
1762 iwl_write32(priv, CSR_INT, 0xffffffff);
1763 iwl_write32(priv, CSR_FH_INT_STATUS, 0xffffffff);
1764 IWL_DEBUG_ISR(priv, "Disabled interrupts\n");
1765}
1766EXPORT_SYMBOL(iwl_disable_interrupts);
1767
1768void iwl_enable_interrupts(struct iwl_priv *priv)
1769{
1770 IWL_DEBUG_ISR(priv, "Enabling interrupts\n");
1771 set_bit(STATUS_INT_ENABLED, &priv->status);
1772 iwl_write32(priv, CSR_INT_MASK, priv->inta_mask);
1773}
1774EXPORT_SYMBOL(iwl_enable_interrupts);
1775
1776
1777#define ICT_COUNT (PAGE_SIZE/sizeof(u32)) 1752#define ICT_COUNT (PAGE_SIZE/sizeof(u32))
1778 1753
1779/* Free dram table */ 1754/* Free dram table */
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index f82ec9e4da03..614ec7cc5b31 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -458,8 +458,6 @@ int iwl_send_card_state(struct iwl_priv *priv, u32 flags,
458/***************************************************** 458/*****************************************************
459 * PCI * 459 * PCI *
460 *****************************************************/ 460 *****************************************************/
461void iwl_disable_interrupts(struct iwl_priv *priv);
462void iwl_enable_interrupts(struct iwl_priv *priv);
463irqreturn_t iwl_isr_legacy(int irq, void *data); 461irqreturn_t iwl_isr_legacy(int irq, void *data);
464int iwl_reset_ict(struct iwl_priv *priv); 462int iwl_reset_ict(struct iwl_priv *priv);
465void iwl_disable_ict(struct iwl_priv *priv); 463void iwl_disable_ict(struct iwl_priv *priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/wireless/iwlwifi/iwl-helpers.h
index a1328c3c81ae..bd0b12efb5c7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-helpers.h
+++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h
@@ -145,4 +145,25 @@ static inline void iwl_stop_queue(struct iwl_priv *priv, u8 queue)
145#define ieee80211_stop_queue DO_NOT_USE_ieee80211_stop_queue 145#define ieee80211_stop_queue DO_NOT_USE_ieee80211_stop_queue
146#define ieee80211_wake_queue DO_NOT_USE_ieee80211_wake_queue 146#define ieee80211_wake_queue DO_NOT_USE_ieee80211_wake_queue
147 147
148static inline void iwl_disable_interrupts(struct iwl_priv *priv)
149{
150 clear_bit(STATUS_INT_ENABLED, &priv->status);
151
152 /* disable interrupts from uCode/NIC to host */
153 iwl_write32(priv, CSR_INT_MASK, 0x00000000);
154
155 /* acknowledge/clear/reset any interrupts still pending
156 * from uCode or flow handler (Rx/Tx DMA) */
157 iwl_write32(priv, CSR_INT, 0xffffffff);
158 iwl_write32(priv, CSR_FH_INT_STATUS, 0xffffffff);
159 IWL_DEBUG_ISR(priv, "Disabled interrupts\n");
160}
161
162static inline void iwl_enable_interrupts(struct iwl_priv *priv)
163{
164 IWL_DEBUG_ISR(priv, "Enabling interrupts\n");
165 set_bit(STATUS_INT_ENABLED, &priv->status);
166 iwl_write32(priv, CSR_INT_MASK, priv->inta_mask);
167}
168
148#endif /* __iwl_helpers_h__ */ 169#endif /* __iwl_helpers_h__ */