diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-12 15:28:46 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-12 15:28:46 +0000 |
commit | 30c67c0e526d256d94bc1026d021d62a97947ef1 (patch) | |
tree | 3c7ed85eb0545d813594a2fa3338bc08dd853cab /linux/drivers/media/dvb/siano/smscoreapi.c | |
parent | 5970b3d8008b625f502690ea408dc756f45a30e3 (diff) | |
download | mediapointer-dvb-s2-30c67c0e526d256d94bc1026d021d62a97947ef1.tar.gz mediapointer-dvb-s2-30c67c0e526d256d94bc1026d021d62a97947ef1.tar.bz2 |
Siano: smsdvb - use 'push' status mechanism
From: Uri Shkolnik <uris@siano-ms.com>
This patch replace the old method of pulling the device status by
sending "get_statistics" request, to push mode. This make status update
much faster, and reduce various operation time (UHF scan now takes 15s
instead of 2m). In order to make the change the following modification
have been applied:
1) core header - update statistics headers.
2) dvb adapter - omit the statistics request, add handling of
status indications.
3) core 'onresponse' - re-route messages addressed to other adapter
to the dvb adapter.
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/dvb/siano/smscoreapi.c')
-rw-r--r-- | linux/drivers/media/dvb/siano/smscoreapi.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/linux/drivers/media/dvb/siano/smscoreapi.c b/linux/drivers/media/dvb/siano/smscoreapi.c index 9a9db2588..15272dbb5 100644 --- a/linux/drivers/media/dvb/siano/smscoreapi.c +++ b/linux/drivers/media/dvb/siano/smscoreapi.c @@ -904,15 +904,11 @@ smscore_client_t *smscore_find_client(struct smscore_device_t *coredev, * */ void smscore_onresponse(struct smscore_device_t *coredev, - struct smscore_buffer_t *cb) -{ - struct SmsMsgHdr_ST *phdr = - (struct SmsMsgHdr_ST *)((u8 *) cb->p + cb->offset); - struct smscore_client_t *client = - smscore_find_client(coredev, phdr->msgType, phdr->msgDstId); + struct smscore_buffer_t *cb) { + struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) ((u8 *) cb->p + + cb->offset); + struct smscore_client_t *client; int rc = -EBUSY; - -#if 1 static unsigned long last_sample_time; /* = 0; */ static int data_total; /* = 0; */ unsigned long time_now = jiffies_to_msecs(jiffies); @@ -930,7 +926,16 @@ void smscore_onresponse(struct smscore_device_t *coredev, } data_total += cb->size; -#endif + /* Do we need to re-route? */ + if ((phdr->msgType == MSG_SMS_HO_PER_SLICES_IND) || + (phdr->msgType == MSG_SMS_TRANSMISSION_IND)) { + if (coredev->mode == DEVICE_MODE_DVBT_BDA) + phdr->msgDstId = DVBT_BDA_CONTROL_MSG_ID; + } + + + client = smscore_find_client(coredev, phdr->msgType, phdr->msgDstId); + /* If no client registered for type & id, * check for control client where type is not registered */ if (client) |