Commit 793786d1 authored by Uri Shkolnik's avatar Uri Shkolnik Committed by Mauro Carvalho Chehab

V4L/DVB (11782): Siano: smsdvb - use 'push' status mechanism

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.
Signed-off-by: default avatarUri Shkolnik <uris@siano-ms.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ba79bb2c
......@@ -904,14 +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;
static unsigned long last_sample_time; /* = 0; */
static int data_total; /* = 0; */
unsigned long time_now = jiffies_to_msecs(jiffies);
......@@ -929,6 +926,16 @@ void smscore_onresponse(struct smscore_device_t *coredev,
}
data_total += cb->size;
/* 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)
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment