diff --git a/feeds/ucentral/ucode/Makefile b/feeds/ucentral/ucode/Makefile index 4452a9a87..d3d1c8302 100644 --- a/feeds/ucentral/ucode/Makefile +++ b/feeds/ucentral/ucode/Makefile @@ -12,13 +12,13 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/jow-/ucode.git -PKG_MIRROR_HASH:=376b89c35967d3761acb192af9fb6b7b20dbcc50d03c8ed851751d2376bf26b4 -PKG_SOURCE_DATE:=2021-07-30 -PKG_SOURCE_VERSION:=8fd4746da31b945a6259ac846f7cf8dcfef0b1ef +PKG_SOURCE_DATE:=2022-04-07 +PKG_SOURCE_VERSION:=33f1e0b0926e973fb5ae445e9a995848762143bb +PKG_MIRROR_HASH:=e419678244c5402c739e3a200d6d1d7cd6989a711c73744bc68b2d5b76bae33a PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC -PKG_ABI_VERSION:=20210730 +PKG_ABI_VERSION:=20220322 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -33,7 +33,7 @@ endef define Package/ucode $(Package/ucode/default) - DEPENDS:=+libucode + DEPENDS:=+libucode endef define Package/ucode/description @@ -65,17 +65,6 @@ define Package/ucode-mod-fs/description endef -define Package/ucode-mod-resolv - $(Package/ucode/default) - TITLE+= (resolv module) - DEPENDS:=ucode -endef - -define Package/ucode-mod-resolv/description - The resolv plugin module allows making DNS resolves. -endef - - define Package/ucode-mod-math $(Package/ucode/default) TITLE+= (math module) @@ -87,6 +76,50 @@ define Package/ucode-mod-math/description endef +define Package/ucode-mod-nl80211 + $(Package/ucode/default) + TITLE+= (nl80211 module) + DEPENDS:=ucode +libnl-tiny +kmod-mac80211 +endef + +define Package/ucode-mod-nl80211/description + The nl80211 plugin provides access to the Linux wireless 802.11 netlink API. +endef + + +define Package/ucode-mod-resolv + $(Package/ucode/default) + TITLE+= (resolv module) + DEPENDS:=ucode +endef + +define Package/ucode-mod-resolv/description + The resolv plugin implements simple DNS resolving. +endef + + +define Package/ucode-mod-rtnl + $(Package/ucode/default) + TITLE+= (rtnl module) + DEPENDS:=ucode +libnl-tiny +endef + +define Package/ucode-mod-rtnl/description + The rtnl plugin provides access to the Linux routing netlink API. +endef + + +define Package/ucode-mod-struct + $(Package/ucode/default) + TITLE+= (struct module) + DEPENDS:=ucode +endef + +define Package/ucode-mod-struct/description + The struct plugin implemnts Python 3 compatible struct.pack/unpack functionality. +endef + + define Package/ucode-mod-ubus $(Package/ucode/default) TITLE+= (ubus module) @@ -109,40 +142,6 @@ define Package/ucode-mod-uci/description The uci module allows templates to read and modify uci configuration. endef - -define Package/ucode-mod-nl80211 - $(Package/ucode/default) - TITLE+= (nl80211 module) - DEPENDS:=ucode +libnl-tiny +kmod-mac80211 -endef - -define Package/ucode-mod-nl80211/description - The nl80211 module allows templates to send and receive nl80211 messages.. -endef - - -define Package/ucode-mod-struct - $(Package/ucode/default) - TITLE+= (struct module) - DEPENDS:=ucode -endef - -define Package/ucode-mod-struct/description - The struct module allows templates to unpack binary buffers. -endef - - -define Package/ucode-mod-rtnl - $(Package/ucode/default) - TITLE+= (rtnl module) - DEPENDS:=ucode +libnl-tiny -endef - -define Package/ucode-mod-struct/description - The rtnl module allows templates to send and receive rtnl messages.. -endef - - define Build/Prepare $(Build/Prepare/Default) $(CP) $(STAGING_DIR)/usr/include/mac80211/uapi/linux/nl80211.h $(PKG_BUILD_DIR)/nl80211_copy.h @@ -157,7 +156,7 @@ endef define Package/ucode/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ucode $(1)/usr/bin/ucode + $(CP) $(PKG_INSTALL_DIR)/usr/bin/u* $(1)/usr/bin/ endef define Package/libucode/install @@ -170,14 +169,29 @@ define Package/ucode-mod-fs/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/fs.so $(1)/usr/lib/ucode/ endef +define Package/ucode-mod-math/install + $(INSTALL_DIR) $(1)/usr/lib/ucode + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/math.so $(1)/usr/lib/ucode/ +endef + +define Package/ucode-mod-nl80211/install + $(INSTALL_DIR) $(1)/usr/lib/ucode + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/nl80211.so $(1)/usr/lib/ucode/ +endef + define Package/ucode-mod-resolv/install $(INSTALL_DIR) $(1)/usr/lib/ucode $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/resolv.so $(1)/usr/lib/ucode/ endef -define Package/ucode-mod-math/install +define Package/ucode-mod-rtnl/install $(INSTALL_DIR) $(1)/usr/lib/ucode - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/math.so $(1)/usr/lib/ucode/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/rtnl.so $(1)/usr/lib/ucode/ +endef + +define Package/ucode-mod-struct/install + $(INSTALL_DIR) $(1)/usr/lib/ucode + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/struct.so $(1)/usr/lib/ucode/ endef define Package/ucode-mod-ubus/install @@ -190,29 +204,14 @@ define Package/ucode-mod-uci/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/uci.so $(1)/usr/lib/ucode/ endef -define Package/ucode-mod-nl80211/install - $(INSTALL_DIR) $(1)/usr/lib/ucode - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/nl80211.so $(1)/usr/lib/ucode/ -endef - -define Package/ucode-mod-struct/install - $(INSTALL_DIR) $(1)/usr/lib/ucode - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/struct.so $(1)/usr/lib/ucode/ -endef - -define Package/ucode-mod-rtnl/install - $(INSTALL_DIR) $(1)/usr/lib/ucode - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/rtnl.so $(1)/usr/lib/ucode/ -endef - $(eval $(call BuildPackage,ucode)) $(eval $(call BuildPackage,libucode)) $(eval $(call BuildPackage,ucode-mod-fs)) -$(eval $(call BuildPackage,ucode-mod-resolv)) $(eval $(call BuildPackage,ucode-mod-math)) +$(eval $(call BuildPackage,ucode-mod-nl80211)) +$(eval $(call BuildPackage,ucode-mod-resolv)) +$(eval $(call BuildPackage,ucode-mod-rtnl)) +$(eval $(call BuildPackage,ucode-mod-struct)) $(eval $(call BuildPackage,ucode-mod-ubus)) $(eval $(call BuildPackage,ucode-mod-uci)) -$(eval $(call BuildPackage,ucode-mod-nl80211)) -$(eval $(call BuildPackage,ucode-mod-struct)) -$(eval $(call BuildPackage,ucode-mod-rtnl)) diff --git a/feeds/ucentral/ucode/patches/000-nl80211_copy.patch b/feeds/ucentral/ucode/patches/000-nl80211_copy.patch index 52812b28d..6b5667f75 100644 --- a/feeds/ucentral/ucode/patches/000-nl80211_copy.patch +++ b/feeds/ucentral/ucode/patches/000-nl80211_copy.patch @@ -1,7 +1,7 @@ -Index: ucode-2021-07-30-03b6a8ef/lib/nl80211.c +Index: ucode-2022-04-07-33f1e0b0/lib/nl80211.c =================================================================== ---- ucode-2021-07-30-03b6a8ef.orig/lib/nl80211.c -+++ ucode-2021-07-30-03b6a8ef/lib/nl80211.c +--- ucode-2022-04-07-33f1e0b0.orig/lib/nl80211.c ++++ ucode-2022-04-07-33f1e0b0/lib/nl80211.c @@ -38,7 +38,7 @@ limitations under the License. #include #include diff --git a/feeds/ucentral/ucode/patches/0001-fixes.patch b/feeds/ucentral/ucode/patches/0001-fixes.patch index d48a42726..5441ebd75 100644 --- a/feeds/ucentral/ucode/patches/0001-fixes.patch +++ b/feeds/ucentral/ucode/patches/0001-fixes.patch @@ -8,20 +8,20 @@ Subject: [PATCH] fixes lib/rtnl.c | 1 + 2 files changed, 87 insertions(+), 6 deletions(-) -diff --git a/lib/nl80211.c b/lib/nl80211.c -index fc24fb8..3e21141 100644 ---- a/lib/nl80211.c -+++ b/lib/nl80211.c -@@ -45,6 +45,8 @@ limitations under the License. +Index: ucode-2022-04-07-33f1e0b0/lib/nl80211.c +=================================================================== +--- ucode-2022-04-07-33f1e0b0.orig/lib/nl80211.c ++++ ucode-2022-04-07-33f1e0b0/lib/nl80211.c +@@ -51,6 +51,8 @@ limitations under the License. - #define err_return(code, ...) do { set_error(code, __VA_ARGS__); return NULL; } while(0) + #define NL80211_ATTR_NOT_IMPLEMENTED 0x10000 +#define NL80211_ATTR_NOT_IMPLEMENTED 0x10000 + static struct { int code; char *msg; -@@ -257,6 +259,14 @@ static const uc_nl_nested_spec_t nl80211_keys_nla = { +@@ -263,6 +265,14 @@ static const uc_nl_nested_spec_t nl80211 } }; @@ -36,7 +36,7 @@ index fc24fb8..3e21141 100644 static const uc_nl_nested_spec_t nl80211_mesh_params_nla = { .headsize = 0, .nattrs = 29, -@@ -348,6 +358,14 @@ static const uc_nl_nested_spec_t nl80211_nan_func_nla = { +@@ -354,6 +364,14 @@ static const uc_nl_nested_spec_t nl80211 } }; @@ -51,7 +51,7 @@ index fc24fb8..3e21141 100644 static const uc_nl_nested_spec_t nl80211_peer_measurements_peers_req_data_ftm_nla = { .headsize = 0, .nattrs = 13, -@@ -497,6 +515,26 @@ static const uc_nl_nested_spec_t nl80211_wiphy_bands_freqs_wmm_nla = { +@@ -503,6 +521,26 @@ static const uc_nl_nested_spec_t nl80211 } }; @@ -78,7 +78,7 @@ index fc24fb8..3e21141 100644 static const uc_nl_nested_spec_t nl80211_wiphy_bands_freqs_nla = { .headsize = 0, .nattrs = 25, -@@ -538,6 +576,10 @@ static const uc_nl_nested_spec_t nl80211_wiphy_bands_rates_nla = { +@@ -544,6 +582,10 @@ static const uc_nl_nested_spec_t nl80211 } }; @@ -89,35 +89,7 @@ index fc24fb8..3e21141 100644 static const uc_nl_nested_spec_t nl80211_wiphy_bands_iftype_data_nla = { .headsize = 0, .nattrs = 7, -@@ -645,13 +687,26 @@ static const uc_nl_nested_spec_t nl80211_bss_nla = { - - static const uc_nl_nested_spec_t nl80211_sta_info_bitrate_nla = { - .headsize = 0, -- .nattrs = 5, -+ .nattrs = 18, - .attrs = { - { NL80211_RATE_INFO_BITRATE, "bitrate", DT_U16, 0, NULL }, - { NL80211_RATE_INFO_BITRATE32, "bitrate32", DT_U32, 0, NULL }, - { NL80211_RATE_INFO_MCS, "mcs", DT_U8, 0, NULL }, - { NL80211_RATE_INFO_40_MHZ_WIDTH, "40_mhz_width", DT_FLAG, 0, NULL }, - { NL80211_RATE_INFO_SHORT_GI, "short_gi", DT_FLAG, 0, NULL }, -+ { NL80211_RATE_INFO_VHT_MCS, "vht_mcs", DT_U8, 0, NULL }, -+ { NL80211_RATE_INFO_VHT_NSS, "vht_nss", DT_U8, 0, NULL }, -+ { NL80211_RATE_INFO_HE_MCS, "he_mcs", DT_U8, 0, NULL }, -+ { NL80211_RATE_INFO_HE_NSS, "he_nss", DT_U8, 0, NULL }, -+ { NL80211_RATE_INFO_HE_GI, "he_gi", DT_U8, 0, NULL }, -+ { NL80211_RATE_INFO_HE_DCM, "he_dcm", DT_U8, 0, NULL }, -+ { NL80211_RATE_INFO_HE_RU_ALLOC, "he_ru_alloc", DT_U8, 0, NULL }, -+ { NL80211_RATE_INFO_40_MHZ_WIDTH, "width_40", DT_FLAG, 0, NULL }, -+ { NL80211_RATE_INFO_80_MHZ_WIDTH, "width_80", DT_FLAG, 0, NULL }, -+ { NL80211_RATE_INFO_80P80_MHZ_WIDTH, "width_80p80", DT_FLAG, 0, NULL }, -+ { NL80211_RATE_INFO_160_MHZ_WIDTH, "width_160", DT_FLAG, 0, NULL }, -+ { NL80211_RATE_INFO_10_MHZ_WIDTH, "width_10", DT_FLAG, 0, NULL }, -+ { NL80211_RATE_INFO_5_MHZ_WIDTH, "width_5", DT_FLAG, 0, NULL }, - } - }; - -@@ -695,9 +750,13 @@ static const uc_nl_nested_spec_t nl80211_bss_param_nla = { +@@ -714,6 +756,10 @@ static const uc_nl_nested_spec_t nl80211 } }; @@ -127,77 +99,12 @@ index fc24fb8..3e21141 100644 + static const uc_nl_nested_spec_t nl80211_sta_info_nla = { .headsize = 0, -- .nattrs = 34, -+ .nattrs = 35, - .attrs = { - { NL80211_STA_INFO_INACTIVE_TIME, "inactive_time", DT_U32, 0, NULL }, - { NL80211_STA_INFO_RX_BYTES, "rx_bytes", DT_U32, 0, NULL }, -@@ -724,21 +783,37 @@ static const uc_nl_nested_spec_t nl80211_sta_info_nla = { - { NL80211_STA_INFO_NONPEER_PM, "nonpeer_pm", DT_U32, 0, NULL }, - { NL80211_STA_INFO_CHAIN_SIGNAL, "chain_signal", DT_S8, DF_MULTIPLE|DF_AUTOIDX, NULL }, - { NL80211_STA_INFO_CHAIN_SIGNAL_AVG, "chain_signal_avg", DT_S8, DF_MULTIPLE|DF_AUTOIDX, NULL }, -- { NL80211_STA_INFO_TID_STATS, "tid_stats", DT_NESTED, 0, &nl80211_tid_stats_nla }, -+ { NL80211_STA_INFO_TID_STATS, "tid_stats", DT_NESTED, DF_MULTIPLE|DF_AUTOIDX, &nl80211_tid_stats_nla }, - { NL80211_STA_INFO_BSS_PARAM, "bss_param", DT_NESTED, 0, &nl80211_bss_param_nla }, - { NL80211_STA_INFO_RX_DURATION, "rx_duration", DT_U64, 0, NULL }, - { NL80211_STA_INFO_TX_DURATION, "tx_duration", DT_U64, 0, NULL }, -- { NL80211_STA_INFO_ACK_SIGNAL, "ack_signal", DT_U8, 0, NULL }, -- { NL80211_STA_INFO_ACK_SIGNAL_AVG, "ack_signal_avg", DT_U8, 0, NULL }, -+ { NL80211_STA_INFO_ACK_SIGNAL, "ack_signal", DT_S8, 0, NULL }, -+ { NL80211_STA_INFO_ACK_SIGNAL_AVG, "ack_signal_avg", DT_S8, 0, NULL }, - { NL80211_STA_INFO_AIRTIME_LINK_METRIC, "airtime_link_metric", DT_U32, 0, NULL }, - { NL80211_STA_INFO_CONNECTED_TO_AS, "connected_to_as", DT_BOOL, 0, NULL }, - { NL80211_STA_INFO_CONNECTED_TO_GATE, "connected_to_gate", DT_BOOL, 0, NULL }, -+ { NL80211_STA_INFO_CONNECTED_TIME, "connected_time", DT_U32, 0, NULL }, -+ } -+}; -+ -+static const uc_nl_nested_spec_t nl80211_survey_info_nla = { -+ .headsize = 0, -+ .nattrs = 8, -+ .attrs = { -+ { NL80211_SURVEY_INFO_FREQUENCY, "frequency", DT_U32, 0, NULL }, -+ { NL80211_SURVEY_INFO_TIME, "time", DT_U64, 0, NULL }, -+ { NL80211_SURVEY_INFO_TIME_TX, "time_tx", DT_U64, 0, NULL }, -+ { NL80211_SURVEY_INFO_TIME_RX, "time_rx", DT_U64, 0, NULL }, -+ { NL80211_SURVEY_INFO_TIME_BUSY, "busy", DT_U64, 0, NULL }, -+ { NL80211_SURVEY_INFO_TIME_EXT_BUSY, "ext_busy", DT_U64, 0, NULL }, -+ { NL80211_SURVEY_INFO_TIME_SCAN, "scan", DT_U64, 0, NULL }, -+ { NL80211_SURVEY_INFO_NOISE, "noise", DT_U8, 0, NULL }, - } - }; - - static const uc_nl_nested_spec_t nl80211_msg = { - .headsize = 0, -- .nattrs = 124, -+ .nattrs = 126, - .attrs = { - { NL80211_ATTR_4ADDR, "4addr", DT_U8, 0, NULL }, - { NL80211_ATTR_AIRTIME_WEIGHT, "airtime_weight", DT_U16, 0, NULL }, -@@ -864,6 +939,8 @@ static const uc_nl_nested_spec_t nl80211_msg = { - { NL80211_ATTR_WPA_VERSIONS, "wpa_versions", DT_U32, 0, NULL }, - { NL80211_ATTR_SUPPORTED_IFTYPES, "supported_iftypes", DT_NESTED, 0, &nl80211_ifcomb_limit_types_nla }, - { NL80211_ATTR_SOFTWARE_IFTYPES, "software_iftypes", DT_NESTED, 0, &nl80211_ifcomb_limit_types_nla }, -+ { NL80211_ATTR_MAX_AP_ASSOC_STA, "max_ap_assoc", DT_U16, 0, NULL }, -+ { NL80211_ATTR_SURVEY_INFO, "survey_info", DT_NESTED, 0, &nl80211_survey_info_nla }, - } - }; - -@@ -1044,6 +1121,9 @@ uc_nl_parse_attrs(struct nl_msg *msg, char *base, const uc_nl_attr_spec_t *attrs - bool exists; - - for (i = 0; i < nattrs; i++) { -+ if (attrs[i].attr == NL80211_ATTR_NOT_IMPLEMENTED) -+ continue; -+ - v = ucv_object_get(obj, attrs[i].key, &exists); - - if (!exists) -diff --git a/lib/rtnl.c b/lib/rtnl.c -index b6a3e38..c1d2088 100644 ---- a/lib/rtnl.c -+++ b/lib/rtnl.c -@@ -682,6 +682,7 @@ static const uc_nl_nested_spec_t link_msg = { + .nattrs = 35, +Index: ucode-2022-04-07-33f1e0b0/lib/rtnl.c +=================================================================== +--- ucode-2022-04-07-33f1e0b0.orig/lib/rtnl.c ++++ ucode-2022-04-07-33f1e0b0/lib/rtnl.c +@@ -682,6 +682,7 @@ static const uc_nl_nested_spec_t link_ms { IFLA_UNSPEC, "type", DT_U16, 0, MEMBER(ifinfomsg, ifi_type) }, { IFLA_UNSPEC, "dev", DT_NETDEV, 0, MEMBER(ifinfomsg, ifi_index) }, { IFLA_UNSPEC, "flags", DT_FLAGS, 0, MEMBER(ifinfomsg, ifi_flags) }, @@ -205,6 +112,3 @@ index b6a3e38..c1d2088 100644 { IFLA_ADDRESS, "address", DT_LLADDR, 0, NULL }, { IFLA_BROADCAST, "broadcast", DT_LLADDR, 0, NULL }, { IFLA_TXQLEN, "txqlen", DT_U32, 0, NULL }, --- -2.25.1 -