rtw88: refine tx_pwr_tbl debugfs to show channel and bandwidth
authorZong-Zhe Yang <kevin_yang@realtek.com>
Mon, 29 Nov 2021 02:06:26 +0000 (10:06 +0800)
committerKalle Valo <kvalo@kernel.org>
Wed, 8 Dec 2021 18:28:39 +0000 (20:28 +0200)
Show channel and bandwidth in debugfs tx_pwr_tbl to make it easier
to understand which tx power table is shown currently, and to reduce
additional checks through other ways.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20211129020626.6384-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw88/debug.c

index 2eb8322..b863c74 100644 (file)
@@ -631,6 +631,8 @@ static int rtw_debugfs_get_tx_pwr_tbl(struct seq_file *m, void *v)
        u8 ch = hal->current_channel;
        u8 regd = rtw_regd_get(rtwdev);
 
+       seq_printf(m, "channel: %u\n", ch);
+       seq_printf(m, "bandwidth: %u\n", bw);
        seq_printf(m, "regulatory: %s\n", rtw_get_regd_string(regd));
        seq_printf(m, "%-4s %-10s %-3s%6s %-4s %4s (%-4s %-4s) %-4s\n",
                   "path", "rate", "pwr", "", "base", "", "byr", "lmt", "rem");