rtlwifi: rtl8192cu: remove duplicated routine in _rtl92c_phy_rf6052_config_parafile
PATCH 1/3 rtlwifi: rtl8192cu: remove duplicated routine in _rtl92c_phy_rf6052_config_parafile
in the _rtl92c_phy_rf6052_config_parafile(), RF90_PATH_A and RF90_PATH_B are same routine. so i remove one of these routine. also the return routine is duplicated. so i remove it.
--- drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/wireless/rtlwifi/rtl8192cu/rf.c +0 -4
@@ -452,9 +452,6 @@ static bool _rtl92c_phy_rf6052_config_parafile(struct ieee80211_hw *hw)udelay (1 );switch (rfpath) {case RF90_PATH_A : - rtstatus =rtl92cu_phy_config_rf_with_headerfile (hw, - (enum radio_path ) rfpath); -break ;case RF90_PATH_B : rtstatus =rtl92cu_phy_config_rf_with_headerfile (hw, (enum radio_path ) rfpath);
@@ -483,7 +480,6 @@ static bool _rtl92c_phy_rf6052_config_parafile(struct ieee80211_hw *hw) } }RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE ,"<---\n" ); -return rtstatus; phy_rf_cfg_fail:return rtstatus; }
Signature · 1 line
2.1.4
PATCH 2/3 rtlwifi: rtl8192cu: debug message change "RTL8192CE" to "RTL8192CU"
In the rtlwifi/rtl8192cu, I change debug message "RTL8192CE" to "RTL8192CU".
--- drivers/net/wireless/rtlwifi/rtl8192cu/phy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/wireless/rtlwifi/rtl8192cu/phy.c +5 -5
@@ -162,7 +162,7 @@ bool _rtl92cu_phy_config_mac_with_headerfile(struct ieee80211_hw *hw)RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE ,"Read Rtl819XMACPHY_Array\n" ); arraylength = rtlphy->hwparam_tables[MAC_REG ].length ; ptrarray = rtlphy->hwparam_tables[MAC_REG ].pdata; -RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE ,"Img:RTL8192CEMAC_2T_ARRAY\n" ); +RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE ,"Img:RTL8192CUMAC_2T_ARRAY\n" );for (i =0 ; i < arraylength; i = i +2 )rtl_write_byte (rtlpriv, ptrarray[i], (u8 ) ptrarray[i +1 ]);return true;
@@ -259,18 +259,18 @@ bool rtl92cu_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, radiob_arraylen = rtlphy->hwparam_tables[RADIOB_2T ].length; radiob_array_table = rtlphy->hwparam_tables[RADIOB_2T ].pdata;RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE , -"Radio_A:RTL8192CERADIOA_2TARRAY\n" ); +"Radio_A:RTL8192CURADIOA_2TARRAY\n" );RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE , -"Radio_B:RTL8192CE_RADIOB_2TARRAY\n" ); +"Radio_B:RTL8192CU_RADIOB_2TARRAY\n" ); }else { radioa_arraylen = rtlphy->hwparam_tables[RADIOA_1T ].length; radioa_array_table = rtlphy->hwparam_tables[RADIOA_1T ].pdata; radiob_arraylen = rtlphy->hwparam_tables[RADIOB_1T ].length; radiob_array_table = rtlphy->hwparam_tables[RADIOB_1T ].pdata;RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE , -"Radio_A:RTL8192CE_RADIOA_1TARRAY\n" ); +"Radio_A:RTL8192CU_RADIOA_1TARRAY\n" );RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE , -"Radio_B:RTL8192CE_RADIOB_1TARRAY\n" ); +"Radio_B:RTL8192CU_RADIOB_1TARRAY\n" ); }RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE ,"Radio No %x\n" , rfpath);switch (rfpath) {
Signature · 1 line
2.1.4
PATCH 3/3 rtlwifi: rtl8192cu: Fix variable isfirst_ampdu
In reply to Taehee Yoortl92cu_rx_query_desc set a isampdu twice.
but second code is related to isfirst_ampdu.
so i change it.
--- drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/rtlwifi/rtl8192cu/trx.c +1 -1
@@ -321,7 +321,7 @@ bool rtl92cu_rx_query_desc(struct ieee80211_hw *hw, stats->rate = (u8 )GET_RX_DESC_RX_MCS (pdesc); stats->shortpreamble = (u16 )GET_RX_DESC_SPLCP (pdesc); stats->isampdu = (bool ) (GET_RX_DESC_PAGGR (pdesc) ==1 ); - stats->isampdu = (bool ) ((GET_RX_DESC_PAGGR (pdesc) ==1 ) + stats->isfirst_ampdu = (bool )((GET_RX_DESC_PAGGR (pdesc) ==1 ) && (GET_RX_DESC_FAGGR (pdesc) ==1 )); stats->timestamp_low =GET_RX_DESC_TSFL (pdesc); stats->rx_is40Mhzpacket = (bool )GET_RX_DESC_BW (pdesc);
Signature · 1 line
2.1.4
Re: [PATCH 3/3] rtlwifi: rtl8192cu: Fix variable isfirst_ampdu
Quoted 8 lines · Taehee Yoo
rtl92cu_rx_query_descset a isampdu twice.
but second code is related toisfirst_ampdu.
so i change it.Signed-off-by Taehee Yoo <[email protected]>--- drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Looks good.
Larry
Quoted 15 lines
drivers/net/wireless/rtlwifi/rtl8192cu/trx.c +1
-1@@ -321,7 +321,7 @@ bool rtl92cu_rx_query_desc(struct ieee80211_hw *hw, stats->rate = (u8 )GET_RX_DESC_RX_MCS (pdesc); stats->shortpreamble = (u16 )GET_RX_DESC_SPLCP (pdesc); stats->isampdu = (bool ) (GET_RX_DESC_PAGGR (pdesc) ==1 ); - stats->isampdu = (bool ) ((GET_RX_DESC_PAGGR (pdesc) ==1 ) + stats->isfirst_ampdu = (bool )((GET_RX_DESC_PAGGR (pdesc) ==1 ) && (GET_RX_DESC_FAGGR (pdesc) ==1 )); stats->timestamp_low =GET_RX_DESC_TSFL (pdesc); stats->rx_is40Mhzpacket = (bool )GET_RX_DESC_BW (pdesc);
Re: [PATCH 2/3] rtlwifi: rtl8192cu: debug message change "RTL8192CE" to "RTL8192CU"
In reply to Taehee YooQuoted 7 lines · Taehee Yoo
In the rtlwifi/rtl8192cu, I change debug message "RTL8192CE" to "RTL8192CU".
Signed-off-by Taehee Yoo <[email protected]>--- drivers/net/wireless/rtlwifi/rtl8192cu/phy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
I am not sure that anyone ever uses this level of debug, but the changes are OK.
Larry
Quoted 38 lines
drivers/net/wireless/rtlwifi/rtl8192cu/phy.c +5
-5@@ -162,7 +162,7 @@ bool _rtl92cu_phy_config_mac_with_headerfile(struct ieee80211_hw *hw)RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE ,"Read Rtl819XMACPHY_Array\n" ); arraylength = rtlphy->hwparam_tables[MAC_REG ].length ; ptrarray = rtlphy->hwparam_tables[MAC_REG ].pdata; -RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE ,"Img:RTL8192CEMAC_2T_ARRAY\n" ); +RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE ,"Img:RTL8192CUMAC_2T_ARRAY\n" );for (i =0 ; i < arraylength; i = i +2 )rtl_write_byte (rtlpriv, ptrarray[i], (u8 ) ptrarray[i +1 ]);return true;@@ -259,18 +259,18 @@ bool rtl92cu_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, radiob_arraylen = rtlphy->hwparam_tables[RADIOB_2T ].length; radiob_array_table = rtlphy->hwparam_tables[RADIOB_2T ].pdata;RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE , -"Radio_A:RTL8192CERADIOA_2TARRAY\n" ); +"Radio_A:RTL8192CURADIOA_2TARRAY\n" );RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE , -"Radio_B:RTL8192CE_RADIOB_2TARRAY\n" ); +"Radio_B:RTL8192CU_RADIOB_2TARRAY\n" ); }else { radioa_arraylen = rtlphy->hwparam_tables[RADIOA_1T ].length; radioa_array_table = rtlphy->hwparam_tables[RADIOA_1T ].pdata; radiob_arraylen = rtlphy->hwparam_tables[RADIOB_1T ].length; radiob_array_table = rtlphy->hwparam_tables[RADIOB_1T ].pdata;RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE , -"Radio_A:RTL8192CE_RADIOA_1TARRAY\n" ); +"Radio_A:RTL8192CU_RADIOA_1TARRAY\n" );RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE , -"Radio_B:RTL8192CE_RADIOB_1TARRAY\n" ); +"Radio_B:RTL8192CU_RADIOB_1TARRAY\n" ); }RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE ,"Radio No %x\n" , rfpath);switch (rfpath) {
Quoted 9 lines · Taehee Yoo
in the
_rtl92c_phy_rf6052_config_parafile(),RF90_PATH_AandRF90_PATH_Bare same routine. so i remove one of these routine. also the return routine is duplicated. so i remove it.Signed-off-by Taehee Yoo <[email protected]>--- drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 4 ---- 1 file changed, 4 deletions(-)
The code changes are OK, but the commit message needs some work. The phrase "RF90_PATH_A and RF90_PATH_B are same routine" should be changed to "cases RF90_PATH_A and RF90_PATH_B call the same routine".
Larry
Quoted 23 lines
drivers/net/wireless/rtlwifi/rtl8192cu/rf.c +0
-4@@ -452,9 +452,6 @@ static bool _rtl92c_phy_rf6052_config_parafile(struct ieee80211_hw *hw)udelay (1 );switch (rfpath) {case RF90_PATH_A : - rtstatus =rtl92cu_phy_config_rf_with_headerfile (hw, - (enum radio_path ) rfpath); -break ;case RF90_PATH_B : rtstatus =rtl92cu_phy_config_rf_with_headerfile (hw, (enum radio_path ) rfpath);@@ -483,7 +480,6 @@ static bool _rtl92c_phy_rf6052_config_parafile(struct ieee80211_hw *hw) } }RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE ,"<---\n" ); -return rtstatus; phy_rf_cfg_fail:return rtstatus; }
2015-06-06 0:37 GMT+09:00 Larry Finger <[email protected]>:
Quoted 39 lines · Taehee Yoo
Quoted 10 lines
in the
_rtl92c_phy_rf6052_config_parafile(),RF90_PATH_AandRF90_PATH_Bare same routine. so i remove one of these routine. also the return routine is duplicated. so i remove it.Signed-off-by Taehee Yoo <[email protected]>--- drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 4 ---- 1 file changed, 4 deletions(-)The code changes are OK, but the commit message needs some work. The phrase "
RF90_PATH_AandRF90_PATH_Bare same routine" should be changed to "casesRF90_PATH_AandRF90_PATH_Bcall the same routine".Larry
Quoted 20 lines
drivers/net/wireless/rtlwifi/rtl8192cu/rf.c +0
-3@@ -452,9 +452,6 @@ static bool _rtl92c_phy_rf6052_config_parafile(struct ieee80211_hw *hw) udelay(1); switch (rfpath) { case RF90_PATH_A: - rtstatus = rtl92cu_phy_config_rf_with_headerfile(hw, - (enum radio_path ) rfpath); -break ; case RF90_PATH_B:rtstatus =
rtl92cu_phy_config_rf_with_headerfile(hw,(enum radio_path) rfpath);drivers/net/wireless/rtlwifi/rtl8192cu/rf.c +0
-0@@ -483,7 +480,6 @@ static bool _rtl92c_phy_rf6052_config_parafile(struct ieee80211_hw *hw)
Quoted 9 lines
Quoted 8 lines
drivers/net/wireless/rtlwifi/rtl8192cu/rf.c +0
-1} }RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE ,"<---\n" ); -return rtstatus; phy_rf_cfg_fail:return rtstatus;}
Thank you for your review!
I will resend a patch as V2.