aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYeasah Pell <yeasah@schwide.net>2006-06-21 17:28:13 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 01:05:20 -0400
commitceee526617a805eea908a59fced26635634c9035 (patch)
tree3ca73e96a4862eda971fc532cc04390223e56126
parent9ce8b68fc036275986f005b38660d5d1795af8e8 (diff)
V4L/DVB (4185): Conditionally enable 5 byte diseqc commands
Signed-off-by: Yeasah Pell <yeasah@schwide.net> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/dvb/bt8xx/dst.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c
index c538d272cf80..d687a14ec0a7 100644
--- a/drivers/media/dvb/bt8xx/dst.c
+++ b/drivers/media/dvb/bt8xx/dst.c
@@ -1466,9 +1466,12 @@ static int dst_set_diseqc(struct dvb_frontend *fe, struct dvb_diseqc_master_cmd
1466 1466
1467 if (state->dst_type != DST_TYPE_IS_SAT) 1467 if (state->dst_type != DST_TYPE_IS_SAT)
1468 return 0; 1468 return 0;
1469 if (cmd->msg_len == 0 || cmd->msg_len > 4) 1469 if (cmd->msg_len > 0 && cmd->msg_len < 5)
1470 memcpy(&paket[3], cmd->msg, cmd->msg_len);
1471 else if (cmd->msg_len == 5 && state->dst_hw_cap & DST_TYPE_HAS_DISEQC5)
1472 memcpy(&paket[2], cmd->msg, cmd->msg_len);
1473 else
1470 return -EINVAL; 1474 return -EINVAL;
1471 memcpy(&paket[3], cmd->msg, cmd->msg_len);
1472 paket[7] = dst_check_sum(&paket[0], 7); 1475 paket[7] = dst_check_sum(&paket[0], 7);
1473 dst_command(state, paket, 8); 1476 dst_command(state, paket, 8);
1474 return 0; 1477 return 0;