PROBLEM: No static MAC address for usb gadget ethernet via kernel parameter any more.

From: Maximilian Senftleben
Date: Thu May 12 2022 - 09:44:30 EST


[1.] One line summary of the problem:

No static MAC address for usb gadget ethernet via kernel boot parameter any more.

[2.] Full description of the problem/report:

In 5.15. and before we were able to set a static MAC address for the usb gadget ethernet connection using kernel parameters "g_ether.dev_addr" and "g_ether.host_addr".
Since 5.16. and more concrete after commit 890d5b40908bfd1a79be018d2d297cf9df60f4ee, this is no longer possible, and a random MAC address is assigned.
(Possible Regression)

[3.] Keywords (i.e., modules, networking, kernel):
usb, gadget, mac, g_ether

[4.] Kernel information
[4.1.] Kernel version (from /proc/version):
Linux version 5.17.4-141174-ge11818a6ec02 (ms@local) (arm-v7a-linux-gnueabihf-gcc (OSELAS.Toolchain-2020.08.0 10-20200822) 10.2.1 20200822, GNU ld (GNU Binutils) 2.35) #14 SMP Thu May 12 13:51:50 CEST 2022
[4.2.] Kernel .config file:
-

[5.] Most recent kernel version which did not have the bug:
5.15

[6.] Output of Oops.. message (if applicable) with symbolic information resolved (see Documentation/admin-guide/bug-hunting.rst)
-

[7.] A small shell script or example program which triggers the problem (if possible)
-

[8.] Environment
-

[9.] Other notes, patches, fixes, workarounds:

In 5.17.4 reverting said commit 890d5b40908bfd1a79be018d2d297cf9df60f4ee did resolve the issue for me.