summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c
diff options
context:
space:
mode:
authorLorenzo Bianconi2018-09-09 23:58:01 +0200
committerFelix Fietkau2018-09-19 12:31:38 +0200
commit79394f40801065bc2c7c13cc9ec7a9467060a389 (patch)
tree6458f178b86c839927148d8e4295092d5cd712f9 /drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c
parentmt76x2: use common helpers for mcu_alloc_msg()/mcu_send_msg() (diff)
downloadkernel-qcow2-linux-79394f40801065bc2c7c13cc9ec7a9467060a389.tar.gz
kernel-qcow2-linux-79394f40801065bc2c7c13cc9ec7a9467060a389.tar.xz
kernel-qcow2-linux-79394f40801065bc2c7c13cc9ec7a9467060a389.zip
mt76: unify firmware header between mt76x0 and mt76x2
Move mt76x2_fw_header definition in mt76x02_mcu.h and remove duplicated code Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c
index d067ad48c397..3fbaebe8b408 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c
@@ -104,7 +104,7 @@ static int
mt76pci_load_rom_patch(struct mt76x2_dev *dev)
{
const struct firmware *fw = NULL;
- struct mt76x2_patch_header *hdr;
+ struct mt76x02_patch_header *hdr;
bool rom_protect = !is_mt7612(dev);
int len, ret = 0;
__le32 *cur;
@@ -139,7 +139,7 @@ mt76pci_load_rom_patch(struct mt76x2_dev *dev)
goto out;
}
- hdr = (struct mt76x2_patch_header *) fw->data;
+ hdr = (struct mt76x02_patch_header *)fw->data;
dev_info(dev->mt76.dev, "ROM patch build: %.15s\n", hdr->build_time);
mt76_wr(dev, MT_MCU_PCIE_REMAP_BASE4, MT_MCU_ROM_PATCH_OFFSET);
@@ -170,7 +170,7 @@ static int
mt76pci_load_firmware(struct mt76x2_dev *dev)
{
const struct firmware *fw;
- const struct mt76x2_fw_header *hdr;
+ const struct mt76x02_fw_header *hdr;
int len, ret;
__le32 *cur;
u32 offset, val;
@@ -182,7 +182,7 @@ mt76pci_load_firmware(struct mt76x2_dev *dev)
if (!fw || !fw->data || fw->size < sizeof(*hdr))
goto error;
- hdr = (const struct mt76x2_fw_header *) fw->data;
+ hdr = (const struct mt76x02_fw_header *)fw->data;
len = sizeof(*hdr);
len += le32_to_cpu(hdr->ilm_len);