All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Subject: [PATCH rtw-next 01/11] wifi: rtw89: Fix rtw89_core_get_ch_dma() for RTL8852CU
Date: Fri, 1 Aug 2025 23:37:00 +0300	[thread overview]
Message-ID: <f7cd0c5f-e670-4091-9b4c-de1a869ebea5@gmail.com> (raw)
In-Reply-To: <2527e1be-3121-4f29-8539-72f4bfb225a6@gmail.com>

It seems RTL8852CU can only use TX channels 0, 2, and 8 (for band 0),
otherwise the chip stops working after downloading at maximum speed
for a few seconds.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
 drivers/net/wireless/realtek/rtw89/txrx.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtw89/txrx.h b/drivers/net/wireless/realtek/rtw89/txrx.h
index ec01bfc363da..318fd0ac8726 100644
--- a/drivers/net/wireless/realtek/rtw89/txrx.h
+++ b/drivers/net/wireless/realtek/rtw89/txrx.h
@@ -734,6 +734,25 @@ rtw89_core_get_qsel_mgmt(struct rtw89_dev *rtwdev, struct rtw89_core_tx_request
 
 static inline u8 rtw89_core_get_ch_dma(struct rtw89_dev *rtwdev, u8 qsel)
 {
+	if (rtwdev->hci.type == RTW89_HCI_TYPE_USB &&
+	    rtwdev->chip->chip_id == RTL8852C) {
+		switch (qsel) {
+		default:
+			rtw89_warn(rtwdev, "Cannot map qsel to dma: %d\n",
+				   qsel);
+			fallthrough;
+		case RTW89_TX_QSEL_BE_0:
+		case RTW89_TX_QSEL_VO_0:
+			return RTW89_TXCH_ACH0;
+		case RTW89_TX_QSEL_BK_0:
+		case RTW89_TX_QSEL_VI_0:
+			return RTW89_TXCH_ACH2;
+		case RTW89_TX_QSEL_B0_MGMT:
+		case RTW89_TX_QSEL_B0_HI:
+			return RTW89_TXCH_CH8;
+		}
+	}
+
 	switch (qsel) {
 	default:
 		rtw89_warn(rtwdev, "Cannot map qsel to dma: %d\n", qsel);
-- 
2.50.0


  reply	other threads:[~2025-08-01 20:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-01 20:35 [PATCH rtw-next 00/11] wifi: rtw89: Add support for RTL8852CU Bitterblue Smith
2025-08-01 20:37 ` Bitterblue Smith [this message]
2025-08-01 20:37 ` [PATCH rtw-next 02/11] wifi: rtw89: usb: Fix rtw89_usb_get_bulkout_id() " Bitterblue Smith
2025-08-01 20:38 ` [PATCH rtw-next 03/11] wifi: rtw89: usb: Fix rtw89_usb_ops_mac_pre_init() " Bitterblue Smith
2025-08-01 20:38 ` [PATCH rtw-next 04/11] wifi: rtw89: usb: Fix rtw89_usb_ops_mac_post_init() " Bitterblue Smith
2025-08-01 20:38 ` [PATCH rtw-next 05/11] wifi: rtw89: Fix rtw89_mac_dmac_func_pre_en_ax() for USB/SDIO Bitterblue Smith
2025-08-01 20:39 ` [PATCH rtw-next 06/11] wifi: rtw89: 8852c: Fix rtw8852c_pwr_{on,off}_func() for USB Bitterblue Smith
2025-08-01 20:40 ` [PATCH rtw-next 00/11] wifi: rtw89: Add support for RTL8852CU Bitterblue Smith
2025-08-01 20:41 ` [PATCH rtw-next 09/11] wifi: rtw89: 8852c: Accept USB devices and load their MAC address Bitterblue Smith
2025-08-01 20:44 ` [PATCH rtw-next 00/11] wifi: rtw89: Add support for RTL8852CU Bitterblue Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7cd0c5f-e670-4091-9b4c-de1a869ebea5@gmail.com \
    --to=rtl8821cerfe2@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.