Message ID | 0e9b08ef-4719-4d37-8b5c-2d1a780499d7@gmail.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Ping-Ke Shih |
Headers | show |
Series | wifi: rtw88: Prepare to support RTL8814AU (part 1/2) | expand |
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote: > 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>
diff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c index cae9cca6dca3..63edf6461de8 100644 --- a/drivers/net/wireless/realtek/rtw88/mac.c +++ b/drivers/net/wireless/realtek/rtw88/mac.c @@ -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, <ecoex_bckp)) + if (rtwdev->chip->ltecoex_addr && + !ltecoex_read_reg(rtwdev, 0x38, <ecoex_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; }
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> --- drivers/net/wireless/realtek/rtw88/mac.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)