Skip to content

Commit

Permalink
mt76: fix a-mpdu boundary detection issue for airtime reporting
Browse files Browse the repository at this point in the history
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 <nbd@nbd.name>
  • Loading branch information
nbd168 committed Oct 10, 2019
1 parent 391e148 commit d3a5895
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mac80211.c
Expand Up @@ -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;
Expand Down

0 comments on commit d3a5895

Please sign in to comment.