Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3f2f63e authored by Jemma Denson's avatar Jemma Denson Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarJemma Denson <jdenson@gmail.com>
Signed-off-by: default avatarPatrick Boettcher <patrick.boettcher@posteo.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 80e9710b
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -663,6 +663,15 @@ static void cx24120_get_stats(struct cx24120_state *state)
		c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
		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 */
	/* BER */
	if (time_after(jiffies, state->ber_jiffies_stats)) {
	if (time_after(jiffies, state->ber_jiffies_stats)) {
		msecs = (state->berw_usecs + 500) / 1000;
		msecs = (state->berw_usecs + 500) / 1000;