nl80211: don't guess if a name is an ifname
authorAndre Heider <a.heider@gmail.com>
Tue, 15 Nov 2022 13:12:41 +0000 (14:12 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 15 Dec 2022 20:22:18 +0000 (21:22 +0100)
commita77d915568a3cf5011eb9b0ff20f7f1e507090ae
tree0fcdba45a4587971d2e19079e32ae6d313aefacb
parentc27ce7113e5226c8a0689c30b34e0e547dd43d25
nl80211: don't guess if a name is an ifname

It's too slow to do it all over again and again, especially with e.g.
luci constantly polling.

Before:
$ time iwinfo phy0 info
real 0m 0.54s
$ time iwinfo radio0 info
real 0m 0.70s
$ time ubus call luci-rpc getWirelessDevices
real 0m 0.67s

After:
$ time iwinfo phy0 info
real 0m 0.04s
$ time iwinfo radio0 info
real 0m 0.09s
$ time ubus call luci-rpc getWirelessDevices
real 0m 0.17s

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