diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/base-files/src/etc/init.d/boot | 2 | ||||
-rwxr-xr-x | package/base-files/src/etc/network/if-post-down.d/03-wireless | 6 | ||||
-rwxr-xr-x | package/base-files/src/etc/network/if-pre-up.d/04-wireless | 25 | ||||
-rw-r--r-- | package/wpa_supplicant/Makefile | 6 | ||||
-rw-r--r-- | package/wpa_supplicant/files/config | 10 |
5 files changed, 35 insertions, 14 deletions
diff --git a/package/base-files/src/etc/init.d/boot b/package/base-files/src/etc/init.d/boot index f71e46240..2ef6538e0 100644 --- a/package/base-files/src/etc/init.d/boot +++ b/package/base-files/src/etc/init.d/boot @@ -24,4 +24,6 @@ for f in /etc/modules.d/*; do [[ -e $f ]] && load_modules /etc/modules.d/* break done +# settle down, after module load +sleep 2 exit 0 diff --git a/package/base-files/src/etc/network/if-post-down.d/03-wireless b/package/base-files/src/etc/network/if-post-down.d/03-wireless index 66e92639b..86e0c73e1 100755 --- a/package/base-files/src/etc/network/if-post-down.d/03-wireless +++ b/package/base-files/src/etc/network/if-post-down.d/03-wireless @@ -8,6 +8,12 @@ case "$IF_WIRELESS_MODE" in logger -t hostap "Killing hostapd" pkill hostapd ;; + sta) + [ "$IF_WIRELESS_SECURITY" != "none" ] && { + logger -t wireless "Killing wpa_supplicant" + pkill wpa_supplicant + } + ;; *) exit 0 ;; diff --git a/package/base-files/src/etc/network/if-pre-up.d/04-wireless b/package/base-files/src/etc/network/if-pre-up.d/04-wireless index 54864ba78..bc498e163 100755 --- a/package/base-files/src/etc/network/if-pre-up.d/04-wireless +++ b/package/base-files/src/etc/network/if-pre-up.d/04-wireless @@ -2,8 +2,6 @@ #set -x set -e -[ -x /usr/sbin/iw ] || exit 0 - [ "${IFACE%%[0-9]*}" = "wlan" ] || exit 0 [ "$IF_WIRELESS_SSID" ] || exit 1 @@ -77,6 +75,29 @@ case "$IF_WIRELESS_MODE" in logger -t hostap "Starting hostapd" hostapd -B /tmp/hostapd.conf ;; + sta) + [ -x /usr/sbin/iw ] || { + logger -t wireless "No iw utility found" + exit 1 + } + ip link set up dev ${IFACE} + iw dev ${IFACE} set channel $IF_WIRELESS_CHANNEL + iw dev ${IFACE} connect $IF_WIRELESS_SSID + [ $wpa2 -eq 1 ] && { + [ -x /usr/sbin/wpa_supplicant ] || { + logger -t wireless "No wpa_supplicant found" + exit 1 + } + touch /tmp/wpa_supplicant.conf + chmod 600 /tmp/wpa_supplicant.conf + echo "network={" > /tmp/wpa_supplicant.conf + echo " ssid=\"$IF_WIRELESS_SSID\"" >> /tmp/wpa_supplicant.conf + echo " psk=\"$IF_WIRELESS_PASSPHRASE\"" >> /tmp/wpa_supplicant.conf + echo " priority=5" >> /tmp/wpa_supplicant.conf + echo "}" >> /tmp/wpa_supplicant.conf + wpa_supplicant -B -Dnl80211 -i${IFACE} -c/tmp/wpa_supplicant.conf + } + ;; *) echo "Unknown operation mode $IF_WIRELESS_MODE given!" exit 1 diff --git a/package/wpa_supplicant/Makefile b/package/wpa_supplicant/Makefile index 6d6b49f2a..a5b906c62 100644 --- a/package/wpa_supplicant/Makefile +++ b/package/wpa_supplicant/Makefile @@ -4,13 +4,13 @@ include ${TOPDIR}/rules.mk PKG_NAME:= wpa_supplicant -PKG_VERSION:= 0.6.9 +PKG_VERSION:= 0.7.1 PKG_RELEASE:= 1 -PKG_MD5SUM:= 0efb8fcedf0a8acf6f423dfdb0658fdd +PKG_MD5SUM:= 02c475f949e5c131856915bbb87fa55d PKG_DESCR:= WPA Supplicant with support for WPA and WPA2 PKG_SECTION:= net -PKG_DEPENDS:= libopenssl ifeq (${ADK_COMPILE_WPA_SUPPLICANT_WITH_OPENSSL},y) +PKG_DEPENDS:= libopenssl PKG_BUILDDEP+= openssl endif PKG_SITES:= http://hostap.epitest.fi/releases/ diff --git a/package/wpa_supplicant/files/config b/package/wpa_supplicant/files/config index b800b2fc5..c3f85d9c2 100644 --- a/package/wpa_supplicant/files/config +++ b/package/wpa_supplicant/files/config @@ -1,16 +1,8 @@ # rather important -#CONFIG_DRIVER_MADWIFI=y -CONFIG_DRIVER_WEXT=y +CONFIG_DRIVER_NL80211=y CONFIG_IEEE8021X_EAPOL=y CONFIG_CTRL_IFACE=y # default CONFIG_EAP_PSK=y CONFIG_EAP_MD5=y - -# optional -CONFIG_MSCHAPV2=y -CONFIG_EAP_TLS=y -CONFIG_EAP_PEAP=y -CONFIG_EAP_TTLS=y - |