mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 05:16:57 +00:00
wifi: mt76: mt7996: fix crash in mt7996_tx_prepare_skb
Add missing NULL pointer check. In mesh mode, sta can be NULL even for qosdata frames. Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+1
-1
@@ -1061,7 +1061,7 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
|
||||
if (!wcid)
|
||||
wcid = &dev->mt76.global_wcid;
|
||||
|
||||
if ((is_8023 || ieee80211_is_data_qos(hdr->frame_control)) && sta->mlo &&
|
||||
if ((is_8023 || ieee80211_is_data_qos(hdr->frame_control)) && sta && sta->mlo &&
|
||||
likely(tx_info->skb->protocol != cpu_to_be16(ETH_P_PAE))) {
|
||||
u8 tid = tx_info->skb->priority & IEEE80211_QOS_CTL_TID_MASK;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user