diff mbox series

[v3,12/14] mt76: Kconfig and Makefile for mt76x0 driver

Message ID 1533040864-9026-13-git-send-email-sgruszka@redhat.com (mailing list archive)
State Accepted
Commit 52abb142baa0f35291ac2f12b56e56fa071b95d8
Delegated to: Kalle Valo
Headers show
Series Add mt76x0 driver | expand

Commit Message

Stanislaw Gruszka July 31, 2018, 12:41 p.m. UTC
Add Kconfig and Makefiles for mt76x0 driver. Now the driver
can be build.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/mediatek/mt76/Kconfig         | 7 +++++++
 drivers/net/wireless/mediatek/mt76/Makefile        | 1 +
 drivers/net/wireless/mediatek/mt76/mt76x0/Makefile | 7 +++++++
 3 files changed, 15 insertions(+)
 create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/Makefile

Comments

Kalle Valo Aug. 1, 2018, 7:32 a.m. UTC | #1
Stanislaw Gruszka <sgruszka@redhat.com> writes:

> Add Kconfig and Makefiles for mt76x0 driver. Now the driver
> can be build.
>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
>  drivers/net/wireless/mediatek/mt76/Kconfig         | 7 +++++++
>  drivers/net/wireless/mediatek/mt76/Makefile        | 1 +
>  drivers/net/wireless/mediatek/mt76/mt76x0/Makefile | 7 +++++++
>  3 files changed, 15 insertions(+)
>  create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/Makefile
>
> diff --git a/drivers/net/wireless/mediatek/mt76/Kconfig b/drivers/net/wireless/mediatek/mt76/Kconfig
> index 69906c733a1c..850611ad347a 100644
> --- a/drivers/net/wireless/mediatek/mt76/Kconfig
> +++ b/drivers/net/wireless/mediatek/mt76/Kconfig
> @@ -9,6 +9,13 @@ config MT76x2_COMMON
>  	tristate
>  	depends on MT76_CORE
>  
> +config MT76x0U
> +	tristate "MediaTek MT76x0U (USB) support"
> +	depends on MAC80211
> +	depends on USB
> +	help
> +	  This adds support for MT7610U-based wireless USB dongles.

Does it make sense to add a Kconfig option for every mt76 device? I'm
worried that soon we have over a dozen of them. I can understand having
separate options to enable PCI or USB devices, but I don't see the
benefit for anything more finegrained than that.
Stanislaw Gruszka Aug. 1, 2018, 8:28 a.m. UTC | #2
On Wed, Aug 01, 2018 at 10:32:12AM +0300, Kalle Valo wrote:
> Stanislaw Gruszka <sgruszka@redhat.com> writes:
> 
> > Add Kconfig and Makefiles for mt76x0 driver. Now the driver
> > can be build.
> >
> > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> > ---
> >  drivers/net/wireless/mediatek/mt76/Kconfig         | 7 +++++++
> >  drivers/net/wireless/mediatek/mt76/Makefile        | 1 +
> >  drivers/net/wireless/mediatek/mt76/mt76x0/Makefile | 7 +++++++
> >  3 files changed, 15 insertions(+)
> >  create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/Makefile
> >
> > diff --git a/drivers/net/wireless/mediatek/mt76/Kconfig b/drivers/net/wireless/mediatek/mt76/Kconfig
> > index 69906c733a1c..850611ad347a 100644
> > --- a/drivers/net/wireless/mediatek/mt76/Kconfig
> > +++ b/drivers/net/wireless/mediatek/mt76/Kconfig
> > @@ -9,6 +9,13 @@ config MT76x2_COMMON
> >  	tristate
> >  	depends on MT76_CORE
> >  
> > +config MT76x0U
> > +	tristate "MediaTek MT76x0U (USB) support"
> > +	depends on MAC80211
> > +	depends on USB
> > +	help
> > +	  This adds support for MT7610U-based wireless USB dongles.
> 
> Does it make sense to add a Kconfig option for every mt76 device? I'm
> worried that soon we have over a dozen of them. I can understand having
> separate options to enable PCI or USB devices, but I don't see the
> benefit for anything more finegrained than that.

I think it does make sense for AP/home routers and other embedded
devices.

Stanislaw
Kalle Valo Aug. 1, 2018, 8:41 a.m. UTC | #3
Stanislaw Gruszka <sgruszka@redhat.com> writes:

