projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ar71xx] register GPIO buttons on the AP83 board
[openwrt.git]
/
package
/
hostapd
/
files
/
hostapd.sh
diff --git
a/package/hostapd/files/hostapd.sh
b/package/hostapd/files/hostapd.sh
index
49b30cf
..
a6f5dba
100644
(file)
--- a/
package/hostapd/files/hostapd.sh
+++ b/
package/hostapd/files/hostapd.sh
@@
-74,10
+74,20
@@
hostapd_setup_vif() {
config_get ssid "$vif" ssid
config_get device "$vif" device
config_get channel "$device" channel
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=
+ [ "$channel" -gt 14 ] && agmode=a
+ ;;
+ esac
cat > /var/run/hostapd-$ifname.conf <<EOF
driver=$driver
interface=$ifname
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
channel=$channel
${bridge:+bridge=$bridge}
ssid=$ssid
@@
-86,6
+96,6
@@
wpa=$wpa
wpa_pairwise=$crypto
$hostapd_cfg
EOF
wpa_pairwise=$crypto
$hostapd_cfg
EOF
- hostapd -B /var/run/hostapd-$ifname.conf
+ hostapd -
P /var/run/wifi-$ifname.pid -
B /var/run/hostapd-$ifname.conf
}
}
This page took
0.022502 seconds
and
4
git commands to generate.