From: Maoyi Xie For a unicast frame, mt7915_rx_get_wcid() returns the wcid of WLAN_IDX unchecked. WLAN_IDX 0 is the global wcid, which mt7915_mac_fill_rx() takes as a struct mt7915_sta. In the first fragment path, msta->vif reads dev->mt76.wcid[0], which is not NULL. mt76_connac2_reverse_frag0_hdr_trans() then fills addr1 and addr2 of the 802.11 header from other fields of struct mt76_dev. Without DS bits it also copies the BSSID through a pointer read from that struct. Require a station behind the wcid, as mt7921_mac_fill_rx() does. Noticed during an LLM-assisted review of the first fragment path. Reproduced in a userspace harness with WLAN_IDX 0. Not tested on hardware. Fixes: dc5399a50b45 ("mt76: reverse the first fragmented frame to 802.11") Cc: stable@vger.kernel.org Co-developed-by: Kaixuan Li Signed-off-by: Kaixuan Li Signed-off-by: Maoyi Xie --- I do not know whether the hardware ever reports WLAN_IDX 0 for a unicast frame. I used an LLM to help write the harness and this patch. --- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c index 2265f9adb336..20b2c6f98e9e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c @@ -478,7 +478,7 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb, struct ieee80211_vif *vif; int err; - if (!msta || !msta->vif) + if (!msta || !msta->vif || !status->wcid->sta) return -EINVAL; vif = container_of((void *)msta->vif, struct ieee80211_vif, --- base-commit: 58b6c16c5470af35b5342485b52d9dfd23e801a3 change-id: 20261206-mt7915-frag0-sta-e7a672cca28f Best regards, -- Maoyi Xie