aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath5k/base.c')
-rw-r--r--drivers/net/wireless/ath5k/base.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 44401f6f578d..3773d983ea66 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -541,8 +541,8 @@ ath5k_pci_probe(struct pci_dev *pdev,
541 541
542 /* set up multi-rate retry capabilities */ 542 /* set up multi-rate retry capabilities */
543 if (sc->ah->ah_version == AR5K_AR5212) { 543 if (sc->ah->ah_version == AR5K_AR5212) {
544 hw->max_altrates = 3; 544 hw->max_rates = 4;
545 hw->max_altrate_tries = 11; 545 hw->max_rate_tries = 11;
546 } 546 }
547 547
548 /* Finish private driver data initialization */ 548 /* Finish private driver data initialization */
@@ -1181,7 +1181,7 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
1181 ieee80211_get_hdrlen_from_skb(skb), AR5K_PKT_TYPE_NORMAL, 1181 ieee80211_get_hdrlen_from_skb(skb), AR5K_PKT_TYPE_NORMAL,
1182 (sc->power_level * 2), 1182 (sc->power_level * 2),
1183 ieee80211_get_tx_rate(sc->hw, info)->hw_value, 1183 ieee80211_get_tx_rate(sc->hw, info)->hw_value,
1184 info->control.retry_limit, keyidx, 0, flags, 0, 0); 1184 info->control.rates[0].count, keyidx, 0, flags, 0, 0);
1185 if (ret) 1185 if (ret)
1186 goto err_unmap; 1186 goto err_unmap;
1187 1187
@@ -1193,7 +1193,7 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
1193 break; 1193 break;
1194 1194
1195 mrr_rate[i] = rate->hw_value; 1195 mrr_rate[i] = rate->hw_value;
1196 mrr_tries[i] = info->control.retries[i].limit; 1196 mrr_tries[i] = info->control.rates[i + 1].count;
1197 } 1197 }
1198 1198
1199 ah->ah_setup_mrr_tx_desc(ah, ds, 1199 ah->ah_setup_mrr_tx_desc(ah, ds,
@@ -1849,30 +1849,26 @@ ath5k_tx_processq(struct ath5k_softc *sc, struct ath5k_txq *txq)
1849 pci_unmap_single(sc->pdev, bf->skbaddr, skb->len, 1849 pci_unmap_single(sc->pdev, bf->skbaddr, skb->len,
1850 PCI_DMA_TODEVICE); 1850 PCI_DMA_TODEVICE);
1851 1851
1852 memset(&info->status, 0, sizeof(info->status)); 1852 ieee80211_tx_info_clear_status(info);
1853 info->tx_rate_idx = ath5k_hw_to_driver_rix(sc,
1854 ts.ts_rate[ts.ts_final_idx]);
1855 info->status.retry_count = ts.ts_longretry;
1856
1857 for (i = 0; i < 4; i++) { 1853 for (i = 0; i < 4; i++) {
1858 struct ieee80211_tx_altrate *r = 1854 struct ieee80211_tx_rate *r =
1859 &info->status.retries[i]; 1855 &info->status.rates[i];
1860 1856
1861 if (ts.ts_rate[i]) { 1857 if (ts.ts_rate[i]) {
1862 r->rate_idx = ath5k_hw_to_driver_rix(sc, ts.ts_rate[i]); 1858 r->idx = ath5k_hw_to_driver_rix(sc, ts.ts_rate[i]);
1863 r->limit = ts.ts_retry[i]; 1859 r->count = ts.ts_retry[i];
1864 } else { 1860 } else {
1865 r->rate_idx = -1; 1861 r->idx = -1;
1866 r->limit = 0; 1862 r->count = 0;
1867 } 1863 }
1868 } 1864 }
1869 1865
1870 info->status.excessive_retries = 0; 1866 /* count the successful attempt as well */
1867 info->status.rates[ts.ts_final_idx].count++;
1868
1871 if (unlikely(ts.ts_status)) { 1869 if (unlikely(ts.ts_status)) {
1872 sc->ll_stats.dot11ACKFailureCount++; 1870 sc->ll_stats.dot11ACKFailureCount++;
1873 if (ts.ts_status & AR5K_TXERR_XRETRY) 1871 if (ts.ts_status & AR5K_TXERR_FILT)
1874 info->status.excessive_retries = 1;
1875 else if (ts.ts_status & AR5K_TXERR_FILT)
1876 info->flags |= IEEE80211_TX_STAT_TX_FILTERED; 1872 info->flags |= IEEE80211_TX_STAT_TX_FILTERED;
1877 } else { 1873 } else {
1878 info->flags |= IEEE80211_TX_STAT_ACK; 1874 info->flags |= IEEE80211_TX_STAT_ACK;