Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #258: madwifi-ng_sample-rate.patch

File madwifi-ng_sample-rate.patch, 1.8 kB (added by Stijn Tintel <stijn@linux-ipv6.be>, 14 years ago)

This patch contains two minor updates to the sample rate algorithm from http://people.freebsd.org/~sam/ath.patch

  • madwifi-ng/ath_rate/sample/sample.c

    old new  
    273273        int ndx, size_bin, mrr, best_ndx, change_rates; 
    274274        unsigned average_tx_time; 
    275275 
    276         mrr = sc->sc_mrretry && !(ic->ic_flags & IEEE80211_F_USEPROT) && ENABLE_MRR
     276        mrr = sc->sc_mrretry && !(ic->ic_flags & IEEE80211_F_USEPROT)
    277277        size_bin = size_to_bin(frameLen); 
    278278        best_ndx = best_rate_ndx(sn, size_bin, !mrr); 
    279279 
     
    526526                return; 
    527527        } 
    528528 
    529         mrr = sc->sc_mrretry && !(ic->ic_flags & IEEE80211_F_USEPROT) && ENABLE_MRR; 
    530  
     529        mrr = sc->sc_mrretry && !(ic->ic_flags & IEEE80211_F_USEPROT); 
    531530 
    532531        if (sc->sc_mrretry && ds->ds_txstat.ts_status) { 
    533532                /* this packet failed */ 
     
    738737                                                          sn->rates[x].rix, 
    739738                                                          0, 0); 
    740739                        sn->stats[y][x].average_tx_time = sn->stats[y][x].perfect_tx_time; 
    741  
    742740                } 
    743741 
    744742                /* set the initial rate */ 
     
    754752                sn->num_rates, 
    755753                sn->rates[0].rate/2, sn->rates[0].rate % 0x1 ? ".5" : "", 
    756754                sn->stats[1][0].perfect_tx_time, 
    757                 sn->rates[sn->num_rates-1].rate/2, sn->rates[sn->num_rates-1].rate % 0x1 ? ".5" : "", 
     755                sn->rates[sn->num_rates-1].rate/2, 
     756                        sn->rates[sn->num_rates-1].rate % 0x1 ? ".5" : "", 
    758757                sn->stats[1][sn->num_rates-1].perfect_tx_time 
    759758                ); 
    760759 
  • madwifi-ng/ath_rate/sample/sample.h

    old new  
    203203        int x = 0; 
    204204        int cw = WIFI_CW_MIN; 
    205205        int cix = rt->info[rix].controlRate; 
     206 
    206207        KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode)); 
    207208 
    208209        if (!rt->info[rix].rateKbps) {