]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: wow: abstract DMA check register for RTL8922DE
authorChin-Yen Lee <timlee@realtek.com>
Mon, 29 Dec 2025 03:09:18 +0000 (11:09 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Wed, 31 Dec 2025 08:18:46 +0000 (16:18 +0800)
The coming RTL8922DE use different register and its bit to poll if DMA
becomes idle before entering WoWLAN. Abstract to share common flow.

Signed-off-by: Chin-Yen Lee <timlee@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20251229030926.27004-5-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/pci_be.c

index e4590879b8004b1ab934021d26ec2cadf661ba6e..95efb1094b6c1c7374525aa470b4d476c59cdf03 100644 (file)
@@ -184,10 +184,13 @@ static void rtw89_pci_clr_idx_all_be(struct rtw89_dev *rtwdev)
 
 static int rtw89_pci_poll_txdma_ch_idle_be(struct rtw89_dev *rtwdev)
 {
+       const struct rtw89_pci_info *info = rtwdev->pci_info;
+       u32 dma_busy1 = info->dma_busy1.addr;
+       u32 check = info->dma_busy1.mask;
        u32 val;
 
-       return read_poll_timeout(rtw89_read32, val, (val & DMA_BUSY1_CHECK_BE) == 0,
-                                10, 1000, false, rtwdev, R_BE_HAXI_DMA_BUSY1);
+       return read_poll_timeout(rtw89_read32, val, (val & check) == 0,
+                                10, 1000, false, rtwdev, dma_busy1);
 }
 
 static int rtw89_pci_poll_rxdma_ch_idle_be(struct rtw89_dev *rtwdev)