aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorAndy Boyett <agb@openwrt.org>2008-12-31 19:09:26 +0000
committerAndy Boyett <agb@openwrt.org>2008-12-31 19:09:26 +0000
commit35078a6a52a6308422c8c745b2ef148380ef3471 (patch)
treeb963bd70f96634ed70ef25b0207711ae09592e7a /package
parent359ce7f97e9ddd6082391def8f27ccceb31a83ce (diff)
downloadupstream-35078a6a52a6308422c8c745b2ef148380ef3471.tar.gz
upstream-35078a6a52a6308422c8c745b2ef148380ef3471.tar.bz2
upstream-35078a6a52a6308422c8c745b2ef148380ef3471.zip
hostapd,madwifi: rename agmode option to hwmode. 11a and 11g aren't the only allowed values
SVN-Revision: 13790
Diffstat (limited to 'package')
-rw-r--r--package/hostapd/files/hostapd.sh16
-rwxr-xr-xpackage/madwifi/files/lib/wifi/madwifi.sh26
2 files changed, 21 insertions, 21 deletions
diff --git a/package/hostapd/files/hostapd.sh b/package/hostapd/files/hostapd.sh
index a6f5dba992..1c2fa35e7a 100644
--- a/package/hostapd/files/hostapd.sh
+++ b/package/hostapd/files/hostapd.sh
@@ -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
diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh
index 638640a962..db7f057940 100755
--- a/package/madwifi/files/lib/wifi/madwifi.sh
+++ b/package/madwifi/files/lib/wifi/madwifi.sh
@@ -95,22 +95,22 @@ enable_atheros() {
config_set "$vif" ifname "$ifname"
# only need to change freq band and channel on the first vif
- config_get agmode "$device" agmode
- [ -z "$agmode" ] && config_get agmode "$device" mode
+ config_get hwmode "$device" hwmode
+ [ -z "$hwmode" ] && config_get hwmode "$device" mode
pureg=0
- case "$agmode" in
- *b) agmode=11b;;
- *bg) agmode=11g;;
- *g) agmode=11g; pureg=1;;
- *gdt) agmode=11gdt;;
- *a) agmode=11a;;
- *adt) agmode=11adt;;
- *ast) agmode=11ast;;
- *fh) agmode=fh;;
- *) agmode=auto;;
+ case "$hwmode" in
+ *b) hwmode=11b;;
+ *bg) hwmode=11g;;
+ *g) hwmode=11g; pureg=1;;
+ *gdt) hwmode=11gdt;;
+ *a) hwmode=11a;;
+ *adt) hwmode=11adt;;
+ *ast) hwmode=11ast;;
+ *fh) hwmode=fh;;
+ *) hwmode=auto;;
esac
- iwpriv "$ifname" mode "$agmode"
+ iwpriv "$ifname" mode "$hwmode"
iwpriv "$ifname" pureg "$pureg"
[ "$first" = 1 ] && {