diff mbox series

[RFC,v3,12/12] rtw88: Kconfig & Makefile

Message ID 1538565659-29530-13-git-send-email-yhchuang@realtek.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show
Series rtw88: mac80211 driver for Realtek 802.11ac wireless network chips | expand

Commit Message

Tony Chuang Oct. 3, 2018, 11:20 a.m. UTC
From: Yan-Hsuan Chuang <yhchuang@realtek.com>

Kconfig & Makefile for Realtek 802.11ac wireless network chips

Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
---
 drivers/net/wireless/realtek/Kconfig        |  1 +
 drivers/net/wireless/realtek/Makefile       |  1 +
 drivers/net/wireless/realtek/rtw88/Kconfig  | 57 +++++++++++++++++++++++++++++
 drivers/net/wireless/realtek/rtw88/Makefile | 19 ++++++++++
 4 files changed, 78 insertions(+)
 create mode 100644 drivers/net/wireless/realtek/rtw88/Kconfig
 create mode 100644 drivers/net/wireless/realtek/rtw88/Makefile

Comments

Johannes Berg Oct. 8, 2018, 2 p.m. UTC | #1
On Wed, 2018-10-03 at 19:20 +0800, yhchuang@realtek.com wrote:
> 
> +config RTW88_CORE
> +	tristate
> +	depends on RTW88
> +
> +config RTW88_PCI
> +	tristate
> +	depends on RTW88_CORE && PCI

Those "depends on" lines are misleading, I don't think select honours
that?

> +++ b/drivers/net/wireless/realtek/rtw88/Makefile
> @@ -0,0 +1,19 @@
> +obj-$(CONFIG_RTW88_CORE)	+= rtw88.o
> +rtw88-y += main.o \
> +	   mac80211.o \
> +	   debug.o \
> +	   tx.o \
> +	   rx.o \
> +	   mac.o \
> +	   phy.o \
> +	   efuse.o \
> +	   fw.o \
> +	   ps.o \
> +	   sec.o \
> +	   regd.o
> +
> +rtw88-$(CONFIG_RTW88_8822BE)	+= rtw8822b.o rtw8822b_table.o
> +rtw88-$(CONFIG_RTW88_8822CE)	+= rtw8822c.o rtw8822c_table.o
> +
> +obj-$(CONFIG_RTW88_PCI)		+= rtwpci.o
> +rtwpci-objs			:= pci.o

This is a weird split? Why even bother with two modules if everything
goes into the main "rtw88" module except for a single file?

johannes
Tony Chuang Oct. 9, 2018, 5:10 a.m. UTC | #2
> -----Original Message-----
> From: Johannes Berg [mailto:johannes@sipsolutions.net]
> Sent: Monday, October 08, 2018 10:00 PM
> To: Tony Chuang; kvalo@codeaurora.org
> Cc: Larry.Finger@lwfinger.net; Pkshih; Andy Huang; sgruszka@redhat.com;
> linux-wireless@vger.kernel.org
> Subject: Re: [RFC v3 12/12] rtw88: Kconfig & Makefile
> 
> On Wed, 2018-10-03 at 19:20 +0800, yhchuang@realtek.com wrote:
> >
> > +config RTW88_CORE
> > +	tristate
> > +	depends on RTW88
> > +
> > +config RTW88_PCI
> > +	tristate
> > +	depends on RTW88_CORE && PCI
> 
> Those "depends on" lines are misleading, I don't think select honours
> that?

Select doesn't honour them, so the depends on lines seems to be unnecessary.
Should just select them after the depends on line.
And RTW88 is definitely selected to enter the menu, so I think we can just
remove the depends on lines but left the ones under RTW88_8822BE and
RTW88_8822CE

> 
> > +++ b/drivers/net/wireless/realtek/rtw88/Makefile
> > @@ -0,0 +1,19 @@
> > +obj-$(CONFIG_RTW88_CORE)	+= rtw88.o
> > +rtw88-y += main.o \
> > +	   mac80211.o \
> > +	   debug.o \
> > +	   tx.o \
> > +	   rx.o \
> > +	   mac.o \
> > +	   phy.o \
> > +	   efuse.o \
> > +	   fw.o \
> > +	   ps.o \
> > +	   sec.o \
> > +	   regd.o
> > +
> > +rtw88-$(CONFIG_RTW88_8822BE)	+= rtw8822b.o rtw8822b_table.o
> > +rtw88-$(CONFIG_RTW88_8822CE)	+= rtw8822c.o rtw8822c_table.o
> > +
> > +obj-$(CONFIG_RTW88_PCI)		+= rtwpci.o
> > +rtwpci-objs			:= pci.o
> 
> This is a weird split? Why even bother with two modules if everything
> goes into the main "rtw88" module except for a single file?
> 


