Skip to content

Commit 65b526a

Browse files
committed
mt76: mt76x02: skip station tx status for non-sta wcid entries
Fixes a crash that could occur if a frame is sent to a station, but the station's wcid was not used (e.g. for software encrypted mgmt tx) Signed-off-by: Felix Fietkau <[email protected]>
1 parent 1a4846f commit 65b526a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/wireless/mediatek/mt76/mt76x02_mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ void mt76x02_send_tx_status(struct mt76x02_dev *dev,
450450
if (stat->wcid < ARRAY_SIZE(dev->mt76.wcid))
451451
wcid = rcu_dereference(dev->mt76.wcid[stat->wcid]);
452452

453-
if (wcid) {
453+
if (wcid && wcid->sta) {
454454
void *priv;
455455

456456
priv = msta = container_of(wcid, struct mt76x02_sta, wcid);

0 commit comments

Comments
 (0)