Skip to contentSkip to conversation

mac80211_hwsim: Fix RX status reporting for HT

PATCH In review Jouni Malinen 2 participants 3 messages Aug 6, 2011 – Aug 8, 2011 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211_hwsim: Fix RX status reporting for HT

RX_FLAG_HT must be included when reporting MCS rates. Without this, mac80211 ended up dropping any frame sent at MCS index 12 or higher and that resulted in oddly random looking errors in mac80211_hwsim tests.

---
 drivers/net/wireless/mac80211_hwsim.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/net/wireless/mac80211_hwsim.c +6 -0
index 031cd89..34b79fc 100644
@@ -612,6 +612,12 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
 	rx_status.freq = data->channel->center_freq;
 	rx_status.band = data->channel->band;
 	rx_status.rate_idx = info->control.rates[0].idx;
+	if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS)
+		rx_status.flag |= RX_FLAG_HT;
+	if (info->control.rates[0].flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
+		rx_status.flag |= RX_FLAG_40MHZ;
+	if (info->control.rates[0].flags & IEEE80211_TX_RC_SHORT_GI)
+		rx_status.flag |= RX_FLAG_SHORT_GI;
 	/* TODO: simulate real signal strength (and optional packet loss) */
 	rx_status.signal = data->power_level - 50;
 
Signature · 5 lines
1.7.4.1


-- 
Jouni Malinen                                            PGP id EFC895FA
maintainer
#1 lore raw
Quoted 4 lines · Jouni Malinen

RX_FLAG_HT must be included when reporting MCS rates. Without this, mac80211 ended up dropping any frame sent at MCS index 12 or higher and that resulted in oddly random looking errors in mac80211_hwsim tests.

This "solved" the timing thing you ran into with the unrelated suspend/resume patch then I guess?

johannes

#2 lore raw
Quoted 8 lines · Johannes Berg
Quoted 4 lines · Jouni Malinen

RX_FLAG_HT must be included when reporting MCS rates. Without this, mac80211 ended up dropping any frame sent at MCS index 12 or higher and that resulted in oddly random looking errors in mac80211_hwsim tests.

This "solved" the timing thing you ran into with the unrelated suspend/resume patch then I guess?

Yes, it did. This was indeed the reason for semi-random dropping of EAPOL frames and the randomness part made it difficult to figure out what on earth was happening.

Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA