wifi: rtw88: Fix __rtw_download_firmware() for RTL8814AU
[ Upstream commit 8425f5c8f04dbcf11ade78f984a494fc0b90e7a0 ] 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 Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0b660a7f29
commit
ba02bb3a01
@@ -783,7 +783,8 @@ static int __rtw_download_firmware(struct rtw_dev *rtwdev,
|
|||||||
if (!check_firmware_size(data, size))
|
if (!check_firmware_size(data, size))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (!ltecoex_read_reg(rtwdev, 0x38, <ecoex_bckp))
|
if (rtwdev->chip->ltecoex_addr &&
|
||||||
|
!ltecoex_read_reg(rtwdev, 0x38, <ecoex_bckp))
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
wlan_cpu_enable(rtwdev, false);
|
wlan_cpu_enable(rtwdev, false);
|
||||||
@@ -801,7 +802,8 @@ static int __rtw_download_firmware(struct rtw_dev *rtwdev,
|
|||||||
|
|
||||||
wlan_cpu_enable(rtwdev, true);
|
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;
|
ret = -EBUSY;
|
||||||
goto dlfw_fail;
|
goto dlfw_fail;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user