Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a168b48 authored by Larry Finger's avatar Larry Finger Committed by John W. Linville
Browse files

rtlwifi: rtl8723ae: rtl8723-common: Create new driver for common code



The drivers for RTL8723AE and RTL8723BE have some code in common.
This commit creates a driver for this code that will be shared, and
copies those common routines from rtl8723ae's phy code.

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2cddad3c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ config RTL8723AE
	depends on PCI
	select RTLWIFI
	select RTLWIFI_PCI
	select RTL8723_COMMON
	select RTLBTCOEXIST
	---help---
	This is the driver for Realtek RTL8723AE 802.11n PCIe
@@ -102,6 +103,11 @@ config RTL8192C_COMMON
	depends on RTL8192CE || RTL8192CU
	default y

config RTL8723_COMMON
	tristate
	depends on RTL8723AE
	default y

config RTLBTCOEXIST
	tristate
	depends on RTL8723AE
+1 −0
Original line number Diff line number Diff line
@@ -26,5 +26,6 @@ obj-$(CONFIG_RTL8192DE) += rtl8192de/
obj-$(CONFIG_RTL8723AE)		+= rtl8723ae/
obj-$(CONFIG_RTL8188EE)		+= rtl8188ee/
obj-$(CONFIG_RTLBTCOEXIST)	+= btcoexist/
obj-$(CONFIG_RTL8723_COMMON)	+= rtl8723com/

ccflags-y += -D__CHECK_ENDIAN__
+4 −3
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include "hal_btc.h"
#include "../pci.h"
#include "phy.h"
#include "../rtl8723com/phy_common.h"
#include "fw.h"
#include "reg.h"
#include "def.h"
@@ -391,13 +392,13 @@ static void rtl8723ae_dm_bt_set_sw_full_time_dac_swing(struct ieee80211_hw *hw,
	if (sw_dac_swing_on) {
		RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_TRACE,
			 "[BTCoex], SwDacSwing = 0x%x\n", sw_dac_swing_lvl);
		rtl8723ae_phy_set_bb_reg(hw, 0x880, 0xff000000,
		rtl8723_phy_set_bb_reg(hw, 0x880, 0xff000000,
				       sw_dac_swing_lvl);
		rtlpcipriv->bt_coexist.sw_coexist_all_off = false;
	} else {
		RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_TRACE,
			 "[BTCoex], SwDacSwing Off!\n");
		rtl8723ae_phy_set_bb_reg(hw, 0x880, 0xff000000, 0xc0);
		rtl8723_phy_set_bb_reg(hw, 0x880, 0xff000000, 0xc0);
	}
}

+46 −436

File changed.

Preview size limit exceeded, changes collapsed.

+0 −21
Original line number Diff line number Diff line
@@ -76,23 +76,6 @@

#define RTL92C_MAX_PATH_NUM			2

enum swchnlcmd_id {
	CMDID_END,
	CMDID_SET_TXPOWEROWER_LEVEL,
	CMDID_BBREGWRITE10,
	CMDID_WRITEPORT_ULONG,
	CMDID_WRITEPORT_USHORT,
	CMDID_WRITEPORT_UCHAR,
	CMDID_RF_WRITEREG,
};

struct swchnlcmd {
	enum swchnlcmd_id cmdid;
	u32 para1;
	u32 para2;
	u32 msdelay;
};

enum hw90_block_e {
	HW90_BLOCK_MAC = 0,
	HW90_BLOCK_PHY0 = 1,
@@ -183,10 +166,6 @@ struct tx_power_struct {
	u32 mcs_original_offset[4][16];
};

u32 rtl8723ae_phy_query_bb_reg(struct ieee80211_hw *hw,
			       u32 regaddr, u32 bitmask);
void rtl8723ae_phy_set_bb_reg(struct ieee80211_hw *hw,
			      u32 regaddr, u32 bitmask, u32 data);
u32 rtl8723ae_phy_query_rf_reg(struct ieee80211_hw *hw,
			       enum radio_path rfpath, u32 regaddr,
			       u32 bitmask);
Loading