Skip to contentSkip to conversation

wpa_supplicant: modify .config rework order

PATCH New Gustavo Zacarias 2 participants 4 messages Feb 27, 2014 – Mar 2, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 wpa_supplicant: modify .config rework order

Switch to first enable and then disable.
Otherwise a wildcard enable can't have a single option disabled which is far more usual than the opposite (and required for a simple bump to version 2.1).

---
 package/wpa_supplicant/wpa_supplicant.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/wpa_supplicant/wpa_supplicant.mk +2 -2
index d2b21c2..34e8e1f 100644
@@ -106,8 +106,8 @@ endif
 
 define WPA_SUPPLICANT_CONFIGURE_CMDS
 	cp $(@D)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG)
-	sed -i $(patsubst %,-e 's/^\(%\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
-	       $(patsubst %,-e 's/^#\(%\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
+	sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \
+	       $(patsubst %,-e 's/^\(%\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \
 	       $(patsubst %,-e '1i%=y',$(WPA_SUPPLICANT_CONFIG_SET)) \
 	       $(patsubst %,-e %,$(WPA_SUPPLICANT_CONFIG_EDITS)) \
 	       $(WPA_SUPPLICANT_CONFIG)
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 2/3 wpa_suppicant: bump to version 2.1

Now with 802.11ac and P2P support.

CONFIG_LIBNL32 was a hidden option so switch to ENABLE/DISABLE now. CONFIG_DRIVER_ATMEL was dropped.
CONFIG_DELAYED_MIC is no longer optional.
CONFIG_AP was also hidden so also switch to ENABLE/DISABLE. CONFIG_EAP_* now blindly enabled instead of doing one per each.

P2P support is unified with the AP mode config knob since it's the more likely scenario and share code between them.

---
 package/wpa_supplicant/wpa_supplicant.mk | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)
package/wpa_supplicant/wpa_supplicant.mk +10 -15
index 34e8e1f..17788cc 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-WPA_SUPPLICANT_VERSION = 2.0
+WPA_SUPPLICANT_VERSION = 2.1
 WPA_SUPPLICANT_SITE = http://hostap.epitest.fi/releases
 WPA_SUPPLICANT_LICENSE = GPLv2/BSD-3c
 WPA_SUPPLICANT_LICENSE_FILES = README
@@ -20,51 +20,46 @@ WPA_SUPPLICANT_CONFIG_EDITS =
 WPA_SUPPLICANT_CONFIG_SET =
 
 WPA_SUPPLICANT_CONFIG_ENABLE = \
+	CONFIG_IEEE80211AC	\
 	CONFIG_IEEE80211N	\
 	CONFIG_IEEE80211R	\
 	CONFIG_INTERWORKING	\
-	CONFIG_DELAYED_MIC	\
 	CONFIG_INTERNAL_LIBTOMMATH
 
 WPA_SUPPLICANT_CONFIG_DISABLE = \
-	CONFIG_DRIVER_ATMEL	\
 	CONFIG_SMARTCARD
 
 ifeq ($(BR2_PACKAGE_LIBNL),y)
 	WPA_SUPPLICANT_DEPENDENCIES += libnl
-	WPA_SUPPLICANT_CONFIG_SET += CONFIG_LIBNL32
+	WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_LIBNL32
 else
 	WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_DRIVER_NL80211
 endif
 
+# Trailing underscore on purpose to not enable CONFIG_EAPOL_TEST
 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_EAP),y)
-	WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_EAP_AKA		\
-					CONFIG_EAP_FAST		\
-					CONFIG_EAP_GPSK 	\
-					CONFIG_EAP_IKEV2	\
-					CONFIG_EAP_PAX		\
-					CONFIG_EAP_PSK		\
-					CONFIG_EAP_SAKE		\
-					CONFIG_EAP_SIM		\
-					CONFIG_EAP_TNC
+	WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_EAP_
 else
 	WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_EAP
 endif
 
 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT),y)
