mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt7603: main: fix possible NULL pointer dereferencing in mt7603_ampdu_action()
Initialize mt76_txq pointer after ieee80211_txq pointer check. Remove space after the pointer cast Signed-off-by: Lorenzo Bianconi <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
d225fa72b8
commit
d543b03eac
+3
-1
@@ -456,14 +456,16 @@ mt7603_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta = params->sta;
|
||||
struct ieee80211_txq *txq = sta->txq[params->tid];
|
||||
struct mt7603_sta *msta = (struct mt7603_sta *) sta->drv_priv;
|
||||
struct mt76_txq *mtxq = (struct mt76_txq *) txq->drv_priv;
|
||||
u16 tid = params->tid;
|
||||
u16 *ssn = ¶ms->ssn;
|
||||
u8 ba_size = params->buf_size;
|
||||
struct mt76_txq *mtxq;
|
||||
|
||||
if (!txq)
|
||||
return -EINVAL;
|
||||
|
||||
mtxq = (struct mt76_txq *)txq->drv_priv;
|
||||
|
||||
switch (action) {
|
||||
case IEEE80211_AMPDU_RX_START:
|
||||
mt7603_mac_rx_ba_reset(dev, sta->addr, tid);
|
||||
|
||||
Reference in New Issue
Block a user