diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-11-22 12:56:37 -0500 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2008-11-22 12:56:37 -0500 |
commit | 050475e9486c0de3e3720f2e4a7dfdbe6796d980 (patch) | |
tree | bd0149e2967e287248cc532e9c1ffe58c5b8872b /linux | |
parent | ecb3fc0c32c92f54d8e0560752cbecd4190d84f0 (diff) | |
download | mediapointer-dvb-s2-050475e9486c0de3e3720f2e4a7dfdbe6796d980.tar.gz mediapointer-dvb-s2-050475e9486c0de3e3720f2e4a7dfdbe6796d980.tar.bz2 |
sms1xxx: fix invalid unc readings
From: Michael Krufky <mkrufky@linuxtv.org>
Add function smsdvb_read_ucblocks to report uncorrectable error counts.
Priority: normal
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/dvb/siano/smscoreapi.h | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/siano/smsdvb.c | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/siano/smscoreapi.h b/linux/drivers/media/dvb/siano/smscoreapi.h index 3a98e031b..f8999e8fb 100644 --- a/linux/drivers/media/dvb/siano/smscoreapi.h +++ b/linux/drivers/media/dvb/siano/smscoreapi.h @@ -535,7 +535,7 @@ struct smsdvb_client_t { struct dvb_frontend frontend; fe_status_t fe_status; - int fe_ber, fe_snr, fe_signal_strength; + int fe_ber, fe_snr, fe_unc, fe_signal_strength; struct completion tune_done, stat_done; diff --git a/linux/drivers/media/dvb/siano/smsdvb.c b/linux/drivers/media/dvb/siano/smsdvb.c index 890a586b2..0c48d2c3d 100644 --- a/linux/drivers/media/dvb/siano/smsdvb.c +++ b/linux/drivers/media/dvb/siano/smsdvb.c @@ -60,6 +60,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) client->fe_snr = p->Stat.SNR; client->fe_ber = p->Stat.BER; + client->fe_unc = p->Stat.BERErrorCount; if (p->Stat.InBandPwr < -95) client->fe_signal_strength = 0; @@ -72,6 +73,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) client->fe_status = 0; client->fe_snr = client->fe_ber = + client->fe_unc = client->fe_signal_strength = 0; } @@ -217,6 +219,18 @@ static int smsdvb_read_snr(struct dvb_frontend *fe, u16 *snr) return rc; } +static int smsdvb_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) +{ + struct smsdvb_client_t *client = + container_of(fe, struct smsdvb_client_t, frontend); + int rc = smsdvb_send_statistics_request(client); + + if (!rc) + *ucblocks = client->fe_unc; + + return rc; +} + static int smsdvb_get_tune_settings(struct dvb_frontend *fe, struct dvb_frontend_tune_settings *tune) { @@ -332,6 +346,7 @@ static struct dvb_frontend_ops smsdvb_fe_ops = { .read_ber = smsdvb_read_ber, .read_signal_strength = smsdvb_read_signal_strength, .read_snr = smsdvb_read_snr, + .read_ucblocks = smsdvb_read_ucblocks, .init = smsdvb_init, .sleep = smsdvb_sleep, |