English Language flag
// Log In
// CVSweb
Project: FreeWRT
// Summary // Activity // Search // Tracker // Lists // News // SCM // Wiki

SCM Repository

ViewVC logotype

Contents of /branches/freewrt_1_0/package/broadcom-wl-util/files/wireless-broadcom.up

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2542 - (show annotations) (download)
Fri May 18 20:02:50 2007 UTC (6 years, 9 months ago) by wbx
File size: 1384 byte(s)
add fix for more than two wds nodes
1 #!/bin/sh
2 #
3 # WDS configuration script, WDS needs to be activated after bridge
4 #
5 [ "$IF_WIRELESS_TYPE" != "broadcom" ] && exit 0
6 [ "$IF_WIRELESS_MODE" != "wds" ] && exit 0
7 logger -t wireless "setting lazywds to $IF_WIRELESS_LAZYWDS"
8 [ "$IF_WIRELESS_LAZYWDS" ] && wl lazywds $IF_WIRELESS_LAZYWDS
9 logger -t wireless "adding wds nodes $IF_WIRELESS_WDS"
10 wl wds $IF_WIRELESS_WDS
11 [ "$IF_WIRELESS_SECURITY" = "wpa-psk" ] && {
12 # wpa rekeying
13 gtk_rekey=$IF_WIRELESS_WPA_GTK_REKEY
14 gtk_rekey=${gtk_rekey#0}
15 gtk_rekey=${gtk_rekey:-3600}
16 case "$IF_WIRELESS_ENCRYPTION" in
17 wep)
18 crypto_num=1
19 ;;
20 tkip)
21 crypto_num=2
22 ;;
23 aes)
24 crypto_num=4
25 ;;
26 aes+tkip)
27 crypto_num=6
28 ;;
29 esac
30 case "$IF_WIRELESS_AUTHORIZATION" in
31 psk)
32 auth=4
33 ;;
34 psk2)
35 auth=128
36 ;;
37 "psk psk2")
38 auth=132
39 ;;
40 esac
41 wl ssid $IF_WIRELESS_SSID
42 /usr/sbin/nas -P /var/run/nas.lan.pid -l $IF_WIRELESS_WDS_BRIDGE -H 34954 -i $IF_BRIDGE_IFACES -A -m $auth -k $IF_WIRELESS_WPA_KEY -s $IF_WIRELESS_SSID -w $crypto_num -g $gtk_rekey &
43 [ "$IF_WIRELESS_WDS_SECURITY" = "wpa-psk" ] && {
44 sleep 10 &&
45 for i in $(ip link show|awk -F : '/wds/ {print $2}'); do /usr/sbin/nas4not lan $i up auto $IF_WIRELESS_WDS_ENCRYPTION psk $IF_WIRELESS_WDS_WPA_KEY $IF_WIRELESS_SSID;done &
46 }
47 }
48 exit 0

root@freewrt.org:443
ViewVC Help
Powered by ViewVC 1.1.20