From 41efd7d7120a04cffcc7adb368def0bbcf86f2fe Mon Sep 17 00:00:00 2001 From: Anjan Chanda Date: Tue, 10 Jun 2025 17:05:46 +0200 Subject: [PATCH] map-plugins: 0.0.1 --- map-plugins/Config.in | 11 +++++ map-plugins/Makefile | 67 +++++++++++++++++++++++++++++++ map-plugins/plugins/steer-rate.mk | 19 +++++++++ 3 files changed, 97 insertions(+) create mode 100644 map-plugins/Config.in create mode 100644 map-plugins/Makefile create mode 100644 map-plugins/plugins/steer-rate.mk diff --git a/map-plugins/Config.in b/map-plugins/Config.in new file mode 100644 index 000000000..8ed6ae031 --- /dev/null +++ b/map-plugins/Config.in @@ -0,0 +1,11 @@ +if (PACKAGE_map-plugins) + +menu "Options" + +config STEER_RATE_PLUGIN + bool "STA steering based on estimated throughput of target-AP" + default PACKAGE_map-plugins-steer-rate + +endmenu + +endif diff --git a/map-plugins/Makefile b/map-plugins/Makefile new file mode 100644 index 000000000..5efb7d992 --- /dev/null +++ b/map-plugins/Makefile @@ -0,0 +1,67 @@ +# +# Copyright (C) 2025 Genexis Sweden AB +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=map-plugins +PKG_VERSION:=0.0.1 + +LOCAL_DEV=0 +ifneq ($(LOCAL_DEV),1) +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=f16d8b18c4ba6314ce5f91e39d879c1c43ab2590 +PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/map-plugins.git +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz +PKG_MIRROR_HASH:=skip +endif + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_LICENSE:=PROPRIETARY GENEXIS + +PKG_CONFIG_DEPENDS := CONFIG_PACKAGE_mapcontroller +PKG_BUILD_DEPENDS := map-controller + +include $(INCLUDE_DIR)/package.mk + +include $(wildcard plugins/*.mk) + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) -Wall" + +plugins := \ + $(if $(CONFIG_PACKAGE_map-plugins-steer-rate),steer-rate) + +ppkg:=$(patsubst plugins/%.mk,map-plugins-%,$(wildcard plugins/*.mk)) + +define Package/map-plugins/Default + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Multi-AP value added services +endef + +define Package/map-plugins/config + source "$(SOURCE)/Config.in" +endef + +define Package/map-plugins + $(call Package/map-plugins/Default) + TITLE:=Multi-AP plugins modules + DEPENDS+=+libeasy +libwifiutils +map-controller +endef + +define Package/map-plugins/description + Provides extra Multi-AP services viz. steering, channel-planning etc. +endef + +define Package/map-plugins/install + : +endef + +define Build/Compile + $(foreach p,$(ppkg),$(call Build/Compile/$(p),$(1))) +endef + + +$(eval $(call BuildPackage,map-plugins)) +$(eval $(foreach p,$(ppkg),$(call BuildPackage,$(p)))) diff --git a/map-plugins/plugins/steer-rate.mk b/map-plugins/plugins/steer-rate.mk new file mode 100644 index 000000000..ca14d00f0 --- /dev/null +++ b/map-plugins/plugins/steer-rate.mk @@ -0,0 +1,19 @@ +define Package/map-plugins-steer-rate + $(call Package/map-plugins/Default) + TITLE:=STA steering based on estimated throughput of target-AP + DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \ + +libjson-c +libblobmsg-json +map-controller +endef + +define Package/map-plugins-steer-rate/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/lib/mapcontroller + $(CP) $(PKG_BUILD_DIR)/steer/rate/rate.so $(1)/usr/lib/mapcontroller/rate.so +endef + +define Build/Compile/map-plugins-steer-rate + $(MAKE) -C $(PKG_BUILD_DIR)/steer/rate \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef