parse the a/g mode setting in /etc/config/wireless when setting up hostapd (instead...
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 23 Sep 2008 18:18:21 +0000 (18:18 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 23 Sep 2008 18:18:21 +0000 (18:18 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12673 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/hostapd/files/hostapd.sh

index 49b30cf..7a67cec 100644 (file)
@@ -74,10 +74,17 @@ hostapd_setup_vif() {
        config_get ssid "$vif" ssid
        config_get device "$vif" device
        config_get channel "$device" channel
+       config_get agmode "$device" agmode
+       case "$agmode" in
+               11a) agmode=a;;
+               11b) agmode=b;;
+               11g) agmode=g;;
+               *) agmode=;;
+       esac
        cat > /var/run/hostapd-$ifname.conf <<EOF
 driver=$driver
 interface=$ifname
-hw_mode=g
+hw_mode=${agmode:-g}
 channel=$channel
 ${bridge:+bridge=$bridge}
 ssid=$ssid
This page took 0.021829 seconds and 4 git commands to generate.