Skip to content

Commit

Permalink
mt76: mt7615: fix mt7663e firmware struct endianness
Browse files Browse the repository at this point in the history
Convert fields in mt7663_fw_trailer and mt7663_fw_buf to little-endian

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: f40ac0f ("mt76: mt7615: introduce mt7663e support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/d14dfd7cd91a4dda8c5dcd03e8a70ff11314182e.1584534454.git.lorenzo@kernel.org
  • Loading branch information
Lorenzo Bianconi authored and Kalle Valo committed Mar 23, 2020
1 parent 11a6488 commit 54178cc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ struct mt7663_fw_trailer {
u8 reserv[2];
char fw_ver[10];
char build_date[15];
u32 crc;
__le32 crc;
} __packed;

struct mt7663_fw_buf {
u32 crc;
u32 d_img_size;
u32 block_size;
__le32 crc;
__le32 d_img_size;
__le32 block_size;
u8 rsv[4];
u32 img_dest_addr;
u32 img_size;
__le32 img_dest_addr;
__le32 img_size;
u8 feature_set;
};

Expand Down Expand Up @@ -1896,7 +1896,7 @@ static int mt7663_load_n9(struct mt7615_dev *dev, const char *name)
goto out;
}

offset += buf->img_size;
offset += le32_to_cpu(buf->img_size);
if (buf->feature_set & DL_MODE_VALID_RAM_ENTRY) {
override_addr = le32_to_cpu(buf->img_dest_addr);
dev_info(dev->mt76.dev, "Region %d, override_addr = 0x%08x\n",
Expand Down

0 comments on commit 54178cc

Please sign in to comment.