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
)
23 ucidef_add_switch
"switch0" \
24 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
27 ucidef_set_interface_lan
"eth1 eth2 eth3"
28 ucidef_add_switch
"switch0" \
29 "1:lan" "2:lan" "3:lan" "4:lan" "6u@eth1" "5:wan" "0u@eth0"
33 hw_mac_addr
=$
(mtd_get_mac_ascii devinfo hw_mac_addr
)
34 ucidef_add_switch
"switch0" \
35 "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
36 ucidef_set_interface_macaddr
"lan" "$hw_mac_addr"
37 ucidef_set_interface_macaddr
"wan" "$hw_mac_addr"
40 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
41 ucidef_add_switch
"switch0" \
42 "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
45 hw_mac_addr
=$
(mtd_get_mac_ascii
0:APPSBLENV ethaddr
)
46 ucidef_add_switch
"switch0" \
47 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
48 ucidef_set_interface_macaddr
"lan" "$hw_mac_addr"
49 ucidef_set_interface_macaddr
"wan" "$(macaddr_add $hw_mac_addr 1)"
52 echo "Unsupported hardware. Network interfaces not intialized"