hostapd,madwifi: rename agmode option to hwmode. 11a and 11g aren't the only allowed...
[openwrt/openwrt.git] / package / hostapd / files / hostapd.sh
index a6f5dba992590080ca0272da1bfb2286fd713599..1c2fa35e7a115421cbd0edafe866740e644d5aa9 100644 (file)
@@ -74,20 +74,20 @@ 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;;
+       config_get hwmode "$device" hwmode
+       case "$hwmode" in
+               11a) hwmode=a;;
+               11b) hwmode=b;;
+               11g) hwmode=g;;
                *)
-                       agmode=
-                       [ "$channel" -gt 14 ] && agmode=a
+                       hwmode=
+                       [ "$channel" -gt 14 ] && hwmode=a
                ;;
        esac
        cat > /var/run/hostapd-$ifname.conf <<EOF
 driver=$driver
 interface=$ifname
-hw_mode=${agmode:-g}
+hw_mode=${hwmode:-g}
 channel=$channel
 ${bridge:+bridge=$bridge}
 ssid=$ssid