2 # Copyright (c) 2015 The Linux Foundation. All rights reserved.
3 # Copyright (c) 2011-2015 OpenWrt.org
6 . /lib/functions/uci-defaults.sh
7 . /lib/functions/system.sh
16 ucidef_add_switch "switch0" \
17 "2:lan" "3:lan" "4:lan" "5:lan" "6@eth1" "1:wan" "0@eth0"
19 buffalo,wxr-2533dhp |\
26 ucidef_add_switch "switch0" \
27 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
30 ucidef_set_interfaces_lan_wan "eth1" "eth0"
31 ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:ART" 0x6)"
32 ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary "0:ART" 0x0)"
35 hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
36 ucidef_add_switch "switch0" \
37 "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "6@eth1" "1:wan" "0@eth0"
38 ucidef_set_interface_macaddr "lan" "$hw_mac_addr"
39 ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
42 hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
43 ucidef_add_switch "switch0" \
44 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
45 ucidef_set_interface_macaddr "lan" "$hw_mac_addr"
46 ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
49 ucidef_add_switch "switch0" \
50 "2:lan" "3:lan" "4:lan" "5:lan" "0@eth1" "1:wan" "6@eth0"
55 ucidef_add_switch "switch0" \
56 "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "6@eth1" "5:wan" "0@eth0"
59 ucidef_set_interface_lan "eth1 eth2"
60 ucidef_add_switch "switch0" \
61 "0:lan" "1:lan" "2:lan" "3u@eth1" "6:wan" "4u@eth0"
64 ucidef_set_interface_lan "eth1 eth2 eth3"
65 ucidef_add_switch "switch0" \
66 "1:lan" "2:lan" "3:lan" "4:lan" "6u@eth1" "5:wan" "0u@eth0"
69 ucidef_set_interface_lan "eth0 eth1"
72 hw_mac_addr=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr)
73 ucidef_add_switch "switch0" \
74 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
75 ucidef_set_interface_macaddr "lan" "$(macaddr_add $hw_mac_addr 2)"
76 ucidef_set_interface_macaddr "wan" "$(macaddr_add $hw_mac_addr 3)"
79 echo "Unsupported hardware. Network interfaces not intialized"