Author: nbd
Date: 2015-11-11 09:34:59 +0100 (Wed, 11 Nov 2015)
New Revision: 47455

Modified:
   trunk/package/network/services/hostapd/Makefile
   trunk/package/network/services/hostapd/files/hostapd.sh
   trunk/package/network/services/hostapd/files/netifd.sh
Log:
hostapd: Use network_get_device instead of uci_get_state

This fixes the IAPP functionality.

Signed-off-by: Petko Bordjukov <[email protected]>

Modified: trunk/package/network/services/hostapd/Makefile
===================================================================
--- trunk/package/network/services/hostapd/Makefile     2015-11-11 08:32:37 UTC 
(rev 47454)
+++ trunk/package/network/services/hostapd/Makefile     2015-11-11 08:34:59 UTC 
(rev 47455)
@@ -8,7 +8,7 @@
 
 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

Modified: trunk/package/network/services/hostapd/files/hostapd.sh
===================================================================
--- trunk/package/network/services/hostapd/files/hostapd.sh     2015-11-11 
08:32:37 UTC (rev 47454)
+++ trunk/package/network/services/hostapd/files/hostapd.sh     2015-11-11 
08:34:59 UTC (rev 47455)
@@ -1,3 +1,5 @@
+. /lib/functions/network.sh
+
 hostapd_set_bss_options() {
        local var="$1"
        local vif="$2"
@@ -213,7 +215,11 @@
        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 @@
 EOF
        hostapd -P /var/run/wifi-$ifname.pid -B /var/run/hostapd-$ifname.conf
 }
-

Modified: trunk/package/network/services/hostapd/files/netifd.sh
===================================================================
--- trunk/package/network/services/hostapd/files/netifd.sh      2015-11-11 
08:32:37 UTC (rev 47454)
+++ trunk/package/network/services/hostapd/files/netifd.sh      2015-11-11 
08:34:59 UTC (rev 47455)
@@ -1,3 +1,5 @@
+. /lib/functions/network.sh
+
 wpa_supplicant_add_rate() {
        local var="$1"
        local val="$(($2 / 1000))"
@@ -351,8 +353,9 @@
        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
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to