summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8723be/phy.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2014-03-04 23:53:48 +0100
committerJohn W. Linville <linville@tuxdriver.com>2014-03-06 20:29:56 +0100
commit25b13dbc38a74b76da5746d75867e306b70035bd (patch)
treef577599d398ca0fa96b32ef515b3ad0f6a04bc8d /drivers/net/wireless/rtlwifi/rtl8723be/phy.c
parentrtlwifi: rtl8192ce: rtl8192cu: rtl8192de: rtl8192se: rtl8723ae: rtl8723be: rt... (diff)
downloadlinux-25b13dbc38a74b76da5746d75867e306b70035bd.tar.xz
linux-25b13dbc38a74b76da5746d75867e306b70035bd.zip
rtlwifi: Move common routines to core
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/rtl8723be/phy.c')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723be/phy.c29
1 files changed, 3 insertions, 26 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8723be/phy.c b/drivers/net/wireless/rtlwifi/rtl8723be/phy.c
index ebc1e2788fca..cadae9bc4e3f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723be/phy.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723be/phy.c
@@ -26,6 +26,7 @@
#include "../wifi.h"
#include "../pci.h"
#include "../ps.h"
+#include "../core.h"
#include "reg.h"
#include "def.h"
#include "phy.h"
@@ -41,9 +42,6 @@ static bool _rtl8723be_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw,
static bool rtl8723be_phy_sw_chn_step_by_step(struct ieee80211_hw *hw,
u8 channel, u8 *stage,
u8 *step, u32 *delay);
-static void _rtl8723be_config_bb_reg(struct ieee80211_hw *hw,
- u32 addr, u32 data);
-
static bool _rtl8723be_check_condition(struct ieee80211_hw *hw,
const u32 condition)
{
@@ -114,7 +112,7 @@ static bool _rtl8723be_phy_config_bb_with_headerfile(struct ieee80211_hw *hw,
v1 = array_table[i];
v2 = array_table[i+1];
if (v1 < 0xcdcdcdcd) {
- _rtl8723be_config_bb_reg(hw, v1, v2);
+ rtl_bb_delay(hw, v1, v2);
} else {/*This line is the start line of branch.*/
if (!_rtl8723be_check_condition(hw, array_table[i])) {
/*Discard the following (offset, data) pairs*/
@@ -135,7 +133,7 @@ static bool _rtl8723be_phy_config_bb_with_headerfile(struct ieee80211_hw *hw,
v2 != 0xCDEF &&
v2 != 0xCDCD &&
i < arraylen - 2) {
- _rtl8723be_config_bb_reg(hw,
+ rtl_bb_delay(hw,
v1, v2);
READ_NEXT_PAIR(v1, v2, i);
}
@@ -389,27 +387,6 @@ static void _rtl8723be_phy_init_tx_power_by_rate(struct ieee80211_hw *hw)
[path][txnum][section] = 0;
}
-static void _rtl8723be_config_bb_reg(struct ieee80211_hw *hw,
- u32 addr, u32 data)
-{
- if (addr == 0xfe) {
- mdelay(50);
- } else if (addr == 0xfd) {
- mdelay(5);
- } else if (addr == 0xfc) {
- mdelay(1);
- } else if (addr == 0xfb) {
- udelay(50);
- } else if (addr == 0xfa) {
- udelay(5);
- } else if (addr == 0xf9) {
- udelay(1);
- } else {
- rtl_set_bbreg(hw, addr, MASKDWORD, data);
- udelay(1);
- }
-}
-
static void phy_set_txpwr_by_rate_base(struct ieee80211_hw *hw, u8 band,
u8 path, u8 rate_section,
u8 txnum, u8 value)