diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-10-25 15:23:13 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-11-30 14:21:42 +0300 |
commit | 65b526a108264aeac769ec82cf33e5f966c9a1df (patch) | |
tree | afb2c4c6e48952b9f70e866c64ee309dd55af07c /drivers | |
parent | 1a4846fcfed6d7cf902719ad0cd1fe8eaf7b3f91 (diff) | |
download | linux-65b526a108264aeac769ec82cf33e5f966c9a1df.tar.xz |
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 <nbd@nbd.name>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c index 34fc9f2eb51f..ad8df680c6a5 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c @@ -450,7 +450,7 @@ void mt76x02_send_tx_status(struct mt76x02_dev *dev, if (stat->wcid < ARRAY_SIZE(dev->mt76.wcid)) wcid = rcu_dereference(dev->mt76.wcid[stat->wcid]); - if (wcid) { + if (wcid && wcid->sta) { void *priv; priv = msta = container_of(wcid, struct mt76x02_sta, wcid); |