aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.c
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2009-07-09 13:33:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:10 -0400
commit5905a1aa71488b5f78822100c865ed7c4f9fcd8f (patch)
tree27a02c54377eb158fd61935852ef8edcd47907ad /drivers/net/wireless/iwlwifi/iwl-3945.c
parentfcf89d05404dafcde581d44dfa89bd8c8def27f9 (diff)
iwl3945: cleanup number of queues settings
* Rename maximum number of queue (TFD_QUEUE_MAX) to IWL39_NUM_QUEUES to be consistent with rest of iwlwifi. * Remove unused defines. * Fix loops that iterate over number of TX queues to stop when maximum is reached (currently it is maximum + 1). * Remove queues_num module parameter as it is not used. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index b0246dbda99..1227ed2960f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -963,7 +963,7 @@ static int iwl3945_txq_ctx_reset(struct iwl_priv *priv)
963 goto error; 963 goto error;
964 964
965 /* Tx queue(s) */ 965 /* Tx queue(s) */
966 for (txq_id = 0; txq_id <= priv->hw_params.max_txq_num; txq_id++) { 966 for (txq_id = 0; txq_id < priv->hw_params.max_txq_num; txq_id++) {
967 slots_num = (txq_id == IWL_CMD_QUEUE_NUM) ? 967 slots_num = (txq_id == IWL_CMD_QUEUE_NUM) ?
968 TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS; 968 TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS;
969 rc = iwl_tx_queue_init(priv, &priv->txq[txq_id], slots_num, 969 rc = iwl_tx_queue_init(priv, &priv->txq[txq_id], slots_num,
@@ -1140,7 +1140,7 @@ void iwl3945_hw_txq_ctx_free(struct iwl_priv *priv)
1140 int txq_id; 1140 int txq_id;
1141 1141
1142 /* Tx queues */ 1142 /* Tx queues */
1143 for (txq_id = 0; txq_id <= priv->hw_params.max_txq_num; txq_id++) 1143 for (txq_id = 0; txq_id < priv->hw_params.max_txq_num; txq_id++)
1144 if (txq_id == IWL_CMD_QUEUE_NUM) 1144 if (txq_id == IWL_CMD_QUEUE_NUM)
1145 iwl_cmd_queue_free(priv); 1145 iwl_cmd_queue_free(priv);
1146 else 1146 else
@@ -1156,7 +1156,7 @@ void iwl3945_hw_txq_ctx_stop(struct iwl_priv *priv)
1156 iwl_write_prph(priv, ALM_SCD_MODE_REG, 0); 1156 iwl_write_prph(priv, ALM_SCD_MODE_REG, 0);
1157 1157
1158 /* reset TFD queues */ 1158 /* reset TFD queues */
1159 for (txq_id = 0; txq_id <= priv->hw_params.max_txq_num; txq_id++) { 1159 for (txq_id = 0; txq_id < priv->hw_params.max_txq_num; txq_id++) {
1160 iwl_write_direct32(priv, FH39_TCSR_CONFIG(txq_id), 0x0); 1160 iwl_write_direct32(priv, FH39_TCSR_CONFIG(txq_id), 0x0);
1161 iwl_poll_direct_bit(priv, FH39_TSSR_TX_STATUS, 1161 iwl_poll_direct_bit(priv, FH39_TSSR_TX_STATUS,
1162 FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(txq_id), 1162 FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(txq_id),
@@ -2552,7 +2552,7 @@ int iwl3945_hw_set_hw_params(struct iwl_priv *priv)
2552 } 2552 }
2553 2553
2554 /* Assign number of Usable TX queues */ 2554 /* Assign number of Usable TX queues */
2555 priv->hw_params.max_txq_num = TFD_QUEUE_MAX; 2555 priv->hw_params.max_txq_num = IWL39_NUM_QUEUES;
2556 2556
2557 priv->hw_params.tfd_size = sizeof(struct iwl3945_tfd); 2557 priv->hw_params.tfd_size = sizeof(struct iwl3945_tfd);
2558 priv->hw_params.rx_buf_size = IWL_RX_BUF_SIZE_3K; 2558 priv->hw_params.rx_buf_size = IWL_RX_BUF_SIZE_3K;