@@ -15,6 +15,7 @@ annex="a"
encaps="llc"
payload="bridged"
lan_mac=""
+ewan_mac=""
wan_mac=""
interface_wan=""
@@ -76,8 +77,9 @@ BTHOMEHUBV3A)
BTHOMEHUBV5A)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary caldata 4364)" 1)
+ ewan_mac=$(macaddr_add "$wan_mac" 3)
ucidef_add_switch "switch0" \
- "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0"
+ "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0"
;;
DGN3500*)
@@ -111,7 +113,7 @@ P2812HNUF*)
lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" 1)
ucidef_add_switch "switch0" \
- "0:lan" "1:lan" "2:lan" "4:lan" "5:lan" "6t@eth0"
+ "0:lan" "1:lan" "2:lan" "4:lan" "5:wan" "6t@eth0"
;;
TDW8970|TDW8980)
@@ -127,15 +129,16 @@ VR200v)
;;
VGV7510KW22)
- wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 1)
+ wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 2)
+ ewan_mac=$(macaddr_add "$wan_mac" 1)
ucidef_add_switch "switch0" \
- "2:lan:2" "3:lan:1" "4:lan:4" "5:lan:3" "6t@eth0"
+ "2:lan:2" "3:lan:1" "4:lan:4" "5:lan:3" "0:wan:5" "6t@eth0"
;;
VGV7519)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 1)
ucidef_add_switch "switch0" \
- "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "6t@eth0"
+ "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0"
;;
WBMR)
@@ -172,6 +175,7 @@ ucidef_set_interface_wan "$interface_wan" "pppoe"
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac"
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac"
+[ -n "$ewan_mac" ] && ucidef_set_interface_macaddr "ewan" "$ewan_mac"
board_config_flush
@@ -252,17 +252,6 @@
phy-mode = "gmii";
phy-handle = <&phy13>;
};
- };
-
- wan: interface@1 {
- compatible = "lantiq,xrx200-pdi";
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <1>;
- mtd-mac-address = <&caldata 0x110c>;
- mtd-mac-address-increment = <4>;
- lantiq,wan;
-
ethernet@5 {
compatible = "lantiq,xrx200-pdi-port";
reg = <5>;
@@ -186,6 +186,12 @@
mtd-mac-address = <&boardconfig 0x16>;
lantiq,switch;
+ ethernet@0 {
+ compatible = "lantiq,xrx200-pdi-port";
+ reg = <0>;
+ phy-mode = "mii";
+ phy-handle = <&phy1>;
+ };
ethernet@2 {
compatible = "lantiq,xrx200-pdi-port";
reg = <2>;
@@ -212,23 +218,6 @@
};
};
- wan: interface@1 {
- compatible = "lantiq,xrx200-pdi";
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <1>;
- mtd-mac-address = <&boardconfig 0x16>;
- mtd-mac-address-increment = <2>;
- lantiq,wan;
-
- ethernet@0 {
- compatible = "lantiq,xrx200-pdi-port";
- reg = <0>;
- phy-mode = "mii";
- phy-handle = <&phy1>;
- };
- };
-
mdio@0 {
#address-cells = <1>;
#size-cells = <0>;
@@ -257,17 +257,6 @@
phy-mode = "gmii";
phy-handle = <&phy13>;
};
- };
-
- wan: interface@1 {
- compatible = "lantiq,xrx200-pdi";
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <1>;
- mtd-mac-address = <&boardconfig 0x16>;
- mtd-mac-address-increment = <2>;
- lantiq,wan;
-
ethernet@5 {
compatible = "lantiq,xrx200-pdi-port";
reg = <5>;
Remove the lantiq,wan related device tree properties. At the moment, the property is more or less pointless since it finally sets the PMAC_EWAN register which is related to the not supported hw nat offloading functionality of the switch. A port stored in the PMAC_EWAN register is shown as independent interface but not able to operate independent due to the fact that only one CPU port exists. The port has still to be managed via swconfig. These dependency is not obvious and fooled already a lot of users. Furthermore it would be more desirable to define in userspace for which ports nat offloading should be used enabled instead of having a fixed configuration. Add a default WAN vlan for xrx200 devices having a distinct WAN port and not using the lantiq,wan device tree property. Signed-off-by: Mathias Kresin <dev@kresin.me> --- .../linux/lantiq/base-files/etc/board.d/02_network | 14 ++++++++----- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 11 ----------- target/linux/lantiq/dts/VGV7510KW22.dtsi | 23 ++++++---------------- target/linux/lantiq/dts/VGV7519.dtsi | 11 ----------- 4 files changed, 15 insertions(+), 44 deletions(-)