aboutsummaryrefslogtreecommitdiffstats
path: root/package/hostapd
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-09-23 18:18:21 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-09-23 18:18:21 +0000
commitbfc73dadf20b5b1b12985977f60e002eb7bf6fff (patch)
tree20fdec765a239bce01f3b26c59ae70563d81b595 /package/hostapd
parent67dae6f31e9bbda566304a04b34777b536af10f7 (diff)
downloadupstream-bfc73dadf20b5b1b12985977f60e002eb7bf6fff.tar.gz
upstream-bfc73dadf20b5b1b12985977f60e002eb7bf6fff.tar.bz2
upstream-bfc73dadf20b5b1b12985977f60e002eb7bf6fff.zip
parse the a/g mode setting in /etc/config/wireless when setting up hostapd (instead of hardcoding it to g)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12673 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/hostapd')
-rw-r--r--package/hostapd/files/hostapd.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/package/hostapd/files/hostapd.sh b/package/hostapd/files/hostapd.sh
index 49b30cfd57..7a67cec949 100644
--- a/package/hostapd/files/hostapd.sh
+++ b/package/hostapd/files/hostapd.sh
@@ -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