Lines Matching full:rate
24 /* HW rate indices. */
59 * The total amount of rate indexes, CCK, OFDM, HT MCS0..31,
66 #define RTWN_RATE_IS_CCK(rate) ((rate) <= RTWN_RIDX_CCK11)
67 #define RTWN_RATE_IS_OFDM(rate) \
68 ((rate) >= RTWN_RIDX_OFDM6 && (rate) <= RTWN_RIDX_OFDM54)
69 #define RTWN_RATE_IS_HT(rate) \
70 ((rate) >= RTWN_RIDX_HT_MCS_SHIFT && (rate) < RTWN_RIDX_VHT_MCS_SHIFT)
71 #define RTWN_RATE_IS_VHT(rate) \
72 ((rate) >= RTWN_RIDX_VHT_MCS_SHIFT && (rate) <= RTWN_RIDX_COUNT)
78 rate2ridx(uint8_t rate)
80 if (rate & IEEE80211_RATE_MCS) {
81 return ((rate & 0xf) + RTWN_RIDX_HT_MCS_SHIFT);
83 switch (rate) {
99 printf("%s: called; unknown rate (%d)\n", __func__, rate);
108 uint8_t cix, rate;
110 /* Check if we are using MCS rate. */
111 KASSERT(RTWN_RATE_IS_HT(ridx), ("bad mcs rate index %d", ridx));
113 rate = RTWN_RIDX_TO_MCS(ridx) | IEEE80211_RATE_MCS;
114 cix = rt->info[rt->rateCodeToIndex[rate]].ctlRateIndex;
115 KASSERT(cix != (uint8_t)-1, ("rate %d (%d) has no info", rate, ridx));
125 /* Check if we are using VHT MCS rate. */
126 KASSERT(RTWN_RATE_IS_VHT(ridx), ("bad mcs rate index %d", ridx));