summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/siano/smsusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/siano/smsusb.c')
-rw-r--r--drivers/media/usb/siano/smsusb.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c
index 751c0d6d98b8..acd3d1e82e03 100644
--- a/drivers/media/usb/siano/smsusb.c
+++ b/drivers/media/usb/siano/smsusb.c
@@ -129,6 +129,8 @@ static void smsusb_onresponse(struct urb *urb)
smscore_translate_msg(phdr->msgType),
phdr->msgType, phdr->msgLength);
+ smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr);
+
smscore_onresponse(dev->coredev, surb->cb);
surb->cb = NULL;
} else {
@@ -207,13 +209,14 @@ static int smsusb_sendrequest(void *context, void *buffer, size_t size)
struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) buffer;
int dummy;
+ if (dev->state != SMSUSB_ACTIVE)
+ return -ENOENT;
+
sms_debug("sending %s(%d) size: %d",
smscore_translate_msg(phdr->msgType), phdr->msgType,
phdr->msgLength);
- if (dev->state != SMSUSB_ACTIVE)
- return -ENOENT;
-
+ smsendian_handle_tx_message((struct SmsMsgData_ST *) phdr);
smsendian_handle_message_header((struct SmsMsgHdr_ST *)buffer);
return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2),
buffer, size, &dummy, 1000);