wifi: rtw89: coex: translate slot ID to readable name

To analyze debug log quickly, use readable name in string format instead.

Signed-off-by: Ching-Te Ku <ku920601@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/20220920010939.12173-3-pkshih@realtek.com
This commit is contained in:
Ching-Te Ku 2022-09-20 09:09:32 +08:00 committed by Kalle Valo
parent 0d7b3a83c0
commit 7d42efcaea
1 changed files with 29 additions and 1 deletions

View File

@ -5727,6 +5727,7 @@ static void _show_bt_info(struct rtw89_dev *rtwdev, struct seq_file *m)
#define CASE_BTC_ACT_STR(e) case BTC_ACT_ ## e | BTC_ACT_EXT_BIT: return #e
#define CASE_BTC_POLICY_STR(e) \
case BTC_CXP_ ## e | BTC_POLICY_EXT_BIT: return #e
#define CASE_BTC_SLOT_STR(e) case CXST_ ## e: return #e
static const char *steps_to_str(u16 step)
{
@ -5840,6 +5841,32 @@ static const char *steps_to_str(u16 step)
}
}
static const char *id_to_slot(u32 id)
{
switch (id) {
CASE_BTC_SLOT_STR(OFF);
CASE_BTC_SLOT_STR(B2W);
CASE_BTC_SLOT_STR(W1);
CASE_BTC_SLOT_STR(W2);
CASE_BTC_SLOT_STR(W2B);
CASE_BTC_SLOT_STR(B1);
CASE_BTC_SLOT_STR(B2);
CASE_BTC_SLOT_STR(B3);
CASE_BTC_SLOT_STR(B4);
CASE_BTC_SLOT_STR(LK);
CASE_BTC_SLOT_STR(BLK);
CASE_BTC_SLOT_STR(E2G);
CASE_BTC_SLOT_STR(E5G);
CASE_BTC_SLOT_STR(EBT);
CASE_BTC_SLOT_STR(ENULL);
CASE_BTC_SLOT_STR(WLK);
CASE_BTC_SLOT_STR(W1FDD);
CASE_BTC_SLOT_STR(B1FDD);
default:
return "unknown";
}
}
static
void seq_print_segment(struct seq_file *m, const char *prefix, u16 *data,
u8 len, u8 seg_len, u8 start_idx, u8 ring_len)
@ -6239,7 +6266,8 @@ static void _show_fbtc_cysta_v1(struct rtw89_dev *rtwdev, struct seq_file *m)
if (!le32_to_cpu(pcysta->slot_cnt[i]))
continue;
seq_printf(m, ", %d:%d", i, le32_to_cpu(pcysta->slot_cnt[i]));
seq_printf(m, ", %s:%d", id_to_slot(i),
le32_to_cpu(pcysta->slot_cnt[i]));
}
if (dm->tdma_now.rxflctrl)