Lines Matching +full:cts +full:- +full:override
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;
225 struct ieee80211com *ic = ni->ni_ic;
226 const HAL_RATE_TABLE *rt = sc->sc_currates;
227 struct ath_rc_series *rc = bf->bf_state.bfs_rc;
237 * It's a global flag, not a per-try flag, so we clear
241 if ((ni->ni_vap->iv_flags_ht & IEEE80211_FHT_LDPC_TX) &&
242 (ni->ni_htcap & IEEE80211_HTCAP_LDPC))
249 if (bf->bf_flags & ATH_BUF_TOA_PROBE)
259 rate = rt->info[rc[i].rix].rateCode;
264 if ((! IS_HT_RATE(rate)) && bf->bf_state.bfs_shpream)
265 rate |= rt->info[rc[i].rix].shortPreamble;
272 if (bf->bf_state.bfs_txflags &
282 /* Only enable shortgi, 2040, dual-stream if HT is set */
286 if (ni->ni_chw == IEEE80211_STA_RX_BW_40)
290 * NOTE: Don't do short-gi for positioning frames.
298 if (ni->ni_chw == IEEE80211_STA_RX_BW_40 &&
300 (bf->bf_flags & ATH_BUF_TOA_PROBE) == 0) {
304 if (ni->ni_chw == IEEE80211_STA_RX_BW_40 &&
306 (bf->bf_flags & ATH_BUF_TOA_PROBE) == 0) {
313 * MCS 0-7, AND we have at least two chains enabled,
316 if (ic->ic_htcaps & IEEE80211_HTCAP_TXSTBC &&
317 (ni->ni_vap->iv_flags_ht & IEEE80211_FHT_STBC_TX) &&
318 (ni->ni_htcap & IEEE80211_HTCAP_RXSTBC) &&
319 (sc->sc_cur_txchainmask > 1) &&
321 (bf->bf_flags & ATH_BUF_TOA_PROBE) == 0) {
372 bf->bf_state.bfs_txflags |= HAL_TXDESC_LDPC;
373 sc->sc_stats.ast_tx_ldpc++;
377 sc->sc_stats.ast_tx_stbc++;
402 const HAL_RATE_TABLE *rt = sc->sc_currates;
403 struct ieee80211_node *ni = first_bf->bf_node;
418 * Convert the A-MPDU density net80211 value to a 1/100 microsecond
431 * crypto hardware catch up. This could be tuned per-MAC and
432 * per-rate, but for now we'll simply assume encryption is
436 * delimiters by default for pre-AR9380 peers. This will
445 * XXX TODO: this is only needed if (a) RTS/CTS is enabled for
446 * this exchange, and (b) (done) this is the first sub-frame
449 if (sc->sc_use_ent && (sc->sc_ent_cfg & AH_ENT_RTSCTS_DELIM_WAR)
454 * If sc_delim_min_pad is non-zero, enforce it as the minimum
457 if (sc->sc_delim_min_pad != 0)
458 ndelim = MAX(ndelim, sc->sc_delim_min_pad);
478 rix = first_bf->bf_state.bfs_rc[0].rix;
479 rc = rt->info[rix].rateCode;
480 flags = first_bf->bf_state.bfs_rc[0].flags;
504 mindelim = (minlen - pktlen) / ATH_AGGR_DELIM_SZ;
544 * and per-peer limits in non-STA mode.
553 /* Extract out the maximum configured driver A-MPDU limit */
554 if (sc->sc_aggr_limit > 0 && sc->sc_aggr_limit < ATH_AGGR_MAXSIZE)
555 amin = sc->sc_aggr_limit;
562 if (bf->bf_state.bfs_rc[i].tries == 0)
564 amin = MIN(amin, bf->bf_state.bfs_rc[i].max4msframelen);
571 sc->sc_aggr_limit,
572 ni->ni_vap->iv_ampdu_limit,
573 _IEEE80211_MASKSHIFT(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU),
586 * It, along with ath_buf_set_rate, must be called -after- a burst
593 struct ieee80211com *ic = ni->ni_ic;
594 struct ath_hal *ah = sc->sc_ah;
596 const HAL_RATE_TABLE *rt = sc->sc_currates;
599 struct ath_rc_series *rc = bf->bf_state.bfs_rc;
601 if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) &&
602 (ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_PREAMBLE))
609 if (bf->bf_state.bfs_aggr)
610 pktlen = bf->bf_state.bfs_al;
612 pktlen = bf->bf_state.bfs_pktlen;
633 series[i].ChSel = sc->sc_cur_txchainmask;
638 series[i].Rate = rt->info[rc[i].rix].rateCode;
643 * Enable RTS/CTS as appropriate.
669 * PktDuration doesn't include slot, ACK, RTS, etc timing -
682 rt->info[rc[i].rix].shortPreamble;
696 device_printf(sc->sc_dev ,"series %d: rate %x; tries %d; "
721 struct ath_desc *ds = bf->bf_desc;
722 struct ath_hal *ah = sc->sc_ah;
723 int is_pspoll = (bf->bf_state.bfs_atype == HAL_PKT_TYPE_PSPOLL);
724 int ctsrate = bf->bf_state.bfs_ctsrate;
725 int flags = bf->bf_state.bfs_txflags;
733 if (sc->sc_debug & ATH_DEBUG_XMIT)
739 * Note: Don't allow hardware to override the duration on
740 * ps-poll packets.
743 !is_pspoll, /* whether to override the duration or not */
744 ctsrate, /* rts/cts rate */
752 * ie, if there's a second frame in a RIFS or A-MPDU burst
753 * w/ >1 A-MPDU frame bursting back to back.
754 * Normal A-MPDU doesn't do bursting -between- aggregates.
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;
808 tap = ath_tx_get_tx_tid(an, tid->tid);
815 * Limit the maximum number of frames in this A-MPDU
819 * frames available to send then up to two A-MPDUs will
821 * a second A-MPDU.
823 h_baw = tap->txa_wnd / 2;
838 aggr_limit = ath_get_aggr_limit(sc, &an->an_node,
840 if (bf_first->bf_state.bfs_rc_maxpktlen > 0) {
842 bf_first->bf_state.bfs_rc_maxpktlen);
847 bf->bf_next = NULL;
856 if (! bf->bf_state.bfs_dobaw) {
862 * If any of the rates are non-HT, this packet
865 * if any active rate is non-HT.
871 al_delta = ATH_AGGR_DELIM_SZ + bf->bf_state.bfs_pktlen;
879 * If RTS/CTS is set on the first frame, enforce
882 if (bf_first->bf_state.bfs_txflags &
885 (sc->sc_rts_aggr_limit <
902 * If the current frame has an RTS/CTS configuration
903 * that differs from the first frame, override the
907 bf->bf_state.bfs_txflags &=
909 bf->bf_state.bfs_txflags |=
910 bf_first->bf_state.bfs_txflags &
916 * step outside of the block-ack window.
918 if (! BAW_WITHIN(tap->txa_start, tap->txa_wnd,
919 SEQNO(bf->bf_state.bfs_seqno))) {
931 bf->bf_state.bfs_addedbaw = 1;
937 if (bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) {
938 device_printf(sc->sc_dev,
941 bf->bf_state.bfs_txflags &= (~HAL_TXDESC_NOACK);
953 bf->bf_comp = ath_tx_aggr_comp;
963 bf->bf_state.bfs_ndelim =
965 bf->bf_state.bfs_pktlen, (bf_first == bf));
972 bpad = PADBYTES(al_delta) + (bf->bf_state.bfs_ndelim << 2);
978 bf_prev->bf_next = bf;
986 if (tid->an->an_leak_count) {
995 if (bf->bf_state.bfs_pktlen < ATH_AGGR_MINPLEN) {
1010 __func__, al, bf_first->bf_state.bfs_rc_maxpktlen);
1012 bf_first->bf_state.bfs_al = al;
1013 bf_first->bf_state.bfs_nframes = nframes;