hostapd: reduce to a single instance per service
[oweals/openwrt.git] / package / network / services / hostapd / files / hostapd.sh
index 542056fe9a9076a3be2e36d36cb8683e7a55bb44..637f298ad9142a1725879192f4cfbae58a83b947 100644 (file)
@@ -1075,8 +1075,8 @@ wpa_supplicant_run() {
 
        _wpa_supplicant_common "$ifname"
 
-       ubus wait_for wpa_supplicant.$phy
-       ubus call wpa_supplicant.$phy config_add "{ \
+       ubus wait_for wpa_supplicant
+       ubus call wpa_supplicant config_add "{ \
                \"driver\": \"${_w_driver:-wext}\", \"ctrl\": \"$_rpath\", \
                \"iface\": \"$ifname\", \"config\": \"$_config\" \
                ${network_bridge:+, \"bridge\": \"$network_bridge\"} \
@@ -1087,7 +1087,7 @@ 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")
+       local supplicant_pid=$(ubus call service list '{"name": "hostapd"}' | jsonfilter -l 1 -e "@['hostapd'].instances['supplicant'].pid")
        wireless_add_process "$supplicant_pid" "/usr/sbin/wpa_supplicant" 1
 
        return $ret