kernel: usbnet: Restore usb%d naming for cdc-ethernet devices with local MAC
authorAhmed Naseef <naseefkm@gmail.com>
Tue, 28 Jan 2025 07:28:31 +0000 (11:28 +0400)
committerRobert Marko <robimarko@gmail.com>
Thu, 6 Mar 2025 14:49:45 +0000 (15:49 +0100)
commitecd609f509f29ed1f75db5c7a623f359c64efb72
tree8cd6632857606c291ed19b083ce97deb64e825c8
parentd8315d5358d59233d9f1ff8353f1ce6f3428e1e5
kernel: usbnet: Restore usb%d naming for cdc-ethernet devices with local MAC

Prior to commit https://github.com/torvalds/linux/commit/8a7d12d674ac6f2147c18f36d1e15f1a48060edf,
cdc-ethernet USB LTE modems (e.g. Quectel EC200A) were consistently named
usb0. After 8a7d12d67, devices began renaming to eth1 due to an assumption
that local MAC addresses originate exclusively from the kernel. Some
devices provide driver-assigned local MACs, causing point-to-point
interfaces with driver-set MACs to adopt eth%d names instead of usb%d.

Restore the naming exception for point-to-point devices: interfaces
without driver MACs or with driver-provided local MACs will retain the
usb%d convention. This addresses issues reported in [1] and fixed in [2].

[1] https://lore.kernel.org/all/Z00udyMgW6XnAw6h@atmark-techno.com/
[2] https://lore.kernel.org/all/20241203130457.904325-1-asmadeus@codewreck.org/

Tested-by: Ahmed Naseef <naseefkm@gmail.com>
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17757
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/generic/pending-6.6/155-usbnet-restore-usb%d-name-exception-for-local-mac-addresses.patch [new file with mode: 0644]