Skip to content

Commit

Permalink
rtw89: add Kconfig and Makefile
Browse files Browse the repository at this point in the history
With Kconfig and Makefile, we can build rtw89 and support 8852AE chip.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
  • Loading branch information
Ping-Ke Shih authored and intel-lab-lkp committed Jun 18, 2021
1 parent b1045ad commit f768bef
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/realtek/Kconfig
Expand Up @@ -16,5 +16,6 @@ source "drivers/net/wireless/realtek/rtl818x/Kconfig"
source "drivers/net/wireless/realtek/rtlwifi/Kconfig"
source "drivers/net/wireless/realtek/rtl8xxxu/Kconfig"
source "drivers/net/wireless/realtek/rtw88/Kconfig"
source "drivers/net/wireless/realtek/rtw89/Kconfig"

endif # WLAN_VENDOR_REALTEK
1 change: 1 addition & 0 deletions drivers/net/wireless/realtek/Makefile
Expand Up @@ -8,4 +8,5 @@ obj-$(CONFIG_RTL8187) += rtl818x/
obj-$(CONFIG_RTLWIFI) += rtlwifi/
obj-$(CONFIG_RTL8XXXU) += rtl8xxxu/
obj-$(CONFIG_RTW88) += rtw88/
obj-$(CONFIG_RTW89) += rtw89/

50 changes: 50 additions & 0 deletions drivers/net/wireless/realtek/rtw89/Kconfig
@@ -0,0 +1,50 @@
# SPDX-License-Identifier: GPL-2.0-only
menuconfig RTW89
tristate "Realtek 802.11ax wireless chips support"
depends on MAC80211
help
This module adds support for mac80211-based wireless drivers that
enables Realtek IEEE 802.11ax wireless chipsets.

If you choose to build a module, it'll be called rtw89.

if RTW89

config RTW89_CORE
tristate

config RTW89_PCI
tristate

config RTW89_8852AE
tristate "Realtek 8852AE PCI wireless network adapter"
depends on PCI
select RTW89_CORE
select RTW89_PCI
help
Select this option will enable support for 8852AE chipset

802.11ax PCIe wireless network adapter

config RTW89_DEBUG
bool

config RTW89_DEBUGMSG
bool "Realtek rtw89 debug message support"
depends on RTW89_CORE
select RTW89_DEBUG
help
Enable debug message support

If unsure, say Y to simplify debug problems

config RTW89_DEBUGFS
bool "Realtek rtw89 debugfs support"
depends on RTW89_CORE
select RTW89_DEBUG
help
Enable debugfs support

If unsure, say Y to simplify debug problems

endif
26 changes: 26 additions & 0 deletions drivers/net/wireless/realtek/rtw89/Makefile
@@ -0,0 +1,26 @@
# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause

obj-$(CONFIG_RTW89_CORE) += rtw89_core.o
rtw89_core-y += core.o \
mac80211.o \
mac.o \
phy.o \
fw.o \
rtw8852a.o \
rtw8852a_table.o \
rtw8852a_rfk.o \
rtw8852a_rfk_table.o \
cam.o \
efuse.o \
regd.o \
sar.o \
coex.o \
ps.o \
util.o \
ser.o

rtw89_core-$(CONFIG_RTW89_DEBUG) += debug.o

obj-$(CONFIG_RTW89_PCI) += rtw89_pci.o
rtw89_pci-y := pci.o

1 comment on commit f768bef

@swc6
Copy link

@swc6 swc6 commented on f768bef Jun 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi,can you use the rtw89'drivers?

i had try to compile the drivers,but fail.
first,i use "make menuconfig" to compile the drivers with the kenerl;I get some errors;
###################################################################################################################
/home/swc/rtw89/core.c: In function ‘rtw89_init_he_cap’:
/home/swc/rtw89/core.c:1945:21: error: ‘IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2’ undeclared (first use in this function); did you mean ‘IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2’?
1945 | mac_cap_info[3] = IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2
/home/swc/rtw89/core.c:1945:21: note: each undeclared identifier is reported only once for each function it appears in
/home/swc/rtw89/core.c:1949:7: error: ‘IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU’ undeclared (first use in this function); did you mean ‘IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU’?
1949 | IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU
/home/swc/rtw89/core.c:1966:23: error: ‘IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU’ undeclared (first use in this function); did you mean ‘IEEE80211_HE_PHY_CAP6_PARTIAL_BW_EXT_RANGE’?
1966 | phy_cap_info[3] |= IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_PHY_CAP6_PARTIAL_BW_EXT_RANGE
/home/swc/rtw89/core.c:1974:7: error: ‘IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB’ undeclared (first use in this function); did you mean ‘IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB’?
1974 | IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB
/home/swc/rtw89/core.c:1976:21: error: ‘IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP’ undeclared (first use in this function); did you mean ‘IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR’?
1976 | phy_cap_info[7] = IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR
##########################################################################################################
then,I code the Makefile,use "make -C /lib/modules/5.11.0-18-generic/build M=/home/swc/rtw89 modules",The result is the same.I think some files on my machine are missing, but I don't know what they are.

where I see you problem is "https://www.spinics.net/lists/linux-wireless/msg212120.html";

If you solve the problem,please gave me a hand!(I can't use WiFi to access the Internet);

thanks! thanks! thanks!

Please sign in to comment.