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) argument
67 #define RTWN_RATE_IS_OFDM(rate) \ argument
68 ((rate) >= RTWN_RIDX_OFDM6 && (rate) <= RTWN_RIDX_OFDM54)
69 #define RTWN_RATE_IS_HT(rate) \ argument
70 ((rate) >= RTWN_RIDX_HT_MCS_SHIFT && (rate) < RTWN_RIDX_VHT_MCS_SHIFT)
71 #define RTWN_RATE_IS_VHT(rate) \ argument
72 ((rate) >= RTWN_RIDX_VHT_MCS_SHIFT && (rate) <= RTWN_RIDX_COUNT)
78 rate2ridx(uint8_t rate) in rate2ridx() argument
80 if (rate & IEEE80211_RATE_MCS) { in rate2ridx()
81 return ((rate & 0xf) + RTWN_RIDX_HT_MCS_SHIFT); in rate2ridx()
83 switch (rate) { in rate2ridx()
99 printf("%s: called; unknown rate (%d)\n", __func__, rate); in rate2ridx()
108 uint8_t cix, rate; in rtwn_ctl_mcsrate() local
110 /* Check if we are using MCS rate. */ in rtwn_ctl_mcsrate()
111 KASSERT(RTWN_RATE_IS_HT(ridx), ("bad mcs rate index %d", ridx)); in rtwn_ctl_mcsrate()
113 rate = RTWN_RIDX_TO_MCS(ridx) | IEEE80211_RATE_MCS; in rtwn_ctl_mcsrate()
114 cix = rt->info[rt->rateCodeToIndex[rate]].ctlRateIndex; in rtwn_ctl_mcsrate()
115 KASSERT(cix != (uint8_t)-1, ("rate %d (%d) has no info", rate, ridx)); in rtwn_ctl_mcsrate()
125 /* Check if we are using VHT MCS rate. */ in rtwn_ctl_vhtrate()
126 KASSERT(RTWN_RATE_IS_VHT(ridx), ("bad mcs rate index %d", ridx)); in rtwn_ctl_vhtrate()