Commit a7088392 authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Kalle Valo

rtlwifi: Do IQK only once to reduce wifi occupy antenna

Modify 8723be and 8192e only.
8812/8821 do IQK in DM, so we may do it later.
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 135f4fbd
...@@ -1670,6 +1670,7 @@ void rtl92ee_card_disable(struct ieee80211_hw *hw) ...@@ -1670,6 +1670,7 @@ void rtl92ee_card_disable(struct ieee80211_hw *hw)
_rtl92ee_poweroff_adapter(hw); _rtl92ee_poweroff_adapter(hw);
/* after power off we should do iqk again */ /* after power off we should do iqk again */
if (!rtlpriv->cfg->ops->get_btc_status())
rtlpriv->phy.iqk_initialized = false; rtlpriv->phy.iqk_initialized = false;
} }
......
...@@ -1443,7 +1443,9 @@ int rtl8723be_hw_init(struct ieee80211_hw *hw) ...@@ -1443,7 +1443,9 @@ int rtl8723be_hw_init(struct ieee80211_hw *hw)
*/ */
if (rtlpriv->btcoexist.btc_info.ant_num == ANT_X2 || if (rtlpriv->btcoexist.btc_info.ant_num == ANT_X2 ||
!rtlpriv->cfg->ops->get_btc_status()) { !rtlpriv->cfg->ops->get_btc_status()) {
rtl8723be_phy_iq_calibrate(hw, false); rtl8723be_phy_iq_calibrate(hw,
(rtlphy->iqk_initialized ?
true : false));
rtlphy->iqk_initialized = true; rtlphy->iqk_initialized = true;
} }
rtl8723be_dm_check_txpower_tracking(hw); rtl8723be_dm_check_txpower_tracking(hw);
...@@ -1677,6 +1679,7 @@ void rtl8723be_card_disable(struct ieee80211_hw *hw) ...@@ -1677,6 +1679,7 @@ void rtl8723be_card_disable(struct ieee80211_hw *hw)
_rtl8723be_poweroff_adapter(hw); _rtl8723be_poweroff_adapter(hw);
/* after power off we should do iqk again */ /* after power off we should do iqk again */
if (!rtlpriv->cfg->ops->get_btc_status())
rtlpriv->phy.iqk_initialized = false; rtlpriv->phy.iqk_initialized = false;
} }
......
...@@ -2352,7 +2352,7 @@ void rtl8723be_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery) ...@@ -2352,7 +2352,7 @@ void rtl8723be_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery)
if (b_recovery) { if (b_recovery) {
rtl8723_phy_reload_adda_registers(hw, iqk_bb_reg, rtl8723_phy_reload_adda_registers(hw, iqk_bb_reg,
rtlphy->iqk_bb_backup, 9); rtlphy->iqk_bb_backup, 9);
return; goto label_done;
} }
/* Save RF Path */ /* Save RF Path */
path_sel_bb = rtl_get_bbreg(hw, 0x948, MASKDWORD); path_sel_bb = rtl_get_bbreg(hw, 0x948, MASKDWORD);
...@@ -2460,6 +2460,7 @@ void rtl8723be_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery) ...@@ -2460,6 +2460,7 @@ void rtl8723be_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery)
rtl_set_bbreg(hw, 0x948, MASKDWORD, path_sel_bb); rtl_set_bbreg(hw, 0x948, MASKDWORD, path_sel_bb);
/* rtl_set_rfreg(hw, RF90_PATH_A, 0xb0, 0xfffff, path_sel_rf); */ /* rtl_set_rfreg(hw, RF90_PATH_A, 0xb0, 0xfffff, path_sel_rf); */
label_done:
spin_lock(&rtlpriv->locks.iqk_lock); spin_lock(&rtlpriv->locks.iqk_lock);
rtlphy->lck_inprogress = false; rtlphy->lck_inprogress = false;
spin_unlock(&rtlpriv->locks.iqk_lock); spin_unlock(&rtlpriv->locks.iqk_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment