aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/siano
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-03-10 09:51:25 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-21 06:49:04 -0400
commita9b9fbdf0a6a65359cd97254a282526822de5257 (patch)
treee65d8cf85fd26a49b75d8ef8c3d29ac849ae00c1 /drivers/media/common/siano
parent4cce1f4eb29765def538e7c975dac73346a0d306 (diff)
[media] siano: don't request statistics too fast
As each DVBv3 call may generate an stats overhead, prevent doing it too fast. This is specially useful if a burst of get stats DVBv3 call is sent. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/siano')
-rw-r--r--drivers/media/common/siano/smsdvb-main.c5
-rw-r--r--drivers/media/common/siano/smsdvb.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/common/siano/smsdvb-main.c b/drivers/media/common/siano/smsdvb-main.c
index c14f10d5d6c0..4242005082ed 100644
--- a/drivers/media/common/siano/smsdvb-main.c
+++ b/drivers/media/common/siano/smsdvb-main.c
@@ -663,6 +663,11 @@ static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
663 int rc; 663 int rc;
664 struct SmsMsgHdr_ST Msg; 664 struct SmsMsgHdr_ST Msg;
665 665
666 /* Don't request stats too fast */
667 if (client->get_stats_jiffies &&
668 (!time_after(jiffies, client->get_stats_jiffies)))
669 return 0;
670 client->get_stats_jiffies = jiffies + msecs_to_jiffies(100);
666 671
667 Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 672 Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
668 Msg.msgDstId = HIF_TASK; 673 Msg.msgDstId = HIF_TASK;
diff --git a/drivers/media/common/siano/smsdvb.h b/drivers/media/common/siano/smsdvb.h
index 09982bcf2535..34220696d87d 100644
--- a/drivers/media/common/siano/smsdvb.h
+++ b/drivers/media/common/siano/smsdvb.h
@@ -52,6 +52,8 @@ struct smsdvb_client_t {
52 int event_fe_state; 52 int event_fe_state;
53 int event_unc_state; 53 int event_unc_state;
54 54
55 unsigned long get_stats_jiffies;
56
55 /* Stats debugfs data */ 57 /* Stats debugfs data */
56 struct dentry *debugfs; 58 struct dentry *debugfs;
57 59