From: Nicolas Thill Date: Wed, 29 Apr 2009 14:26:56 +0000 (+0000) Subject: [package] hostapd: sync 8.09 script with trunk X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=2288c4f8916949108713ad05407160cbe0258104 [package] hostapd: sync 8.09 script with trunk SVN-Revision: 15488 --- diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile index 9b4f605031..0d17a2f0f9 100644 --- a/package/hostapd/Makefile +++ b/package/hostapd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd PKG_VERSION:=0.6.6 -PKG_RELEASE:=1 +PKG_RELEASE:=1.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ diff --git a/package/hostapd/files/hostapd.sh b/package/hostapd/files/hostapd.sh index 1ce62fd767..56fecde3bc 100644 --- a/package/hostapd/files/hostapd.sh +++ b/package/hostapd/files/hostapd.sh @@ -22,7 +22,7 @@ hostapd_setup_vif() { wpa=3 crypto="CCMP TKIP" ;; - *) + *) wpa=1 crypto="TKIP" ;; @@ -67,6 +67,7 @@ hostapd_setup_vif() { ;; *) wpa=0 + crypto= ;; esac config_get ifname "$vif" ifname @@ -76,25 +77,30 @@ hostapd_setup_vif() { config_get channel "$device" channel config_get hwmode "$device" hwmode case "$hwmode" in - 11a) hwmode=a;; - 11b) hwmode=b;; - 11g) hwmode=g;; + *a) hwmode=a;; + *b) hwmode=b;; + *g) hwmode=g;; *) hwmode= - [ "$channel" -gt 14 ] && hwmode=a + [ -n "$channel" ] && { + test $channel -gt 14 2>/dev/null && hwmode=a + } ;; esac + config_get country "$device" country + [ "$channel" = auto ] && channel= cat > /var/run/hostapd-$ifname.conf <