Auto Assign Mac Address to LTE Modems

Hello Everyone,

I'm currently working with two EC200A-CN LTE modems attached to my router via PCIe interfaces. After connecting, they display random MAC addresses for both USB interfaces (see attached image).

I would like to assign specific MAC addresses from my pool to these interfaces. For reference, I've successfully set MAC addresses for other Ethernet ports and WLAN in the DTS file as shown below:

&switch0 {
	ports {
		port@0 {
			status = "okay";
			label = "lan1";
			mtd-mac-address = <&factory 0xe000>;
			mtd-mac-address-increment = <4>;
		};

		port@1 {
			status = "okay";
			label = "lan2";
			mtd-mac-address = <&factory 0xe000>;
			mtd-mac-address-increment = <5>;
		};

		port@2 {
			status = "okay";
			label = "lan3";
			mtd-mac-address = <&factory 0xe000>;
			mtd-mac-address-increment = <6>;
		};

		port@3 {
			status = "okay";
			label = "lan4";
			mtd-mac-address = <&factory 0xe000>;
			mtd-mac-address-increment = <7>;
		};

		port@4 {
			status = "okay";
			label = "wan";
			mtd-mac-address = <&factory 0xe000>;
			mtd-mac-address-increment = <1>;
		};
	};
};

I'm seeking suggestions on how to apply a similar configuration for the LTE modems connected via PCIe. Any advice or guidance would be greatly appreciated!

Thank you in advance!

There's no device tree support in any USB network device drivers I know of, so using device tree for this won't work wihout patching the driver.

But you can use a hotplug script to configure whatever mac address you want.

Don't see the point though... What do you achieve by doing this? The "mac address" is completely virtual and only visible on the USB link between your OpenWrt host and the modem. There is no ethernet header on the LTE side of the modem