diff mbox series

[net-next] rtlwifi: 8192de: correct checking of IQK reload

Message ID 20220524003750.3989-1-pkshih@realtek.com
State New
Headers show
Series [net-next] rtlwifi: 8192de: correct checking of IQK reload | expand

Commit Message

Ping-Ke Shih May 24, 2022, 12:37 a.m. UTC
This mistake is existing since initial commit, and I recall the vendor
driver to find correctness.

Fixes: ee3db469dd31 ("wifi: rtlwifi: remove always-true condition pointed out by GCC 12")
Cc: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
This patch should go through net-next tree, because this one is going to fix
"wifi: rtlwifi: remove always-true condition pointed out by GCC 12" that only
exits in that tree.
---
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
index 15e6a6aded319..f6ff32658863d 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
@@ -2386,7 +2386,10 @@  void rtl92d_phy_reload_iqk_setting(struct ieee80211_hw *hw, u8 channel)
 			rtl_dbg(rtlpriv, COMP_SCAN, DBG_LOUD,
 				"Just Read IQK Matrix reg for channel:%d....\n",
 				channel);
-			_rtl92d_phy_patha_fill_iqk_matrix(hw, true,
+			if ((rtlphy->iqk_matrix[indexforchannel].
+			     value[0][0] != 0)
+				/*&&(regea4 != 0) */)
+				_rtl92d_phy_patha_fill_iqk_matrix(hw, true,
 					rtlphy->iqk_matrix[
 					indexforchannel].value,	0,
 					(rtlphy->iqk_matrix[