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 05/11] wifi: rtw89: Fix rtw89_mac_dmac_func_pre_en_ax() for USB/SDIO
Date: Fri, 1 Aug 2025 23:38:50 +0300 [thread overview]
Message-ID: <bac2edf7-b027-4eef-a67a-7a4c3b3f01d7@gmail.com> (raw)
In-Reply-To: <2527e1be-3121-4f29-8539-72f4bfb225a6@gmail.com>
Set the DMA mode according to the interface type.
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
drivers/net/wireless/realtek/rtw89/mac.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
index fce48ac97a02..2d473f1bb66c 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.c
+++ b/drivers/net/wireless/realtek/rtw89/mac.c
@@ -3979,8 +3979,15 @@ static void rtw89_mac_dmac_func_pre_en_ax(struct rtw89_dev *rtwdev)
val = rtw89_read32(rtwdev, R_AX_HAXI_INIT_CFG1);
val &= ~(B_AX_DMA_MODE_MASK | B_AX_STOP_AXI_MST);
- val |= FIELD_PREP(B_AX_DMA_MODE_MASK, DMA_MOD_PCIE_1B) |
- B_AX_TXHCI_EN_V1 | B_AX_RXHCI_EN_V1;
+ val |= B_AX_TXHCI_EN_V1 | B_AX_RXHCI_EN_V1;
+
+ if (rtwdev->hci.type == RTW89_HCI_TYPE_PCIE)
+ val |= FIELD_PREP(B_AX_DMA_MODE_MASK, DMA_MOD_PCIE_1B);
+ else if (rtwdev->hci.type == RTW89_HCI_TYPE_USB)
+ val |= FIELD_PREP(B_AX_DMA_MODE_MASK, DMA_MOD_USB);
+ else
+ val |= FIELD_PREP(B_AX_DMA_MODE_MASK, DMA_MOD_SDIO);
+
rtw89_write32(rtwdev, R_AX_HAXI_INIT_CFG1, val);
rtw89_write32_clr(rtwdev, R_AX_HAXI_DMA_STOP1,
--
2.50.0
next prev parent reply other threads:[~2025-08-01 20:38 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 ` [PATCH rtw-next 01/11] wifi: rtw89: Fix rtw89_core_get_ch_dma() " Bitterblue Smith
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 ` Bitterblue Smith [this message]
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=bac2edf7-b027-4eef-a67a-7a4c3b3f01d7@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.