-	WPA_SUPPLICANT_CONFIG_SET += CONFIG_AP
+	WPA_SUPPLICANT_CONFIG_ENABLE += \
+		CONFIG_AP \
+		CONFIG_P2P
 endif
 
 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WPS),y)
 	WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_WPS
+	WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_WPS_NFC
 endif
 
 # Try to use openssl if it's already available
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 	WPA_SUPPLICANT_DEPENDENCIES += openssl
 	WPA_SUPPLICANT_CONFIG_EDITS += 's/\#\(CONFIG_TLS=openssl\)/\1/'
-	WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_EAP_PWD
 else
+	WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_EAP_PWD
 	WPA_SUPPLICANT_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/'
 endif
 
Signature · 1 line
1.8.3.2
#2 lore raw

PATCH 3/3 hostapd: rework .config and bump to version 2.1

In reply to Gustavo Zacarias

Rework .config file editing as was done for wpa_supplicant and bump to version 2.1 which includes 802.11ac and ACS support.

---
 package/hostapd/hostapd.mk | 92 +++++++++++++++++++---------------------------
 1 file changed, 37 insertions(+), 55 deletions(-)
package/hostapd/hostapd.mk +37 -55
index 0fbd8bc..37de60d 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-HOSTAPD_VERSION = 2.0
+HOSTAPD_VERSION = 2.1
 HOSTAPD_SITE = http://hostap.epitest.fi/releases
 HOSTAPD_SUBDIR = hostapd
 HOSTAPD_CONFIG = $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/.config
@@ -12,6 +12,22 @@ HOSTAPD_DEPENDENCIES = libnl
 HOSTAPD_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/
 HOSTAPD_LICENSE = GPLv2/BSD-3c
 HOSTAPD_LICENSE_FILES = README
+HOSTAPD_CONFIG_SET =
+
+HOSTAPD_CONFIG_ENABLE = \
+	CONFIG_ACS \
+	CONFIG_FULL_DYNAMIC_VLAN \
+	CONFIG_HS20 \
+	CONFIG_IEEE80211AC \
+	CONFIG_IEEE80211N \
+	CONFIG_IEEE80211R \
+	CONFIG_IEEE80211W \
+	CONFIG_INTERNAL_LIBTOMMATH \
+	CONFIG_INTERWORKING \
+	CONFIG_LIBNL32 \
+	CONFIG_VLAN_NETLINK
+
+HOSTAPD_CONFIG_DISABLE =
 
 # libnl-3 needs -lm (for rint) and -lpthread if linking statically
 # And library order matters hence stick -lnl-3 first since it's appended
@@ -20,76 +36,42 @@ ifeq ($(BR2_PREFER_STATIC_LIB),y)
 HOSTAPD_LIBS += -lnl-3 -lm -lpthread
 endif
 
-define HOSTAPD_LIBNL_CONFIG
-	echo 'CONFIG_LIBNL32=y' >>$(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_VLAN_NETLINK.*\)/\2/' $(HOSTAPD_CONFIG)
-endef
-
-define HOSTAPD_LIBTOMMATH_CONFIG
-	$(SED) 's/\(#\)\(CONFIG_INTERNAL_LIBTOMMATH.*\)/\2/' $(HOSTAPD_CONFIG)
-endef
+ifeq ($(BR2_INET_IPV6),)
+	HOSTAPD_CONFIG_DISABLE += CONFIG_IPV6
+endif
 
 # Try to use openssl if it's already available
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 	HOSTAPD_DEPENDENCIES += openssl
-define HOSTAPD_TLS_CONFIG
-	$(SED) 's/\(#\)\(CONFIG_TLS=openssl\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_EAP_PWD.*\)/\2/' $(HOSTAPD_CONFIG)
-endef
+	HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=openssl\)/\1/'
 else
