[][mac80211][hostapd][netifd][Revert udebug for build pass]

[Description]
Remove modification for udebug.

[Release-log]
N/A

Change-Id: Ia63887889b023e58d4da0f00a1589e8c3aa09389
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8278692
diff --git a/autobuild_mac80211_release/0007-wifi7-hostapd-revert-hostapd-udebug.patch b/autobuild_mac80211_release/0007-wifi7-hostapd-revert-hostapd-udebug.patch
new file mode 100644
index 0000000..d532769
--- /dev/null
+++ b/autobuild_mac80211_release/0007-wifi7-hostapd-revert-hostapd-udebug.patch
@@ -0,0 +1,525 @@
+diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
+index 61410069b6f..089c073011b 100644
+--- a/package/network/services/hostapd/Makefile
++++ b/package/network/services/hostapd/Makefile
+@@ -79,7 +79,7 @@ ifneq ($(CONFIG_DRIVER_11AX_SUPPORT),)
+   HOSTAPD_IEEE80211AX:=y
+ endif
+ 
+-CORE_DEPENDS = +ucode +libubus +libucode +ucode-mod-fs +ucode-mod-nl80211 +ucode-mod-rtnl +ucode-mod-ubus +ucode-mod-uloop +libblobmsg-json +libudebug
++CORE_DEPENDS = +ucode +libubus +libucode +ucode-mod-fs +ucode-mod-nl80211 +ucode-mod-rtnl +ucode-mod-ubus +ucode-mod-uloop +libblobmsg-json
+ OPENSSL_DEPENDS = +PACKAGE_$(1):libopenssl
+ 
+ DRIVER_MAKEOPTS= \
+@@ -583,7 +583,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
+ 
+ ifdef CONFIG_WPA_ENABLE_WEP
+     DRIVER_MAKEOPTS += CONFIG_WEP=y
+diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc
+index 84138f29a58..750fd535a4a 100644
+--- a/package/network/services/hostapd/files/hostapd.uc
++++ b/package/network/services/hostapd/files/hostapd.uc
+@@ -782,33 +782,8 @@ let main_obj = {
+ 	},
+ };
+ 
+-function handle_debug_config(cfg) {
+-	hostapd.printf(`handle_debug_config: ${cfg}\n`);
+-	if (!cfg)
+-		return;
+-
+-	let data = cfg.service;
+-	if (!data)
+-		return;
+-
+-	data = data.hostapd;
+-	if (!data)
+-		return;
+-
+-	hostapd.udebug_set(!!+data.enabled);
+-}
+-
+ hostapd.data.ubus = ubus;
+ hostapd.data.obj = ubus.publish("hostapd", main_obj);
+-hostapd.data.debug_sub = ubus.subscriber((req) => {
+-	if (req.type != "config")
+-		return;
+-
+-	handle_debug_config(req.data);
+-});
+-
+-hostapd.data.debug_sub.subscribe("udebug");
+-handle_debug_config(ubus.call("udebug", "get_config", {}));
+ 
+ function bss_event(type, name, data) {
+ 	let ubus = hostapd.data.ubus;
+diff --git a/package/network/services/hostapd/files/wpa_supplicant.uc b/package/network/services/hostapd/files/wpa_supplicant.uc
+index aac144b3399..d624f27cddc 100644
+--- a/package/network/services/hostapd/files/wpa_supplicant.uc
++++ b/package/network/services/hostapd/files/wpa_supplicant.uc
+@@ -244,32 +244,8 @@ let main_obj = {
+ 	},
+ };
+ 
+-function handle_debug_config(cfg) {
+-	if (!cfg)
+-		return;
+-
+-	let data = cfg.service;
+-	if (!data)
+-		return;
+-
+-	data = data.wpa_supplicant;
+-	if (!data)
+-		return;
+-
+-	wpas.udebug_set(!!+data.enabled);
+-}
+-
+ wpas.data.ubus = ubus;
+ wpas.data.obj = ubus.publish("wpa_supplicant", main_obj);
+-wpas.data.debug_sub = ubus.subscriber((req) => {
+-	if (req.type != "config")
+-		return;
+-
+-	handle_debug_config(req.data);
+-});
+-
+-wpas.data.debug_sub.subscribe("udebug");
+-handle_debug_config(ubus.call("udebug", "get_config", {}));
+ 
+ function iface_event(type, name, data) {
+ 	let ubus = wpas.data.ubus;
+diff --git a/package/network/services/hostapd/files/wpad_acl.json b/package/network/services/hostapd/files/wpad_acl.json
+index 7532953cabd..d00fd945ba5 100644
+--- a/package/network/services/hostapd/files/wpad_acl.json
++++ b/package/network/services/hostapd/files/wpad_acl.json
+@@ -9,12 +9,8 @@
+ 		},
+ 		"hostapd": {
+ 			"methods": [ "apsta_state" ]
+-		},
+-		"udebug": {
+-			"methods": [ "get_config" ]
+ 		}
+ 	},
+-	"subscribe": [ "udebug" ],
+ 	"publish": [ "hostapd", "hostapd.*", "wpa_supplicant", "wpa_supplicant.*" ],
+ 	"send": [ "bss.*", "wps_credentials" ]
+ }
+diff --git a/package/network/services/hostapd/patches/601-ucode_support.patch b/package/network/services/hostapd/patches/601-ucode_support.patch
+index cfdb51f356c..23f535b6852 100644
+--- a/package/network/services/hostapd/patches/601-ucode_support.patch
++++ b/package/network/services/hostapd/patches/601-ucode_support.patch
+@@ -196,7 +196,7 @@
+  
+  #ifdef CONFIG_BGSCAN
+  	if (state == WPA_COMPLETED && wpa_s->current_ssid != wpa_s->bgscan_ssid)
+-@@ -7594,6 +7595,7 @@ struct wpa_supplicant * wpa_supplicant_a
++@@ -7596,6 +7597,7 @@ struct wpa_supplicant * wpa_supplicant_a
+  #endif /* CONFIG_P2P */
+  
+  	wpas_ubus_add_bss(wpa_s);
+@@ -204,7 +204,7 @@
+  
+  	return wpa_s;
+  }
+-@@ -7621,6 +7623,7 @@ int wpa_supplicant_remove_iface(struct w
++@@ -7623,6 +7625,7 @@ int wpa_supplicant_remove_iface(struct w
+  	struct wpa_supplicant *parent = wpa_s->parent;
+  #endif /* CONFIG_MESH */
+  
+@@ -212,7 +212,7 @@
+  	wpas_ubus_free_bss(wpa_s);
+  
+  	/* Remove interface from the global list of interfaces */
+-@@ -7931,6 +7934,7 @@ struct wpa_global * wpa_supplicant_init(
++@@ -7933,6 +7936,7 @@ struct wpa_global * wpa_supplicant_init(
+  
+  	eloop_register_timeout(WPA_SUPPLICANT_CLEANUP_INTERVAL, 0,
+  			       wpas_periodic, global, NULL);
+@@ -220,7 +220,7 @@
+  
+  	return global;
+  }
+-@@ -7969,12 +7973,8 @@ int wpa_supplicant_run(struct wpa_global
++@@ -7971,12 +7975,8 @@ int wpa_supplicant_run(struct wpa_global
+  	eloop_register_signal_terminate(wpa_supplicant_terminate, global);
+  	eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
+  
+@@ -233,7 +233,7 @@
+  	return 0;
+  }
+  
+-@@ -8007,6 +8007,8 @@ void wpa_supplicant_deinit(struct wpa_gl
++@@ -8009,6 +8009,8 @@ void wpa_supplicant_deinit(struct wpa_gl
+  
+  	wpas_notify_supplicant_deinitialized(global);
+  
+@@ -395,60 +395,7 @@
+  {
+ --- a/src/drivers/driver_nl80211.c
+ +++ b/src/drivers/driver_nl80211.c
+-@@ -73,6 +73,16 @@ enum nlmsgerr_attrs {
+- 
+- #endif /* ANDROID */
+- 
+-+static void handle_nl_debug_hook(struct nl_msg *msg, int tx)
+-+{
+-+	const struct nlmsghdr *nlh;
+-+
+-+	if (!wpa_netlink_hook)
+-+		return;
+-+
+-+	nlh = nlmsg_hdr(msg);
+-+	wpa_netlink_hook(tx, nlh, nlh->nlmsg_len);
+-+}
+- 
+- static struct nl_sock * nl_create_handle(struct nl_cb *cb, const char *dbg)
+- {
+-@@ -379,6 +389,11 @@ static int no_seq_check(struct nl_msg *m
+- 	return NL_OK;
+- }
+- 
+-+static int debug_handler(struct nl_msg *msg, void *arg)
+-+{
+-+	handle_nl_debug_hook(msg, 0);
+-+	return NL_OK;
+-+}
+- 
+- static void nl80211_nlmsg_clear(struct nl_msg *msg)
+- {
+-@@ -415,6 +430,7 @@ static int send_and_recv(struct nl80211_
+- 	if (!msg)
+- 		return -ENOMEM;
+- 
+-+	handle_nl_debug_hook(msg, 1);
+- 	cb = nl_cb_clone(global->nl_cb);
+- 	if (!cb)
+- 		goto out;
+-@@ -443,6 +459,7 @@ static int send_and_recv(struct nl80211_
+- 
+- 	err = 1;
+- 
+-+	nl_cb_set(cb, NL_CB_MSG_IN, NL_CB_CUSTOM, debug_handler, NULL);
+- 	nl_cb_err(cb, NL_CB_CUSTOM, error_handler, &err);
+- 	nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, finish_handler, &err);
+- 	if (ack_handler_custom) {
+-@@ -919,6 +936,7 @@ nl80211_get_wiphy_data_ap(struct i802_bs
+- 			os_free(w);
+- 			return NULL;
+- 		}
+-+		nl_cb_set(w->nl_cb, NL_CB_MSG_IN, NL_CB_CUSTOM, debug_handler, NULL);
+- 		nl_cb_set(w->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM,
+- 			  no_seq_check, NULL);
+- 		nl_cb_set(w->nl_cb, NL_CB_VALID, NL_CB_CUSTOM,
+-@@ -1333,7 +1351,7 @@ static void wpa_driver_nl80211_event_rtm
++@@ -1333,7 +1333,7 @@ static void wpa_driver_nl80211_event_rtm
+  		}
+  		wpa_printf(MSG_DEBUG, "nl80211: Interface down (%s/%s)",
+  			   namebuf, ifname);
+@@ -457,7 +404,7 @@
+  			wpa_printf(MSG_DEBUG,
+  				   "nl80211: Not the main interface (%s) - do not indicate interface down",
+  				   drv->first_bss->ifname);
+-@@ -1369,7 +1387,7 @@ static void wpa_driver_nl80211_event_rtm
++@@ -1369,7 +1369,7 @@ static void wpa_driver_nl80211_event_rtm
+  		}
+  		wpa_printf(MSG_DEBUG, "nl80211: Interface up (%s/%s)",
+  			   namebuf, ifname);
+@@ -466,23 +413,7 @@
+  			wpa_printf(MSG_DEBUG,
+  				   "nl80211: Not the main interface (%s) - do not indicate interface up",
+  				   drv->first_bss->ifname);
+-@@ -1992,6 +2010,7 @@ static int wpa_driver_nl80211_init_nl_gl
+- 		/* Continue without vendor events */
+- 	}
+- 
+-+	nl_cb_set(global->nl_cb, NL_CB_MSG_IN, NL_CB_CUSTOM, debug_handler, NULL);
+- 	nl_cb_set(global->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM,
+- 		  no_seq_check, NULL);
+- 	nl_cb_set(global->nl_cb, NL_CB_VALID, NL_CB_CUSTOM,
+-@@ -2160,6 +2179,7 @@ static int nl80211_init_bss(struct i802_
+- 	if (!bss->nl_cb)
+- 		return -1;
+- 
+-+	nl_cb_set(bss->nl_cb, NL_CB_MSG_IN, NL_CB_CUSTOM, debug_handler, NULL);
+- 	nl_cb_set(bss->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM,
+- 		  no_seq_check, NULL);
+- 	nl_cb_set(bss->nl_cb, NL_CB_VALID, NL_CB_CUSTOM,
+-@@ -8432,6 +8452,7 @@ static void *i802_init(struct hostapd_da
++@@ -8432,6 +8432,7 @@ static void *i802_init(struct hostapd_da
+  	char master_ifname[IFNAMSIZ];
+  	int ifindex, br_ifindex = 0;
+  	int br_added = 0;
+@@ -490,7 +421,7 @@
+  
+  	bss = wpa_driver_nl80211_drv_init(hapd, params->ifname,
+  					  params->global_priv, 1,
+-@@ -8491,21 +8512,17 @@ static void *i802_init(struct hostapd_da
++@@ -8491,21 +8492,17 @@ static void *i802_init(struct hostapd_da
+  	    (params->num_bridge == 0 || !params->bridge[0]))
+  		add_ifidx(drv, br_ifindex, drv->ifindex);
+  
+@@ -522,7 +453,7 @@
+  	}
+  
+  	if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
+-@@ -8875,6 +8892,50 @@ static int wpa_driver_nl80211_if_remove(
++@@ -8875,6 +8872,50 @@ static int wpa_driver_nl80211_if_remove(
+  	return 0;
+  }
+  
+@@ -573,7 +504,7 @@
+  
+  static int cookie_handler(struct nl_msg *msg, void *arg)
+  {
+-@@ -10513,6 +10574,37 @@ static int driver_nl80211_if_remove(void
++@@ -10513,6 +10554,37 @@ static int driver_nl80211_if_remove(void
+  }
+  
+  
+@@ -611,7 +542,7 @@
+  static int driver_nl80211_send_mlme(void *priv, const u8 *data,
+  				    size_t data_len, int noack,
+  				    unsigned int freq,
+-@@ -13697,6 +13789,8 @@ const struct wpa_driver_ops wpa_driver_n
++@@ -13697,6 +13769,8 @@ const struct wpa_driver_ops wpa_driver_n
+  	.set_acl = wpa_driver_nl80211_set_acl,
+  	.if_add = wpa_driver_nl80211_if_add,
+  	.if_remove = driver_nl80211_if_remove,
+@@ -620,52 +551,3 @@
+  	.send_mlme = driver_nl80211_send_mlme,
+  	.get_hw_feature_data = nl80211_get_hw_feature_data,
+  	.sta_add = wpa_driver_nl80211_sta_add,
+---- a/src/utils/wpa_debug.c
+-+++ b/src/utils/wpa_debug.c
+-@@ -26,6 +26,10 @@ static FILE *wpa_debug_tracing_file = NU
+- #define WPAS_TRACE_PFX "wpas <%d>: "
+- #endif /* CONFIG_DEBUG_LINUX_TRACING */
+- 
+-+void (*wpa_printf_hook)(int level, const char *fmt, va_list ap);
+-+void (*wpa_hexdump_hook)(int level, const char *title, const void *buf,
+-+			 size_t len);
+-+void (*wpa_netlink_hook)(int tx, const void *data, size_t len);
+- 
+- int wpa_debug_level = MSG_INFO;
+- int wpa_debug_show_keys = 0;
+-@@ -210,6 +214,12 @@ void _wpa_printf(int level, const char *
+- {
+- 	va_list ap;
+- 
+-+	if (wpa_printf_hook) {
+-+		va_start(ap, fmt);
+-+		wpa_printf_hook(level, fmt, ap);
+-+		va_end(ap);
+-+	}
+-+
+- 	if (level >= wpa_debug_level) {
+- #ifdef CONFIG_ANDROID_LOG
+- 		va_start(ap, fmt);
+-@@ -260,6 +270,9 @@ void _wpa_hexdump(int level, const char
+- {
+- 	size_t i;
+- 
+-+	if (wpa_hexdump_hook)
+-+		wpa_hexdump_hook(level, title, buf, len);
+-+
+- #ifdef CONFIG_DEBUG_LINUX_TRACING
+- 	if (wpa_debug_tracing_file != NULL) {
+- 		fprintf(wpa_debug_tracing_file,
+---- a/src/utils/wpa_debug.h
+-+++ b/src/utils/wpa_debug.h
+-@@ -11,6 +11,10 @@
+- 
+- #include "wpabuf.h"
+- 
+-+extern void (*wpa_printf_hook)(int level, const char *fmt, va_list ap);
+-+extern void (*wpa_hexdump_hook)(int level, const char *title,
+-+				const void *buf, size_t len);
+-+extern void (*wpa_netlink_hook)(int tx, const void *data, size_t len);
+- extern int wpa_debug_level;
+- extern int wpa_debug_show_keys;
+- extern int wpa_debug_timestamp;
+diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c
+index 16d1b515360..af97091be55 100644
+--- a/package/network/services/hostapd/src/src/ap/ucode.c
++++ b/package/network/services/hostapd/src/src/ap/ucode.c
+@@ -711,7 +711,6 @@ int hostapd_ucode_init(struct hapd_interfaces *ifaces)
+ 		{ "freq_info", uc_wpa_freq_info },
+ 		{ "add_iface", uc_hostapd_add_iface },
+ 		{ "remove_iface", uc_hostapd_remove_iface },
+-		{ "udebug_set", uc_wpa_udebug_set },
+ 	};
+ 	static const uc_function_list_t bss_fns[] = {
+ 		{ "ctrl", uc_hostapd_bss_ctrl },
+diff --git a/package/network/services/hostapd/src/src/utils/ucode.c b/package/network/services/hostapd/src/src/utils/ucode.c
+index 14fd6bc5ec9..2beeb9a7ff6 100644
+--- a/package/network/services/hostapd/src/src/utils/ucode.c
++++ b/package/network/services/hostapd/src/src/utils/ucode.c
+@@ -4,20 +4,12 @@
+ #include "crypto/crypto.h"
+ #include "crypto/sha1.h"
+ #include "common/ieee802_11_common.h"
+-#include <linux/netlink.h>
+-#include <linux/genetlink.h>
+-#include <linux/nl80211.h>
+ #include <libubox/uloop.h>
+ #include <ucode/compiler.h>
+-#include <udebug.h>
+ 
+ static uc_value_t *registry;
+ static uc_vm_t vm;
+ static struct uloop_timeout gc_timer;
+-static struct udebug ud;
+-static struct udebug_buf ud_log, ud_nl[3];
+-
+-#define UDEBUG_FLAG_RX_FRAME	(1ULL << 0)
+ 
+ static void uc_gc_timer(struct uloop_timeout *timeout)
+ {
+@@ -259,115 +251,6 @@ int wpa_ucode_call_prepare(const char *fname)
+ 	return 0;
+ }
+ 
+-static void udebug_printf_hook(int level, const char *fmt, va_list ap)
+-{
+-	udebug_entry_init(&ud_log);
+-	udebug_entry_vprintf(&ud_log, fmt, ap);
+-	udebug_entry_add(&ud_log);
+-}
+-
+-static void udebug_hexdump_hook(int level, const char *title,
+-                const void *data, size_t len)
+-{
+-	char *buf;
+-
+-	udebug_entry_init(&ud_log);
+-	udebug_entry_printf(&ud_log, "%s - hexdump:", title);
+-	buf = udebug_entry_append(&ud_log, NULL, 3 * len);
+-	for (size_t i = 0; i < len; i++)
+-		buf += sprintf(buf, " %02x", *(uint8_t *)(data + i));
+-	udebug_entry_add(&ud_log);
+-}
+-
+-static void udebug_netlink_hook(int tx, const void *data, size_t len)
+-{
+-	struct {
+-		uint16_t pkttype;
+-		uint16_t arphdr;
+-		uint16_t _pad[5];
+-		uint16_t proto;
+-	} hdr = {
+-		.pkttype = host_to_be16(tx ? 7 : 6),
+-		.arphdr = host_to_be16(824),
+-		.proto = host_to_be16(16),
+-	};
+-	const struct nlmsghdr *nlh = data;
+-	const struct genlmsghdr *gnlh = data + NLMSG_HDRLEN;
+-	struct udebug_buf *buf = &ud_nl[!!tx];
+-
+-	if (nlh->nlmsg_type == 0x10)
+-		buf = &ud_nl[2];
+-	else if (!tx && gnlh->cmd == NL80211_CMD_FRAME &&
+-	         !(udebug_buf_flags(buf) & UDEBUG_FLAG_RX_FRAME))
+-		return;
+-
+-	udebug_entry_init(buf);
+-	udebug_entry_append(buf, &hdr, sizeof(hdr));
+-	udebug_entry_append(buf, data, len);
+-	udebug_entry_add(buf);
+-}
+-
+-uc_value_t *uc_wpa_udebug_set(uc_vm_t *vm, size_t nargs)
+-{
+-	static const struct udebug_buf_meta meta_log = {
+-		.name = "wpa_log",
+-		.format = UDEBUG_FORMAT_STRING,
+-	};
+-	static const struct udebug_buf_meta meta_nl_ll = {
+-		.name = "wpa_nl_ctrl",
+-		.format = UDEBUG_FORMAT_PACKET,
+-		.sub_format = UDEBUG_DLT_NETLINK,
+-	};
+-	static const struct udebug_buf_meta meta_nl_tx = {
+-		.name = "wpa_nl_tx",
+-		.format = UDEBUG_FORMAT_PACKET,
+-		.sub_format = UDEBUG_DLT_NETLINK,
+-	};
+-	static const struct udebug_buf_flag rx_flags[] = {
+-		{  "rx_frame", UDEBUG_FLAG_RX_FRAME },
+-	};
+-	static const struct udebug_buf_meta meta_nl_rx = {
+-		.name = "wpa_nl_rx",
+-		.format = UDEBUG_FORMAT_PACKET,
+-		.sub_format = UDEBUG_DLT_NETLINK,
+-		.flags = rx_flags,
+-		.n_flags = ARRAY_SIZE(rx_flags),
+-	};
+-	bool val = ucv_is_truish(uc_fn_arg(0));
+-	static bool enabled = false;
+-
+-	if (enabled == val)
+-		return ucv_boolean_new(true);
+-
+-	enabled = val;
+-	if (val) {
+-		udebug_init(&ud);
+-		udebug_auto_connect(&ud, NULL);
+-		udebug_buf_init(&ud_log, 1024, 64 * 1024);
+-		udebug_buf_add(&ud, &ud_log, &meta_log);
+-		udebug_buf_init(&ud_nl[0], 1024, 256 * 1024);
+-		udebug_buf_add(&ud, &ud_nl[0], &meta_nl_rx);
+-		udebug_buf_init(&ud_nl[1], 1024, 64 * 1024);
+-		udebug_buf_add(&ud, &ud_nl[1], &meta_nl_tx);
+-		udebug_buf_init(&ud_nl[2], 256, 32 * 1024);
+-		udebug_buf_add(&ud, &ud_nl[2], &meta_nl_ll);
+-
+-		wpa_printf_hook = udebug_printf_hook;
+-		wpa_hexdump_hook = udebug_hexdump_hook;
+-		wpa_netlink_hook = udebug_netlink_hook;
+-	} else {
+-		for (size_t i = 0; i < ARRAY_SIZE(ud_nl); i++)
+-			udebug_buf_free(&ud_nl[i]);
+-		udebug_buf_free(&ud_log);
+-		udebug_free(&ud);
+-		wpa_printf_hook = NULL;
+-		wpa_hexdump_hook = NULL;
+-		wpa_netlink_hook = NULL;
+-	}
+-
+-	return ucv_boolean_new(true);
+-}
+-
+ uc_value_t *wpa_ucode_global_init(const char *name, uc_resource_type_t *global_type)
+ {
+ 	uc_value_t *global = uc_resource_new(global_type, NULL);
+diff --git a/package/network/services/hostapd/src/src/utils/ucode.h b/package/network/services/hostapd/src/src/utils/ucode.h
+index c083241e079..2c1886976ee 100644
+--- a/package/network/services/hostapd/src/src/utils/ucode.h
++++ b/package/network/services/hostapd/src/src/utils/ucode.h
+@@ -21,7 +21,6 @@ int wpa_ucode_registry_add(uc_value_t *reg, uc_value_t *val);
+ uc_value_t *wpa_ucode_registry_get(uc_value_t *reg, int idx);
+ uc_value_t *wpa_ucode_registry_remove(uc_value_t *reg, int idx);
+ 
+-uc_value_t *uc_wpa_udebug_set(uc_vm_t *vm, size_t nargs);
+ uc_value_t *uc_wpa_printf(uc_vm_t *vm, size_t nargs);
+ uc_value_t *uc_wpa_getpid(uc_vm_t *vm, size_t nargs);
+ uc_value_t *uc_wpa_sha1(uc_vm_t *vm, size_t nargs);
+diff --git a/package/network/services/hostapd/src/wpa_supplicant/ucode.c b/package/network/services/hostapd/src/wpa_supplicant/ucode.c
+index 397f85bde7f..6cba73dcd53 100644
+--- a/package/network/services/hostapd/src/wpa_supplicant/ucode.c
++++ b/package/network/services/hostapd/src/wpa_supplicant/ucode.c
+@@ -262,7 +262,6 @@ int wpas_ucode_init(struct wpa_global *gl)
+ 		{ "getpid", uc_wpa_getpid },
+ 		{ "add_iface", uc_wpas_add_iface },
+ 		{ "remove_iface", uc_wpas_remove_iface },
+-		{ "udebug_set", uc_wpa_udebug_set },
+ 	};
+ 	static const uc_function_list_t iface_fns[] = {
+ 		{ "status", uc_wpas_iface_status },
diff --git a/autobuild_mac80211_release/0008-wifi7-netifd-revert-udebug.patch b/autobuild_mac80211_release/0008-wifi7-netifd-revert-udebug.patch
new file mode 100644
index 0000000..ef367e8
--- /dev/null
+++ b/autobuild_mac80211_release/0008-wifi7-netifd-revert-udebug.patch
@@ -0,0 +1,13 @@
+diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
+index ccd566e0..936fdfbb 100644
+--- a/package/network/config/netifd/Makefile
++++ b/package/network/config/netifd/Makefile
+@@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/cmake.mk
+ define Package/netifd
+   SECTION:=base
+   CATEGORY:=Base system
+-  DEPENDS:=+libuci +libnl-tiny +libubus +ubus +ubusd +jshn +libubox +libudebug
++  DEPENDS:=+libuci +libnl-tiny +libubus +ubus +ubusd +jshn +libubox
+   TITLE:=OpenWrt Network Interface Configuration Daemon
+ endef
+ 
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/0002-add-EHT-config-for-hostapd.patch b/autobuild_mac80211_release/mt7988_mt7996_mac80211/0002-add-EHT-config-for-hostapd.patch
index dac2b4b..9c18b4c 100644
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/0002-add-EHT-config-for-hostapd.patch
+++ b/autobuild_mac80211_release/mt7988_mt7996_mac80211/0002-add-EHT-config-for-hostapd.patch
@@ -1,5 +1,5 @@
 diff --git a/package/network/services/hostapd/Config.in b/package/network/services/hostapd/Config.in
-index 87ad7e09..c42620a4 100644
+index 87ad7e0..c42620a 100644
 --- a/package/network/services/hostapd/Config.in
 +++ b/package/network/services/hostapd/Config.in
 @@ -82,6 +82,10 @@ config DRIVER_11AX_SUPPORT
@@ -14,10 +14,10 @@
  	bool "Enable support for unsecure and obsolete WEP"
  	help
 diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
-index 61410069..29391878 100644
+index 7a31c36..4897a2f 100644
 --- a/package/network/services/hostapd/Makefile
 +++ b/package/network/services/hostapd/Makefile
-@@ -27,6 +27,7 @@ PKG_CONFIG_DEPENDS:= \
+@@ -29,6 +29,7 @@ PKG_CONFIG_DEPENDS:= \
  	CONFIG_WPA_RFKILL_SUPPORT \
  	CONFIG_DRIVER_11AC_SUPPORT \
  	CONFIG_DRIVER_11AX_SUPPORT \
@@ -25,7 +25,7 @@
  	CONFIG_WPA_ENABLE_WEP
  
  PKG_BUILD_FLAGS:=gc-sections lto
-@@ -79,6 +80,10 @@ ifneq ($(CONFIG_DRIVER_11AX_SUPPORT),)
+@@ -81,6 +82,10 @@ ifneq ($(CONFIG_DRIVER_11AX_SUPPORT),)
    HOSTAPD_IEEE80211AX:=y
  endif
  
@@ -33,14 +33,14 @@
 +  HOSTAPD_IEEE80211BE:=y
 +endif
 +
- CORE_DEPENDS = +ucode +libubus +libucode +ucode-mod-fs +ucode-mod-nl80211 +ucode-mod-rtnl +ucode-mod-ubus +ucode-mod-uloop +libblobmsg-json +libudebug
- OPENSSL_DEPENDS = +PACKAGE_$(1):libopenssl
+ CORE_DEPENDS = +ucode +libubus +libucode +ucode-mod-fs +ucode-mod-nl80211 +ucode-mod-rtnl +ucode-mod-ubus +ucode-mod-uloop +libblobmsg-json
  
-@@ -86,6 +91,7 @@ DRIVER_MAKEOPTS= \
- 	CONFIG_ACS=y CONFIG_DRIVER_NL80211=y \
+ DRIVER_MAKEOPTS= \
+@@ -88,6 +93,7 @@ DRIVER_MAKEOPTS= \
+ 	CONFIG_DRIVER_NL80211=$(CONFIG_PACKAGE_kmod-cfg80211) \
  	CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \
  	CONFIG_IEEE80211AX=$(HOSTAPD_IEEE80211AX) \
 +	CONFIG_IEEE80211BE=$(HOSTAPD_IEEE80211BE) \
  	CONFIG_MBO=$(CONFIG_WPA_MBO_SUPPORT) \
  	CONFIG_UCODE=y
- 
+
diff --git a/autobuild_mac80211_release/package/network/config/netifd_new/patches/0002-netifd-revert-udebug.patch b/autobuild_mac80211_release/package/network/config/netifd_new/patches/0002-netifd-revert-udebug.patch
new file mode 100644
index 0000000..963cea1
--- /dev/null
+++ b/autobuild_mac80211_release/package/network/config/netifd_new/patches/0002-netifd-revert-udebug.patch
@@ -0,0 +1,223 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 28ab9ca..5ad8695 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,13 +33,11 @@ FIND_LIBRARY(uci NAMES uci)
+ FIND_LIBRARY(ubox NAMES ubox)
+ FIND_LIBRARY(ubus NAMES ubus)
+ FIND_LIBRARY(json NAMES json-c json)
+-FIND_LIBRARY(udebug NAMES udebug)
+ FIND_LIBRARY(blobmsg_json NAMES blobmsg_json)
+ 
+-SET(LIBS ${ubox} ${ubus} ${uci} ${json} ${blobmsg_json} ${udebug})
++SET(LIBS ${ubox} ${ubus} ${uci} ${json} ${blobmsg_json})
+ 
+ FIND_PATH(ubox_include_dir libubox/usock.h)
+-FIND_PATH(udebug_include_dir udebug.h)
+ INCLUDE_DIRECTORIES(${ubox_include_dir})
+ 
+ IF (NOT DEFINED LIBNL_LIBS)
+diff --git a/main.c b/main.c
+index 403dc12..ec7b1be 100644
+--- a/main.c
++++ b/main.c
+@@ -19,8 +19,6 @@
+ #include <stdarg.h>
+ #include <syslog.h>
+ 
+-#include <udebug.h>
+-
+ #include "netifd.h"
+ #include "ubus.h"
+ #include "config.h"
+@@ -37,9 +35,6 @@ const char *resolv_conf = DEFAULT_RESOLV_CONF;
+ static char **global_argv;
+ 
+ static struct list_head process_list = LIST_HEAD_INIT(process_list);
+-static struct udebug ud;
+-static struct udebug_buf udb;
+-static bool udebug_enabled;
+ 
+ #define DEFAULT_LOG_LEVEL L_NOTICE
+ 
+@@ -68,49 +63,6 @@ netifd_delete_process(struct netifd_process *proc)
+ 	close(proc->log.fd.fd);
+ }
+ 
+-static void
+-netifd_udebug_vprintf(const char *format, va_list ap)
+-{
+-	if (!udebug_enabled)
+-		return;
+-
+-	udebug_entry_init(&udb);
+-	udebug_entry_vprintf(&udb, format, ap);
+-	udebug_entry_add(&udb);
+-}
+-
+-void netifd_udebug_printf(const char *format, ...)
+-{
+-	va_list ap;
+-
+-	va_start(ap, format);
+-	netifd_udebug_vprintf(format, ap);
+-	va_end(ap);
+-}
+-
+-void netifd_udebug_set_enabled(bool val)
+-{
+-	static const struct udebug_buf_meta meta = {
+-		.name = "netifd_log",
+-		.format = UDEBUG_FORMAT_STRING,
+-	};
+-
+-	if (udebug_enabled == val)
+-		return;
+-
+-	udebug_enabled = val;
+-	if (!val) {
+-		udebug_buf_free(&udb);
+-		udebug_free(&ud);
+-		return;
+-	}
+-
+-	udebug_init(&ud);
+-	udebug_auto_connect(&ud, NULL);
+-	udebug_buf_init(&udb, 1024, 64 * 1024);
+-	udebug_buf_add(&ud, &udb, &meta);
+-}
+-
+ void
+ __attribute__((format(printf, 2, 0)))
+ netifd_log_message(int priority, const char *format, ...)
+@@ -121,7 +73,6 @@ netifd_log_message(int priority, const char *format, ...)
+ 		return;
+ 
+ 	va_start(vl, format);
+-	netifd_udebug_vprintf(format, vl);
+ 	if (use_syslog)
+ 		vsyslog(log_class[priority], format, vl);
+ 	else
+diff --git a/netifd.h b/netifd.h
+index c579e7c..9645a0a 100644
+--- a/netifd.h
++++ b/netifd.h
+@@ -70,7 +70,6 @@ enum {
+ #ifdef DEBUG
+ #define DPRINTF(format, ...) fprintf(stderr, "%s(%d): " format, __func__, __LINE__, ## __VA_ARGS__)
+ #define D(level, format, ...) do { \
+-		netifd_udebug_printf("[" #level "] %s(%d): " format,  __func__, __LINE__, ## __VA_ARGS__); \
+ 		if (debug_mask & (1 << (DEBUG_ ## level))) \
+ 				DPRINTF(format, ##__VA_ARGS__); \
+ 	} while (0)
+@@ -96,8 +95,6 @@ struct netifd_process {
+ 	bool log_overflow;
+ };
+ 
+-void netifd_udebug_printf(const char *format, ...);
+-void netifd_udebug_set_enabled(bool val);
+ void netifd_log_message(int priority, const char *format, ...);
+ 
+ int netifd_start_process(const char **argv, char **env, struct netifd_process *proc);
+diff --git a/ubus.c b/ubus.c
+index 55daec1..40fc9f4 100644
+--- a/ubus.c
++++ b/ubus.c
+@@ -27,7 +27,6 @@
+ struct ubus_context *ubus_ctx = NULL;
+ static struct blob_buf b;
+ static const char *ubus_path;
+-struct ubus_subscriber udebug_sub;
+ 
+ /* global object */
+ 
+@@ -1366,74 +1365,9 @@ netifd_extdev_invoke(uint32_t id, const char *method, struct blob_attr *msg,
+ 	return ubus_invoke(ubus_ctx, id, method, msg, data_cb, data, 3000);
+ }
+ 
+-static struct blob_attr *
+-find_attr(struct blob_attr *attr, const char *name, enum blobmsg_type type)
+-{
+-	struct blobmsg_policy policy = { name, type };
+-	struct blob_attr *ret;
+-
+-	if (!attr)
+-		return NULL;
+-
+-	blobmsg_parse_attr(&policy, 1, &ret, attr);
+-
+-	return ret;
+-}
+-
+-static void
+-netifd_udebug_config_cb(struct blob_attr *data)
+-{
+-	enum {
+-		CFG_ATTR_ENABLED,
+-		__CFG_ATTR_MAX
+-	};
+-	static const struct blobmsg_policy policy[__CFG_ATTR_MAX] = {
+-		[CFG_ATTR_ENABLED] = { "enabled", BLOBMSG_TYPE_STRING },
+-	};
+-	struct blob_attr *tb[__CFG_ATTR_MAX];
+-	bool en;
+-
+-	data = find_attr(data, "service", BLOBMSG_TYPE_TABLE);
+-	data = find_attr(data, "netifd", BLOBMSG_TYPE_TABLE);
+-	if (!data)
+-		return;
+-
+-	blobmsg_parse_attr(policy, __CFG_ATTR_MAX, tb, data);
+-	if (!tb[CFG_ATTR_ENABLED])
+-		return;
+-
+-	en = !!atoi(blobmsg_get_string(tb[CFG_ATTR_ENABLED]));
+-	netifd_udebug_set_enabled(en);
+-}
+-
+-static int
+-netifd_udebug_notify_cb(struct ubus_context *ctx, struct ubus_object *obj,
+-			struct ubus_request_data *req, const char *method,
+-			struct blob_attr *msg)
+-{
+-	netifd_udebug_config_cb(msg);
+-
+-	return 0;
+-}
+-
+-static void
+-netifd_udebug_req_cb(struct ubus_request *req, int type, struct blob_attr *msg)
+-{
+-	netifd_udebug_config_cb(msg);
+-}
+-
+-static bool
+-netifd_udebug_sub_cb(struct ubus_context *ctx, struct ubus_subscriber *sub,
+-		     const char *path)
+-{
+-	return !strcmp(path, "udebug");
+-}
+-
+ int
+ netifd_ubus_init(const char *path)
+ {
+-	uint32_t id;
+-
+ 	uloop_init();
+ 	ubus_path = path;
+ 
+@@ -1450,14 +1384,6 @@ netifd_ubus_init(const char *path)
+ 	netifd_add_object(&wireless_object);
+ 	netifd_add_iface_object();
+ 
+-	udebug_sub.cb = netifd_udebug_notify_cb;
+-	udebug_sub.new_obj_cb = netifd_udebug_sub_cb;
+-	ubus_register_subscriber(ubus_ctx, &udebug_sub);
+-	if (ubus_lookup_id(ubus_ctx, "udebug", &id) == 0) {
+-		ubus_subscribe(ubus_ctx, &udebug_sub, id);
+-		ubus_invoke(ubus_ctx, id, "get_config", NULL, netifd_udebug_req_cb, NULL, 1000);
+-	}
+-
+ 	return 0;
+ }
+