mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-31 18:38:10 +00:00
patches: move all patches into a single folder
This allows easier managing of updated patches. Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
55
patches/0004-netifd-add-interface-to-status-messages.patch
Normal file
55
patches/0004-netifd-add-interface-to-status-messages.patch
Normal file
@@ -0,0 +1,55 @@
|
||||
From 20c424c6db8637020f979befdc79cac077e48fd5 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Wed, 29 Jul 2020 12:30:42 +0200
|
||||
Subject: [PATCH 04/30] netifd: add interface to status messages
|
||||
|
||||
Add the interface name to the status messages. Otherwise we cannot identify the content.
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
.../netifd/patches/0103-ubus-iface.patch | 33 +++++++++++++++++++
|
||||
1 file changed, 33 insertions(+)
|
||||
create mode 100644 package/network/config/netifd/patches/0103-ubus-iface.patch
|
||||
|
||||
diff --git a/package/network/config/netifd/patches/0103-ubus-iface.patch b/package/network/config/netifd/patches/0103-ubus-iface.patch
|
||||
new file mode 100644
|
||||
index 0000000000..2c489fe96a
|
||||
--- /dev/null
|
||||
+++ b/package/network/config/netifd/patches/0103-ubus-iface.patch
|
||||
@@ -0,0 +1,33 @@
|
||||
+Index: netifd-2019-08-05-5e02f944/ubus.c
|
||||
+===================================================================
|
||||
+--- netifd-2019-08-05-5e02f944.orig/ubus.c
|
||||
++++ netifd-2019-08-05-5e02f944/ubus.c
|
||||
+@@ -1276,6 +1276,20 @@ netifd_ubus_interface_notify(struct inte
|
||||
+ ubus_notify(ubus_ctx, &iface->ubus, event, b.head, -1);
|
||||
+ }
|
||||
+
|
||||
++static void
|
||||
++iface_subscribe_handler(struct ubus_context *ctx, struct ubus_object *obj)
|
||||
++{
|
||||
++ struct interface *iface;
|
||||
++
|
||||
++ iface = container_of(obj, struct interface, ubus);
|
||||
++ if (!iface->ubus.has_subscribers)
|
||||
++ return;
|
||||
++ blob_buf_init(&b, 0);
|
||||
++ blobmsg_add_string(&b, "interface", iface->name);
|
||||
++ netifd_dump_status(iface);
|
||||
++ ubus_notify(ubus_ctx, &iface->ubus, "interface.update", b.head, -1);
|
||||
++}
|
||||
++
|
||||
+ void
|
||||
+ netifd_ubus_add_interface(struct interface *iface)
|
||||
+ {
|
||||
+@@ -1289,6 +1303,7 @@ netifd_ubus_add_interface(struct interfa
|
||||
+ obj->type = &iface_object_type;
|
||||
+ obj->methods = iface_object_methods;
|
||||
+ obj->n_methods = ARRAY_SIZE(iface_object_methods);
|
||||
++ obj->subscribe_cb = iface_subscribe_handler;
|
||||
+ if (ubus_add_object(ubus_ctx, &iface->ubus)) {
|
||||
+ DPRINTF("failed to publish ubus object for interface '%s'\n", iface->name);
|
||||
+ free(name);
|
||||
--
|
||||
2.25.1
|
||||
|
||||
Reference in New Issue
Block a user