1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

[package] hostapd,madwifi: rename agmode option to hwmode. 11a and 11g aren't the only allowed values

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13790 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
agb
2008-12-31 19:09:26 +00:00
parent e8530f33a9
commit afb87b33ca
3 changed files with 25 additions and 25 deletions

View 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