X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=contrib%2Fpackage%2Fmeshwizard%2Ffiles%2Fusr%2Fbin%2Fmeshwizard%2Fhelpers%2Fsetup_wifi.sh;h=41feb8665106b8815264458620ddb5196c3bf6b1;hp=84c5438ebcc08ed4898dc6c059db525b12ff0771;hb=63976f603a4c947f135ae82bc7d36410ec61a50f;hpb=163b224b25d003cc6ca555b305bdbc89b2dd61b6;ds=sidebyside 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..41feb8665 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 @@ -28,7 +28,6 @@ uci set wireless.${net}=wifi-device set_defaults "wifi_device_" wireless.${net} channel="$(uci -q get meshwizard.netconfig.$net\_channel)" -vap="$(uci -q get meshwizard.netconfig.$net\_vap)" if [ -z "$channel" -o "$channel" == "default" ]; then channel=$wifi_device_channel @@ -60,12 +59,19 @@ uci set wireless.$net\_iface=wifi-iface # create new wifi-iface for $net from defaults set_defaults "wifi_iface_" wireless.$net\_iface +# overwrite some settings for type atheros (madwifi) +if [ "$type" = "atheros" ]; then + set_defaults "madwifi_wifi_iface_" wireless.${net} +fi + # overwrite defaults bssid="$($dir/helpers/gen_bssid.sh $channel $community)" ssid="$profile_ssid" if [ "$profile_ssid_scheme" == "addchannel" ]; then ssid="$ssid - ch$channel" +elif [ "$profile_ssid_scheme" == "addchannelbefore" ]; then + ssid="ch$channel.$ssid" fi uci batch << EOF @@ -77,17 +83,3 @@ EOF uci_commitverbose "Setup wifi interface for $netrenamed" wireless -## VAP -ip4addr="$(uci get meshwizard.netconfig.$net\_ip4addr)" -if [ "$type" == "atheros" -a "$vap" == 1 ]; then - uci batch <<- EOF - set wireless.$net\_iface_dhcp="wifi-iface" - set wireless.$net\_iface_dhcp.device="$net" - set wireless.$net\_iface_dhcp.mode="ap" - set wireless.$net\_iface_dhcp.encryption="none" - set wireless.$net\_iface_dhcp.network="${netrenamed}dhcp" - set wireless.$net\_iface_dhcp.ssid="FF-AP-$ip4addr" - EOF - uci_commitverbose "Setup VAP interface for $netrenamed" wireless -fi -