diff options
-rw-r--r-- | target/linux/ipq806x/base-files/lib/preinit/04_reorder_eth | 13 | ||||
-rw-r--r-- | target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts | 4 |
2 files changed, 15 insertions, 2 deletions
diff --git a/target/linux/ipq806x/base-files/lib/preinit/04_reorder_eth b/target/linux/ipq806x/base-files/lib/preinit/04_reorder_eth new file mode 100644 index 0000000000..9f58473617 --- /dev/null +++ b/target/linux/ipq806x/base-files/lib/preinit/04_reorder_eth @@ -0,0 +1,13 @@ +. /lib/functions.sh + +preinit_reorder_eth() { + case $(board_name) in + ubnt,unifi-ac-hd) + ip link set eth0 name ethtmp + ip link set eth1 name eth0 + ip link set ethtmp name eth1 + ;; + esac +} + +boot_hook_add preinit_main preinit_reorder_eth diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts index 70c51b90f3..672be3ca2c 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts @@ -16,8 +16,8 @@ led-running = &led_dome_blue; led-upgrade = &led_dome_blue; mdio-gpio0 = &mdio0; - ethernet0 = &gmac1; - ethernet1 = &gmac2; + ethernet0 = &gmac2; + ethernet1 = &gmac1; }; leds { |