aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2011-02-19 17:28:57 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-02-21 15:39:57 -0500
commit7ea4724036ed17ec811cb8082af7760f04484ef7 (patch)
tree7c90e84760d7d2f28814a13b21a6226960fe8e49 /drivers/net/wireless/rtlwifi/rtl8192ce/phy.c
parent0e80b9d1c51883e01603e2ff0caae608eda09fa5 (diff)
rtlwifi: Modify some rtl8192ce routines for merging rtl8192cu
Modify some rtl8192ce routines for merging with rtl8192cu. In addition, remove some usage of Hungarian notation. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192ce/phy.c')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192ce/phy.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c
index 05f7a45b30e1..4b256d0bebcc 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c
@@ -330,7 +330,7 @@ bool rtl92c_phy_bb_config(struct ieee80211_hw *hw)
330 struct rtl_priv *rtlpriv = rtl_priv(hw); 330 struct rtl_priv *rtlpriv = rtl_priv(hw);
331 u16 regval; 331 u16 regval;
332 u32 regvaldw; 332 u32 regvaldw;
333 u8 b_reg_hwparafile = 1; 333 u8 reg_hwparafile = 1;
334 334
335 _rtl92c_phy_init_bb_rf_register_definition(hw); 335 _rtl92c_phy_init_bb_rf_register_definition(hw);
336 regval = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN); 336 regval = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN);
@@ -345,7 +345,7 @@ bool rtl92c_phy_bb_config(struct ieee80211_hw *hw)
345 rtl_write_byte(rtlpriv, REG_AFE_XTAL_CTRL + 1, 0x80); 345 rtl_write_byte(rtlpriv, REG_AFE_XTAL_CTRL + 1, 0x80);
346 regvaldw = rtl_read_dword(rtlpriv, REG_LEDCFG0); 346 regvaldw = rtl_read_dword(rtlpriv, REG_LEDCFG0);
347 rtl_write_dword(rtlpriv, REG_LEDCFG0, regvaldw | BIT(23)); 347 rtl_write_dword(rtlpriv, REG_LEDCFG0, regvaldw | BIT(23));
348 if (b_reg_hwparafile == 1) 348 if (reg_hwparafile == 1)
349 rtstatus = _rtl92c_phy_bb8192c_config_parafile(hw); 349 rtstatus = _rtl92c_phy_bb8192c_config_parafile(hw);
350 return rtstatus; 350 return rtstatus;
351} 351}
@@ -388,7 +388,7 @@ static bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw)
388 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("AGC Table Fail\n")); 388 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("AGC Table Fail\n"));
389 return false; 389 return false;
390 } 390 }
391 rtlphy->bcck_high_power = (bool) (rtl_get_bbreg(hw, 391 rtlphy->cck_high_power = (bool) (rtl_get_bbreg(hw,
392 RFPGA0_XA_HSSIPARAMETER2, 392 RFPGA0_XA_HSSIPARAMETER2,
393 0x200)); 393 0x200));
394 return true; 394 return true;
@@ -954,7 +954,7 @@ void rtl92c_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel)
954 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); 954 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
955 u8 cckpowerlevel[2], ofdmpowerlevel[2]; 955 u8 cckpowerlevel[2], ofdmpowerlevel[2];
956 956
957 if (rtlefuse->b_txpwr_fromeprom == false) 957 if (rtlefuse->txpwr_fromeprom == false)
958 return; 958 return;
959 _rtl92c_get_txpower_index(hw, channel, 959 _rtl92c_get_txpower_index(hw, channel,
960 &cckpowerlevel[0], &ofdmpowerlevel[0]); 960 &cckpowerlevel[0], &ofdmpowerlevel[0]);
@@ -1437,7 +1437,7 @@ static u8 _rtl92c_phy_path_b_iqk(struct ieee80211_hw *hw)
1437} 1437}
1438 1438
1439static void _rtl92c_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw, 1439static void _rtl92c_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw,
1440 bool b_iqk_ok, long result[][8], 1440 bool iqk_ok, long result[][8],
1441 u8 final_candidate, bool btxonly) 1441 u8 final_candidate, bool btxonly)
1442{ 1442{
1443 u32 oldval_0, x, tx0_a, reg; 1443 u32 oldval_0, x, tx0_a, reg;
@@ -1445,7 +1445,7 @@ static void _rtl92c_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw,
1445 1445
1446 if (final_candidate == 0xFF) 1446 if (final_candidate == 0xFF)
1447 return; 1447 return;
1448 else if (b_iqk_ok) { 1448 else if (iqk_ok) {
1449 oldval_0 = (rtl_get_bbreg(hw, ROFDM0_XATXIQIMBALANCE, 1449 oldval_0 = (rtl_get_bbreg(hw, ROFDM0_XATXIQIMBALANCE,
1450 MASKDWORD) >> 22) & 0x3FF; 1450 MASKDWORD) >> 22) & 0x3FF;
1451 x = result[final_candidate][0]; 1451 x = result[final_candidate][0];
@@ -1477,7 +1477,7 @@ static void _rtl92c_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw,
1477} 1477}
1478 1478
1479static void _rtl92c_phy_path_b_fill_iqk_matrix(struct ieee80211_hw *hw, 1479static void _rtl92c_phy_path_b_fill_iqk_matrix(struct ieee80211_hw *hw,
1480 bool b_iqk_ok, long result[][8], 1480 bool iqk_ok, long result[][8],
1481 u8 final_candidate, bool btxonly) 1481 u8 final_candidate, bool btxonly)
1482{ 1482{
1483 u32 oldval_1, x, tx1_a, reg; 1483 u32 oldval_1, x, tx1_a, reg;
@@ -1485,7 +1485,7 @@ static void _rtl92c_phy_path_b_fill_iqk_matrix(struct ieee80211_hw *hw,
1485 1485
1486 if (final_candidate == 0xFF) 1486 if (final_candidate == 0xFF)
1487 return; 1487 return;
1488 else if (b_iqk_ok) { 1488 else if (iqk_ok) {
1489 oldval_1 = (rtl_get_bbreg(hw, ROFDM0_XBTXIQIMBALANCE, 1489 oldval_1 = (rtl_get_bbreg(hw, ROFDM0_XBTXIQIMBALANCE,
1490 MASKDWORD) >> 22) & 0x3FF; 1490 MASKDWORD) >> 22) & 0x3FF;
1491 x = result[final_candidate][4]; 1491 x = result[final_candidate][4];
@@ -1698,11 +1698,11 @@ static void _rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw,
1698 } 1698 }
1699 _rtl92c_phy_path_adda_on(hw, adda_reg, true, is2t); 1699 _rtl92c_phy_path_adda_on(hw, adda_reg, true, is2t);
1700 if (t == 0) { 1700 if (t == 0) {
1701 rtlphy->b_rfpi_enable = (u8) rtl_get_bbreg(hw, 1701 rtlphy->rfpi_enable = (u8) rtl_get_bbreg(hw,
1702 RFPGA0_XA_HSSIPARAMETER1, 1702 RFPGA0_XA_HSSIPARAMETER1,
1703 BIT(8)); 1703 BIT(8));
1704 } 1704 }
1705 if (!rtlphy->b_rfpi_enable) 1705 if (!rtlphy->rfpi_enable)
1706 _rtl92c_phy_pi_mode_switch(hw, true); 1706 _rtl92c_phy_pi_mode_switch(hw, true);
1707 if (t == 0) { 1707 if (t == 0) {
1708 rtlphy->reg_c04 = rtl_get_bbreg(hw, 0xc04, MASKDWORD); 1708 rtlphy->reg_c04 = rtl_get_bbreg(hw, 0xc04, MASKDWORD);
@@ -1783,7 +1783,7 @@ static void _rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw,
1783 if (is2t) 1783 if (is2t)
1784 rtl_set_bbreg(hw, 0x844, MASKDWORD, 0x00032ed3); 1784 rtl_set_bbreg(hw, 0x844, MASKDWORD, 0x00032ed3);
1785 if (t != 0) { 1785 if (t != 0) {
1786 if (!rtlphy->b_rfpi_enable) 1786 if (!rtlphy->rfpi_enable)
1787 _rtl92c_phy_pi_mode_switch(hw, false); 1787 _rtl92c_phy_pi_mode_switch(hw, false);
1788 _rtl92c_phy_reload_adda_registers(hw, adda_reg, 1788 _rtl92c_phy_reload_adda_registers(hw, adda_reg,
1789 rtlphy->adda_backup, 16); 1789 rtlphy->adda_backup, 16);
@@ -2370,7 +2370,7 @@ void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, char delta)
2370 struct rtl_phy *rtlphy = &(rtlpriv->phy); 2370 struct rtl_phy *rtlphy = &(rtlpriv->phy);
2371 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); 2371 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
2372 2372
2373 if (rtlphy->b_apk_done) 2373 if (rtlphy->apk_done)
2374 return; 2374 return;
2375 if (IS_92C_SERIAL(rtlhal->version)) 2375 if (IS_92C_SERIAL(rtlhal->version))
2376 _rtl92c_phy_ap_calibrate(hw, delta, true); 2376 _rtl92c_phy_ap_calibrate(hw, delta, true);