X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=contrib%2Fpackage%2Fmeshwizard%2Ffiles%2Fusr%2Fbin%2Fmeshwizard%2Fhelpers%2Fsetup_wifi.sh;h=34bd0cbb036ed5b821cad71b12031be8896a1bdc;hb=03ed541b7613206010ddfbfc5a8fb6af5cbbf106;hp=84c5438ebcc08ed4898dc6c059db525b12ff0771;hpb=13224b696d0ea71fb2f8e2b4b0e8eca6caa9ae90;p=project%2Fluci.git diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi.sh index 84c5438eb..34bd0cbb0 100755 --- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi.sh +++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi.sh @@ -79,7 +79,16 @@ uci_commitverbose "Setup wifi interface for $netrenamed" wireless ## VAP ip4addr="$(uci get meshwizard.netconfig.$net\_ip4addr)" -if [ "$type" == "atheros" -a "$vap" == 1 ]; then + +# check if this hardware supports VAPs +# the interface needs to be up before the check can happen + +/sbin/wifi + +supports_vap="0" +$dir/helpers/supports_vap.sh $net $type && supports_vap=1 + +if [ "$supports_vap" == "1" -a "$vap" == 1 ]; then uci batch <<- EOF set wireless.$net\_iface_dhcp="wifi-iface" set wireless.$net\_iface_dhcp.device="$net"