]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit460d6ec90c2c67aa63a790d8bdd27dbdbd078174
tree2230ab0fb068ce474e57ea233db27bdc3bc7d82a
parentf8a442535cadeb4b172bf40e3a87556f9139bb59
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