]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: rtw88: Fix rtw_mac_power_switch() for RTL8814AU
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Mon, 17 Feb 2025 23:28:59 +0000 (01:28 +0200)
committerPing-Ke Shih <pkshih@realtek.com>
Fri, 21 Feb 2025 02:02:24 +0000 (10:02 +0800)
rtw_mac_power_switch() checks bit 8 of REG_SYS_STATUS1 to see if the
chip is powered on. This bit appears to be always on in the RTL8814AU,
so ignore it.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/2f0fcffb-3067-4d95-a68c-f2f3a5a47921@gmail.com
drivers/net/wireless/realtek/rtw88/mac.c

index 63edf6461de87557359b10dbd152527656939288..0491f501c138390859d8c4a0cf06b209290bea61 100644 (file)
@@ -291,6 +291,7 @@ static int rtw_mac_power_switch(struct rtw_dev *rtwdev, bool pwr_on)
        if (rtw_read8(rtwdev, REG_CR) == 0xea)
                cur_pwr = false;
        else if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_USB &&
+                chip->id != RTW_CHIP_TYPE_8814A &&
                 (rtw_read8(rtwdev, REG_SYS_STATUS1 + 1) & BIT(0)))
                cur_pwr = false;
        else