diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-11-11 08:34:59 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-11-11 08:34:59 +0000 |
commit | 12ee4de94ddd0f7248b2cd03226dd82f606a1e84 (patch) | |
tree | f4c7a426e9f9d51973abebe9209ab699ac91c97f | |
parent | 2b2556c88a98d4cf33287b433c89c589b8e454e1 (diff) | |
download | master-187ad058-12ee4de94ddd0f7248b2cd03226dd82f606a1e84.tar.gz master-187ad058-12ee4de94ddd0f7248b2cd03226dd82f606a1e84.tar.bz2 master-187ad058-12ee4de94ddd0f7248b2cd03226dd82f606a1e84.zip |
hostapd: Use network_get_device instead of uci_get_state
This fixes the IAPP functionality.
Signed-off-by: Petko Bordjukov <bordjukov@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47455 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/network/services/hostapd/Makefile | 2 | ||||
-rw-r--r-- | package/network/services/hostapd/files/hostapd.sh | 9 | ||||
-rw-r--r-- | package/network/services/hostapd/files/netifd.sh | 7 |
3 files changed, 13 insertions, 5 deletions
diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index edcfd1ba37..8a7fad6b65 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd PKG_VERSION:=2015-03-25 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_REV:=8278138e679174b1ec8af7f169c2810a8888e202 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 7aec7ad8a4..393233b8b4 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -1,3 +1,5 @@ +. /lib/functions/network.sh + hostapd_set_bss_options() { local var="$1" local vif="$2" @@ -213,7 +215,11 @@ hostapd_set_bss_options() { append "$var" "ssid=$ssid" "$N" [ -n "$bridge" ] && append "$var" "bridge=$bridge" "$N" [ -n "$ieee80211d" ] && append "$var" "ieee80211d=$ieee80211d" "$N" - [ -n "$iapp_interface" ] && append "$var" iapp_interface=$(uci_get_state network "$iapp_interface" ifname "$iapp_interface") "$N" + [ -n "$iapp_interface" ] && { + local ifname + network_get_device ifname "$iapp_interface" || ifname = "$iapp_interface" + append bss_conf "iapp_interface=$ifname" "$N" + } if [ "$wpa" -ge "1" ] then @@ -391,4 +397,3 @@ $hostapd_cfg EOF hostapd -P /var/run/wifi-$ifname.pid -B /var/run/hostapd-$ifname.conf } - diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh index 9b40a23451..1c91bbf3c8 100644 --- a/package/network/services/hostapd/files/netifd.sh +++ b/package/network/services/hostapd/files/netifd.sh @@ -1,3 +1,5 @@ +. /lib/functions/network.sh + wpa_supplicant_add_rate() { local var="$1" local val="$(($2 / 1000))" @@ -351,8 +353,9 @@ hostapd_set_bss_options() { append bss_conf "ssid=$ssid" "$N" [ -n "$network_bridge" ] && append bss_conf "bridge=$network_bridge" "$N" [ -n "$iapp_interface" ] && { - iapp_interface="$(uci_get_state network "$iapp_interface" ifname "$iapp_interface")" - [ -n "$iapp_interface" ] && append bss_conf "iapp_interface=$iapp_interface" "$N" + local ifname + network_get_device ifname "$iapp_interface" || ifname = "$iapp_interface" + append bss_conf "iapp_interface=$ifname" "$N" } if [ "$wpa" -ge "1" ]; then |