diff options
Diffstat (limited to 'linux/drivers/media/dvb/frontends/ves1820.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/ves1820.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/frontends/ves1820.c b/linux/drivers/media/dvb/frontends/ves1820.c index 196de7809..7f759af1f 100644 --- a/linux/drivers/media/dvb/frontends/ves1820.c +++ b/linux/drivers/media/dvb/frontends/ves1820.c @@ -433,12 +433,13 @@ int ves1820_ioctl (struct dvb_frontend *frontend, unsigned int cmd, void *arg) } case FE_READ_BER: - *((u32*) arg) = ves1820_readreg(frontend->i2c, 0x14) | - (ves1820_readreg(frontend->i2c, 0x15) << 8) | - (ves1820_readreg(frontend->i2c, 0x16) << 16); - /* XXX FIXME: scale!!*/ + { + u32 ber = ves1820_readreg(frontend->i2c, 0x14) | + (ves1820_readreg(frontend->i2c, 0x15) << 8) | + ((ves1820_readreg(frontend->i2c, 0x16) & 0x0f) << 16); + *((u32*) arg) = 10 * ber; break; - + } case FE_READ_SIGNAL_STRENGTH: { u8 gain = ves1820_readreg(frontend->i2c, 0x17); |