Skip to content

Commit 4a522b0

Browse files
committed
wifi: mt76: mt7996: add missing check for rx wcid entries
Non-station wcid entries must not be passed to the rx functions. In case of the global wcid entry, it could even lead to corruption in the wcid array due to pointer being casted to struct mt7996_sta_link using container_of. Fixes: 7464b12 ("wifi: mt76: mt7996: rework mt7996_rx_get_wcid to support MLO") Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
1 parent a3c99ef commit 4a522b0

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/mediatek/mt76/mt7996

1 file changed

+1
-1
lines changed

drivers/net/wireless/mediatek/mt76/mt7996/mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static struct mt76_wcid *mt7996_rx_get_wcid(struct mt7996_dev *dev,
6262
int i;
6363

6464
wcid = mt76_wcid_ptr(dev, idx);
65-
if (!wcid)
65+
if (!wcid || !wcid->sta)
6666
return NULL;
6767

6868
if (!mt7996_band_valid(dev, band_idx))

0 commit comments

Comments
 (0)