]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:12:45 +0000 (11:12 +0200)
[ Upstream commit a36230aa5f5efceaf5f81682673732a921b91518 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtw89/coex.c

index 68316d44b204300752e9741d259e285754676284..9e06cc36a75e2954ae233c1d4f0f08f05c288925 100644 (file)
@@ -1372,11 +1372,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;
                }
@@ -8115,6 +8113,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: