diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-01-15 16:43:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-19 16:25:11 -0500 |
commit | 2be76703a3afb281155894ac52d34f7f5d736633 (patch) | |
tree | 2eccad07339ac4d116cde6d3d9c710ead048b42a /drivers | |
parent | 937c397eb633b804d9a806d08c395ecfc42b1fec (diff) |
iwlwifi: set interrupt coalescing timer range and default
For interrupt coalescing timer, the CSR_INT_COALESCING is an 8 bit
register in 32-usec unit, the range can go from 0x00 - 0xFF. set the
range and default timeout value for both calibration mode and operation mode.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 15 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rx.c | 4 |
3 files changed, 19 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 5b56307a3812..29eb7b4dc7d4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -257,8 +257,8 @@ int iwl_hw_nic_init(struct iwl_priv *priv) | |||
257 | spin_lock_irqsave(&priv->lock, flags); | 257 | spin_lock_irqsave(&priv->lock, flags); |
258 | priv->cfg->ops->lib->apm_ops.init(priv); | 258 | priv->cfg->ops->lib->apm_ops.init(priv); |
259 | 259 | ||
260 | /* Set interrupt coalescing timer to 512 usecs */ | 260 | /* Set interrupt coalescing calibration timer to default (512 usecs) */ |
261 | iwl_write8(priv, CSR_INT_COALESCING, 512 / 32); | 261 | iwl_write8(priv, CSR_INT_COALESCING, IWL_HOST_INT_CALIB_TIMEOUT_DEF); |
262 | 262 | ||
263 | spin_unlock_irqrestore(&priv->lock, flags); | 263 | spin_unlock_irqrestore(&priv->lock, flags); |
264 | 264 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 63e45cd3f634..251eb737860c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1011,6 +1011,21 @@ struct iwl_event_log { | |||
1011 | int wraps_more_count; | 1011 | int wraps_more_count; |
1012 | }; | 1012 | }; |
1013 | 1013 | ||
1014 | /* | ||
1015 | * host interrupt timeout value | ||
1016 | * used with setting interrupt coalescing timer | ||
1017 | * the CSR_INT_COALESCING is an 8 bit register in 32-usec unit | ||
1018 | * | ||
1019 | * default interrupt coalescing timer is 64 x 32 = 2048 usecs | ||
1020 | * default interrupt coalescing calibration timer is 16 x 32 = 512 usecs | ||
1021 | */ | ||
1022 | #define IWL_HOST_INT_TIMEOUT_MAX (0xFF) | ||
1023 | #define IWL_HOST_INT_TIMEOUT_DEF (0x40) | ||
1024 | #define IWL_HOST_INT_TIMEOUT_MIN (0x0) | ||
1025 | #define IWL_HOST_INT_CALIB_TIMEOUT_MAX (0xFF) | ||
1026 | #define IWL_HOST_INT_CALIB_TIMEOUT_DEF (0x10) | ||
1027 | #define IWL_HOST_INT_CALIB_TIMEOUT_MIN (0x0) | ||
1028 | |||
1014 | struct iwl_priv { | 1029 | struct iwl_priv { |
1015 | 1030 | ||
1016 | /* ieee device used by generic ieee processing code */ | 1031 | /* ieee device used by generic ieee processing code */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 5bbe5f1f749c..07bdba93c179 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -473,8 +473,8 @@ int iwl_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq) | |||
473 | (rb_timeout << FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS)| | 473 | (rb_timeout << FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS)| |
474 | (rfdnlog << FH_RCSR_RX_CONFIG_RBDCB_SIZE_POS)); | 474 | (rfdnlog << FH_RCSR_RX_CONFIG_RBDCB_SIZE_POS)); |
475 | 475 | ||
476 | /* Set interrupt coalescing timer to 64 x 32 = 2048 usecs */ | 476 | /* Set interrupt coalescing timer to default (2048 usecs) */ |
477 | iwl_write8(priv, CSR_INT_COALESCING, 0x40); | 477 | iwl_write8(priv, CSR_INT_COALESCING, IWL_HOST_INT_TIMEOUT_DEF); |
478 | 478 | ||
479 | return 0; | 479 | return 0; |
480 | } | 480 | } |