[OpenWrt-Devel] [PATCH v2 2/7] add command done status to verbose output
Bjørn Mork
bjorn at mork.no
Wed Apr 8 09:31:19 EDT 2015
Signed-off-by: Bjørn Mork <bjorn at mork.no>
---
mbim-dev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mbim-dev.c b/mbim-dev.c
index 4c129b0..af76683 100644
--- a/mbim-dev.c
+++ b/mbim-dev.c
@@ -76,7 +76,7 @@ mbim_recv(struct uloop_fd *u, unsigned int events)
{
ssize_t cnt = read(u->fd, mbim_buffer, MBIM_BUFFER_SIZE);
struct mbim_message_header *hdr = (struct mbim_message_header *) mbim_buffer;
- struct command_message *msg = (struct command_message *) mbim_buffer;
+ struct command_done_message *msg = (struct command_done_message *) (hdr + 1);
int i;
if (cnt < 0)
@@ -105,6 +105,8 @@ mbim_recv(struct uloop_fd *u, unsigned int events)
mbim_send_close_msg();
break;
case MBIM_MESSAGE_TYPE_COMMAND_DONE:
+ if (verbose)
+ printf(" status_code: %04X\n", le32toh(msg->status_code));
return_code = current_handler->response(msg->buffer, le32toh(msg->buffer_length));
if (return_code < 0)
no_close = 0;
--
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list