diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-12 14:37:09 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-12 14:37:09 +0000 |
commit | 5970b3d8008b625f502690ea408dc756f45a30e3 (patch) | |
tree | 77873dc1fbeca57b566e4f887f0732e5521ffa7d /linux/drivers/media | |
parent | 933b155b80111900885f3b736fb5ec36207cac98 (diff) | |
download | mediapointer-dvb-s2-5970b3d8008b625f502690ea408dc756f45a30e3.tar.gz mediapointer-dvb-s2-5970b3d8008b625f502690ea408dc756f45a30e3.tar.bz2 |
Siano: smsdvb - add big endian support
From: Uri Shkolnik <uris@siano-ms.com>
Add support for Siano protocol messages
with big endian systems.
Priority: normal
Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/siano/smsdvb.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/siano/smsdvb.c b/linux/drivers/media/dvb/siano/smsdvb.c index 255ee5719..b69bd77cb 100644 --- a/linux/drivers/media/dvb/siano/smsdvb.c +++ b/linux/drivers/media/dvb/siano/smsdvb.c @@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <linux/init.h> #include "smscoreapi.h" +#include "smsendian.h" #include "sms-cards.h" DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); @@ -60,6 +61,8 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)(((u8 *) cb->p) + cb->offset); + 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), @@ -149,6 +152,7 @@ static int smsdvb_start_feed(struct dvb_demux_feed *feed) 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)); } @@ -169,6 +173,7 @@ static int smsdvb_stop_feed(struct dvb_demux_feed *feed) 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)); } @@ -177,7 +182,10 @@ static int smsdvb_sendrequest_and_wait(struct smsdvb_client_t *client, void *buffer, size_t size, struct completion *completion) { - int rc = smsclient_sendrequest(client->smsclient, buffer, size); + int rc; + + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)buffer); + rc = smsclient_sendrequest(client->smsclient, buffer, size); if (rc < 0) return rc; |