diff options
-rw-r--r-- | drivers/media/dvb/siano/smscoreapi.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/siano/smsdvb.c | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/drivers/media/dvb/siano/smscoreapi.h b/drivers/media/dvb/siano/smscoreapi.h index 27b0c4139dc0..6b3fb86c814b 100644 --- a/drivers/media/dvb/siano/smscoreapi.h +++ b/drivers/media/dvb/siano/smscoreapi.h | |||
@@ -381,7 +381,7 @@ struct smsdvb_client_t { | |||
381 | struct dvb_frontend frontend; | 381 | struct dvb_frontend frontend; |
382 | 382 | ||
383 | fe_status_t fe_status; | 383 | fe_status_t fe_status; |
384 | int fe_ber, fe_snr, fe_signal_strength; | 384 | int fe_ber, fe_snr, fe_unc, fe_signal_strength; |
385 | 385 | ||
386 | struct completion tune_done, stat_done; | 386 | struct completion tune_done, stat_done; |
387 | 387 | ||
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c index 54144a374946..adf00b989c12 100644 --- a/drivers/media/dvb/siano/smsdvb.c +++ b/drivers/media/dvb/siano/smsdvb.c | |||
@@ -60,6 +60,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) | |||
60 | 60 | ||
61 | client->fe_snr = p->Stat.SNR; | 61 | client->fe_snr = p->Stat.SNR; |
62 | client->fe_ber = p->Stat.BER; | 62 | client->fe_ber = p->Stat.BER; |
63 | client->fe_unc = p->Stat.BERErrorCount; | ||
63 | 64 | ||
64 | if (p->Stat.InBandPwr < -95) | 65 | if (p->Stat.InBandPwr < -95) |
65 | client->fe_signal_strength = 0; | 66 | client->fe_signal_strength = 0; |
@@ -72,6 +73,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) | |||
72 | client->fe_status = 0; | 73 | client->fe_status = 0; |
73 | client->fe_snr = | 74 | client->fe_snr = |
74 | client->fe_ber = | 75 | client->fe_ber = |
76 | client->fe_unc = | ||
75 | client->fe_signal_strength = 0; | 77 | client->fe_signal_strength = 0; |
76 | } | 78 | } |
77 | 79 | ||
@@ -217,6 +219,18 @@ static int smsdvb_read_snr(struct dvb_frontend *fe, u16 *snr) | |||
217 | return rc; | 219 | return rc; |
218 | } | 220 | } |
219 | 221 | ||
222 | static int smsdvb_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) | ||
223 | { | ||
224 | struct smsdvb_client_t *client = | ||
225 | container_of(fe, struct smsdvb_client_t, frontend); | ||
226 | int rc = smsdvb_send_statistics_request(client); | ||
227 | |||
228 | if (!rc) | ||
229 | *ucblocks = client->fe_unc; | ||
230 | |||
231 | return rc; | ||
232 | } | ||
233 | |||
220 | static int smsdvb_get_tune_settings(struct dvb_frontend *fe, | 234 | static int smsdvb_get_tune_settings(struct dvb_frontend *fe, |
221 | struct dvb_frontend_tune_settings *tune) | 235 | struct dvb_frontend_tune_settings *tune) |
222 | { | 236 | { |
@@ -329,6 +343,7 @@ static struct dvb_frontend_ops smsdvb_fe_ops = { | |||
329 | .read_ber = smsdvb_read_ber, | 343 | .read_ber = smsdvb_read_ber, |
330 | .read_signal_strength = smsdvb_read_signal_strength, | 344 | .read_signal_strength = smsdvb_read_signal_strength, |
331 | .read_snr = smsdvb_read_snr, | 345 | .read_snr = smsdvb_read_snr, |
346 | .read_ucblocks = smsdvb_read_ucblocks, | ||
332 | 347 | ||
333 | .init = smsdvb_init, | 348 | .init = smsdvb_init, |
334 | .sleep = smsdvb_sleep, | 349 | .sleep = smsdvb_sleep, |