[linux-dvb] Sending diseqc commands on DST frontend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Sorry about the confusion, but a minor correction to the patch ..
since message length is 6 we sould be checking for a message length > 6 
to be an Invalid value.
Sorry for the confusion ..


Manu


>@@ -1260,9 +1263,20 @@ static int dst_set_diseqc(struct dvb_fro
> 
> 	if (state->dst_type != DST_TYPE_IS_SAT)
> 		return 0;
>-	if (cmd->msg_len == 0 || cmd->msg_len > 4)
>+//	if (cmd->msg_len == 0 || cmd->msg_len > 4)
>+//		return -EINVAL;
>+	if (cmd->msg_len == 0 || cmd->msg_len > 5)
>  
>
This should be

if (cmd->msg_len == 0 || cmd->msg_len > 6)

instead of 5.

> 		return -EINVAL;
>-	memcpy(&paket[3], cmd->msg, cmd->msg_len);
>+	if ((cmd->msg_len == 3) && (state->dst_hw_cap & DST_TYPE_HAS_DISEQC3)) {
>+		memcpy(&paket[3], cmd->msg, cmd->msg_len);
>+		paket[2] = 0x03;
>+	} else if ((cmd->msg_len == 4) && (state->dst_hw_cap & DST_TYPE_HAS_DISEQC4)) {
>+		memcpy(&paket[3], cmd->msg, cmd->msg_len);
>+		paket[2] = 0x04;
>+	} else if ((cmd->msg_len == 5) && (state->dst_hw_cap & DST_TYPE_HAS_DISEQC5)) {
>+		memcpy(&paket[2], cmd->msg, cmd->msg_len);
>+	}
>+
> 	paket[7] = dst_check_sum(&paket[0], 7);
> 	dst_command(state, paket, 8);
> 	return 0;
>  
>
>------------------------------------------------------------------------
>



[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux