The short guard interval, LDPC and STBC asked for in radiotap are dropped on connac2, so an injected HT or VHT frame always goes out without them, unlike on mt7615. Honour them for an injected HT or VHT rate. STBC spreads one stream over two chains, so it needs a second chain, and the rate then counts two streams on air, which is how the tx status decode already reads it. Signed-off-by: Devin Wittmayer --- .../wireless/mediatek/mt76/mt76_connac_mac.c | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c index 3d0596868f0d..0be7efef02e1 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c @@ -657,6 +657,26 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi, } } + /* short GI, LDPC and STBC requested through radiotap */ + if ((info->flags & IEEE80211_TX_CTL_INJECTED) && + FIELD_GET(MT_TX_RATE_MODE, rate) >= MT_PHY_TYPE_HT) { + if (info->control.rates[0].flags & + IEEE80211_TX_RC_SHORT_GI) + val |= FIELD_PREP(MT_TXD6_SGI, 1); + + if (info->flags & IEEE80211_TX_CTL_LDPC) + val |= MT_TXD6_LDPC; + + /* STBC spreads one stream over two chains, and the + * rate counts the streams on air, as tx status does + */ + if ((info->flags & IEEE80211_TX_CTL_STBC) && + !FIELD_GET(MT_TX_RATE_NSS, rate) && + hweight8(mphy->antenna_mask) > 1) + rate |= MT_TX_RATE_STBC | + FIELD_PREP(MT_TX_RATE_NSS, 1); + } + /* hardware won't add HTC for mgmt/ctrl frame */ txwi[2] |= cpu_to_le32(MT_TXD2_HTC_VLD); -- 2.56.1