Network interfaces are looked up based on the device behind a phy, so the
phy needs to be checked separately
Signed-off-by: Felix Fietkau <nbd@nbd.name>
wireless_set_up
}
-list_phy_interfaces() {
+_list_phy_interfaces() {
local phy="$1"
if [ -d "/sys/class/ieee80211/${phy}/device/net" ]; then
ls "/sys/class/ieee80211/${phy}/device/net" 2>/dev/null;
fi
}
+list_phy_interfaces() {
+ local phy="$1"
+
+ for dev in $(_list_phy_interfaces "$phy"); do
+ readlink "/sys/class/net/${dev}/phy80211" | grep -q "/${phy}\$" || continue
+ echo "$dev"
+ done
+}
+
drv_mac80211_teardown() {
wireless_process_kill_all