diff options
author | Winkler, Tomas <tomas.winkler@intel.com> | 2008-12-02 15:14:00 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-05 09:35:53 -0500 |
commit | 0ad91a35bcb6dd993ad7d34f159afae929b4743d (patch) | |
tree | 2499de7ff305345e5e3d0a004d7881a1945b8ed5 /drivers/net/wireless | |
parent | c93007efaad0a90520ba73f025c663441bf7e9d6 (diff) |
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 22 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 6 |
3 files changed, 31 insertions, 22 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 4ea75666e0a9..40905d2dc231 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1255,13 +1255,6 @@ static void iwl_print_rx_config_cmd(struct iwl_priv *priv) | |||
1255 | } | 1255 | } |
1256 | #endif | 1256 | #endif |
1257 | 1257 | ||
1258 | static void iwl_enable_interrupts(struct iwl_priv *priv) | ||
1259 | { | ||
1260 | IWL_DEBUG_ISR("Enabling interrupts\n"); | ||
1261 | set_bit(STATUS_INT_ENABLED, &priv->status); | ||
1262 | iwl_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK); | ||
1263 | } | ||
1264 | |||
1265 | /* call this function to flush any scheduled tasklet */ | 1258 | /* call this function to flush any scheduled tasklet */ |
1266 | static inline void iwl_synchronize_irq(struct iwl_priv *priv) | 1259 | static inline void iwl_synchronize_irq(struct iwl_priv *priv) |
1267 | { | 1260 | { |
@@ -1270,21 +1263,6 @@ static inline void iwl_synchronize_irq(struct iwl_priv *priv) | |||
1270 | tasklet_kill(&priv->irq_tasklet); | 1263 | tasklet_kill(&priv->irq_tasklet); |
1271 | } | 1264 | } |
1272 | 1265 | ||
1273 | static inline void iwl_disable_interrupts(struct iwl_priv *priv) | ||
1274 | { | ||
1275 | clear_bit(STATUS_INT_ENABLED, &priv->status); | ||
1276 | |||
1277 | /* disable interrupts from uCode/NIC to host */ | ||
1278 | iwl_write32(priv, CSR_INT_MASK, 0x00000000); | ||
1279 | |||
1280 | /* acknowledge/clear/reset any interrupts still pending | ||
1281 | * from uCode or flow handler (Rx/Tx DMA) */ | ||
1282 | iwl_write32(priv, CSR_INT, 0xffffffff); | ||
1283 | iwl_write32(priv, CSR_FH_INT_STATUS, 0xffffffff); | ||
1284 | IWL_DEBUG_ISR("Disabled interrupts\n"); | ||
1285 | } | ||
1286 | |||
1287 | |||
1288 | /** | 1266 | /** |
1289 | * iwl_irq_handle_error - called for HW or SW error interrupt from card | 1267 | * iwl_irq_handle_error - called for HW or SW error interrupt from card |
1290 | */ | 1268 | */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 0980f217a941..1b021ca74e25 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -961,6 +961,30 @@ void iwl_uninit_drv(struct iwl_priv *priv) | |||
961 | } | 961 | } |
962 | EXPORT_SYMBOL(iwl_uninit_drv); | 962 | EXPORT_SYMBOL(iwl_uninit_drv); |
963 | 963 | ||
964 | |||
965 | void iwl_disable_interrupts(struct iwl_priv *priv) | ||
966 | { | ||
967 | clear_bit(STATUS_INT_ENABLED, &priv->status); | ||
968 | |||
969 | /* disable interrupts from uCode/NIC to host */ | ||
970 | iwl_write32(priv, CSR_INT_MASK, 0x00000000); | ||
971 | |||
972 | /* acknowledge/clear/reset any interrupts still pending | ||
973 | * from uCode or flow handler (Rx/Tx DMA) */ | ||
974 | iwl_write32(priv, CSR_INT, 0xffffffff); | ||
975 | iwl_write32(priv, CSR_FH_INT_STATUS, 0xffffffff); | ||
976 | IWL_DEBUG_ISR("Disabled interrupts\n"); | ||
977 | } | ||
978 | EXPORT_SYMBOL(iwl_disable_interrupts); | ||
979 | |||
980 | void iwl_enable_interrupts(struct iwl_priv *priv) | ||
981 | { | ||
982 | IWL_DEBUG_ISR("Enabling interrupts\n"); | ||
983 | set_bit(STATUS_INT_ENABLED, &priv->status); | ||
984 | iwl_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK); | ||
985 | } | ||
986 | EXPORT_SYMBOL(iwl_enable_interrupts); | ||
987 | |||
964 | int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags) | 988 | int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags) |
965 | { | 989 | { |
966 | u32 stat_flags = 0; | 990 | u32 stat_flags = 0; |
@@ -1336,6 +1360,7 @@ void iwl_rf_kill_ct_config(struct iwl_priv *priv) | |||
1336 | } | 1360 | } |
1337 | EXPORT_SYMBOL(iwl_rf_kill_ct_config); | 1361 | EXPORT_SYMBOL(iwl_rf_kill_ct_config); |
1338 | 1362 | ||
1363 | |||
1339 | /* | 1364 | /* |
1340 | * CARD_STATE_CMD | 1365 | * CARD_STATE_CMD |
1341 | * | 1366 | * |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 82bf263b6f5a..f68883b3246e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -313,6 +313,12 @@ int iwl_send_cmd_pdu_async(struct iwl_priv *priv, u8 id, u16 len, | |||
313 | int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd); | 313 | int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd); |
314 | 314 | ||
315 | /***************************************************** | 315 | /***************************************************** |
316 | * PCI * | ||
317 | *****************************************************/ | ||
318 | void iwl_disable_interrupts(struct iwl_priv *priv); | ||
319 | void iwl_enable_interrupts(struct iwl_priv *priv); | ||
320 | |||
321 | /***************************************************** | ||
316 | * Error Handling Debugging | 322 | * Error Handling Debugging |
317 | ******************************************************/ | 323 | ******************************************************/ |
318 | void iwl_dump_nic_error_log(struct iwl_priv *priv); | 324 | void iwl_dump_nic_error_log(struct iwl_priv *priv); |