[RFC 6/6] qoriq: m300 switchport mac assignment order

Evan Jobling evan.jobling at mslsc.com.au
Wed Oct 9 01:08:23 PDT 2024


before mac addresses were out of order.
Now order is correct.

Known issues:
conduit 0 and conduit 1 have the same MAC as some of the
switchports.

Signed-off-by: Evan Jobling <evan.jobling at mslsc.com.au>
---
 target/linux/qoriq/base-files/etc/board.d/02_network | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/target/linux/qoriq/base-files/etc/board.d/02_network b/target/linux/qoriq/base-files/etc/board.d/02_network
index 5e2780ea53..d4e534ecbb 100644
--- a/target/linux/qoriq/base-files/etc/board.d/02_network
+++ b/target/linux/qoriq/base-files/etc/board.d/02_network
@@ -43,12 +43,11 @@ watchguard,firebox-m300)
 
 	eth_mac_offset=0x186d
 
-	for eth in $(find /sys/class/net/ -name 'eth[3-7]' -print); do
-		device="$(basename "$eth")"
+	for eth in "eth3" "eth4" "eth5" "eth6" "eth7"; do
 		mac="$(mtd_get_mac_text wg_cfg0 "$eth_mac_offset")"
-		switchports="$switchports $device"
-		ucidef_set_network_device_mac "$device" "$mac"
-		wg_set_opt_interface "$device" "${device#eth}"
+		switchports="$switchports $eth"
+		ucidef_set_network_device_mac "$eth" "$mac"
+		wg_set_opt_interface "$eth" "${eth#eth}"
                 eth_mac_offset=$(printf "0x%X\n" $(( $eth_mac_offset + 0x14)))
 	done
 
-- 
2.39.5




More information about the openwrt-devel mailing list