]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: coex: Fix coexistence report not show as expected
authorChing-Te Ku <ku920601@realtek.com>
Sat, 8 Mar 2025 02:58:30 +0000 (10:58 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Thu, 13 Mar 2025 01:02:14 +0000 (09:02 +0800)
This report will feedback some basic information from firmware(PTA counter,
report counter, mailbox counter etc). And the report version need to match
driver & firmware both side. The original logic break the switch case logic
before driver update the report version. It made the report can not be
parsed correctly. Delete the break at the version 7 and 8.
Add logic to count C2H event report.

Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250308025832.10400-3-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/coex.c

index f1a811c8713d4b62dd37c166a9c816bbb1e452e7..94445c1d64d1889efe030e66366a8e6d9145fbbf 100644 (file)
@@ -1380,11 +1380,9 @@ static u32 _chk_btc_report(struct rtw89_dev *rtwdev,
                } else if (ver->fcxbtcrpt == 8) {
                        pfinfo = &pfwinfo->rpt_ctrl.finfo.v8;
                        pcinfo->req_len = sizeof(pfwinfo->rpt_ctrl.finfo.v8);
-                       break;
                } else if (ver->fcxbtcrpt == 7) {
                        pfinfo = &pfwinfo->rpt_ctrl.finfo.v7;
                        pcinfo->req_len = sizeof(pfwinfo->rpt_ctrl.finfo.v7);
-                       break;
                } else {
                        goto err;
                }
@@ -8108,6 +8106,7 @@ void rtw89_btc_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
                return;
 
        func = rtw89_btc_c2h_get_index_by_ver(rtwdev, func);
+       pfwinfo->cnt_c2h++;
 
        switch (func) {
        case BTF_EVNT_BUF_OVERFLOW: