[0905_07] Siano: smsdvb - use 'push' status mechanism
PATCH 1/1 [0905_07] Siano: smsdvb - use 'push' status mechanism
# HG changeset patch
# User Uri Shkolnik <[email protected]>
# Date 1242142336 -10800
# Node ID 10143bda4ddae2b30af23adb15e536dc8bef7962 # Parent 291604c1821496dd4acd1d5411f8ea3ae955fd2c [0905_07] Siano: smsdvb - use 'push' status mechanism
From: Uri Shkolnik <[email protected]>
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
linux/drivers/media/dvb/siano/smscoreapi.c +14 -9
@@ -904,15 +904,11 @@ smscore_client_t *smscore_find_client(st* */ 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_d } 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)
linux/drivers/media/dvb/siano/smscoreapi.h +174 -201
425 lines not on this page · raw message
linux/drivers/media/dvb/siano/smsdvb.c +151 -109
359 lines not on this page · raw message