Skip to contentSkip to conversation

rt2x00: split RT2X00 option

PATCH In review Ivo van Doorn 2 participants 5 messages Feb 28, 2007 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rt2x00: split RT2X00 option

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.

---

drivers/net/wireless/mac80211/rt2x00/Kconfig +14 -5
index 1010a72..ec107e7 100644
@@ -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
drivers/net/wireless/mac80211/rt2x00/Makefile +1 -1
index 24837d5..10c7d9a 100644
@@ -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
maintainer
#1 lore raw
Quoted 2 lines · Ivo van Doorn

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

I like that.

drivers/net/wireless/mac80211/rt2x00/Kconfig config RT73USB · line 73

Quoted 7 lines

config RT2X00_DEBUGFS

drivers/net/wireless/mac80211/rt2x00/Kconfig +1 -1
 	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

#2 lore raw
Quoted 6 lines · Johannes Berg
Quoted 2 lines · Ivo van Doorn

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

I like that.

:)

Quoted 10 lines

drivers/net/wireless/mac80211/rt2x00/Kconfig config RT73USB · line 73

Quoted 7 lines

config RT2X00_DEBUGFS

drivers/net/wireless/mac80211/rt2x00/Kconfig +1 -1
 	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:

Quoted 4 lines

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

maintainer
#3 lore raw
Quoted 3 lines · Ivo van Doorn

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.

Quoted 9 lines
Quoted 4 lines

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

#4 lore raw
Quoted 18 lines · Johannes Berg
Quoted 3 lines · Ivo van Doorn

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.

Quoted 9 lines
Quoted 4 lines

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.

Quoted 7 lines

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