Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a052c91a authored by Dmitry Antipov's avatar Dmitry Antipov Committed by Greg Kroah-Hartman
Browse files

wifi: rtw88: do not ignore hardware read error during DPK



[ Upstream commit 20d3c19bd8f9b498173c198eadf54580c8caa336 ]

In 'rtw8822c_dpk_cal_coef1()', do not ignore error returned
by 'check_hw_ready()' but issue a warning to denote possible
DPK issue. Compile tested only.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 5227c2ee ("rtw88: 8822c: add SW DPK support")
Suggested-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarDmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250415090720.194048-1-dmantipov@yandex.ru


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 64f82c02
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2857,7 +2857,8 @@ void rtw8822c_dpk_cal_coef1(struct rtw_dev *rtwdev)
	rtw_write32(rtwdev, REG_NCTL0, 0x00001148);
	rtw_write32(rtwdev, REG_NCTL0, 0x00001149);

	check_hw_ready(rtwdev, 0x2d9c, MASKBYTE0, 0x55);
	if (!check_hw_ready(rtwdev, 0x2d9c, MASKBYTE0, 0x55))
		rtw_warn(rtwdev, "DPK stuck, performance may be suboptimal");

	rtw_write8(rtwdev, 0x1b10, 0x0);
	rtw_write32_mask(rtwdev, REG_NCTL0, BIT_SUBPAGE, 0x0000000c);