[package] hostapd,madwifi: rename agmode option to hwmode. 11a and 11g aren't the...
authoragb <agb@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 31 Dec 2008 19:09:26 +0000 (19:09 +0000)
committeragb <agb@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 31 Dec 2008 19:09:26 +0000 (19:09 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13790 3c298f89-4303-0410-b956-a3cf2f4a3e73

docs/wireless.tex
package/hostapd/files/hostapd.sh
package/madwifi/files/lib/wifi/madwifi.sh

index 0f87810..bc41b0e 100644 (file)
@@ -31,7 +31,7 @@ config wifi-iface
 config wifi-device      "wifi0"
     option type         "atheros"
     option channel      "5"
-    option agmode      "11g"
+    option hwmode      "11g"
 
 config wifi-iface
     option device       "wifi0"
@@ -99,18 +99,18 @@ config wifi-device    wifi device name
     option channel    1-14
     option maxassoc   1-128 (broadcom only)
     option distance   1-n
-    option agmode     11b, 11g, 11a, 11bg (atheros only)
+    option hwmode     11b, 11g, 11a, 11bg (atheros, mac80211)
     option rxantenna  0,1,2 (atheros, broadcom)
     option txantenna  0,1,2 (atheros, broadcom)
 
 config wifi-iface
-    option network  the interface you want wifi to bridge with 
+    option network  the interface you want wifi to bridge with
     option device   wifi0, wifi1, wifi2, wifiN
     option mode     ap, sta, adhoc, monitor, or wds
     option txpower  transmission power in dBm
     option ssid     ssid name
     option bssid    bssid address
-    option encryption none, wep, psk, psk2, wpa, wpa2 
+    option encryption none, wep, psk, psk2, wpa, wpa2
     option key      encryption key
     option key1     key 1
     option key2     key 2
index a6f5dba..1c2fa35 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
index 638640a..db7f057 100755 (executable)
@@ -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 ] && {
This page took 0.03543 seconds and 4 git commands to generate.