qtnfmac: assign each wiphy to its own virtual platform device
authorSergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Thu, 13 Feb 2020 11:45:31 +0000 (11:45 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 12 Mar 2020 13:38:58 +0000 (15:38 +0200)
commit616f5701f4ab7deb89a6534a481c8c5b5658278f
tree2230ab0fb068ce474e57ea233db27bdc3bc7d82a
parentc3d476d21851d96aaf5b354786d4570c405788e5
qtnfmac: assign each wiphy to its own virtual platform device

Quantenna Pearl device exposes multiple (up to 3) radio interfaces under
single PCIe function. So far all the wiphy devices were attached to the
same pcie device. As a result, all different wireless network devices
were reported under the same sysfs directory for pcie device, e.g.:

$ ls  /sys/class/net/wlan0/device/net/
  wlan0 wlan1

It turns out that such behavior may confuse various users of wireless
subsystem. For instance, it turned out to be the case for:
- Linux init systems, e.g. for renaming based on parent device
- OpenWRT configuration scripts

Suggested solution is to add an intermediate virtual platform device
for each radio interface.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
drivers/net/wireless/quantenna/qtnfmac/core.c
drivers/net/wireless/quantenna/qtnfmac/core.h