Langue: en

Version: 365375 (ubuntu - 25/10/10)

Section: 9 (Appels noyau Linux)

BSD mandoc


ieee80211_amrr - 802.11 network driver transmit rate control support


In net80211/ieee80211_amrr.h Ft void Fo ieee80211_amrr_init Fa struct ieee80211_amrr * Fa struct ieee80211vap * Fa int amin Fa int amax Fa int interval Fc Ft void Fn ieee80211_amrr_cleanup struct ieee80211_amrr * Ft void Fn ieee80211_amrr_setinterval struct ieee80211_amrr * int interval Ft void Fo ieee80211_amrr_node_init Fa struct ieee80211_amrr * Fa struct ieee80211_amrr_node * Fa struct ieee80211_node * Fc Ft int Fo ieee80211_amrr_choose Fa struct ieee80211_node * Fa struct ieee80211_amrr_node * Fc Ft void Fo ieee80211_amrr_tx_complete Fa struct ieee80211_amrr_node * Fa int ok Fa int retries Fc Ft void Fo ieee80211_amrr_tx_update Fa struct ieee80211_amrr_node * Fa int txnct Fa int success Fa int retrycnt Fc  




 struct rt2560_vap {
         struct ieee80211vap     ral_vap;
         struct ieee80211_beacon_offsets ral_bo;
         struct ieee80211_amrr   amrr;
         int      (*ral_newstate)(struct ieee80211vap *,
                       enum ieee80211_state, int);

The Vt amrr structure member holds the per-vap state for and ral(4) initializes it in the vap create method with:

 ieee80211_amrr_init(&rvp->amrr, vap,
     500 /* ms */);

The node is defined as:

 struct rt2560_node {
         struct ieee80211_node   ni;
         struct ieee80211_amrr_node amrr;

with initialization done in the driver's Vt iv_newassoc method:

 static void
 rt2560_newassoc(struct ieee80211_node *ni, int isnew)
         struct ieee80211vap *vap = ni->ni_vap;
             &RT2560_NODE(ni)->amrr, ni);

Once state is setup, transmit rates are requested by calling Fn ieee80211_amrr_choose in the transmit path; e.g.:

 if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
         rate = tp->mcastrate;
 } else if (m0->m_flags & M_EAPOL) {
         rate = tp->mgmtrate;
         rate = tp->ucastrate;
 } else {
         rate = ni->ni_txrate;

Note a rate is chosen only for unicast data frames when a fixed transmit rate is not configured; the other cases are handled with the net80211 transmit parameters. Note also that Fn ieee80211_amrr_choose writes the chosen rate in Vt ni_txrate ; this eliminates copying the value as it is exported to user applications so they can display the current transmit rate in status.

The remaining work a driver must do is feed status back to when a frame transmit completes using Fn ieee80211_amrr_tx_complete . Drivers that poll a device to retrieve statistics can use Fn ieee80211_amrr_tx_update (instead or in addition).


ieee80211(9), ieee80211_output9