[openwrt/openwrt] mac80211: use hostapd PID returned from config_add

LEDE Commits lede-commits at lists.infradead.org
Sun Jan 10 14:20:53 EST 2021


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/cbd67dbdcd6f45ed54a4ec382c5a8ea4d082fa84

commit cbd67dbdcd6f45ed54a4ec382c5a8ea4d082fa84
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Dec 7 13:46:43 2020 +0000

    mac80211: use hostapd PID returned from config_add
    
    Use PID returned from config_add instead of querying procd when adding
    configuration to hostapd.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/kernel/mac80211/Makefile                              | 2 +-
 package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 35a7651d1d..e03c91e9c4 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.18-1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.8.18/
 PKG_HASH:=f04a8172423c6a945fc7d9844b04f33fda9ae574e552f8f18ee3bdfcfb494563
 
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 95b6c817ff..7eea198cd9 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -1019,8 +1019,7 @@ drv_mac80211_setup() {
 		if [ "$no_reload" != "0" ]; then
 			add_ap=1
 			ubus wait_for hostapd
-			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")
+			local hostapd_pid=$(ubus call hostapd config_add "{\"iface\":\"$primary_ap\", \"config\":\"${hostapd_conf_file}\"}" | jsonfilter -l 1 -e @.pid)
 			wireless_add_process "$hostapd_pid" "/usr/sbin/hostapd" 1 1
 		fi
 		ret="$?"



More information about the lede-commits mailing list