diff options
author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2009-03-18 00:51:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-27 20:12:58 -0400 |
commit | 21c02a1ab2d4b4a439461140e1ac355db32c3f2b (patch) | |
tree | 53962d6f99eee763c6416892be8dd0da9b9cf357 /drivers | |
parent | b1c6019bc0fe829309258d888f47d9ae54353039 (diff) |
iwl3945: set TFD_QUEUE_MAX to correct value
Total number of queues is 8 but only 7 of them are TX queues.
4 AC(Data) queue ,1 CMD and 2 HCCA. The HCCA queues are not used.
max_txq_num is set to maximum usable TX queues.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@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-3945-hw.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h index 205603d082aa..73f93a0ff2df 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h | |||
@@ -233,7 +233,7 @@ struct iwl3945_eeprom { | |||
233 | #define PCI_CFG_REV_ID_BIT_RTP (0x80) /* bit 7 */ | 233 | #define PCI_CFG_REV_ID_BIT_RTP (0x80) /* bit 7 */ |
234 | 234 | ||
235 | #define TFD_QUEUE_MIN 0 | 235 | #define TFD_QUEUE_MIN 0 |
236 | #define TFD_QUEUE_MAX 6 | 236 | #define TFD_QUEUE_MAX 5 /* 4 DATA + 1 CMD */ |
237 | 237 | ||
238 | #define IWL_NUM_SCAN_RATES (2) | 238 | #define IWL_NUM_SCAN_RATES (2) |
239 | 239 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index ba7e720e73c1..99bb48e0336f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -1046,7 +1046,7 @@ static int iwl3945_txq_ctx_reset(struct iwl_priv *priv) | |||
1046 | goto error; | 1046 | goto error; |
1047 | 1047 | ||
1048 | /* Tx queue(s) */ | 1048 | /* Tx queue(s) */ |
1049 | for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) { | 1049 | for (txq_id = 0; txq_id <= priv->hw_params.max_txq_num; txq_id++) { |
1050 | slots_num = (txq_id == IWL_CMD_QUEUE_NUM) ? | 1050 | slots_num = (txq_id == IWL_CMD_QUEUE_NUM) ? |
1051 | TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS; | 1051 | TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS; |
1052 | rc = iwl_tx_queue_init(priv, &priv->txq[txq_id], slots_num, | 1052 | rc = iwl_tx_queue_init(priv, &priv->txq[txq_id], slots_num, |
@@ -1239,7 +1239,7 @@ void iwl3945_hw_txq_ctx_free(struct iwl_priv *priv) | |||
1239 | int txq_id; | 1239 | int txq_id; |
1240 | 1240 | ||
1241 | /* Tx queues */ | 1241 | /* Tx queues */ |
1242 | for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) | 1242 | for (txq_id = 0; txq_id <= priv->hw_params.max_txq_num; txq_id++) |
1243 | iwl_tx_queue_free(priv, txq_id); | 1243 | iwl_tx_queue_free(priv, txq_id); |
1244 | } | 1244 | } |
1245 | 1245 | ||
@@ -1259,7 +1259,7 @@ void iwl3945_hw_txq_ctx_stop(struct iwl_priv *priv) | |||
1259 | iwl_write_prph(priv, ALM_SCD_MODE_REG, 0); | 1259 | iwl_write_prph(priv, ALM_SCD_MODE_REG, 0); |
1260 | 1260 | ||
1261 | /* reset TFD queues */ | 1261 | /* reset TFD queues */ |
1262 | for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) { | 1262 | for (txq_id = 0; txq_id <= priv->hw_params.max_txq_num; txq_id++) { |
1263 | iwl_write_direct32(priv, FH39_TCSR_CONFIG(txq_id), 0x0); | 1263 | iwl_write_direct32(priv, FH39_TCSR_CONFIG(txq_id), 0x0); |
1264 | iwl_poll_direct_bit(priv, FH39_TSSR_TX_STATUS, | 1264 | iwl_poll_direct_bit(priv, FH39_TSSR_TX_STATUS, |
1265 | FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(txq_id), | 1265 | FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(txq_id), |
@@ -2488,6 +2488,9 @@ int iwl3945_hw_set_hw_params(struct iwl_priv *priv) | |||
2488 | return -ENOMEM; | 2488 | return -ENOMEM; |
2489 | } | 2489 | } |
2490 | 2490 | ||
2491 | /* Assign number of Usable TX queues */ | ||
2492 | priv->hw_params.max_txq_num = TFD_QUEUE_MAX; | ||
2493 | |||
2491 | priv->hw_params.tfd_size = sizeof(struct iwl3945_tfd); | 2494 | priv->hw_params.tfd_size = sizeof(struct iwl3945_tfd); |
2492 | priv->hw_params.rx_buf_size = IWL_RX_BUF_SIZE_3K; | 2495 | priv->hw_params.rx_buf_size = IWL_RX_BUF_SIZE_3K; |
2493 | priv->hw_params.max_pkt_size = 2342; | 2496 | priv->hw_params.max_pkt_size = 2342; |