Skip to content

Commit dad6330

Browse files
Karl Beldanjmberg-intel
authored andcommitted
mac80211_hwsim: handle VHT rates in rx_status
Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 6bc8312 commit dad6330

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

‎drivers/net/wireless/mac80211_hwsim.c‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -718,9 +718,17 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
718718
rx_status.flag |= RX_FLAG_MACTIME_START;
719719
rx_status.freq = chan->center_freq;
720720
rx_status.band = chan->band;
721-
rx_status.rate_idx = info->control.rates[0].idx;
722-
if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS)
723-
rx_status.flag |= RX_FLAG_HT;
721+
if (info->control.rates[0].flags & IEEE80211_TX_RC_VHT_MCS) {
722+
rx_status.rate_idx =
723+
ieee80211_rate_get_vht_mcs(&info->control.rates[0]);
724+
rx_status.vht_nss =
725+
ieee80211_rate_get_vht_nss(&info->control.rates[0]);
726+
rx_status.flag |= RX_FLAG_VHT;
727+
} else {
728+
rx_status.rate_idx = info->control.rates[0].idx;
729+
if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS)
730+
rx_status.flag |= RX_FLAG_HT;
731+
}
724732
if (info->control.rates[0].flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
725733
rx_status.flag |= RX_FLAG_40MHZ;
726734
if (info->control.rates[0].flags & IEEE80211_TX_RC_SHORT_GI)

0 commit comments

Comments
 (0)