linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rt2x00: split RT2X00 option
@ 2007-02-28 18:26 Ivo van Doorn
  2007-02-28 18:35 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Ivo van Doorn @ 2007-02-28 18:26 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, Johannes Berg

This patch will split the RT2X00 config option and adds the
(for the user) invisible RT2X00_LIB config option that will be
selected by the drivers.
Make the debug(fs) config options depend on this new
config option.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>

---

diff --git a/drivers/net/wireless/mac80211/rt2x00/Kconfig b/drivers/net/wireless/mac80211/rt2x00/Kconfig
index 1010a72..ec107e7 100644
--- a/drivers/net/wireless/mac80211/rt2x00/Kconfig
+++ b/drivers/net/wireless/mac80211/rt2x00/Kconfig
@@ -7,13 +7,18 @@ config RT2X00
 
 	These drivers will make use of the Devicescape ieee80211 stack.
 
-	This option will build the rt2x00 library which is required by
-	each individual driver, when compiled as a module,
-	this library will be called "rt2x00lib.ko".
+	When building one of the individual drivers, the rt2x00 library
+	will also be created. That library (when the driver is built as
+	a module) will be called "rt2x00lib.ko".
+
+config RT2X00_LIB
+	tristate
+	depends on RT2X00
 
 config RT2400PCI
 	tristate "Ralink rt2400 pci/pcmcia support"
 	depends on RT2X00 && PCI
+	select RT2X00_LIB
 	select EEPROM_93CX6
 	---help---
 	This is an experimental driver for the Ralink rt2400 wireless chip.
@@ -23,6 +28,7 @@ config RT2400PCI
 config RT2500PCI
 	tristate "Ralink rt2500 pci/pcmcia support"
 	depends on RT2X00 && PCI
+	select RT2X00_LIB
 	select EEPROM_93CX6
 	---help---
 	This is an experimental driver for the Ralink rt2500 wireless chip.
@@ -32,6 +38,7 @@ config RT2500PCI
 config RT61PCI
 	tristate "Ralink rt61 pci/pcmcia support"
 	depends on RT2X00 && FW_LOADER && PCI
+	select RT2X00_LIB
 	select CRC_ITU_T
 	select EEPROM_93CX6
 	---help---
@@ -42,6 +49,7 @@ config RT61PCI
 config RT2500USB
 	tristate "Ralink rt2500 usb support"
 	depends on RT2X00 && USB
+	select RT2X00_LIB
 	---help---
 	This is an experimental driver for the Ralink rt2500 wireless chip.
 
@@ -50,6 +58,7 @@ config RT2500USB
 config RT73USB
 	tristate "Ralink rt73 usb support"
 	depends on RT2X00 && FW_LOADER && USB
+	select RT2X00_LIB
 	select CRC_ITU_T
 	---help---
 	This is an experimental driver for the Ralink rt73 wireless chip.
@@ -58,7 +67,7 @@ config RT73USB
 
 config RT2X00_DEBUGFS
 	tristate "Ralink debugfs support"
-	depends on RT2X00 && DEBUG_FS
+	depends on RT2X00 && RT2X00_LIB && DEBUG_FS
 	---help---
 	Enable creation of debugfs files for the rt2x00 drivers.
 	These debugfs files support both reading and writing of the
@@ -66,6 +75,6 @@ config RT2X00_DEBUGFS
 
 config RT2X00_DEBUG
 	bool "Ralink debug output"
-	depends on RT2X00
+	depends on RT2X00 && RT2X00_LIB
 	---help---
 	Enable debugging output for all rt2x00 modules
diff --git a/drivers/net/wireless/mac80211/rt2x00/Makefile b/drivers/net/wireless/mac80211/rt2x00/Makefile
index 24837d5..10c7d9a 100644
--- a/drivers/net/wireless/mac80211/rt2x00/Makefile
+++ b/drivers/net/wireless/mac80211/rt2x00/Makefile
@@ -1,4 +1,4 @@
-obj-$(CONFIG_RT2X00)		+= rt2x00lib.o
+obj-$(CONFIG_RT2X00_LIB)	+= rt2x00lib.o
 obj-$(CONFIG_RT2400PCI)		+= rt2400pci.o
 obj-$(CONFIG_RT2500PCI)		+= rt2500pci.o
 obj-$(CONFIG_RT61PCI)		+= rt61pci.o

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] rt2x00: split RT2X00 option
  2007-02-28 18:26 [PATCH] rt2x00: split RT2X00 option Ivo van Doorn
@ 2007-02-28 18:35 ` Johannes Berg
  2007-02-28 18:45   ` Ivo van Doorn
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2007-02-28 18:35 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: John Linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]

On Wed, 2007-02-28 at 19:26 +0100, Ivo van Doorn wrote:

> Make the debug(fs) config options depend on this new
> config option.

I like that.
 
