Lines Matching +full:per +full:- +full:rate

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting
33 * IEEE 802.11 PHY-related definitions.
57 * For drivers that don't implement per-VAP slot time
59 * between VAPs to program a single radio) - return
63 ((ic->ic_flags & IEEE80211_F_SHSLOT) ? \
67 * For drivers that implement per-VAP slot time; look
68 * at the per-VAP flags to determine whether this VAP
72 ((vap->iv_flags & IEEE80211_F_SHSLOT) ? \
89 uint32_t rateKbps; /* transfer rate in kbs */
91 * preamble in CCK rate code */
95 * rate; used for dur. calcs */
105 ieee80211_ack_rate(const struct ieee80211_rate_table *rt, uint8_t rate) in ieee80211_ack_rate() argument
108 * XXX Assert this is for a legacy rate; not for an MCS rate. in ieee80211_ack_rate()
109 * If the caller wishes to use it for a basic rate, they should in ieee80211_ack_rate()
112 KASSERT(! (rate & 0x80), ("rate %d is basic/mcs?", rate)); in ieee80211_ack_rate()
114 uint8_t cix = rt->info[rt->rateCodeToIndex[rate & IEEE80211_RATE_VAL]].ctlRateIndex; in ieee80211_ack_rate()
115 KASSERT(cix != (uint8_t)-1, ("rate %d has no info", rate)); in ieee80211_ack_rate()
116 return rt->info[cix].dot11Rate; in ieee80211_ack_rate()
120 ieee80211_ctl_rate(const struct ieee80211_rate_table *rt, uint8_t rate) in ieee80211_ctl_rate() argument
123 * XXX Assert this is for a legacy rate; not for an MCS rate. in ieee80211_ctl_rate()
124 * If the caller wishes to use it for a basic rate, they should in ieee80211_ctl_rate()
127 KASSERT(! (rate & 0x80), ("rate %d is basic/mcs?", rate)); in ieee80211_ctl_rate()
129 uint8_t cix = rt->info[rt->rateCodeToIndex[rate & IEEE80211_RATE_VAL]].ctlRateIndex; in ieee80211_ctl_rate()
130 KASSERT(cix != (uint8_t)-1, ("rate %d has no info", rate)); in ieee80211_ctl_rate()
131 return rt->info[cix].dot11Rate; in ieee80211_ctl_rate()
135 ieee80211_rate2phytype(const struct ieee80211_rate_table *rt, uint8_t rate) in ieee80211_rate2phytype() argument
138 * XXX Assert this is for a legacy rate; not for an MCS rate. in ieee80211_rate2phytype()
139 * If the caller wishes to use it for a basic rate, they should in ieee80211_rate2phytype()
142 KASSERT(! (rate & 0x80), ("rate %d is basic/mcs?", rate)); in ieee80211_rate2phytype()
144 uint8_t rix = rt->rateCodeToIndex[rate & IEEE80211_RATE_VAL]; in ieee80211_rate2phytype()
145 KASSERT(rix != (uint8_t)-1, ("rate %d has no info", rate)); in ieee80211_rate2phytype()
146 return rt->info[rix].phy; in ieee80211_rate2phytype()
150 ieee80211_isratevalid(const struct ieee80211_rate_table *rt, uint8_t rate) in ieee80211_isratevalid() argument
153 * XXX Assert this is for a legacy rate; not for an MCS rate. in ieee80211_isratevalid()
154 * If the caller wishes to use it for a basic rate, they should in ieee80211_isratevalid()
157 KASSERT(! (rate & 0x80), ("rate %d is basic/mcs?", rate)); in ieee80211_isratevalid()
159 return rt->rateCodeToIndex[rate] != (uint8_t)-1; in ieee80211_isratevalid()
164 * o non-fragment data frames
166 * sent using rate, phy and short preamble setting.
170 uint8_t rate, int isShortPreamble) in ieee80211_ack_duration() argument
172 uint8_t rix = rt->rateCodeToIndex[rate]; in ieee80211_ack_duration()
174 KASSERT(rix != (uint8_t)-1, ("rate %d has no info", rate)); in ieee80211_ack_duration()
176 KASSERT(rt->info[rix].spAckDuration != 0, in ieee80211_ack_duration()
178 return rt->info[rix].spAckDuration; in ieee80211_ack_duration()
180 KASSERT(rt->info[rix].lpAckDuration != 0, in ieee80211_ack_duration()
182 return rt->info[rix].lpAckDuration; in ieee80211_ack_duration()
188 uint8_t rate) in ieee80211_legacy_rate_lookup() argument
191 return (rt->rateCodeToIndex[rate & IEEE80211_RATE_VAL]); in ieee80211_legacy_rate_lookup()
196 * using the specified 802.11 rate code, phy, and short preamble
202 uint32_t frameLen, uint16_t rate, int isShortPreamble);
204 * Convert PLCP signal/rate field to 802.11 rate code (.5Mbits/s)
208 * Convert 802.11 rate code to PLCP signal.
213 * 802.11n rate manipulation.
221 uint16_t rate, int streams, int isht40,