Lines Matching full:rate
86 * in "Bit-rate Selection in Wireless Networks"
89 * SampleRate chooses the bit-rate it predicts will provide the most
91 * transmission time for each bit-rate. SampleRate periodically sends
93 * another bit-rate will provide better performance. SampleRate
94 * switches to another bit-rate when its estimated per-packet
95 * transmission time becomes smaller than the current bit-rate's.
98 * currently being used. SampleRate also stops probing at a bit-rate
119 * given rate. For now this ignores SGI/LGI and will assume long-GI.
122 * (But it's also important because right now rate control doesn't set
125 * When selecting a set of rates the rate control code will iterate
129 * rate selection will closely match what the eventual formed aggregate
163 * MCS rate in the transmit schedule.
165 * Returns -1 if it's a legacy rate or no MRR.
206 * per rate is fixed, and (b) reliable packet transmission at those
207 * higher rates kinda needs a lower MCS rate in there somewhere.
211 * back to like MCS0/1 in hardware, and rate control will hopefully
214 * Once the whole rate schedule is passed into ath_rate_findrate(),
219 * current best rate..
326 if ((mask & 1) == 0) /* not a supported rate */
329 /* Don't pick a non-HT rate for a HT node */
348 /* don't use a bit-rate that has been failing */
353 * For HT, Don't use a bit rate that is more
366 "%s: size %d comparing best rate 0x%x pkts/ewma/tt (%ju/%d/%d) "
412 * Pick a good "random" bit-rate to sample other than the current one.
427 /* no successes yet, send at the lowest bit-rate */
434 rix = sn->last_sample_rix[size_bin]+1; /* next sample rate */
435 mask = sn->ratemask &~ ((uint64_t) 1<<current_rix);/* don't sample current rate */
437 if ((mask & ((uint64_t) 1<<rix)) == 0) { /* not a supported rate */
453 * selected rate is non-MCS, this won't work.
460 /* if the node is HT and the rate isn't HT, don't bother sample */
468 /* this bit-rate is always worse than the current one */
485 * This is limited to testing rate indexes on either side of
524 #define RATE(_ix) (ni->ni_rates.rs_rates[(_ix)] & IEEE80211_RATE_VAL)
538 if (RATE(srate) == tp->ucastrate)
542 #undef RATE
556 * A fixed rate is to be used; ucastrate is the IEEE code
557 * for this rate (sans basic bit). Check this against the
558 * negotiated rate set for the node. Note the fixed rate
560 * setup the static rate index if the lookup is successful.
569 * Pick a non-HT rate to begin using.
577 #define RATE(ix) (DOT11RATE(ix) / 2)
593 * Pick the highest rate <= 36 Mbps
602 #undef RATE
608 * Pick a HT rate to begin using.
618 #define RATE(ix) (DOT11RATE(ix) / 2)
630 /* Keep a copy of the last seen HT rate index */
639 * Pick a medium-speed rate at 1 spatial stream
654 #undef RATE
667 #define RATE(ix) (DOT11RATE(ix) / 2)
754 "sample rate %d %s current rate %d %s",
780 /* let the bit-rate switch quickly during the first few packets */
794 /* the current bit-rate is twice as slow as the best one */
805 * If the node is HT, it if the rate isn't the
807 * of the current rate. It can fail a little.
836 "%s: size %d switch rate %d %s (%d/%d) EWMA %d -> %d %s (%d/%d) EWMA %d after %d packets mrr %d",
890 #undef RATE
996 * transmission at this rate did not.
1004 * given rate attempt, and outside of the RTS/CTS management
1005 * rate, it doesn't /really/ help.
1034 /* Calculate percentage based on current rate */
1063 "%s: size %d %s %s rate %d %s tries (%d/%d) tt %d "
1118 * There are still some places where what rate control set as
1126 * we may continue to hit corner cases where we make a rate
1152 "%s: size %d %s rate/try %d/%d no rates yet",
1173 * Only one rate was used; optimize work.
1176 &an->an_node, "%s: size %d (%d bytes) %s rate/short/long %d %s/%d/%d nframes/nbad [%d/%d]",
1198 "%s: size %d (%d bytes) finaltsidx %d short %d long %d %s rate/try [%d %s/%d %d %s/%d %d %s/%d %d %s/%d] nframes/nbad [%d/%d]",
1297 #define RATE(_ix) (ni->ni_rates.rs_rates[(_ix)] & IEEE80211_RATE_VAL)
1305 KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
1322 * to be ignored for doing rate control.
1342 rix = sc->sc_rixmap[RATE(x)];
1349 ("rate %u has rix %d", RATE(x), rix));
1356 ieee80211_note(ni->ni_vap, "[%6D] %s: size 1600 rate/tt",
1375 /* XXX start with first valid rate */
1380 * indexed by the rate code index.
1383 if ((mask & 1) == 0) /* not a valid rate */
1410 /* set the visible bit-rate */
1414 ni->ni_txrate = RATE(0);
1415 #undef RATE
1425 * The main difference here is that we convert the rate indexes
1469 * Populate the rate table mapping TLV.
1480 * First TLV - rate code mapping
1589 int rate, error;
1591 rate = ssc->smoothing_rate;
1592 error = sysctl_handle_int(oidp, &rate, 0, req);
1595 if (!(0 <= rate && rate < 100))
1597 ssc->smoothing_rate = rate;
1598 ssc->smoothing_minpackets = 100 / (100 - rate);
1606 int rate, error;
1608 rate = ssc->sample_rate;
1609 error = sysctl_handle_int(oidp, &rate, 0, req);
1612 if (!(2 <= rate && rate <= 100))
1614 ssc->sample_rate = rate;
1627 "sample: smoothing rate for avg tx time (%%)");
1650 ssc->max_successive_failures = 3; /* threshold for rate sampling*/