Commit 26b48766 authored by Ryder Lee's avatar Ryder Lee Committed by Felix Fietkau

mt76: mt7615: fix endianness in mt7615_mcu_set_eeprom

The field 'u16 len' should be __le16.
Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 2ce73efe
...@@ -598,10 +598,10 @@ int mt7615_mcu_set_eeprom(struct mt7615_dev *dev) ...@@ -598,10 +598,10 @@ int mt7615_mcu_set_eeprom(struct mt7615_dev *dev)
struct { struct {
u8 buffer_mode; u8 buffer_mode;
u8 pad; u8 pad;
u16 len; __le16 len;
} __packed req_hdr = { } __packed req_hdr = {
.buffer_mode = 1, .buffer_mode = 1,
.len = __MT_EE_MAX - MT_EE_NIC_CONF_0, .len = cpu_to_le16(__MT_EE_MAX - MT_EE_NIC_CONF_0),
}; };
int ret, len = sizeof(req_hdr) + __MT_EE_MAX - MT_EE_NIC_CONF_0; int ret, len = sizeof(req_hdr) + __MT_EE_MAX - MT_EE_NIC_CONF_0;
u8 *req, *eep = (u8 *)dev->mt76.eeprom.data; u8 *req, *eep = (u8 *)dev->mt76.eeprom.data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment