Lines Matching defs:rate
905 /* retrieve rate control algorithm context */
1239 /* quickly determine if a given rate is CCK or OFDM */
1240 #define RT2661_RATE_IS_OFDM(rate) ((rate) >= 12 && (rate) != 22)
1248 * Return the expected ack rate for a frame transmitted at rate `rate'.
1249 * XXX: this should depend on the destination node basic rate set.
1252 rt2661_ack_rate(struct ieee80211com *ic, int rate)
1254 switch (rate) {
1261 return ((ic->ic_curmode == IEEE80211_MODE_11B) ? 4 : rate);
1282 * Compute the duration (in us) needed to transmit `len' bytes at rate `rate'.
1284 * given rate. `flags' indicates whether short preamble is in use or not.
1287 rt2661_txtime(int len, int rate, uint32_t flags)
1291 if (RT2661_RATE_IS_OFDM(rate)) {
1293 txtime = (8 + 4 * len + 3 + rate - 1) / rate;
1297 txtime = (16 * len + rate - 1) / rate;
1298 if (rate != 2 && (flags & IEEE80211_F_SHPREAMBLE))
1308 rt2661_plcp_signal(int rate)
1310 switch (rate) {
1347 uint32_t flags, uint16_t xflags, int len, int rate, int ac)
1374 desc->plcp_signal = rt2661_plcp_signal(rate);
1379 if (RT2661_RATE_IS_OFDM(rate)) {
1386 plcp_length = (16 * len + rate - 1) / rate;
1387 if (rate == 22) {
1395 if (rate != 2 && (ic->ic_flags & IEEE80211_F_SHPREAMBLE))
1413 int err, off, rate;
1473 /* pickup a rate */
1475 /* multicast frames are sent at the lowest avail. rate */
1476 rate = ni->in_rates.ir_rates[0];
1478 rate = ic->ic_sup_rates[ic->ic_curmode].
1481 rate = ni->in_rates.ir_rates[ni->in_txrate];
1482 if (rate == 0)
1483 rate = 2; /* XXX should not happen */
1484 rate &= IEEE80211_RATE_VAL;
1490 rt2661_ack_rate(ic, rate), ic->ic_flags) + sc->sifs;
1495 rt2661_setup_tx_desc(sc, desc, flags, 0, pktlen, rate, 0);
1507 "sending data frame len=%u idx=%u rate=%u\n",
1508 pktlen, ring->cur, rate);
1539 int err, off, rate;
1600 /* send mgt frames at the lowest available rate */
1601 rate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2;
1607 rate, ic->ic_flags) + sc->sifs;
1618 rt2661_setup_tx_desc(sc, desc, flags, 0, pktlen, rate, RT2661_QID_MGT);
1630 "sending mgmt frame len=%u idx=%u rate=%u\n",
1631 pktlen, ring->cur, rate);
1664 #define RV(rate) ((rate) & IEEE80211_RATE_VAL)
1692 "increase rate = %d, #tx = %d, #retries = %d\n",
1713 "decrease rate = %d, #tx = %d, #retries = %d\n",
1780 * Enable multi-rate retries for frames sent at OFDM rates.
1818 /* update basic rate set */
1884 /* set rate to some reasonable initial value */
1968 * various settings like rate control statistics or Rx sensitivity.
2046 /* fake a join to init the tx rate */