Commit db5ae2e1 authored by Bitterblue Smith's avatar Bitterblue Smith Committed by Ping-Ke Shih
Browse files

wifi: rtlwifi: Move code from rtl8192de to rtl8192d-common



Create the new module rtl8192d-common and move some code into it from
rtl8192de. Now the rtl8192de driver (PCI) and the new rtl8192du driver
(USB) can share some of the code.

This is mostly the code that required little effort to make it
shareable. There are a few more functions which they could share, with
more changes.

Add phy_iq_calibrate member to struct rtl_hal_ops to allow moving the
TX power tracking code from dm.c.

The other changes in this patch are adjusting whitespace, renaming some
functions, making some arrays const, and making checkpatch.pl less
unhappy.

rtl8192de is compile-tested only. rtl8192d-common is tested with the
new rtl8192du driver.

Signed-off-by: default avatarBitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/69c4358a-6fbf-4433-92a6-341c83e9dd48@gmail.com
parent 2f228d36
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ config RTL8192SE
config RTL8192DE
	tristate "Realtek RTL8192DE/RTL8188DE PCIe Wireless Network Adapter"
	depends on PCI
	select RTL8192D_COMMON
	select RTLWIFI
	select RTLWIFI_PCI
	help
@@ -142,6 +143,9 @@ config RTL8192C_COMMON
	depends on RTL8192CE || RTL8192CU
	default y

config RTL8192D_COMMON
	tristate

config RTL8723_COMMON
	tristate
	depends on RTL8723AE || RTL8723BE
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ obj-$(CONFIG_RTL8192C_COMMON) += rtl8192c/
obj-$(CONFIG_RTL8192CE)		+= rtl8192ce/
obj-$(CONFIG_RTL8192CU)		+= rtl8192cu/
obj-$(CONFIG_RTL8192SE)		+= rtl8192se/
obj-$(CONFIG_RTL8192D_COMMON)	+= rtl8192d/
obj-$(CONFIG_RTL8192DE)		+= rtl8192de/
obj-$(CONFIG_RTL8723AE)		+= rtl8723ae/
obj-$(CONFIG_RTL8723BE)		+= rtl8723be/
+3 −2
Original line number Diff line number Diff line
@@ -18,7 +18,8 @@ void rtl_cam_reset_sec_info(struct ieee80211_hw *hw)
}

static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no,
			   u8 *mac_addr, u8 *key_cont_128, u16 us_config)
				  const u8 *mac_addr, u8 *key_cont_128,
				  u16 us_config)
{
	struct rtl_priv *rtlpriv = rtl_priv(hw);

@@ -94,7 +95,7 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no,
		"after set key, usconfig:%x\n", us_config);
}

u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, const u8 *mac_addr,
			 u32 ul_key_id, u32 ul_entry_idx, u32 ul_enc_alg,
			 u32 ul_default_key, u8 *key_content)
{
+3 −3
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
#define	CAM_CONFIG_NO_USEDK				0

void rtl_cam_reset_all_entry(struct ieee80211_hw *hw);
u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, const u8 *mac_addr,
			 u32 ul_key_id, u32 ul_entry_idx, u32 ul_enc_alg,
			 u32 ul_default_key, u8 *key_content);
int rtl_cam_delete_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
+11 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
rtl8192d-common-objs :=		\
		dm_common.o \
		fw_common.o \
		hw_common.o \
		main.o \
		phy_common.o \
		rf_common.o \
		trx_common.o

obj-$(CONFIG_RTL8192D_COMMON) += rtl8192d-common.o
Loading