Lines Matching refs:length

74 static void put_command_and_length(u8 *data, int command, int length)  in put_command_and_length()  argument
79 data[3] = length; in put_command_and_length()
82 static void put_checksum(u8 *check_string, int length) in put_checksum() argument
85 dprintk(verbose, DST_CA_DEBUG, 1, " -> string length : 0x%02x", length); in put_checksum()
86 check_string[length] = dst_check_sum (check_string, length); in put_checksum()
87 dprintk(verbose, DST_CA_DEBUG, 1, " -> checksum : 0x%02x", check_string[length]); in put_checksum()
156 int length, str_length; in ca_get_app_info() local
172 length = state->messages[5]; in ca_get_app_info()
173 str_length = length - 6; in ca_get_app_info()
180 put_command_and_length(&state->messages[0], CA_APP_INFO, length); in ca_get_app_info()
351 …dst_tag(struct dst_state *state, struct ca_msg *p_ca_message, struct ca_msg *hw_buffer, u32 length) in handle_dst_tag() argument
357 if (length > 247) { in handle_dst_tag()
361 hw_buffer->msg[0] = (length & 0xff) + 7; in handle_dst_tag()
366 hw_buffer->msg[5] = length & 0xff; in handle_dst_tag()
373 memcpy(&hw_buffer->msg[7], &p_ca_message->msg[4], length); in handle_dst_tag()
379 static int write_to_8820(struct dst_state *state, struct ca_msg *hw_buffer, u8 length, u8 reply) in write_to_8820() argument
381 if ((dst_put_ci(state, hw_buffer->msg, length, hw_buffer->msg, reply)) < 0) { in write_to_8820()
395 u32 length = 0; in asn_1_decode() local
400 length = length_field & 0x7f; in asn_1_decode()
401 dprintk(verbose, DST_CA_DEBUG, 1, " Length=[%02x]\n", length); in asn_1_decode()
405 length = length << 8; in asn_1_decode()
406 length += asn_1_array[count + 1]; in asn_1_decode()
407 dprintk(verbose, DST_CA_DEBUG, 1, " Length=[%04x]", length); in asn_1_decode()
410 return length; in asn_1_decode()
413 static int debug_string(u8 *msg, u32 length, u32 offset) in debug_string() argument
418 for (i = offset; i < length; i++) in debug_string()
428 u32 length = 0; in ca_set_pmt() local
431 length = asn_1_decode(&p_ca_message->msg[3]); in ca_set_pmt()
432 dprintk(verbose, DST_CA_DEBUG, 1, " CA Message length=[%d]", length); in ca_set_pmt()
433 debug_string(&p_ca_message->msg[4], length, 0); /* length is excluding tag & length */ in ca_set_pmt()
435 memset(hw_buffer->msg, '\0', length); in ca_set_pmt()
436 handle_dst_tag(state, p_ca_message, hw_buffer, length); in ca_set_pmt()
439 debug_string(hw_buffer->msg, (length + tag_length), 0); /* tags too */ in ca_set_pmt()
440 write_to_8820(state, hw_buffer, (length + tag_length), reply); in ca_set_pmt()
675 static ssize_t dst_ca_read(struct file *file, char __user *buffer, size_t length, loff_t *offset) in dst_ca_read() argument
682 static ssize_t dst_ca_write(struct file *file, const char __user *buffer, size_t length, loff_t *of… in dst_ca_write() argument