mt76_connac_mcu.h 25 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097
  1. /* SPDX-License-Identifier: ISC */
  2. /* Copyright (C) 2020 MediaTek Inc. */
  3. #ifndef __MT76_CONNAC_MCU_H
  4. #define __MT76_CONNAC_MCU_H
  5. #include "mt76_connac.h"
  6. struct tlv {
  7. __le16 tag;
  8. __le16 len;
  9. } __packed;
  10. /* sta_rec */
  11. struct sta_ntlv_hdr {
  12. u8 rsv[2];
  13. __le16 tlv_num;
  14. } __packed;
  15. struct sta_req_hdr {
  16. u8 bss_idx;
  17. u8 wlan_idx_lo;
  18. __le16 tlv_num;
  19. u8 is_tlv_append;
  20. u8 muar_idx;
  21. u8 wlan_idx_hi;
  22. u8 rsv;
  23. } __packed;
  24. struct sta_rec_basic {
  25. __le16 tag;
  26. __le16 len;
  27. __le32 conn_type;
  28. u8 conn_state;
  29. u8 qos;
  30. __le16 aid;
  31. u8 peer_addr[ETH_ALEN];
  32. #define EXTRA_INFO_VER BIT(0)
  33. #define EXTRA_INFO_NEW BIT(1)
  34. __le16 extra_info;
  35. } __packed;
  36. struct sta_rec_ht {
  37. __le16 tag;
  38. __le16 len;
  39. __le16 ht_cap;
  40. u16 rsv;
  41. } __packed;
  42. struct sta_rec_vht {
  43. __le16 tag;
  44. __le16 len;
  45. __le32 vht_cap;
  46. __le16 vht_rx_mcs_map;
  47. __le16 vht_tx_mcs_map;
  48. /* mt7921 */
  49. u8 rts_bw_sig;
  50. u8 rsv[3];
  51. } __packed;
  52. struct sta_rec_uapsd {
  53. __le16 tag;
  54. __le16 len;
  55. u8 dac_map;
  56. u8 tac_map;
  57. u8 max_sp;
  58. u8 rsv0;
  59. __le16 listen_interval;
  60. u8 rsv1[2];
  61. } __packed;
  62. struct sta_rec_ba {
  63. __le16 tag;
  64. __le16 len;
  65. u8 tid;
  66. u8 ba_type;
  67. u8 amsdu;
  68. u8 ba_en;
  69. __le16 ssn;
  70. __le16 winsize;
  71. } __packed;
  72. struct sta_rec_he {
  73. __le16 tag;
  74. __le16 len;
  75. __le32 he_cap;
  76. u8 t_frame_dur;
  77. u8 max_ampdu_exp;
  78. u8 bw_set;
  79. u8 device_class;
  80. u8 dcm_tx_mode;
  81. u8 dcm_tx_max_nss;
  82. u8 dcm_rx_mode;
  83. u8 dcm_rx_max_nss;
  84. u8 dcm_max_ru;
  85. u8 punc_pream_rx;
  86. u8 pkt_ext;
  87. u8 rsv1;
  88. __le16 max_nss_mcs[CMD_HE_MCS_BW_NUM];
  89. u8 rsv2[2];
  90. } __packed;
  91. struct sta_rec_amsdu {
  92. __le16 tag;
  93. __le16 len;
  94. u8 max_amsdu_num;
  95. u8 max_mpdu_size;
  96. u8 amsdu_en;
  97. u8 rsv;
  98. } __packed;
  99. struct sta_rec_state {
  100. __le16 tag;
  101. __le16 len;
  102. __le32 flags;
  103. u8 state;
  104. u8 vht_opmode;
  105. u8 action;
  106. u8 rsv[1];
  107. } __packed;
  108. #define HT_MCS_MASK_NUM 10
  109. struct sta_rec_ra_info {
  110. __le16 tag;
  111. __le16 len;
  112. __le16 legacy;
  113. u8 rx_mcs_bitmask[HT_MCS_MASK_NUM];
  114. } __packed;
  115. struct sta_rec_phy {
  116. __le16 tag;
  117. __le16 len;
  118. __le16 basic_rate;
  119. u8 phy_type;
  120. u8 ampdu;
  121. u8 rts_policy;
  122. u8 rcpi;
  123. u8 rsv[2];
  124. } __packed;
  125. /* wtbl_rec */
  126. struct wtbl_req_hdr {
  127. u8 wlan_idx_lo;
  128. u8 operation;
  129. __le16 tlv_num;
  130. u8 wlan_idx_hi;
  131. u8 rsv[3];
  132. } __packed;
  133. struct wtbl_generic {
  134. __le16 tag;
  135. __le16 len;
  136. u8 peer_addr[ETH_ALEN];
  137. u8 muar_idx;
  138. u8 skip_tx;
  139. u8 cf_ack;
  140. u8 qos;
  141. u8 mesh;
  142. u8 adm;
  143. __le16 partial_aid;
  144. u8 baf_en;
  145. u8 aad_om;
  146. } __packed;
  147. struct wtbl_rx {
  148. __le16 tag;
  149. __le16 len;
  150. u8 rcid;
  151. u8 rca1;
  152. u8 rca2;
  153. u8 rv;
  154. u8 rsv[4];
  155. } __packed;
  156. struct wtbl_ht {
  157. __le16 tag;
  158. __le16 len;
  159. u8 ht;
  160. u8 ldpc;
  161. u8 af;
  162. u8 mm;
  163. u8 rsv[4];
  164. } __packed;
  165. struct wtbl_vht {
  166. __le16 tag;
  167. __le16 len;
  168. u8 ldpc;
  169. u8 dyn_bw;
  170. u8 vht;
  171. u8 txop_ps;
  172. u8 rsv[4];
  173. } __packed;
  174. struct wtbl_tx_ps {
  175. __le16 tag;
  176. __le16 len;
  177. u8 txps;
  178. u8 rsv[3];
  179. } __packed;
  180. struct wtbl_hdr_trans {
  181. __le16 tag;
  182. __le16 len;
  183. u8 to_ds;
  184. u8 from_ds;
  185. u8 no_rx_trans;
  186. u8 rsv;
  187. } __packed;
  188. struct wtbl_ba {
  189. __le16 tag;
  190. __le16 len;
  191. /* common */
  192. u8 tid;
  193. u8 ba_type;
  194. u8 rsv0[2];
  195. /* originator only */
  196. __le16 sn;
  197. u8 ba_en;
  198. u8 ba_winsize_idx;
  199. __le16 ba_winsize;
  200. /* recipient only */
  201. u8 peer_addr[ETH_ALEN];
  202. u8 rst_ba_tid;
  203. u8 rst_ba_sel;
  204. u8 rst_ba_sb;
  205. u8 band_idx;
  206. u8 rsv1[4];
  207. } __packed;
  208. struct wtbl_smps {
  209. __le16 tag;
  210. __le16 len;
  211. u8 smps;
  212. u8 rsv[3];
  213. } __packed;
  214. /* mt7615 only */
  215. struct wtbl_bf {
  216. __le16 tag;
  217. __le16 len;
  218. u8 ibf;
  219. u8 ebf;
  220. u8 ibf_vht;
  221. u8 ebf_vht;
  222. u8 gid;
  223. u8 pfmu_idx;
  224. u8 rsv[2];
  225. } __packed;
  226. struct wtbl_pn {
  227. __le16 tag;
  228. __le16 len;
  229. u8 pn[6];
  230. u8 rsv[2];
  231. } __packed;
  232. struct wtbl_spe {
  233. __le16 tag;
  234. __le16 len;
  235. u8 spe_idx;
  236. u8 rsv[3];
  237. } __packed;
  238. struct wtbl_raw {
  239. __le16 tag;
  240. __le16 len;
  241. u8 wtbl_idx;
  242. u8 dw;
  243. u8 rsv[2];
  244. __le32 msk;
  245. __le32 val;
  246. } __packed;
  247. #define MT76_CONNAC_WTBL_UPDATE_MAX_SIZE (sizeof(struct wtbl_req_hdr) + \
  248. sizeof(struct wtbl_generic) + \
  249. sizeof(struct wtbl_rx) + \
  250. sizeof(struct wtbl_ht) + \
  251. sizeof(struct wtbl_vht) + \
  252. sizeof(struct wtbl_tx_ps) + \
  253. sizeof(struct wtbl_hdr_trans) +\
  254. sizeof(struct wtbl_ba) + \
  255. sizeof(struct wtbl_bf) + \
  256. sizeof(struct wtbl_smps) + \
  257. sizeof(struct wtbl_pn) + \
  258. sizeof(struct wtbl_spe))
  259. #define MT76_CONNAC_STA_UPDATE_MAX_SIZE (sizeof(struct sta_req_hdr) + \
  260. sizeof(struct sta_rec_basic) + \
  261. sizeof(struct sta_rec_ht) + \
  262. sizeof(struct sta_rec_he) + \
  263. sizeof(struct sta_rec_ba) + \
  264. sizeof(struct sta_rec_vht) + \
  265. sizeof(struct sta_rec_uapsd) + \
  266. sizeof(struct sta_rec_amsdu) + \
  267. sizeof(struct tlv) + \
  268. MT76_CONNAC_WTBL_UPDATE_MAX_SIZE)
  269. enum {
  270. STA_REC_BASIC,
  271. STA_REC_RA,
  272. STA_REC_RA_CMM_INFO,
  273. STA_REC_RA_UPDATE,
  274. STA_REC_BF,
  275. STA_REC_AMSDU,
  276. STA_REC_BA,
  277. STA_REC_STATE,
  278. STA_REC_TX_PROC, /* for hdr trans and CSO in CR4 */
  279. STA_REC_HT,
  280. STA_REC_VHT,
  281. STA_REC_APPS,
  282. STA_REC_KEY,
  283. STA_REC_WTBL,
  284. STA_REC_HE,
  285. STA_REC_HW_AMSDU,
  286. STA_REC_WTBL_AADOM,
  287. STA_REC_KEY_V2,
  288. STA_REC_MURU,
  289. STA_REC_MUEDCA,
  290. STA_REC_BFEE,
  291. STA_REC_PHY = 0x15,
  292. STA_REC_MAX_NUM
  293. };
  294. enum {
  295. WTBL_GENERIC,
  296. WTBL_RX,
  297. WTBL_HT,
  298. WTBL_VHT,
  299. WTBL_PEER_PS, /* not used */
  300. WTBL_TX_PS,
  301. WTBL_HDR_TRANS,
  302. WTBL_SEC_KEY,
  303. WTBL_BA,
  304. WTBL_RDG, /* obsoleted */
  305. WTBL_PROTECT, /* not used */
  306. WTBL_CLEAR, /* not used */
  307. WTBL_BF,
  308. WTBL_SMPS,
  309. WTBL_RAW_DATA, /* debug only */
  310. WTBL_PN,
  311. WTBL_SPE,
  312. WTBL_MAX_NUM
  313. };
  314. #define STA_TYPE_STA BIT(0)
  315. #define STA_TYPE_AP BIT(1)
  316. #define STA_TYPE_ADHOC BIT(2)
  317. #define STA_TYPE_WDS BIT(4)
  318. #define STA_TYPE_BC BIT(5)
  319. #define NETWORK_INFRA BIT(16)
  320. #define NETWORK_P2P BIT(17)
  321. #define NETWORK_IBSS BIT(18)
  322. #define NETWORK_WDS BIT(21)
  323. #define SCAN_FUNC_RANDOM_MAC BIT(0)
  324. #define SCAN_FUNC_SPLIT_SCAN BIT(5)
  325. #define CONNECTION_INFRA_STA (STA_TYPE_STA | NETWORK_INFRA)
  326. #define CONNECTION_INFRA_AP (STA_TYPE_AP | NETWORK_INFRA)
  327. #define CONNECTION_P2P_GC (STA_TYPE_STA | NETWORK_P2P)
  328. #define CONNECTION_P2P_GO (STA_TYPE_AP | NETWORK_P2P)
  329. #define CONNECTION_IBSS_ADHOC (STA_TYPE_ADHOC | NETWORK_IBSS)
  330. #define CONNECTION_WDS (STA_TYPE_WDS | NETWORK_WDS)
  331. #define CONNECTION_INFRA_BC (STA_TYPE_BC | NETWORK_INFRA)
  332. #define CONN_STATE_DISCONNECT 0
  333. #define CONN_STATE_CONNECT 1
  334. #define CONN_STATE_PORT_SECURE 2
  335. /* HE MAC */
  336. #define STA_REC_HE_CAP_HTC BIT(0)
  337. #define STA_REC_HE_CAP_BQR BIT(1)
  338. #define STA_REC_HE_CAP_BSR BIT(2)
  339. #define STA_REC_HE_CAP_OM BIT(3)
  340. #define STA_REC_HE_CAP_AMSDU_IN_AMPDU BIT(4)
  341. /* HE PHY */
  342. #define STA_REC_HE_CAP_DUAL_BAND BIT(5)
  343. #define STA_REC_HE_CAP_LDPC BIT(6)
  344. #define STA_REC_HE_CAP_TRIG_CQI_FK BIT(7)
  345. #define STA_REC_HE_CAP_PARTIAL_BW_EXT_RANGE BIT(8)
  346. /* STBC */
  347. #define STA_REC_HE_CAP_LE_EQ_80M_TX_STBC BIT(9)
  348. #define STA_REC_HE_CAP_LE_EQ_80M_RX_STBC BIT(10)
  349. #define STA_REC_HE_CAP_GT_80M_TX_STBC BIT(11)
  350. #define STA_REC_HE_CAP_GT_80M_RX_STBC BIT(12)
  351. /* GI */
  352. #define STA_REC_HE_CAP_SU_PPDU_1LTF_8US_GI BIT(13)
  353. #define STA_REC_HE_CAP_SU_MU_PPDU_4LTF_8US_GI BIT(14)
  354. #define STA_REC_HE_CAP_ER_SU_PPDU_1LTF_8US_GI BIT(15)
  355. #define STA_REC_HE_CAP_ER_SU_PPDU_4LTF_8US_GI BIT(16)
  356. #define STA_REC_HE_CAP_NDP_4LTF_3DOT2MS_GI BIT(17)
  357. /* 242 TONE */
  358. #define STA_REC_HE_CAP_BW20_RU242_SUPPORT BIT(18)
  359. #define STA_REC_HE_CAP_TX_1024QAM_UNDER_RU242 BIT(19)
  360. #define STA_REC_HE_CAP_RX_1024QAM_UNDER_RU242 BIT(20)
  361. #define PHY_MODE_A BIT(0)
  362. #define PHY_MODE_B BIT(1)
  363. #define PHY_MODE_G BIT(2)
  364. #define PHY_MODE_GN BIT(3)
  365. #define PHY_MODE_AN BIT(4)
  366. #define PHY_MODE_AC BIT(5)
  367. #define PHY_MODE_AX_24G BIT(6)
  368. #define PHY_MODE_AX_5G BIT(7)
  369. #define PHY_MODE_AX_6G BIT(8)
  370. #define MODE_CCK BIT(0)
  371. #define MODE_OFDM BIT(1)
  372. #define MODE_HT BIT(2)
  373. #define MODE_VHT BIT(3)
  374. #define MODE_HE BIT(4)
  375. enum {
  376. PHY_TYPE_HR_DSSS_INDEX = 0,
  377. PHY_TYPE_ERP_INDEX,
  378. PHY_TYPE_ERP_P2P_INDEX,
  379. PHY_TYPE_OFDM_INDEX,
  380. PHY_TYPE_HT_INDEX,
  381. PHY_TYPE_VHT_INDEX,
  382. PHY_TYPE_HE_INDEX,
  383. PHY_TYPE_INDEX_NUM
  384. };
  385. #define PHY_TYPE_BIT_HR_DSSS BIT(PHY_TYPE_HR_DSSS_INDEX)
  386. #define PHY_TYPE_BIT_ERP BIT(PHY_TYPE_ERP_INDEX)
  387. #define PHY_TYPE_BIT_OFDM BIT(PHY_TYPE_OFDM_INDEX)
  388. #define PHY_TYPE_BIT_HT BIT(PHY_TYPE_HT_INDEX)
  389. #define PHY_TYPE_BIT_VHT BIT(PHY_TYPE_VHT_INDEX)
  390. #define PHY_TYPE_BIT_HE BIT(PHY_TYPE_HE_INDEX)
  391. #define MT_WTBL_RATE_TX_MODE GENMASK(9, 6)
  392. #define MT_WTBL_RATE_MCS GENMASK(5, 0)
  393. #define MT_WTBL_RATE_NSS GENMASK(12, 10)
  394. #define MT_WTBL_RATE_HE_GI GENMASK(7, 4)
  395. #define MT_WTBL_RATE_GI GENMASK(3, 0)
  396. #define MT_WTBL_W5_CHANGE_BW_RATE GENMASK(7, 5)
  397. #define MT_WTBL_W5_SHORT_GI_20 BIT(8)
  398. #define MT_WTBL_W5_SHORT_GI_40 BIT(9)
  399. #define MT_WTBL_W5_SHORT_GI_80 BIT(10)
  400. #define MT_WTBL_W5_SHORT_GI_160 BIT(11)
  401. #define MT_WTBL_W5_BW_CAP GENMASK(13, 12)
  402. #define MT_WTBL_W5_MPDU_FAIL_COUNT GENMASK(25, 23)
  403. #define MT_WTBL_W5_MPDU_OK_COUNT GENMASK(28, 26)
  404. #define MT_WTBL_W5_RATE_IDX GENMASK(31, 29)
  405. enum {
  406. WTBL_RESET_AND_SET = 1,
  407. WTBL_SET,
  408. WTBL_QUERY,
  409. WTBL_RESET_ALL
  410. };
  411. enum {
  412. MT_BA_TYPE_INVALID,
  413. MT_BA_TYPE_ORIGINATOR,
  414. MT_BA_TYPE_RECIPIENT
  415. };
  416. enum {
  417. RST_BA_MAC_TID_MATCH,
  418. RST_BA_MAC_MATCH,
  419. RST_BA_NO_MATCH
  420. };
  421. enum {
  422. DEV_INFO_ACTIVE,
  423. DEV_INFO_MAX_NUM
  424. };
  425. #define MCU_CMD_ACK BIT(0)
  426. #define MCU_CMD_UNI BIT(1)
  427. #define MCU_CMD_QUERY BIT(2)
  428. #define MCU_CMD_UNI_EXT_ACK (MCU_CMD_ACK | MCU_CMD_UNI | \
  429. MCU_CMD_QUERY)
  430. #define MCU_FW_PREFIX BIT(31)
  431. #define MCU_UNI_PREFIX BIT(30)
  432. #define MCU_CE_PREFIX BIT(29)
  433. #define MCU_QUERY_PREFIX BIT(28)
  434. #define MCU_CMD_MASK ~(MCU_FW_PREFIX | MCU_UNI_PREFIX | \
  435. MCU_CE_PREFIX | MCU_QUERY_PREFIX)
  436. #define MCU_QUERY_MASK BIT(16)
  437. enum {
  438. MCU_EXT_CMD_EFUSE_ACCESS = 0x01,
  439. MCU_EXT_CMD_RF_REG_ACCESS = 0x02,
  440. MCU_EXT_CMD_PM_STATE_CTRL = 0x07,
  441. MCU_EXT_CMD_CHANNEL_SWITCH = 0x08,
  442. MCU_EXT_CMD_SET_TX_POWER_CTRL = 0x11,
  443. MCU_EXT_CMD_FW_LOG_2_HOST = 0x13,
  444. MCU_EXT_CMD_EFUSE_BUFFER_MODE = 0x21,
  445. MCU_EXT_CMD_STA_REC_UPDATE = 0x25,
  446. MCU_EXT_CMD_BSS_INFO_UPDATE = 0x26,
  447. MCU_EXT_CMD_EDCA_UPDATE = 0x27,
  448. MCU_EXT_CMD_DEV_INFO_UPDATE = 0x2A,
  449. MCU_EXT_CMD_GET_TEMP = 0x2c,
  450. MCU_EXT_CMD_WTBL_UPDATE = 0x32,
  451. MCU_EXT_CMD_SET_RDD_CTRL = 0x3a,
  452. MCU_EXT_CMD_ATE_CTRL = 0x3d,
  453. MCU_EXT_CMD_PROTECT_CTRL = 0x3e,
  454. MCU_EXT_CMD_DBDC_CTRL = 0x45,
  455. MCU_EXT_CMD_MAC_INIT_CTRL = 0x46,
  456. MCU_EXT_CMD_RX_HDR_TRANS = 0x47,
  457. MCU_EXT_CMD_MUAR_UPDATE = 0x48,
  458. MCU_EXT_CMD_BCN_OFFLOAD = 0x49,
  459. MCU_EXT_CMD_SET_RX_PATH = 0x4e,
  460. MCU_EXT_CMD_TX_POWER_FEATURE_CTRL = 0x58,
  461. MCU_EXT_CMD_RXDCOC_CAL = 0x59,
  462. MCU_EXT_CMD_TXDPD_CAL = 0x60,
  463. MCU_EXT_CMD_SET_RDD_TH = 0x7c,
  464. MCU_EXT_CMD_SET_RDD_PATTERN = 0x7d,
  465. };
  466. enum {
  467. MCU_UNI_CMD_DEV_INFO_UPDATE = MCU_UNI_PREFIX | 0x01,
  468. MCU_UNI_CMD_BSS_INFO_UPDATE = MCU_UNI_PREFIX | 0x02,
  469. MCU_UNI_CMD_STA_REC_UPDATE = MCU_UNI_PREFIX | 0x03,
  470. MCU_UNI_CMD_SUSPEND = MCU_UNI_PREFIX | 0x05,
  471. MCU_UNI_CMD_OFFLOAD = MCU_UNI_PREFIX | 0x06,
  472. MCU_UNI_CMD_HIF_CTRL = MCU_UNI_PREFIX | 0x07,
  473. };
  474. enum {
  475. MCU_CMD_TARGET_ADDRESS_LEN_REQ = MCU_FW_PREFIX | 0x01,
  476. MCU_CMD_FW_START_REQ = MCU_FW_PREFIX | 0x02,
  477. MCU_CMD_INIT_ACCESS_REG = 0x3,
  478. MCU_CMD_NIC_POWER_CTRL = MCU_FW_PREFIX | 0x4,
  479. MCU_CMD_PATCH_START_REQ = MCU_FW_PREFIX | 0x05,
  480. MCU_CMD_PATCH_FINISH_REQ = MCU_FW_PREFIX | 0x07,
  481. MCU_CMD_PATCH_SEM_CONTROL = MCU_FW_PREFIX | 0x10,
  482. MCU_CMD_EXT_CID = 0xed,
  483. MCU_CMD_FW_SCATTER = MCU_FW_PREFIX | 0xee,
  484. MCU_CMD_RESTART_DL_REQ = MCU_FW_PREFIX | 0xef,
  485. };
  486. /* offload mcu commands */
  487. enum {
  488. MCU_CMD_TEST_CTRL = MCU_CE_PREFIX | 0x01,
  489. MCU_CMD_START_HW_SCAN = MCU_CE_PREFIX | 0x03,
  490. MCU_CMD_SET_PS_PROFILE = MCU_CE_PREFIX | 0x05,
  491. MCU_CMD_SET_CHAN_DOMAIN = MCU_CE_PREFIX | 0x0f,
  492. MCU_CMD_SET_BSS_CONNECTED = MCU_CE_PREFIX | 0x16,
  493. MCU_CMD_SET_BSS_ABORT = MCU_CE_PREFIX | 0x17,
  494. MCU_CMD_CANCEL_HW_SCAN = MCU_CE_PREFIX | 0x1b,
  495. MCU_CMD_SET_ROC = MCU_CE_PREFIX | 0x1d,
  496. MCU_CMD_SET_P2P_OPPPS = MCU_CE_PREFIX | 0x33,
  497. MCU_CMD_SET_RATE_TX_POWER = MCU_CE_PREFIX | 0x5d,
  498. MCU_CMD_SCHED_SCAN_ENABLE = MCU_CE_PREFIX | 0x61,
  499. MCU_CMD_SCHED_SCAN_REQ = MCU_CE_PREFIX | 0x62,
  500. MCU_CMD_GET_NIC_CAPAB = MCU_CE_PREFIX | 0x8a,
  501. MCU_CMD_REG_WRITE = MCU_CE_PREFIX | 0xc0,
  502. MCU_CMD_REG_READ = MCU_CE_PREFIX | MCU_QUERY_MASK | 0xc0,
  503. MCU_CMD_CHIP_CONFIG = MCU_CE_PREFIX | 0xca,
  504. MCU_CMD_FWLOG_2_HOST = MCU_CE_PREFIX | 0xc5,
  505. MCU_CMD_GET_WTBL = MCU_CE_PREFIX | 0xcd,
  506. MCU_CMD_GET_TXPWR = MCU_CE_PREFIX | 0xd0,
  507. };
  508. enum {
  509. PATCH_SEM_RELEASE,
  510. PATCH_SEM_GET
  511. };
  512. enum {
  513. UNI_BSS_INFO_BASIC = 0,
  514. UNI_BSS_INFO_RLM = 2,
  515. UNI_BSS_INFO_BSS_COLOR = 4,
  516. UNI_BSS_INFO_HE_BASIC = 5,
  517. UNI_BSS_INFO_BCN_CONTENT = 7,
  518. UNI_BSS_INFO_QBSS = 15,
  519. UNI_BSS_INFO_UAPSD = 19,
  520. UNI_BSS_INFO_PS = 21,
  521. UNI_BSS_INFO_BCNFT = 22,
  522. };
  523. enum {
  524. UNI_OFFLOAD_OFFLOAD_ARP,
  525. UNI_OFFLOAD_OFFLOAD_ND,
  526. UNI_OFFLOAD_OFFLOAD_GTK_REKEY,
  527. UNI_OFFLOAD_OFFLOAD_BMC_RPY_DETECT,
  528. };
  529. enum {
  530. MT_NIC_CAP_TX_RESOURCE,
  531. MT_NIC_CAP_TX_EFUSE_ADDR,
  532. MT_NIC_CAP_COEX,
  533. MT_NIC_CAP_SINGLE_SKU,
  534. MT_NIC_CAP_CSUM_OFFLOAD,
  535. MT_NIC_CAP_HW_VER,
  536. MT_NIC_CAP_SW_VER,
  537. MT_NIC_CAP_MAC_ADDR,
  538. MT_NIC_CAP_PHY,
  539. MT_NIC_CAP_MAC,
  540. MT_NIC_CAP_FRAME_BUF,
  541. MT_NIC_CAP_BEAM_FORM,
  542. MT_NIC_CAP_LOCATION,
  543. MT_NIC_CAP_MUMIMO,
  544. MT_NIC_CAP_BUFFER_MODE_INFO,
  545. MT_NIC_CAP_HW_ADIE_VERSION = 0x14,
  546. MT_NIC_CAP_ANTSWP = 0x16,
  547. MT_NIC_CAP_WFDMA_REALLOC,
  548. MT_NIC_CAP_6G,
  549. };
  550. #define UNI_WOW_DETECT_TYPE_MAGIC BIT(0)
  551. #define UNI_WOW_DETECT_TYPE_ANY BIT(1)
  552. #define UNI_WOW_DETECT_TYPE_DISCONNECT BIT(2)
  553. #define UNI_WOW_DETECT_TYPE_GTK_REKEY_FAIL BIT(3)
  554. #define UNI_WOW_DETECT_TYPE_BCN_LOST BIT(4)
  555. #define UNI_WOW_DETECT_TYPE_SCH_SCAN_HIT BIT(5)
  556. #define UNI_WOW_DETECT_TYPE_BITMAP BIT(6)
  557. enum {
  558. UNI_SUSPEND_MODE_SETTING,
  559. UNI_SUSPEND_WOW_CTRL,
  560. UNI_SUSPEND_WOW_GPIO_PARAM,
  561. UNI_SUSPEND_WOW_WAKEUP_PORT,
  562. UNI_SUSPEND_WOW_PATTERN,
  563. };
  564. enum {
  565. WOW_USB = 1,
  566. WOW_PCIE = 2,
  567. WOW_GPIO = 3,
  568. };
  569. struct mt76_connac_bss_basic_tlv {
  570. __le16 tag;
  571. __le16 len;
  572. u8 active;
  573. u8 omac_idx;
  574. u8 hw_bss_idx;
  575. u8 band_idx;
  576. __le32 conn_type;
  577. u8 conn_state;
  578. u8 wmm_idx;
  579. u8 bssid[ETH_ALEN];
  580. __le16 bmc_tx_wlan_idx;
  581. __le16 bcn_interval;
  582. u8 dtim_period;
  583. u8 phymode; /* bit(0): A
  584. * bit(1): B
  585. * bit(2): G
  586. * bit(3): GN
  587. * bit(4): AN
  588. * bit(5): AC
  589. */
  590. __le16 sta_idx;
  591. u8 nonht_basic_phy;
  592. u8 pad[3];
  593. } __packed;
  594. struct mt76_connac_bss_qos_tlv {
  595. __le16 tag;
  596. __le16 len;
  597. u8 qos;
  598. u8 pad[3];
  599. } __packed;
  600. struct mt76_connac_beacon_loss_event {
  601. u8 bss_idx;
  602. u8 reason;
  603. u8 pad[2];
  604. } __packed;
  605. struct mt76_connac_mcu_bss_event {
  606. u8 bss_idx;
  607. u8 is_absent;
  608. u8 free_quota;
  609. u8 pad;
  610. } __packed;
  611. struct mt76_connac_mcu_scan_ssid {
  612. __le32 ssid_len;
  613. u8 ssid[IEEE80211_MAX_SSID_LEN];
  614. } __packed;
  615. struct mt76_connac_mcu_scan_channel {
  616. u8 band; /* 1: 2.4GHz
  617. * 2: 5.0GHz
  618. * Others: Reserved
  619. */
  620. u8 channel_num;
  621. } __packed;
  622. struct mt76_connac_mcu_scan_match {
  623. __le32 rssi_th;
  624. u8 ssid[IEEE80211_MAX_SSID_LEN];
  625. u8 ssid_len;
  626. u8 rsv[3];
  627. } __packed;
  628. struct mt76_connac_hw_scan_req {
  629. u8 seq_num;
  630. u8 bss_idx;
  631. u8 scan_type; /* 0: PASSIVE SCAN
  632. * 1: ACTIVE SCAN
  633. */
  634. u8 ssid_type; /* BIT(0) wildcard SSID
  635. * BIT(1) P2P wildcard SSID
  636. * BIT(2) specified SSID + wildcard SSID
  637. * BIT(2) + ssid_type_ext BIT(0) specified SSID only
  638. */
  639. u8 ssids_num;
  640. u8 probe_req_num; /* Number of probe request for each SSID */
  641. u8 scan_func; /* BIT(0) Enable random MAC scan
  642. * BIT(1) Disable DBDC scan type 1~3.
  643. * BIT(2) Use DBDC scan type 3 (dedicated one RF to scan).
  644. */
  645. u8 version; /* 0: Not support fields after ies.
  646. * 1: Support fields after ies.
  647. */
  648. struct mt76_connac_mcu_scan_ssid ssids[4];
  649. __le16 probe_delay_time;
  650. __le16 channel_dwell_time; /* channel Dwell interval */
  651. __le16 timeout_value;
  652. u8 channel_type; /* 0: Full channels
  653. * 1: Only 2.4GHz channels
  654. * 2: Only 5GHz channels
  655. * 3: P2P social channel only (channel #1, #6 and #11)
  656. * 4: Specified channels
  657. * Others: Reserved
  658. */
  659. u8 channels_num; /* valid when channel_type is 4 */
  660. /* valid when channels_num is set */
  661. struct mt76_connac_mcu_scan_channel channels[32];
  662. __le16 ies_len;
  663. u8 ies[MT76_CONNAC_SCAN_IE_LEN];
  664. /* following fields are valid if version > 0 */
  665. u8 ext_channels_num;
  666. u8 ext_ssids_num;
  667. __le16 channel_min_dwell_time;
  668. struct mt76_connac_mcu_scan_channel ext_channels[32];
  669. struct mt76_connac_mcu_scan_ssid ext_ssids[6];
  670. u8 bssid[ETH_ALEN];
  671. u8 random_mac[ETH_ALEN]; /* valid when BIT(1) in scan_func is set. */
  672. u8 pad[63];
  673. u8 ssid_type_ext;
  674. } __packed;
  675. #define MT76_CONNAC_SCAN_DONE_EVENT_MAX_CHANNEL_NUM 64
  676. struct mt76_connac_hw_scan_done {
  677. u8 seq_num;
  678. u8 sparse_channel_num;
  679. struct mt76_connac_mcu_scan_channel sparse_channel;
  680. u8 complete_channel_num;
  681. u8 current_state;
  682. u8 version;
  683. u8 pad;
  684. __le32 beacon_scan_num;
  685. u8 pno_enabled;
  686. u8 pad2[3];
  687. u8 sparse_channel_valid_num;
  688. u8 pad3[3];
  689. u8 channel_num[MT76_CONNAC_SCAN_DONE_EVENT_MAX_CHANNEL_NUM];
  690. /* idle format for channel_idle_time
  691. * 0: first bytes: idle time(ms) 2nd byte: dwell time(ms)
  692. * 1: first bytes: idle time(8ms) 2nd byte: dwell time(8ms)
  693. * 2: dwell time (16us)
  694. */
  695. __le16 channel_idle_time[MT76_CONNAC_SCAN_DONE_EVENT_MAX_CHANNEL_NUM];
  696. /* beacon and probe response count */
  697. u8 beacon_probe_num[MT76_CONNAC_SCAN_DONE_EVENT_MAX_CHANNEL_NUM];
  698. u8 mdrdy_count[MT76_CONNAC_SCAN_DONE_EVENT_MAX_CHANNEL_NUM];
  699. __le32 beacon_2g_num;
  700. __le32 beacon_5g_num;
  701. } __packed;
  702. struct mt76_connac_sched_scan_req {
  703. u8 version;
  704. u8 seq_num;
  705. u8 stop_on_match;
  706. u8 ssids_num;
  707. u8 match_num;
  708. u8 pad;
  709. __le16 ie_len;
  710. struct mt76_connac_mcu_scan_ssid ssids[MT76_CONNAC_MAX_SCHED_SCAN_SSID];
  711. struct mt76_connac_mcu_scan_match match[MT76_CONNAC_MAX_SCAN_MATCH];
  712. u8 channel_type;
  713. u8 channels_num;
  714. u8 intervals_num;
  715. u8 scan_func; /* MT7663: BIT(0) eable random mac address */
  716. struct mt76_connac_mcu_scan_channel channels[64];
  717. __le16 intervals[MT76_CONNAC_MAX_NUM_SCHED_SCAN_INTERVAL];
  718. union {
  719. struct {
  720. u8 random_mac[ETH_ALEN];
  721. u8 pad2[58];
  722. } mt7663;
  723. struct {
  724. u8 bss_idx;
  725. u8 pad2[19];
  726. u8 random_mac[ETH_ALEN];
  727. u8 pad3[38];
  728. } mt7921;
  729. };
  730. } __packed;
  731. struct mt76_connac_sched_scan_done {
  732. u8 seq_num;
  733. u8 status; /* 0: ssid found */
  734. __le16 pad;
  735. } __packed;
  736. struct bss_info_uni_bss_color {
  737. __le16 tag;
  738. __le16 len;
  739. u8 enable;
  740. u8 bss_color;
  741. u8 rsv[2];
  742. } __packed;
  743. struct bss_info_uni_he {
  744. __le16 tag;
  745. __le16 len;
  746. __le16 he_rts_thres;
  747. u8 he_pe_duration;
  748. u8 su_disable;
  749. __le16 max_nss_mcs[CMD_HE_MCS_BW_NUM];
  750. u8 rsv[2];
  751. } __packed;
  752. struct mt76_connac_gtk_rekey_tlv {
  753. __le16 tag;
  754. __le16 len;
  755. u8 kek[NL80211_KEK_LEN];
  756. u8 kck[NL80211_KCK_LEN];
  757. u8 replay_ctr[NL80211_REPLAY_CTR_LEN];
  758. u8 rekey_mode; /* 0: rekey offload enable
  759. * 1: rekey offload disable
  760. * 2: rekey update
  761. */
  762. u8 keyid;
  763. u8 option; /* 1: rekey data update without enabling offload */
  764. u8 pad[1];
  765. __le32 proto; /* WPA-RSN-WAPI-OPSN */
  766. __le32 pairwise_cipher;
  767. __le32 group_cipher;
  768. __le32 key_mgmt; /* NONE-PSK-IEEE802.1X */
  769. __le32 mgmt_group_cipher;
  770. u8 reserverd[4];
  771. } __packed;
  772. #define MT76_CONNAC_WOW_MASK_MAX_LEN 16
  773. #define MT76_CONNAC_WOW_PATTEN_MAX_LEN 128
  774. struct mt76_connac_wow_pattern_tlv {
  775. __le16 tag;
  776. __le16 len;
  777. u8 index; /* pattern index */
  778. u8 enable; /* 0: disable
  779. * 1: enable
  780. */
  781. u8 data_len; /* pattern length */
  782. u8 pad;
  783. u8 mask[MT76_CONNAC_WOW_MASK_MAX_LEN];
  784. u8 pattern[MT76_CONNAC_WOW_PATTEN_MAX_LEN];
  785. u8 rsv[4];
  786. } __packed;
  787. struct mt76_connac_wow_ctrl_tlv {
  788. __le16 tag;
  789. __le16 len;
  790. u8 cmd; /* 0x1: PM_WOWLAN_REQ_START
  791. * 0x2: PM_WOWLAN_REQ_STOP
  792. * 0x3: PM_WOWLAN_PARAM_CLEAR
  793. */
  794. u8 trigger; /* 0: NONE
  795. * BIT(0): NL80211_WOWLAN_TRIG_MAGIC_PKT
  796. * BIT(1): NL80211_WOWLAN_TRIG_ANY
  797. * BIT(2): NL80211_WOWLAN_TRIG_DISCONNECT
  798. * BIT(3): NL80211_WOWLAN_TRIG_GTK_REKEY_FAILURE
  799. * BIT(4): BEACON_LOST
  800. * BIT(5): NL80211_WOWLAN_TRIG_NET_DETECT
  801. */
  802. u8 wakeup_hif; /* 0x0: HIF_SDIO
  803. * 0x1: HIF_USB
  804. * 0x2: HIF_PCIE
  805. * 0x3: HIF_GPIO
  806. */
  807. u8 pad;
  808. u8 rsv[4];
  809. } __packed;
  810. struct mt76_connac_wow_gpio_param_tlv {
  811. __le16 tag;
  812. __le16 len;
  813. u8 gpio_pin;
  814. u8 trigger_lvl;
  815. u8 pad[2];
  816. __le32 gpio_interval;
  817. u8 rsv[4];
  818. } __packed;
  819. struct mt76_connac_arpns_tlv {
  820. __le16 tag;
  821. __le16 len;
  822. u8 mode;
  823. u8 ips_num;
  824. u8 option;
  825. u8 pad[1];
  826. } __packed;
  827. struct mt76_connac_suspend_tlv {
  828. __le16 tag;
  829. __le16 len;
  830. u8 enable; /* 0: suspend mode disabled
  831. * 1: suspend mode enabled
  832. */
  833. u8 mdtim; /* LP parameter */
  834. u8 wow_suspend; /* 0: update by origin policy
  835. * 1: update by wow dtim
  836. */
  837. u8 pad[5];
  838. } __packed;
  839. enum mt76_sta_info_state {
  840. MT76_STA_INFO_STATE_NONE,
  841. MT76_STA_INFO_STATE_AUTH,
  842. MT76_STA_INFO_STATE_ASSOC
  843. };
  844. struct mt76_sta_cmd_info {
  845. struct ieee80211_sta *sta;
  846. struct mt76_wcid *wcid;
  847. struct ieee80211_vif *vif;
  848. bool offload_fw;
  849. bool enable;
  850. bool newly;
  851. int cmd;
  852. u8 rcpi;
  853. u8 state;
  854. };
  855. #define MT_SKU_POWER_LIMIT 161
  856. struct mt76_connac_sku_tlv {
  857. u8 channel;
  858. s8 pwr_limit[MT_SKU_POWER_LIMIT];
  859. } __packed;
  860. struct mt76_connac_tx_power_limit_tlv {
  861. /* DW0 - common info*/
  862. u8 ver;
  863. u8 pad0;
  864. __le16 len;
  865. /* DW1 - cmd hint */
  866. u8 n_chan; /* # channel */
  867. u8 band; /* 2.4GHz - 5GHz */
  868. u8 last_msg;
  869. u8 pad1;
  870. /* DW3 */
  871. u8 alpha2[4]; /* regulatory_request.alpha2 */
  872. u8 pad2[32];
  873. } __packed;
  874. struct mt76_connac_config {
  875. __le16 id;
  876. u8 type;
  877. u8 resp_type;
  878. __le16 data_size;
  879. __le16 resv;
  880. u8 data[320];
  881. } __packed;
  882. #define to_wcid_lo(id) FIELD_GET(GENMASK(7, 0), (u16)id)
  883. #define to_wcid_hi(id) FIELD_GET(GENMASK(9, 8), (u16)id)
  884. static inline void
  885. mt76_connac_mcu_get_wlan_idx(struct mt76_dev *dev, struct mt76_wcid *wcid,
  886. u8 *wlan_idx_lo, u8 *wlan_idx_hi)
  887. {
  888. *wlan_idx_hi = 0;
  889. if (is_mt7921(dev)) {
  890. *wlan_idx_lo = wcid ? to_wcid_lo(wcid->idx) : 0;
  891. *wlan_idx_hi = wcid ? to_wcid_hi(wcid->idx) : 0;
  892. } else {
  893. *wlan_idx_lo = wcid ? wcid->idx : 0;
  894. }
  895. }
  896. struct sk_buff *
  897. mt76_connac_mcu_alloc_sta_req(struct mt76_dev *dev, struct mt76_vif *mvif,
  898. struct mt76_wcid *wcid);
  899. struct wtbl_req_hdr *
  900. mt76_connac_mcu_alloc_wtbl_req(struct mt76_dev *dev, struct mt76_wcid *wcid,
  901. int cmd, void *sta_wtbl, struct sk_buff **skb);
  902. struct tlv *mt76_connac_mcu_add_nested_tlv(struct sk_buff *skb, int tag,
  903. int len, void *sta_ntlv,
  904. void *sta_wtbl);
  905. static inline struct tlv *
  906. mt76_connac_mcu_add_tlv(struct sk_buff *skb, int tag, int len)
  907. {
  908. return mt76_connac_mcu_add_nested_tlv(skb, tag, len, skb->data, NULL);
  909. }
  910. int mt76_connac_mcu_set_channel_domain(struct mt76_phy *phy);
  911. int mt76_connac_mcu_set_vif_ps(struct mt76_dev *dev, struct ieee80211_vif *vif);
  912. void mt76_connac_mcu_sta_basic_tlv(struct sk_buff *skb,
  913. struct ieee80211_vif *vif,
  914. struct ieee80211_sta *sta, bool enable,
  915. bool newly);
  916. void mt76_connac_mcu_wtbl_generic_tlv(struct mt76_dev *dev, struct sk_buff *skb,
  917. struct ieee80211_vif *vif,
  918. struct ieee80211_sta *sta, void *sta_wtbl,
  919. void *wtbl_tlv);
  920. void mt76_connac_mcu_wtbl_hdr_trans_tlv(struct sk_buff *skb,
  921. struct ieee80211_vif *vif,
  922. struct mt76_wcid *wcid,
  923. void *sta_wtbl, void *wtbl_tlv);
  924. int mt76_connac_mcu_sta_update_hdr_trans(struct mt76_dev *dev,
  925. struct ieee80211_vif *vif,
  926. struct mt76_wcid *wcid, int cmd);
  927. void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
  928. struct ieee80211_sta *sta,
  929. struct ieee80211_vif *vif,
  930. u8 rcpi, u8 state);
  931. void mt76_connac_mcu_wtbl_ht_tlv(struct mt76_dev *dev, struct sk_buff *skb,
  932. struct ieee80211_sta *sta, void *sta_wtbl,
  933. void *wtbl_tlv);
  934. void mt76_connac_mcu_wtbl_ba_tlv(struct mt76_dev *dev, struct sk_buff *skb,
  935. struct ieee80211_ampdu_params *params,
  936. bool enable, bool tx, void *sta_wtbl,
  937. void *wtbl_tlv);
  938. void mt76_connac_mcu_sta_ba_tlv(struct sk_buff *skb,
  939. struct ieee80211_ampdu_params *params,
  940. bool enable, bool tx);
  941. int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy,
  942. struct ieee80211_vif *vif,
  943. struct mt76_wcid *wcid,
  944. bool enable);
  945. int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
  946. struct ieee80211_ampdu_params *params,
  947. bool enable, bool tx);
  948. int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,
  949. struct ieee80211_vif *vif,
  950. struct mt76_wcid *wcid,
  951. bool enable);
  952. int mt76_connac_mcu_sta_cmd(struct mt76_phy *phy,
  953. struct mt76_sta_cmd_info *info);
  954. void mt76_connac_mcu_beacon_loss_iter(void *priv, u8 *mac,
  955. struct ieee80211_vif *vif);
  956. int mt76_connac_mcu_set_rts_thresh(struct mt76_dev *dev, u32 val, u8 band);
  957. int mt76_connac_mcu_set_mac_enable(struct mt76_dev *dev, int band, bool enable,
  958. bool hdr_trans);
  959. int mt76_connac_mcu_init_download(struct mt76_dev *dev, u32 addr, u32 len,
  960. u32 mode);
  961. int mt76_connac_mcu_start_patch(struct mt76_dev *dev);
  962. int mt76_connac_mcu_patch_sem_ctrl(struct mt76_dev *dev, bool get);
  963. int mt76_connac_mcu_start_firmware(struct mt76_dev *dev, u32 addr, u32 option);
  964. int mt76_connac_mcu_get_nic_capability(struct mt76_phy *phy);
  965. int mt76_connac_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
  966. struct ieee80211_scan_request *scan_req);
  967. int mt76_connac_mcu_cancel_hw_scan(struct mt76_phy *phy,
  968. struct ieee80211_vif *vif);
  969. int mt76_connac_mcu_sched_scan_req(struct mt76_phy *phy,
  970. struct ieee80211_vif *vif,
  971. struct cfg80211_sched_scan_request *sreq);
  972. int mt76_connac_mcu_sched_scan_enable(struct mt76_phy *phy,
  973. struct ieee80211_vif *vif,
  974. bool enable);
  975. int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
  976. struct mt76_vif *vif,
  977. struct ieee80211_bss_conf *info);
  978. int mt76_connac_mcu_update_gtk_rekey(struct ieee80211_hw *hw,
  979. struct ieee80211_vif *vif,
  980. struct cfg80211_gtk_rekey_data *key);
  981. int mt76_connac_mcu_set_hif_suspend(struct mt76_dev *dev, bool suspend);
  982. void mt76_connac_mcu_set_suspend_iter(void *priv, u8 *mac,
  983. struct ieee80211_vif *vif);
  984. int mt76_connac_sta_state_dp(struct mt76_dev *dev,
  985. enum ieee80211_sta_state old_state,
  986. enum ieee80211_sta_state new_state);
  987. int mt76_connac_mcu_chip_config(struct mt76_dev *dev);
  988. int mt76_connac_mcu_set_deep_sleep(struct mt76_dev *dev, bool enable);
  989. void mt76_connac_mcu_coredump_event(struct mt76_dev *dev, struct sk_buff *skb,
  990. struct mt76_connac_coredump *coredump);
  991. int mt76_connac_mcu_set_rate_txpower(struct mt76_phy *phy);
  992. #endif /* __MT76_CONNAC_MCU_H */