Search Linux Wireless

How to distinguish multi PHY devices for interface naming?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

This is not an especially serious issue, but maybe I can get to the
bottom of it. I was using the Mediatek mt76 wireless driver with one
of the newer cards that presents multiple interfaces, one for 2.4g and
one for 5g. I noticed that the usual udev setup with systemd was not
naming them in a way that makes sense: one is wlp59s0 and the other is
wlan0. So I investigated, and found that udev doesn't have access to
any information that could distinguish the two interfaces that share
the same PCI port path.

Here's the issue I opened with the Mediatek maintainer:
https://github.com/nbd168/wireless/issues/12
"Systemd assigns the first, wlp59s0, using the path-based name, but
then the second one tries to assign its name in the same manner and it
conflicts, so it has to fall back to wlan0." I took a look at the
kernel sources for this area, as best I can understand them, and made
the suggestion to set a netdev phys_port_id attribute uniquely for
each interface. That would result in wlp59s0n0 and wlp59s0n1. (There
appear to be two other possible methods, though, corresponding to 'f'
function and 'd' device port. Unfortunately I never made it that far,
trying to learn the implementation details.)

I got the response, "the driver is not responsible for managing
netdevs and their attributes - that's all handled by the mac80211
stack. What the driver does is register two ieee80211 wiphys on the
same PCIe device. There are no separate devices here, because on a PCI
level, there is no isolation at all. It really is a single device. The
wiphys operate independently from each other, so naturally the
auto-created netdevs do so as well. ... Not sure what the solution is
here."

Is this the 802.11 stack's concern, or the device drivers'? How could
udev get the info to distinguish these network interfaces, and which
approach is the right one for wireless devices?

Thanks,
John




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux