1 /* SPDX-License-Identifier: ISC */
6 struct mt7603_mcu_txd
{
20 u32 au4_d3_to_d7_rev
[5];
21 } __packed
__aligned(4);
23 struct mt7603_mcu_rxd
{
35 #define MCU_PKT_ID 0xa0
36 #define MCU_PORT_QUEUE 0x8000
37 #define MCU_PORT_QUEUE_FW 0xc000
39 #define MCU_FIRMWARE_ADDRESS 0x100000
49 MCU_CMD_TARGET_ADDRESS_LEN_REQ
= 0x01,
50 MCU_CMD_FW_START_REQ
= 0x02,
51 MCU_CMD_INIT_ACCESS_REG
= 0x3,
52 MCU_CMD_PATCH_START_REQ
= 0x05,
53 MCU_CMD_PATCH_FINISH_REQ
= 0x07,
54 MCU_CMD_PATCH_SEM_CONTROL
= 0x10,
55 MCU_CMD_HIF_LOOPBACK
= 0x20,
56 MCU_CMD_CH_PRIVILEGE
= 0x20,
57 MCU_CMD_ACCESS_REG
= 0xC2,
58 MCU_CMD_EXT_CID
= 0xED,
59 MCU_CMD_FW_SCATTER
= 0xEE,
60 MCU_CMD_RESTART_DL_REQ
= 0xEF,
64 MCU_EXT_CMD_RF_REG_ACCESS
= 0x02,
65 MCU_EXT_CMD_RF_TEST
= 0x04,
66 MCU_EXT_CMD_RADIO_ON_OFF_CTRL
= 0x05,
67 MCU_EXT_CMD_WIFI_RX_DISABLE
= 0x06,
68 MCU_EXT_CMD_PM_STATE_CTRL
= 0x07,
69 MCU_EXT_CMD_CHANNEL_SWITCH
= 0x08,
70 MCU_EXT_CMD_NIC_CAPABILITY
= 0x09,
71 MCU_EXT_CMD_PWR_SAVING
= 0x0A,
72 MCU_EXT_CMD_MULTIPLE_REG_ACCESS
= 0x0E,
73 MCU_EXT_CMD_AP_PWR_SAVING_CAPABILITY
= 0xF,
74 MCU_EXT_CMD_SEC_ADDREMOVE_KEY
= 0x10,
75 MCU_EXT_CMD_SET_TX_POWER_CTRL
= 0x11,
76 MCU_EXT_CMD_FW_LOG_2_HOST
= 0x13,
77 MCU_EXT_CMD_PS_RETRIEVE_START
= 0x14,
78 MCU_EXT_CMD_LED_CTRL
= 0x17,
79 MCU_EXT_CMD_PACKET_FILTER
= 0x18,
80 MCU_EXT_CMD_PWR_MGT_BIT_WIFI
= 0x1B,
81 MCU_EXT_CMD_EFUSE_BUFFER_MODE
= 0x21,
82 MCU_EXT_CMD_THERMAL_PROTECT
= 0x23,
83 MCU_EXT_CMD_EDCA_SET
= 0x27,
84 MCU_EXT_CMD_SLOT_TIME_SET
= 0x28,
85 MCU_EXT_CMD_CONFIG_INTERNAL_SETTING
= 0x29,
86 MCU_EXT_CMD_NOA_OFFLOAD_CTRL
= 0x2B,
87 MCU_EXT_CMD_GET_THEMAL_SENSOR
= 0x2C,
88 MCU_EXT_CMD_WAKEUP_OPTION
= 0x2E,
89 MCU_EXT_CMD_AC_QUEUE_CONTROL
= 0x31,
90 MCU_EXT_CMD_BCN_UPDATE
= 0x33
94 MCU_EXT_EVENT_CMD_RESULT
= 0x0,
95 MCU_EXT_EVENT_RF_REG_ACCESS
= 0x2,
96 MCU_EXT_EVENT_MULTI_CR_ACCESS
= 0x0E,
97 MCU_EXT_EVENT_FW_LOG_2_HOST
= 0x13,
98 MCU_EXT_EVENT_BEACON_LOSS
= 0x1A,
99 MCU_EXT_EVENT_THERMAL_PROTECT
= 0x22,
100 MCU_EXT_EVENT_BCN_UPDATE
= 0x31,
103 static inline struct sk_buff
*
104 mt7603_mcu_msg_alloc(const void *data
, int len
)
106 return mt76_mcu_msg_alloc(data
, sizeof(struct mt7603_mcu_txd
),