3 # Copyright (c) 2015 The Linux Foundation. All rights reserved.
4 # Copyright (c) 2011-2015 OpenWrt.org
7 .
/lib
/functions
/uci-defaults.sh
9 .
/lib
/functions
/system.sh
13 board
=$
(ipq806x_board_name
)
22 ucidef_add_switch
"switch0" \
23 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
26 ucidef_add_switch
"switch0" \
27 "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "6@eth1" "5:wan" "0@eth0"
30 ucidef_set_interface_lan
"eth1 eth2 eth3"
31 ucidef_add_switch
"switch0" \
32 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
36 hw_mac_addr
=$
(mtd_get_mac_ascii devinfo hw_mac_addr
)
37 ucidef_add_switch
"switch0" \
38 "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
39 ucidef_set_interface_macaddr
"lan" "$hw_mac_addr"
40 ucidef_set_interface_macaddr
"wan" "$hw_mac_addr"
43 hw_mac_addr
=$
(mtd_get_mac_ascii
0:APPSBLENV ethaddr
)
44 ucidef_add_switch
"switch0" \
45 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
46 ucidef_set_interface_macaddr
"lan" "$hw_mac_addr"
47 ucidef_set_interface_macaddr
"wan" "$(macaddr_add $hw_mac_addr 1)"
50 echo "Unsupported hardware. Network interfaces not intialized"