aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-01-07 02:38:38 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-07 08:47:32 -0500
commitb247377ace5d965809d0ba8de158dc2e8d28af77 (patch)
tree94b73fe3b045c8ec0ecad02d25a9c5285caf10a8 /drivers
parentc0fdbd3367b4fd67d754a06292aa121956f98b6f (diff)
[media] dvb: remove bogus modulation check
This code is wrong as I should have coded it as SYS_DVBC, instead of SYS_DVBS & friends. Anyway, this check has other problems 1) it does some "magic" by assuming that all QAM modulations are below QAM_AUTO; 2) it checks modulation parameters only for one delivery system. Or the core should check invalid parameters for all delivery systems, or it should let the frontend drivers do it; 3) frontend drivers should already be checking for invalid parameters (most of them do it, anyway); 4) not all modulations are mapped at fe->ops.info.caps, so it is not even possible to check for the valid modulations inside the core for some delivery systems; 5) The core check is incomplete anyway: it only checks for a few parameters. If moved into the core other parameters like bandwidth and fec should also be checked; 6) 2nd gen DVB-C uses OFDM. So, that test would fail for it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 0e079a1a4f49..a904793e61e2 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -897,29 +897,6 @@ static int dvb_frontend_check_parameters(struct dvb_frontend *fe)
897 break; 897 break;
898 } 898 }
899 899
900 /*
901 * check for supported modulation
902 *
903 * This is currently hacky. Also, it only works for DVB-S & friends,
904 * and not all modulations has FE_CAN flags
905 */
906 switch (c->delivery_system) {
907 case SYS_DVBS:
908 case SYS_DVBS2:
909 case SYS_TURBO:
910 if ((c->modulation > QAM_AUTO ||
911 !((1 << (c->modulation + 10)) & fe->ops.info.caps))) {
912 printk(KERN_WARNING
913 "DVB: adapter %i frontend %i modulation %u not supported\n",
914 fe->dvb->num, fe->id, c->modulation);
915 return -EINVAL;
916 }
917 break;
918 default:
919 /* FIXME: it makes sense to validate othere delsys here */
920 break;
921 }
922
923 return 0; 900 return 0;
924} 901}
925 902