mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
ramips: gehua ghl: switch to new hnat driver
This commit is contained in:
parent
b31fe9b0f6
commit
0eed36f2ea
@ -9,10 +9,6 @@
|
|||||||
compatible = "gehua,ghl-r-001", "mediatek,mt7621-soc";
|
compatible = "gehua,ghl-r-001", "mediatek,mt7621-soc";
|
||||||
model = "GeHua GHL-R-001";
|
model = "GeHua GHL-R-001";
|
||||||
|
|
||||||
aliases {
|
|
||||||
label-mac-device = ðernet;
|
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
@ -110,19 +106,31 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
ðernet {
|
&gmac0 {
|
||||||
compatible = "mediatek,ralink-mt7621-eth";
|
|
||||||
mediatek,switch = <&gsw>;
|
|
||||||
mtd-mac-address = <&factory 0xe000>;
|
mtd-mac-address = <&factory 0xe000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&switch0 {
|
&gmac1 {
|
||||||
/delete-property/ compatible;
|
mtd-mac-address = <&factory 0xe000>;
|
||||||
phy-mode = "rgmii";
|
mtd-mac-address-increment = <1>;
|
||||||
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&gsw {
|
&gsw {
|
||||||
compatible = "mediatek,ralink-mt7621-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 {
|
&state_default {
|
||||||
|
@ -54,7 +54,7 @@ ramips_setup_interfaces()
|
|||||||
;;
|
;;
|
||||||
gehua,ghl-r-001)
|
gehua,ghl-r-001)
|
||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"0:lan" "1:lan" "2:lan" "4:wan" "6@eth0"
|
"0:lan" "1:lan" "2:lan" "4:wan" "6u@eth0" "5u@eth1"
|
||||||
ucidef_set_interface_lan "eth0.1 ra0 rai0"
|
ucidef_set_interface_lan "eth0.1 ra0 rai0"
|
||||||
;;
|
;;
|
||||||
gnubee,gb-pc1|\
|
gnubee,gb-pc1|\
|
||||||
@ -162,10 +162,6 @@ ramips_setup_macs()
|
|||||||
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
||||||
label_mac=$wan_mac
|
label_mac=$wan_mac
|
||||||
;;
|
;;
|
||||||
gehua,ghl-r-001)
|
|
||||||
lan_mac=$(cat /sys/class/net/eth0/address)
|
|
||||||
wan_mac=$(macaddr_add "$lan_mac" 1)
|
|
||||||
;;
|
|
||||||
hiwifi,hc5962)
|
hiwifi,hc5962)
|
||||||
lan_mac=$(mtd_get_mac_ascii bdinfo "Vfac_mac ")
|
lan_mac=$(mtd_get_mac_ascii bdinfo "Vfac_mac ")
|
||||||
label_mac=$lan_mac
|
label_mac=$lan_mac
|
||||||
|
Loading…
Reference in New Issue
Block a user