From 89693b7d7bd965c18e9ce1c68eef2b52f9c2b745 Mon Sep 17 00:00:00 2001 From: Reinhard Nissl Date: Fri, 18 Jan 2008 16:06:18 -0300 Subject: V4L/DVB (9445): Bug: Bandwidth calculation at upper and lower boundaries Signed-off-by: Reinhard Nissl Signed-off-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/stb6100.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/media/dvb/frontends/stb6100.c') diff --git a/drivers/media/dvb/frontends/stb6100.c b/drivers/media/dvb/frontends/stb6100.c index f4c2b8e114b..0259a468950 100644 --- a/drivers/media/dvb/frontends/stb6100.c +++ b/drivers/media/dvb/frontends/stb6100.c @@ -267,13 +267,13 @@ static int stb6100_set_bandwidth(struct dvb_frontend *fe, u32 bandwidth) int rc; struct stb6100_state *state = fe->tuner_priv; - dprintk(verbose, FE_DEBUG, 1, "set bandwidth to %u kHz", bandwidth); + dprintk(verbose, FE_DEBUG, 1, "set bandwidth to %u Hz", bandwidth); bandwidth /= 2; /* ZIF */ - if (bandwidth > 36000000) /* F[4:0] BW/2 max =31+5=36 mhz for F=31 */ + if (bandwidth >= 36000000) /* F[4:0] BW/2 max =31+5=36 mhz for F=31 */ tmp = 31; - if (bandwidth < 5000000) /* bw/2 min = 5Mhz for F=0 */ + else if (bandwidth <= 5000000) /* bw/2 min = 5Mhz for F=0 */ tmp = 0; else /* if 5 < bw/2 < 36 */ tmp = bandwidth / 1000000 - 5; -- cgit v1.2.3