2 # Copyright (C) 2006 OpenWrt.org
6 [ -f /proc
/net
/wl0
] && {
7 lsmod |
grep wlcompat
>&- || insmod wlcompat
9 iwconfig
"$INTERFACE" 2>&- |
grep -v 'no wireless' >&- && {
15 [ -d /proc
/switch
] ||
{
17 insmod switch-robo || insmod switch-adm
19 if="$(echo "$INTERFACE" | sed s,eth,et,)"
20 ifconfig
"$INTERFACE" up
2>&- >&-
21 [ -d "/proc/switch/$INTERFACE" ] ||
return 0
22 echo "1" > "/proc/switch/$INTERFACE/reset"
23 echo "1" > "/proc/switch/$INTERFACE/enable_vlan"
24 for vlan
in $
(seq 0 15); do
25 eval "hwname=\"\${vlan${vlan}hwname}\""
26 [ "$hwname" = "$if" ] && {
27 eval "vports=\"\${vlan${vlan}ports}\""
28 [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports"
29 $DEBUG vconfig add
"$INTERFACE" "$vlan"
36 case "${INTERFACE%%[0-9]*}" in
44 add|register
) do_register
;;