Skip to contentSkip to conversation

lib80211: make crypt modules configurable by user

PATCH In review Daniel Ritz 2 participants 4 messages Dec 1, 2009 – Dec 3, 2009

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

PATCH 1/1 lib80211: make crypt modules configurable by user

Make the crypt modules configurable by user. Normally drivers select them when needed, but out-of-tree drivers can't do that. Having a minimal kernel with just the things required won't select any of those modules, resulting in the external driver to be close to useless (ie. it can scan the networks, but cannot join a single one).

---
 net/wireless/Kconfig |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)
net/wireless/Kconfig +18 -5
index abf7ca3..48f60ab 100644
@@ -123,17 +123,30 @@ config LIB80211
 	  This options enables a library of common routines used
 	  by IEEE802.11 wireless LAN drivers.
 
-	  Drivers should select this themselves if needed.  Say Y if
-	  you want this built into your kernel.
+	  Drivers should select this themselves if needed, but for
+	  out-of-tree drivers manually selecting it might be required.
+	  Say Y if you want this built into your kernel.
 
 config LIB80211_CRYPT_WEP
-	tristate
+	tristate "lib80211 WEP support module"
+	depends on LIB80211
+	default m
+	help
+	  This adds WEP support to lib80211.
 
 config LIB80211_CRYPT_CCMP
-	tristate
+	tristate "lib80211 CCMP support module"
+	depends on LIB80211
+	default m
+	help
+	  This adds CCMP support to lib80211.
 
 config LIB80211_CRYPT_TKIP
-	tristate
+	tristate "lib80211 TKIP support module"
+	depends on LIB80211
+	default m
+	help
+	  This adds TKIP support to lib80211.
 
 config LIB80211_DEBUG
 	bool "lib80211 debugging messages"
Signature · 1 line
1.6.3.3
maintainer
#1 lore raw
Quoted 5 lines · Daniel Ritz

Make the crypt modules configurable by user. Normally drivers select them when needed, but out-of-tree drivers can't do that. Having a minimal kernel with just the things required won't select any of those modules, resulting in the external driver to be close to useless (ie. it can scan the networks, but cannot join a single one).

So ... what makes you think anyone cares about out of tree drivers?

From my POV a clear NACK on this, since it makes the kernel configuration more complex for no useful reason.

johannes

#2 lore raw
Quoted 8 lines · Johannes Berg
Quoted 5 lines · Daniel Ritz

Make the crypt modules configurable by user. Normally drivers select them when needed, but out-of-tree drivers can't do that. Having a minimal kernel with just the things required won't select any of those modules, resulting in the external driver to be close to useless (ie. it can scan the networks, but cannot join a single one).

So ... what makes you think anyone cares about out of tree drivers?

hmm...dunno. nothing i guess :)

Quoted 3 lines

From my POV a clear NACK on this, since it makes the kernel configuration more complex for no useful reason.

ok. but looking at it again, there are some minor problems that have nothing to do with out-of-tree-drivers:
- it's possible for the user to compile-in lib80211, but not the crypt modules
- the crypt modules depend on crypto API and modules, but it's the WLAN drivers that select them. duplicated selects for each driver.

so how about the following?
- allow the user to compile-in the crypto modules as well
- select the dependencies in the crypt modules, not the drivers

rgds
-daniel

drivers/net/wireless/hostap/Kconfig +0 -7
index c15db22..33b1080 100644
@@ -2,13 +2,6 @@ config HOSTAP
 	tristate "IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)"
 	depends on WLAN_80211
 	select WIRELESS_EXT
-	select CRYPTO
-	select CRYPTO_ARC4
-	select CRYPTO_ECB
-	select CRYPTO_AES
-	select CRYPTO_MICHAEL_MIC
-	select CRYPTO_ECB
-	select CRC32
 	select LIB80211
 	select LIB80211_CRYPT_WEP
 	select LIB80211_CRYPT_TKIP
drivers/net/wireless/ipw2x00/Kconfig +0 -7
index a813138..3846b2b 100644
@@ -152,13 +152,6 @@ config LIBIPW
 	tristate
 	depends on PCI && WLAN_80211 && CFG80211
 	select WIRELESS_EXT
-	select CRYPTO
-	select CRYPTO_ARC4
-	select CRYPTO_ECB
-	select CRYPTO_AES
-	select CRYPTO_MICHAEL_MIC
-	select CRYPTO_ECB
-	select CRC32
 	select LIB80211
 	select LIB80211_CRYPT_WEP
 	select LIB80211_CRYPT_TKIP
net/wireless/Kconfig +26 -3
index abf7ca3..01b704c 100644
@@ -127,13 +127,36 @@ config LIB80211
 	  you want this built into your kernel.
 
 config LIB80211_CRYPT_WEP
-	tristate
+	tristate "lib80211 WEP support"
+	depends on LIB80211
+	select CRYPTO
+	select CRYPTO_ARC4
+	select CRYPTO_ECB
+	select CRC32
+	help
+	  Drivers should select this themselves if needed.  Say Y if
+	  you want this built into your kernel.
 
 config LIB80211_CRYPT_CCMP
-	tristate
+	tristate "lib80211 CCMP support"
+	depends on LIB80211
+	select CRYPTO
+	select CRYPTO_AES
+	help
+	  Drivers should select this themselves if needed.  Say Y if
+	  you want this built into your kernel.
 
 config LIB80211_CRYPT_TKIP
-	tristate
+	tristate "lib80211 TKIP support"
+	depends on LIB80211
+	select CRYPTO
+	select CRYPTO_ARC4
+	select CRYPTO_ECB
+	select CRYPTO_MICHAEL_MIC
+	select CRC32
+	help
+	  Drivers should select this themselves if needed.  Say Y if
+	  you want this built into your kernel.
 
 config LIB80211_DEBUG
 	bool "lib80211 debugging messages"
maintainer
#3 lore raw

Hi,

Please do me a favour and explain _why_ you want to change anything before you do. I'm not really interested in pointless chit-chat about lib80211 kconfig.

Quoted 4 lines

ok. but looking at it again, there are some minor problems that have nothing to do with out-of-tree-drivers:
- it's possible for the user to compile-in lib80211, but not the crypt modules

Yes, the correct solution to that inconsistency is to remove the lib80211 config symbol from the user's view... then it'll always be the same the driver is ...

Quoted 2 lines

- the crypt modules depend on crypto API and modules, but it's the WLAN drivers that select them. duplicated selects for each driver.

Yes, well ...

Quoted 1 line

so how about the following?

The following patch (snipped) was clearly not tested at all. I'll leave it to you to figure out why it's completely and utterly broken, but I'll give you a hint: it has something to do with "select".

Please come back when only you have a problem to solve.

johannes