]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev-builtin-net_id: Add DeviceTree-based names for WLAN devices 39060/head
authordramforever <dramforever@live.com>
Fri, 19 Sep 2025 13:52:00 +0000 (21:52 +0800)
committerdramforever <dramforever@live.com>
Tue, 23 Sep 2025 19:13:32 +0000 (03:13 +0800)
commit20693ffcd8582af8bf225fbd86192d8928ca01a4
treeda0d3857153f36ec483bbd9faa3420c4047ed8fc
parentd096f80b27580fc124e7c0551f73e8432e836a05
udev-builtin-net_id: Add DeviceTree-based names for WLAN devices

Add support for generating names like wldN based on DeviceTree aliases.

DeviceTree alias names follow de facto conventions. As of writing, there
are so far two ways WLAN devices are represented in DeviceTree aliases
in upstream Linux DTS files:

- Firstly, as wifi0, used for example in t600x-j314-j316.dtsi
- Secondly, as ethernet0 or ethernet1, used for example in
  sun8i-q8-common.dtsi, with a comment saying the reason is to "Make
  u-boot set mac-address for wifi without an eeprom"

Therefore for prefix "wl", try alias_prefix "wifi" first, and if that
was not found, fall back to alias_prefix "ethernet"

Since this is a naming scheme change, also gate this behind
NAMING_DEVICETREE_ALIASES_WLAN and NAMING_V259, and document this
change.
man/systemd.net-naming-scheme.xml
src/shared/netif-naming-scheme.c
src/shared/netif-naming-scheme.h
src/udev/udev-builtin-net_id.c