mt76: fix a-mpdu boundary detection issue for airtime reporting

status->ampdu_ref can be 0 if the first frame is an A-MPDU. Avoid calling
mt76_airtime_flush_ampdu again without reinitializing the status wcid by
checking dev->rx_ampdu_len first.

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2019-10-10 22:28:53 +02:00
parent 391e1488f8
commit d3a589586d
+2 -1
View File
@@ -675,7 +675,8 @@ mt76_airtime_check(struct mt76_dev *dev, struct sk_buff *skb)
mt76_airtime_flush_ampdu(dev);
if (status->flag & RX_FLAG_AMPDU_DETAILS) {
if (status->ampdu_ref != dev->rx_ampdu_ref) {
if (!dev->rx_ampdu_len ||
status->ampdu_ref != dev->rx_ampdu_ref) {
dev->rx_ampdu_status = *status;
dev->rx_ampdu_status.wcid_idx = wcid ? wcid->idx : 0xff;
dev->rx_ampdu_ref = status->ampdu_ref;