1 /* SPDX-License-Identifier: ISC */
2 /* Copyright (C) 2019 MediaTek Inc. */
7 #include "../mt76_connac_mcu.h"
9 struct mt7615_mcu_txd
{
17 u8 set_query
; /* FW don't care */
26 } __packed
__aligned(4);
29 * struct mt7615_uni_txd - mcu command descriptor for firmware v3
30 * @txd: hardware descriptor
31 * @len: total length not including txd
32 * @cid: command identifier
33 * @pkt_type: must be 0xa0 (cmd packet by long format)
34 * @frag_n: fragment number
35 * @seq: sequence number
36 * @checksum: 0 mean there is no checksum
37 * @s2d_index: index for command source and destination
38 * Definition | value | note
39 * CMD_S2D_IDX_H2N | 0x00 | command from HOST to WM
40 * CMD_S2D_IDX_C2N | 0x01 | command from WA to WM
41 * CMD_S2D_IDX_H2C | 0x02 | command from HOST to WA
42 * CMD_S2D_IDX_H2N_AND_H2C | 0x03 | command from HOST to WA and WM
44 * @option: command option
45 * BIT[0]: UNI_CMD_OPT_BIT_ACK
46 * set to 1 to request a fw reply
47 * if UNI_CMD_OPT_BIT_0_ACK is set and UNI_CMD_OPT_BIT_2_SET_QUERY
48 * is set, mcu firmware will send response event EID = 0x01
49 * (UNI_EVENT_ID_CMD_RESULT) to the host.
50 * BIT[1]: UNI_CMD_OPT_BIT_UNI_CMD
53 * BIT[2]: UNI_CMD_OPT_BIT_SET_QUERY
57 struct mt7615_uni_txd
{
77 } __packed
__aligned(4);
90 MT_SKU_HT20_3_4_11_12
,
97 MT_SKU_HT40_3_4_11_12
,
135 struct mt7615_mcu_rxd
{
150 struct mt7615_mcu_csa_notify
{
151 struct mt7615_mcu_rxd rxd
;
158 struct mt7615_mcu_rdd_report
{
159 struct mt7615_mcu_rxd rxd
;
163 u8 constant_prf_detected
;
164 u8 staggered_prf_detected
;
166 u8 periodic_pulse_num
;
180 __le32 out_pri_const
;
181 __le32 out_pri_stg
[3];
193 } periodic_pulse
[32];
205 MCU_ATE_SET_FREQ_OFFSET
= 0xa,
206 MCU_ATE_SET_TX_POWER_CONTROL
= 0x15,
209 struct mt7615_roc_tlv
{
216 u8 width
; /* To support 80/160MHz bandwidth */
217 u8 freq_seg1
; /* To support 80/160MHz bandwidth */
218 u8 freq_seg2
; /* To support 80/160MHz bandwidth */
222 __le32 max_interval
; /* ms */