Skip to contentSkip to conversation

net/wireless: CFG80211_WEXT_EXPORT requires wireless extensions

PATCH In review Arnd Bergmann 3 participants 5 messages Apr 10, 2015 – Apr 13, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/wireless: CFG80211_WEXT_EXPORT requires wireless extensions

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.

Fixes 2afe38d15cee01 ("cfg80211-wext: export symbols only when needed")
net/wireless/Kconfig +1 -1
index b13dfb4ff001..cb5eef396d5c 100644
@@ -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.
maintainer
#1 lore raw
Quoted 14 lines · Arnd Bergmann

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

net/wireless/Kconfig config CFG80211_WEXT · line 178

Quoted 1 line
net/wireless/Kconfig +0 -0
@@ -178,7 +178,6 @@ config CFG80211_WEXT
 	bool "cfg80211 wireless extensions compatibility"

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

net/wireless/Kconfig config CFG80211_WEXT · line 188

Quoted 11 lines
net/wireless/Kconfig +1 -1
 	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

#2 lore raw
Quoted 8 lines · Johannes Berg

net/wireless/Kconfig config CFG80211_WEXT · line 188

Quoted 4 lines · Arnd Bergmann

config CFG80211_WEXT_EXPORT

net/wireless/Kconfig +1 -0
 	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

#3 lore raw
In reply to Johannes Berg
Quoted 10 lines · On Saturday 11 April 2015 08:16:51 Johannes Berg wrote:
Quoted 9 lines · Arnd Bergmann

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!

Quoted 8 lines

net/wireless/Kconfig config CFG80211_WEXT · line 178

Quoted 6 lines

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

+++ b/net/wireless/Kconfig

net/wireless/Kconfig +0 -0
@@ -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!

Quoted 7 lines
Quoted 7 lines
net/wireless/Kconfig +0 -1
      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
Quoted 8 lines

net/wireless/Kconfig config CFG80211_WEXT · line 188

Quoted 4 lines
net/wireless/Kconfig +1 -0
 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#4 lore raw
Quoted 2 lines · Arnd Bergmann

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