Skip to content

Commit

Permalink
mt76: mt7915: fix processing txfree events
Browse files Browse the repository at this point in the history
In the MT7915 info, the fields for the WLAN index / queue overlap with the
token id, and the MT_TX_FREE_PAIR bit indicates, which one is present.

If MT_TX_FREE_PAIR is set, skip processing the token index, since the data
will not be valid.

This fixes accidentally freeing tokens which are still in use by the
hardware with a wrong station pointer.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Sep 27, 2020
1 parent 2741fd0 commit 709f2cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mt7915/mac.c
Expand Up @@ -955,6 +955,7 @@ void mt7915_mac_tx_free(struct mt7915_dev *dev, struct sk_buff *skb)
if (list_empty(&msta->poll_list))
list_add_tail(&msta->poll_list, &dev->sta_poll_list);
spin_unlock_bh(&dev->sta_poll_lock);
continue;
}

msdu = FIELD_GET(MT_TX_FREE_MSDU_ID, info);
Expand Down

0 comments on commit 709f2cd

Please sign in to comment.