Lines Matching refs:command
79 static int modem_cmux_wrap_command(struct modem_cmux_command **command, const uint8_t *data, in modem_cmux_wrap_command() argument
86 (*command) = (struct modem_cmux_command *)data; in modem_cmux_wrap_command()
88 if (((*command)->length.ea == 0) || ((*command)->type.ea == 0)) { in modem_cmux_wrap_command()
92 if ((*command)->length.value != (data_len - 2)) { in modem_cmux_wrap_command()
224 static void modem_cmux_log_transmit_command(const struct modem_cmux_command *command) in modem_cmux_log_transmit_command() argument
226 LOG_DBG("ea:%u,cr:%u,type:%s", command->type.ea, command->type.cr, in modem_cmux_log_transmit_command()
227 modem_cmux_command_type_to_str(command->type.value)); in modem_cmux_log_transmit_command()
228 LOG_HEXDUMP_DBG(command->value, command->length.value, "data:"); in modem_cmux_log_transmit_command()
231 static void modem_cmux_log_received_command(const struct modem_cmux_command *command) in modem_cmux_log_received_command() argument
233 LOG_DBG("ea:%u,cr:%u,type:%s", command->type.ea, command->type.cr, in modem_cmux_log_received_command()
234 modem_cmux_command_type_to_str(command->type.value)); in modem_cmux_log_received_command()
235 LOG_HEXDUMP_DBG(command->value, command->length.value, "data:"); in modem_cmux_log_received_command()
326 struct modem_cmux_command *command; in modem_cmux_transmit_cmd_frame() local
337 if (modem_cmux_wrap_command(&command, frame->data, frame->data_len) == 0) { in modem_cmux_transmit_cmd_frame()
338 modem_cmux_log_transmit_command(command); in modem_cmux_transmit_cmd_frame()
381 struct modem_cmux_command *command; in modem_cmux_acknowledge_received_frame() local
392 modem_cmux_wrap_command(&command, data, cmux->frame.data_len); in modem_cmux_acknowledge_received_frame()
393 command->type.cr = 0; in modem_cmux_acknowledge_received_frame()
402 static void modem_cmux_on_msc_command(struct modem_cmux *cmux, struct modem_cmux_command *command) in modem_cmux_on_msc_command() argument
404 if (command->type.cr) { in modem_cmux_on_msc_command()
425 static void modem_cmux_on_cld_command(struct modem_cmux *cmux, struct modem_cmux_command *command) in modem_cmux_on_cld_command() argument
427 if (command->type.cr) { in modem_cmux_on_cld_command()
470 struct modem_cmux_command *command; in modem_cmux_on_control_frame_uih() local
478 if (modem_cmux_wrap_command(&command, cmux->frame.data, cmux->frame.data_len) < 0) { in modem_cmux_on_control_frame_uih()
483 modem_cmux_log_received_command(command); in modem_cmux_on_control_frame_uih()
485 switch (command->type.value) { in modem_cmux_on_control_frame_uih()
487 modem_cmux_on_cld_command(cmux, command); in modem_cmux_on_control_frame_uih()
491 modem_cmux_on_msc_command(cmux, command); in modem_cmux_on_control_frame_uih()
1028 struct modem_cmux_command *command; in modem_cmux_disconnect_handler() local
1033 command = modem_cmux_command_wrap(data); in modem_cmux_disconnect_handler()
1034 command->type.ea = 1; in modem_cmux_disconnect_handler()
1035 command->type.cr = 1; in modem_cmux_disconnect_handler()
1036 command->type.value = MODEM_CMUX_COMMAND_CLD; in modem_cmux_disconnect_handler()
1037 command->length.ea = 1; in modem_cmux_disconnect_handler()
1038 command->length.value = 0; in modem_cmux_disconnect_handler()