Revert "udev: Always enumerate wifi phys from 0"

This reverts commit bf1eca0567.

This mess up order if having more than 1 phy, have not been
reproduce the error that got me to introduce this fix from
the beginning.
This commit is contained in:
Mattias Walström
2026-01-23 13:05:32 +01:00
parent da412cdc04
commit fd38b18bb7
2 changed files with 1 additions and 9 deletions
@@ -1,3 +1,3 @@
# Rename WiFi PHY devices from phy0 to radio0 to avoid name clashes
SUBSYSTEM=="ieee80211", ACTION=="add", KERNEL=="phy*", \
RUN+="/usr/libexec/infix/rename-wifi-phy %k"
RUN+="/bin/sh -c '/usr/sbin/iw phy %k set name radio%n'"
@@ -1,8 +0,0 @@
#!/bin/sh
# Rename WiFi PHY to radio{N}, enumerating from 0
phy="$1"
n=0
while [ -d "/sys/class/ieee80211/radio$n" ]; do
n=$((n + 1))
done
/usr/sbin/iw phy "$phy" set name "radio$n"