It's because there will have 2 more bus usb & sdio.
And we do only pci for 8822be, usb for 8822bu, sdio for 8822bs
So the module is separated to insert optionally

Yan-Hsuan Chuang
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/Kconfig b/drivers/net/wireless/realtek/Kconfig
index 3db988e..9189fd6 100644
--- a/drivers/net/wireless/realtek/Kconfig
+++ b/drivers/net/wireless/realtek/Kconfig
@@ -14,5 +14,6 @@  if WLAN_VENDOR_REALTEK
 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"
 
 endif # WLAN_VENDOR_REALTEK
diff --git a/drivers/net/wireless/realtek/Makefile b/drivers/net/wireless/realtek/Makefile
index 9c78deb..118af99 100644
--- a/drivers/net/wireless/realtek/Makefile
+++ b/drivers/net/wireless/realtek/Makefile
@@ -6,4 +6,5 @@  obj-$(CONFIG_RTL8180)		+= rtl818x/
 obj-$(CONFIG_RTL8187)		+= rtl818x/
 obj-$(CONFIG_RTLWIFI)		+= rtlwifi/
 obj-$(CONFIG_RTL8XXXU)		+= rtl8xxxu/
+obj-$(CONFIG_RTW88)		+= rtw88/
 
diff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wireless/realtek/rtw88/Kconfig
new file mode 100644
index 0000000..9bc9698
--- /dev/null
+++ b/drivers/net/wireless/realtek/rtw88/Kconfig
@@ -0,0 +1,57 @@ 
+menuconfig RTW88
+	tristate "Realtek 802.11ac wireless chips support"
+	depends on MAC80211
+	default y
+	help
+	  This module adds support for mac80211-based wireless drivers that
+	  enables Realtek IEEE 802.11ac wireless chipsets.
+
+	  If you choose to build a module, it'll be called rtw88.
+
+if RTW88
+
+config RTW88_CORE
+	tristate
+	depends on RTW88
+
+config RTW88_PCI
+	tristate
+	depends on RTW88_CORE && PCI
+
+config RTW88_8822BE
+	bool "Realtek 8822BE PCI wireless network adapter"
+	depends on PCI
+	select RTW88_CORE
+	select RTW88_PCI
+	help
+	  Select this option will enable support for 8822BE chipset
+
+	  802.11ac PCIe wireless network adapter
+
+config RTW88_8822CE
+	bool "Realtek 8822CE PCI wireless network adapter"
+	depends on PCI
+	select RTW88_CORE
+	select RTW88_PCI
+	help
+	  Select this option will enable support for 8822CE chipset
+
+	  802.11ac PCIe wireless network adapter
+
+config RTW88_DEBUG
+	bool "Realtek rtw88 debug support"
+	depends on RTW88_CORE
+	help
+	  Enable debug support
+
+	  If unsure, say Y to simplify debug problems
+
+config RTW88_DEBUGFS
+	bool "Realtek rtw88 debugfs support"
+	depends on RTW88_CORE
+	help
+	  Enable debug support
+
+	  If unsure, say Y to simplify debug problems
+
+endif
diff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wireless/realtek/rtw88/Makefile
new file mode 100644
index 0000000..d70782a
--- /dev/null
+++ b/drivers/net/wireless/realtek/rtw88/Makefile
@@ -0,0 +1,19 @@ 
+obj-$(CONFIG_RTW88_CORE)	+= rtw88.o
+rtw88-y += main.o \
+	   mac80211.o \
+	   debug.o \
+	   tx.o \
+	   rx.o \
+	   mac.o \
+	   phy.o \
+	   efuse.o \
+	   fw.o \
+	   ps.o \
+	   sec.o \
+	   regd.o
+
+rtw88-$(CONFIG_RTW88_8822BE)	+= rtw8822b.o rtw8822b_table.o
+rtw88-$(CONFIG_RTW88_8822CE)	+= rtw8822c.o rtw8822c_table.o
+
+obj-$(CONFIG_RTW88_PCI)		+= rtwpci.o
+rtwpci-objs			:= pci.o