Lines Matching +full:mode +full:- +full:xxx

1 /*-
62 /* XXX VHT80; VHT40 */ in r12a_get_primary_channel()
74 /* XXX VHT80; VHT40; VHT20 */ in r12a_tx_set_ht40()
78 prim_chan = r12a_get_primary_channel(sc, ni->ni_chan); in r12a_tx_set_ht40()
79 txd->txdw5 |= htole32(SM(R12A_TXDW5_DATA_BW, in r12a_tx_set_ht40()
81 txd->txdw5 |= htole32(SM(R12A_TXDW5_DATA_PRIM_CHAN, in r12a_tx_set_ht40()
88 enum ieee80211_protmode mode, uint8_t ridx) in r12a_tx_protection() argument
90 struct ieee80211com *ic = &sc->sc_ic; in r12a_tx_protection()
93 switch (mode) { in r12a_tx_protection()
95 txd->txdw3 |= htole32(R12A_TXDW3_CTS2SELF); in r12a_tx_protection()
98 txd->txdw3 |= htole32(R12A_TXDW3_RTSEN); in r12a_tx_protection()
104 if (mode == IEEE80211_PROT_CTSONLY || in r12a_tx_protection()
105 mode == IEEE80211_PROT_RTSCTS) { in r12a_tx_protection()
108 rate = rtwn_ctl_mcsrate(ic->ic_rt, ridx); in r12a_tx_protection()
110 rate = ieee80211_ctl_rate(ic->ic_rt, ridx2rate[ridx]); in r12a_tx_protection()
113 txd->txdw4 |= htole32(SM(R12A_TXDW4_RTSRATE, ridx)); in r12a_tx_protection()
115 txd->txdw4 |= htole32(SM(R12A_TXDW4_RTSRATE_FB_LMT, 0xf)); in r12a_tx_protection()
118 (ic->ic_flags & IEEE80211_F_SHPREAMBLE)) in r12a_tx_protection()
119 txd->txdw5 |= htole32(R12A_TXDW5_RTS_SHORT); in r12a_tx_protection()
127 struct ieee80211com *ic = &sc->sc_ic; in r12a_tx_raid()
128 struct ieee80211vap *vap = ni->ni_vap; in r12a_tx_raid()
130 enum ieee80211_phymode mode; in r12a_tx_raid() local
133 chan = (ni->ni_chan != IEEE80211_CHAN_ANYC) ? in r12a_tx_raid()
134 ni->ni_chan : ic->ic_curchan; in r12a_tx_raid()
135 mode = ieee80211_chan2mode(chan); in r12a_tx_raid()
138 if (ismcast || !(ni->ni_flags & IEEE80211_NODE_HT)) { in r12a_tx_raid()
139 switch (mode) { in r12a_tx_raid()
145 mode = IEEE80211_MODE_11A; in r12a_tx_raid()
148 mode = IEEE80211_MODE_11G; in r12a_tx_raid()
151 mode = IEEE80211_MODE_VHT_5GHZ; in r12a_tx_raid()
154 device_printf(sc->sc_dev, "unknown mode(1) %d!\n", in r12a_tx_raid()
155 ic->ic_curmode); in r12a_tx_raid()
160 switch (mode) { in r12a_tx_raid()
168 if (vap->iv_flags & IEEE80211_F_PUREG) in r12a_tx_raid()
174 if (sc->ntxchains == 1) in r12a_tx_raid()
180 if (sc->ntxchains == 1) { in r12a_tx_raid()
193 if (sc->ntxchains == 1) in r12a_tx_raid()
199 device_printf(sc->sc_dev, "unknown mode(2) %d!\n", mode); in r12a_tx_raid()
203 txd->txdw1 |= htole32(SM(R12A_TXDW1_RAID, raid)); in r12a_tx_raid()
214 * Only enable short-GI if we're transmitting in that in r12a_tx_set_sgi()
222 txd->txdw5 |= htole32(R12A_TXDW5_DATA_SHORT); in r12a_tx_set_sgi()
225 txd->txdw5 |= htole32(R12A_TXDW5_DATA_SHORT); in r12a_tx_set_sgi()
233 struct ieee80211vap *vap = ni->ni_vap; in r12a_tx_set_ldpc()
235 if ((vap->iv_flags_ht & IEEE80211_FHT_LDPC_TX) && in r12a_tx_set_ldpc()
236 (ni->ni_htcap & IEEE80211_HTCAP_LDPC)) in r12a_tx_set_ldpc()
237 txd->txdw5 |= htole32(R12A_TXDW5_DATA_LDPC); in r12a_tx_set_ldpc()
247 tap = &ni->ni_tx_ampdu[tid]; in r12a_calculate_tx_agg_window()
253 wnd = tap->txa_wnd / 2; in r12a_calculate_tx_agg_window()
266 struct ieee80211com *ic = &sc->sc_ic; in r12a_fill_tx_desc()
267 struct ieee80211vap *vap = ni->ni_vap; in r12a_fill_tx_desc()
276 type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; in r12a_fill_tx_desc()
278 ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); in r12a_fill_tx_desc()
282 qos = ((const struct ieee80211_qosframe *)wh)->i_qos[0]; in r12a_fill_tx_desc()
291 txd->flags0 |= R12A_FLAGS0_LSG | R12A_FLAGS0_FSG; in r12a_fill_tx_desc()
293 txd->flags0 |= R12A_FLAGS0_BMCAST; in r12a_fill_tx_desc()
299 txd->txdw4 = htole32(R12A_TXDW4_RETRY_LMT_ENA); in r12a_fill_tx_desc()
300 txd->txdw4 |= htole32(SM(R12A_TXDW4_RETRY_LMT, in r12a_fill_tx_desc()
305 macid = un->id; in r12a_fill_tx_desc()
310 if (m->m_flags & M_AMPDU_MPDU) { in r12a_fill_tx_desc()
311 txd->txdw2 |= htole32(R12A_TXDW2_AGGEN); in r12a_fill_tx_desc()
312 txd->txdw2 |= htole32(SM(R12A_TXDW2_AMPDU_DEN, in r12a_fill_tx_desc()
314 txd->txdw3 |= htole32(SM(R12A_TXDW3_MAX_AGG, in r12a_fill_tx_desc()
317 txd->txdw2 |= htole32(R12A_TXDW2_AGGBK); in r12a_fill_tx_desc()
319 if (sc->sc_ratectl == RTWN_RATECTL_NET80211) { in r12a_fill_tx_desc()
320 txd->txdw2 |= htole32(R12A_TXDW2_SPE_RPT); in r12a_fill_tx_desc()
321 sc->sc_tx_n_active++; in r12a_fill_tx_desc()
325 (ic->ic_flags & IEEE80211_F_SHPREAMBLE)) in r12a_fill_tx_desc()
326 txd->txdw5 |= htole32(R12A_TXDW5_DATA_SHORT); in r12a_fill_tx_desc()
334 prot = ic->ic_htprotmode; in r12a_fill_tx_desc()
335 } else if (ic->ic_flags & IEEE80211_F_USEPROT) in r12a_fill_tx_desc()
336 prot = ic->ic_protmode; in r12a_fill_tx_desc()
338 /* XXX fix last comparison for A-MSDU (in net80211) */ in r12a_fill_tx_desc()
339 /* XXX A-MPDU? */ in r12a_fill_tx_desc()
340 if (m->m_pkthdr.len + IEEE80211_CRC_LEN > in r12a_fill_tx_desc()
341 vap->iv_rtsthreshold && in r12a_fill_tx_desc()
342 vap->iv_rtsthreshold != IEEE80211_RTS_MAX) in r12a_fill_tx_desc()
354 txd->txdw1 |= htole32(SM(R12A_TXDW1_QSEL, qsel)); in r12a_fill_tx_desc()
355 txd->txdw1 |= htole32(SM(R12A_TXDW1_MACID, macid)); in r12a_fill_tx_desc()
356 txd->txdw4 |= htole32(SM(R12A_TXDW4_DATARATE, ridx)); in r12a_fill_tx_desc()
358 txd->txdw4 |= htole32(SM(R12A_TXDW4_DATARATE_FB_LMT, 0x1f)); in r12a_fill_tx_desc()
359 /* XXX recheck for non-21au */ in r12a_fill_tx_desc()
360 txd->txdw6 |= htole32(SM(R21A_TXDW6_MBSSID, uvp->id)); in r12a_fill_tx_desc()
364 if (sc->sc_ratectl != RTWN_RATECTL_FW) in r12a_fill_tx_desc()
365 txd->txdw3 |= htole32(R12A_TXDW3_DRVRATE); in r12a_fill_tx_desc()
368 /* Use HW sequence numbering for non-QoS frames. */ in r12a_fill_tx_desc()
369 txd->txdw8 |= htole32(R12A_TXDW8_HWSEQ_EN); in r12a_fill_tx_desc()
370 txd->txdw3 |= htole32(SM(R12A_TXDW3_SEQ_SEL, uvp->id)); in r12a_fill_tx_desc()
374 if (m->m_flags & M_AMPDU_MPDU) { in r12a_fill_tx_desc()
375 seqno = ni->ni_txseqs[tid]; in r12a_fill_tx_desc()
376 ni->ni_txseqs[tid]++; in r12a_fill_tx_desc()
381 txd->txdw9 |= htole32(SM(R12A_TXDW9_SEQ, seqno)); in r12a_fill_tx_desc()
389 struct ieee80211vap *vap = ni->ni_vap; in r12a_fill_tx_desc_raw()
396 /* XXX TODO: 11n checks, matching rtwn_fill_tx_desc() */ in r12a_fill_tx_desc_raw()
399 ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); in r12a_fill_tx_desc_raw()
400 ridx = rate2ridx(params->ibp_rate0); in r12a_fill_tx_desc_raw()
404 txd->flags0 |= R12A_FLAGS0_LSG | R12A_FLAGS0_FSG; in r12a_fill_tx_desc_raw()
406 txd->flags0 |= R12A_FLAGS0_BMCAST; in r12a_fill_tx_desc_raw()
408 if ((params->ibp_flags & IEEE80211_BPF_NOACK) == 0) { in r12a_fill_tx_desc_raw()
409 txd->txdw4 = htole32(R12A_TXDW4_RETRY_LMT_ENA); in r12a_fill_tx_desc_raw()
410 txd->txdw4 |= htole32(SM(R12A_TXDW4_RETRY_LMT, in r12a_fill_tx_desc_raw()
411 params->ibp_try0)); in r12a_fill_tx_desc_raw()
413 if (params->ibp_flags & IEEE80211_BPF_RTS) in r12a_fill_tx_desc_raw()
415 if (params->ibp_flags & IEEE80211_BPF_CTS) in r12a_fill_tx_desc_raw()
418 txd->txdw1 |= htole32(SM(R12A_TXDW1_MACID, RTWN_MACID_BC)); in r12a_fill_tx_desc_raw()
419 txd->txdw1 |= htole32(SM(R12A_TXDW1_QSEL, R12A_TXDW1_QSEL_MGNT)); in r12a_fill_tx_desc_raw()
422 txd->txdw4 |= htole32(SM(R12A_TXDW4_DATARATE, ridx)); in r12a_fill_tx_desc_raw()
423 txd->txdw4 |= htole32(SM(R12A_TXDW4_DATARATE_FB_LMT, 0x1f)); in r12a_fill_tx_desc_raw()
424 txd->txdw6 |= htole32(SM(R21A_TXDW6_MBSSID, uvp->id)); in r12a_fill_tx_desc_raw()
425 txd->txdw3 |= htole32(R12A_TXDW3_DRVRATE); in r12a_fill_tx_desc_raw()
429 /* Use HW sequence numbering for non-QoS frames. */ in r12a_fill_tx_desc_raw()
430 txd->txdw8 |= htole32(R12A_TXDW8_HWSEQ_EN); in r12a_fill_tx_desc_raw()
431 txd->txdw3 |= htole32(SM(R12A_TXDW3_SEQ_SEL, uvp->id)); in r12a_fill_tx_desc_raw()
434 txd->txdw9 |= htole32(SM(R12A_TXDW9_SEQ, in r12a_fill_tx_desc_raw()
445 txd->flags0 = R12A_FLAGS0_FSG | R12A_FLAGS0_LSG | R12A_FLAGS0_OWN; in r12a_fill_tx_desc_null()
446 txd->txdw1 = htole32( in r12a_fill_tx_desc_null()
449 txd->txdw3 = htole32(R12A_TXDW3_DRVRATE); in r12a_fill_tx_desc_null()
450 txd->txdw6 = htole32(SM(R21A_TXDW6_MBSSID, id)); in r12a_fill_tx_desc_null()
452 txd->txdw4 = htole32(SM(R12A_TXDW4_DATARATE, in r12a_fill_tx_desc_null()
455 txd->txdw4 = htole32(SM(R12A_TXDW4_DATARATE, in r12a_fill_tx_desc_null()
460 txd->txdw8 = htole32(R12A_TXDW8_HWSEQ_EN); in r12a_fill_tx_desc_null()
461 txd->txdw3 |= htole32(SM(R12A_TXDW3_SEQ_SEL, id)); in r12a_fill_tx_desc_null()
471 if (!(txd->txdw5 & htole32(R12A_TXDW5_DATA_SHORT))) in r12a_tx_radiotap_flags()
474 rate = MS(le32toh(txd->txdw4), R12A_TXDW4_DATARATE); in r12a_tx_radiotap_flags()