mt76x02: fix reporting of non-probing frames with tx status requested

If the first rate index is not set, pull it from the sta default rate

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2019-06-12 16:40:01 +02:00
parent b0335320fc
commit 3e7fc1573c
+10 -4
View File
@@ -456,7 +456,7 @@ mt76x02_tx_rate_fallback(struct ieee80211_tx_rate *rates, int idx, int phy)
}
static void
mt76x02_mac_fill_tx_status(struct mt76x02_dev *dev,
mt76x02_mac_fill_tx_status(struct mt76x02_dev *dev, struct mt76x02_sta *msta,
struct ieee80211_tx_info *info,
struct mt76x02_tx_status *st, int n_frames)
{
@@ -478,6 +478,12 @@ mt76x02_mac_fill_tx_status(struct mt76x02_dev *dev,
mt76x02_mac_process_tx_rate(&rate[0], first_rate,
dev->mt76.chandef.chan->band);
} else if (rate[0].idx < 0) {
if (!msta)
return;
mt76x02_mac_process_tx_rate(&rate[0], msta->wcid.tx_info,
dev->mt76.chandef.chan->band);
}
mt76x02_mac_process_tx_rate(&last_rate, st->rate,
@@ -574,14 +580,14 @@ void mt76x02_send_tx_status(struct mt76x02_dev *dev,
return;
}
mt76x02_mac_fill_tx_status(dev, status.info, &msta->status,
msta->n_frames);
mt76x02_mac_fill_tx_status(dev, msta, status.info,
&msta->status, msta->n_frames);
msta->status = *stat;
msta->n_frames = 1;
*update = 0;
} else {
mt76x02_mac_fill_tx_status(dev, status.info, stat, 1);
mt76x02_mac_fill_tx_status(dev, msta, status.info, stat, 1);
*update = 1;
}