Changes between Initial Version and Version 1 of Internal/WinlabMadwifi/RateControl


Ignore:
Timestamp:
Nov 11, 2005, 9:31:31 PM (19 years ago)
Author:
zhibinwu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/WinlabMadwifi/RateControl

    v1 v1  
     1WinlabMadwifi-> Introduction to Rate Control
     2
     3= Rate Control =
     4General Information could be found in this [http://madwifi.org/wiki/UserDocs/RateControl link].
     5
     6Rate control, or rate adaptation, is a technique to adapt PHY channel rate in sender node. With the help of either some explicit feedback from recever (ACK frames) or implicit information (RSSI), the sender infers channel quality and choose a proper modulation scheme for next outgoing packet to maintain acceptable BER(PER) performance.
     7
     8Files involved for rate control:
     9
     10 * ath/if_ath.c
     11 * ath/if_athrate.h 
     12 * ath_rate/amrr/amrr.h
     13 * ath_rate/amrr/amrr.c
     14 * ath_rate/onoe/onoe.h
     15 * ath_rate/onoe/onoe.c
     16 * ath_rate/sample/sample.h
     17 * ath_rate/sample/sample.c
     18
     19== Main interfaces in if_ath.c ==
     20
     21=== When the rate is determined? ===
     22when a packet is xmitted, a rate has to be determined associate with this packet. This is done by ''ath_tx_start(struct net_device *dev, struct ieee80211_node *ni, struct ath_buf *bf, struct sk_buff *skb)'' function.
     23{{{
     24                        if (ic->ic_fixed_rate == -1) {
     25                                /*
     26                                 * Data frames; consult the rate control module.
     27                                 */
     28                                ath_rate_findrate(sc, an, shortPreamble, pktlen,
     29                                          &rix, &try0, &txrate);
     30                        }
     31                        else {
     32                                rix = ic->ic_fixed_rate;
     33                                try0 = ATH_TXMAXTRY; //XXX: should be configurabe
     34                                if (shortPreamble)
     35                                        txrate = rt->info[rix].shortPreamble;
     36                                else
     37                                        txrate = rt->info[rix].rateCode;
     38                        }
     39
     40}}}
     41
     42=== When statistics are collected? ===
     43
     44After the packet is transmitted, function
     45  ''ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)'' is executed. In this function,
     46{{{
     47   sr = ds->ds_txstat.ts_shortretry;
     48   lr = ds->ds_txstat.ts_longretry;
     49   sc->sc_stats.ast_tx_shortretry += sr;
     50   sc->sc_stats.ast_tx_longretry += lr;
     51   /*
     52    * Hand the descriptor to the rate control algorithm.
     53    */
     54    if ((ds->ds_txstat.ts_status & HAL_TXERR_FILT) == 0 &&
     55    (bf->bf_flags & HAL_TXDESC_NOACK) == 0)
     56             ath_rate_tx_complete(sc, an, ds);
     57}}}
     58
     59''sc'' contains updated statistics and will be read by rate control module.
     60
     61== The purpose of a rate-control module? ==