mac80211: fix list_phy_interfaces for multiple wiphys on the same device

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>
master
Felix Fietkau 4 years ago
parent 9501469e11
commit b1a1c222c9

@ -983,7 +983,7 @@ drv_mac80211_setup() {
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;
@ -992,6 +992,15 @@ list_phy_interfaces() {
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

Loading…
Cancel
Save