diff options
author | Abbas, Mohamed <mohamed.abbas@intel.com> | 2008-12-02 21:14:03 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-05 15:35:55 +0100 |
commit | 74221d07408c473721cce853ef4e0e66c0b326ba (patch) | |
tree | dddb0f775337cb8f00493bbb4483d6b851662cf1 /drivers/net/wireless/iwlwifi/iwl-3945.c | |
parent | iwl3945: add debugfs support (diff) | |
download | linux-74221d07408c473721cce853ef4e0e66c0b326ba.tar.xz linux-74221d07408c473721cce853ef4e0e66c0b326ba.zip |
iwl3945: Fix iwl3945 rate scaling.
3945 rate scaling was broken in recent tree. This patch fix the following:
1- Get TX response info and update rates window.
2- Rate scaling selection.
3- Flush window timer.
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
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.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 61500044f5da..d95a15fc2602 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c @@ -337,7 +337,7 @@ static void iwl3945_rx_reply_tx(struct iwl3945_priv *priv, struct iwl3945_tx_resp *tx_resp = (void *)&pkt->u.raw[0]; u32 status = le32_to_cpu(tx_resp->status); int rate_idx; - int fail, i; + int fail; if ((index >= txq->q.n_bd) || (iwl3945_x2_queue_used(&txq->q, index) == 0)) { IWL_ERROR("Read index for DMA queue txq_id (%d) index %d " @@ -356,27 +356,9 @@ static void iwl3945_rx_reply_tx(struct iwl3945_priv *priv, rate_idx -= IWL_FIRST_OFDM_RATE; fail = tx_resp->failure_frame; - for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { - int next = iwl3945_rs_next_rate(priv, rate_idx); - info->status.rates[i].idx = rate_idx; - - /* - * Put remaining into the last count as best approximation - * of saying exactly what the hardware would have done... - */ - if ((rate_idx == next) || (i == IEEE80211_TX_MAX_RATES - 1)) { - info->status.rates[i].count = fail; - break; - } - - info->status.rates[i].count = priv->retry_rate; - fail -= priv->retry_rate; - rate_idx = next; - if (fail <= 0) - break; - } - info->status.rates[i].count++; /* add final attempt */ + info->status.rates[0].idx = rate_idx; + info->status.rates[0].count = fail + 1; /* add final attempt */ /* tx_status->rts_retry_count = tx_resp->failure_rts; */ info->flags |= ((status & TX_STATUS_MSK) == TX_STATUS_SUCCESS) ? |