Lines Matching defs:RATE
48 * Atsushi Onoe's rate control algorithm.
87 ATH_DEBUG_RATE = 0x00000010, /* rate control */
98 * Default parameters for the rate control algorithm. These are
99 * all tunable with sysctls. The rate controller runs periodically
103 * it gives a "raise rate credit". If transmits look to not be working
105 * the transmit rate is raised. Various error conditions force the
106 * the transmit rate to be dropped.
112 * the transmit rate is increased.
116 static int ath_rateinterval = 1000; /* rate ctl interval (ms) */
118 static int ath_rate_raise_threshold = 10; /* rate ctl raise threshold */
122 int rate);
188 ath_rate_update(struct ath_softc *sc, struct ieee80211_node *ni, int rate)
195 KASSERTMSG(rt != NULL, "no rate table, mode %u", sc->sc_curmode);
197 DPRINTF(sc, "%s: set xmit rate for %s to %dM\n",
200 (ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL) / 2 : 0);
202 ni->ni_txrate = rate;
204 * Before associating a node has no rate set setup
208 * lowest hardware rate.
213 ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL];
220 * Hardware supports multi-rate retry; setup two
221 * step-down retry rates and make the lowest rate
226 on->on_tx_try0 = 1 + 3; /* 4 tries at rate 0 */
227 if (--rate >= 0) {
229 ni->ni_rates.rs_rates[rate]&IEEE80211_RATE_VAL];
236 if (--rate >= 0) {
238 ni->ni_rates.rs_rates[rate]&IEEE80211_RATE_VAL];
245 if (rate > 0) {
254 on->on_tx_try0 = ATH_TXMAXTRY; /* max tries at rate 0 */
264 * Set the starting transmit rate for a node.
269 #define RATE(_ix) (ni->ni_rates.rs_rates[(_ix)] & IEEE80211_RATE_VAL)
276 * No fixed rate is requested. For 11b start with
277 * the highest negotiated rate; otherwise, for 11g
283 * Scan the negotiated rate set to find the
284 * closest rate.
286 /* NB: the rate set is assumed sorted */
287 for (; srate >= 0 && RATE(srate) > 72; srate--)
289 KASSERTMSG(srate >= 0, "bogus rate set");
293 * A fixed rate is to be used; ic_fixed_rate is an
294 * index into the supported rate set. Convert this
295 * to the index into the negotiated rate set for
296 * the node. We know the rate is there because the
297 * rate set is checked when the station associates.
302 /* NB: the rate set is assumed sorted */
304 for (; srate >= 0 && RATE(srate) != r; srate--)
307 "fixed rate %d not in rate set", ic->ic_fixed_rate);
310 #undef RATE
322 * Reset the rate control state for each 802.11 state transition.
351 * tx rate state of each node.
360 * Start the background rate control thread if we
361 * are not configured to use a fixed xmit rate.
372 * Examine and potentially adjust the transmit rate.
383 * Rate control
420 /* raise rate if we hit rate_raise_threshold */
476 "rate control: operation interval (ms)", rateinterval);
479 "rate control: retry threshold to credit rate raise (%%)",
482 "rate control: # good periods before raising rate",