xref: /openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
1163f4d22SSean Wang /* SPDX-License-Identifier: ISC */
2163f4d22SSean Wang /* Copyright (C) 2020 MediaTek Inc. */
3163f4d22SSean Wang 
4163f4d22SSean Wang #ifndef __MT7921_H
5163f4d22SSean Wang #define __MT7921_H
6163f4d22SSean Wang 
71c42e0f2SLorenzo Bianconi #include "../mt792x.h"
8163f4d22SSean Wang #include "regs.h"
9163f4d22SSean Wang 
10163f4d22SSean Wang #define MT7921_TX_RING_SIZE		2048
11163f4d22SSean Wang #define MT7921_TX_MCU_RING_SIZE		256
12163f4d22SSean Wang #define MT7921_TX_FWDL_RING_SIZE	128
13163f4d22SSean Wang 
14163f4d22SSean Wang #define MT7921_RX_RING_SIZE		1536
15163f4d22SSean Wang #define MT7921_RX_MCU_RING_SIZE		512
16163f4d22SSean Wang 
17163f4d22SSean Wang #define MT7921_EEPROM_SIZE		3584
18163f4d22SSean Wang #define MT7921_TOKEN_SIZE		8192
19163f4d22SSean Wang 
2023bdc5d8SMing Yen Hsieh #define MT7921_EEPROM_BLOCK_SIZE	16
2123bdc5d8SMing Yen Hsieh 
22163f4d22SSean Wang #define MT7921_SKU_RATE_NUM		161
23163f4d22SSean Wang #define MT7921_SKU_MAX_DELTA_IDX	MT7921_SKU_RATE_NUM
24163f4d22SSean Wang #define MT7921_SKU_TABLE_SIZE		(MT7921_SKU_RATE_NUM + 1)
25163f4d22SSean Wang 
2648fab5bbSSean Wang #define MT7921_SDIO_HDR_TX_BYTES	GENMASK(15, 0)
2748fab5bbSSean Wang #define MT7921_SDIO_HDR_PKT_TYPE	GENMASK(17, 16)
2848fab5bbSSean Wang 
295b55b6daSQuan Zhou #define MCU_UNI_EVENT_ROC  0x27
305b55b6daSQuan Zhou 
315b55b6daSQuan Zhou enum {
325b55b6daSQuan Zhou 	UNI_ROC_ACQUIRE,
335b55b6daSQuan Zhou 	UNI_ROC_ABORT,
345b55b6daSQuan Zhou 	UNI_ROC_NUM
355b55b6daSQuan Zhou };
365b55b6daSQuan Zhou 
375b55b6daSQuan Zhou enum mt7921_roc_req {
385b55b6daSQuan Zhou 	MT7921_ROC_REQ_JOIN,
395b55b6daSQuan Zhou 	MT7921_ROC_REQ_ROC,
405b55b6daSQuan Zhou 	MT7921_ROC_REQ_NUM
415b55b6daSQuan Zhou };
425b55b6daSQuan Zhou 
43034ae28bSSean Wang enum {
44034ae28bSSean Wang 	UNI_EVENT_ROC_GRANT = 0,
45034ae28bSSean Wang 	UNI_EVENT_ROC_TAG_NUM
46034ae28bSSean Wang };
47034ae28bSSean Wang 
48034ae28bSSean Wang struct mt7921_realease_info {
49034ae28bSSean Wang 	__le16 len;
50034ae28bSSean Wang 	u8 pad_len;
51034ae28bSSean Wang 	u8 tag;
52034ae28bSSean Wang } __packed;
53034ae28bSSean Wang 
54034ae28bSSean Wang struct mt7921_fw_features {
55034ae28bSSean Wang 	u8 segment;
56034ae28bSSean Wang 	u8 data;
57034ae28bSSean Wang 	u8 rsv[14];
58034ae28bSSean Wang } __packed;
59034ae28bSSean Wang 
60034ae28bSSean Wang struct mt7921_roc_grant_tlv {
61034ae28bSSean Wang 	__le16 tag;
62034ae28bSSean Wang 	__le16 len;
63034ae28bSSean Wang 	u8 bss_idx;
64034ae28bSSean Wang 	u8 tokenid;
65034ae28bSSean Wang 	u8 status;
66034ae28bSSean Wang 	u8 primarychannel;
67034ae28bSSean Wang 	u8 rfsco;
68034ae28bSSean Wang 	u8 rfband;
69034ae28bSSean Wang 	u8 channelwidth;
70034ae28bSSean Wang 	u8 centerfreqseg1;
71034ae28bSSean Wang 	u8 centerfreqseg2;
72034ae28bSSean Wang 	u8 reqtype;
73034ae28bSSean Wang 	u8 dbdcband;
74034ae28bSSean Wang 	u8 rsv[1];
75034ae28bSSean Wang 	__le32 max_interval;
76034ae28bSSean Wang } __packed;
77034ae28bSSean Wang 
7848fab5bbSSean Wang enum mt7921_sdio_pkt_type {
7948fab5bbSSean Wang 	MT7921_SDIO_TXD,
8048fab5bbSSean Wang 	MT7921_SDIO_DATA,
8148fab5bbSSean Wang 	MT7921_SDIO_CMD,
8248fab5bbSSean Wang 	MT7921_SDIO_FWDL,
8348fab5bbSSean Wang };
8448fab5bbSSean Wang 
8548fab5bbSSean Wang struct mt7921_sdio_intr {
8648fab5bbSSean Wang 	u32 isr;
8748fab5bbSSean Wang 	struct {
8848fab5bbSSean Wang 		u32 wtqcr[16];
8948fab5bbSSean Wang 	} tx;
9048fab5bbSSean Wang 	struct {
9148fab5bbSSean Wang 		u16 num[2];
9248fab5bbSSean Wang 		u16 len0[16];
9348fab5bbSSean Wang 		u16 len1[128];
9448fab5bbSSean Wang 	} rx;
9548fab5bbSSean Wang 	u32 rec_mb[2];
9648fab5bbSSean Wang } __packed;
9748fab5bbSSean Wang 
9893c81df5SLorenzo Bianconi #define to_rssi(field, rxv)		((FIELD_GET(field, rxv) - 220) / 2)
9993c81df5SLorenzo Bianconi #define to_rcpi(rssi)			(2 * (rssi) + 220)
10093c81df5SLorenzo Bianconi 
101163f4d22SSean Wang enum mt7921_txq_id {
102163f4d22SSean Wang 	MT7921_TXQ_BAND0,
103163f4d22SSean Wang 	MT7921_TXQ_BAND1,
104163f4d22SSean Wang 	MT7921_TXQ_FWDL = 16,
105163f4d22SSean Wang 	MT7921_TXQ_MCU_WM,
106163f4d22SSean Wang };
107163f4d22SSean Wang 
108163f4d22SSean Wang enum mt7921_rxq_id {
109163f4d22SSean Wang 	MT7921_RXQ_BAND0 = 0,
110163f4d22SSean Wang 	MT7921_RXQ_BAND1,
111163f4d22SSean Wang 	MT7921_RXQ_MCU_WM = 0,
112163f4d22SSean Wang };
113163f4d22SSean Wang 
11423bdc5d8SMing Yen Hsieh enum {
11523bdc5d8SMing Yen Hsieh 	MT7921_CLC_POWER,
11623bdc5d8SMing Yen Hsieh 	MT7921_CLC_CHAN,
11723bdc5d8SMing Yen Hsieh 	MT7921_CLC_MAX_NUM,
11823bdc5d8SMing Yen Hsieh };
11923bdc5d8SMing Yen Hsieh 
12023bdc5d8SMing Yen Hsieh struct mt7921_clc_rule {
12123bdc5d8SMing Yen Hsieh 	u8 alpha2[2];
12223bdc5d8SMing Yen Hsieh 	u8 type[2];
12323bdc5d8SMing Yen Hsieh 	__le16 len;
12423bdc5d8SMing Yen Hsieh 	u8 data[];
12523bdc5d8SMing Yen Hsieh } __packed;
12623bdc5d8SMing Yen Hsieh 
12723bdc5d8SMing Yen Hsieh struct mt7921_clc {
12823bdc5d8SMing Yen Hsieh 	__le32 len;
12923bdc5d8SMing Yen Hsieh 	u8 idx;
13023bdc5d8SMing Yen Hsieh 	u8 ver;
13123bdc5d8SMing Yen Hsieh 	u8 nr_country;
13223bdc5d8SMing Yen Hsieh 	u8 type;
13323bdc5d8SMing Yen Hsieh 	u8 rsv[8];
13423bdc5d8SMing Yen Hsieh 	u8 data[];
135e5c6bc6fSDeren Wu } __packed;
13623bdc5d8SMing Yen Hsieh 
13750cc972dSLorenzo Bianconi enum mt7921_eeprom_field {
13850cc972dSLorenzo Bianconi 	MT_EE_CHIP_ID =		0x000,
13950cc972dSLorenzo Bianconi 	MT_EE_VERSION =		0x002,
14050cc972dSLorenzo Bianconi 	MT_EE_MAC_ADDR =	0x004,
14150cc972dSLorenzo Bianconi 	MT_EE_WIFI_CONF =	0x07c,
14250cc972dSLorenzo Bianconi 	MT_EE_HW_TYPE =		0x55b,
14350cc972dSLorenzo Bianconi 	__MT_EE_MAX =		0x9ff
14450cc972dSLorenzo Bianconi };
14550cc972dSLorenzo Bianconi 
14650cc972dSLorenzo Bianconi #define MT_EE_HW_TYPE_ENCAP			BIT(0)
14750cc972dSLorenzo Bianconi 
148163f4d22SSean Wang enum {
149ea29acc9SSean Wang 	TXPWR_USER,
150ea29acc9SSean Wang 	TXPWR_EEPROM,
151ea29acc9SSean Wang 	TXPWR_MAC,
152ea29acc9SSean Wang 	TXPWR_MAX_NUM,
153ea29acc9SSean Wang };
154ea29acc9SSean Wang 
155ea29acc9SSean Wang struct mt7921_txpwr {
156ea29acc9SSean Wang 	u8 ch;
157ea29acc9SSean Wang 	u8 rsv[3];
158ea29acc9SSean Wang 	struct {
159ea29acc9SSean Wang 		u8 ch;
160ea29acc9SSean Wang 		u8 cck[4];
161ea29acc9SSean Wang 		u8 ofdm[8];
162ea29acc9SSean Wang 		u8 ht20[8];
163ea29acc9SSean Wang 		u8 ht40[9];
164ea29acc9SSean Wang 		u8 vht20[12];
165ea29acc9SSean Wang 		u8 vht40[12];
166ea29acc9SSean Wang 		u8 vht80[12];
167ea29acc9SSean Wang 		u8 vht160[12];
168ea29acc9SSean Wang 		u8 he26[12];
169ea29acc9SSean Wang 		u8 he52[12];
170ea29acc9SSean Wang 		u8 he106[12];
171ea29acc9SSean Wang 		u8 he242[12];
172ea29acc9SSean Wang 		u8 he484[12];
173ea29acc9SSean Wang 		u8 he996[12];
174ea29acc9SSean Wang 		u8 he996x2[12];
175ea29acc9SSean Wang 	} data[TXPWR_MAX_NUM];
176ea29acc9SSean Wang };
177ea29acc9SSean Wang 
178163f4d22SSean Wang extern const struct ieee80211_ops mt7921_ops;
179163f4d22SSean Wang 
180975e122dSLorenzo Bianconi u32 mt7921_reg_map(struct mt792x_dev *dev, u32 addr);
181163f4d22SSean Wang 
18278562b2cSLorenzo Bianconi int __mt7921_start(struct mt792x_phy *phy);
183975e122dSLorenzo Bianconi int mt7921_register_device(struct mt792x_dev *dev);
184975e122dSLorenzo Bianconi void mt7921_unregister_device(struct mt792x_dev *dev);
185975e122dSLorenzo Bianconi int mt7921_run_firmware(struct mt792x_dev *dev);
186975e122dSLorenzo Bianconi int mt7921_mcu_set_bss_pm(struct mt792x_dev *dev, struct ieee80211_vif *vif,
1879d958b60SDeren Wu 			  bool enable);
188975e122dSLorenzo Bianconi int mt7921_mcu_sta_update(struct mt792x_dev *dev, struct ieee80211_sta *sta,
189f5056657SSean Wang 			  struct ieee80211_vif *vif, bool enable,
190f5056657SSean Wang 			  enum mt76_sta_info_state state);
19178562b2cSLorenzo Bianconi int mt7921_mcu_set_chan_info(struct mt792x_phy *phy, int cmd);
192975e122dSLorenzo Bianconi int mt7921_mcu_set_tx(struct mt792x_dev *dev, struct ieee80211_vif *vif);
193975e122dSLorenzo Bianconi int mt7921_mcu_set_eeprom(struct mt792x_dev *dev);
19478562b2cSLorenzo Bianconi int mt7921_mcu_get_rx_rate(struct mt792x_phy *phy, struct ieee80211_vif *vif,
19567aa2743SLorenzo Bianconi 			   struct ieee80211_sta *sta, struct rate_info *rate);
196975e122dSLorenzo Bianconi int mt7921_mcu_fw_log_2_host(struct mt792x_dev *dev, u8 ctrl);
197975e122dSLorenzo Bianconi void mt7921_mcu_rx_event(struct mt792x_dev *dev, struct sk_buff *skb);
198975e122dSLorenzo Bianconi int mt7921_mcu_set_rxfilter(struct mt792x_dev *dev, u32 fif,
199c222f77fSNeil Chen 			    u8 bit_op, u32 bit_map);
200163f4d22SSean Wang 
201163f4d22SSean Wang static inline u32
mt7921_reg_map_l1(struct mt792x_dev * dev,u32 addr)202975e122dSLorenzo Bianconi mt7921_reg_map_l1(struct mt792x_dev *dev, u32 addr)
203163f4d22SSean Wang {
204163f4d22SSean Wang 	u32 offset = FIELD_GET(MT_HIF_REMAP_L1_OFFSET, addr);
205163f4d22SSean Wang 	u32 base = FIELD_GET(MT_HIF_REMAP_L1_BASE, addr);
206163f4d22SSean Wang 
207163f4d22SSean Wang 	mt76_rmw_field(dev, MT_HIF_REMAP_L1, MT_HIF_REMAP_L1_MASK, base);
208163f4d22SSean Wang 	/* use read to push write */
209163f4d22SSean Wang 	mt76_rr(dev, MT_HIF_REMAP_L1);
210163f4d22SSean Wang 
211163f4d22SSean Wang 	return MT_HIF_REMAP_BASE_L1 + offset;
212163f4d22SSean Wang }
213163f4d22SSean Wang 
214163f4d22SSean Wang static inline u32
mt7921_l1_rr(struct mt792x_dev * dev,u32 addr)215975e122dSLorenzo Bianconi mt7921_l1_rr(struct mt792x_dev *dev, u32 addr)
216163f4d22SSean Wang {
217163f4d22SSean Wang 	return mt76_rr(dev, mt7921_reg_map_l1(dev, addr));
218163f4d22SSean Wang }
219163f4d22SSean Wang 
220163f4d22SSean Wang static inline void
mt7921_l1_wr(struct mt792x_dev * dev,u32 addr,u32 val)221975e122dSLorenzo Bianconi mt7921_l1_wr(struct mt792x_dev *dev, u32 addr, u32 val)
222163f4d22SSean Wang {
223163f4d22SSean Wang 	mt76_wr(dev, mt7921_reg_map_l1(dev, addr), val);
224163f4d22SSean Wang }
225163f4d22SSean Wang 
226163f4d22SSean Wang static inline u32
mt7921_l1_rmw(struct mt792x_dev * dev,u32 addr,u32 mask,u32 val)227975e122dSLorenzo Bianconi mt7921_l1_rmw(struct mt792x_dev *dev, u32 addr, u32 mask, u32 val)
228163f4d22SSean Wang {
229163f4d22SSean Wang 	val |= mt7921_l1_rr(dev, addr) & ~mask;
230163f4d22SSean Wang 	mt7921_l1_wr(dev, addr, val);
231163f4d22SSean Wang 
232163f4d22SSean Wang 	return val;
233163f4d22SSean Wang }
234163f4d22SSean Wang 
235163f4d22SSean Wang #define mt7921_l1_set(dev, addr, val)	mt7921_l1_rmw(dev, addr, 0, val)
236163f4d22SSean Wang #define mt7921_l1_clear(dev, addr, val)	mt7921_l1_rmw(dev, addr, val, 0)
237163f4d22SSean Wang 
238b72fd217SLorenzo Bianconi static inline void
mt7921_skb_add_usb_sdio_hdr(struct mt792x_dev * dev,struct sk_buff * skb,int type)239975e122dSLorenzo Bianconi mt7921_skb_add_usb_sdio_hdr(struct mt792x_dev *dev, struct sk_buff *skb,
240b72fd217SLorenzo Bianconi 			    int type)
24148fab5bbSSean Wang {
242b72fd217SLorenzo Bianconi 	u32 hdr, len;
24348fab5bbSSean Wang 
244b72fd217SLorenzo Bianconi 	len = mt76_is_usb(&dev->mt76) ? skb->len : skb->len + sizeof(hdr);
245b72fd217SLorenzo Bianconi 	hdr = FIELD_PREP(MT7921_SDIO_HDR_TX_BYTES, len) |
24648fab5bbSSean Wang 	      FIELD_PREP(MT7921_SDIO_HDR_PKT_TYPE, type);
24748fab5bbSSean Wang 
24848fab5bbSSean Wang 	put_unaligned_le32(hdr, skb_push(skb, sizeof(hdr)));
24948fab5bbSSean Wang }
25048fab5bbSSean Wang 
2510d2afe09SLorenzo Bianconi void mt7921_stop(struct ieee80211_hw *hw);
252975e122dSLorenzo Bianconi int mt7921_mac_init(struct mt792x_dev *dev);
253*c74df1c0SLorenzo Bianconi bool mt7921_mac_wtbl_update(struct mt792x_dev *dev, int idx, u32 mask);
254163f4d22SSean Wang int mt7921_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
255163f4d22SSean Wang 		       struct ieee80211_sta *sta);
256f5056657SSean Wang void mt7921_mac_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif,
257f5056657SSean Wang 			  struct ieee80211_sta *sta);
258163f4d22SSean Wang void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
259163f4d22SSean Wang 			   struct ieee80211_sta *sta);
260163f4d22SSean Wang void mt7921_mac_reset_work(struct work_struct *work);
261576b4484SSean Wang int mt7921e_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
262163f4d22SSean Wang 			   enum mt76_txq_id qid, struct mt76_wcid *wcid,
263163f4d22SSean Wang 			   struct ieee80211_sta *sta,
264163f4d22SSean Wang 			   struct mt76_tx_info *tx_info);
2659800462dSLorenzo Bianconi 
26612d7440eSLorenzo Bianconi bool mt7921_rx_check(struct mt76_dev *mdev, void *data, int len);
267163f4d22SSean Wang void mt7921_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
268c3137942SSujuan Chen 			 struct sk_buff *skb, u32 *info);
269163f4d22SSean Wang void mt7921_stats_work(struct work_struct *work);
27078562b2cSLorenzo Bianconi void mt7921_set_stream_he_caps(struct mt792x_phy *phy);
271975e122dSLorenzo Bianconi int mt7921_init_debugfs(struct mt792x_dev *dev);
272163f4d22SSean Wang 
273975e122dSLorenzo Bianconi int mt7921_mcu_set_beacon_filter(struct mt792x_dev *dev,
274890809caSLorenzo Bianconi 				 struct ieee80211_vif *vif,
275890809caSLorenzo Bianconi 				 bool enable);
276975e122dSLorenzo Bianconi int mt7921_mcu_uni_tx_ba(struct mt792x_dev *dev,
277163f4d22SSean Wang 			 struct ieee80211_ampdu_params *params,
278163f4d22SSean Wang 			 bool enable);
279975e122dSLorenzo Bianconi int mt7921_mcu_uni_rx_ba(struct mt792x_dev *dev,
280163f4d22SSean Wang 			 struct ieee80211_ampdu_params *params,
281163f4d22SSean Wang 			 bool enable);
282163f4d22SSean Wang void mt7921_scan_work(struct work_struct *work);
283034ae28bSSean Wang void mt7921_roc_work(struct work_struct *work);
284975e122dSLorenzo Bianconi int mt7921_mcu_uni_bss_ps(struct mt792x_dev *dev, struct ieee80211_vif *vif);
2850da3c795SSean Wang void mt7921_coredump_work(struct work_struct *work);
286975e122dSLorenzo Bianconi int mt7921_get_txpwr_info(struct mt792x_dev *dev, struct mt7921_txpwr *txpwr);
287bce84458SLorenzo Bianconi int mt7921_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
288bce84458SLorenzo Bianconi 			void *data, int len);
289bce84458SLorenzo Bianconi int mt7921_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *msg,
290bce84458SLorenzo Bianconi 			 struct netlink_callback *cb, void *data, int len);
291dfc7743dSSean Wang int mt7921_mcu_parse_response(struct mt76_dev *mdev, int cmd,
292dfc7743dSSean Wang 			      struct sk_buff *skb, int seq);
293dfc7743dSSean Wang 
294975e122dSLorenzo Bianconi int mt7921e_driver_own(struct mt792x_dev *dev);
295975e122dSLorenzo Bianconi int mt7921e_mac_reset(struct mt792x_dev *dev);
296975e122dSLorenzo Bianconi int mt7921e_mcu_init(struct mt792x_dev *dev);
297975e122dSLorenzo Bianconi int mt7921s_wfsys_reset(struct mt792x_dev *dev);
298975e122dSLorenzo Bianconi int mt7921s_mac_reset(struct mt792x_dev *dev);
299975e122dSLorenzo Bianconi int mt7921s_init_reset(struct mt792x_dev *dev);
300dfc7743dSSean Wang 
301975e122dSLorenzo Bianconi int mt7921s_mcu_init(struct mt792x_dev *dev);
302975e122dSLorenzo Bianconi int mt7921s_mcu_drv_pmctrl(struct mt792x_dev *dev);
303975e122dSLorenzo Bianconi int mt7921s_mcu_fw_pmctrl(struct mt792x_dev *dev);
304975e122dSLorenzo Bianconi void mt7921_mac_add_txs(struct mt792x_dev *dev, void *data);
305975e122dSLorenzo Bianconi void mt7921_set_runtime_pm(struct mt792x_dev *dev);
3065fc201aaSDeren Wu void mt7921_mcu_set_suspend_iter(void *priv, u8 *mac,
3075fc201aaSDeren Wu 				 struct ieee80211_vif *vif);
3085fc201aaSDeren Wu void mt7921_set_ipv6_ns_work(struct work_struct *work);
3095fc201aaSDeren Wu 
310975e122dSLorenzo Bianconi int mt7921_mcu_set_sniffer(struct mt792x_dev *dev, struct ieee80211_vif *vif,
311cbaa0a40SSean Wang 			   bool enable);
31215ca8970SLorenzo Bianconi int mt7921_mcu_config_sniffer(struct mt792x_vif *vif,
313914189afSDeren Wu 			      struct ieee80211_chanctx_conf *ctx);
31478562b2cSLorenzo Bianconi int mt7921_mcu_get_temperature(struct mt792x_phy *phy);
3155b834b0dSLorenzo Bianconi 
3165b834b0dSLorenzo Bianconi int mt7921_usb_sdio_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
3175b834b0dSLorenzo Bianconi 				   enum mt76_txq_id qid, struct mt76_wcid *wcid,
3185b834b0dSLorenzo Bianconi 				   struct ieee80211_sta *sta,
3195b834b0dSLorenzo Bianconi 				   struct mt76_tx_info *tx_info);
3209da47b50SLorenzo Bianconi void mt7921_usb_sdio_tx_complete_skb(struct mt76_dev *mdev,
3219da47b50SLorenzo Bianconi 				     struct mt76_queue_entry *e);
3228b7a56d5SLorenzo Bianconi bool mt7921_usb_sdio_tx_status_data(struct mt76_dev *mdev, u8 *update);
3230d2afe09SLorenzo Bianconi 
3240d2afe09SLorenzo Bianconi /* usb */
325975e122dSLorenzo Bianconi int mt7921_mcu_uni_add_beacon_offload(struct mt792x_dev *dev,
326116c6960SSean Wang 				      struct ieee80211_hw *hw,
327116c6960SSean Wang 				      struct ieee80211_vif *vif,
328116c6960SSean Wang 				      bool enable);
32963db9d40SDeren Wu int mt7921_set_tx_sar_pwr(struct ieee80211_hw *hw,
33063db9d40SDeren Wu 			  const struct cfg80211_sar_specs *sar);
33123bdc5d8SMing Yen Hsieh 
332975e122dSLorenzo Bianconi int mt7921_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2,
33323bdc5d8SMing Yen Hsieh 		       enum environment_cap env_cap);
33478562b2cSLorenzo Bianconi int mt7921_mcu_set_roc(struct mt792x_phy *phy, struct mt792x_vif *vif,
3355b55b6daSQuan Zhou 		       struct ieee80211_channel *chan, int duration,
3365b55b6daSQuan Zhou 		       enum mt7921_roc_req type, u8 token_id);
33778562b2cSLorenzo Bianconi int mt7921_mcu_abort_roc(struct mt792x_phy *phy, struct mt792x_vif *vif,
3385b55b6daSQuan Zhou 			 u8 token_id);
339163f4d22SSean Wang #endif
340