summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-11-11 21:59:34 +0000
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-11-11 21:59:34 +0000
commitb0fb4a6b50572bb3e44a2be3ca5a3c2ee085dec2 (patch)
tree8c8c12e2db9f888bcce5373751acc94f8a78680a
parente907d258f8a4b982d47a802d6e8b39580e3e952c (diff)
broadcom-wl: use a single instance of 'nas' per 'wl' device
A single instance of 'nas' can support multiple interfaces; there's no need to run multiple instances. Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38752 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
index 506b077ef2..80cd9d5f3d 100644
--- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
+++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
@@ -334,13 +334,15 @@ enable_broadcom() {
append if_up "set_wifi_up '$vif' '$ifname'" ";$N"
append if_up "start_net '$ifname' '$net_cfg'" ";$N"
}
- [ -z "$nasopts" ] || {
+ [ -z "$nas" -o -z "$nasopts" ] || {
eval "${vif}_ssid=\"\$ssid\""
nas_mode="-A"
[ "$mode" = "sta" ] && nas_mode="-S"
- [ -z "$nas" ] || {
- nas_cmd="${nas_cmd:+$nas_cmd$N}start-stop-daemon -S -b -p /var/run/nas.$ifname.pid -x $nas -- -P /var/run/nas.$ifname.pid -H 34954 -i $ifname $nas_mode -m $auth -w $wsec -s \"\$${vif}_ssid\" -g 3600 -F $nasopts"
+ [ -z "$nas_cmd" ] && {
+ local pid_file=/var/run/nas.$device.pid
+ nas_cmd="start-stop-daemon -S -b -p $pid_file -x $nas -- -P $pid_file -H 34954"
}
+ append nas_cmd "-i $ifname $nas_mode -m $auth -w $wsec -s \"\$${vif}_ssid\" -g 3600 -F $nasopts"
}
_c=$(($_c + 1))
done