Lines Matching +full:rates +full:- +full:mcs

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
109 (ATH_AGGR_MINPLEN - (_len) - ATH_AGGR_DELIM_SZ) : 0) >> 2)
111 #define PADBYTES(_len) ((4 - ((_len) % 4)) % 4)
170 #define NUM_SYMBOLS_PER_USEC_HALFGI(_usec) (((_usec*5)-4)/18)
178 { 104, 216 }, // 3: 16-QAM 1/2
179 { 156, 324 }, // 4: 16-QAM 3/4
180 { 208, 432 }, // 5: 64-QAM 2/3
181 { 234, 486 }, // 6: 64-QAM 3/4
182 { 260, 540 }, // 7: 64-QAM 5/6
186 { 208, 432 }, // 11: 16-QAM 1/2
187 { 312, 648 }, // 12: 16-QAM 3/4
188 { 416, 864 }, // 13: 64-QAM 2/3
189 { 468, 972 }, // 14: 64-QAM 3/4
190 { 520, 1080 }, // 15: 64-QAM 5/6
194 { 312, 648 }, // 19: 16-QAM 1/2
195 { 468, 972 }, // 20: 16-QAM 3/4
196 { 624, 1296 }, // 21: 64-QAM 2/3
197 { 702, 1458 }, // 22: 64-QAM 3/4
198 { 780, 1620 }, // 23: 64-QAM 5/6
202 { 416, 864 }, // 27: 16-QAM 1/2
203 { 624, 1296 }, // 28: 16-QAM 3/4
204 { 832, 1728 }, // 29: 64-QAM 2/3
205 { 936, 1944 }, // 30: 64-QAM 3/4
206 { 1040, 2160 }, // 31: 64-QAM 5/6
224 struct ieee80211_node *ni = bf->bf_node; in ath_tx_rate_fill_rcflags()
225 struct ieee80211com *ic = ni->ni_ic; in ath_tx_rate_fill_rcflags()
226 const HAL_RATE_TABLE *rt = sc->sc_currates; in ath_tx_rate_fill_rcflags()
227 struct ath_rc_series *rc = bf->bf_state.bfs_rc; in ath_tx_rate_fill_rcflags()
237 * It's a global flag, not a per-try flag, so we clear in ath_tx_rate_fill_rcflags()
241 if ((ni->ni_vap->iv_flags_ht & IEEE80211_FHT_LDPC_TX) && in ath_tx_rate_fill_rcflags()
242 (ni->ni_htcap & IEEE80211_HTCAP_LDPC)) in ath_tx_rate_fill_rcflags()
249 if (bf->bf_flags & ATH_BUF_TOA_PROBE) in ath_tx_rate_fill_rcflags()
259 rate = rt->info[rc[i].rix].rateCode; in ath_tx_rate_fill_rcflags()
262 * Only enable short preamble for legacy rates in ath_tx_rate_fill_rcflags()
264 if ((! IS_HT_RATE(rate)) && bf->bf_state.bfs_shpream) in ath_tx_rate_fill_rcflags()
265 rate |= rt->info[rc[i].rix].shortPreamble; in ath_tx_rate_fill_rcflags()
272 if (bf->bf_state.bfs_txflags & in ath_tx_rate_fill_rcflags()
282 /* Only enable shortgi, 2040, dual-stream if HT is set */ in ath_tx_rate_fill_rcflags()
286 if (ni->ni_chw == IEEE80211_STA_RX_BW_40) in ath_tx_rate_fill_rcflags()
290 * NOTE: Don't do short-gi for positioning frames. in ath_tx_rate_fill_rcflags()
298 if (ni->ni_chw == IEEE80211_STA_RX_BW_40 && in ath_tx_rate_fill_rcflags()
300 (bf->bf_flags & ATH_BUF_TOA_PROBE) == 0) { in ath_tx_rate_fill_rcflags()
304 if (ni->ni_chw == IEEE80211_STA_RX_BW_20 && in ath_tx_rate_fill_rcflags()
306 (bf->bf_flags & ATH_BUF_TOA_PROBE) == 0) { in ath_tx_rate_fill_rcflags()
313 * MCS 0-7, AND we have at least two chains enabled, in ath_tx_rate_fill_rcflags()
316 if (ic->ic_htcaps & IEEE80211_HTCAP_TXSTBC && in ath_tx_rate_fill_rcflags()
317 (ni->ni_vap->iv_flags_ht & IEEE80211_FHT_STBC_TX) && in ath_tx_rate_fill_rcflags()
318 (ni->ni_htcap & IEEE80211_HTCAP_RXSTBC) && in ath_tx_rate_fill_rcflags()
319 (sc->sc_cur_txchainmask > 1) && in ath_tx_rate_fill_rcflags()
321 (bf->bf_flags & ATH_BUF_TOA_PROBE) == 0) { in ath_tx_rate_fill_rcflags()
343 * on the MCS rate, SGI and channel width flags. in ath_tx_rate_fill_rcflags()
372 bf->bf_state.bfs_txflags |= HAL_TXDESC_LDPC; in ath_tx_rate_fill_rcflags()
373 sc->sc_stats.ast_tx_ldpc++; in ath_tx_rate_fill_rcflags()
377 sc->sc_stats.ast_tx_stbc++; in ath_tx_rate_fill_rcflags()
394 * TODO: ensure this is only called for MCS rates.
396 * TODO: enforce MCS < 31
402 const HAL_RATE_TABLE *rt = sc->sc_currates; in ath_compute_num_delims()
403 struct ieee80211_node *ni = first_bf->bf_node; in ath_compute_num_delims()
418 * Convert the A-MPDU density net80211 value to a 1/100 microsecond in ath_compute_num_delims()
431 * crypto hardware catch up. This could be tuned per-MAC and in ath_compute_num_delims()
432 * per-rate, but for now we'll simply assume encryption is in ath_compute_num_delims()
436 * delimiters by default for pre-AR9380 peers. This will in ath_compute_num_delims()
446 * this exchange, and (b) (done) this is the first sub-frame in ath_compute_num_delims()
449 if (sc->sc_use_ent && (sc->sc_ent_cfg & AH_ENT_RTSCTS_DELIM_WAR) in ath_compute_num_delims()
454 * If sc_delim_min_pad is non-zero, enforce it as the minimum in ath_compute_num_delims()
457 if (sc->sc_delim_min_pad != 0) in ath_compute_num_delims()
458 ndelim = MAX(ndelim, sc->sc_delim_min_pad); in ath_compute_num_delims()
478 rix = first_bf->bf_state.bfs_rc[0].rix; in ath_compute_num_delims()
479 rc = rt->info[rix].rateCode; in ath_compute_num_delims()
480 flags = first_bf->bf_state.bfs_rc[0].flags; in ath_compute_num_delims()
504 mindelim = (minlen - pktlen) / ATH_AGGR_DELIM_SZ; in ath_compute_num_delims()
544 * and per-peer limits in non-STA mode.
553 /* Extract out the maximum configured driver A-MPDU limit */ in ath_get_aggr_limit()
554 if (sc->sc_aggr_limit > 0 && sc->sc_aggr_limit < ATH_AGGR_MAXSIZE) in ath_get_aggr_limit()
555 amin = sc->sc_aggr_limit; in ath_get_aggr_limit()
562 if (bf->bf_state.bfs_rc[i].tries == 0) in ath_get_aggr_limit()
564 amin = MIN(amin, bf->bf_state.bfs_rc[i].max4msframelen); in ath_get_aggr_limit()
571 sc->sc_aggr_limit, in ath_get_aggr_limit()
572 ni->ni_vap->iv_ampdu_limit, in ath_get_aggr_limit()
573 _IEEE80211_MASKSHIFT(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU), in ath_get_aggr_limit()
582 * This should be called for both legacy and MCS rates.
586 * It, along with ath_buf_set_rate, must be called -after- a burst
593 struct ieee80211com *ic = ni->ni_ic; in ath_rateseries_setup()
594 struct ath_hal *ah = sc->sc_ah; in ath_rateseries_setup()
596 const HAL_RATE_TABLE *rt = sc->sc_currates; in ath_rateseries_setup()
599 struct ath_rc_series *rc = bf->bf_state.bfs_rc; in ath_rateseries_setup()
601 if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) && in ath_rateseries_setup()
602 (ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_PREAMBLE)) in ath_rateseries_setup()
609 if (bf->bf_state.bfs_aggr) in ath_rateseries_setup()
610 pktlen = bf->bf_state.bfs_al; in ath_rateseries_setup()
612 pktlen = bf->bf_state.bfs_pktlen; in ath_rateseries_setup()
628 * transmit 1/2 stream rates on two streams. in ath_rateseries_setup()
633 series[i].ChSel = sc->sc_cur_txchainmask; in ath_rateseries_setup()
638 series[i].Rate = rt->info[rc[i].rix].rateCode; in ath_rateseries_setup()
663 * TODO: If we're all doing 11n rates then we can set LDPC. in ath_rateseries_setup()
669 * PktDuration doesn't include slot, ACK, RTS, etc timing - in ath_rateseries_setup()
682 rt->info[rc[i].rix].shortPreamble; in ath_rateseries_setup()
696 device_printf(sc->sc_dev ,"series %d: rate %x; tries %d; " in ath_rateseries_print()
721 struct ath_desc *ds = bf->bf_desc; in ath_buf_set_rate()
722 struct ath_hal *ah = sc->sc_ah; in ath_buf_set_rate()
723 int is_pspoll = (bf->bf_state.bfs_atype == HAL_PKT_TYPE_PSPOLL); in ath_buf_set_rate()
724 int ctsrate = bf->bf_state.bfs_ctsrate; in ath_buf_set_rate()
725 int flags = bf->bf_state.bfs_txflags; in ath_buf_set_rate()
733 if (sc->sc_debug & ATH_DEBUG_XMIT) in ath_buf_set_rate()
740 * ps-poll packets. in ath_buf_set_rate()
752 * ie, if there's a second frame in a RIFS or A-MPDU burst in ath_buf_set_rate()
753 * w/ >1 A-MPDU frame bursting back to back. in ath_buf_set_rate()
754 * Normal A-MPDU doesn't do bursting -between- aggregates. in ath_buf_set_rate()
770 * + Maximum number of sub-frames for an aggregate
778 * ath_tx_setds_11n() will take care of configuring the per-
790 * So if you want to call this from an upper layer context (eg, to direct-
797 //struct ieee80211_node *ni = &an->an_node; in ath_tx_form_aggr()
808 tap = ath_tx_get_tx_tid(an, tid->tid); in ath_tx_form_aggr()
815 * Limit the maximum number of frames in this A-MPDU in ath_tx_form_aggr()
818 * when operating in higher MCS rates. If there are more in ath_tx_form_aggr()
819 * frames available to send then up to two A-MPDUs will in ath_tx_form_aggr()
821 * a second A-MPDU. in ath_tx_form_aggr()
823 h_baw = tap->txa_wnd / 2; in ath_tx_form_aggr()
838 aggr_limit = ath_get_aggr_limit(sc, &an->an_node, in ath_tx_form_aggr()
840 if (bf_first->bf_state.bfs_rc_maxpktlen > 0) { in ath_tx_form_aggr()
842 bf_first->bf_state.bfs_rc_maxpktlen); in ath_tx_form_aggr()
847 bf->bf_next = NULL; in ath_tx_form_aggr()
856 if (! bf->bf_state.bfs_dobaw) { in ath_tx_form_aggr()
862 * If any of the rates are non-HT, this packet in ath_tx_form_aggr()
865 * if any active rate is non-HT. in ath_tx_form_aggr()
871 al_delta = ATH_AGGR_DELIM_SZ + bf->bf_state.bfs_pktlen; in ath_tx_form_aggr()
882 if (bf_first->bf_state.bfs_txflags & in ath_tx_form_aggr()
885 (sc->sc_rts_aggr_limit < in ath_tx_form_aggr()
907 bf->bf_state.bfs_txflags &= in ath_tx_form_aggr()
909 bf->bf_state.bfs_txflags |= in ath_tx_form_aggr()
910 bf_first->bf_state.bfs_txflags & in ath_tx_form_aggr()
916 * step outside of the block-ack window. in ath_tx_form_aggr()
918 if (! BAW_WITHIN(tap->txa_start, tap->txa_wnd, in ath_tx_form_aggr()
919 SEQNO(bf->bf_state.bfs_seqno))) { in ath_tx_form_aggr()
931 bf->bf_state.bfs_addedbaw = 1; in ath_tx_form_aggr()
937 if (bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) { in ath_tx_form_aggr()
938 device_printf(sc->sc_dev, in ath_tx_form_aggr()
941 bf->bf_state.bfs_txflags &= (~HAL_TXDESC_NOACK); in ath_tx_form_aggr()
953 bf->bf_comp = ath_tx_aggr_comp; in ath_tx_form_aggr()
963 bf->bf_state.bfs_ndelim = in ath_tx_form_aggr()
965 bf->bf_state.bfs_pktlen, (bf_first == bf)); in ath_tx_form_aggr()
972 bpad = PADBYTES(al_delta) + (bf->bf_state.bfs_ndelim << 2); in ath_tx_form_aggr()
978 bf_prev->bf_next = bf; in ath_tx_form_aggr()
986 if (tid->an->an_leak_count) { in ath_tx_form_aggr()
995 if (bf->bf_state.bfs_pktlen < ATH_AGGR_MINPLEN) { in ath_tx_form_aggr()
1010 __func__, al, bf_first->bf_state.bfs_rc_maxpktlen); in ath_tx_form_aggr()
1012 bf_first->bf_state.bfs_al = al; in ath_tx_form_aggr()
1013 bf_first->bf_state.bfs_nframes = nframes; in ath_tx_form_aggr()