summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7615/mcu.h
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2020-03-17 19:41:20 +0300
committerFelix Fietkau <nbd@nbd.name>2020-03-17 19:47:55 +0300
commit3b862bad349ae8704e1843850cb0732c7592b8cc (patch)
tree21d5af342161fe664d5e013facc385c1bc661eec /drivers/net/wireless/mediatek/mt76/mt7615/mcu.h
parent062c3699b9fde3ac9e3e5c2dadab1cd8bb65bbb6 (diff)
downloadlinux-3b862bad349ae8704e1843850cb0732c7592b8cc.tar.xz
mt76: mt7615: introduce MCU_FW_PREFIX for fw mcu commands
Currently fw commands rely on negative cmds since they need different mcu msg metadata. Extend this approach introducing MCU_FW_PREFIX. This is a preliminary patch to support new mt7663e firmware commands Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7615/mcu.h')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7615/mcu.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.h b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.h
index c84695facf08..8ae08a2bf10d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.h
@@ -179,16 +179,19 @@ enum {
MCU_S2D_H2CN
};
+#define MCU_FW_PREFIX BIT(31)
+#define MCU_CMD_MASK ~MCU_FW_PREFIX
+
enum {
- MCU_CMD_TARGET_ADDRESS_LEN_REQ = 0x01,
- MCU_CMD_FW_START_REQ = 0x02,
+ MCU_CMD_TARGET_ADDRESS_LEN_REQ = MCU_FW_PREFIX | 0x01,
+ MCU_CMD_FW_START_REQ = MCU_FW_PREFIX | 0x02,
MCU_CMD_INIT_ACCESS_REG = 0x3,
MCU_CMD_PATCH_START_REQ = 0x05,
- MCU_CMD_PATCH_FINISH_REQ = 0x07,
- MCU_CMD_PATCH_SEM_CONTROL = 0x10,
+ MCU_CMD_PATCH_FINISH_REQ = MCU_FW_PREFIX | 0x07,
+ MCU_CMD_PATCH_SEM_CONTROL = MCU_FW_PREFIX | 0x10,
MCU_CMD_EXT_CID = 0xED,
- MCU_CMD_FW_SCATTER = 0xEE,
- MCU_CMD_RESTART_DL_REQ = 0xEF,
+ MCU_CMD_FW_SCATTER = MCU_FW_PREFIX | 0xEE,
+ MCU_CMD_RESTART_DL_REQ = MCU_FW_PREFIX | 0xEF,
};
enum {