> On Wed, Aug 01, 2018 at 10:32:12AM +0300, Kalle Valo wrote:
>> Stanislaw Gruszka <sgruszka@redhat.com> writes:
>> 
>> > Add Kconfig and Makefiles for mt76x0 driver. Now the driver
>> > can be build.
>> >
>> > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
>> > ---
>> >  drivers/net/wireless/mediatek/mt76/Kconfig         | 7 +++++++
>> >  drivers/net/wireless/mediatek/mt76/Makefile        | 1 +
>> >  drivers/net/wireless/mediatek/mt76/mt76x0/Makefile | 7 +++++++
>> >  3 files changed, 15 insertions(+)
>> >  create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/Makefile
>> >
>> > diff --git a/drivers/net/wireless/mediatek/mt76/Kconfig b/drivers/net/wireless/mediatek/mt76/Kconfig
>> > index 69906c733a1c..850611ad347a 100644
>> > --- a/drivers/net/wireless/mediatek/mt76/Kconfig
>> > +++ b/drivers/net/wireless/mediatek/mt76/Kconfig
>> > @@ -9,6 +9,13 @@ config MT76x2_COMMON
>> >  	tristate
>> >  	depends on MT76_CORE
>> >  
>> > +config MT76x0U
>> > +	tristate "MediaTek MT76x0U (USB) support"
>> > +	depends on MAC80211
>> > +	depends on USB
>> > +	help
>> > +	  This adds support for MT7610U-based wireless USB dongles.
>> 
>> Does it make sense to add a Kconfig option for every mt76 device? I'm
>> worried that soon we have over a dozen of them. I can understand having
>> separate options to enable PCI or USB devices, but I don't see the
>> benefit for anything more finegrained than that.
>
> I think it does make sense for AP/home routers and other embedded
> devices.

How much of memory savings are we talking about?
Stanislaw Gruszka Aug. 1, 2018, 8:59 a.m. UTC | #4
On Wed, Aug 01, 2018 at 11:41:33AM +0300, Kalle Valo wrote:
> Stanislaw Gruszka <sgruszka@redhat.com> writes:
> 
> > On Wed, Aug 01, 2018 at 10:32:12AM +0300, Kalle Valo wrote:
> >> Stanislaw Gruszka <sgruszka@redhat.com> writes:
> >> 
> >> > Add Kconfig and Makefiles for mt76x0 driver. Now the driver
> >> > can be build.
> >> >
> >> > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> >> > ---
> >> >  drivers/net/wireless/mediatek/mt76/Kconfig         | 7 +++++++
> >> >  drivers/net/wireless/mediatek/mt76/Makefile        | 1 +
> >> >  drivers/net/wireless/mediatek/mt76/mt76x0/Makefile | 7 +++++++
> >> >  3 files changed, 15 insertions(+)
> >> >  create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/Makefile
> >> >
> >> > diff --git a/drivers/net/wireless/mediatek/mt76/Kconfig b/drivers/net/wireless/mediatek/mt76/Kconfig
> >> > index 69906c733a1c..850611ad347a 100644
> >> > --- a/drivers/net/wireless/mediatek/mt76/Kconfig
> >> > +++ b/drivers/net/wireless/mediatek/mt76/Kconfig
> >> > @@ -9,6 +9,13 @@ config MT76x2_COMMON
> >> >  	tristate
> >> >  	depends on MT76_CORE
> >> >  
> >> > +config MT76x0U
> >> > +	tristate "MediaTek MT76x0U (USB) support"
> >> > +	depends on MAC80211
> >> > +	depends on USB
> >> > +	help
> >> > +	  This adds support for MT7610U-based wireless USB dongles.
> >> 
> >> Does it make sense to add a Kconfig option for every mt76 device? I'm
> >> worried that soon we have over a dozen of them. I can understand having
> >> separate options to enable PCI or USB devices, but I don't see the
> >> benefit for anything more finegrained than that.
> >
> > I think it does make sense for AP/home routers and other embedded
> > devices.
> 
> How much of memory savings are we talking about?

Currently mt76x0.ko module is 285 KB big on x86_64 after debug symbols
strip (with debug symbols size is 6MB).

Stanislaw
Kalle Valo Aug. 2, 2018, 5:11 p.m. UTC | #5
Stanislaw Gruszka <sgruszka@redhat.com> writes:

> On Wed, Aug 01, 2018 at 11:41:33AM +0300, Kalle Valo wrote:
>> Stanislaw Gruszka <sgruszka@redhat.com> writes:
>> 
>> > On Wed, Aug 01, 2018 at 10:32:12AM +0300, Kalle Valo wrote:
>> >> Stanislaw Gruszka <sgruszka@redhat.com> writes:
>> >> 
>> >> > Add Kconfig and Makefiles for mt76x0 driver. Now the driver
>> >> > can be build.
>> >> >
>> >> > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
>> >> > ---
>> >> >  drivers/net/wireless/mediatek/mt76/Kconfig         | 7 +++++++
>> >> >  drivers/net/wireless/mediatek/mt76/Makefile        | 1 +
>> >> >  drivers/net/wireless/mediatek/mt76/mt76x0/Makefile | 7 +++++++
>> >> >  3 files changed, 15 insertions(+)
>> >> >  create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/Makefile
>> >> >
>> >> > diff --git a/drivers/net/wireless/mediatek/mt76/Kconfig b/drivers/net/wireless/mediatek/mt76/Kconfig
>> >> > index 69906c733a1c..850611ad347a 100644
>> >> > --- a/drivers/net/wireless/mediatek/mt76/Kconfig
>> >> > +++ b/drivers/net/wireless/mediatek/mt76/Kconfig
>> >> > @@ -9,6 +9,13 @@ config MT76x2_COMMON
>> >> >  	tristate
>> >> >  	depends on MT76_CORE
>> >> >  
>> >> > +config MT76x0U
>> >> > +	tristate "MediaTek MT76x0U (USB) support"
>> >> > +	depends on MAC80211
>> >> > +	depends on USB
>> >> > +	help
>> >> > +	  This adds support for MT7610U-based wireless USB dongles.
>> >> 
>> >> Does it make sense to add a Kconfig option for every mt76 device? I'm
>> >> worried that soon we have over a dozen of them. I can understand having
>> >> separate options to enable PCI or USB devices, but I don't see the
>> >> benefit for anything more finegrained than that.
>> >
>> > I think it does make sense for AP/home routers and other embedded
>> > devices.
>> 
>> How much of memory savings are we talking about?
>
> Currently mt76x0.ko module is 285 KB big on x86_64 after debug symbols
> strip (with debug symbols size is 6MB).

Ok, makes sense then.
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/Kconfig b/drivers/net/wireless/mediatek/mt76/Kconfig
index 69906c733a1c..850611ad347a 100644
--- a/drivers/net/wireless/mediatek/mt76/Kconfig
+++ b/drivers/net/wireless/mediatek/mt76/Kconfig
@@ -9,6 +9,13 @@  config MT76x2_COMMON
 	tristate
 	depends on MT76_CORE
 
+config MT76x0U
+	tristate "MediaTek MT76x0U (USB) support"
+	depends on MAC80211
+	depends on USB
+	help
+	  This adds support for MT7610U-based wireless USB dongles.
+
 config MT76x2E
 	tristate "MediaTek MT76x2E (PCIe) support"
 	select MT76_CORE
diff --git a/drivers/net/wireless/mediatek/mt76/Makefile b/drivers/net/wireless/mediatek/mt76/Makefile
index dfe1c1ba60db..158d10d2716c 100644
--- a/drivers/net/wireless/mediatek/mt76/Makefile
+++ b/drivers/net/wireless/mediatek/mt76/Makefile
@@ -1,5 +1,6 @@ 
 obj-$(CONFIG_MT76_CORE) += mt76.o
 obj-$(CONFIG_MT76_USB) += mt76-usb.o
+obj-$(CONFIG_MT76x0U) += mt76x0/
 obj-$(CONFIG_MT76x2_COMMON) += mt76x2-common.o
 obj-$(CONFIG_MT76x2E) += mt76x2e.o
 obj-$(CONFIG_MT76x2U) += mt76x2u.o
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/Makefile b/drivers/net/wireless/mediatek/mt76/mt76x0/Makefile
new file mode 100644
index 000000000000..7843908261ba
--- /dev/null
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/Makefile
@@ -0,0 +1,7 @@ 
+obj-$(CONFIG_MT76x0U)    += mt76x0.o
+
+mt76x0-objs	= \
+	usb.o init.o main.o mcu.o trace.o dma.o eeprom.o phy.o \
+	mac.o util.o debugfs.o tx.o core.o
+# ccflags-y := -DDEBUG
+CFLAGS_trace.o := -I$(src)