diff mbox series

[1/7] rtw89: coex: correct C2H header length

Message ID 20211209083229.10815-2-pkshih@realtek.com
State New
Headers show
Series rtw89: coex: improve performance when Wifi PS is on | expand

Commit Message

Ping-Ke Shih Dec. 9, 2021, 8:32 a.m. UTC
From: Ching-Te Ku <ku920601@realtek.com>

To resolve C2H handle length mismatch, or it will parse the c2h content
out of array.

Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/coex.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Kalle Valo Dec. 14, 2021, 6:36 p.m. UTC | #1
Ping-Ke Shih <pkshih@realtek.com> wrote:

> From: Ching-Te Ku <ku920601@realtek.com>
> 
> To resolve C2H handle length mismatch, or it will parse the c2h content
> out of array.
> 
> Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>

7 patches applied to wireless-drivers-next.git, thanks.

b3131a41ac6f rtw89: coex: correct C2H header length
f8028a9a92f2 rtw89: coex: Not to send H2C when WL not ready and count H2C
8c7e9ceb5bac rtw89: coex: Add MAC API to get BT polluted counter
2200ff3f0d1d rtw89: coex: Define LPS state for BTC using
eb87d79911c6 rtw89: coex: Update BT counters while receiving report
bd309c8b4965 rtw89: coex: Cancel PS leaving while C2H comes
4c02043c5a52 rtw89: coex: Update COEX to 5.5.8
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c
index abe4b6549ab22..f220229a7a482 100644
--- a/drivers/net/wireless/realtek/rtw89/coex.c
+++ b/drivers/net/wireless/realtek/rtw89/coex.c
@@ -4494,6 +4494,8 @@  void rtw89_btc_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
 	struct rtw89_btc_btf_fwinfo *pfwinfo = &btc->fwinfo;
 	u8 *buf = &skb->data[RTW89_C2H_HEADER_LEN];
 
+	len -= RTW89_C2H_HEADER_LEN;
+
 	rtw89_debug(rtwdev, RTW89_DBG_BTC,
 		    "[BTC], %s(): C2H BT len:%d class:%d fun:%d\n",
 		    __func__, len, class, func);