diff mbox

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

Message ID 1456930491-17495-1-git-send-email-nbd@openwrt.org (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show

Commit Message

Felix Fietkau March 2, 2016, 2:54 p.m. UTC
Fall back to rate control if the requested bitrate was not found.

Fixes: dfdfc2beb0dd ("mac80211: Parse legacy and HT rate in injected frames")
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 net/mac80211/tx.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Johannes Berg March 3, 2016, 3 p.m. UTC | #1
On Wed, 2016-03-02 at 15:54 +0100, Felix Fietkau wrote:
> Fall back to rate control if the requested bitrate was not found.
> 
Applied, thakns.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index b294820..ea6e2d0 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -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);