>  config RT2X00_DEBUGFS
>  	tristate "Ralink debugfs support"
> -	depends on RT2X00 && DEBUG_FS
> +	depends on RT2X00 && RT2X00_LIB && DEBUG_FS
>  	---help---
>  	Enable creation of debugfs files for the rt2x00 drivers.
>  	These debugfs files support both reading and writing of the

If you think hard about it, this also solves the problem of having
drivers built-in when the debugfs module isn't. But couldn't you just
link the debugfs module into the lib module instead of making it an own
module? I don't see any point in having it separate since there will be
a dependency anyway.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] rt2x00: split RT2X00 option
  2007-02-28 18:35 ` Johannes Berg
@ 2007-02-28 18:45   ` Ivo van Doorn
  2007-02-28 18:53     ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Ivo van Doorn @ 2007-02-28 18:45 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John Linville, linux-wireless

On Wednesday 28 February 2007 19:35, Johannes Berg wrote:
> On Wed, 2007-02-28 at 19:26 +0100, Ivo van Doorn wrote:
> 
> > Make the debug(fs) config options depend on this new
> > config option.
> 
> I like that.

:)

> >  config RT2X00_DEBUGFS
> >  	tristate "Ralink debugfs support"
> > -	depends on RT2X00 && DEBUG_FS
> > +	depends on RT2X00 && RT2X00_LIB && DEBUG_FS
> >  	---help---
> >  	Enable creation of debugfs files for the rt2x00 drivers.
> >  	These debugfs files support both reading and writing of the
> 
> If you think hard about it, this also solves the problem of having
> drivers built-in when the debugfs module isn't. 

Actually it doesn't fix that problem. :( It remains possible to
compile all drivers into the kernel but keeping rt2x00debug.ko as
module. But the solution really would be:

> But couldn't you just  
> link the debugfs module into the lib module instead of making it an own
> module? I don't see any point in having it separate since there will be
> a dependency anyway.

My words exactly. ;)

Merging those 2 modules has been placed on my todo list,
I'll try to have this done as soon as possible.

Ivo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] rt2x00: split RT2X00 option
  2007-02-28 18:45   ` Ivo van Doorn
@ 2007-02-28 18:53     ` Johannes Berg
  2007-02-28 19:02       ` Ivo van Doorn
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2007-02-28 18:53 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: John Linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

On Wed, 2007-02-28 at 19:45 +0100, Ivo van Doorn wrote:

> Actually it doesn't fix that problem. :( It remains possible to
> compile all drivers into the kernel but keeping rt2x00debug.ko as
> module. But the solution really would be:

True, I was thinking the other way around somehow.

> > But couldn't you just  
> > link the debugfs module into the lib module instead of making it an own
> > module? I don't see any point in having it separate since there will be
> > a dependency anyway.
> 
> My words exactly. ;)
> 
> Merging those 2 modules has been placed on my todo list,
> I'll try to have this done as soon as possible.

Yeah, the patch won't be hard to do but needs some file renames so the
make system copes, and the initialisation hooks. I suppose most people
actually build either cfg80211 or mac80211 as modules it isn't really a
big issue right now.

Btw. Feel free to track things like this on linuxwireless.org somewhere
around the todo list, maybe someone else picks it up.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] rt2x00: split RT2X00 option
  2007-02-28 18:53     ` Johannes Berg
@ 2007-02-28 19:02       ` Ivo van Doorn
  0 siblings, 0 replies; 5+ messages in thread
From: Ivo van Doorn @ 2007-02-28 19:02 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John Linville, linux-wireless

On Wednesday 28 February 2007 19:53, Johannes Berg wrote:
> On Wed, 2007-02-28 at 19:45 +0100, Ivo van Doorn wrote:
> 
> > Actually it doesn't fix that problem. :( It remains possible to
> > compile all drivers into the kernel but keeping rt2x00debug.ko as
> > module. But the solution really would be:
> 
> True, I was thinking the other way around somehow.
> 
> > > But couldn't you just  
> > > link the debugfs module into the lib module instead of making it an own
> > > module? I don't see any point in having it separate since there will be
> > > a dependency anyway.
> > 
> > My words exactly. ;)
> > 
> > Merging those 2 modules has been placed on my todo list,
> > I'll try to have this done as soon as possible.
> 
> Yeah, the patch won't be hard to do but needs some file renames so the
> make system copes, and the initialisation hooks. I suppose most people
> actually build either cfg80211 or mac80211 as modules it isn't really a
> big issue right now.
> 
> Btw. Feel free to track things like this on linuxwireless.org somewhere
> around the todo list, maybe someone else picks it up.

Ok, I'll to that within a few days. There are some other points on my todo
list that have to be written down as well. ;)

Ivo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-02-28 19:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-28 18:26 [PATCH] rt2x00: split RT2X00 option Ivo van Doorn
2007-02-28 18:35 ` Johannes Berg
2007-02-28 18:45   ` Ivo van Doorn
2007-02-28 18:53     ` Johannes Berg
2007-02-28 19:02       ` Ivo van Doorn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).