Commit 430d80e7 authored by Ching-Te Ku's avatar Ching-Te Ku Committed by Ping-Ke Shih

wifi: rtw89: coex: Add Wi-Fi null data status version 7

The mechanism will use Wi-Fi null packet to stop the packets from
access point to avoid the interference to Bluetooth when switch
to Bluetooth slot. The report can check whether the null packet is
working as expected or not.
Signed-off-by: default avatarChing-Te Ku <ku920601@realtek.com>
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/20240423130502.32682-2-pkshih@realtek.com
parent 3ef60f44
......@@ -1379,6 +1379,9 @@ static u32 _chk_btc_report(struct rtw89_dev *rtwdev,
} else if (ver->fcxnullsta == 2) {
pfinfo = &pfwinfo->rpt_fbtc_nullsta.finfo.v2;
pcinfo->req_len = sizeof(pfwinfo->rpt_fbtc_nullsta.finfo.v2);
} else if (ver->fcxnullsta == 7) {
pfinfo = &pfwinfo->rpt_fbtc_nullsta.finfo.v7;
pcinfo->req_len = sizeof(pfwinfo->rpt_fbtc_nullsta.finfo.v7);
} else {
goto err;
}
......@@ -9186,6 +9189,27 @@ static void _show_fbtc_nullsta(struct rtw89_dev *rtwdev, struct seq_file *m)
le32_to_cpu(ns->v1.max_t[i]) / 1000,
le32_to_cpu(ns->v1.max_t[i]) % 1000);
}
} else if (ver->fcxnullsta == 7) {
for (i = 0; i < 2; i++) {
seq_printf(m, " %-15s : ", "[NULL-STA]");
seq_printf(m, "null-%d", i);
seq_printf(m, "[Tx:%d/",
le32_to_cpu(ns->v7.result[i][4]));
seq_printf(m, "[ok:%d/",
le32_to_cpu(ns->v7.result[i][1]));
seq_printf(m, "fail:%d/",
le32_to_cpu(ns->v7.result[i][0]));
seq_printf(m, "on_time:%d/",
le32_to_cpu(ns->v7.result[i][2]));
seq_printf(m, "retry:%d/",
le32_to_cpu(ns->v7.result[i][3]));
seq_printf(m, "avg_t:%d.%03d/",
le32_to_cpu(ns->v7.tavg[i]) / 1000,
le32_to_cpu(ns->v7.tavg[i]) % 1000);
seq_printf(m, "max_t:%d.%03d]\n",
le32_to_cpu(ns->v7.tmax[i]) / 1000,
le32_to_cpu(ns->v7.tmax[i]) % 1000);
}
} else {
for (i = 0; i < 2; i++) {
seq_printf(m, " %-15s : ", "[NULL-STA]");
......
......@@ -2679,9 +2679,21 @@ struct rtw89_btc_fbtc_cynullsta_v2 { /* cycle null statistics */
__le32 result[2][5]; /* 0:fail, 1:ok, 2:on_time, 3:retry, 4:tx */
} __packed;
struct rtw89_btc_fbtc_cynullsta_v7 { /* cycle null statistics */
u8 fver;
u8 rsvd0;
u8 rsvd1;
u8 rsvd2;
__le32 tmax[2];
__le32 tavg[2];
__le32 result[2][5];
} __packed;
union rtw89_btc_fbtc_cynullsta_info {
struct rtw89_btc_fbtc_cynullsta_v1 v1; /* info from fw */
struct rtw89_btc_fbtc_cynullsta_v2 v2;
struct rtw89_btc_fbtc_cynullsta_v7 v7;
};
struct rtw89_btc_fbtc_btver {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment