nl80211: fix phy/netdev index lookup
authorFelix Fietkau <nbd@nbd.name>
Thu, 22 Sep 2022 12:22:57 +0000 (14:22 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 22 Sep 2022 12:42:45 +0000 (14:42 +0200)
commitb7f9f06e159470fd64917b5e12548db76ccb7805
treec7a8178a7f3701063ba045110cc82c7d489ff989
parent1f695d9c7f823ff8bd7a65138d98da8dfcb1cc24
nl80211: fix phy/netdev index lookup

Don't assume a fixed naming pattern. Check all options in this order:

- netdev
- phy name
- wifi device in uci

Use the first one that matches

Signed-off-by: Felix Fietkau <nbd@nbd.name>
iwinfo_nl80211.c