diff --git a/frontends/stv0910.c b/frontends/stv0910.c index 2fba226..c1c5941 100644 --- a/frontends/stv0910.c +++ b/frontends/stv0910.c @@ -1385,14 +1385,17 @@ static int read_signal_strength(struct dvb_frontend *fe, u16 *strength) } Power /= 5; - pBBGain = (465 - Log10x100(Power)); + pBBGain = (465 - Log10x100(Power)) * 10; if (fe->ops.tuner_ops.get_rf_strength) fe->ops.tuner_ops.get_rf_strength(fe, strength); else *strength = 0; - - *strength += pBBGain * 10; + + if (pBBGain < *strength) + *strength -= pBBGain; + else + *strength = 0; p->strength.len = 1; p->strength.stat[0].scale = FE_SCALE_DECIBEL; diff --git a/frontends/stv6111.c b/frontends/stv6111.c index 984e6eb..89628df 100644 --- a/frontends/stv6111.c +++ b/frontends/stv6111.c @@ -707,7 +707,7 @@ static int get_rf_strength(struct dvb_frontend *fe, u16 *st) else if (Gain > 10000) Gain = 10000; - *st = Gain; + *st = 10000 - Gain; return 0; }