diff options
author | Peter Chiu <chui-hao.chiu@mediatek.com> | 2023-03-03 16:35:55 +0800 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2023-04-17 16:08:48 +0200 |
commit | 8b14ce24a0297175bc4ebdf26d45a22b5a33847f (patch) | |
tree | ae76a9768e7aa3f3fdc72e3d995ad5d8a747e2e7 /drivers/net | |
parent | c04ab57dab559c519bb882995beeb6d95a0a21d3 (diff) | |
download | linux-stable-8b14ce24a0297175bc4ebdf26d45a22b5a33847f.tar.gz linux-stable-8b14ce24a0297175bc4ebdf26d45a22b5a33847f.tar.bz2 linux-stable-8b14ce24a0297175bc4ebdf26d45a22b5a33847f.zip |
wifi: mt76: mt7996: fix pointer calculation in ie countdown event
Fix the tail and data pointers. The rxd->len in mt7996_mcu_rxd does not
include the length of general rxd. It only includes the length of
firmware event rxd. Use skb->length to get the correct length.
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c index bb95fdda0eba..29ff4c191a3c 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c @@ -422,7 +422,8 @@ mt7996_mcu_ie_countdown(struct mt7996_dev *dev, struct sk_buff *skb) if (hdr->band && dev->mt76.phys[hdr->band]) mphy = dev->mt76.phys[hdr->band]; - tail = skb->data + le16_to_cpu(rxd->len); + tail = skb->data + skb->len; + data += sizeof(struct header); while (data + sizeof(struct tlv) < tail && le16_to_cpu(tlv->len)) { switch (le16_to_cpu(tlv->tag)) { case UNI_EVENT_IE_COUNTDOWN_CSA: |