]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw88: Fix __rtw_download_firmware() for RTL8814AU
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Tue, 4 Feb 2025 18:36:56 +0000 (20:36 +0200)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 10 Feb 2025 03:32:29 +0000 (11:32 +0800)
Don't call ltecoex_read_reg() and ltecoex_reg_write() when the
ltecoex_addr member of struct rtw_chip_info is NULL. The RTL8814AU
doesn't have this feature.

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/55b5641f-094e-4f94-9f79-ac053733f2cf@gmail.com
drivers/net/wireless/realtek/rtw88/mac.c

index cae9cca6dca3d8f38f5324bbc7b24742f87b9be6..63edf6461de87557359b10dbd152527656939288 100644 (file)
@@ -784,7 +784,8 @@ static int __rtw_download_firmware(struct rtw_dev *rtwdev,
        if (!check_firmware_size(data, size))
                return -EINVAL;
 
-       if (!ltecoex_read_reg(rtwdev, 0x38, &ltecoex_bckp))
+       if (rtwdev->chip->ltecoex_addr &&
+           !ltecoex_read_reg(rtwdev, 0x38, &ltecoex_bckp))
                return -EBUSY;
 
        wlan_cpu_enable(rtwdev, false);
@@ -802,7 +803,8 @@ static int __rtw_download_firmware(struct rtw_dev *rtwdev,
 
        wlan_cpu_enable(rtwdev, true);
 
-       if (!ltecoex_reg_write(rtwdev, 0x38, ltecoex_bckp)) {
+       if (rtwdev->chip->ltecoex_addr &&
+           !ltecoex_reg_write(rtwdev, 0x38, ltecoex_bckp)) {
                ret = -EBUSY;
                goto dlfw_fail;
        }