diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-01-23 08:28:26 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-01-23 08:28:26 +0000 |
commit | 64268c716596edbad395cfa82ff30eb84a2f8488 (patch) | |
tree | 04d424eaeac0deea69260e5390f3d5972908c9ec /package/wpa_supplicant | |
parent | 26c953db2072dcc03e36c43446d237df83770270 (diff) | |
download | mtk-20170518-64268c716596edbad395cfa82ff30eb84a2f8488.zip mtk-20170518-64268c716596edbad395cfa82ff30eb84a2f8488.tar.gz mtk-20170518-64268c716596edbad395cfa82ff30eb84a2f8488.tar.bz2 |
hostapd: add a build variant for wpa_supplicant and one for a multicall hostapd+supplicant program (wpad) and remove the old wpa_supplicant package
SVN-Revision: 19286
Diffstat (limited to 'package/wpa_supplicant')
-rw-r--r-- | package/wpa_supplicant/Config.in | 21 | ||||
-rw-r--r-- | package/wpa_supplicant/Makefile | 94 | ||||
-rw-r--r-- | package/wpa_supplicant/config | 382 | ||||
-rw-r--r-- | package/wpa_supplicant/files/config.brcm-2.4 | 382 | ||||
l--------- | package/wpa_supplicant/files/config.brcm47xx | 1 | ||||
l--------- | package/wpa_supplicant/files/config.brcm63xx | 1 | ||||
-rw-r--r-- | package/wpa_supplicant/files/wpa_supplicant.sh | 116 | ||||
-rw-r--r-- | package/wpa_supplicant/patches/100-timestamp_check.patch | 15 | ||||
-rw-r--r-- | package/wpa_supplicant/patches/110-roaming.patch | 46 | ||||
-rw-r--r-- | package/wpa_supplicant/patches/120-ssid_scan.patch | 41 | ||||
-rw-r--r-- | package/wpa_supplicant/patches/130-scanning.patch | 175 | ||||
-rw-r--r-- | package/wpa_supplicant/patches/140-quality.patch | 33 | ||||
-rw-r--r-- | package/wpa_supplicant/patches/150-Remove-PS3-gelic-legacy-wpa-support.patch | 251 |
13 files changed, 0 insertions, 1558 deletions
diff --git a/package/wpa_supplicant/Config.in b/package/wpa_supplicant/Config.in deleted file mode 100644 index 10b8a43..0000000 --- a/package/wpa_supplicant/Config.in +++ /dev/null @@ -1,21 +0,0 @@ -# wpa_supplicant config -config WPA_SUPPLICANT_NO_TIMESTAMP_CHECK - bool "Disable timestamp check" - depends PACKAGE_wpa-supplicant - default n - help - This disables the timestamp check for certificates in wpa_supplicant - Useful for devices without RTC that cannot reliably get the real date/time -choice - prompt "Choose TLS provider" - default WPA_SUPPLICANT_INTERNAL - depends PACKAGE_wpa-supplicant - -config WPA_SUPPLICANT_INTERNAL - bool "internal" - -config WPA_SUPPLICANT_OPENSSL - bool "openssl" - select PACKAGE_libopenssl - -endchoice diff --git a/package/wpa_supplicant/Makefile b/package/wpa_supplicant/Makefile deleted file mode 100644 index 39c66e7..0000000 --- a/package/wpa_supplicant/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -# -# Copyright (C) 2008-2009 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wpa_supplicant -PKG_VERSION:=0.6.9 -PKG_RELEASE:=2 -PKG_MD5SUM:=0efb8fcedf0a8acf6f423dfdb0658fdd - -PKG_SOURCE_URL:=http://hostap.epitest.fi/releases -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz - -PKG_BUILD_DEPENDS:= \ - PACKAGE_kmod-madwifi:madwifi \ - -PKG_CONFIG_DEPENDS:= \ - CONFIG_PACKAGE_kmod-madwifi \ - CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK \ - -include $(INCLUDE_DIR)/package.mk - -define Package/wpa-supplicant - SECTION:=net - CATEGORY:=Network - TITLE:=WPA Supplicant - DEPENDS:=$(if $(CONFIG_WPA_SUPPLICANT_OPENSSL),+libopenssl) - URL:=http://hostap.epitest.fi/wpa_supplicant/ -endef - -define Package/wpa-supplicant/Description - WPA Supplicant -endef - -define Package/wpa-supplicant/config - source "$(SOURCE)/Config.in" -endef - -define Package/wpa-cli - SECTION:=net - CATEGORY:=Network - DEPENDS:=wpa-supplicant - TITLE:=WPA Supplicant command line interface -endef - -define Package/wpa-cli/Description - WPA Supplicant control utility -endef - -CONFIG=$(firstword $(wildcard ./files/config.$(BOARD) ./files/config.$(ARCH) ./config)) -TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/madwifi $(if $(CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK),-DNO_TIMESTAMP_CHECK) - -define Build/Configure - cp $(CONFIG) $(PKG_BUILD_DIR)/wpa_supplicant/.config - [ -f $(STAMP_CONFIGURED) ] || $(MAKE) -C $(PKG_BUILD_DIR)/wpa_supplicant clean - rm -f $(PKG_BUILD_DIR)/.configured* - $(if $(CONFIG_PACKAGE_kmod-madwifi),,$(SED) 's,^CONFIG_DRIVER_MADWIFI,#CONFIG_DRIVER_MADWIFI,g' $(PKG_BUILD_DIR)/wpa_supplicant/.config) - $(if $(CONFIG_PACKAGE_kmod-hostap),,$(SED) 's,^CONFIG_DRIVER_HOSTAP,#CONFIG_DRIVER_HOSTAP,g' $(PKG_BUILD_DIR)/wpa_supplicant/.config) - $(if $(CONFIG_WPA_SUPPLICANT_OPENSSL),$(SED) 's|^CONFIG_TLS.*|CONFIG_TLS=openssl|g' $(PKG_BUILD_DIR)/wpa_supplicant/.config) -endef - -define Build/Compile - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - CFLAGS="$(TARGET_CFLAGS)" \ - $(MAKE) -C $(PKG_BUILD_DIR)/wpa_supplicant \ - CC="$(TARGET_CC)" \ - KERNEL=$(LINUX_DIR) \ - CPPFLAGS="$(TARGET_CPPFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - all -endef - -define Package/wpa-supplicant/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) \ - $(PKG_BUILD_DIR)/wpa_supplicant/wpa_supplicant \ - $(PKG_BUILD_DIR)/wpa_supplicant/wpa_passphrase \ - $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/lib/wifi - $(INSTALL_DATA) ./files/wpa_supplicant.sh $(1)/lib/wifi/wpa_supplicant.sh -endef - -define Package/wpa-cli/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/wpa_supplicant/wpa_cli $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,wpa-supplicant)) -$(eval $(call BuildPackage,wpa-cli)) diff --git a/package/wpa_supplicant/config b/package/wpa_supplicant/config deleted file mode 100644 index 3ca1cfa..0000000 --- a/package/wpa_supplicant/config +++ /dev/null @@ -1,382 +0,0 @@ -# Example wpa_supplicant build time configuration -# -# This file lists the configuration options that are used when building the -# hostapd binary. All lines starting with # are ignored. Configuration option -# lines must be commented out complete, if they are not to be included, i.e., -# just setting VARIABLE=n is not disabling that variable. -# -# This file is included in Makefile, so variables like CFLAGS and LIBS can also -# be modified from here. In most cases, these lines should use += in order not -# to override previous values of the variables. - - -# Uncomment following two lines and fix the paths if you have installed OpenSSL -# or GnuTLS in non-default location -#CFLAGS += -I/usr/local/openssl/include -#LIBS += -L/usr/local/openssl/lib - -# Some Red Hat versions seem to include kerberos header files from OpenSSL, but -# the kerberos files are not in the default include path. Following line can be -# used to fix build issues on such systems (krb5.h not found). -#CFLAGS += -I/usr/include/kerberos - -# Example configuration for various cross-compilation platforms - -#### sveasoft (e.g., for Linksys WRT54G) ###################################### -#CC=mipsel-uclibc-gcc -#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc -#CFLAGS += -Os -#CPPFLAGS += -I../src/include -I../../src/router/openssl/include -#LIBS += -L/opt/brcm/hndtools-mipsel-uclibc-0.9.19/lib -lssl -############################################################################### - -#### openwrt (e.g., for Linksys WRT54G) ####################################### -#CC=mipsel-uclibc-gcc -#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc -#CFLAGS += -Os -#CPPFLAGS=-I../src/include -I../openssl-0.9.7d/include \ -# -I../WRT54GS/release/src/include -#LIBS = -lssl -############################################################################### - - -# Driver interface for Host AP driver -CONFIG_DRIVER_HOSTAP=y - -# Driver interface for Agere driver -#CONFIG_DRIVER_HERMES=y -# Change include directories to match with the local setup -#CFLAGS += -I../../hcf -I../../include -I../../include/hcf -#CFLAGS += -I../../include/wireless - -# Driver interface for madwifi driver -CONFIG_DRIVER_MADWIFI=y -# Set include directory to the madwifi source tree -#CFLAGS += -I../../madwifi - -# Driver interface for Prism54 driver -# (Note: Prism54 is not yet supported, i.e., this will not work as-is and is -# for developers only) -#CONFIG_DRIVER_PRISM54=y - -# Driver interface for ndiswrapper -#CONFIG_DRIVER_NDISWRAPPER=y - -# Driver interface for Atmel driver -#CONFIG_DRIVER_ATMEL=y - -# Driver interface for old Broadcom driver -# Please note that the newer Broadcom driver ("hybrid Linux driver") supports -# Linux wireless extensions and does not need (or even work) with the old -# driver wrapper. Use CONFIG_DRIVER_WEXT=y with that driver. -#CONFIG_DRIVER_BROADCOM=y -# Example path for wlioctl.h; change to match your configuration -#CFLAGS += -I/opt/WRT54GS/release/src/include - -# Driver interface for Intel ipw2100/2200 driver -#CONFIG_DRIVER_IPW=y - -# Driver interface for Ralink driver -#CONFIG_DRIVER_RALINK=y - -# Driver interface for generic Linux wireless extensions -CONFIG_DRIVER_WEXT=y - -# Driver interface for Linux drivers using the nl80211 kernel interface -#CONFIG_DRIVER_NL80211=y - -# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) -#CONFIG_DRIVER_BSD=y -#CFLAGS += -I/usr/local/include -#LIBS += -L/usr/local/lib - -# Driver interface for Windows NDIS -#CONFIG_DRIVER_NDIS=y -#CFLAGS += -I/usr/include/w32api/ddk -#LIBS += -L/usr/local/lib -# For native build using mingw -#CONFIG_NATIVE_WINDOWS=y -# Additional directories for cross-compilation on Linux host for mingw target -#CFLAGS += -I/opt/mingw/mingw32/include/ddk -#LIBS += -L/opt/mingw/mingw32/lib -#CC=mingw32-gcc -# By default, driver_ndis uses WinPcap for low-level operations. This can be -# replaced with the following option which replaces WinPcap calls with NDISUIO. -# However, this requires that WZC is disabled (net stop wzcsvc) before starting -# wpa_supplicant. -# CONFIG_USE_NDISUIO=y - -# Driver interface for development testing -#CONFIG_DRIVER_TEST=y - -# Driver interface for wired Ethernet drivers -CONFIG_DRIVER_WIRED=y - -# Driver interface for the Broadcom RoboSwitch family -#CONFIG_DRIVER_ROBOSWITCH=y - -# Enable IEEE 802.1X Supplicant (automatically included if any EAP method is -# included) -CONFIG_IEEE8021X_EAPOL=y - -# EAP-MD5 -CONFIG_EAP_MD5=y - -# EAP-MSCHAPv2 -CONFIG_EAP_MSCHAPV2=y - -# EAP-TLS -CONFIG_EAP_TLS=y - -# EAL-PEAP -CONFIG_EAP_PEAP=y - -# EAP-TTLS -CONFIG_EAP_TTLS=y - -# EAP-FAST -# Note: Default OpenSSL package does not include support for all the -# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL, -# the OpenSSL library must be patched (openssl-0.9.8d-tls-extensions.patch) -# to add the needed functions. -#CONFIG_EAP_FAST=y - -# EAP-GTC -CONFIG_EAP_GTC=y - -# EAP-OTP -#CONFIG_EAP_OTP=y - -# EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used) -#CONFIG_EAP_SIM=y - -# EAP-PSK (experimental; this is _not_ needed for WPA-PSK) -#CONFIG_EAP_PSK=y - -# EAP-PAX -#CONFIG_EAP_PAX=y - -# LEAP -CONFIG_EAP_LEAP=y - -# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used) -#CONFIG_EAP_AKA=y - -# EAP-AKA' (enable CONFIG_PCSC, if EAP-AKA' is used). -# This requires CONFIG_EAP_AKA to be enabled, too. -#CONFIG_EAP_AKA_PRIME=y - -# Enable USIM simulator (Milenage) for EAP-AKA -#CONFIG_USIM_SIMULATOR=y - -# EAP-SAKE -#CONFIG_EAP_SAKE=y - -# EAP-GPSK -#CONFIG_EAP_GPSK=y -# Include support for optional SHA256 cipher suite in EAP-GPSK -#CONFIG_EAP_GPSK_SHA256=y - -# EAP-TNC and related Trusted Network Connect support (experimental) -#CONFIG_EAP_TNC=y - -# Wi-Fi Protected Setup (WPS) -#CONFIG_WPS=y - -# EAP-IKEv2 -#CONFIG_EAP_IKEV2=y - -# PKCS#12 (PFX) support (used to read private key and certificate file from -# a file that usually has extension .p12 or .pfx) -CONFIG_PKCS12=y - -# Smartcard support (i.e., private key on a smartcard), e.g., with openssl -# engine. -#CONFIG_SMARTCARD=y - -# PC/SC interface for smartcards (USIM, GSM SIM) -# Enable this if EAP-SIM or EAP-AKA is included -#CONFIG_PCSC=y - -# Development testing -#CONFIG_EAPOL_TEST=y - -# Select control interface backend for external programs, e.g, wpa_cli: -# unix = UNIX domain sockets (default for Linux/*BSD) -# udp = UDP sockets using localhost (127.0.0.1) -# named_pipe = Windows Named Pipe (default for Windows) -# y = use default (backwards compatibility) -# If this option is commented out, control interface is not included in the -# build. -CONFIG_CTRL_IFACE=y - -# Include support for GNU Readline and History Libraries in wpa_cli. -# When building a wpa_cli binary for distribution, please note that these -# libraries are licensed under GPL and as such, BSD license may not apply for -# the resulting binary. -#CONFIG_READLINE=y - -# Remove debugging code that is printing out debug message to stdout. -# This can be used to reduce the size of the wpa_supplicant considerably -# if debugging code is not needed. The size reduction can be around 35% -# (e.g., 90 kB). -#CONFIG_NO_STDOUT_DEBUG=y - -# Remove WPA support, e.g., for wired-only IEEE 802.1X supplicant, to save -# 35-50 kB in code size. -#CONFIG_NO_WPA=y - -# Remove WPA2 support. This allows WPA to be used, but removes WPA2 code to -# save about 1 kB in code size when building only WPA-Personal (no EAP support) -# or 6 kB if building for WPA-Enterprise. -#CONFIG_NO_WPA2=y - -# Remove IEEE 802.11i/WPA-Personal ASCII passphrase support -# This option can be used to reduce code size by removing support for -# converting ASCII passphrases into PSK. If this functionality is removed, the -# PSK can only be configured as the 64-octet hexstring (e.g., from -# wpa_passphrase). This saves about 0.5 kB in code size. -#CONFIG_NO_WPA_PASSPHRASE=y - -# Remove AES extra functions. This can be used to reduce code size by about -# 1.5 kB by removing extra AES modes that are not needed for commonly used -# client configurations (they are needed for some EAP types). -#CONFIG_NO_AES_EXTRAS=y - -# Disable scan result processing (ap_mode=1) to save code size by about 1 kB. -# This can be used if ap_scan=1 mode is never enabled. -#CONFIG_NO_SCAN_PROCESSING=y - -# Select configuration backend: -# file = text file (e.g., wpa_supplicant.conf; note: the configuration file -# path is given on command line, not here; this option is just used to -# select the backend that allows configuration files to be used) -# winreg = Windows registry (see win_example.reg for an example) -CONFIG_BACKEND=file - -# Remove configuration write functionality (i.e., to allow the configuration -# file to be updated based on runtime configuration changes). The runtime -# configuration can still be changed, the changes are just not going to be -# persistent over restarts. This option can be used to reduce code size by -# about 3.5 kB. -CONFIG_NO_CONFIG_WRITE=y - -# Remove support for configuration blobs to reduce code size by about 1.5 kB. -#CONFIG_NO_CONFIG_BLOBS=y - -# Select program entry point implementation: -# main = UNIX/POSIX like main() function (default) -# main_winsvc = Windows service (read parameters from registry) -# main_none = Very basic example (development use only) -CONFIG_MAIN=main - -# Select wrapper for operatins system and C library specific functions -# unix = UNIX/POSIX like systems (default) -# win32 = Windows systems -# none = Empty template -CONFIG_OS=unix - -# Select event loop implementation -# eloop = select() loop (default) -# eloop_win = Windows events and WaitForMultipleObject() loop -# eloop_none = Empty template -CONFIG_ELOOP=eloop - -# Select layer 2 packet implementation -# linux = Linux packet socket (default) -# pcap = libpcap/libdnet/WinPcap -# freebsd = FreeBSD libpcap -# winpcap = WinPcap with receive thread -# ndis = Windows NDISUIO (note: requires CONFIG_USE_NDISUIO=y) -# none = Empty template -CONFIG_L2_PACKET=linux - -# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) -CONFIG_PEERKEY=y - -# IEEE 802.11w (management frame protection) -# This version is an experimental implementation based on IEEE 802.11w/D1.0 -# draft and is subject to change since the standard has not yet been finalized. -# Driver support is also needed for IEEE 802.11w. -#CONFIG_IEEE80211W=y - -# Select TLS implementation -# openssl = OpenSSL (default) -# gnutls = GnuTLS (needed for TLS/IA, see also CONFIG_GNUTLS_EXTRA) -# internal = Internal TLSv1 implementation (experimental) -# none = Empty template -CONFIG_TLS=internal - -# Whether to enable TLS/IA support, which is required for EAP-TTLSv1. -# You need CONFIG_TLS=gnutls for this to have any effect. Please note that -# even though the core GnuTLS library is released under LGPL, this extra -# library uses GPL and as such, the terms of GPL apply to the combination -# of wpa_supplicant and GnuTLS if this option is enabled. BSD license may not -# apply for distribution of the resulting binary. -#CONFIG_GNUTLS_EXTRA=y - -# If CONFIG_TLS=internal is used, additional library and include paths are -# needed for LibTomMath. Alternatively, an integrated, minimal version of -# LibTomMath can be used. See beginning of libtommath.c for details on benefits -# and drawbacks of this option. -CONFIG_INTERNAL_LIBTOMMATH=y -#ifndef CONFIG_INTERNAL_LIBTOMMATH -#LTM_PATH=/usr/src/libtommath-0.39 -#CFLAGS += -I$(LTM_PATH) -#LIBS += -L$(LTM_PATH) -#LIBS_p += -L$(LTM_PATH) -#endif -# At the cost of about 4 kB of additional binary size, the internal LibTomMath -# can be configured to include faster routines for exptmod, sqr, and div to -# speed up DH and RSA calculation considerably -#CONFIG_INTERNAL_LIBTOMMATH_FAST=y - -# Include NDIS event processing through WMI into wpa_supplicant/wpasvc. -# This is only for Windows builds and requires WMI-related header files and -# WbemUuid.Lib from Platform SDK even when building with MinGW. -#CONFIG_NDIS_EVENTS_INTEGRATED=y -#PLATFORMSDKLIB="/opt/Program Files/Microsoft Platform SDK/Lib" - -# Add support for DBus control interface -#CONFIG_CTRL_IFACE_DBUS=y - -# Add support for loading EAP methods dynamically as shared libraries. -# When this option is enabled, each EAP method can be either included -# statically (CONFIG_EAP_<method>=y) or dynamically (CONFIG_EAP_<method>=dyn). -# Dynamic EAP methods are build as shared objects (eap_*.so) and they need to -# be loaded in the beginning of the wpa_supplicant configuration file -# (see load_dynamic_eap parameter in the example file) before being used in -# the network blocks. -# -# Note that some shared parts of EAP methods are included in the main program -# and in order to be able to use dynamic EAP methods using these parts, the -# main program must have been build with the EAP method enabled (=y or =dyn). -# This means that EAP-TLS/PEAP/TTLS/FAST cannot be added as dynamic libraries -# unless at least one of them was included in the main build to force inclusion -# of the shared code. Similarly, at least one of EAP-SIM/AKA must be included -# in the main build to be able to load these methods dynamically. -# -# Please also note that using dynamic libraries will increase the total binary -# size. Thus, it may not be the best option for targets that have limited -# amount of memory/flash. -#CONFIG_DYNAMIC_EAP_METHODS=y - -# Include client MLME (management frame processing). -# This can be used to move MLME processing of Linux mac80211 stack into user -# space. Please note that this is currently only available with -# driver_nl80211.c and only with a modified version of Linux kernel and -# wpa_supplicant. -#CONFIG_CLIENT_MLME=y - -# IEEE Std 802.11r-2008 (Fast BSS Transition) -#CONFIG_IEEE80211R=y - -# Add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt) -CONFIG_DEBUG_FILE=y - -# Enable privilege separation (see README 'Privilege separation' for details) -#CONFIG_PRIVSEP=y - -# Enable mitigation against certain attacks against TKIP by delaying Michael -# MIC error reports by a random amount of time between 0 and 60 seconds -#CONFIG_DELAYED_MIC_ERROR_REPORT=y diff --git a/package/wpa_supplicant/files/config.brcm-2.4 b/package/wpa_supplicant/files/config.brcm-2.4 deleted file mode 100644 index 0e58fa0..0000000 --- a/package/wpa_supplicant/files/config.brcm-2.4 +++ /dev/null @@ -1,382 +0,0 @@ -# Example wpa_supplicant build time configuration -# -# This file lists the configuration options that are used when building the -# hostapd binary. All lines starting with # are ignored. Configuration option -# lines must be commented out complete, if they are not to be included, i.e., -# just setting VARIABLE=n is not disabling that variable. -# -# This file is included in Makefile, so variables like CFLAGS and LIBS can also -# be modified from here. In most cases, these lines should use += in order not -# to override previous values of the variables. - - -# Uncomment following two lines and fix the paths if you have installed OpenSSL -# or GnuTLS in non-default location -#CFLAGS += -I/usr/local/openssl/include -#LIBS += -L/usr/local/openssl/lib - -# Some Red Hat versions seem to include kerberos header files from OpenSSL, but -# the kerberos files are not in the default include path. Following line can be -# used to fix build issues on such systems (krb5.h not found). -#CFLAGS += -I/usr/include/kerberos - -# Example configuration for various cross-compilation platforms - -#### sveasoft (e.g., for Linksys WRT54G) ###################################### -#CC=mipsel-uclibc-gcc -#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc -#CFLAGS += -Os -#CPPFLAGS += -I../src/include -I../../src/router/openssl/include -#LIBS += -L/opt/brcm/hndtools-mipsel-uclibc-0.9.19/lib -lssl -############################################################################### - -#### openwrt (e.g., for Linksys WRT54G) ####################################### -#CC=mipsel-uclibc-gcc -#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc -#CFLAGS += -Os -#CPPFLAGS=-I../src/include -I../openssl-0.9.7d/include \ -# -I../WRT54GS/release/src/include -#LIBS = -lssl -############################################################################### - - -# Driver interface for Host AP driver -CONFIG_DRIVER_HOSTAP=y - -# Driver interface for Agere driver -#CONFIG_DRIVER_HERMES=y -# Change include directories to match with the local setup -#CFLAGS += -I../../hcf -I../../include -I../../include/hcf -#CFLAGS += -I../../include/wireless - -# Driver interface for madwifi driver -CONFIG_DRIVER_MADWIFI=y -# Set include directory to the madwifi source tree -#CFLAGS += -I../../madwifi - -# Driver interface for Prism54 driver -# (Note: Prism54 is not yet supported, i.e., this will not work as-is and is -# for developers only) -#CONFIG_DRIVER_PRISM54=y - -# Driver interface for ndiswrapper -#CONFIG_DRIVER_NDISWRAPPER=y - -# Driver interface for Atmel driver -#CONFIG_DRIVER_ATMEL=y - -# Driver interface for old Broadcom driver -# Please note that the newer Broadcom driver ("hybrid Linux driver") supports -# Linux wireless extensions and does not need (or even work) with the old -# driver wrapper. Use CONFIG_DRIVER_WEXT=y with that driver. -#CONFIG_DRIVER_BROADCOM=y -# Example path for wlioctl.h; change to match your configuration -#CFLAGS += -I/opt/WRT54GS/release/src/include - -# Driver interface for Intel ipw2100/2200 driver -#CONFIG_DRIVER_IPW=y - -# Driver interface for Ralink driver -#CONFIG_DRIVER_RALINK=y - -# Driver interface for generic Linux wireless extensions -CONFIG_DRIVER_WEXT=y - -# Driver interface for Linux drivers using the nl80211 kernel interface -#CONFIG_DRIVER_NL80211=y - -# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) -#CONFIG_DRIVER_BSD=y -#CFLAGS += -I/usr/local/include -#LIBS += -L/usr/local/lib - -# Driver interface for Windows NDIS -#CONFIG_DRIVER_NDIS=y -#CFLAGS += -I/usr/include/w32api/ddk -#LIBS += -L/usr/local/lib -# For native build using mingw -#CONFIG_NATIVE_WINDOWS=y -# Additional directories for cross-compilation on Linux host for mingw target -#CFLAGS += -I/opt/mingw/mingw32/include/ddk -#LIBS += -L/opt/mingw/mingw32/lib -#CC=mingw32-gcc -# By default, driver_ndis uses WinPcap for low-level operations. This can be -# replaced with the following option which replaces WinPcap calls with NDISUIO. -# However, this requires that WZC is disabled (net stop wzcsvc) before starting -# wpa_supplicant. -# CONFIG_USE_NDISUIO=y - -# Driver interface for development testing -#CONFIG_DRIVER_TEST=y - -# Driver interface for wired Ethernet drivers -CONFIG_DRIVER_WIRED=y - -# Driver interface for the Broadcom RoboSwitch family -CONFIG_DRIVER_ROBOSWITCH=y - -# Enable IEEE 802.1X Supplicant (automatically included if any EAP method is -# included) -CONFIG_IEEE8021X_EAPOL=y - -# EAP-MD5 -CONFIG_EAP_MD5=y - -# EAP-MSCHAPv2 -CONFIG_EAP_MSCHAPV2=y - -# EAP-TLS -CONFIG_EAP_TLS=y - -# EAL-PEAP -CONFIG_EAP_PEAP=y - -# EAP-TTLS -CONFIG_EAP_TTLS=y - -# EAP-FAST -# Note: Default OpenSSL package does not include support for all the -# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL, -# the OpenSSL library must be patched (openssl-0.9.8d-tls-extensions.patch) -# to add the needed functions. -#CONFIG_EAP_FAST=y - -# EAP-GTC -CONFIG_EAP_GTC=y - -# EAP-OTP -#CONFIG_EAP_OTP=y - -# EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used) -#CONFIG_EAP_SIM=y - -# EAP-PSK (experimental; this is _not_ needed for WPA-PSK) -#CONFIG_EAP_PSK=y - -# EAP-PAX -#CONFIG_EAP_PAX=y - -# LEAP -CONFIG_EAP_LEAP=y - -# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used) -#CONFIG_EAP_AKA=y - -# EAP-AKA' (enable CONFIG_PCSC, if EAP-AKA' is used). -# This requires CONFIG_EAP_AKA to be enabled, too. -#CONFIG_EAP_AKA_PRIME=y - -# Enable USIM simulator (Milenage) for EAP-AKA -#CONFIG_USIM_SIMULATOR=y - -# EAP-SAKE -#CONFIG_EAP_SAKE=y - -# EAP-GPSK -#CONFIG_EAP_GPSK=y -# Include support for optional SHA256 cipher suite in EAP-GPSK -#CONFIG_EAP_GPSK_SHA256=y - -# EAP-TNC and related Trusted Network Connect support (experimental) -#CONFIG_EAP_TNC=y - -# Wi-Fi Protected Setup (WPS) -#CONFIG_WPS=y - -# EAP-IKEv2 -#CONFIG_EAP_IKEV2=y - -# PKCS#12 (PFX) support (used to read private key and certificate file from -# a file that usually has extension .p12 or .pfx) -CONFIG_PKCS12=y - -# Smartcard support (i.e., private key on a smartcard), e.g., with openssl -# engine. -#CONFIG_SMARTCARD=y - -# PC/SC interface for smartcards (USIM, GSM SIM) -# Enable this if EAP-SIM or EAP-AKA is included -#CONFIG_PCSC=y - -# Development testing -#CONFIG_EAPOL_TEST=y - -# Select control interface backend for external programs, e.g, wpa_cli: -# unix = UNIX domain sockets (default for Linux/*BSD) -# udp = UDP sockets using localhost (127.0.0.1) -# named_pipe = Windows Named Pipe (default for Windows) -# y = use default (backwards compatibility) -# If this option is commented out, control interface is not included in the -# build. -CONFIG_CTRL_IFACE=y - -# Include support for GNU Readline and History Libraries in wpa_cli. -# When building a wpa_cli binary for distribution, please note that these -# libraries are licensed under GPL and as such, BSD license may not apply for -# the resulting binary. -#CONFIG_READLINE=y - -# Remove debugging code that is printing out debug message to stdout. -# This can be used to reduce the size of the wpa_supplicant considerably -# if debugging code is not needed. The size reduction can be around 35% -# (e.g., 90 kB). -#CONFIG_NO_STDOUT_DEBUG=y - -# Remove WPA support, e.g., for wired-only IEEE 802.1X supplicant, to save -# 35-50 kB in code size. -#CONFIG_NO_WPA=y - -# Remove WPA2 support. This allows WPA to be used, but removes WPA2 code to -# save about 1 kB in code size when building only WPA-Personal (no EAP support) -# or 6 kB if building for WPA-Enterprise. -#CONFIG_NO_WPA2=y - -# Remove IEEE 802.11i/WPA-Personal ASCII passphrase support -# This option can be used to reduce code size by removing support for -# converting ASCII passphrases into PSK. If this functionality is removed, the -# PSK can only be configured as the 64-octet hexstring (e.g., from -# wpa_passphrase). This saves about 0.5 kB in code size. -#CONFIG_NO_WPA_PASSPHRASE=y - -# Remove AES extra functions. This can be used to reduce code size by about -# 1.5 kB by removing extra AES modes that are not needed for commonly used -# client configurations (they are needed for some EAP types). -#CONFIG_NO_AES_EXTRAS=y - -# Disable scan result processing (ap_mode=1) to save code size by about 1 kB. -# This can be used if ap_scan=1 mode is never enabled. -#CONFIG_NO_SCAN_PROCESSING=y - -# Select configuration backend: -# file = text file (e.g., wpa_supplicant.conf; note: the configuration file -# path is given on command line, not here; this option is just used to -# select the backend that allows configuration files to be used) -# winreg = Windows registry (see win_example.reg for an example) -CONFIG_BACKEND=file - -# Remove configuration write functionality (i.e., to allow the configuration -# file to be updated based on runtime configuration changes). The runtime -# configuration can still be changed, the changes are just not going to be -# persistent over restarts. This option can be used to reduce code size by -# about 3.5 kB. -CONFIG_NO_CONFIG_WRITE=y - -# Remove support for configuration blobs to reduce code size by about 1.5 kB. -#CONFIG_NO_CONFIG_BLOBS=y - -# Select program entry point implementation: -# main = UNIX/POSIX like main() function (default) -# main_winsvc = Windows service (read parameters from registry) -# main_none = Very basic example (development use only) -CONFIG_MAIN=main - -# Select wrapper for operatins system and C library specific functions -# unix = UNIX/POSIX like systems (default) -# win32 = Windows systems -# none = Empty template -CONFIG_OS=unix - -# Select event loop implementation -# eloop = select() loop (default) -# eloop_win = Windows events and WaitForMultipleObject() loop -# eloop_none = Empty template -CONFIG_ELOOP=eloop - -# Select layer 2 packet implementation -# linux = Linux packet socket (default) -# pcap = libpcap/libdnet/WinPcap -# freebsd = FreeBSD libpcap -# winpcap = WinPcap with receive thread -# ndis = Windows NDISUIO (note: requires CONFIG_USE_NDISUIO=y) -# none = Empty template -CONFIG_L2_PACKET=linux - -# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) -CONFIG_PEERKEY=y - -# IEEE 802.11w (management frame protection) -# This version is an experimental implementation based on IEEE 802.11w/D1.0 -# draft and is subject to change since the standard has not yet been finalized. -# Driver support is also needed for IEEE 802.11w. -#CONFIG_IEEE80211W=y - -# Select TLS implementation -# openssl = OpenSSL (default) -# gnutls = GnuTLS (needed for TLS/IA, see also CONFIG_GNUTLS_EXTRA) -# internal = Internal TLSv1 implementation (experimental) -# none = Empty template -CONFIG_TLS=internal - -# Whether to enable TLS/IA support, which is required for EAP-TTLSv1. -# You need CONFIG_TLS=gnutls for this to have any effect. Please note that -# even though the core GnuTLS library is released under LGPL, this extra -# library uses GPL and as such, the terms of GPL apply to the combination -# of wpa_supplicant and GnuTLS if this option is enabled. BSD license may not -# apply for distribution of the resulting binary. -#CONFIG_GNUTLS_EXTRA=y - -# If CONFIG_TLS=internal is used, additional library and include paths are -# needed for LibTomMath. Alternatively, an integrated, minimal version of -# LibTomMath can be used. See beginning of libtommath.c for details on benefits -# and drawbacks of this option. -CONFIG_INTERNAL_LIBTOMMATH=y -#ifndef CONFIG_INTERNAL_LIBTOMMATH -#LTM_PATH=/usr/src/libtommath-0.39 -#CFLAGS += -I$(LTM_PATH) -#LIBS += -L$(LTM_PATH) -#LIBS_p += -L$(LTM_PATH) -#endif -# At the cost of about 4 kB of additional binary size, the internal LibTomMath -# can be configured to include faster routines for exptmod, sqr, and div to -# speed up DH and RSA calculation considerably -#CONFIG_INTERNAL_LIBTOMMATH_FAST=y - -# Include NDIS event processing through WMI into wpa_supplicant/wpasvc. -# This is only for Windows builds and requires WMI-related header files and -# WbemUuid.Lib from Platform SDK even when building with MinGW. -#CONFIG_NDIS_EVENTS_INTEGRATED=y -#PLATFORMSDKLIB="/opt/Program Files/Microsoft Platform SDK/Lib" - -# Add support for DBus control interface -#CONFIG_CTRL_IFACE_DBUS=y - -# Add support for loading EAP methods dynamically as shared libraries. -# When this option is enabled, each EAP method can be either included -# statically (CONFIG_EAP_<method>=y) or dynamically (CONFIG_EAP_<method>=dyn). -# Dynamic EAP methods are build as shared objects (eap_*.so) and they need to -# be loaded in the beginning of the wpa_supplicant configuration file -# (see load_dynamic_eap parameter in the example file) before being used in -# the network blocks. -# -# Note that some shared parts of EAP methods are included in the main program -# and in order to be able to use dynamic EAP methods using these parts, the -# main program must have been build with the EAP method enabled (=y or =dyn). -# This means that EAP-TLS/PEAP/TTLS/FAST cannot be added as dynamic libraries -# unless at least one of them was included in the main build to force inclusion -# of the shared code. Similarly, at least one of EAP-SIM/AKA must be included -# in the main build to be able to load these methods dynamically. -# -# Please also note that using dynamic libraries will increase the total binary -# size. Thus, it may not be the best option for targets that have limited -# amount of memory/flash. -#CONFIG_DYNAMIC_EAP_METHODS=y - -# Include client MLME (management frame processing). -# This can be used to move MLME processing of Linux mac80211 stack into user -# space. Please note that this is currently only available with -# driver_nl80211.c and only with a modified version of Linux kernel and -# wpa_supplicant. -#CONFIG_CLIENT_MLME=y - -# IEEE Std 802.11r-2008 (Fast BSS Transition) -#CONFIG_IEEE80211R=y - -# Add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt) -CONFIG_DEBUG_FILE=y - -# Enable privilege separation (see README 'Privilege separation' for details) -#CONFIG_PRIVSEP=y - -# Enable mitigation against certain attacks against TKIP by delaying Michael -# MIC error reports by a random amount of time between 0 and 60 seconds -#CONFIG_DELAYED_MIC_ERROR_REPORT=y diff --git a/package/wpa_supplicant/files/config.brcm47xx b/package/wpa_supplicant/files/config.brcm47xx deleted file mode 120000 index c3fbf34..0000000 --- a/package/wpa_supplicant/files/config.brcm47xx +++ /dev/null @@ -1 +0,0 @@ -config.brcm-2.4
\ No newline at end of file diff --git a/package/wpa_supplicant/files/config.brcm63xx b/package/wpa_supplicant/files/config.brcm63xx deleted file mode 120000 index c3fbf34..0000000 --- a/package/wpa_supplicant/files/config.brcm63xx +++ /dev/null @@ -1 +0,0 @@ -config.brcm-2.4
\ No newline at end of file diff --git a/package/wpa_supplicant/files/wpa_supplicant.sh b/package/wpa_supplicant/files/wpa_supplicant.sh deleted file mode 100644 index ea10b38..0000000 --- a/package/wpa_supplicant/files/wpa_supplicant.sh +++ /dev/null @@ -1,116 +0,0 @@ -wpa_supplicant_setup_vif() { - local vif="$1" - local driver="$2" - local key="$key" - - # wpa_supplicant should use wext for mac80211 cards - [ "$driver" = "mac80211" ] && driver='wext' - - # make sure we have the psk - [ -n "$key" ] || { - config_get key "$vif" key - } - - case "$enc" in - *wep*) - key_mgmt='NONE' - config_get key "$vif" key - key="${key:-1}" - case "$key" in - [1234]) - for idx in 1 2 3 4; do - local zidx - zidx=$(($idx - 1)) - config_get ckey "$vif" "key${idx}" - [ -n "$ckey" ] && \ - append "wep_key${zidx}" "wep_key${zidx}=$(prepare_key_wep "$ckey")" - done - wep_tx_keyidx="wep_tx_keyidx=$((key - 1))" - ;; - *) - wep_key0="wep_key0=$(prepare_key_wep "$key")" - wep_tx_keyidx="wep_tx_keyidx=0" - ;; - esac - ;; - *psk*) - key_mgmt='WPA-PSK' - config_get_bool usepassphrase "$vif" passphrase 1 - case "$enc" in - *psk2*) - proto='proto=RSN' - if [ "$usepassphrase" = "1" ]; then - passphrase="psk=\"${key}\"" - else - passphrase="psk=${key}" - fi - ;; - *psk*) - proto='proto=WPA' - if [ "$usepassphrase" = "1" ]; then - passphrase="psk=\"${key}\"" - else - passphrase="psk=${key}" - fi - ;; - esac - ;; - *wpa*|*8021x*) - proto='proto=WPA2' - key_mgmt='WPA-EAP' - config_get ca_cert "$vif" ca_cert - ca_cert=${ca_cert:+"ca_cert=\"$ca_cert\""} - case "$eap_type" in - tls) - pairwise='pairwise=CCMP' - group='group=CCMP' - config_get priv_key "$vif" priv_key - config_get priv_key_pwd "$vif" priv_key_pwd - priv_key="private_key=\"$priv_key\"" - priv_key_pwd="private_key_passwd=\"$priv_key_pwd\"" - ;; - peap|ttls) - config_get auth "$vif" auth - config_get identity "$vif" identity - config_get password "$vif" password - phase2="phase2=\"auth=${auth:-MSCHAPV2}\"" - identity="identity=\"$identity\"" - password="password=\"$password\"" - ;; - esac - eap_type="eap=$(echo $eap_type | tr 'a-z' 'A-Z')" - ;; - esac - config_get ifname "$vif" ifname - config_get bridge "$vif" bridge - config_get ssid "$vif" ssid - config_get bssid "$vif" bssid - bssid=${bssid:+"bssid=$bssid"} - cat > /var/run/wpa_supplicant-$ifname.conf <<EOF -ctrl_interface=/var/run/wpa_supplicant-$ifname -network={ - scan_ssid=1 - ssid="$ssid" - $bssid - key_mgmt=$key_mgmt - $proto - $passphrase - $pairwise - $group - $eap_type - $ca_cert - $priv_key - $priv_key_pwd - $phase2 - $identity - $password - $wep_key0 - $wep_key1 - $wep_key2 - $wep_key3 - $wep_tx_keyidx -} -EOF - [ -z "$proto" -a "$key_mgmt" != "NONE" ] || \ - wpa_supplicant ${bridge:+ -b $bridge} -B -P "/var/run/wifi-${ifname}.pid" -D ${driver:-wext} -i "$ifname" -c /var/run/wpa_supplicant-$ifname.conf -} diff --git a/package/wpa_supplicant/patches/100-timestamp_check.patch b/package/wpa_supplicant/patches/100-timestamp_check.patch deleted file mode 100644 index 98fdbbc..0000000 --- a/package/wpa_supplicant/patches/100-timestamp_check.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/src/tls/x509v3.c -+++ b/src/tls/x509v3.c -@@ -1591,8 +1591,11 @@ int x509_certificate_chain_validate(stru - if (chain_trusted) - continue; - -- if ((unsigned long) now.sec < -+ if ( -+#ifndef NO_TIMESTAMP_CHECK -+ (unsigned long) now.sec < - (unsigned long) cert->not_before || -+#endif - (unsigned long) now.sec > - (unsigned long) cert->not_after) { - wpa_printf(MSG_INFO, "X509: Certificate not valid " diff --git a/package/wpa_supplicant/patches/110-roaming.patch b/package/wpa_supplicant/patches/110-roaming.patch deleted file mode 100644 index 077c2e5..0000000 --- a/package/wpa_supplicant/patches/110-roaming.patch +++ /dev/null @@ -1,46 +0,0 @@ -This patch decreases the timeouts for assoc/auth to more realistic values. Improves roaming speed ---- a/wpa_supplicant/events.c -+++ b/wpa_supplicant/events.c -@@ -854,7 +854,7 @@ static void wpa_supplicant_event_assoc(s - wpa_supplicant_set_state(wpa_s, WPA_COMPLETED); - } else if (!ft_completed) { - /* Timeout for receiving the first EAPOL packet */ -- wpa_supplicant_req_auth_timeout(wpa_s, 10, 0); -+ wpa_supplicant_req_auth_timeout(wpa_s, 3, 0); - } - wpa_supplicant_cancel_scan(wpa_s); - ---- a/wpa_supplicant/scan.c -+++ b/wpa_supplicant/scan.c -@@ -189,6 +189,7 @@ static void wpa_supplicant_scan(void *el - } - #endif /* CONFIG_WPS */ - -+ wpa_drv_flush_pmkid(wpa_s); - if (wpa_s->use_client_mlme) { - ieee80211_sta_set_probe_req_ie(wpa_s, extra_ie, extra_ie_len); - ret = ieee80211_sta_req_scan(wpa_s, ssid ? ssid->ssid : NULL, -@@ -203,7 +204,7 @@ static void wpa_supplicant_scan(void *el - - if (ret) { - wpa_printf(MSG_WARNING, "Failed to initiate AP scan."); -- wpa_supplicant_req_scan(wpa_s, 10, 0); -+ wpa_supplicant_req_scan(wpa_s, 3, 0); - } else - wpa_s->scan_runs++; - } ---- a/wpa_supplicant/wpa_supplicant.c -+++ b/wpa_supplicant/wpa_supplicant.c -@@ -1160,10 +1160,10 @@ void wpa_supplicant_associate(struct wpa - - if (assoc_failed) { - /* give IBSS a bit more time */ -- timeout = ssid->mode ? 10 : 5; -+ timeout = ssid->mode ? 5 : 2; - } else if (wpa_s->conf->ap_scan == 1) { - /* give IBSS a bit more time */ -- timeout = ssid->mode ? 20 : 10; -+ timeout = ssid->mode ? 7 : 3; - } - wpa_supplicant_req_auth_timeout(wpa_s, timeout, 0); - } diff --git a/package/wpa_supplicant/patches/120-ssid_scan.patch b/package/wpa_supplicant/patches/120-ssid_scan.patch deleted file mode 100644 index 6beaed4..0000000 --- a/package/wpa_supplicant/patches/120-ssid_scan.patch +++ /dev/null @@ -1,41 +0,0 @@ -Don't do broadcast SSID scans, if all configured SSIDs use scan_ssid=1. Improves background scanning in supplicant-managed roaming. - ---- a/wpa_supplicant/scan.c -+++ b/wpa_supplicant/scan.c -@@ -73,6 +73,7 @@ static void wpa_supplicant_scan(void *el - struct wpabuf *wps_ie = NULL; - const u8 *extra_ie = NULL; - size_t extra_ie_len = 0; -+ int scan_ssid_all = 1; - int wps = 0; - #ifdef CONFIG_WPS - enum wps_request_type req_type = WPS_REQ_ENROLLEE_INFO; -@@ -82,6 +83,17 @@ static void wpa_supplicant_scan(void *el - return; - - enabled = 0; -+ -+ /* check if all configured ssids should be scanned directly */ -+ ssid = wpa_s->conf->ssid; -+ while (ssid) { -+ if (!ssid->scan_ssid) { -+ scan_ssid_all = 0; -+ break; -+ } -+ ssid = ssid->next; -+ } -+ - ssid = wpa_s->conf->ssid; - while (ssid) { - if (!ssid->disabled) { -@@ -154,6 +166,10 @@ static void wpa_supplicant_scan(void *el - return; - } - -+ if (scan_ssid_all && !ssid) { -+ ssid = wpa_s->conf->ssid; -+ } -+ - wpa_printf(MSG_DEBUG, "Starting AP scan (%s SSID)", - ssid ? "specific": "broadcast"); - if (ssid) { diff --git a/package/wpa_supplicant/patches/130-scanning.patch b/package/wpa_supplicant/patches/130-scanning.patch deleted file mode 100644 index aad4450..0000000 --- a/package/wpa_supplicant/patches/130-scanning.patch +++ /dev/null @@ -1,175 +0,0 @@ -Add a scan result cache to improve roaming speed if the driver gave us a background scan before losing the connection. - ---- a/wpa_supplicant/config.h -+++ b/wpa_supplicant/config.h -@@ -97,6 +97,12 @@ struct wpa_config { - int ap_scan; - - /** -+ * scan_cache - controls the time in seconds after the last scan results -+ * before a new scan may be initiated -+ */ -+ int scan_cache; -+ -+ /** - * ctrl_interface - Parameters for the control interface - * - * If this is specified, %wpa_supplicant will open a control interface ---- a/wpa_supplicant/config_file.c -+++ b/wpa_supplicant/config_file.c -@@ -306,6 +306,13 @@ static int wpa_config_parse_int(const st - return 0; - } - -+static int wpa_config_process_scan_cache(struct wpa_config *config, char *pos) -+{ -+ config->scan_cache = atoi(pos); -+ wpa_printf(MSG_DEBUG, "scan_cache=%d", config->scan_cache); -+ return 0; -+} -+ - - static int wpa_config_parse_str(const struct global_parse_data *data, - struct wpa_config *config, int line, -@@ -433,6 +440,7 @@ static const struct global_parse_data gl - #endif /* CONFIG_CTRL_IFACE */ - { INT_RANGE(eapol_version, 1, 2) }, - { INT(ap_scan) }, -+ { INT(scan_cache) }, - { INT(fast_reauth) }, - #ifdef EAP_TLS_OPENSSL - { STR(opensc_engine_path) }, -@@ -835,6 +843,8 @@ static void wpa_config_write_global(FILE - fprintf(f, "eapol_version=%d\n", config->eapol_version); - if (config->ap_scan != DEFAULT_AP_SCAN) - fprintf(f, "ap_scan=%d\n", config->ap_scan); -+ if (config->scan_cache != 0) -+ fprintf(f, "scan_cache=%d\n", config->scan_cache); - if (config->fast_reauth != DEFAULT_FAST_REAUTH) - fprintf(f, "fast_reauth=%d\n", config->fast_reauth); - #ifdef EAP_TLS_OPENSSL ---- a/wpa_supplicant/events.c -+++ b/wpa_supplicant/events.c -@@ -541,7 +541,7 @@ wpa_supplicant_select_bss_non_wpa(struct - "BSSID mismatch"); - continue; - } -- -+ - if (!(ssid->key_mgmt & WPA_KEY_MGMT_NONE) && - !(ssid->key_mgmt & WPA_KEY_MGMT_WPS) && - !(ssid->key_mgmt & WPA_KEY_MGMT_IEEE8021X_NO_WPA)) -@@ -551,7 +551,7 @@ wpa_supplicant_select_bss_non_wpa(struct - continue; - } - -- if ((ssid->key_mgmt & -+ if ((ssid->key_mgmt & - (WPA_KEY_MGMT_IEEE8021X | WPA_KEY_MGMT_PSK | - WPA_KEY_MGMT_FT_IEEE8021X | WPA_KEY_MGMT_FT_PSK | - WPA_KEY_MGMT_IEEE8021X_SHA256 | -@@ -640,6 +640,9 @@ static void wpa_supplicant_event_scan_re - wpa_s->disconnected) - return; - -+ if (wpa_s->wpa_state > WPA_ASSOCIATED) -+ goto done; -+ - while (selected == NULL) { - for (prio = 0; prio < wpa_s->conf->num_prio; prio++) { - selected = wpa_supplicant_select_bss( -@@ -652,6 +655,7 @@ static void wpa_supplicant_event_scan_re - wpa_printf(MSG_DEBUG, "No APs found - clear blacklist " - "and try again"); - wpa_blacklist_clear(wpa_s); -+ memset(&wpa_s->last_scan_results, 0, sizeof(wpa_s->last_scan_results)); - wpa_s->blacklist_cleared++; - } else if (selected == NULL) { - break; -@@ -687,10 +691,12 @@ static void wpa_supplicant_event_scan_re - rsn_preauth_scan_results(wpa_s->wpa, wpa_s->scan_res); - } else { - wpa_printf(MSG_DEBUG, "No suitable AP found."); -- timeout = 5; -+ timeout = 0; - goto req_scan; - } - -+done: -+ os_get_time(&wpa_s->last_scan_results); - return; - - req_scan: -@@ -894,6 +900,9 @@ static void wpa_supplicant_event_disasso - } - if (wpa_s->wpa_state >= WPA_ASSOCIATED) - wpa_supplicant_req_scan(wpa_s, 0, 100000); -+ else if (wpa_s->wpa_state == WPA_ASSOCIATING) -+ wpa_supplicant_req_auth_timeout(wpa_s, 0, 100000); -+ - bssid = wpa_s->bssid; - if (is_zero_ether_addr(bssid)) - bssid = wpa_s->pending_bssid; ---- a/wpa_supplicant/wpa_supplicant_i.h -+++ b/wpa_supplicant/wpa_supplicant_i.h -@@ -350,6 +350,7 @@ struct wpa_supplicant { - struct wpa_client_mlme mlme; - int use_client_mlme; - int driver_4way_handshake; -+ struct os_time last_scan_results; - - int pending_mic_error_report; - int pending_mic_error_pairwise; -@@ -405,6 +406,7 @@ int wpa_supplicant_scard_init(struct wpa - - /* scan.c */ - void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec); -+int wpa_supplicant_may_scan(struct wpa_supplicant *wpa_s); - void wpa_supplicant_cancel_scan(struct wpa_supplicant *wpa_s); - - /* events.c */ ---- a/wpa_supplicant/scan.c -+++ b/wpa_supplicant/scan.c -@@ -40,6 +40,18 @@ static void wpa_supplicant_gen_assoc_eve - wpa_supplicant_event(wpa_s, EVENT_ASSOC, &data); - } - -+int wpa_supplicant_may_scan(struct wpa_supplicant *wpa_s) -+{ -+ struct os_time time; -+ -+ if (wpa_s->conf->scan_cache > 0) { -+ os_get_time(&time); -+ time.sec -= wpa_s->conf->scan_cache; -+ if (os_time_before(&time, &wpa_s->last_scan_results)) -+ return 0; -+ } -+ return 1; -+} - - #ifdef CONFIG_WPS - static int wpas_wps_in_use(struct wpa_config *conf, -@@ -183,8 +195,9 @@ static void wpa_supplicant_scan(void *el - wps = wpas_wps_in_use(wpa_s->conf, &req_type); - #endif /* CONFIG_WPS */ - -- if (wpa_s->scan_res_tried == 0 && wpa_s->conf->ap_scan == 1 && -- !wpa_s->use_client_mlme && wps != 2) { -+ if (!wpa_supplicant_may_scan(wpa_s) || -+ (wpa_s->scan_res_tried == 0 && wpa_s->conf->ap_scan == 1 && -+ !wpa_s->use_client_mlme && wps != 2)) { - wpa_s->scan_res_tried++; - wpa_s->scan_req = scan_req; - wpa_printf(MSG_DEBUG, "Trying to get current scan results " ---- a/wpa_supplicant/wpa_supplicant.c -+++ b/wpa_supplicant/wpa_supplicant.c -@@ -1491,6 +1491,9 @@ void wpa_supplicant_rx_eapol(void *ctx, - { - struct wpa_supplicant *wpa_s = ctx; - -+ if (wpa_s->wpa_state < WPA_ASSOCIATING) -+ return; -+ - wpa_printf(MSG_DEBUG, "RX EAPOL from " MACSTR, MAC2STR(src_addr)); - wpa_hexdump(MSG_MSGDUMP, "RX EAPOL", buf, len); - diff --git a/package/wpa_supplicant/patches/140-quality.patch b/package/wpa_supplicant/patches/140-quality.patch deleted file mode 100644 index edb0b26..0000000 --- a/package/wpa_supplicant/patches/140-quality.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/wpa_supplicant/wpa_supplicant.c -+++ b/wpa_supplicant/wpa_supplicant.c -@@ -1248,7 +1248,7 @@ static int wpa_supplicant_get_scan_resul - { - #define SCAN_AP_LIMIT 128 - struct wpa_scan_result *results; -- int num, i; -+ int num, i, j; - struct wpa_scan_results *res; - - results = os_malloc(SCAN_AP_LIMIT * sizeof(struct wpa_scan_result)); -@@ -1345,6 +1345,21 @@ static int wpa_supplicant_get_scan_resul - res->res[res->num++] = r; - } - -+ /* sort scan results by quality */ -+ for(i = 0; i < num - 1; i++) { -+ for(j = i + 1; j < num; j++) { -+ struct wpa_scan_result tmp; -+ -+ if (results[i].qual > results[j].qual) -+ continue; -+ -+ os_memcpy(&tmp, &results[i], sizeof(tmp)); -+ os_memcpy(&results[i], &results[j], sizeof(tmp)); -+ os_memcpy(&results[j], &tmp, sizeof(tmp)); -+ } -+ } -+ -+ - os_free(results); - wpa_s->scan_res = res; - diff --git a/package/wpa_supplicant/patches/150-Remove-PS3-gelic-legacy-wpa-support.patch b/package/wpa_supplicant/patches/150-Remove-PS3-gelic-legacy-wpa-support.patch deleted file mode 100644 index 94559f1..0000000 --- a/package/wpa_supplicant/patches/150-Remove-PS3-gelic-legacy-wpa-support.patch +++ /dev/null @@ -1,251 +0,0 @@ -From 67441c596f016f69c230eaa31ecb2272c6cbf4bf Mon Sep 17 00:00:00 2001 -From: Hamish Guthrie <hamish.guthrie@sonycom.com> -Date: Wed, 6 Jan 2010 10:00:22 +0100 -Subject: [PATCH] Remove PS3 gelic legacy wpa support - -The ps3 wireless driver now supports wireless extensions. There is dedicated support code in wpa_supplicant for the old gelic wireless driver. The current gelic driver retains the old API with CONFIG_GELIC_WIRELESS_OLD_PSK_INTERFACE, which is being removed from the driver. - -Signed-off-by: Hamish Guthrie <hamish.guthrie@sonycom.com> ---- - src/drivers/driver_ps3.c | 186 ---------------------------------------------- - src/drivers/drivers.c | 6 -- - wpa_supplicant/Makefile | 6 -- - 3 files changed, 0 insertions(+), 198 deletions(-) - delete mode 100644 src/drivers/driver_ps3.c - -diff --git a/src/drivers/driver_ps3.c b/src/drivers/driver_ps3.c -deleted file mode 100644 -index fde3425..0000000 ---- a/src/drivers/driver_ps3.c -+++ /dev/null -@@ -1,186 +0,0 @@ --/* -- * WPA Supplicant - PS3 Linux wireless extension driver interface -- * Copyright 2007, 2008 Sony Corporation -- * -- * This program is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License version 2 as -- * published by the Free Software Foundation. -- * -- * Alternatively, this software may be distributed under the terms of BSD -- * license. -- * -- * See README and COPYING for more details. -- */ -- --#include "includes.h" --#include <sys/ioctl.h> --#include "wireless_copy.h" --#include "common.h" --#include "wpa_common.h" --#include "driver.h" --#include "eloop.h" --#include "driver_wext.h" --#include "ieee802_11_defs.h" -- --static int wpa_driver_ps3_set_wpa_key(struct wpa_driver_wext_data *drv, -- struct wpa_driver_associate_params *params) --{ -- int ret, i; -- struct iwreq iwr; -- char *buf, *str; -- -- if (!params->psk && !params->passphrase) { -- wpa_printf(MSG_INFO, "%s:no PSK error", __func__); -- return -EINVAL; -- } -- -- os_memset(&iwr, 0, sizeof(iwr)); -- if (params->psk) { -- /* includes null */ -- iwr.u.data.length = PMK_LEN * 2 + 1; -- buf = os_malloc(iwr.u.data.length); -- if (!buf) -- return -ENOMEM; -- str = buf; -- for (i = 0; i < PMK_LEN; i++) { -- str += snprintf(str, iwr.u.data.length - (str - buf), -- "%02x", params->psk[i]); -- } -- } else if (params->passphrase) { -- /* including quotations and null */ -- iwr.u.data.length = strlen(params->passphrase) + 3; -- buf = os_malloc(iwr.u.data.length); -- if (!buf) -- return -ENOMEM; -- buf[0] = '"'; -- os_memcpy(buf + 1, params->passphrase, iwr.u.data.length - 3); -- buf[iwr.u.data.length - 2] = '"'; -- buf[iwr.u.data.length - 1] = '\0'; -- } else -- return -EINVAL; -- iwr.u.data.pointer = (caddr_t) buf; -- os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); -- ret = ioctl(drv->ioctl_sock, SIOCIWFIRSTPRIV, &iwr); -- os_free(buf); -- -- return ret; --} -- --static int wpa_driver_ps3_set_wep_keys(struct wpa_driver_wext_data *drv, -- struct wpa_driver_associate_params *params) --{ -- int ret, i; -- struct iwreq iwr; -- -- for (i = 0; i < 4; i++) { -- os_memset(&iwr, 0, sizeof(iwr)); -- os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); -- iwr.u.encoding.flags = i + 1; -- if (params->wep_key_len[i]) { -- iwr.u.encoding.pointer = (caddr_t) params->wep_key[i]; -- iwr.u.encoding.length = params->wep_key_len[i]; -- } else -- iwr.u.encoding.flags = IW_ENCODE_NOKEY | -- IW_ENCODE_DISABLED; -- -- if (ioctl(drv->ioctl_sock, SIOCSIWENCODE, &iwr) < 0) { -- perror("ioctl[SIOCSIWENCODE]"); -- ret = -1; -- } -- } -- return ret; --} -- --static int wpa_driver_ps3_associate(void *priv, -- struct wpa_driver_associate_params *params) --{ -- struct wpa_driver_wext_data *drv = priv; -- int ret, value; -- -- wpa_printf(MSG_DEBUG, "%s: <-", __func__); -- -- /* clear BSSID */ -- if (!params->bssid && -- wpa_driver_wext_set_bssid(drv, NULL) < 0) -- ret = -1; -- -- if (wpa_driver_wext_set_mode(drv, params->mode) < 0) -- ret = -1; -- -- if (params->wpa_ie == NULL || params->wpa_ie_len == 0) -- value = IW_AUTH_WPA_VERSION_DISABLED; -- else if (params->wpa_ie[0] == WLAN_EID_RSN) -- value = IW_AUTH_WPA_VERSION_WPA2; -- else -- value = IW_AUTH_WPA_VERSION_WPA; -- if (wpa_driver_wext_set_auth_param(drv, -- IW_AUTH_WPA_VERSION, value) < 0) -- ret = -1; -- value = wpa_driver_wext_cipher2wext(params->pairwise_suite); -- if (wpa_driver_wext_set_auth_param(drv, -- IW_AUTH_CIPHER_PAIRWISE, value) < 0) -- ret = -1; -- value = wpa_driver_wext_cipher2wext(params->group_suite); -- if (wpa_driver_wext_set_auth_param(drv, -- IW_AUTH_CIPHER_GROUP, value) < 0) -- ret = -1; -- value = wpa_driver_wext_keymgmt2wext(params->key_mgmt_suite); -- if (wpa_driver_wext_set_auth_param(drv, IW_AUTH_KEY_MGMT, value) < 0) -- ret = -1; -- -- /* set selected BSSID */ -- if (params->bssid && -- wpa_driver_wext_set_bssid(drv, params->bssid) < 0) -- ret = -1; -- -- switch (params->group_suite) { -- case CIPHER_NONE: -- ret = 0; -- break; -- case CIPHER_WEP40: -- case CIPHER_WEP104: -- ret = wpa_driver_ps3_set_wep_keys(drv, params); -- break; -- case CIPHER_TKIP: -- case CIPHER_CCMP: -- ret = wpa_driver_ps3_set_wpa_key(drv, params); -- break; -- } -- -- /* start to associate */ -- ret = wpa_driver_wext_set_ssid(drv, params->ssid, params->ssid_len); -- -- wpa_printf(MSG_DEBUG, "%s: ->", __func__); -- -- return ret; --} -- --static int wpa_driver_ps3_get_capa(void *priv, struct wpa_driver_capa *capa) --{ -- int ret; -- wpa_printf(MSG_DEBUG, "%s:<-", __func__); -- -- ret = wpa_driver_wext_get_capa(priv, capa); -- if (ret) { -- wpa_printf(MSG_INFO, "%s: base wext returns error %d", -- __func__, ret); -- return ret; -- } -- /* PS3 hypervisor does association and 4way handshake by itself */ -- capa->flags |= WPA_DRIVER_FLAGS_4WAY_HANDSHAKE; -- wpa_printf(MSG_DEBUG, "%s:->", __func__); -- return 0; --} -- --const struct wpa_driver_ops wpa_driver_ps3_ops = { -- .name = "ps3", -- .desc = "PLAYSTATION3 Linux wireless extension driver", -- .get_bssid = wpa_driver_wext_get_bssid, -- .get_ssid = wpa_driver_wext_get_ssid, -- .scan = wpa_driver_wext_scan, -- .get_scan_results2 = wpa_driver_wext_get_scan_results, -- .associate = wpa_driver_ps3_associate, /* PS3 */ -- .init = wpa_driver_wext_init, -- .deinit = wpa_driver_wext_deinit, -- .get_capa = wpa_driver_ps3_get_capa, /* PS3 */ --}; -diff --git a/src/drivers/drivers.c b/src/drivers/drivers.c -index d278797..7e7d720 100644 ---- a/src/drivers/drivers.c -+++ b/src/drivers/drivers.c -@@ -64,9 +64,6 @@ extern struct wpa_driver_ops wpa_driver_ralink_ops; /* driver_ralink.c */ - #ifdef CONFIG_DRIVER_OSX - extern struct wpa_driver_ops wpa_driver_osx_ops; /* driver_osx.m */ - #endif /* CONFIG_DRIVER_OSX */ --#ifdef CONFIG_DRIVER_PS3 --extern struct wpa_driver_ops wpa_driver_ps3_ops; /* driver_ps3.c */ --#endif /* CONFIG_DRIVER_PS3 */ - #ifdef CONFIG_DRIVER_IPHONE - extern struct wpa_driver_ops wpa_driver_iphone_ops; /* driver_iphone.m */ - #endif /* CONFIG_DRIVER_IPHONE */ -@@ -126,9 +123,6 @@ struct wpa_driver_ops *wpa_supplicant_drivers[] = - #ifdef CONFIG_DRIVER_OSX - &wpa_driver_osx_ops, - #endif /* CONFIG_DRIVER_OSX */ --#ifdef CONFIG_DRIVER_PS3 -- &wpa_driver_ps3_ops, --#endif /* CONFIG_DRIVER_PS3 */ - #ifdef CONFIG_DRIVER_IPHONE - &wpa_driver_iphone_ops, - #endif /* CONFIG_DRIVER_IPHONE */ -diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile -index 45d6ada..f131e92 100644 ---- a/wpa_supplicant/Makefile -+++ b/wpa_supplicant/Makefile -@@ -226,12 +226,6 @@ LDFLAGS += -framework CoreFoundation - LDFLAGS += -F/System/Library/PrivateFrameworks -framework Apple80211 - endif - --ifdef CONFIG_DRIVER_PS3 --CFLAGS += -DCONFIG_DRIVER_PS3 -m64 --OBJS_d += ../src/drivers/driver_ps3.o --LDFLAGS += -m64 --endif -- - ifdef CONFIG_DRIVER_IPHONE - CFLAGS += -DCONFIG_DRIVER_IPHONE - OBJS_d += ../src/drivers/driver_iphone.o --- -1.6.2.4 - |