nl80211: restore iterating over all devices in nl80211_phy2ifname()
authorAndre Heider <a.heider@gmail.com>
Mon, 30 Jan 2023 18:57:57 +0000 (19:57 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Mon, 6 Feb 2023 20:31:45 +0000 (21:31 +0100)
commitc7eb8ebe33de2ff2d08064258edb047e5ac09f29
tree39a354172b3cd97f6964e4245b4e05e7931ddf15
parent1e4e709d6f26cc38411ca189bab04f857b444ef3
nl80211: restore iterating over all devices in nl80211_phy2ifname()

This reverts to the earlier behaviour, because:
* phys can be renamed, which breaks hardcoding "phy%d"
* /sys/class/ieee80211/*/device can return networks of other phys,
  since "device" is a symlink which can have multiple phys

The earlier behaviour fixes both points.

Fixes: 6194aaf0 "nl80211: simplify iterating over phy's devices"
Signed-off-by: Andre Heider <a.heider@gmail.com>
Tested-by: Olcay Korkmaz <nuke_mania@hotmail.com>
[ drop extra Fixes tag related to openwrt issue ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
iwinfo_nl80211.c