wifi: mt76: mt7996: fix struct mt7996_mcu_uni_event

The cid field is defined as a two-byte value in the firmware.

Fixes: 98686cd216 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Link: https://patch.msgid.link/20260203155532.1098290-2-shayne.chen@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
StanleyYP Wang 2026-02-03 23:55:30 +08:00 committed by Felix Fietkau
parent 97b9f9831b
commit efbd5bf395
2 changed files with 3 additions and 3 deletions

View File

@ -245,7 +245,7 @@ mt7996_mcu_parse_response(struct mt76_dev *mdev, int cmd,
event = (struct mt7996_mcu_uni_event *)skb->data;
ret = le32_to_cpu(event->status);
/* skip invalid event */
if (mcu_cmd != event->cid)
if (mcu_cmd != le16_to_cpu(event->cid))
ret = -EAGAIN;
} else {
skb_pull(skb, sizeof(struct mt7996_mcu_rxd));

View File

@ -25,8 +25,8 @@ struct mt7996_mcu_rxd {
};
struct mt7996_mcu_uni_event {
u8 cid;
u8 __rsv[3];
__le16 cid;
u8 __rsv[2];
__le32 status; /* 0: success, others: fail */
} __packed;