All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] d80211: create net/wireless/Kconfig and make nl80211 optional
@ 2007-02-23 20:41 James Ketrenos
  2007-02-23 20:52 ` Johannes Berg
  2007-02-23 20:56 ` James Ketrenos
  0 siblings, 2 replies; 9+ messages in thread
From: James Ketrenos @ 2007-02-23 20:41 UTC (permalink / raw)
  To: linux-wireless, John W. Linville, Johannes Berg

Move the wireless Kconfig options into their own wireless/Kconfig and
add a CONFIG_CFG80211_NL80211 configuration option to allow nl80211
support to be optionally included (default =y)

This also adds Johannes' stub functions for nl80211_init and 
nl80211_exit when CONFIG_CFG80211_NL80211 is not defined.

Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
---
  net/wireless/Kconfig  |   42 ++++++++++++++++++++++++++++++++++++++++++
  net/wireless/Makefile |    3 ++-
  3 files changed, 45 insertions(+), 17 deletions(-)
---
diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
new file mode 100644
index 0000000..89308d0
--- /dev/null
+++ b/net/wireless/Kconfig
@@ -0,0 +1,42 @@
+config CFG80211
+        tristate "Improved wireless configuration API"
+        select WIRELESS_EXT
+
+config CFG80211_WEXT_COMPAT
+        bool "cfg80211 Wireless Extensions compatibility"
+        depends CFG80211
+        default y
+        ---help---
+        This option allows using devices whose drivers have been
+        converted to use the new cfg80211 with wireless extensions,
+        providing WE-20 compatibility.
+	
+        Note that cfg80211's "native" interface is nl80211 using
+        generic netlink. The wireless extensions are being
+        deprecated, but userspace tools may still be using them.
+
+        NOTE: wireless extension support (WIRELESS_EXT) is currently a
+        built-in based on 'Wireless Extension' support (selected
+        when CFG80211 is enabled).
+
+        If unsure, say Y.
+
+config CFG80211_NL80211
+	tristate "nl80211 new netlink interface support"
+	depends CFG80211
+	default y
+	---help---
+        This option turns on the new netlink interface
+        (nl80211) support in cfg80211.
+	
+        If =n, drivers using d80211 will be configured via
+        wireless extension support provided by that subsystem.
+
+        If =m, the module will be called nl80211.ko
+
+        NOTE: wireless extension support (WIRELESS_EXT) is currently a
+        built-in based on 'Wireless Extension' support (selected
+        when CFG80211 is enabled).
+
+        If unsure, say Y.
+
diff --git a/net/wireless/Makefile b/net/wireless/Makefile
index c52c251..1f47511 100644
--- a/net/wireless/Makefile
+++ b/net/wireless/Makefile
@@ -1,6 +1,7 @@
  obj-$(CONFIG_CFG80211) += cfg80211.o

-cfg80211-y += core.o sysfs.o nl80211.o
+cfg80211-y += core.o sysfs.o
+cfg80211-$(CONFIG_NL80211) += nl80211.o
  cfg80211-$(CONFIG_CFG80211_WEXT_COMPAT) += wext-compat.o

  ifeq ($(CONFIG_CFG80211),m)
--- wireless-dev.orig/net/wireless/nl80211.h	2007-02-23
+++ wireless-dev/net/wireless/nl80211.h	2007-02-23
@@ -1,7 +1,17 @@
  #ifndef __NET_WIRELESS_NL80211_H
  #define __NET_WIRELESS_NL80211_H

+#ifdef CONFIG_CFG80211_NL80211
  extern int nl80211_init(void);
  extern void nl80211_exit(void);
+#else
+static inline int nl80211_init(void)
+{
+	return 0;
+}
+static inline void nl80211_exit(void)
+{
+}
+#endif /* CONFIG_CFG80211_NL80211 */

  #endif /* __NET_WIRELESS_NL80211_H */

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

* Re: [PATCH] d80211: create net/wireless/Kconfig and make nl80211  optional
  2007-02-23 20:41 [PATCH] d80211: create net/wireless/Kconfig and make nl80211 optional James Ketrenos
@ 2007-02-23 20:52 ` Johannes Berg
  2007-02-23 21:01   ` James Ketrenos
  2007-02-23 21:47   ` James Ketrenos
  2007-02-23 20:56 ` James Ketrenos
  1 sibling, 2 replies; 9+ messages in thread
From: Johannes Berg @ 2007-02-23 20:52 UTC (permalink / raw)
  To: James Ketrenos; +Cc: linux-wireless, John W. Linville

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

On Fri, 2007-02-23 at 12:41 -0800, James Ketrenos wrote:
> Move the wireless Kconfig options into their own wireless/Kconfig and
> add a CONFIG_CFG80211_NL80211 configuration option to allow nl80211
> support to be optionally included (default =y)

I think this one is missing the changes in net/Kconfig.

And I should have looked closer before, sorry.

+config CFG80211
+        tristate "Improved wireless configuration API"
+        select WIRELESS_EXT

Why is that select WIRELESS_EXT? CFG80211 doesn't need that, d80211 does
and correctly selects it.

johannes

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

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

* Re: [PATCH] d80211: create net/wireless/Kconfig and make nl80211  optional
  2007-02-23 20:41 [PATCH] d80211: create net/wireless/Kconfig and make nl80211 optional James Ketrenos
  2007-02-23 20:52 ` Johannes Berg
@ 2007-02-23 20:56 ` James Ketrenos
  2007-02-23 21:02   ` Johannes Berg
  1 sibling, 1 reply; 9+ messages in thread
From: James Ketrenos @ 2007-02-23 20:56 UTC (permalink / raw)
  To: James Ketrenos; +Cc: linux-wireless, John W. Linville, Johannes Berg

Hold on applying.

> +cfg80211-$(CONFIG_NL80211) += nl80211.o

Should have been

cfg80211-$(CONFIG_CFG80211_NL80211) += nl80211.o

Am looking at Johannes' email re: WIRELESS_EXT being selected as well.  Will send a 
new version soon.

James

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

* Re: [PATCH] d80211: create net/wireless/Kconfig and make nl80211  optional
  2007-02-23 20:52 ` Johannes Berg
@ 2007-02-23 21:01   ` James Ketrenos
  2007-02-23 21:47   ` James Ketrenos
  1 sibling, 0 replies; 9+ messages in thread
From: James Ketrenos @ 2007-02-23 21:01 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, John W. Linville

Johannes Berg wrote:
> On Fri, 2007-02-23 at 12:41 -0800, James Ketrenos wrote:
>> Move the wireless Kconfig options into their own wireless/Kconfig and
>> add a CONFIG_CFG80211_NL80211 configuration option to allow nl80211
>> support to be optionally included (default =y)
> 
> I think this one is missing the changes in net/Kconfig.
> 
> And I should have looked closer before, sorry.
> 
> +config CFG80211
> +        tristate "Improved wireless configuration API"
> +        select WIRELESS_EXT
> 
> Why is that select WIRELESS_EXT? CFG80211 doesn't need that, d80211 does
> and correctly selects it.

Confusion mostly...

I've removed it.

James

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

* Re: [PATCH] d80211: create net/wireless/Kconfig and make nl80211   optional
  2007-02-23 20:56 ` James Ketrenos
@ 2007-02-23 21:02   ` Johannes Berg
  0 siblings, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2007-02-23 21:02 UTC (permalink / raw)
  To: James Ketrenos; +Cc: linux-wireless, John W. Linville

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

On Fri, 2007-02-23 at 12:56 -0800, James Ketrenos wrote:
> Hold on applying.
> 
> > +cfg80211-$(CONFIG_NL80211) += nl80211.o
> 
> Should have been
> 
> cfg80211-$(CONFIG_CFG80211_NL80211) += nl80211.o

Or maybe just rename it if it's already confusing you ;)

johannes

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

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

* Re: [PATCH] d80211: create net/wireless/Kconfig and make nl80211  optional
  2007-02-23 20:52 ` Johannes Berg
  2007-02-23 21:01   ` James Ketrenos
@ 2007-02-23 21:47   ` James Ketrenos
  2007-02-23 21:55     ` Randy Dunlap
  2007-02-23 22:11     ` Johannes Berg
  1 sibling, 2 replies; 9+ messages in thread
From: James Ketrenos @ 2007-02-23 21:47 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, John W. Linville

Ok... this time for sure.  Maybe :)  At least its Friday.

James

----

[PATCH] create net/wireless/Kconfig and make nl80211 optional

Move the wireless Kconfig options into their own wireless/Kconfig and
add a CONFIG_NL80211 configuration option to allow nl80211
support to be optionally included (default =y)

This also implements stub functions for nl80211_init and nl80211_exit
when CONFIG_NL80211 is not defined.

Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
---
  net/Kconfig            |   17 +----------------
  net/wireless/Kconfig   |   33 +++++++++++++++++++++++++++++++++
  net/wireless/Makefile  |    3 ++-
  net/wireless/nl80211.h |   10 ++++++++++
  4 files changed, 46 insertions(+), 17 deletions(-)
---
diff --git a/net/Kconfig b/net/Kconfig
index 3bff36e..6fa4d68 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -228,22 +228,7 @@ config WIRELESS_EXT
  config FIB_RULES
  	bool

-config CFG80211
-	tristate "Improved wireless configuration API"
-
-config CFG80211_WEXT_COMPAT
-	bool "cfg80211 Wireless Extensions compatibility"
-	depends CFG80211
-	default y
-	---help---
-	This option allows using devices whose drivers have been
-	converted to use the new cfg80211 with wireless extensions,
-	providing WE-20 compatibility. Note that cfg80211's "native"
-	interface is nl80211 using generic netlink. The wireless
-	extensions are being deprecated, but userspace tools may still
-	be using them.
-
-	If unsure, say Y.
+source "net/wireless/Kconfig"

  endif   # if NET
  endmenu # Networking
diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
new file mode 100644
index 0000000..7e83504
--- /dev/null
+++ b/net/wireless/Kconfig
@@ -0,0 +1,33 @@
+config CFG80211
+        tristate "Improved wireless configuration API"
+
+config CFG80211_WEXT_COMPAT
+        bool "cfg80211 Wireless Extensions compatibility"
+        depends CFG80211
+        default y
+        ---help---
+        This option allows using devices whose drivers have been
+        converted to use the new cfg80211 with wireless extensions,
+        providing WE-20 compatibility.
+	
+        Note that cfg80211's "native" interface is nl80211 using
+        generic netlink. The wireless extensions are being
+        deprecated, but userspace tools may still be using them.
+
+        If unsure, say Y.
+
+config NL80211
+	tristate "nl80211 new netlink interface support"
+	depends CFG80211
+	default y
+	---help---
+        This option turns on the new netlink interface
+        (nl80211) support in cfg80211.
+	
+        If =n, drivers using d80211 will be configured via
+        wireless extension support provided by that subsystem.
+
+        If =m, the module will be called nl80211.ko
+
+        If unsure, say Y.
+
diff --git a/net/wireless/Makefile b/net/wireless/Makefile
index c52c251..1f47511 100644
--- a/net/wireless/Makefile
+++ b/net/wireless/Makefile
@@ -1,6 +1,7 @@
  obj-$(CONFIG_CFG80211) += cfg80211.o

-cfg80211-y += core.o sysfs.o nl80211.o
+cfg80211-y += core.o sysfs.o
+cfg80211-$(CONFIG_NL80211) += nl80211.o
  cfg80211-$(CONFIG_CFG80211_WEXT_COMPAT) += wext-compat.o

  ifeq ($(CONFIG_CFG80211),m)
diff --git a/net/wireless/nl80211.h b/net/wireless/nl80211.h
index 0edc7a4..31524c7 100644
--- a/net/wireless/nl80211.h
+++ b/net/wireless/nl80211.h
@@ -1,7 +1,17 @@
  #ifndef __NET_WIRELESS_NL80211_H
  #define __NET_WIRELESS_NL80211_H

+#ifdef CONFIG_NL80211
  extern int nl80211_init(void);
  extern void nl80211_exit(void);
+#else
+static inline int nl80211_init(void)
+{
+	return 0;
+}
+static inline void nl80211_exit(void)
+{
+}
+#endif /* CONFIG_NL80211 */

  #endif /* __NET_WIRELESS_NL80211_H */

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

* Re: [PATCH] d80211: create net/wireless/Kconfig and make nl80211  optional
  2007-02-23 21:47   ` James Ketrenos
@ 2007-02-23 21:55     ` Randy Dunlap
  2007-02-23 22:11     ` Johannes Berg
  1 sibling, 0 replies; 9+ messages in thread
From: Randy Dunlap @ 2007-02-23 21:55 UTC (permalink / raw)
  To: James Ketrenos; +Cc: Johannes Berg, linux-wireless, John W. Linville

On Fri, 23 Feb 2007 13:47:37 -0800 James Ketrenos wrote:

> Ok... this time for sure.  Maybe :)  At least its Friday.

almost ....

> James
> 
> ----
> 
> [PATCH] create net/wireless/Kconfig and make nl80211 optional
> 
> ---
>   net/Kconfig            |   17 +----------------
>   net/wireless/Kconfig   |   33 +++++++++++++++++++++++++++++++++
>   net/wireless/Makefile  |    3 ++-
>   net/wireless/nl80211.h |   10 ++++++++++
>   4 files changed, 46 insertions(+), 17 deletions(-)
> ---
> diff --git a/net/Kconfig b/net/Kconfig
> index 3bff36e..6fa4d68 100644
> --- a/net/Kconfig
> +++ b/net/Kconfig
> @@ -228,22 +228,7 @@ config WIRELESS_EXT
>   config FIB_RULES
>   	bool
> 
> -config CFG80211
> -	tristate "Improved wireless configuration API"
> -
> -config CFG80211_WEXT_COMPAT
> -	bool "cfg80211 Wireless Extensions compatibility"
> -	depends CFG80211
> -	default y
> -	---help---
> -	This option allows using devices whose drivers have been
> -	converted to use the new cfg80211 with wireless extensions,
> -	providing WE-20 compatibility. Note that cfg80211's "native"
> -	interface is nl80211 using generic netlink. The wireless
> -	extensions are being deprecated, but userspace tools may still
> -	be using them.
> -
> -	If unsure, say Y.
> +source "net/wireless/Kconfig"
> 
>   endif   # if NET
>   endmenu # Networking
> diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
> new file mode 100644
> index 0000000..7e83504
> --- /dev/null
> +++ b/net/wireless/Kconfig
> @@ -0,0 +1,33 @@
> +config CFG80211
> +        tristate "Improved wireless configuration API"
> +
> +config CFG80211_WEXT_COMPAT
> +        bool "cfg80211 Wireless Extensions compatibility"
> +        depends CFG80211
> +        default y
> +        ---help---
> +        This option allows using devices whose drivers have been
> +        converted to use the new cfg80211 with wireless extensions,
> +        providing WE-20 compatibility.
> +	
> +        Note that cfg80211's "native" interface is nl80211 using
> +        generic netlink. The wireless extensions are being
> +        deprecated, but userspace tools may still be using them.
> +
> +        If unsure, say Y.

All of the text under ---help--- should be (should have been :) indented
2 spaces...  (yes, I know it wasn't before, but should have been).


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* Re: [PATCH] d80211: create net/wireless/Kconfig and make nl80211  optional
  2007-02-23 21:47   ` James Ketrenos
  2007-02-23 21:55     ` Randy Dunlap
@ 2007-02-23 22:11     ` Johannes Berg
  2007-02-23 22:52       ` James Ketrenos
  1 sibling, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2007-02-23 22:11 UTC (permalink / raw)
  To: James Ketrenos; +Cc: linux-wireless, John W. Linville

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


I guess this'll never end...

> -cfg80211-y += core.o sysfs.o nl80211.o
> +cfg80211-y += core.o sysfs.o
> +cfg80211-$(CONFIG_NL80211) += nl80211.o

That won't work correctly. To build nl80211 as an extra module you'll
need obj-m += nl80211.o, but to build it into cfg80211 when it's
NL80211=y you need cfg80211-y += nl80211.o

Could you live with it not being a module itself so we can just make it
a boolean and use the current way it's done in the Makefile?

johannes

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

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

* Re: [PATCH] d80211: create net/wireless/Kconfig and make nl80211  optional
  2007-02-23 22:11     ` Johannes Berg
@ 2007-02-23 22:52       ` James Ketrenos
  0 siblings, 0 replies; 9+ messages in thread
From: James Ketrenos @ 2007-02-23 22:52 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, John W. Linville

Johannes Berg wrote:
> I guess this'll never end...
 >
>> +cfg80211-$(CONFIG_NL80211) += nl80211.o
 >
> Could you live with it not being a module itself so we can just make it
> a boolean and use the current way it's done in the Makefile?

Yup. I set it to a bool.

New patch (with Randy's feedback to indent help text w/ two spaces) below...

Thanks,
James

-------------------------

[PATCH] create net/wireless/Kconfig and make nl80211 optional

Move the wireless Kconfig options into their own wireless/Kconfig and
add a CONFIG_NL80211 configuration option to allow nl80211
support to be optionally included (default =y)

This also implements stub functions for nl80211_init and nl80211_exit
when CONFIG_NL80211 is not defined.

Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
---
  net/Kconfig            |   17 +----------------
  net/wireless/Kconfig   |   33 +++++++++++++++++++++++++++++++++
  net/wireless/Makefile  |    3 ++-
  net/wireless/nl80211.h |   10 ++++++++++
  4 files changed, 46 insertions(+), 17 deletions(-)
---
diff --git a/net/Kconfig b/net/Kconfig
index 3bff36e..6fa4d68 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -228,22 +228,7 @@ config WIRELESS_EXT
  config FIB_RULES
  	bool

-config CFG80211
-	tristate "Improved wireless configuration API"
-
-config CFG80211_WEXT_COMPAT
-	bool "cfg80211 Wireless Extensions compatibility"
-	depends CFG80211
-	default y
-	---help---
-	This option allows using devices whose drivers have been
-	converted to use the new cfg80211 with wireless extensions,
-	providing WE-20 compatibility. Note that cfg80211's "native"
-	interface is nl80211 using generic netlink. The wireless
-	extensions are being deprecated, but userspace tools may still
-	be using them.
-
-	If unsure, say Y.
+source "net/wireless/Kconfig"

  endif   # if NET
  endmenu # Networking
diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
new file mode 100644
index 0000000..7e83504
--- /dev/null
+++ b/net/wireless/Kconfig
@@ -0,0 +1,31 @@
+config CFG80211
+        tristate "Improved wireless configuration API"
+
+config CFG80211_WEXT_COMPAT
+        bool "cfg80211 Wireless Extensions compatibility"
+        depends CFG80211
+        default y
+        ---help---
+          This option allows using devices whose drivers have been
+          converted to use the new cfg80211 with wireless extensions,
+          providing WE-20 compatibility.
+	
+          Note that cfg80211's "native" interface is nl80211 using
+          generic netlink. The wireless extensions are being
+          deprecated, but userspace tools may still be using them.
+
+          If unsure, say Y.
+
+config NL80211
+	bool "nl80211 new netlink interface support"
+	depends CFG80211
+	default y
+	---help---
+         This option turns on the new netlink interface
+         (nl80211) support in cfg80211.
+	
+         If =n, drivers using d80211 will be configured via
+         wireless extension support provided by that subsystem.
+
+         If unsure, say Y.
+
diff --git a/net/wireless/Makefile b/net/wireless/Makefile
index c52c251..1f47511 100644
--- a/net/wireless/Makefile
+++ b/net/wireless/Makefile
@@ -1,6 +1,7 @@
  obj-$(CONFIG_CFG80211) += cfg80211.o

-cfg80211-y += core.o sysfs.o nl80211.o
+cfg80211-y += core.o sysfs.o
+cfg80211-$(CONFIG_NL80211) += nl80211.o
  cfg80211-$(CONFIG_CFG80211_WEXT_COMPAT) += wext-compat.o

  ifeq ($(CONFIG_CFG80211),m)
diff --git a/net/wireless/nl80211.h b/net/wireless/nl80211.h
index 0edc7a4..31524c7 100644
--- a/net/wireless/nl80211.h
+++ b/net/wireless/nl80211.h
@@ -1,7 +1,17 @@
  #ifndef __NET_WIRELESS_NL80211_H
  #define __NET_WIRELESS_NL80211_H

+#ifdef CONFIG_NL80211
  extern int nl80211_init(void);
  extern void nl80211_exit(void);
+#else
+static inline int nl80211_init(void)
+{
+	return 0;
+}
+static inline void nl80211_exit(void)
+{
+}
+#endif /* CONFIG_NL80211 */

  #endif /* __NET_WIRELESS_NL80211_H */

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

end of thread, other threads:[~2007-02-23 22:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-23 20:41 [PATCH] d80211: create net/wireless/Kconfig and make nl80211 optional James Ketrenos
2007-02-23 20:52 ` Johannes Berg
2007-02-23 21:01   ` James Ketrenos
2007-02-23 21:47   ` James Ketrenos
2007-02-23 21:55     ` Randy Dunlap
2007-02-23 22:11     ` Johannes Berg
2007-02-23 22:52       ` James Ketrenos
2007-02-23 20:56 ` James Ketrenos
2007-02-23 21:02   ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.