diff --git a/sys/dev/rtwn/rtl8812a/r12a_rx.c b/sys/dev/rtwn/rtl8812a/r12a_rx.c --- a/sys/dev/rtwn/rtl8812a/r12a_rx.c +++ b/sys/dev/rtwn/rtl8812a/r12a_rx.c @@ -246,7 +246,8 @@ rxs->c_pktflags |= IEEE80211_RX_F_AMPDU_MORE; } - if ((rxdw4 & R12A_RXDW4_SPLCP) && RTWN_RATE_IS_HT(rate)) + if ((rxdw4 & R12A_RXDW4_SPLCP) && + (RTWN_RATE_IS_HT(rate) || RTWN_RATE_IS_VHT(rate))) rxs->c_pktflags |= IEEE80211_RX_F_SHORTGI; switch (MS(rxdw4, R12A_RXDW4_BW)) { @@ -277,11 +278,14 @@ rxs->c_phytype = IEEE80211_RX_FP_11A; else rxs->c_phytype = IEEE80211_RX_FP_11G; - } else { + } else if (RTWN_RATE_IS_HT(rate)) { if (is5ghz) rxs->c_phytype = IEEE80211_RX_FP_11NA; else rxs->c_phytype = IEEE80211_RX_FP_11NG; + } else if (RTWN_RATE_IS_VHT(rate)) { + /* TODO: there's no FP_VHT_5GHZ yet */ + rxs->c_phytype = IEEE80211_RX_FP_11NA; } } @@ -292,11 +296,15 @@ rxs->c_pktflags |= IEEE80211_RX_F_CCK; else rxs->c_pktflags |= IEEE80211_RX_F_OFDM; - } else { /* MCS0~15. */ - /* TODO: VHT rates */ + } else if (RTWN_RATE_IS_HT(rate)) { /* MCS0~15. */ rxs->c_rate = IEEE80211_RATE_MCS | RTWN_RIDX_TO_MCS(rate); rxs->c_pktflags |= IEEE80211_RX_F_HT; + } else if (RTWN_RATE_IS_VHT(rate)) { + /* XXX: need to revisit VHT rate representation */ + rxs->c_vhtnss = (rate - RTWN_RIDX_VHT_MCS_SHIFT) / 10; + rxs->c_rate = (rate - RTWN_RIDX_VHT_MCS_SHIFT) % 10; + rxs->c_pktflags |= IEEE80211_RX_F_VHT; } /*