hostapd: add AFC support
[openwrt/staging/nbd.git] / package / network / services / hostapd / Makefile
index 0171bc0edca940506cac407086b0272271d0edab..db8a69a1b7086681573f1a4b628a3b5cd6007a1b 100644 (file)
@@ -86,6 +86,7 @@ DRIVER_MAKEOPTS= \
        CONFIG_ACS=y CONFIG_DRIVER_NL80211=y \
        CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \
        CONFIG_IEEE80211AX=$(HOSTAPD_IEEE80211AX) \
+       CONFIG_AFC=$(HOSTAPD_IEEE80211AX) \
        CONFIG_MBO=$(CONFIG_WPA_MBO_SUPPORT) \
        CONFIG_UCODE=y
 
@@ -142,6 +143,13 @@ endif
 
 DRV_DEPENDS:=+libnl-tiny
 
+define Package/afcd
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=WirelessAPD
+  TITLE:=AFC communication daemon
+  DEPENDS:=+ucode +ucode-mod-uclient +ucode-mod-uloop
+endef
 
 define Package/hostapd/Default
   SECTION:=net
@@ -585,7 +593,7 @@ TARGET_CPPFLAGS := \
        -D_GNU_SOURCE \
        $(if $(CONFIG_WPA_MSG_MIN_PRIORITY),-DCONFIG_MSG_MIN_PRIORITY=$(CONFIG_WPA_MSG_MIN_PRIORITY))
 
-TARGET_LDFLAGS += -lubox -lubus -lblobmsg_json -lucode -lm -lnl-tiny -ludebug
+TARGET_LDFLAGS += -lubox -lubus -lblobmsg_json -lucode -lm -lnl-tiny -ludebug -ljson-c
 
 ifdef CONFIG_WPA_ENABLE_WEP
     DRIVER_MAKEOPTS += CONFIG_WEP=y
@@ -698,6 +706,12 @@ Package/hostapd-wolfssl/conffiles = $(Package/hostapd-full/conffiles)
 Package/hostapd-mbedtls/conffiles = $(Package/hostapd-full/conffiles)
 endif
 
+define Package/afcd/install
+       $(INSTALL_DIR) $(1)/usr/share/hostap $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/afcd.init $(1)/etc/init.d/afcd
+       $(INSTALL_DATA) ./files/afcd.uc $(1)/usr/share/hostap/
+endef
+
 define Install/hostapd
        $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/share/hostap
        $(INSTALL_DATA) ./files/hostapd.uc $(1)/usr/share/hostap/
@@ -808,6 +822,7 @@ endif
 
 # Build hostapd-common before its dependents, to avoid
 # spurious rebuilds when building multiple variants.
+$(eval $(call BuildPackage,afcd))
 $(eval $(call BuildPackage,hostapd-common))
 $(eval $(call BuildPackage,hostapd))
 $(eval $(call BuildPackage,hostapd-basic))