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:
Felix Fietkau
2025-11-12 16:32:50 +00:00
parent eb567bc7f9
commit f473d66ab5
+1 -1
View File
@@ -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;