Skip to contentSkip to conversation

rtlwifi: rtl8192ce: remove duplicated function '_rtl92ce_phy_set_rf_sleep'

PATCH In review Lu Jicong 3 participants 3 messages Mar 6, 2022 – Mar 10, 2022

Subsystems (3)
lore
Share & tools
lore

Lu Jicong

author
#0 lore raw

PATCH 1/1 rtlwifi: rtl8192ce: remove duplicated function '_rtl92ce_phy_set_rf_sleep'

This function exists in phy_common.c as '_rtl92c_phy_set_rf_sleep'. Switch to the one in common file.

---
 .../wireless/realtek/rtlwifi/rtl8192ce/phy.c  | 32 +------------------
 1 file changed, 1 insertion(+), 31 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c +1 -31
index 04735da11168..da54e51badd3 100644
@@ -396,36 +396,6 @@ void _rtl92ce_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t)
 	}
 }
 
-static void _rtl92ce_phy_set_rf_sleep(struct ieee80211_hw *hw)
-{
-	u32 u4b_tmp;
-	u8 delay = 5;
-	struct rtl_priv *rtlpriv = rtl_priv(hw);
-
-	rtl_write_byte(rtlpriv, REG_TXPAUSE, 0xFF);
-	rtl_set_rfreg(hw, RF90_PATH_A, 0x00, RFREG_OFFSET_MASK, 0x00);
-	rtl_write_byte(rtlpriv, REG_APSD_CTRL, 0x40);
-	u4b_tmp = rtl_get_rfreg(hw, RF90_PATH_A, 0, RFREG_OFFSET_MASK);
-	while (u4b_tmp != 0 && delay > 0) {
-		rtl_write_byte(rtlpriv, REG_APSD_CTRL, 0x0);
-		rtl_set_rfreg(hw, RF90_PATH_A, 0x00, RFREG_OFFSET_MASK, 0x00);
-		rtl_write_byte(rtlpriv, REG_APSD_CTRL, 0x40);
-		u4b_tmp = rtl_get_rfreg(hw, RF90_PATH_A, 0, RFREG_OFFSET_MASK);
-		delay--;
-	}
-	if (delay == 0) {
-		rtl_write_byte(rtlpriv, REG_APSD_CTRL, 0x00);
-		rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE2);
-		rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE3);
-		rtl_write_byte(rtlpriv, REG_TXPAUSE, 0x00);
-		rtl_dbg(rtlpriv, COMP_POWER, DBG_TRACE,
-			"Switch RF timeout !!!\n");
-		return;
-	}
-	rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, 0xE2);
-	rtl_write_byte(rtlpriv, REG_SPS0_CTRL, 0x22);
-}
-
 static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
 					    enum rf_pwrstate rfpwr_state)
 {
@@ -519,7 +489,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
 				jiffies_to_msecs(jiffies -
 						 ppsc->last_awake_jiffies));
 			ppsc->last_sleep_jiffies = jiffies;
-			_rtl92ce_phy_set_rf_sleep(hw);
+			_rtl92c_phy_set_rf_sleep(hw);
 			break;
 		}
 	default:
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: Lu Jicong <[email protected]>
Sent: Sunday, March 6, 2022 5:09 PM
To: Pkshih <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Lu Jicong <[email protected]>
Subject: [PATCH] rtlwifi: rtl8192ce: remove duplicated function '_rtl92ce_phy_set_rf_sleep'

Quoted 4 lines

This function exists in phy_common.c as '_rtl92c_phy_set_rf_sleep'. Switch to the one in common file.

#2 lore raw
In reply to Lu Jicong
Quoted 5 lines · Lu Jicong

This function exists in phy_common.c as '_rtl92c_phy_set_rf_sleep'. Switch to the one in common file.

Patch applied to wireless-next.git, thanks.

cb459950edcf rtlwifi: rtl8192ce: remove duplicated function '_rtl92ce_phy_set_rf_sleep'

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches