All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/wireless: CFG80211_WEXT_EXPORT requires wireless extensions
@ 2015-04-10 22:29 Arnd Bergmann
  2015-04-11  6:16 ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2015-04-10 22:29 UTC (permalink / raw)
  To: Johannes Berg; +Cc: David S. Miller, linux-wireless, netdev, linux-kernel

The CFG80211_WEXT_EXPORT symbol is selected by two drivers that
make direct use of compat handlers for the wireless ioctls.
However, this has no effect when the wireless extensions themselves
are disabled, and results in a link error:

ERROR: "cfg80211_wext_giwrts" [drivers/net/wireless/orinoco/orinoco.ko] undefined!
ERROR: "cfg80211_wext_siwfrag" [drivers/net/wireless/orinoco/orinoco.ko] undefined!
ERROR: "cfg80211_wext_giwname" [drivers/net/wireless/ipw2x00/ipw2200.ko] undefined!

This changes the Kconfig logic so that CFG80211_WEXT can not
be disabled when CFG80211_WEXT_EXPORT is set.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 2afe38d15cee01 ("cfg80211-wext: export symbols only when needed")

diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
index b13dfb4ff001..cb5eef396d5c 100644
--- a/net/wireless/Kconfig
+++ b/net/wireless/Kconfig
@@ -178,7 +178,6 @@ config CFG80211_WEXT
 	bool "cfg80211 wireless extensions compatibility"
 	depends on CFG80211
 	select WEXT_CORE
-	default y if CFG80211_WEXT_EXPORT
 	help
 	  Enable this option if you need old userspace for wireless
 	  extensions with cfg80211-based drivers.
@@ -186,6 +185,7 @@ config CFG80211_WEXT
 config CFG80211_WEXT_EXPORT
 	bool
 	depends on CFG80211
+	select CFG80211_WEXT
 	help
 	  Drivers should select this option if they require cfg80211's
 	  wext compatibility symbols to be exported.


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

* Re: [PATCH] net/wireless: CFG80211_WEXT_EXPORT requires wireless extensions
  2015-04-10 22:29 [PATCH] net/wireless: CFG80211_WEXT_EXPORT requires wireless extensions Arnd Bergmann
@ 2015-04-11  6:16 ` Johannes Berg
  2015-04-11 12:47   ` Paul Bolle
  2015-04-11 20:41     ` Arnd Bergmann
  0 siblings, 2 replies; 6+ messages in thread
From: Johannes Berg @ 2015-04-11  6:16 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: David S. Miller, linux-wireless, netdev, linux-kernel

On Sat, 2015-04-11 at 00:29 +0200, Arnd Bergmann wrote:
> The CFG80211_WEXT_EXPORT symbol is selected by two drivers that
> make direct use of compat handlers for the wireless ioctls.
> However, this has no effect when the wireless extensions themselves
> are disabled, and results in a link error:
> 
> ERROR: "cfg80211_wext_giwrts" [drivers/net/wireless/orinoco/orinoco.ko] undefined!
> ERROR: "cfg80211_wext_siwfrag" [drivers/net/wireless/orinoco/orinoco.ko] undefined!
> ERROR: "cfg80211_wext_giwname" [drivers/net/wireless/ipw2x00/ipw2200.ko] undefined!
> 
> This changes the Kconfig logic so that CFG80211_WEXT can not
> be disabled when CFG80211_WEXT_EXPORT is set.

> +++ b/net/wireless/Kconfig
> @@ -178,7 +178,6 @@ config CFG80211_WEXT
>  	bool "cfg80211 wireless extensions compatibility"

(I added "if !CFG80211_WEXT_EXPORT" to this line)

>  	depends on CFG80211
>  	select WEXT_CORE
> -	default y if CFG80211_WEXT_EXPORT
>  	help
>  	  Enable this option if you need old userspace for wireless
>  	  extensions with cfg80211-based drivers.
> @@ -186,6 +185,7 @@ config CFG80211_WEXT
>  config CFG80211_WEXT_EXPORT
>  	bool
>  	depends on CFG80211
> +	select CFG80211_WEXT

This doesn't work afaict because select won't go through if this is
selected. I've already sent a fix for this in my latest pull request
that has the above.

johannes


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

* Re: [PATCH] net/wireless: CFG80211_WEXT_EXPORT requires wireless extensions
  2015-04-11  6:16 ` Johannes Berg
@ 2015-04-11 12:47   ` Paul Bolle
  2015-04-11 20:41     ` Arnd Bergmann
  1 sibling, 0 replies; 6+ messages in thread
From: Paul Bolle @ 2015-04-11 12:47 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Arnd Bergmann, David S. Miller, linux-wireless, netdev, linux-kernel

On Sat, 2015-04-11 at 08:16 +0200, Johannes Berg wrote:
> On Sat, 2015-04-11 at 00:29 +0200, Arnd Bergmann wrote:
> >  config CFG80211_WEXT_EXPORT
> >  	bool
> >  	depends on CFG80211
> > +	select CFG80211_WEXT
> 
> This doesn't work afaict because select won't go through if this is
> selected.

It does work: a select of a Kconfig symbol will trigger the select
statements of that Kconfig symbol.


Paul Bolle


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

* Re: [PATCH] net/wireless: CFG80211_WEXT_EXPORT requires wireless extensions
@ 2015-04-11 20:41     ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-04-11 20:41 UTC (permalink / raw)
  To: Johannes Berg; +Cc: David S. Miller, linux-wireless, netdev, linux-kernel

On Saturday 11 April 2015 08:16:51 Johannes Berg wrote:
> On Sat, 2015-04-11 at 00:29 +0200, Arnd Bergmann wrote:
> > The CFG80211_WEXT_EXPORT symbol is selected by two drivers that
> > make direct use of compat handlers for the wireless ioctls.
> > However, this has no effect when the wireless extensions themselves
> > are disabled, and results in a link error:
> > 
> > ERROR: "cfg80211_wext_giwrts" [drivers/net/wireless/orinoco/orinoco.ko] undefined!
> > ERROR: "cfg80211_wext_siwfrag" [drivers/net/wireless/orinoco/orinoco.ko] undefined!
> > ERROR: "cfg80211_wext_giwname" [drivers/net/wireless/ipw2x00/ipw2200.ko] undefined!
> > 
> > This changes the Kconfig logic so that CFG80211_WEXT can not
> > be disabled when CFG80211_WEXT_EXPORT is set.
> 
> > +++ b/net/wireless/Kconfig
> > @@ -178,7 +178,6 @@ config CFG80211_WEXT
> >       bool "cfg80211 wireless extensions compatibility"
> 
> (I added "if !CFG80211_WEXT_EXPORT" to this line)

Right, that works just as well, thanks!

> >       depends on CFG80211
> >       select WEXT_CORE
> > -     default y if CFG80211_WEXT_EXPORT
> >       help
> >         Enable this option if you need old userspace for wireless
> >         extensions with cfg80211-based drivers.
> > @@ -186,6 +185,7 @@ config CFG80211_WEXT
> >  config CFG80211_WEXT_EXPORT
> >       bool
> >       depends on CFG80211
> > +     select CFG80211_WEXT
> 
> This doesn't work afaict because select won't go through if this is
> selected. I've already sent a fix for this in my latest pull request
> that has the above.

As Paul commented, it does work, and I have of course checked that my
patch fixes the problem without introducing other build failures.

	Arnd

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

* Re: [PATCH] net/wireless: CFG80211_WEXT_EXPORT requires wireless extensions
@ 2015-04-11 20:41     ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-04-11 20:41 UTC (permalink / raw)
  To: Johannes Berg
  Cc: David S. Miller, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Saturday 11 April 2015 08:16:51 Johannes Berg wrote:
> On Sat, 2015-04-11 at 00:29 +0200, Arnd Bergmann wrote:
> > The CFG80211_WEXT_EXPORT symbol is selected by two drivers that
> > make direct use of compat handlers for the wireless ioctls.
> > However, this has no effect when the wireless extensions themselves
> > are disabled, and results in a link error:
> > 
> > ERROR: "cfg80211_wext_giwrts" [drivers/net/wireless/orinoco/orinoco.ko] undefined!
> > ERROR: "cfg80211_wext_siwfrag" [drivers/net/wireless/orinoco/orinoco.ko] undefined!
> > ERROR: "cfg80211_wext_giwname" [drivers/net/wireless/ipw2x00/ipw2200.ko] undefined!
> > 
> > This changes the Kconfig logic so that CFG80211_WEXT can not
> > be disabled when CFG80211_WEXT_EXPORT is set.
> 
> > +++ b/net/wireless/Kconfig
> > @@ -178,7 +178,6 @@ config CFG80211_WEXT
> >       bool "cfg80211 wireless extensions compatibility"
> 
> (I added "if !CFG80211_WEXT_EXPORT" to this line)

Right, that works just as well, thanks!

> >       depends on CFG80211
> >       select WEXT_CORE
> > -     default y if CFG80211_WEXT_EXPORT
> >       help
> >         Enable this option if you need old userspace for wireless
> >         extensions with cfg80211-based drivers.
> > @@ -186,6 +185,7 @@ config CFG80211_WEXT
> >  config CFG80211_WEXT_EXPORT
> >       bool
> >       depends on CFG80211
> > +     select CFG80211_WEXT
> 
> This doesn't work afaict because select won't go through if this is
> selected. I've already sent a fix for this in my latest pull request
> that has the above.

As Paul commented, it does work, and I have of course checked that my
patch fixes the problem without introducing other build failures.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] net/wireless: CFG80211_WEXT_EXPORT requires wireless extensions
  2015-04-11 20:41     ` Arnd Bergmann
  (?)
@ 2015-04-13  8:09     ` Johannes Berg
  -1 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2015-04-13  8:09 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: David S. Miller, linux-wireless, netdev, linux-kernel

On Sat, 2015-04-11 at 22:41 +0200, Arnd Bergmann wrote:

> As Paul commented, it does work, and I have of course checked that my
> patch fixes the problem without introducing other build failures.

:-)
Ok, I learned something. I'm always careful with "select" because it has
some corner cases.

Anyway, my other patch is in net-next now, so it'll be fixed in a tree
near you soon :)

johannes


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

end of thread, other threads:[~2015-04-13  8:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10 22:29 [PATCH] net/wireless: CFG80211_WEXT_EXPORT requires wireless extensions Arnd Bergmann
2015-04-11  6:16 ` Johannes Berg
2015-04-11 12:47   ` Paul Bolle
2015-04-11 20:41   ` Arnd Bergmann
2015-04-11 20:41     ` Arnd Bergmann
2015-04-13  8:09     ` 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.