]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mt76: do not add non-sta wcid entries to the poll list
authorFelix Fietkau <nbd@nbd.name>
Wed, 27 Aug 2025 08:53:48 +0000 (10:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Sep 2025 09:16:42 +0000 (11:16 +0200)
[ Upstream commit a3c99ef88a084e1c2b99dd56bbfa7f89c9be3e92 ]

Polling and airtime reporting is valid for station entries only

Link: https://patch.msgid.link/20250827085352.51636-2-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mac80211.c

index 8e6ce16ab5b88fdf2ac18ed4f4504ae34c163bbd..c9e2dca3083123e63ff2e147945a54cbac4f67df 100644 (file)
@@ -1731,7 +1731,7 @@ EXPORT_SYMBOL_GPL(mt76_wcid_cleanup);
 
 void mt76_wcid_add_poll(struct mt76_dev *dev, struct mt76_wcid *wcid)
 {
-       if (test_bit(MT76_MCU_RESET, &dev->phy.state))
+       if (test_bit(MT76_MCU_RESET, &dev->phy.state) || !wcid->sta)
                return;
 
        spin_lock_bh(&dev->sta_poll_lock);