summaryrefslogtreecommitdiff
path: root/package
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
commit69692e019a06c29b9146b2658420c8f50f863519 (patch)
tree9451efff442e8d2e24a8218e35634a51d7a64a2a /package
parent065306a9a8ac22f4bed6f84ab4a355628e52d7c6 (diff)
downloadmtk-20170518-69692e019a06c29b9146b2658420c8f50f863519.zip
mtk-20170518-69692e019a06c29b9146b2658420c8f50f863519.tar.gz
mtk-20170518-69692e019a06c29b9146b2658420c8f50f863519.tar.bz2
parse the a/g mode setting in /etc/config/wireless when setting up hostapd (instead of hardcoding it to g)
SVN-Revision: 12673
Diffstat (limited to 'package')
-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 49b30cf..7a67cec 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