]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Jun 2023 20:06:49 +0000 (22:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Jun 2023 20:06:49 +0000 (22:06 +0200)
added patches:
wifi-rtlwifi-8192de-correct-checking-of-iqk-reload.patch

queue-4.19/series
queue-4.19/wifi-rtlwifi-8192de-correct-checking-of-iqk-reload.patch [new file with mode: 0644]

index 08b7bfc3448f2d561f43dff26e8baa5d6c0dbc59..08dfe9a66795d02b2da57a79bb0be77fab4323ab 100644 (file)
@@ -85,3 +85,4 @@ fbcon-fix-null-ptr-deref-in-soft_cursor.patch
 regmap-account-for-register-length-when-chunking.patch
 scsi-dpt_i2o-remove-broken-pass-through-ioctl-i2ousercmd.patch
 scsi-dpt_i2o-do-not-process-completions-with-invalid-addresses.patch
+wifi-rtlwifi-8192de-correct-checking-of-iqk-reload.patch
diff --git a/queue-4.19/wifi-rtlwifi-8192de-correct-checking-of-iqk-reload.patch b/queue-4.19/wifi-rtlwifi-8192de-correct-checking-of-iqk-reload.patch
new file mode 100644 (file)
index 0000000..396adbe
--- /dev/null
@@ -0,0 +1,47 @@
+From 93fbc1ebd978cf408ef5765e9c1630fce9a8621b Mon Sep 17 00:00:00 2001
+From: Ping-Ke Shih <pkshih@realtek.com>
+Date: Mon, 1 Aug 2022 19:33:45 +0800
+Subject: wifi: rtlwifi: 8192de: correct checking of IQK reload
+
+From: Ping-Ke Shih <pkshih@realtek.com>
+
+commit 93fbc1ebd978cf408ef5765e9c1630fce9a8621b upstream.
+
+Since IQK could spend time, we make a cache of IQK result matrix that looks
+like iqk_matrix[channel_idx].val[x][y], and we can reload the matrix if we
+have made a cache. To determine a cache is made, we check
+iqk_matrix[channel_idx].val[0][0].
+
+The initial commit 7274a8c22980 ("rtlwifi: rtl8192de: Merge phy routines")
+make a mistake that checks incorrect iqk_matrix[channel_idx].val[0] that
+is always true, and this mistake is found by commit ee3db469dd31
+("wifi: rtlwifi: remove always-true condition pointed out by GCC 12"), so
+I recall the vendor driver to find fix and apply the correctness.
+
+Fixes: 7274a8c22980 ("rtlwifi: rtl8192de: Merge phy routines")
+Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
+Signed-off-by: Kalle Valo <kvalo@kernel.org>
+Link: https://lore.kernel.org/r/20220801113345.42016-1-pkshih@realtek.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c |    9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
+@@ -2414,11 +2414,10 @@ void rtl92d_phy_reload_iqk_setting(struc
+                       RT_TRACE(rtlpriv, COMP_SCAN, DBG_LOUD,
+                                "Just Read IQK Matrix reg for channel:%d....\n",
+                                channel);
+-                      _rtl92d_phy_patha_fill_iqk_matrix(hw, true,
+-                                      rtlphy->iqk_matrix[
+-                                      indexforchannel].value, 0,
+-                                      (rtlphy->iqk_matrix[
+-                                      indexforchannel].value[0][2] == 0));
++                      if (rtlphy->iqk_matrix[indexforchannel].value[0][0] != 0)
++                              _rtl92d_phy_patha_fill_iqk_matrix(hw, true,
++                                      rtlphy->iqk_matrix[indexforchannel].value, 0,
++                                      rtlphy->iqk_matrix[indexforchannel].value[0][2] == 0);
+                       if (IS_92D_SINGLEPHY(rtlhal->version)) {
+                               if ((rtlphy->iqk_matrix[
+                                       indexforchannel].value[0][4] != 0)