rtlwifi: 8192de: correct checking of IQK reload
Ping-Ke Shih
maintainerPATCH 1/1 rtlwifi: 8192de: correct checking of IQK reload
This mistake is existing since initial commit, and I recall the vendor driver to find correctness.
---
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(-)
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c +4 -1
@@ -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[
Signature · 1 line
2.25.1
Quoted 4 lines · On Tue, 24 May 2022 08:37:50 +0800 Ping-Ke Shih wrote:
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")
Not fair, I did not break this code. My change did not alter the functionality.
Quoted 6 lines
Cc Jakub Kicinski <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>---
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.
If you want it to go via net-next you must CC netdev@.
But I don't see any reason to rush it, AFAICS the code was added in 2011 - commit 7274a8c22980 ("rtlwifi: rtl8192de: Merge phy routines") or so. We waited 11 years to notice, we can wait a few weeks for the patch to propagate thru wireless tree.
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c void rtl92d_phy_reload_iqk_setting(struct ieee80211_hw *hw, u8 channel) · line 2391
Quoted 12 lines
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c +3
-1@@ -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) */ )
Please don't add the extra brackets around the condition and the commented out code back in.
Quoted 4 lines
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c +1
-0+ _rtl92d_phy_patha_fill_iqk_matrix(hw, true, rtlphy->iqk_matrix[ indexforchannel].value, 0, (rtlphy->iqk_matrix[
Ping-Ke Shih
maintainerQuoted 8 lines
-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Tuesday, May 24, 2022 9:41 AM
To: Ping-Ke Shih <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH net-next] rtlwifi: 8192de: correct checking of IQK reload
Quoted 8 lines
Quoted 4 lines · On Tue, 24 May 2022 08:37:50 +0800 Ping-Ke Shih wrote:
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")Not fair, I did not break this code. My change did not alter the functionality.
Will annotate the commit 11 years ago.
Quoted 17 lines
Quoted 7 lines
Cc Jakub Kicinski <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>---
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.If you want it to go via net-next you must CC netdev@.
But I don't see any reason to rush it, AFAICS the code was added in 2011 - commit
7274a8c22980("rtlwifi: rtl8192de: Merge phy routines") or so. We waited 11 years to notice, we can wait a few weeks for the patch to propagate thru wireless tree.Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
Quoted 14 lines
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c void rtl92d_phy_reload_iqk_setting(struct ieee80211_hw *hw, u8 channel) · line 2391
Quoted 11 lines
index
15e6a6aded319..f6ff32658863d100644drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c +3
-1@@ -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) */ )Please don't add the extra brackets around the condition and the commented out code back in.
My patch is to revert your patch and correct single one line. I will correct the strange coding style as well until your patch appears in wireless-next.
Quoted 6 lines
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c void rtl92d_phy_reload_iqk_setting(struct ieee80211_hw *hw, u8 channel) · line 2395
Quoted 5 lines
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c +1
-0+ _rtl92d_phy_patha_fill_iqk_matrix(hw, true, rtlphy->iqk_matrix[ indexforchannel].value, 0, (rtlphy->iqk_matrix[------Please consider the environment before printing this e-mail.