projects
/
openwrt
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5f30b3d
)
madwifi: only start hostapd when necessary
author
Felix Fietkau
<nbd@openwrt.org>
Thu, 28 Aug 2008 12:13:36 +0000
(12:13 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Thu, 28 Aug 2008 12:13:36 +0000
(12:13 +0000)
SVN-Revision: 12420
package/madwifi/files/lib/wifi/madwifi.sh
patch
|
blob
|
history
diff --git
a/package/madwifi/files/lib/wifi/madwifi.sh
b/package/madwifi/files/lib/wifi/madwifi.sh
index cc340977b2692fe2ad9541e2e3e9b5d79a33adad..0b24886903de29bc4b3c1288b7407a1d20e4519b 100755
(executable)
--- a/
package/madwifi/files/lib/wifi/madwifi.sh
+++ b/
package/madwifi/files/lib/wifi/madwifi.sh
@@
-78,6
+78,7
@@
enable_atheros() {
local first=1
for vif in $vifs; do
local first=1
for vif in $vifs; do
+ local start_hostapd
nosbeacon=
config_get ifname "$vif" ifname
config_get enc "$vif" encryption
nosbeacon=
config_get ifname "$vif" ifname
config_get enc "$vif" encryption
@@
-137,7
+138,6
@@
enable_atheros() {
[ -n "$wdssep" ] && iwpriv "$ifname" wdssep "$wdssep"
}
[ -n "$wdssep" ] && iwpriv "$ifname" wdssep "$wdssep"
}
- wpa=
case "$enc" in
WEP|wep)
for idx in 1 2 3 4; do
case "$enc" in
WEP|wep)
for idx in 1 2 3 4; do
@@
-152,6
+152,7
@@
enable_atheros() {
esac
;;
PSK|psk|PSK2|psk2)
esac
;;
PSK|psk|PSK2|psk2)
+ start_hostapd=1
config_get key "$vif" key
;;
esac
config_get key "$vif" key
;;
esac
@@
-261,7
+262,7
@@
enable_atheros() {
config_get_bool isolate "$vif" isolate 0
iwpriv "$ifname" ap_bridge "$((isolate^1))"
config_get_bool isolate "$vif" isolate 0
iwpriv "$ifname" ap_bridge "$((isolate^1))"
- if eval "type hostapd_setup_vif" 2>/dev/null >/dev/null; then
+ if
[ -n "$start_hostapd" ] &&
eval "type hostapd_setup_vif" 2>/dev/null >/dev/null; then
hostapd_setup_vif "$vif" madwifi || {
echo "enable_atheros($device): Failed to set up hostapd for interface $ifname" >&2
# make sure this wifi interface won't accidentally stay open without encryption
hostapd_setup_vif "$vif" madwifi || {
echo "enable_atheros($device): Failed to set up hostapd for interface $ifname" >&2
# make sure this wifi interface won't accidentally stay open without encryption