Lines Matching +full:0 +full:m

35 	int (*cb_read)(struct seq_file *m, void *v);
77 return 0; in rtw89_rate_info_bw_to_mhz()
80 static int rtw89_debugfs_single_show(struct seq_file *m, void *v) in rtw89_debugfs_single_show() argument
82 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debugfs_single_show()
84 return debugfs_priv->cb_read(m, v); in rtw89_debugfs_single_show()
113 return 0; in rtw89_debugfs_close()
145 struct seq_file *m = (struct seq_file *)filp->private_data; in rtw89_debug_priv_read_reg_select() local
146 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_read_reg_select()
157 buf[buf_size] = '\0'; in rtw89_debug_priv_read_reg_select()
167 rtw89_info(rtwdev, "select read %d bytes from 0x%08x\n", len, addr); in rtw89_debug_priv_read_reg_select()
172 static int rtw89_debug_priv_read_reg_get(struct seq_file *m, void *v) in rtw89_debug_priv_read_reg_get() argument
174 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_read_reg_get()
200 seq_printf(m, "get %d bytes at 0x%08x=0x%08x\n", len, addr, data); in rtw89_debug_priv_read_reg_get()
202 return 0; in rtw89_debug_priv_read_reg_get()
208 seq_printf(m, "%08xh : ", 0x18600000 + addr); in rtw89_debug_priv_read_reg_get()
209 for (k = 0; k < 16; k += 4) { in rtw89_debug_priv_read_reg_get()
211 seq_printf(m, "%08x ", data); in rtw89_debug_priv_read_reg_get()
213 seq_puts(m, "\n"); in rtw89_debug_priv_read_reg_get()
216 return 0; in rtw89_debug_priv_read_reg_get()
234 buf[buf_size] = '\0'; in rtw89_debug_priv_write_reg_set()
243 rtw89_info(rtwdev, "reg write8 0x%08x: 0x%02x\n", addr, val); in rtw89_debug_priv_write_reg_set()
247 rtw89_info(rtwdev, "reg write16 0x%08x: 0x%04x\n", addr, val); in rtw89_debug_priv_write_reg_set()
251 rtw89_info(rtwdev, "reg write32 0x%08x: 0x%08x\n", addr, val); in rtw89_debug_priv_write_reg_set()
267 struct seq_file *m = (struct seq_file *)filp->private_data; in rtw89_debug_priv_read_rf_select() local
268 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_read_rf_select()
280 buf[buf_size] = '\0'; in rtw89_debug_priv_read_rf_select()
295 rtw89_info(rtwdev, "select read rf path %d from 0x%08x\n", path, addr); in rtw89_debug_priv_read_rf_select()
300 static int rtw89_debug_priv_read_rf_get(struct seq_file *m, void *v) in rtw89_debug_priv_read_rf_get() argument
302 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_read_rf_get()
313 seq_printf(m, "path %d, rf register 0x%08x=0x%08x\n", path, addr, data); in rtw89_debug_priv_read_rf_get()
315 return 0; in rtw89_debug_priv_read_rf_get()
334 buf[buf_size] = '\0'; in rtw89_debug_priv_write_rf_set()
346 rtw89_info(rtwdev, "path %d, rf register write 0x%08x=0x%08x (mask = 0x%08x)\n", in rtw89_debug_priv_write_rf_set()
353 static int rtw89_debug_priv_rf_reg_dump_get(struct seq_file *m, void *v) in rtw89_debug_priv_rf_reg_dump_get() argument
355 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_rf_reg_dump_get()
361 for (path = 0; path < chip->rf_path_num; path++) { in rtw89_debug_priv_rf_reg_dump_get()
362 seq_printf(m, "RF path %d:\n\n", path); in rtw89_debug_priv_rf_reg_dump_get()
363 for (addr = 0; addr < 0x100; addr += 4) { in rtw89_debug_priv_rf_reg_dump_get()
364 seq_printf(m, "0x%08x: ", addr); in rtw89_debug_priv_rf_reg_dump_get()
365 for (offset = 0; offset < 4; offset++) { in rtw89_debug_priv_rf_reg_dump_get()
368 seq_printf(m, "0x%05x ", data); in rtw89_debug_priv_rf_reg_dump_get()
370 seq_puts(m, "\n"); in rtw89_debug_priv_rf_reg_dump_get()
372 seq_puts(m, "\n"); in rtw89_debug_priv_rf_reg_dump_get()
375 return 0; in rtw89_debug_priv_rf_reg_dump_get()
399 #define __GEN_TXPWR_ENT0(_t) { .len = 0, .txt = _t }
413 __GEN_TXPWR_ENT4("CCK ", "1M ", "2M ", "5.5M ", "11M "),
414 __GEN_TXPWR_ENT4("LEGACY ", "6M ", "9M ", "12M ", "18M "),
415 __GEN_TXPWR_ENT4("LEGACY ", "24M ", "36M ", "48M ", "54M "),
560 __GEN_TXPWR_ENT4("CCK ", "1M ", "2M ", "5.5M ", "11M "),
561 __GEN_TXPWR_ENT4("LEGACY ", "6M ", "9M ", "12M ", "18M "),
562 __GEN_TXPWR_ENT4("LEGACY ", "24M ", "36M ", "48M ", "54M "),
568 __GEN_TXPWR_ENT4("CCK ", "1M ", "2M ", "5.5M ", "11M "),
569 __GEN_TXPWR_ENT4("LEGACY ", "6M ", "9M ", "12M ", "18M "),
570 __GEN_TXPWR_ENT4("LEGACY ", "24M ", "36M ", "48M ", "54M "),
577 __GEN_TXPWR_ENT4("LEGACY ", "6M ", "9M ", "12M ", "18M "),
578 __GEN_TXPWR_ENT4("LEGACY ", "24M ", "36M ", "48M ", "54M "),
584 __GEN_TXPWR_ENT4("LEGACY ", "6M ", "9M ", "12M ", "18M "),
585 __GEN_TXPWR_ENT4("LEGACY ", "24M ", "36M ", "48M ", "54M "),
591 __GEN_TXPWR_ENT4("LEGACY ", "6M ", "9M ", "12M ", "18M "),
592 __GEN_TXPWR_ENT4("LEGACY ", "24M ", "36M ", "48M ", "54M "),
603 .addr_to_1ss = 0, /* not support */
663 .addr_to_1ss = 0, /* not support */
702 .addr_to_1ss = 0, /* not support */
706 __print_txpwr_ent(struct seq_file *m, const struct txpwr_ent *ent, in __print_txpwr_ent() argument
713 for (cnt = 0, i = 0; i < ent->len; i++) in __print_txpwr_ent()
714 cnt += __print_txpwr_ent(m, ent->ptr + i, buf, in __print_txpwr_ent()
720 case 0: in __print_txpwr_ent()
721 seq_printf(m, "\t<< %s >>\n", ent->txt); in __print_txpwr_ent()
722 return 0; in __print_txpwr_ent()
725 seq_printf(m, fmt, ent->txt, buf[cur], buf[cur + 1]); in __print_txpwr_ent()
729 seq_printf(m, fmt, ent->txt, buf[cur], buf[cur + 1], in __print_txpwr_ent()
734 seq_printf(m, fmt, ent->txt, buf[cur], buf[cur + 1], in __print_txpwr_ent()
739 return 0; in __print_txpwr_ent()
743 static int __print_txpwr_map(struct seq_file *m, struct rtw89_dev *rtwdev, in __print_txpwr_map() argument
763 if (max_valid_addr == 0) in __print_txpwr_map()
772 for (i = 0; i < 4; i++, val >>= 8) { in __print_txpwr_map()
779 for (cur = 0, i = 0; i < map->size; i++) in __print_txpwr_map()
780 cur += __print_txpwr_ent(m, &map->ent[i], buf, cur); in __print_txpwr_map()
783 return 0; in __print_txpwr_map()
788 seq_puts(m, #_regd "\n"); \
791 static void __print_regd(struct seq_file *m, struct rtw89_dev *rtwdev, in __print_regd() argument
799 seq_printf(m, "UNKNOWN: %d\n", regd); in __print_regd()
843 void rtw89_debug_priv_txpwr_table_get_regd(struct seq_file *m, in rtw89_debug_priv_txpwr_table_get_regd() argument
850 seq_printf(m, "[Chanctx] band %u, ch %u, bw %u\n", in rtw89_debug_priv_txpwr_table_get_regd()
853 seq_puts(m, "[Regulatory] "); in rtw89_debug_priv_txpwr_table_get_regd()
854 __print_regd(m, rtwdev, chan); in rtw89_debug_priv_txpwr_table_get_regd()
857 seq_printf(m, "[reg6_pwr_type] %u\n", regulatory->reg_6ghz_power); in rtw89_debug_priv_txpwr_table_get_regd()
860 seq_printf(m, "[TPE] %d dBm\n", tpe6->constraint); in rtw89_debug_priv_txpwr_table_get_regd()
864 static int rtw89_debug_priv_txpwr_table_get(struct seq_file *m, void *v) in rtw89_debug_priv_txpwr_table_get() argument
866 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_txpwr_table_get()
871 int ret = 0; in rtw89_debug_priv_txpwr_table_get()
877 rtw89_debug_priv_txpwr_table_get_regd(m, rtwdev, chan); in rtw89_debug_priv_txpwr_table_get()
879 seq_puts(m, "[SAR]\n"); in rtw89_debug_priv_txpwr_table_get()
880 rtw89_print_sar(m, rtwdev, chan->freq); in rtw89_debug_priv_txpwr_table_get()
882 seq_puts(m, "[TAS]\n"); in rtw89_debug_priv_txpwr_table_get()
883 rtw89_print_tas(m, rtwdev); in rtw89_debug_priv_txpwr_table_get()
891 seq_puts(m, "\n[TX power byrate]\n"); in rtw89_debug_priv_txpwr_table_get()
892 ret = __print_txpwr_map(m, rtwdev, tbl->byr); in rtw89_debug_priv_txpwr_table_get()
896 seq_puts(m, "\n[TX power limit]\n"); in rtw89_debug_priv_txpwr_table_get()
897 ret = __print_txpwr_map(m, rtwdev, tbl->lmt); in rtw89_debug_priv_txpwr_table_get()
901 seq_puts(m, "\n[TX power limit_ru]\n"); in rtw89_debug_priv_txpwr_table_get()
902 ret = __print_txpwr_map(m, rtwdev, tbl->lmt_ru); in rtw89_debug_priv_txpwr_table_get()
916 struct seq_file *m = (struct seq_file *)filp->private_data; in rtw89_debug_priv_mac_reg_dump_select() local
917 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_mac_reg_dump_select()
929 buf[buf_size] = '\0'; in rtw89_debug_priv_mac_reg_dump_select()
930 ret = kstrtoint(buf, 0, &sel); in rtw89_debug_priv_mac_reg_dump_select()
951 #define RTW89_MAC_PAGE_SIZE 0x100
953 static int rtw89_debug_priv_mac_reg_dump_get(struct seq_file *m, void *v) in rtw89_debug_priv_mac_reg_dump_get() argument
955 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_mac_reg_dump_get()
964 seq_puts(m, "Debug selected MAC page 0x00\n"); in rtw89_debug_priv_mac_reg_dump_get()
965 start = 0x000; in rtw89_debug_priv_mac_reg_dump_get()
966 end = 0x014; in rtw89_debug_priv_mac_reg_dump_get()
969 seq_puts(m, "Debug selected MAC page 0x30\n"); in rtw89_debug_priv_mac_reg_dump_get()
970 start = 0x030; in rtw89_debug_priv_mac_reg_dump_get()
971 end = 0x033; in rtw89_debug_priv_mac_reg_dump_get()
974 seq_puts(m, "Debug selected MAC page 0x40\n"); in rtw89_debug_priv_mac_reg_dump_get()
975 start = 0x040; in rtw89_debug_priv_mac_reg_dump_get()
976 end = 0x07f; in rtw89_debug_priv_mac_reg_dump_get()
979 seq_puts(m, "Debug selected MAC page 0x80\n"); in rtw89_debug_priv_mac_reg_dump_get()
980 start = 0x080; in rtw89_debug_priv_mac_reg_dump_get()
981 end = 0x09f; in rtw89_debug_priv_mac_reg_dump_get()
984 seq_puts(m, "Debug selected MAC page 0xc0\n"); in rtw89_debug_priv_mac_reg_dump_get()
985 start = 0x0c0; in rtw89_debug_priv_mac_reg_dump_get()
986 end = 0x0df; in rtw89_debug_priv_mac_reg_dump_get()
989 seq_puts(m, "Debug selected MAC page 0xe0\n"); in rtw89_debug_priv_mac_reg_dump_get()
990 start = 0x0e0; in rtw89_debug_priv_mac_reg_dump_get()
991 end = 0x0ff; in rtw89_debug_priv_mac_reg_dump_get()
994 seq_puts(m, "Debug selected BB register\n"); in rtw89_debug_priv_mac_reg_dump_get()
995 start = 0x100; in rtw89_debug_priv_mac_reg_dump_get()
996 end = 0x17f; in rtw89_debug_priv_mac_reg_dump_get()
999 seq_puts(m, "Debug selected IQK register\n"); in rtw89_debug_priv_mac_reg_dump_get()
1000 start = 0x180; in rtw89_debug_priv_mac_reg_dump_get()
1001 end = 0x1bf; in rtw89_debug_priv_mac_reg_dump_get()
1004 seq_puts(m, "Debug selected RFC register\n"); in rtw89_debug_priv_mac_reg_dump_get()
1005 start = 0x1c0; in rtw89_debug_priv_mac_reg_dump_get()
1006 end = 0x1ff; in rtw89_debug_priv_mac_reg_dump_get()
1009 seq_puts(m, "Selected invalid register page\n"); in rtw89_debug_priv_mac_reg_dump_get()
1016 seq_printf(m, "%08xh : ", 0x18600000 + j); in rtw89_debug_priv_mac_reg_dump_get()
1017 for (k = 0; k < 4; k++) { in rtw89_debug_priv_mac_reg_dump_get()
1019 seq_printf(m, "%08x ", val); in rtw89_debug_priv_mac_reg_dump_get()
1021 seq_puts(m, "\n"); in rtw89_debug_priv_mac_reg_dump_get()
1025 return 0; in rtw89_debug_priv_mac_reg_dump_get()
1033 struct seq_file *m = (struct seq_file *)filp->private_data; in rtw89_debug_priv_mac_mem_dump_select() local
1034 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_mac_mem_dump_select()
1045 buf[buf_size] = '\0'; in rtw89_debug_priv_mac_mem_dump_select()
1062 static void rtw89_debug_dump_mac_mem(struct seq_file *m, in rtw89_debug_dump_mac_mem() argument
1081 for (p = 0; p < pages; p++) { in rtw89_debug_dump_mac_mem()
1086 seq_printf(m, "%08xh:", i); in rtw89_debug_dump_mac_mem()
1087 for (j = 0; in rtw89_debug_dump_mac_mem()
1091 seq_printf(m, " %08x", val); in rtw89_debug_dump_mac_mem()
1094 seq_puts(m, "\n"); in rtw89_debug_dump_mac_mem()
1101 rtw89_debug_priv_mac_mem_dump_get(struct seq_file *m, void *v) in rtw89_debug_priv_mac_mem_dump_get() argument
1103 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_mac_mem_dump_get()
1127 rtw89_debug_dump_mac_mem(m, rtwdev, in rtw89_debug_priv_mac_mem_dump_get()
1135 return 0; in rtw89_debug_priv_mac_mem_dump_get()
1143 struct seq_file *m = (struct seq_file *)filp->private_data; in rtw89_debug_priv_mac_dbg_port_dump_select() local
1144 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_mac_dbg_port_dump_select()
1156 buf[buf_size] = '\0'; in rtw89_debug_priv_mac_dbg_port_dump_select()
1163 enable = set != 0; in rtw89_debug_priv_mac_dbg_port_dump_select()
1165 case 0: in rtw89_debug_priv_mac_dbg_port_dump_select()
1192 struct seq_file *m) in rtw89_debug_mac_dump_ss_dbg() argument
1194 return 0; in rtw89_debug_mac_dump_ss_dbg()
1198 struct seq_file *m) in rtw89_debug_mac_dump_dle_dbg() argument
1232 __freepg = DLE_DFI_DUMP(__type, FREEPG, 0); \ in rtw89_debug_mac_dump_dle_dbg()
1260 ret = rtw89_mac_check_mac_en(rtwdev, 0, RTW89_DMAC_SEL); in rtw89_debug_mac_dump_dle_dbg()
1262 seq_puts(m, "[DLE] : DMAC not enabled\n"); in rtw89_debug_mac_dump_dle_dbg()
1266 DLE_DFI_FREE_PAGE_DUMP(m, WDE); in rtw89_debug_mac_dump_dle_dbg()
1267 DLE_DFI_FREE_PAGE_DUMP(m, PLE); in rtw89_debug_mac_dump_dle_dbg()
1268 for (quota_id = 0; quota_id <= WDE_QTAID_CPUIO; quota_id++) { in rtw89_debug_mac_dump_dle_dbg()
1270 case_QUOTA(m, WDE, HOST_IF); in rtw89_debug_mac_dump_dle_dbg()
1271 case_QUOTA(m, WDE, WLAN_CPU); in rtw89_debug_mac_dump_dle_dbg()
1272 case_QUOTA(m, WDE, DATA_CPU); in rtw89_debug_mac_dump_dle_dbg()
1273 case_QUOTA(m, WDE, PKTIN); in rtw89_debug_mac_dump_dle_dbg()
1274 case_QUOTA(m, WDE, CPUIO); in rtw89_debug_mac_dump_dle_dbg()
1277 for (quota_id = 0; quota_id <= PLE_QTAID_CPUIO; quota_id++) { in rtw89_debug_mac_dump_dle_dbg()
1279 case_QUOTA(m, PLE, B0_TXPL); in rtw89_debug_mac_dump_dle_dbg()
1280 case_QUOTA(m, PLE, B1_TXPL); in rtw89_debug_mac_dump_dle_dbg()
1281 case_QUOTA(m, PLE, C2H); in rtw89_debug_mac_dump_dle_dbg()
1282 case_QUOTA(m, PLE, H2C); in rtw89_debug_mac_dump_dle_dbg()
1283 case_QUOTA(m, PLE, WLAN_CPU); in rtw89_debug_mac_dump_dle_dbg()
1284 case_QUOTA(m, PLE, MPDU); in rtw89_debug_mac_dump_dle_dbg()
1285 case_QUOTA(m, PLE, CMAC0_RX); in rtw89_debug_mac_dump_dle_dbg()
1286 case_QUOTA(m, PLE, CMAC1_RX); in rtw89_debug_mac_dump_dle_dbg()
1287 case_QUOTA(m, PLE, CMAC1_BBRPT); in rtw89_debug_mac_dump_dle_dbg()
1288 case_QUOTA(m, PLE, WDRLS); in rtw89_debug_mac_dump_dle_dbg()
1289 case_QUOTA(m, PLE, CPUIO); in rtw89_debug_mac_dump_dle_dbg()
1293 return 0; in rtw89_debug_mac_dump_dle_dbg()
1301 struct seq_file *m) in rtw89_debug_mac_dump_dmac_dbg() argument
1307 ret = rtw89_mac_check_mac_en(rtwdev, 0, RTW89_DMAC_SEL); in rtw89_debug_mac_dump_dmac_dbg()
1309 seq_puts(m, "[DMAC] : DMAC not enabled\n"); in rtw89_debug_mac_dump_dmac_dbg()
1314 seq_printf(m, "R_AX_DMAC_ERR_ISR=0x%08x\n", dmac_err); in rtw89_debug_mac_dump_dmac_dbg()
1315 seq_printf(m, "R_AX_DMAC_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1319 seq_printf(m, "R_AX_WDE_ERR_FLAG_CFG=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1321 seq_printf(m, "R_AX_PLE_ERR_FLAG_CFG=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1324 seq_printf(m, "R_AX_PLE_ERRFLAG_MSG=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1326 seq_printf(m, "R_AX_WDE_ERRFLAG_MSG=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1328 seq_printf(m, "R_AX_PLE_DBGERR_LOCKEN=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1330 seq_printf(m, "R_AX_PLE_DBGERR_STS=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1336 seq_printf(m, "R_AX_WDRLS_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1338 seq_printf(m, "R_AX_WDRLS_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1341 seq_printf(m, "R_AX_RPQ_RXBD_IDX=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1344 seq_printf(m, "R_AX_RPQ_RXBD_IDX=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1350 seq_printf(m, "R_AX_SEC_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1352 seq_printf(m, "R_AX_SEC_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1354 seq_printf(m, "R_AX_SEC_ENG_CTRL=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1356 seq_printf(m, "R_AX_SEC_MPDU_PROC=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1358 seq_printf(m, "R_AX_SEC_CAM_ACCESS=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1360 seq_printf(m, "R_AX_SEC_CAM_RDATA=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1362 seq_printf(m, "R_AX_SEC_DEBUG1=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1364 seq_printf(m, "R_AX_SEC_TX_DEBUG=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1366 seq_printf(m, "R_AX_SEC_RX_DEBUG=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1370 B_AX_DBG_SEL0, 0x8B); in rtw89_debug_mac_dump_dmac_dbg()
1372 B_AX_DBG_SEL1, 0x8B); in rtw89_debug_mac_dump_dmac_dbg()
1375 for (i = 0; i < 0x10; i++) { in rtw89_debug_mac_dump_dmac_dbg()
1378 seq_printf(m, "sel=%x,R_AX_SEC_DEBUG2=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1382 seq_printf(m, "R_AX_SEC_ERR_IMR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1384 seq_printf(m, "R_AX_SEC_ENG_CTRL=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1386 seq_printf(m, "R_AX_SEC_MPDU_PROC=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1388 seq_printf(m, "R_AX_SEC_CAM_ACCESS=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1390 seq_printf(m, "R_AX_SEC_CAM_RDATA=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1392 seq_printf(m, "R_AX_SEC_CAM_WDATA=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1394 seq_printf(m, "R_AX_SEC_TX_DEBUG=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1396 seq_printf(m, "R_AX_SEC_RX_DEBUG=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1398 seq_printf(m, "R_AX_SEC_TRX_PKT_CNT=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1400 seq_printf(m, "R_AX_SEC_TRX_BLK_CNT=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1406 seq_printf(m, "R_AX_MPDU_TX_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1408 seq_printf(m, "R_AX_MPDU_TX_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1410 seq_printf(m, "R_AX_MPDU_RX_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1412 seq_printf(m, "R_AX_MPDU_RX_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1417 seq_printf(m, "R_AX_STA_SCHEDULER_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1419 seq_printf(m, "R_AX_STA_SCHEDULER_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1424 seq_printf(m, "R_AX_WDE_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1426 seq_printf(m, "R_AX_WDE_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1428 seq_printf(m, "R_AX_PLE_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1430 seq_printf(m, "R_AX_PLE_ERR_FLAG_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1436 seq_printf(m, "R_AX_TXPKTCTL_B0_ERRFLAG_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1438 seq_printf(m, "R_AX_TXPKTCTL_B0_ERRFLAG_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1440 seq_printf(m, "R_AX_TXPKTCTL_B1_ERRFLAG_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1442 seq_printf(m, "R_AX_TXPKTCTL_B1_ERRFLAG_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1445 seq_printf(m, "R_AX_TXPKTCTL_ERR_IMR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1447 seq_printf(m, "R_AX_TXPKTCTL_ERR_IMR_ISR_B1=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1453 seq_printf(m, "R_AX_WDE_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1455 seq_printf(m, "R_AX_WDE_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1457 seq_printf(m, "R_AX_PLE_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1459 seq_printf(m, "R_AX_PLE_ERR_FLAG_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1461 seq_printf(m, "R_AX_WD_CPUQ_OP_0=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1463 seq_printf(m, "R_AX_WD_CPUQ_OP_1=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1465 seq_printf(m, "R_AX_WD_CPUQ_OP_2=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1467 seq_printf(m, "R_AX_WD_CPUQ_OP_STATUS=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1469 seq_printf(m, "R_AX_PL_CPUQ_OP_0=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1471 seq_printf(m, "R_AX_PL_CPUQ_OP_1=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1473 seq_printf(m, "R_AX_PL_CPUQ_OP_2=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1475 seq_printf(m, "R_AX_PL_CPUQ_OP_STATUS=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1478 seq_printf(m, "R_AX_RX_CTRL0=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1480 seq_printf(m, "R_AX_RX_CTRL1=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1482 seq_printf(m, "R_AX_RX_CTRL2=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1485 seq_printf(m, "R_AX_RXDMA_PKT_INFO_0=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1487 seq_printf(m, "R_AX_RXDMA_PKT_INFO_1=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1489 seq_printf(m, "R_AX_RXDMA_PKT_INFO_2=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1495 seq_printf(m, "R_AX_PKTIN_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1497 seq_printf(m, "R_AX_PKTIN_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1502 seq_printf(m, "R_AX_HOST_DISPATCHER_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1504 seq_printf(m, "R_AX_HOST_DISPATCHER_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1506 seq_printf(m, "R_AX_CPU_DISPATCHER_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1508 seq_printf(m, "R_AX_CPU_DISPATCHER_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1510 seq_printf(m, "R_AX_OTHER_DISPATCHER_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1512 seq_printf(m, "R_AX_OTHER_DISPATCHER_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1518 seq_printf(m, "R_AX_BBRPT_COM_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1520 seq_printf(m, "R_AX_BBRPT_COM_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1522 seq_printf(m, "R_AX_BBRPT_CHINFO_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1524 seq_printf(m, "R_AX_BBRPT_CHINFO_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1526 seq_printf(m, "R_AX_BBRPT_DFS_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1528 seq_printf(m, "R_AX_BBRPT_DFS_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1531 seq_printf(m, "R_AX_BBRPT_COM_ERR_IMR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1533 seq_printf(m, "R_AX_BBRPT_CHINFO_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1535 seq_printf(m, "R_AX_BBRPT_CHINFO_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1537 seq_printf(m, "R_AX_BBRPT_DFS_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1539 seq_printf(m, "R_AX_BBRPT_DFS_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1545 seq_printf(m, "R_AX_HAXIDMA_ERR_IMR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1547 seq_printf(m, "R_AX_HAXIDMA_ERR_ISR=0x%08x\n", in rtw89_debug_mac_dump_dmac_dbg()
1551 return 0; in rtw89_debug_mac_dump_dmac_dbg()
1555 struct seq_file *m, in rtw89_debug_mac_dump_cmac_err() argument
1559 u32 offset = 0; in rtw89_debug_mac_dump_cmac_err()
1566 seq_puts(m, "[CMAC] : CMAC1 not enabled\n"); in rtw89_debug_mac_dump_cmac_err()
1568 seq_puts(m, "[CMAC] : CMAC0 not enabled\n"); in rtw89_debug_mac_dump_cmac_err()
1576 seq_printf(m, "R_AX_CMAC_ERR_ISR [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1578 seq_printf(m, "R_AX_CMAC_FUNC_EN [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1580 seq_printf(m, "R_AX_CK_EN [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1584 seq_printf(m, "R_AX_SCHEDULE_ERR_IMR [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1586 seq_printf(m, "R_AX_SCHEDULE_ERR_ISR [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1591 seq_printf(m, "R_AX_PTCL_IMR0 [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1593 seq_printf(m, "R_AX_PTCL_ISR0 [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1599 seq_printf(m, "R_AX_RX_ERR_FLAG [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1601 seq_printf(m, "R_AX_RX_ERR_FLAG_IMR [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1604 seq_printf(m, "R_AX_DLE_CTRL [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1611 seq_printf(m, "R_AX_PHYINFO_ERR_ISR [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1613 seq_printf(m, "R_AX_PHYINFO_ERR_IMR [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1616 seq_printf(m, "R_AX_PHYINFO_ERR_IMR [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1622 seq_printf(m, "R_AX_TXPWR_IMR [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1624 seq_printf(m, "R_AX_TXPWR_ISR [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1630 seq_printf(m, "R_AX_TRXPTCL_ERROR_INDICA [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1632 seq_printf(m, "R_AX_TRXPTCL_ERROR_INDICA_MASK [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1635 seq_printf(m, "R_AX_TMAC_ERR_IMR_ISR [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1638 seq_printf(m, "R_AX_DBGSEL_TRXPTCL [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1642 seq_printf(m, "R_AX_CMAC_ERR_IMR [%d]=0x%08x\n", band, in rtw89_debug_mac_dump_cmac_err()
1645 return 0; in rtw89_debug_mac_dump_cmac_err()
1649 struct seq_file *m) in rtw89_debug_mac_dump_cmac_dbg() argument
1651 rtw89_debug_mac_dump_cmac_err(rtwdev, m, RTW89_MAC_0); in rtw89_debug_mac_dump_cmac_dbg()
1653 rtw89_debug_mac_dump_cmac_err(rtwdev, m, RTW89_MAC_1); in rtw89_debug_mac_dump_cmac_dbg()
1655 return 0; in rtw89_debug_mac_dump_cmac_dbg()
1662 .srt = 0x00,
1663 .end = 0x3F,
1673 .srt = 0x00,
1674 .end = 0x3F,
1684 .srt = 0x0,
1685 .end = 0xD,
1695 .srt = 0x0,
1696 .end = 0x5,
1706 .srt = 0x0,
1707 .end = 0x9,
1717 .srt = 0x0,
1718 .end = 0x3,
1728 .srt = 0x0,
1729 .end = 0x1,
1739 .srt = 0x0,
1740 .end = 0x0,
1750 .srt = 0x0,
1751 .end = 0xB,
1761 .srt = 0x0,
1762 .end = 0x4,
1772 .srt = 0x0,
1773 .end = 0x8,
1783 .srt = 0x0,
1784 .end = 0x7,
1794 .srt = 0x0,
1795 .end = 0x1,
1805 .srt = 0x0,
1806 .end = 0x3,
1816 .srt = 0x0,
1817 .end = 0x0,
1827 .srt = 0x0,
1828 .end = 0x8,
1838 .srt = 0x0,
1839 .end = 0x0,
1849 .srt = 0x0,
1850 .end = 0x6,
1860 .srt = 0x0,
1861 .end = 0x0,
1871 .srt = 0x0,
1872 .end = 0x0,
1882 .srt = 0x0,
1883 .end = 0x3,
1893 .srt = 0x0,
1894 .end = 0x6,
1904 .srt = 0x0,
1905 .end = 0x0,
1915 .srt = 0x8,
1916 .end = 0xE,
1926 .srt = 0x0,
1927 .end = 0x5,
1937 .srt = 0x0,
1938 .end = 0x6,
1948 .srt = 0x0,
1949 .end = 0xF,
1959 .srt = 0x0,
1960 .end = 0x9,
1970 .srt = 0x0,
1971 .end = 0x3,
1981 .srt = 0x00,
1982 .end = 0x2F,
1992 .srt = 0x00,
1993 .end = 0x2F,
2003 .srt = 0x00,
2004 .end = 0x19,
2014 .srt = 0x00,
2015 .end = 0x19,
2025 .srt = 0x00,
2026 .end = 0x58,
2036 .srt = 0x00,
2037 .end = 0x58,
2047 .srt = 0x00,
2048 .end = 0x17,
2058 .srt = 0x00,
2059 .end = 0x17,
2069 .srt = 0x0,
2070 .end = 0xF,
2080 .srt = 0x0,
2081 .end = 0xF,
2091 .srt = 0x08,
2092 .end = 0x10,
2102 .srt = 0x08,
2103 .end = 0x10,
2113 .srt = 0x00,
2114 .end = 0x07,
2124 .srt = 0x00,
2125 .end = 0x07,
2135 .srt = 0x00,
2136 .end = 0x07,
2146 .srt = 0x00,
2147 .end = 0x07,
2157 .srt = 0x00,
2158 .end = 0x04,
2168 .srt = 0x00,
2169 .end = 0x04,
2179 .srt = 0x00,
2180 .end = 0x04,
2190 .srt = 0x00,
2191 .end = 0x04,
2201 .srt = 0x80000000,
2202 .end = 0x80000001,
2212 .srt = 0x80010000,
2213 .end = 0x80010004,
2223 .srt = 0x80020000,
2224 .end = 0x80020FFF,
2234 .srt = 0x80030000,
2235 .end = 0x80030FFF,
2245 .srt = 0x80040000,
2246 .end = 0x80040FFF,
2256 .srt = 0x80050000,
2257 .end = 0x80050FFF,
2267 .srt = 0x80060000,
2268 .end = 0x80060453,
2278 .srt = 0x80070000,
2279 .end = 0x80070011,
2289 .srt = 0x80000000,
2290 .end = 0x80000001,
2300 .srt = 0x80010000,
2301 .end = 0x8001000A,
2311 .srt = 0x80020000,
2312 .end = 0x80020DBF,
2322 .srt = 0x80030000,
2323 .end = 0x80030DBF,
2333 .srt = 0x80040000,
2334 .end = 0x80040DBF,
2344 .srt = 0x80050000,
2345 .end = 0x80050DBF,
2355 .srt = 0x80060000,
2356 .end = 0x80060041,
2366 .srt = 0x80070000,
2367 .end = 0x80070001,
2377 .srt = 0x80000000,
2378 .end = 0x8000017f,
2388 .srt = 0x00,
2389 .end = 0x03,
2399 .srt = 0x00,
2400 .end = 0x04,
2410 .srt = 0x00,
2411 .end = 0x01,
2421 .srt = 0x00,
2422 .end = 0x05,
2432 .srt = 0x00,
2433 .end = 0x05,
2443 .srt = 0x00,
2444 .end = 0x06,
2454 .srt = 0x34,
2455 .end = 0x3C,
2462 rtw89_debug_mac_dbg_port_sel(struct seq_file *m, in rtw89_debug_mac_dbg_port_sel() argument
2477 seq_puts(m, "Enable PTCL C0 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2484 seq_puts(m, "Enable PTCL C1 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2491 seq_puts(m, "Enable SCH C0 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2498 seq_puts(m, "Enable SCH C1 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2515 seq_puts(m, "Enable TMAC C0 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2532 seq_puts(m, "Enable TMAC C1 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2554 seq_puts(m, "Enable RMAC C0 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2576 seq_puts(m, "Enable RMAC C1 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2580 seq_puts(m, "Enable RMAC state C0 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2584 seq_puts(m, "Enable RMAC state C1 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2588 seq_puts(m, "Enable RMAC PLCP C0 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2592 seq_puts(m, "Enable RMAC PLCP C1 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2604 seq_puts(m, "Enable TRXPTCL C0 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2616 seq_puts(m, "Enable TRXPTCL C1 dbgport.\n"); in rtw89_debug_mac_dbg_port_sel()
2623 seq_puts(m, "Enable tx infol dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2630 seq_puts(m, "Enable tx infoh dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2637 seq_puts(m, "Enable tx infol dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2644 seq_puts(m, "Enable tx infoh dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2651 seq_puts(m, "Enable tx tf infol dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2658 seq_puts(m, "Enable tx tf infoh dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2665 seq_puts(m, "Enable tx tf infol dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2672 seq_puts(m, "Enable tx tf infoh dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2676 seq_puts(m, "Enable wde bufmgn freepg dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2680 seq_puts(m, "Enable wde bufmgn quota dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2684 seq_puts(m, "Enable wde bufmgn pagellt dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2688 seq_puts(m, "Enable wde bufmgn pktinfo dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2692 seq_puts(m, "Enable wde quemgn prepkt dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2696 seq_puts(m, "Enable wde quemgn nxtpkt dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2700 seq_puts(m, "Enable wde quemgn qlnktbl dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2704 seq_puts(m, "Enable wde quemgn qempty dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2708 seq_puts(m, "Enable ple bufmgn freepg dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2712 seq_puts(m, "Enable ple bufmgn quota dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2716 seq_puts(m, "Enable ple bufmgn pagellt dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2720 seq_puts(m, "Enable ple bufmgn pktinfo dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2724 seq_puts(m, "Enable ple quemgn prepkt dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2728 seq_puts(m, "Enable ple quemgn nxtpkt dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2732 seq_puts(m, "Enable ple quemgn qlnktbl dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2736 seq_puts(m, "Enable ple quemgn qempty dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2740 seq_puts(m, "Enable pktinfo dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2744 B_AX_DBG_SEL0, 0x80); in rtw89_debug_mac_dbg_port_sel()
2756 B_AX_DISPATCHER_INTN_SEL_MASK, 0); in rtw89_debug_mac_dbg_port_sel()
2759 seq_printf(m, "Enable Dispatcher hdt tx%x dump.\n", index); in rtw89_debug_mac_dbg_port_sel()
2764 B_AX_DISPATCHER_INTN_SEL_MASK, 0); in rtw89_debug_mac_dbg_port_sel()
2767 seq_puts(m, "Enable Dispatcher hdt tx6 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2772 B_AX_DISPATCHER_INTN_SEL_MASK, 0); in rtw89_debug_mac_dbg_port_sel()
2775 seq_puts(m, "Enable Dispatcher hdt tx7 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2780 B_AX_DISPATCHER_INTN_SEL_MASK, 0); in rtw89_debug_mac_dbg_port_sel()
2783 seq_puts(m, "Enable Dispatcher hdt tx8 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2792 B_AX_DISPATCHER_INTN_SEL_MASK, 0); in rtw89_debug_mac_dbg_port_sel()
2795 seq_printf(m, "Enable Dispatcher hdt tx%x dump.\n", index); in rtw89_debug_mac_dbg_port_sel()
2800 B_AX_DISPATCHER_INTN_SEL_MASK, 0); in rtw89_debug_mac_dbg_port_sel()
2802 B_AX_DISPATCHER_CH_SEL_MASK, 0xD); in rtw89_debug_mac_dbg_port_sel()
2803 seq_puts(m, "Enable Dispatcher hdt txD dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2810 B_AX_DISPATCHER_CH_SEL_MASK, 0); in rtw89_debug_mac_dbg_port_sel()
2811 seq_puts(m, "Enable Dispatcher cdt tx0 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2819 seq_puts(m, "Enable Dispatcher cdt tx1 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2827 seq_puts(m, "Enable Dispatcher cdt tx3 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2835 seq_puts(m, "Enable Dispatcher cdt tx4 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2847 seq_printf(m, "Enable Dispatcher cdt tx%x dump.\n", index); in rtw89_debug_mac_dbg_port_sel()
2855 seq_puts(m, "Enable Dispatcher cdt tx9 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2861 index = sel + 0xA - RTW89_DBG_PORT_SEL_DSPT_CDT_TXA; in rtw89_debug_mac_dbg_port_sel()
2866 seq_printf(m, "Enable Dispatcher cdt tx%x dump.\n", index); in rtw89_debug_mac_dbg_port_sel()
2873 B_AX_DISPATCHER_CH_SEL_MASK, 0); in rtw89_debug_mac_dbg_port_sel()
2874 seq_puts(m, "Enable Dispatcher hdt rx0 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2884 seq_printf(m, "Enable Dispatcher hdt rx%x dump.\n", index); in rtw89_debug_mac_dbg_port_sel()
2892 seq_puts(m, "Enable Dispatcher hdt rx3 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2900 seq_puts(m, "Enable Dispatcher hdt rx4 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2908 seq_puts(m, "Enable Dispatcher hdt rx5 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2915 B_AX_DISPATCHER_CH_SEL_MASK, 0); in rtw89_debug_mac_dbg_port_sel()
2916 seq_puts(m, "Enable Dispatcher cdt rx part0 0 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2925 seq_puts(m, "Enable Dispatcher cdt rx part0 1 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2933 seq_puts(m, "Enable Dispatcher cdt rx part0 2 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2939 seq_puts(m, "Enable Dispatcher cdt rx part1 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2945 seq_puts(m, "Enable Dispatcher stf control dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2951 seq_puts(m, "Enable Dispatcher addr control dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2957 seq_puts(m, "Enable Dispatcher wde interface dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2963 seq_puts(m, "Enable Dispatcher ple interface dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2969 seq_puts(m, "Enable Dispatcher flow control dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2977 seq_puts(m, "Enable pcie txdma dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2985 seq_puts(m, "Enable pcie rxdma dump.\n"); in rtw89_debug_mac_dbg_port_sel()
2993 seq_puts(m, "Enable pcie cvt dump.\n"); in rtw89_debug_mac_dbg_port_sel()
3001 seq_puts(m, "Enable pcie cxpl dump.\n"); in rtw89_debug_mac_dbg_port_sel()
3009 seq_puts(m, "Enable pcie io dump.\n"); in rtw89_debug_mac_dbg_port_sel()
3017 seq_puts(m, "Enable pcie misc dump.\n"); in rtw89_debug_mac_dbg_port_sel()
3025 seq_puts(m, "Enable pcie misc2 dump.\n"); in rtw89_debug_mac_dbg_port_sel()
3028 seq_puts(m, "Dbg port select err\n"); in rtw89_debug_mac_dbg_port_sel()
3045 if (rtw89_mac_check_mac_en(rtwdev, 0, RTW89_DMAC_SEL) && in is_dbg_port_valid()
3049 if (rtw89_mac_check_mac_en(rtwdev, 0, RTW89_DMAC_SEL) && in is_dbg_port_valid()
3053 if (rtw89_mac_check_mac_en(rtwdev, 0, RTW89_CMAC_SEL) && in is_dbg_port_valid()
3066 struct seq_file *m, u32 sel) in rtw89_debug_mac_dbg_port_dump() argument
3074 info = rtw89_debug_mac_dbg_port_sel(m, rtwdev, sel); in rtw89_debug_mac_dbg_port_dump()
3082 seq_puts(m, "Dump debug port " #__sel ":\n"); \ in rtw89_debug_mac_dbg_port_dump()
3178 seq_printf(m, "Sel addr = 0x%X\n", info->sel_addr); in rtw89_debug_mac_dbg_port_dump()
3179 seq_printf(m, "Read addr = 0x%X\n", info->rd_addr); in rtw89_debug_mac_dbg_port_dump()
3187 seq_printf(m, "0x%02X: ", i); in rtw89_debug_mac_dbg_port_dump()
3192 seq_printf(m, "0x%04X: ", i); in rtw89_debug_mac_dbg_port_dump()
3197 seq_printf(m, "0x%04X: ", i); in rtw89_debug_mac_dbg_port_dump()
3208 seq_printf(m, "0x%02X\n", val8); in rtw89_debug_mac_dbg_port_dump()
3213 seq_printf(m, "0x%04X\n", val16); in rtw89_debug_mac_dbg_port_dump()
3218 seq_printf(m, "0x%08X\n", val32); in rtw89_debug_mac_dbg_port_dump()
3223 return 0; in rtw89_debug_mac_dbg_port_dump()
3227 struct seq_file *m) in rtw89_debug_mac_dump_dbg_port() argument
3230 int ret = 0; in rtw89_debug_mac_dump_dbg_port()
3236 ret = rtw89_debug_mac_dbg_port_dump(rtwdev, m, sel); in rtw89_debug_mac_dump_dbg_port()
3248 rtw89_debug_priv_mac_dbg_port_dump_get(struct seq_file *m, void *v) in rtw89_debug_priv_mac_dbg_port_dump_get() argument
3250 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_mac_dbg_port_dump_get()
3254 rtw89_debug_mac_dump_ss_dbg(rtwdev, m); in rtw89_debug_priv_mac_dbg_port_dump_get()
3256 rtw89_debug_mac_dump_dle_dbg(rtwdev, m); in rtw89_debug_priv_mac_dbg_port_dump_get()
3258 rtw89_debug_mac_dump_dmac_dbg(rtwdev, m); in rtw89_debug_priv_mac_dbg_port_dump_get()
3260 rtw89_debug_mac_dump_cmac_dbg(rtwdev, m); in rtw89_debug_priv_mac_dbg_port_dump_get()
3262 rtw89_debug_mac_dump_dbg_port(rtwdev, m); in rtw89_debug_priv_mac_dbg_port_dump_get()
3264 return 0; in rtw89_debug_priv_mac_dbg_port_dump_get()
3273 int err = 0; in rtw89_hex2bin_user()
3320 rtw89_debug_priv_early_h2c_get(struct seq_file *m, void *v) in rtw89_debug_priv_early_h2c_get() argument
3322 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_early_h2c_get()
3325 int seq = 0; in rtw89_debug_priv_early_h2c_get()
3329 seq_printf(m, "%d: %*ph\n", ++seq, early_h2c->h2c_len, early_h2c->h2c); in rtw89_debug_priv_early_h2c_get()
3332 return 0; in rtw89_debug_priv_early_h2c_get()
3339 struct seq_file *m = (struct seq_file *)filp->private_data; in rtw89_debug_priv_early_h2c_set() local
3340 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_early_h2c_set()
3350 if (h2c_len >= 2 && h2c[0] == 0x00 && h2c[1] == 0x00) { in rtw89_debug_priv_early_h2c_set()
3376 struct rtw89_cpuio_ctrl ctrl_para = {0}; in rtw89_dbg_trigger_ctrl_error()
3382 ret = mac->dle_buf_req(rtwdev, 0x20, true, &pkt_id); in rtw89_dbg_trigger_ctrl_error()
3390 ctrl_para.pkt_num = 1; /* start from 0 */ in rtw89_dbg_trigger_ctrl_error()
3397 return 0; in rtw89_dbg_trigger_ctrl_error()
3401 rtw89_debug_priv_fw_crash_get(struct seq_file *m, void *v) in rtw89_debug_priv_fw_crash_get() argument
3403 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_fw_crash_get()
3406 seq_printf(m, "%d\n", in rtw89_debug_priv_fw_crash_get()
3408 return 0; in rtw89_debug_priv_fw_crash_get()
3420 struct seq_file *m = (struct seq_file *)filp->private_data; in rtw89_debug_priv_fw_crash_set() local
3421 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_fw_crash_set()
3427 ret = kstrtou8_from_user(user_buf, count, 0, &crash_type); in rtw89_debug_priv_fw_crash_set()
3455 static int rtw89_debug_priv_btc_info_get(struct seq_file *m, void *v) in rtw89_debug_priv_btc_info_get() argument
3457 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_btc_info_get()
3460 rtw89_btc_dump_info(rtwdev, m); in rtw89_debug_priv_btc_info_get()
3462 return 0; in rtw89_debug_priv_btc_info_get()
3524 struct seq_file *m = (struct seq_file *)data; in rtw89_sta_info_get_iter() local
3534 seq_printf(m, "TX rate [%d]: ", rtwsta->mac_id); in rtw89_sta_info_get_iter()
3537 seq_printf(m, "HT MCS-%d%s", rate->mcs, in rtw89_sta_info_get_iter()
3540 seq_printf(m, "VHT %dSS MCS-%d%s", rate->nss, rate->mcs, in rtw89_sta_info_get_iter()
3543 seq_printf(m, "HE %dSS MCS-%d GI:%s", rate->nss, rate->mcs, in rtw89_sta_info_get_iter()
3547 seq_printf(m, "EHT %dSS MCS-%d GI:%s", rate->nss, rate->mcs, in rtw89_sta_info_get_iter()
3551 seq_printf(m, "Legacy %d", rate->legacy); in rtw89_sta_info_get_iter()
3552 seq_printf(m, "%s", rtwsta->ra_report.might_fallback_legacy ? " FB_G" : ""); in rtw89_sta_info_get_iter()
3553 seq_printf(m, " BW:%u", rtw89_rate_info_bw_to_mhz(rate->bw)); in rtw89_sta_info_get_iter()
3554 seq_printf(m, "\t(hw_rate=0x%x)", rtwsta->ra_report.hw_rate); in rtw89_sta_info_get_iter()
3555 seq_printf(m, "\t==> agg_wait=%d (%d)\n", rtwsta->max_agg_wait, in rtw89_sta_info_get_iter()
3558 seq_printf(m, "RX rate [%d]: ", rtwsta->mac_id); in rtw89_sta_info_get_iter()
3562 seq_printf(m, "Legacy %d", status->rate_idx + in rtw89_sta_info_get_iter()
3563 (status->band != NL80211_BAND_2GHZ ? 4 : 0)); in rtw89_sta_info_get_iter()
3566 seq_printf(m, "HT MCS-%d%s", status->rate_idx, in rtw89_sta_info_get_iter()
3570 seq_printf(m, "VHT %dSS MCS-%d%s", status->nss, status->rate_idx, in rtw89_sta_info_get_iter()
3574 seq_printf(m, "HE %dSS MCS-%d GI:%s", status->nss, status->rate_idx, in rtw89_sta_info_get_iter()
3579 seq_printf(m, "EHT %dSS MCS-%d GI:%s", status->nss, status->rate_idx, in rtw89_sta_info_get_iter()
3584 seq_printf(m, " BW:%u", rtw89_rate_info_bw_to_mhz(status->bw)); in rtw89_sta_info_get_iter()
3585 seq_printf(m, "\t(hw_rate=0x%x)\n", rtwsta->rx_hw_rate); in rtw89_sta_info_get_iter()
3588 seq_printf(m, "RSSI: %d dBm (raw=%d, prev=%d) [", in rtw89_sta_info_get_iter()
3590 for (i = 0; i < ant_num; i++) { in rtw89_sta_info_get_iter()
3592 seq_printf(m, "%d%s%s", RTW89_RSSI_RAW_TO_DBM(rssi), in rtw89_sta_info_get_iter()
3596 seq_puts(m, "]\n"); in rtw89_sta_info_get_iter()
3598 seq_puts(m, "EVM: ["); in rtw89_sta_info_get_iter()
3599 for (i = 0; i < (hal->ant_diversity ? 2 : 1); i++) { in rtw89_sta_info_get_iter()
3603 seq_printf(m, "%s(%2u.%02u, %2u.%02u)", i == 0 ? "" : " ", in rtw89_sta_info_get_iter()
3604 evm_min >> 2, (evm_min & 0x3) * 25, in rtw89_sta_info_get_iter()
3605 evm_max >> 2, (evm_max & 0x3) * 25); in rtw89_sta_info_get_iter()
3607 seq_puts(m, "]\t"); in rtw89_sta_info_get_iter()
3610 seq_printf(m, "SNR: %u\n", snr); in rtw89_sta_info_get_iter()
3614 rtw89_debug_append_rx_rate(struct seq_file *m, struct rtw89_pkt_stat *pkt_stat, in rtw89_debug_append_rx_rate() argument
3619 for (i = 0; i < len; i++) in rtw89_debug_append_rx_rate()
3620 seq_printf(m, "%s%u", i == 0 ? "" : ", ", in rtw89_debug_append_rx_rate()
3634 {FIRST_RATE_SAME(CCK1), 4, 0, "Legacy:"},
3635 {FIRST_RATE_SAME(OFDM6), 8, 0, "OFDM:"},
3636 {FIRST_RATE_ENUM(MCS0), 8, 0, "HT 0:"},
3637 {FIRST_RATE_ENUM(MCS8), 8, 0, "HT 1:"},
3640 {FIRST_RATE_ENUM(HE_NSS1_MCS0), 12, 0, "HE 1SS:"},
3641 {FIRST_RATE_ENUM(HE_NSS2_MCS0), 12, 0, "HE 2SS:"},
3643 {FIRST_RATE_GEV1(EHT_NSS2_MCS0), 14, 0, "EHT 2SS:"},
3646 static int rtw89_debug_priv_phy_info_get(struct seq_file *m, void *v) in rtw89_debug_priv_phy_info_get() argument
3648 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_phy_info_get()
3657 seq_printf(m, "TP TX: %u [%u] Mbps (lv: %d), RX: %u [%u] Mbps (lv: %d)\n", in rtw89_debug_priv_phy_info_get()
3660 seq_printf(m, "Beacon: %u, TF: %u\n", pkt_stat->beacon_nr, in rtw89_debug_priv_phy_info_get()
3662 seq_printf(m, "Avg packet length: TX=%u, RX=%u\n", stats->tx_avg_len, in rtw89_debug_priv_phy_info_get()
3665 seq_puts(m, "RX count:\n"); in rtw89_debug_priv_phy_info_get()
3667 for (i = 0; i < ARRAY_SIZE(rtw89_rx_rate_cnt_infos); i++) { in rtw89_debug_priv_phy_info_get()
3673 seq_printf(m, "%10s [", info->rate_mode); in rtw89_debug_priv_phy_info_get()
3674 rtw89_debug_append_rx_rate(m, pkt_stat, in rtw89_debug_priv_phy_info_get()
3677 seq_puts(m, "]["); in rtw89_debug_priv_phy_info_get()
3678 rtw89_debug_append_rx_rate(m, pkt_stat, in rtw89_debug_priv_phy_info_get()
3681 seq_puts(m, "]\n"); in rtw89_debug_priv_phy_info_get()
3684 ieee80211_iterate_stations_atomic(rtwdev->hw, rtw89_sta_info_get_iter, m); in rtw89_debug_priv_phy_info_get()
3686 return 0; in rtw89_debug_priv_phy_info_get()
3689 static void rtw89_dump_addr_cam(struct seq_file *m, in rtw89_dump_addr_cam() argument
3698 seq_printf(m, "\taddr_cam_idx=%u\n", addr_cam->addr_cam_idx); in rtw89_dump_addr_cam()
3699 seq_printf(m, "\t-> bssid_cam_idx=%u\n", addr_cam->bssid_cam_idx); in rtw89_dump_addr_cam()
3700 seq_printf(m, "\tsec_cam_bitmap=%*ph\n", (int)sizeof(addr_cam->sec_cam_map), in rtw89_dump_addr_cam()
3707 seq_printf(m, "\tsec[%d]: sec_cam_idx %u", i, sec_entry->sec_cam_idx); in rtw89_dump_addr_cam()
3709 seq_printf(m, ", %u", sec_entry->sec_cam_idx + 1); in rtw89_dump_addr_cam()
3710 seq_puts(m, "\n"); in rtw89_dump_addr_cam()
3715 static void rtw89_dump_pkt_offload(struct seq_file *m, struct list_head *pkt_list, in rtw89_dump_pkt_offload() argument
3729 seq_printf(m, "%pV", &vaf); in rtw89_dump_pkt_offload()
3734 seq_printf(m, "%d ", info->id); in rtw89_dump_pkt_offload()
3736 seq_puts(m, "\n"); in rtw89_dump_pkt_offload()
3744 struct seq_file *m = (struct seq_file *)data; in rtw89_vif_ids_get_iter() local
3747 seq_printf(m, "VIF [%d] %pM\n", rtwvif->mac_id, rtwvif->mac_addr); in rtw89_vif_ids_get_iter()
3748 seq_printf(m, "\tbssid_cam_idx=%u\n", bssid_cam->bssid_cam_idx); in rtw89_vif_ids_get_iter()
3749 rtw89_dump_addr_cam(m, rtwdev, &rtwvif->addr_cam); in rtw89_vif_ids_get_iter()
3750 rtw89_dump_pkt_offload(m, &rtwvif->general_pkt_list, "\tpkt_ofld[GENERAL]: "); in rtw89_vif_ids_get_iter()
3753 static void rtw89_dump_ba_cam(struct seq_file *m, struct rtw89_sta *rtwsta) in rtw89_dump_ba_cam() argument
3762 seq_puts(m, "\tba_cam "); in rtw89_dump_ba_cam()
3765 seq_puts(m, ", "); in rtw89_dump_ba_cam()
3767 seq_printf(m, "tid[%u]=%d", entry->tid, in rtw89_dump_ba_cam()
3770 seq_puts(m, "\n"); in rtw89_dump_ba_cam()
3777 struct seq_file *m = (struct seq_file *)data; in rtw89_sta_ids_get_iter() local
3779 seq_printf(m, "STA [%d] %pM %s\n", rtwsta->mac_id, sta->addr, in rtw89_sta_ids_get_iter()
3781 rtw89_dump_addr_cam(m, rtwdev, &rtwsta->addr_cam); in rtw89_sta_ids_get_iter()
3782 rtw89_dump_ba_cam(m, rtwsta); in rtw89_sta_ids_get_iter()
3785 static int rtw89_debug_priv_stations_get(struct seq_file *m, void *v) in rtw89_debug_priv_stations_get() argument
3787 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_stations_get()
3794 seq_puts(m, "map:\n"); in rtw89_debug_priv_stations_get()
3795 seq_printf(m, "\tmac_id: %*ph\n", (int)sizeof(rtwdev->mac_id_map), in rtw89_debug_priv_stations_get()
3797 seq_printf(m, "\taddr_cam: %*ph\n", (int)sizeof(cam_info->addr_cam_map), in rtw89_debug_priv_stations_get()
3799 seq_printf(m, "\tbssid_cam: %*ph\n", (int)sizeof(cam_info->bssid_cam_map), in rtw89_debug_priv_stations_get()
3801 seq_printf(m, "\tsec_cam: %*ph\n", (int)sizeof(cam_info->sec_cam_map), in rtw89_debug_priv_stations_get()
3803 seq_printf(m, "\tba_cam: %*ph\n", (int)sizeof(cam_info->ba_cam_map), in rtw89_debug_priv_stations_get()
3805 seq_printf(m, "\tpkt_ofld: %*ph\n", (int)sizeof(rtwdev->pkt_offload), in rtw89_debug_priv_stations_get()
3811 rtw89_dump_pkt_offload(m, &rtwdev->scan_info.pkt_list[idx], in rtw89_debug_priv_stations_get()
3816 IEEE80211_IFACE_ITER_NORMAL, rtw89_vif_ids_get_iter, m); in rtw89_debug_priv_stations_get()
3818 ieee80211_iterate_stations_atomic(rtwdev->hw, rtw89_sta_ids_get_iter, m); in rtw89_debug_priv_stations_get()
3822 return 0; in rtw89_debug_priv_stations_get()
3835 rtw89_debug_priv_disable_dm_get(struct seq_file *m, void *v) in rtw89_debug_priv_disable_dm_get() argument
3837 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_disable_dm_get()
3844 seq_printf(m, "Disabled DM: 0x%x\n", hal->disabled_dm_bitmap); in rtw89_debug_priv_disable_dm_get()
3846 for (i = 0; i < ARRAY_SIZE(rtw89_disabled_dm_infos); i++) { in rtw89_debug_priv_disable_dm_get()
3850 seq_printf(m, "[%d] %s: %c\n", info->type, info->name, in rtw89_debug_priv_disable_dm_get()
3854 return 0; in rtw89_debug_priv_disable_dm_get()
3861 struct seq_file *m = (struct seq_file *)filp->private_data; in rtw89_debug_priv_disable_dm_set() local
3862 struct rtw89_debugfs_priv *debugfs_priv = m->private; in rtw89_debug_priv_disable_dm_set()
3868 ret = kstrtou32_from_user(user_buf, count, 0, &conf); in rtw89_debug_priv_disable_dm_set()
3964 } while (0)