-define HOSTAPD_TLS_CONFIG
-	$(SED) 's/\(#\)\(CONFIG_TLS=\).*/\2internal/' $(HOSTAPD_CONFIG)
-endef
+	HOSTAPD_CONFIG_DISABLE += CONFIG_EAP_PWD
+	HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/'
 endif
 
 ifeq ($(BR2_PACKAGE_HOSTAPD_EAP),y)
-define HOSTAPD_EAP_CONFIG
-	$(SED) 's/\(#\)\(CONFIG_EAP_AKA.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_EAP_FAST.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_EAP_GPSK.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_EAP_IKEV2.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_EAP_PAX.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_EAP_PSK.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_EAP_SAKE.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_EAP_SIM.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_EAP_TNC.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_RADIUS_SERVER.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_TLSV1.*\)/\2/' $(HOSTAPD_CONFIG)
-endef
-ifneq ($(BR2_INET_IPV6),y)
-define HOSTAPD_RADIUS_IPV6_CONFIG
-	$(SED) 's/\(CONFIG_IPV6.*\)/#\1/' $(HOSTAPD_CONFIG)
-endef
-endif
+	HOSTAPD_CONFIG_ENABLE += \
+		CONFIG_EAP \
+		CONFIG_RADIUS_SERVER \
+		CONFIG_TLSV1
 else
-define HOSTAPD_EAP_CONFIG
-	$(SED) 's/^\(CONFIG_EAP.*\)/#\1/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_NO_ACCOUNTING.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_NO_RADIUS.*\)/\2/' $(HOSTAPD_CONFIG)
-endef
+	HOSTAPD_CONFIG_DISABLE += CONFIG_EAP
+	HOSTAPD_CONFIG_ENABLE += \
+		CONFIG_NO_ACCOUNTING \
+		CONFIG_NO_RADIUS
 endif
 
 ifeq ($(BR2_PACKAGE_HOSTAPD_WPS),y)
-define HOSTAPD_WPS_CONFIG
-	$(SED) 's/\(#\)\(CONFIG_WPS.*\)/\2/' $(HOSTAPD_CONFIG)
-endef
+	HOSTAPD_CONFIG_ENABLE += CONFIG_WPS
 endif
 
 define HOSTAPD_CONFIGURE_CMDS
 	cp $(@D)/hostapd/defconfig $(HOSTAPD_CONFIG)
-# Misc
-	$(SED) 's/\(#\)\(CONFIG_HS20.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_IEEE80211N.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_IEEE80211R.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_IEEE80211W.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_INTERWORKING.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(SED) 's/\(#\)\(CONFIG_FULL_DYNAMIC_VLAN.*\)/\2/' $(HOSTAPD_CONFIG)
-	$(HOSTAPD_LIBTOMMATH_CONFIG)
-	$(HOSTAPD_TLS_CONFIG)
-	$(HOSTAPD_RADIUS_IPV6_CONFIG)
-	$(HOSTAPD_EAP_CONFIG)
-	$(HOSTAPD_WPS_CONFIG)
-	$(HOSTAPD_LIBNL_CONFIG)
+	sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(HOSTAPD_CONFIG_ENABLE)) \
+		$(patsubst %,-e 's/^\(%\)/#\1/',$(HOSTAPD_CONFIG_DISABLE)) \
+		$(patsubst %,-e '1i%=y',$(HOSTAPD_CONFIG_SET)) \
+		$(patsubst %,-e %,$(HOSTAPD_CONFIG_EDITS)) \
+		$(HOSTAPD_CONFIG)
 endef
 
 define HOSTAPD_BUILD_CMDS
Signature · 1 line
1.8.3.2
#3 lore raw

PATCH 1/3 wpa_supplicant: modify .config rework order

In reply to Gustavo Zacarias

Dear Gustavo Zacarias,

Quoted 9 lines · Gustavo Zacarias

Switch to first enable and then disable.
Otherwise a wildcard enable can't have a single option disabled which is far more usual than the opposite (and required for a simple bump to version 2.1).

---
 package/wpa_supplicant/wpa_supplicant.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied the three patches of this series.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com