diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index ba7e720e73c1..2399328e8de7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -293,7 +293,7 @@ static void iwl3945_tx_queue_reclaim(struct iwl_priv *priv, | |||
293 | if (iwl_queue_space(q) > q->low_mark && (txq_id >= 0) && | 293 | if (iwl_queue_space(q) > q->low_mark && (txq_id >= 0) && |
294 | (txq_id != IWL_CMD_QUEUE_NUM) && | 294 | (txq_id != IWL_CMD_QUEUE_NUM) && |
295 | priv->mac80211_registered) | 295 | priv->mac80211_registered) |
296 | ieee80211_wake_queue(priv->hw, txq_id); | 296 | iwl_wake_queue(priv, txq_id); |
297 | } | 297 | } |
298 | 298 | ||
299 | /** | 299 | /** |
@@ -747,11 +747,6 @@ void iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq) | |||
747 | int i; | 747 | int i; |
748 | int counter; | 748 | int counter; |
749 | 749 | ||
750 | /* classify bd */ | ||
751 | if (txq->q.id == IWL_CMD_QUEUE_NUM) | ||
752 | /* nothing to cleanup after for host commands */ | ||
753 | return; | ||
754 | |||
755 | /* sanity check */ | 750 | /* sanity check */ |
756 | counter = TFD_CTL_COUNT_GET(le32_to_cpu(tfd->control_flags)); | 751 | counter = TFD_CTL_COUNT_GET(le32_to_cpu(tfd->control_flags)); |
757 | if (counter > NUM_TFD_CHUNKS) { | 752 | if (counter > NUM_TFD_CHUNKS) { |
@@ -1046,7 +1041,7 @@ static int iwl3945_txq_ctx_reset(struct iwl_priv *priv) | |||
1046 | goto error; | 1041 | goto error; |
1047 | 1042 | ||
1048 | /* Tx queue(s) */ | 1043 | /* Tx queue(s) */ |
1049 | for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) { | 1044 | for (txq_id = 0; txq_id <= priv->hw_params.max_txq_num; txq_id++) { |
1050 | slots_num = (txq_id == IWL_CMD_QUEUE_NUM) ? | 1045 | slots_num = (txq_id == IWL_CMD_QUEUE_NUM) ? |
1051 | TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS; | 1046 | TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS; |
1052 | rc = iwl_tx_queue_init(priv, &priv->txq[txq_id], slots_num, | 1047 | rc = iwl_tx_queue_init(priv, &priv->txq[txq_id], slots_num, |
@@ -1184,7 +1179,7 @@ int iwl3945_hw_nic_init(struct iwl_priv *priv) | |||
1184 | IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n", rev_id); | 1179 | IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n", rev_id); |
1185 | 1180 | ||
1186 | rc = priv->cfg->ops->lib->apm_ops.set_pwr_src(priv, IWL_PWR_SRC_VMAIN); | 1181 | rc = priv->cfg->ops->lib->apm_ops.set_pwr_src(priv, IWL_PWR_SRC_VMAIN); |
1187 | if(rc) | 1182 | if (rc) |
1188 | return rc; | 1183 | return rc; |
1189 | 1184 | ||
1190 | priv->cfg->ops->lib->apm_ops.config(priv); | 1185 | priv->cfg->ops->lib->apm_ops.config(priv); |
@@ -1239,8 +1234,12 @@ void iwl3945_hw_txq_ctx_free(struct iwl_priv *priv) | |||
1239 | int txq_id; | 1234 | int txq_id; |
1240 | 1235 | ||
1241 | /* Tx queues */ | 1236 | /* Tx queues */ |
1242 | for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) | 1237 | for (txq_id = 0; txq_id <= priv->hw_params.max_txq_num; txq_id++) |
1243 | iwl_tx_queue_free(priv, txq_id); | 1238 | if (txq_id == IWL_CMD_QUEUE_NUM) |
1239 | iwl_cmd_queue_free(priv); | ||
1240 | else | ||
1241 | iwl_tx_queue_free(priv, txq_id); | ||
1242 | |||
1244 | } | 1243 | } |
1245 | 1244 | ||
1246 | void iwl3945_hw_txq_ctx_stop(struct iwl_priv *priv) | 1245 | void iwl3945_hw_txq_ctx_stop(struct iwl_priv *priv) |
@@ -1259,7 +1258,7 @@ void iwl3945_hw_txq_ctx_stop(struct iwl_priv *priv) | |||
1259 | iwl_write_prph(priv, ALM_SCD_MODE_REG, 0); | 1258 | iwl_write_prph(priv, ALM_SCD_MODE_REG, 0); |
1260 | 1259 | ||
1261 | /* reset TFD queues */ | 1260 | /* reset TFD queues */ |
1262 | for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) { | 1261 | 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); | 1262 | iwl_write_direct32(priv, FH39_TCSR_CONFIG(txq_id), 0x0); |
1264 | iwl_poll_direct_bit(priv, FH39_TSSR_TX_STATUS, | 1263 | iwl_poll_direct_bit(priv, FH39_TSSR_TX_STATUS, |
1265 | FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(txq_id), | 1264 | FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(txq_id), |
@@ -2488,6 +2487,9 @@ int iwl3945_hw_set_hw_params(struct iwl_priv *priv) | |||
2488 | return -ENOMEM; | 2487 | return -ENOMEM; |
2489 | } | 2488 | } |
2490 | 2489 | ||
2490 | /* Assign number of Usable TX queues */ | ||
2491 | priv->hw_params.max_txq_num = TFD_QUEUE_MAX; | ||
2492 | |||
2491 | priv->hw_params.tfd_size = sizeof(struct iwl3945_tfd); | 2493 | priv->hw_params.tfd_size = sizeof(struct iwl3945_tfd); |
2492 | priv->hw_params.rx_buf_size = IWL_RX_BUF_SIZE_3K; | 2494 | priv->hw_params.rx_buf_size = IWL_RX_BUF_SIZE_3K; |
2493 | priv->hw_params.max_pkt_size = 2342; | 2495 | priv->hw_params.max_pkt_size = 2342; |