summaryrefslogtreecommitdiff
path: root/package/network/services/hostapd/files/hostapd.sh
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-11-11 08:34:59 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-11-11 08:34:59 +0000
commit047f9ef8eb31ef5992225f1c6e4eb22ae196d225 (patch)
tree35c106e3ec65a93bdf112824079e34e5aa74acec /package/network/services/hostapd/files/hostapd.sh
parent2d23fedac5709f94184a401667e45ed0d861ac5e (diff)
downloadmtk-20170518-047f9ef8eb31ef5992225f1c6e4eb22ae196d225.zip
mtk-20170518-047f9ef8eb31ef5992225f1c6e4eb22ae196d225.tar.gz
mtk-20170518-047f9ef8eb31ef5992225f1c6e4eb22ae196d225.tar.bz2
hostapd: Use network_get_device instead of uci_get_state
This fixes the IAPP functionality. Signed-off-by: Petko Bordjukov <bordjukov@gmail.com> SVN-Revision: 47455
Diffstat (limited to 'package/network/services/hostapd/files/hostapd.sh')
-rw-r--r--package/network/services/hostapd/files/hostapd.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index 7aec7ad..393233b 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
}
-