Lines Matching refs:m
20 int (*cb_read)(struct seq_file *m, void *v);
50 static int rtw_debugfs_single_show(struct seq_file *m, void *v) in rtw_debugfs_single_show() argument
52 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debugfs_single_show()
54 return debugfs_priv->cb_read(m, v); in rtw_debugfs_single_show()
110 static int rtw_debugfs_get_read_reg(struct seq_file *m, void *v) in rtw_debugfs_get_read_reg() argument
112 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debugfs_get_read_reg()
121 seq_printf(m, "reg 0x%03x: 0x%02x\n", addr, val); in rtw_debugfs_get_read_reg()
125 seq_printf(m, "reg 0x%03x: 0x%04x\n", addr, val); in rtw_debugfs_get_read_reg()
129 seq_printf(m, "reg 0x%03x: 0x%08x\n", addr, val); in rtw_debugfs_get_read_reg()
135 static int rtw_debugfs_get_rf_read(struct seq_file *m, void *v) in rtw_debugfs_get_rf_read() argument
137 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debugfs_get_rf_read()
148 seq_printf(m, "rf_read path:%d addr:0x%08x mask:0x%08x val=0x%08x\n", in rtw_debugfs_get_rf_read()
203 static int rtw_debugfs_get_dump_cam(struct seq_file *m, void *v) in rtw_debugfs_get_dump_cam() argument
205 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debugfs_get_dump_cam()
212 seq_printf(m, "cam entry%d\n", debugfs_priv->cb_data); in rtw_debugfs_get_dump_cam()
213 seq_puts(m, "0x0 0x1 0x2 0x3 "); in rtw_debugfs_get_dump_cam()
214 seq_puts(m, "0x4 0x5\n"); in rtw_debugfs_get_dump_cam()
220 seq_printf(m, "%8.8x", val); in rtw_debugfs_get_dump_cam()
222 seq_puts(m, " "); in rtw_debugfs_get_dump_cam()
224 seq_puts(m, "\n"); in rtw_debugfs_get_dump_cam()
229 static int rtw_debugfs_get_rsvd_page(struct seq_file *m, void *v) in rtw_debugfs_get_rsvd_page() argument
231 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debugfs_get_rsvd_page()
254 seq_printf(m, "PAGE %d\n", (i + offset) / page_size); in rtw_debugfs_get_rsvd_page()
255 seq_printf(m, "%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x\n", in rtw_debugfs_get_rsvd_page()
439 static int rtw_debug_get_mac_page(struct seq_file *m, void *v) in rtw_debug_get_mac_page() argument
441 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debug_get_mac_page()
449 seq_printf(m, "\n%8.8x ", n + page); in rtw_debug_get_mac_page()
451 seq_printf(m, "%8.8x ", in rtw_debug_get_mac_page()
454 seq_puts(m, "\n"); in rtw_debug_get_mac_page()
458 static int rtw_debug_get_bb_page(struct seq_file *m, void *v) in rtw_debug_get_bb_page() argument
460 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debug_get_bb_page()
468 seq_printf(m, "\n%8.8x ", n + page); in rtw_debug_get_bb_page()
470 seq_printf(m, "%8.8x ", in rtw_debug_get_bb_page()
473 seq_puts(m, "\n"); in rtw_debug_get_bb_page()
477 static int rtw_debug_get_rf_dump(struct seq_file *m, void *v) in rtw_debug_get_rf_dump() argument
479 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debug_get_rf_dump()
485 seq_printf(m, "RF path:%d\n", path); in rtw_debug_get_rf_dump()
487 seq_printf(m, "%8.8x ", addr); in rtw_debug_get_rf_dump()
491 seq_printf(m, "%8.8x ", data); in rtw_debug_get_rf_dump()
493 seq_puts(m, "\n"); in rtw_debug_get_rf_dump()
495 seq_puts(m, "\n"); in rtw_debug_get_rf_dump()
501 static void rtw_print_cck_rate_txt(struct seq_file *m, u8 rate) in rtw_print_cck_rate_txt() argument
507 seq_printf(m, " CCK_%-5s", cck_rate[idx]); in rtw_print_cck_rate_txt()
510 static void rtw_print_ofdm_rate_txt(struct seq_file *m, u8 rate) in rtw_print_ofdm_rate_txt() argument
516 seq_printf(m, " OFDM_%-4s", ofdm_rate[idx]); in rtw_print_ofdm_rate_txt()
519 static void rtw_print_ht_rate_txt(struct seq_file *m, u8 rate) in rtw_print_ht_rate_txt() argument
523 seq_printf(m, " MCS%-6u", mcs_n); in rtw_print_ht_rate_txt()
526 static void rtw_print_vht_rate_txt(struct seq_file *m, u8 rate) in rtw_print_vht_rate_txt() argument
535 seq_printf(m, " VHT%uSMCS%u", n_ss, mcs_n); in rtw_print_vht_rate_txt()
538 static void rtw_print_rate(struct seq_file *m, u8 rate) in rtw_print_rate() argument
542 rtw_print_cck_rate_txt(m, rate); in rtw_print_rate()
545 rtw_print_ofdm_rate_txt(m, rate); in rtw_print_rate()
548 rtw_print_ht_rate_txt(m, rate); in rtw_print_rate()
551 rtw_print_vht_rate_txt(m, rate); in rtw_print_rate()
554 seq_printf(m, " Unknown rate=0x%x\n", rate); in rtw_print_rate()
581 static int rtw_debugfs_get_tx_pwr_tbl(struct seq_file *m, void *v) in rtw_debugfs_get_tx_pwr_tbl() argument
583 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debugfs_get_tx_pwr_tbl()
592 seq_printf(m, "regulatory: %s\n", rtw_get_regd_string(regd)); in rtw_debugfs_get_tx_pwr_tbl()
593 seq_printf(m, "%-4s %-10s %-3s%6s %-4s %4s (%-4s %-4s) %-4s\n", in rtw_debugfs_get_tx_pwr_tbl()
614 seq_printf(m, "%4c ", path + 'A'); in rtw_debugfs_get_tx_pwr_tbl()
615 rtw_print_rate(m, rate); in rtw_debugfs_get_tx_pwr_tbl()
616 seq_printf(m, " %3u(0x%02x) %4u %4d (%4d %4d) %4d\n", in rtw_debugfs_get_tx_pwr_tbl()
632 void rtw_debugfs_get_simple_phy_info(struct seq_file *m) in rtw_debugfs_get_simple_phy_info() argument
634 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debugfs_get_simple_phy_info()
640 seq_printf(m, "%-40s = %ddBm/ %d\n", "RSSI/ STA Channel", in rtw_debugfs_get_simple_phy_info()
643 seq_printf(m, "TP {Tx, Rx} = {%u, %u}Mbps\n", in rtw_debugfs_get_simple_phy_info()
646 seq_puts(m, "[Tx Rate] = "); in rtw_debugfs_get_simple_phy_info()
647 rtw_print_rate(m, dm_info->tx_rate); in rtw_debugfs_get_simple_phy_info()
648 seq_printf(m, "(0x%x)\n", dm_info->tx_rate); in rtw_debugfs_get_simple_phy_info()
650 seq_puts(m, "[Rx Rate] = "); in rtw_debugfs_get_simple_phy_info()
651 rtw_print_rate(m, dm_info->curr_rx_rate); in rtw_debugfs_get_simple_phy_info()
652 seq_printf(m, "(0x%x)\n", dm_info->curr_rx_rate); in rtw_debugfs_get_simple_phy_info()
655 static int rtw_debugfs_get_phy_info(struct seq_file *m, void *v) in rtw_debugfs_get_phy_info() argument
657 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debugfs_get_phy_info()
667 seq_puts(m, "==========[Common Info]========\n"); in rtw_debugfs_get_phy_info()
668 seq_printf(m, "Is link = %c\n", rtw_is_assoc(rtwdev) ? 'Y' : 'N'); in rtw_debugfs_get_phy_info()
669 seq_printf(m, "Current CH(fc) = %u\n", rtwdev->hal.current_channel); in rtw_debugfs_get_phy_info()
670 seq_printf(m, "Current BW = %u\n", rtwdev->hal.current_band_width); in rtw_debugfs_get_phy_info()
671 seq_printf(m, "Current IGI = 0x%x\n", dm_info->igi_history[0]); in rtw_debugfs_get_phy_info()
672 seq_printf(m, "TP {Tx, Rx} = {%u, %u}Mbps\n\n", in rtw_debugfs_get_phy_info()
675 seq_puts(m, "==========[Tx Phy Info]========\n"); in rtw_debugfs_get_phy_info()
676 seq_puts(m, "[Tx Rate] = "); in rtw_debugfs_get_phy_info()
677 rtw_print_rate(m, dm_info->tx_rate); in rtw_debugfs_get_phy_info()
678 seq_printf(m, "(0x%x)\n\n", dm_info->tx_rate); in rtw_debugfs_get_phy_info()
680 seq_puts(m, "==========[Rx Phy Info]========\n"); in rtw_debugfs_get_phy_info()
681 seq_printf(m, "[Rx Beacon Count] = %u\n", last_cnt->num_bcn_pkt); in rtw_debugfs_get_phy_info()
682 seq_puts(m, "[Rx Rate] = "); in rtw_debugfs_get_phy_info()
683 rtw_print_rate(m, dm_info->curr_rx_rate); in rtw_debugfs_get_phy_info()
684 seq_printf(m, "(0x%x)\n", dm_info->curr_rx_rate); in rtw_debugfs_get_phy_info()
686 seq_puts(m, "[Rx Rate Count]:\n"); in rtw_debugfs_get_phy_info()
687 seq_printf(m, " * CCK = {%u, %u, %u, %u}\n", in rtw_debugfs_get_phy_info()
693 seq_printf(m, " * OFDM = {%u, %u, %u, %u, %u, %u, %u, %u}\n", in rtw_debugfs_get_phy_info()
705 seq_printf(m, " * HT_MCS[%u:%u] = {%u, %u, %u, %u, %u, %u, %u, %u}\n", in rtw_debugfs_get_phy_info()
719 seq_printf(m, " * VHT_MCS-%uss MCS[0:9] = {%u, %u, %u, %u, %u, %u, %u, %u, %u, %u}\n", in rtw_debugfs_get_phy_info()
733 seq_printf(m, "[RSSI(dBm)] = {%d, %d}\n", in rtw_debugfs_get_phy_info()
736 seq_printf(m, "[Rx EVM(dB)] = {-%d, -%d}\n", in rtw_debugfs_get_phy_info()
739 seq_printf(m, "[Rx SNR] = {%d, %d}\n", in rtw_debugfs_get_phy_info()
742 seq_printf(m, "[CFO_tail(KHz)] = {%d, %d}\n", in rtw_debugfs_get_phy_info()
747 seq_puts(m, "[Rx Average Status]:\n"); in rtw_debugfs_get_phy_info()
748 seq_printf(m, " * OFDM, EVM: {-%d}, SNR: {%d}\n", in rtw_debugfs_get_phy_info()
751 seq_printf(m, " * 1SS, EVM: {-%d}, SNR: {%d}\n", in rtw_debugfs_get_phy_info()
754 seq_printf(m, " * 2SS, EVM: {-%d, -%d}, SNR: {%d, %d}\n", in rtw_debugfs_get_phy_info()
761 seq_puts(m, "[Rx Counter]:\n"); in rtw_debugfs_get_phy_info()
762 seq_printf(m, " * CCA (CCK, OFDM, Total) = (%u, %u, %u)\n", in rtw_debugfs_get_phy_info()
766 seq_printf(m, " * False Alarm (CCK, OFDM, Total) = (%u, %u, %u)\n", in rtw_debugfs_get_phy_info()
770 seq_printf(m, " * CCK cnt (ok, err) = (%u, %u)\n", in rtw_debugfs_get_phy_info()
772 seq_printf(m, " * OFDM cnt (ok, err) = (%u, %u)\n", in rtw_debugfs_get_phy_info()
774 seq_printf(m, " * HT cnt (ok, err) = (%u, %u)\n", in rtw_debugfs_get_phy_info()
776 seq_printf(m, " * VHT cnt (ok, err) = (%u, %u)\n", in rtw_debugfs_get_phy_info()
782 static int rtw_debugfs_get_coex_info(struct seq_file *m, void *v) in rtw_debugfs_get_coex_info() argument
784 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debugfs_get_coex_info()
787 rtw_coex_display_coex_info(rtwdev, m); in rtw_debugfs_get_coex_info()
819 static int rtw_debugfs_get_coex_enable(struct seq_file *m, void *v) in rtw_debugfs_get_coex_enable() argument
821 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debugfs_get_coex_enable()
825 seq_printf(m, "coex mechanism %s\n", in rtw_debugfs_get_coex_enable()
862 static int rtw_debugfs_get_fw_crash(struct seq_file *m, void *v) in rtw_debugfs_get_fw_crash() argument
864 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debugfs_get_fw_crash()
867 seq_printf(m, "%d\n", test_bit(RTW_FLAG_RESTARTING, rtwdev->flags)); in rtw_debugfs_get_fw_crash()
903 static void dump_gapk_status(struct rtw_dev *rtwdev, struct seq_file *m) in dump_gapk_status() argument
910 seq_printf(m, "\n(%2d) %c%s\n\n", RTW_DM_CAP_TXGAPK, in dump_gapk_status()
916 seq_printf(m, "path %d:\n0x%x = 0x%x\n", path, RF_GAINTX, val); in dump_gapk_status()
919 seq_printf(m, "[TXGAPK] offset %d %d\n", in dump_gapk_status()
921 seq_puts(m, "\n"); in dump_gapk_status()
925 static int rtw_debugfs_get_dm_cap(struct seq_file *m, void *v) in rtw_debugfs_get_dm_cap() argument
927 struct rtw_debugfs_priv *debugfs_priv = m->private; in rtw_debugfs_get_dm_cap()
934 dump_gapk_status(rtwdev, m); in rtw_debugfs_get_dm_cap()
938 seq_printf(m, "(%2d) %c%s\n", i, in rtw_debugfs_get_dm_cap()