From 517bec233e14c48fd85d07eae142a72fbca29ea5 Mon Sep 17 00:00:00 2001 From: Bjarki Arge Andreasen Date: Wed, 11 Oct 2023 15:51:33 +0200 Subject: [PATCH] modem: modem_cmux: Increase modem cmux buf size This commit increases the buffer used for commands in the control channel within an instance of the modem_cmux module. The buffer was not large enough to store an MSC command if the optional break signals where included. This commit fixes the issue and updates the test suite to use the max size MSC message. Signed-off-by: Bjarki Arge Andreasen --- subsys/modem/modem_cmux.c | 2 +- tests/subsys/modem/modem_cmux/src/main.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/subsys/modem/modem_cmux.c b/subsys/modem/modem_cmux.c index 690af4ddce8..a73241a7a46 100644 --- a/subsys/modem/modem_cmux.c +++ b/subsys/modem/modem_cmux.c @@ -23,7 +23,7 @@ LOG_MODULE_REGISTER(modem_cmux, CONFIG_MODEM_MODULES_LOG_LEVEL); #define MODEM_CMUX_DATA_FRAME_SIZE_MIN (MODEM_CMUX_FRAME_SIZE_MAX + \ MODEM_CMUX_DATA_SIZE_MIN) -#define MODEM_CMUX_CMD_DATA_SIZE_MAX (0x04) +#define MODEM_CMUX_CMD_DATA_SIZE_MAX (0x08) #define MODEM_CMUX_CMD_FRAME_SIZE_MAX (MODEM_CMUX_FRAME_SIZE_MAX + \ MODEM_CMUX_CMD_DATA_SIZE_MAX) diff --git a/tests/subsys/modem/modem_cmux/src/main.c b/tests/subsys/modem/modem_cmux/src/main.c index 243aa6112c8..9df6837efc5 100644 --- a/tests/subsys/modem/modem_cmux/src/main.c +++ b/tests/subsys/modem/modem_cmux/src/main.c @@ -100,11 +100,11 @@ static uint8_t cmux_frame_dlci2_sabm_cmd[] = {0xF9, 0x0B, 0x3F, 0x01, 0x59, 0xF9 static uint8_t cmux_frame_dlci2_sabm_ack[] = {0xF9, 0x0B, 0x73, 0x01, 0x92, 0xF9}; static uint8_t cmux_frame_dlci2_disc_cmd[] = {0xF9, 0x0B, 0x53, 0x01, 0xB8, 0xF9}; static uint8_t cmux_frame_dlci2_ua_ack[] = {0xF9, 0x0B, 0x73, 0x01, 0x92, 0xF9}; -static uint8_t cmux_frame_control_msc_cmd[] = {0xF9, 0x01, 0xFF, 0x09, 0xE3, - 0x05, 0x0B, 0x09, 0x8F, 0xF9}; +static uint8_t cmux_frame_control_msc_cmd[] = {0xF9, 0x01, 0xFF, 0x0B, 0xE3, + 0x07, 0x0B, 0x09, 0x01, 0x6C, 0xF9}; -static uint8_t cmux_frame_control_msc_ack[] = {0xF9, 0x01, 0xFF, 0x09, 0xE1, - 0x05, 0x0B, 0x09, 0x8F, 0xF9}; +static uint8_t cmux_frame_control_msc_ack[] = {0xF9, 0x01, 0xFF, 0x0B, 0xE1, + 0x07, 0x0B, 0x09, 0x01, 0x6C, 0xF9}; static uint8_t cmux_frame_control_fcon_cmd[] = {0xF9, 0x01, 0xFF, 0x05, 0xA3, 0x01, 0x86, 0xF9}; static uint8_t cmux_frame_control_fcon_ack[] = {0xF9, 0x01, 0xFF, 0x05, 0xA1, 0x01, 0x86, 0xF9};