Use the new 'getpid' method of hostapd instead of querying procd for
the PID of hostapd.

Signed-off-by: Daniel Golle <dan...@makrotopia.org>
---
 package/kernel/mac80211/Makefile                              | 2 +-
 package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 8448350acf..2eb5c17515 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=mac80211
 
 PKG_VERSION:=5.8-1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.8/
 PKG_HASH:=19b4174d89bf11ee221458e11f1e8dace26558498774b823051156f522d2036b
 
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh 
b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 6ca12084cf..46e51b05ac 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -1019,8 +1019,8 @@ drv_mac80211_setup() {
                if [ "$no_reload" != "0" ]; then
                        add_ap=1
                        ubus wait_for hostapd
+                       local hostapd_pid=$(ubus call hostapd getpid | 
jsonfilter -l 1 -e @.pid)
                        ubus call hostapd config_add 
"{\"iface\":\"$primary_ap\", \"config\":\"${hostapd_conf_file}\"}"
-                       local hostapd_pid=$(ubus call service list '{"name": 
"wpad"}' | jsonfilter -l 1 -e "@['wpad'].instances['hostapd'].pid")
                        wireless_add_process "$hostapd_pid" "/usr/sbin/hostapd" 
1
                fi
                ret="$?"
-- 
2.29.2


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to