From e9e271ec30602290e4998f277c450ac28a256483 Mon Sep 17 00:00:00 2001 From: hackerman-kl Date: Sat, 25 Apr 2026 09:48:24 +0200 Subject: [PATCH] milan-avb: aecp: dispatch Milan MVU vendor-unique commands --- src/modules/module-avb/aecp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/modules/module-avb/aecp.c b/src/modules/module-avb/aecp.c index 442798c04..fbe1afab2 100644 --- a/src/modules/module-avb/aecp.c +++ b/src/modules/module-avb/aecp.c @@ -11,6 +11,7 @@ #include "aecp.h" #include "aecp-aem.h" +#include "aecp-vendor-unique-milan-v12.h" #include "internal.h" static const uint8_t mac[6] = AVB_BROADCAST_MAC; @@ -83,6 +84,18 @@ static int aecp_message(void *data, uint64_t now, const void *message, int len) message_type = AVB_PACKET_AECP_GET_MESSAGE_TYPE(p); + /* Milan v1.2 Section 5.4.4: AECP VENDOR_UNIQUE_COMMAND with the Milan MVU + * protocol_id is dispatched separately. The handler returns 1 if it + * recognised the protocol_id (sent a response or NOT_IMPLEMENTED for + * the specific MVU command); 0 means "not Milan MVU, fall through". */ + if (message_type == AVB_AECP_MESSAGE_TYPE_VENDOR_UNIQUE_COMMAND && + server->avb_mode == AVB_MODE_MILAN_V12) { + int rc = aecp_vendor_unique_milan_v12_handle_command(aecp, + message, len); + if (rc != 0) + return rc < 0 ? rc : 0; + } + info = find_msg_info(message_type, NULL); if (info == NULL) return reply_not_implemented(aecp, message, len);