[openwrt/openwrt] hostapd: fix passing radio parameter in wpa_supplicant calls

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 19 00:03:00 PST 2024


nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/e40367fa99848b7ca35efd9cd98165558da2aa81

commit e40367fa99848b7ca35efd9cd98165558da2aa81
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Dec 19 06:26:59 2024 +0100

    hostapd: fix passing radio parameter in wpa_supplicant calls
    
    Fixes accessing PHY status in AP+STA configurations
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit 8943430b9f8046d49842de6b40f9c90fb57fff04)
---
 package/network/services/hostapd/files/hostapd.uc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc
index 2d9ce28749..8e70f6b8af 100644
--- a/package/network/services/hostapd/files/hostapd.uc
+++ b/package/network/services/hostapd/files/hostapd.uc
@@ -186,7 +186,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":
@@ -199,7 +199,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";
@@ -208,7 +208,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;




More information about the lede-commits mailing list