diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2022-06-03 12:36:42 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-07-11 14:40:01 +0300 |
commit | 3d8c636c3e9ef7969c4dc971a82139ba6407e707 (patch) | |
tree | efbc0c51b5589433905fa21702260db41aab35d5 /drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | |
parent | 56054087bb17f98d62419acc3d0e5afc9544a4fb (diff) | |
download | linux-3d8c636c3e9ef7969c4dc971a82139ba6407e707.tar.xz |
mt76: connac: move shared fw structures in connac module
Move mt76_connac2 fw structures in connac module since they are shared
between mt7921 and mt7915 drivers. This is a preliminary patch to add
mt7902e support.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h index 561fb0368708..ccc17cf2fb0a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h @@ -26,6 +26,62 @@ #define PATCH_SEC_TYPE_MASK GENMASK(15, 0) #define PATCH_SEC_TYPE_INFO 0x2 +struct mt76_connac2_patch_hdr { + char build_date[16]; + char platform[4]; + __be32 hw_sw_ver; + __be32 patch_ver; + __be16 checksum; + u16 rsv; + struct { + __be32 patch_ver; + __be32 subsys; + __be32 feature; + __be32 n_region; + __be32 crc; + u32 rsv[11]; + } desc; +} __packed; + +struct mt76_connac2_patch_sec { + __be32 type; + __be32 offs; + __be32 size; + union { + __be32 spec[13]; + struct { + __be32 addr; + __be32 len; + __be32 sec_key_idx; + __be32 align_len; + u32 rsv[9]; + } info; + }; +} __packed; + +struct mt76_connac2_fw_trailer { + u8 chip_id; + u8 eco_code; + u8 n_region; + u8 format_ver; + u8 format_flag; + u8 rsv[2]; + char fw_ver[10]; + char build_date[15]; + __le32 crc; +} __packed; + +struct mt76_connac2_fw_region { + __le32 decomp_crc; + __le32 decomp_len; + __le32 decomp_blk_sz; + u8 rsv[4]; + __le32 addr; + __le32 len; + u8 feature_set; + u8 rsv1[15]; +} __packed; + struct tlv { __le16 tag; __le16 len; |