Lines Matching full:rate

34  * Atsushi Onoe's rate control algorithm.
73 * Default parameters for the rate control algorithm. These are
74 * all tunable with sysctls. The rate controller runs periodically
78 * it gives a "raise rate credit". If transmits look to not be working
80 * the transmit rate is raised. Various error conditions force the
81 * the transmit rate to be dropped.
87 * the transmit rate is increased.
91 static int ath_rateinterval = 1000; /* rate ctl interval (ms) */
93 static int ath_rate_raise_threshold = 10; /* rate ctl raise threshold */
96 int rate);
133 * the returned rate with the relevant preamble rate flag.
199 ath_rate_update(struct ath_softc *sc, struct ieee80211_node *ni, int rate) in ath_rate_update() argument
208 KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode)); in ath_rate_update()
211 "%s: set xmit rate to %dM", __func__, in ath_rate_update()
213 (ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL) / 2 : 0); in ath_rate_update()
216 * Before associating a node has no rate set setup in ath_rate_update()
220 * lowest hardware rate. in ath_rate_update()
224 on->on_rix = rate; in ath_rate_update()
225 dot11rate = ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL; in ath_rate_update()
234 * Hardware supports multi-rate retry; setup two in ath_rate_update()
235 * step-down retry rates and make the lowest rate in ath_rate_update()
240 on->on_tx_try0 = 1 + 3; /* 4 tries at rate 0 */ in ath_rate_update()
241 if (--rate >= 0) { in ath_rate_update()
243 ni->ni_rates.rs_rates[rate]&IEEE80211_RATE_VAL]; in ath_rate_update()
250 if (--rate >= 0) { in ath_rate_update()
252 ni->ni_rates.rs_rates[rate]&IEEE80211_RATE_VAL]; in ath_rate_update()
259 if (rate > 0) { in ath_rate_update()
268 on->on_tx_try0 = ATH_TXMAXTRY; /* max tries at rate 0 */ in ath_rate_update()
283 * Set the starting transmit rate for a node.
288 #define RATE(_ix) (ni->ni_rates.rs_rates[(_ix)] & IEEE80211_RATE_VAL) in ath_rate_ctl_start() macro
295 * No fixed rate is requested. For 11b start with in ath_rate_ctl_start()
296 * the highest negotiated rate; otherwise, for 11g in ath_rate_ctl_start()
302 * Scan the negotiated rate set to find the in ath_rate_ctl_start()
303 * closest rate. in ath_rate_ctl_start()
305 /* NB: the rate set is assumed sorted */ in ath_rate_ctl_start()
306 for (; srate >= 0 && RATE(srate) > 72; srate--) in ath_rate_ctl_start()
311 * A fixed rate is to be used; ic_fixed_rate is the in ath_rate_ctl_start()
312 * IEEE code for this rate (sans basic bit). Convert this in ath_rate_ctl_start()
313 * to the index into the negotiated rate set for in ath_rate_ctl_start()
314 * the node. We know the rate is there because the in ath_rate_ctl_start()
315 * rate set is checked when the station associates. in ath_rate_ctl_start()
317 /* NB: the rate set is assumed sorted */ in ath_rate_ctl_start()
319 for (; srate >= 0 && RATE(srate) != tp->ucastrate; srate--) in ath_rate_ctl_start()
323 * The selected rate may not be available due to races in ath_rate_ctl_start()
325 * adhoc mode may not have any rate set so this lookup in ath_rate_ctl_start()
329 #undef RATE in ath_rate_ctl_start()
333 * Examine and potentially adjust the transmit rate.
344 * Rate control in ath_rate_ctl()
380 /* raise rate if we hit rate_raise_threshold */ in ath_rate_ctl()
410 "rate control: operation interval (ms)"); in ath_rate_sysctlattach()
414 "rate control: retry threshold to credit rate raise (%%)"); in ath_rate_sysctlattach()
417 "rate control: # good periods before raising rate"); in ath_rate_sysctlattach()