ramips: mi cr660x: switch to new hnat driver

This commit is contained in:
lean 2022-07-08 03:45:37 +08:00
parent 003eb67e86
commit 4e0fd76789
3 changed files with 28 additions and 26 deletions

View File

@ -133,29 +133,26 @@
mtd-mac-address = <&factory 0x3fff4>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@4 {
status = "okay";
label = "wan";
&gmac1 {
mtd-mac-address = <&factory 0x3fffa>;
status = "okay";
};
&gsw {
mediatek,portmap = "llllw";
status = "okay";
};
&hnat {
mtketh-wan = "eth1";
mtketh-ppd = "eth0";
mtketh-lan = "eth0";
mtketh-max-gmac = <2>;
/delete-property/ mtkdsa-wan-port;
};
&switch0 {
status = "disabled";
};
&state_default {

View File

@ -37,10 +37,12 @@ dlink,dir-2660-a1)
dlink,dir-853-a3)
ucidef_set_led_netdev "wan" "wan" "blue:net" "wan"
;;
dlink,dir-853-r1|\
xiaomi,mi-router-cr660x)
dlink,dir-853-r1)
ucidef_set_led_netdev "internet" "internet" "blue:net" "wan"
;;
xiaomi,mi-router-cr660x)
ucidef_set_led_switch "internet" "internet" "blue:net" "switch0" "0x10"
;;
dlink,dir-860l-b1|\
dlink,dir-867-a1|\
dlink,dir-878-a1|\

View File

@ -23,8 +23,7 @@ ramips_setup_interfaces()
;;
ampedwireless,ally-r1900k|\
hiwifi,hc5962|\
xiaomi,mi-router-3-pro|\
xiaomi,mi-router-cr660x)
xiaomi,mi-router-3-pro)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
;;
asiarf,ap7621-001|\
@ -92,6 +91,10 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"2:lan:1" "3:lan:2" "4:lan:3" "0:wan" "6u@eth0" "5u@eth1"
;;
xiaomi,mi-router-cr660x)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "4:wan" "6u@eth0" "5u@eth1"
;;
zyxel,nr7101)
ucidef_set_interfaces_lan_wan "lan" "wan"
;;