Skip to content

Commit 822a501

Browse files
SeppoTakalokartben
authored andcommitted
modem: cmux: Handle CLD response
Instead of dropping all responses, handle the CLD. Signed-off-by: Seppo Takalo <[email protected]>
1 parent 635f739 commit 822a501

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

subsys/modem/modem_cmux.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,19 @@ static void modem_cmux_on_control_frame_uih(struct modem_cmux *cmux)
545545

546546
modem_cmux_log_received_command(command);
547547

548+
if (!command->type.cr) {
549+
LOG_DBG("Received response command");
550+
switch (command->type.value) {
551+
case MODEM_CMUX_COMMAND_CLD:
552+
modem_cmux_on_cld_command(cmux, command);
553+
break;
554+
default:
555+
/* Responses to other commands are ignored */
556+
break;
557+
}
558+
return;
559+
}
560+
548561
switch (command->type.value) {
549562
case MODEM_CMUX_COMMAND_CLD:
550563
modem_cmux_on_cld_command(cmux, command);
@@ -631,8 +644,7 @@ static void modem_cmux_on_control_frame(struct modem_cmux *cmux)
631644
modem_cmux_log_received_frame(&cmux->frame);
632645

633646
if (is_connected(cmux) && cmux->frame.cr == cmux->initiator) {
634-
LOG_DBG("Received a response frame, dropping");
635-
return;
647+
LOG_DBG("Received a response frame");
636648
}
637649

638650
switch (cmux->frame.type) {

0 commit comments

Comments
 (0)