Skip to contentSkip to conversation

mac80211: do not pass injected frames without a valid rate to the driver

PATCH Applied Felix Fietkau 2 participants 2 messages Mar 2, 2016 – Mar 3, 2016 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: do not pass injected frames without a valid rate to the driver

Fall back to rate control if the requested bitrate was not found.

Fixes dfdfc2beb0dd ("mac80211: Parse legacy and HT rate in injected frames")
---
 net/mac80211/tx.c | 3 +++
 1 file changed, 3 insertions(+)
net/mac80211/tx.c +3 -0
index b294820..ea6e2d0 100644
@@ -1808,6 +1808,9 @@ static bool ieee80211_parse_tx_radiotap(struct ieee80211_local *local,
 			}
 		}
 
+		if (info->control.rates[0].idx < 0)
+			info->control.flags &= ~IEEE80211_TX_CTRL_RATE_INJECT;
+
 		info->control.rates[0].flags = rate_flags;
 		info->control.rates[0].count = min_t(u8, rate_retries + 1,
 						     local->hw.max_rate_tries);
Signature · 1 line
2.2.2
maintainer Applied
#1 lore raw
Quoted 2 lines · Felix Fietkau

Fall back to rate control if the requested bitrate was not found.

Applied, thakns.

johannes