aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-05-29 04:35:01 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-03 15:00:22 -0400
commitb3bbacb78bc688707ac312158c5bbc6bbbb55b23 (patch)
treefa57d2349a629c6a565c4f57d349d58e2363540d
parentda1bc4539f9b10dc30ac1750fbaaf5afae4b3446 (diff)
iwlwifi: move iwl_rxq_stop into iwl-rx.c
This patch moves iwl_rxq_stop into iwl-rx.c. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c25
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c26
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c2
4 files changed, 28 insertions, 27 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index fe731918c2f4..2f254c4abdd5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -384,31 +384,6 @@ void iwl4965_hwrate_to_tx_control(struct iwl_priv *priv, u32 rate_n_flags,
384 control->tx_rate_idx = rate_index; 384 control->tx_rate_idx = rate_index;
385} 385}
386 386
387int iwl4965_hw_rxq_stop(struct iwl_priv *priv)
388{
389 int rc;
390 unsigned long flags;
391
392 spin_lock_irqsave(&priv->lock, flags);
393 rc = iwl_grab_nic_access(priv);
394 if (rc) {
395 spin_unlock_irqrestore(&priv->lock, flags);
396 return rc;
397 }
398
399 /* stop Rx DMA */
400 iwl_write_direct32(priv, FH_MEM_RCSR_CHNL0_CONFIG_REG, 0);
401 rc = iwl_poll_direct_bit(priv, FH_MEM_RSSR_RX_STATUS_REG,
402 (1 << 24), 1000);
403 if (rc < 0)
404 IWL_ERROR("Can't stop Rx DMA.\n");
405
406 iwl_release_nic_access(priv);
407 spin_unlock_irqrestore(&priv->lock, flags);
408
409 return 0;
410}
411
412/* 387/*
413 * EEPROM handlers 388 * EEPROM handlers
414 */ 389 */
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 3cefaaf95b22..5291f1a3aeb2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -684,8 +684,8 @@ extern u8 iwl4965_sync_station(struct iwl_priv *priv, int sta_id,
684 ****************************************************************************/ 684 ****************************************************************************/
685extern void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv); 685extern void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv);
686extern void iwl4965_hw_cancel_deferred_work(struct iwl_priv *priv); 686extern void iwl4965_hw_cancel_deferred_work(struct iwl_priv *priv);
687extern int iwl4965_hw_rxq_stop(struct iwl_priv *priv);
688extern int iwl4965_hw_set_hw_params(struct iwl_priv *priv); 687extern int iwl4965_hw_set_hw_params(struct iwl_priv *priv);
688extern int iwl_rxq_stop(struct iwl_priv *priv);
689extern void iwl_txq_ctx_stop(struct iwl_priv *priv); 689extern void iwl_txq_ctx_stop(struct iwl_priv *priv);
690extern int iwl4965_hw_get_temperature(struct iwl_priv *priv); 690extern int iwl4965_hw_get_temperature(struct iwl_priv *priv);
691extern unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv, 691extern unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv,
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index a2eb90d40b7e..ed63e5c76f3c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -420,3 +420,29 @@ int iwl_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
420 return 0; 420 return 0;
421} 421}
422 422
423int iwl_rxq_stop(struct iwl_priv *priv)
424{
425 int ret;
426 unsigned long flags;
427
428 spin_lock_irqsave(&priv->lock, flags);
429 ret = iwl_grab_nic_access(priv);
430 if (unlikely(ret)) {
431 spin_unlock_irqrestore(&priv->lock, flags);
432 return ret;
433 }
434
435 /* stop Rx DMA */
436 iwl_write_direct32(priv, FH_MEM_RCSR_CHNL0_CONFIG_REG, 0);
437 ret = iwl_poll_direct_bit(priv, FH_MEM_RSSR_RX_STATUS_REG,
438 (1 << 24), 1000);
439 if (ret < 0)
440 IWL_ERROR("Can't stop Rx DMA.\n");
441
442 iwl_release_nic_access(priv);
443 spin_unlock_irqrestore(&priv->lock, flags);
444
445 return 0;
446}
447EXPORT_SYMBOL(iwl_rxq_stop);
448
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 2652f5ff5103..985876b3eebb 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -3405,7 +3405,7 @@ static void __iwl4965_down(struct iwl_priv *priv)
3405 spin_unlock_irqrestore(&priv->lock, flags); 3405 spin_unlock_irqrestore(&priv->lock, flags);
3406 3406
3407 iwl_txq_ctx_stop(priv); 3407 iwl_txq_ctx_stop(priv);
3408 iwl4965_hw_rxq_stop(priv); 3408 iwl_rxq_stop(priv);
3409 3409
3410 spin_lock_irqsave(&priv->lock, flags); 3410 spin_lock_irqsave(&priv->lock, flags);
3411 if (!iwl_grab_nic_access(priv)) { 3411 if (!iwl_grab_nic_access(priv)) {