OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 5... Line 5...
5 # 5 #
Line 6... Line 6...
6   6  
7 . /lib/functions/uci-defaults.sh 7 . /lib/functions/uci-defaults.sh
Line 8... Line -...
8 . /lib/functions/system.sh -  
9   -  
10 ipq40xx_setup_interfaces() -  
11 { -  
12 local board="$1" -  
13   -  
14 case "$board" in -  
15 8dev,jalapeno|\ -  
16 alfa-network,ap120c-ac) -  
17 ucidef_set_interfaces_lan_wan "eth0" "eth1" -  
18 ;; -  
19 asus,map-ac2200|\ -  
20 openmesh,a42|\ -  
21 openmesh,a62) -  
22 ucidef_set_interfaces_lan_wan "eth1" "eth0" -  
23 ;; -  
24 asus,rt-ac58u|\ -  
25 zyxel,nbg6617) -  
26 ucidef_set_interfaces_lan_wan "eth0" "eth1" -  
27 ucidef_add_switch "switch0" \ -  
28 "0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" -  
29 ;; -  
30 avm,fritzbox-4040|\ -  
31 linksys,ea6350v3) -  
32 ucidef_set_interfaces_lan_wan "eth0" "eth1" -  
33 ucidef_add_switch "switch0" \ -  
34 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" -  
35 ;; -  
36 avm,fritzbox-7530) -  
37 ucidef_add_switch "switch0" \ -  
38 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" -  
39 ;; -  
40 compex,wpj428) -  
41 ucidef_set_interface_lan "eth0 eth1" -  
42 ;; -  
43 engenius,eap1300|\ -  
44 meraki,mr33|\ -  
45 netgear,ex6100v2|\ -  
46 netgear,ex6150v2|\ -  
47 zyxel,wre6606) -  
48 ucidef_set_interface_lan "eth0" -  
49 ;; -  
50 glinet,gl-b1300) -  
51 ucidef_set_interfaces_lan_wan "eth0" "eth1" -  
52 ucidef_add_switch "switch0" \ -  
53 "0u@eth0" "3:lan" "4:lan" -  
54 ;; -  
55 qxwlan,e2600ac-c1 |\ -  
56 qxwlan,e2600ac-c2) -  
57 ucidef_set_interfaces_lan_wan "eth0" "eth1" -  
58 ucidef_add_switch "switch0" \ -  
59 "0u@eth0" "3:lan" "4:lan" "0u@eth1" "5:wan" -  
60 ;; -  
61 *) -  
62 echo "Unsupported hardware. Network interfaces not initialized" -  
63 ;; -  
64 esac -  
65 } -  
66   -  
67 ipq40xx_setup_macs() -  
68 { -  
69 local board="$1" -  
70   -  
71 case "$board" in -  
72 asus,rt-ac58u) -  
73 CI_UBIPART=UBI_DEV -  
74 wan_mac=$(mtd_get_mac_binary_ubi Factory 20486) -  
75 lan_mac=$(mtd_get_mac_binary_ubi Factory 4102) -  
76 ;; -  
77 linksys,ea6350v3) -  
78 wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) -  
79 lan_mac=$(macaddr_add "$wan_mac" 1) -  
80 ;; -  
81 esac -  
82   -  
83 [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac -  
84 [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac -  
85 } 8 . /lib/functions/system.sh
-   9  
86   10 board_config_update
-   11  
-   12 board=$(board_name)
-   13  
-   14 case "$board" in
-   15 8dev,jalapeno)
-   16 ucidef_set_interfaces_lan_wan "eth0" "eth1"
-   17 ;;
-   18 asus,rt-ac58u)
-   19 CI_UBIPART=UBI_DEV
-   20 wan_mac_addr=$(mtd_get_mac_binary_ubi Factory 20486)
-   21 lan_mac_addr=$(mtd_get_mac_binary_ubi Factory 4102)
-   22 ucidef_set_interfaces_lan_wan "eth0" "eth1"
-   23 ucidef_add_switch "switch0" \
-   24 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
-   25 ucidef_set_interface_macaddr "lan" "$lan_mac_addr"
-   26 ucidef_set_interface_macaddr "wan" "$wan_mac_addr"
-   27 ;;
-   28 avm,fritzbox-4040)
-   29 ucidef_set_interfaces_lan_wan "eth0" "eth1"
-   30 ucidef_add_switch "switch0" \
-   31 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
87 board_config_update 32 ;;
-   33 compex,wpj428)
-   34 ucidef_set_interface_lan "eth0 eth1"
-   35 ;;
-   36 glinet,gl-b1300)
-   37 ucidef_set_interfaces_lan_wan "eth0" "eth1"
-   38 ucidef_add_switch "switch0" \
-   39 "0u@eth0" "3:lan" "4:lan"
-   40 ;;
-   41 openmesh,a42 |\
-   42 openmesh,a62)
-   43 ucidef_set_interfaces_lan_wan "eth1" "eth0"
-   44 ;;
-   45 meraki,mr33 |\
-   46 netgear,ex6100v2 |\
88 board=$(board_name) 47 netgear,ex6150v2 |\
-   48 zyxel,wre6606)
-   49 ucidef_set_interface_lan "eth0"
-   50 ;;
-   51 *)
-   52 echo "Unsupported hardware. Network interfaces not intialized"
-   53 ;;
89 ipq40xx_setup_interfaces $board 54 esac
Line 90... Line 55...
90 ipq40xx_setup_macs $board 55