summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2024-12-19 05:26:59 +0000
committerFelix Fietkau2024-12-19 05:44:48 +0000
commit8943430b9f8046d49842de6b40f9c90fb57fff04 (patch)
tree282ae221c0e2ce662593fd6d11b75e8752e09a9a
parent28f534d953b1163548610554981763d24fde6d03 (diff)
downloadopenwrt-8943430b9f8046d49842de6b40f9c90fb57fff04.tar.gz
hostapd: fix passing radio parameter in wpa_supplicant calls
Fixes accessing PHY status in AP+STA configurations Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/network/services/hostapd/files/hostapd.uc6
1 files changed, 3 insertions, 3 deletions
diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc
index e345a678f4..873881200a 100644
--- a/package/network/services/hostapd/files/hostapd.uc
+++ b/package/network/services/hostapd/files/hostapd.uc
@@ -189,7 +189,7 @@ function __iface_pending_next(pending, state, ret, data)
pending.call("wpa_supplicant", "phy_status", {
phy: phydev.phy,
- radio: phydev.radio,
+ radio: phydev.radio ?? -1,
});
return "check_phy";
case "check_phy":
@@ -202,7 +202,7 @@ function __iface_pending_next(pending, state, ret, data)
}
pending.call("wpa_supplicant", "phy_set_state", {
phy: phydev.phy,
- radio: phydev.radio,
+ radio: phydev.radio ?? -1,
stop: true
});
return "wpas_stopped";
@@ -211,7 +211,7 @@ function __iface_pending_next(pending, state, ret, data)
hostapd.printf(`hostapd.add_iface failed for phy ${phy} ifname=${bss.ifname}`);
pending.call("wpa_supplicant", "phy_set_state", {
phy: phydev.phy,
- radio: phydev.radio,
+ radio: phydev.radio ?? -1,
stop: false
});
return null;