From 9d11596ec641358a21f9379d5df60d2d918f4136 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 16 Jan 2019 19:55:41 +0100 Subject: [PATCH] mt7603: discard bogus tx status data If parsing tx status information fails, do not report any rates to mac80211 Signed-off-by: Felix Fietkau --- mt7603/mac.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mt7603/mac.c b/mt7603/mac.c index 10ba250f..8b460644 100644 --- a/mt7603/mac.c +++ b/mt7603/mac.c @@ -1102,7 +1102,12 @@ mt7603_mac_add_txs_skb(struct mt7603_dev *dev, struct mt7603_sta *sta, int pid, } spin_unlock_bh(&dev->mt76.lock); } - mt7603_fill_txs(dev, sta, info, txs_data); + + if (!mt7603_fill_txs(dev, sta, info, txs_data)) { + ieee80211_tx_info_clear_status(info); + info->status.rates[0].idx = -1; + } + mt76_tx_status_skb_done(mdev, skb, &list); } mt76_tx_status_unlock(mdev, &list);