From patchwork Wed Feb 5 01:32:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping-Ke Shih X-Patchwork-Id: 13960401 X-Patchwork-Delegate: pkshih@realtek.com Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBC3B25A63B for ; Wed, 5 Feb 2025 01:33:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738719196; cv=none; b=JfDX0nYkqW8qBVO+/Mim+W9ms8izmK1jPcl7mCE5GSCRnOw/ixhhL6LhzOdhFaMNaRN19t0nAe0JpeX5Tw3ZMGAVgPVQIu3ii1nq+Tr9zZhGp7klSix12bXMog1pN66FNnGoSIVZM0C7XYeXVk4I9q3PxhARrh4R54bpfuxUDnQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738719196; c=relaxed/simple; bh=tJrHN2h0zpKCSS3qg4MkS6/EgjulfpSKA779hlS7Jco=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=V0iTHuQPN1mWecSAsIi6dx78CjBijgvlFl+o5Juqf4C/Mhv8vye9v4H8DZ6KvfuslPbI45nwn1Rp5Z7WsnxDnVRJm1Eb/vNdlMyz0mbRE7gPWkANpgBsulpoLzTwyYRu5roECY4PFd+JCketaQzm9l3EPmcnqKmZLaVvCecpCQQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; dkim=temperror (0-bit key) header.d=realtek.com header.i=@realtek.com header.b=GjVKgQhZ; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com Authentication-Results: smtp.subspace.kernel.org; dkim=temperror (0-bit key) header.d=realtek.com header.i=@realtek.com header.b="GjVKgQhZ" X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 5151XCeP4761251, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=realtek.com; s=dkim; t=1738719192; bh=tJrHN2h0zpKCSS3qg4MkS6/EgjulfpSKA779hlS7Jco=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type; b=GjVKgQhZPG38NwbmK1bjJv8Xw0UJN13IBjJFxP9ESDtuFehJfrfkIOL1ziVL0Akd/ FUVkPH5Bu1St4oCOcRKSxcueGSvQF3mNLKwePhTlQmyw7jSgSirdbJKBCrNvmR6IjG 61W4r+xGZZg2I7c7pL8x2jIYy9vmG6IULnLDSiuScTjGj/4n+fMWO/2wqrG23PHQym AwzqBpHvG7UGjBBVkHQtVXXoODQt0/IE1Zg2DKKbn6eEkZAhAbsrmd3d8/+XANG2FE zXWCfRk4QK7DR88iowhOqvznVVVtSazmHUpDwDE1WSxC7CkPXAJbwGfu14k3IQ6CkM p3o0SFe05UpPQ== Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/3.06/5.92) with ESMTPS id 5151XCeP4761251 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 5 Feb 2025 09:33:12 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 5 Feb 2025 09:33:12 +0800 Received: from [127.0.1.1] (172.21.69.94) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 5 Feb 2025 09:33:11 +0800 From: Ping-Ke Shih To: CC: Subject: [PATCH 1/3] wifi: rtw89: coex: Assign value over than 0 to avoid firmware timer hang Date: Wed, 5 Feb 2025 09:32:31 +0800 Message-ID: <20250205013233.10945-2-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250205013233.10945-1-pkshih@realtek.com> References: <20250205013233.10945-1-pkshih@realtek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) From: Ching-Te Ku If the slot duration is 0, the firmware timer will trigger timer hang at the timer initializing state in a low rate due to hardware algorithm. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/coex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c index 2c0ccf2f8bd9..806a51782467 100644 --- a/drivers/net/wireless/realtek/rtw89/coex.c +++ b/drivers/net/wireless/realtek/rtw89/coex.c @@ -89,10 +89,10 @@ static const struct rtw89_btc_fbtc_slot s_def[] = { [CXST_B4] = __DEF_FBTC_SLOT(50, 0xe5555555, SLOT_MIX), [CXST_LK] = __DEF_FBTC_SLOT(20, 0xea5a5a5a, SLOT_ISO), [CXST_BLK] = __DEF_FBTC_SLOT(500, 0x55555555, SLOT_MIX), - [CXST_E2G] = __DEF_FBTC_SLOT(0, 0xea5a5a5a, SLOT_MIX), - [CXST_E5G] = __DEF_FBTC_SLOT(0, 0xffffffff, SLOT_ISO), + [CXST_E2G] = __DEF_FBTC_SLOT(5, 0xea5a5a5a, SLOT_MIX), + [CXST_E5G] = __DEF_FBTC_SLOT(5, 0xffffffff, SLOT_ISO), [CXST_EBT] = __DEF_FBTC_SLOT(5, 0xe5555555, SLOT_MIX), - [CXST_ENULL] = __DEF_FBTC_SLOT(0, 0xaaaaaaaa, SLOT_ISO), + [CXST_ENULL] = __DEF_FBTC_SLOT(5, 0xaaaaaaaa, SLOT_ISO), [CXST_WLK] = __DEF_FBTC_SLOT(250, 0xea5a5a5a, SLOT_MIX), [CXST_W1FDD] = __DEF_FBTC_SLOT(50, 0xffffffff, SLOT_ISO), [CXST_B1FDD] = __DEF_FBTC_SLOT(50, 0xffffdfff, SLOT_ISO), From patchwork Wed Feb 5 01:32:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping-Ke Shih X-Patchwork-Id: 13960402 X-Patchwork-Delegate: pkshih@realtek.com Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4357A213E91 for ; Wed, 5 Feb 2025 01:33:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738719199; cv=none; b=kkqUk33QQp089uNr7f0L5CYiVz49vRSM/J9BBo8NAxJmb4AwdbhrvSrTUs6smjinITutOGXBQZa1yK6/nIewP/TZ+zefFwV+ob7C1QHgzG+fbKgae+I2nyZiJSKunU3yVgenEaCrgEw9wCjd81QgffckwLNlE1l7+Pi7eM7ODc8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738719199; c=relaxed/simple; bh=287TFufhOJ44nqug9HXu/nUOdoHf+C+P6zA8cP/TgBo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Xx1gKNRe5lb61P8hk/n0HFTm2ktsHJuui6vttD84qqcj0mF3GEGKk5UxCPb8htFfZeEHyPWU7isIWefrS7PWLUOumLXceJ6yaP68hpX/BlLxx3jLU62kWOp3V7LCFgPA2Eg75sT5mRGxwfZLhLTerwhIJA2Mj0C48uxFsyx3D9A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; dkim=temperror (0-bit key) header.d=realtek.com header.i=@realtek.com header.b=HwWgM2ef; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com Authentication-Results: smtp.subspace.kernel.org; dkim=temperror (0-bit key) header.d=realtek.com header.i=@realtek.com header.b="HwWgM2ef" X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 5151XF2r8761257, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=realtek.com; s=dkim; t=1738719195; bh=287TFufhOJ44nqug9HXu/nUOdoHf+C+P6zA8cP/TgBo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type; b=HwWgM2efB2yCFgrneNBZ8OtE178gt8k1rUe22/xEx4bQJXWOut5eQsR2diMgXre0w 4a8M5RKvo0OJbdKXptS+B+RJjEe83FW0X4FGCbg+cFdxdRuBN2WWpAlS8S38F43/fA J2uAftmdpZtM+uqCxyzTstznzWuIWy5b7BKOlSnIk+ZOIYr3yF/qK0bpMADuXS9MJx V9g3Vh829JcSpb5HcyyfWMt9uP7O+kDtTcBCgGE0JOv+alKrVGdjFeBP7UvVNgt9Oq rrgp3Yp5Y6IVw/OFoAPu/x0oISGykA4p35F8yNQ5pnkj6FRrP8WnYHwb43aYFK0dJz YFl4O+LQvpPEQ== Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/3.06/5.92) with ESMTPS id 5151XF2r8761257 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 5 Feb 2025 09:33:15 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 5 Feb 2025 09:33:14 +0800 Received: from [127.0.1.1] (172.21.69.94) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 5 Feb 2025 09:33:14 +0800 From: Ping-Ke Shih To: CC: Subject: [PATCH 2/3] wifi: rtw89: coex: To avoid TWS serials A2DP lag, adjust slot arrangement Date: Wed, 5 Feb 2025 09:32:32 +0800 Message-ID: <20250205013233.10945-3-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250205013233.10945-1-pkshih@realtek.com> References: <20250205013233.10945-1-pkshih@realtek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) From: Ching-Te Ku The TWS(True wireless stereo) serials Bluetooth audio device need to keep packet traffic not only with DUT, it also need to synchronize packet with its assistant earbud. And all the BR/EDR Bluetooth device need to do page scan to keep re-connect event sensitively between different DUT. These behavior will make TWS Bluetooth device cost more time slot to keep the good audio performance. This patch decrease half of Wi-Fi slot(from 40ms to 20ms) in a single cycle. Make the slot more flexible to prevent audio lag. The single cycle will be shorter, then it will bring some slot protection cost make Wi-Fi throughput decrease about 5%. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/coex.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c index 806a51782467..28d29fa17316 100644 --- a/drivers/net/wireless/realtek/rtw89/coex.c +++ b/drivers/net/wireless/realtek/rtw89/coex.c @@ -4583,17 +4583,11 @@ static void _action_bt_hid(struct rtw89_dev *rtwdev) static void _action_bt_a2dp(struct rtw89_dev *rtwdev) { struct rtw89_btc *btc = &rtwdev->btc; - struct rtw89_btc_bt_link_info *bt_linfo = &btc->cx.bt.link_info; - struct rtw89_btc_bt_a2dp_desc a2dp = bt_linfo->a2dp_desc; struct rtw89_btc_dm *dm = &btc->dm; _set_ant(rtwdev, NM_EXEC, BTC_PHY_ALL, BTC_ANT_W2G); - if (a2dp.vendor_id == 0x4c || dm->leak_ap || bt_linfo->slave_role) - dm->slot_dur[CXST_W1] = 20; - else - dm->slot_dur[CXST_W1] = 40; - + dm->slot_dur[CXST_W1] = 20; dm->slot_dur[CXST_B1] = BTC_B1_MAX; switch (btc->cx.state_map) { @@ -4690,17 +4684,11 @@ static void _action_bt_pan(struct rtw89_dev *rtwdev) static void _action_bt_a2dp_hid(struct rtw89_dev *rtwdev) { struct rtw89_btc *btc = &rtwdev->btc; - struct rtw89_btc_bt_link_info *bt_linfo = &btc->cx.bt.link_info; - struct rtw89_btc_bt_a2dp_desc a2dp = bt_linfo->a2dp_desc; struct rtw89_btc_dm *dm = &btc->dm; _set_ant(rtwdev, NM_EXEC, BTC_PHY_ALL, BTC_ANT_W2G); - if (a2dp.vendor_id == 0x4c || dm->leak_ap || bt_linfo->slave_role) - dm->slot_dur[CXST_W1] = 20; - else - dm->slot_dur[CXST_W1] = 40; - + dm->slot_dur[CXST_W1] = 20; dm->slot_dur[CXST_B1] = BTC_B1_MAX; switch (btc->cx.state_map) { From patchwork Wed Feb 5 01:32:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping-Ke Shih X-Patchwork-Id: 13960403 X-Patchwork-Delegate: pkshih@realtek.com Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BFFF213E91 for ; Wed, 5 Feb 2025 01:33:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738719203; cv=none; b=E/eNbZN/8fkVhUAjIQ0xK4zN/BbdKE4+sBpp3+v97zit9D+A9jS8j8lNZNOcqUy+gy7sHJuLOOWguN2iw15QixDdjd8vujWZfTKP2y4N8R6lol20RKNOA/ljF7kHcbKh5ZIyDaN4OXGKGXz0SVvKey6O2Gyu3I1KQXV/nHyrAzM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738719203; c=relaxed/simple; bh=OamDtNA5+YG4uHeaW5h9Oa/DBkdeUy2pBdSuEkTgdKc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Fr8utrzPlrWoatQ9k0lozEbubK1OfmyQvKXxO2B5LL1TSqVDNFDlVq156NUHgKHIZShkJXAGOFX94tadKPLPE8Vfeg+MXD65XRKqVfEUPJ0qlBjI5kuSh9s/14LHwMoVYuV9b/S5N8TibRlJSsTv3NuFXY1W7tJL7Kp0eCoPN1w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; dkim=temperror (0-bit key) header.d=realtek.com header.i=@realtek.com header.b=rz58JNtX; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com Authentication-Results: smtp.subspace.kernel.org; dkim=temperror (0-bit key) header.d=realtek.com header.i=@realtek.com header.b="rz58JNtX" X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 5151XIl74761261, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=realtek.com; s=dkim; t=1738719198; bh=OamDtNA5+YG4uHeaW5h9Oa/DBkdeUy2pBdSuEkTgdKc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type; b=rz58JNtXJggUtnOhpsu2HN//zkqqVd9n6cArED7GJO48z5EBrL4kEspOAHnKBI2PQ cbDrb9SwsevPYdRf87lL/Ftg71A8bNtszKl62fDEiwp1Ea4Q0Mi68nhvwpnA+my7XH oEgV46argxetfwBNRERHHHn7DTVvkVilVl3U5V14mIFrIf4B4IC0ycWE4vcbwY9ZPi ohMuYhnbHolrNpXwT3sdMI5eMchH3erZJm8apdmOrWQ4mlyC1vWojkyOkYcKnAplRm ZkAfPw3jKKpOFwN0J2yM30huiROvFRGgG17HqFYgD76PE5CTxc5QSw+zU+/9C63oEd OAgt4RyoVtcFQ== Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/3.06/5.92) with ESMTPS id 5151XIl74761261 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 5 Feb 2025 09:33:18 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 5 Feb 2025 09:33:17 +0800 Received: from [127.0.1.1] (172.21.69.94) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 5 Feb 2025 09:33:17 +0800 From: Ping-Ke Shih To: CC: Subject: [PATCH 3/3] wifi: rtw89: coex: Update Wi-Fi/Bluetooth coexistence version to 7.0.3 Date: Wed, 5 Feb 2025 09:32:33 +0800 Message-ID: <20250205013233.10945-4-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250205013233.10945-1-pkshih@realtek.com> References: <20250205013233.10945-1-pkshih@realtek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) From: Ching-Te Ku Refine the TWS Bluetooth related coexistence mechanism. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/coex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c index 28d29fa17316..858ff0cd1a23 100644 --- a/drivers/net/wireless/realtek/rtw89/coex.c +++ b/drivers/net/wireless/realtek/rtw89/coex.c @@ -10,7 +10,7 @@ #include "ps.h" #include "reg.h" -#define RTW89_COEX_VERSION 0x07000213 +#define RTW89_COEX_VERSION 0x07000313 #define FCXDEF_STEP 50 /* MUST <= FCXMAX_STEP and match with wl fw*/ #define BTC_E2G_LIMIT_DEF 80