mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76x2: mac: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi()
Signed-off-by: Lorenzo Bianconi <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
ca5ca8c779
commit
2d4b8f57cc
+1
-1
@@ -235,7 +235,7 @@ void mt76x2_mac_write_txwi(struct mt76x2_dev *dev, struct mt76x2_txwi *txwi,
|
||||
}
|
||||
|
||||
spin_lock_bh(&dev->mt76.lock);
|
||||
if (rate->idx < 0 || !rate->count) {
|
||||
if (wcid && (rate->idx < 0 || !rate->count)) {
|
||||
txwi->rate = wcid->tx_rate;
|
||||
max_txpwr_adj = wcid->max_txpwr_adj;
|
||||
nss = wcid->tx_rate_nss;
|
||||
|
||||
Reference in New Issue
Block a user