nl80211: prefer non-supplicant-based devices
authorAndre Heider <a.heider@gmail.com>
Sat, 24 Dec 2022 11:03:01 +0000 (12:03 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Fri, 20 Jan 2023 16:26:59 +0000 (17:26 +0100)
commit2c4ee842e57b02cc7d2dd748ccb6ac61561a3ac4
tree3723618f0e126d60738c67b36eb9c5a185df82da
parent6194aaf05244241d2f51c471a43584f8d80b64ce
nl80211: prefer non-supplicant-based devices

If a phy has multiple devices, prefer non-supplicant-based ones as per
link_mode, see [0] and [1].

The nl80211 API provides more information than wpa_supplicant/hostapd does,
like HT/VHT operation, which are used by e.g. luci's channel analysis.

[0] https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-net
[1] https://github.com/openwrt/luci/issues/6167#issuecomment-1364500296

Signed-off-by: Andre Heider <a.heider@gmail.com>
iwinfo_nl80211.c