diff options
author | Jemma Denson <jdenson@gmail.com> | 2015-05-19 17:23:14 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-05-20 09:03:15 -0300 |
commit | e3f2f63e8cc8a9b9a16f351b55a108ab82de6d2e (patch) | |
tree | 5d4ca62f249d3cf1ae9da2a3e4e3757923bc5190 /drivers/media/dvb-frontends/cx24120.c | |
parent | 80e9710b34550ae906424feb2cf40dee0422ce46 (diff) | |
download | linux-stable-e3f2f63e8cc8a9b9a16f351b55a108ab82de6d2e.tar.gz linux-stable-e3f2f63e8cc8a9b9a16f351b55a108ab82de6d2e.tar.bz2 linux-stable-e3f2f63e8cc8a9b9a16f351b55a108ab82de6d2e.zip |
[media] cx24120: Check for lock before updating BER & UCB
BER & UCB aren't available unless we're locked; don't update dvbv5
stats when not locked and mark these counters as unavailable.
Signed-off-by: Jemma Denson <jdenson@gmail.com>
Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/cx24120.c')
-rw-r--r-- | drivers/media/dvb-frontends/cx24120.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/cx24120.c b/drivers/media/dvb-frontends/cx24120.c index ce784248b328..dc80e6affeae 100644 --- a/drivers/media/dvb-frontends/cx24120.c +++ b/drivers/media/dvb-frontends/cx24120.c @@ -663,6 +663,15 @@ static void cx24120_get_stats(struct cx24120_state *state) c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE; } + /* BER & UCB require lock */ + if (!(state->fe_status & FE_HAS_LOCK)) { + c->post_bit_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE; + c->post_bit_count.stat[0].scale = FE_SCALE_NOT_AVAILABLE; + c->block_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE; + c->block_count.stat[0].scale = FE_SCALE_NOT_AVAILABLE; + return; + } + /* BER */ if (time_after(jiffies, state->ber_jiffies_stats)) { msecs = (state->berw_usecs + 500) / 1000; |