#include "smscoreapi.h"
#include "sms-cards.h"
#include "smsir.h"
-#include "smsendian.h"
static int sms_dbg;
module_param_named(debug, sms_dbg, int, 0644);
msg->msgData[0] = coredev->ir.controller;
msg->msgData[1] = coredev->ir.timeout;
- smsendian_handle_tx_message(
- (struct SmsMsgHdr_ST2 *)msg);
rc = smscore_sendrequest_and_wait(coredev, msg,
msg->xMsgHeader. msgLength,
&coredev->ir_init_done);
MtuMsg.xMsgHeader.msgLength = sizeof(MtuMsg);
MtuMsg.msgData[0] = board->mtu;
- smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&MtuMsg);
coredev->sendrequest_handler(coredev->context, &MtuMsg,
sizeof(MtuMsg));
}
sizeof(CrysMsg));
CrysMsg.msgData[0] = board->crystal;
- smsendian_handle_tx_message((struct SmsMsgHdr_S *)&CrysMsg);
coredev->sendrequest_handler(coredev->context, &CrysMsg,
sizeof(CrysMsg));
}
/* Entry point */
msg->msgData[1] = firmware->Length;
msg->msgData[2] = 0; /* Regular checksum*/
- smsendian_handle_tx_message(msg);
rc = smscore_sendrequest_and_wait(coredev, msg,
msg->xMsgHeader.msgLength,
&coredev->data_validity_done);
TriggerMsg->msgData[3] = 0; /* Parameter */
TriggerMsg->msgData[4] = 4; /* Task ID */
- smsendian_handle_tx_message((struct SmsMsgHdr_S *)msg);
rc = smscore_sendrequest_and_wait(coredev, TriggerMsg,
TriggerMsg->xMsgHeader.msgLength,
&coredev->trigger_done);
} else {
SMS_INIT_MSG(&msg->xMsgHeader, MSG_SW_RELOAD_EXEC_REQ,
sizeof(struct SmsMsgHdr_ST));
- smsendian_handle_tx_message((struct SmsMsgHdr_S *)msg);
rc = coredev->sendrequest_handler(coredev->context, msg,
msg->xMsgHeader.msgLength);
}
sizeof(struct SmsMsgData_ST));
msg->msgData[0] = mode;
- smsendian_handle_tx_message((struct SmsMsgHdr_ST *)msg);
rc = smscore_sendrequest_and_wait(coredev, msg,
msg->xMsgHeader. msgLength,
&coredev->init_device_done);
rc = client->onresponse_handler(client->context, cb);
if (rc < 0) {
- smsendian_handle_rx_message((struct SmsMsgData_ST *)phdr);
-
switch (phdr->msgType) {
case MSG_SMS_ISDBT_TUNE_RES:
break;
pMsg->msgData[5] = 0;
}
- smsendian_handle_tx_message((struct SmsMsgHdr_ST *)pMsg);
rc = smscore_sendrequest_and_wait(coredev, pMsg, totalLen,
&coredev->gpio_configuration_done);
pMsg->msgData[1] = NewLevel;
/* Send message to SMS */
- smsendian_handle_tx_message((struct SmsMsgHdr_ST *)pMsg);
rc = smscore_sendrequest_and_wait(coredev, pMsg, totalLen,
&coredev->gpio_set_level_done);
pMsg->msgData[1] = 0;
/* Send message to SMS */
- smsendian_handle_tx_message((struct SmsMsgHdr_ST *)pMsg);
rc = smscore_sendrequest_and_wait(coredev, pMsg, totalLen,
&coredev->gpio_get_level_done);
#include "dvb_frontend.h"
#include "smscoreapi.h"
-#include "smsendian.h"
#include "sms-cards.h"
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
/*u32 MsgDataLen = phdr->msgLength - sizeof(struct SmsMsgHdr_ST);*/
bool is_status_update = false;
- smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr);
-
switch (phdr->msgType) {
case MSG_SMS_DVBT_BDA_DATA:
dvb_dmx_swfilter(&client->demux, (u8 *)(phdr + 1),
PidMsg.xMsgHeader.msgLength = sizeof(PidMsg);
PidMsg.msgData[0] = feed->pid;
- smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg);
return smsclient_sendrequest(client->smsclient,
&PidMsg, sizeof(PidMsg));
}
PidMsg.xMsgHeader.msgLength = sizeof(PidMsg);
PidMsg.msgData[0] = feed->pid;
- smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg);
return smsclient_sendrequest(client->smsclient,
&PidMsg, sizeof(PidMsg));
}
{
int rc;
- smsendian_handle_tx_message((struct SmsMsgHdr_ST *)buffer);
rc = smsclient_sendrequest(client->smsclient, buffer, size);
if (rc < 0)
return rc;
else
Msg.msgType = MSG_SMS_GET_STATISTICS_REQ;
- smsendian_handle_tx_message((struct SmsMsgHdr_S *)&Msg);
-
rc = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
&client->stats_done);
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 {
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);