diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index dd2b09c4a00d5fe16e1558aad516c73fcb229738..06244bf0e314d568beba5cb602a6bcb07b0352d6 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -940,7 +940,10 @@ drv_mac80211_setup() {
 			}
 		else
 			add_ap=1
+			ubus wait_for hostapd.$phy
 			ubus call hostapd.${phy} config_add "{\"iface\":\"$primary_ap\", \"config\":\"${hostapd_conf_file}\"}"
+			local hostapd_pid=$(ubus call service list '{"name": "hostapd"}' | jsonfilter -l 1 -e "@['hostapd'].instances['hostapd-${phy}'].pid")
+			wireless_add_process "$hostapd_pid" "/usr/sbin/hostapd" 1
 		fi
 		ret="$?"
 		[ "$ret" != 0 ] && {
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index f03b98ff85b8732bf5439d5b61bf9b58d725a7ba..4bf6a6c9712785f40d059445f80f19d4f2992f4b 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -958,6 +958,7 @@ wpa_supplicant_run() {
 
 	_wpa_supplicant_common "$ifname"
 
+	ubus wait_for wpa_supplicant.$phy
 	ubus call wpa_supplicant.$phy config_add "{ \
 		\"driver\": \"${_w_driver:-wext}\", \"ctrl\": \"$_rpath\", \
 		\"iface\": \"$ifname\", \"config\": \"$_config\" \
@@ -969,6 +970,9 @@ wpa_supplicant_run() {
 
 	[ "$ret" != 0 ] && wireless_setup_vif_failed WPA_SUPPLICANT_FAILED
 
+	local supplicant_pid=$(ubus call service list '{"name": "hostapd"}' | jsonfilter -l 1 -e "@['hostapd'].instances['supplicant-${phy}'].pid")
+	wireless_add_process "$supplicant_pid" "/usr/sbin/wpa_supplicant" 1
+
 	return $ret
 }