mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt7603: limit station power save queue length to 64
Avoid excessive memory use, in case something goes wrong. Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -90,6 +90,10 @@ mt7603_rx_loopback_skb(struct mt7603_dev *dev, struct sk_buff *skb)
|
||||
|
||||
spin_lock_bh(&dev->ps_lock);
|
||||
__skb_queue_tail(&msta->psq, skb);
|
||||
if (skb_queue_len(&msta->psq) >= 64) {
|
||||
skb = __skb_dequeue(&msta->psq);
|
||||
dev_kfree_skb(skb);
|
||||
}
|
||||
spin_unlock_bh(&dev->ps_lock);
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user