Lines Matching refs:p_ca_message
269 static int ca_get_slot_descr(struct dst_state *state, struct ca_msg *p_ca_message, void __user *arg) in ca_get_slot_descr() argument
315 static int ca_get_message(struct dst_state *state, struct ca_msg *p_ca_message, void __user *arg) in ca_get_message() argument
320 if (copy_from_user(p_ca_message, arg, sizeof (struct ca_msg))) in ca_get_message()
324 3, p_ca_message->msg); in ca_get_message()
327 command = command | p_ca_message->msg[i]; in ca_get_message()
335 memcpy(p_ca_message->msg, state->messages, 128); in ca_get_message()
336 if (copy_to_user(arg, p_ca_message, sizeof (struct ca_msg)) ) in ca_get_message()
340 memcpy(p_ca_message->msg, state->messages, 128); in ca_get_message()
341 if (copy_to_user(arg, p_ca_message, sizeof (struct ca_msg)) ) in ca_get_message()
349 static int handle_dst_tag(struct dst_state *state, struct ca_msg *p_ca_message, struct ca_msg *hw_b… in handle_dst_tag() argument
352 hw_buffer->msg[2] = p_ca_message->msg[1]; /* MSB */ in handle_dst_tag()
353 hw_buffer->msg[3] = p_ca_message->msg[2]; /* LSB */ in handle_dst_tag()
371 memcpy(&hw_buffer->msg[7], &p_ca_message->msg[4], length); in handle_dst_tag()
424 static int ca_set_pmt(struct dst_state *state, struct ca_msg *p_ca_message, struct ca_msg *hw_buffe… in ca_set_pmt() argument
429 length = asn_1_decode(&p_ca_message->msg[3]); in ca_set_pmt()
431 debug_string(&p_ca_message->msg[4], length, 0); /* length is excluding tag & length */ in ca_set_pmt()
434 handle_dst_tag(state, p_ca_message, hw_buffer, length); in ca_set_pmt()
445 static int dst_check_ca_pmt(struct dst_state *state, struct ca_msg *p_ca_message, struct ca_msg *hw… in dst_check_ca_pmt() argument
454 if ((ca_set_pmt(state, p_ca_message, hw_buffer, 1, GET_REPLY)) < 0) { in dst_check_ca_pmt()
465 if ((ca_set_pmt(state, p_ca_message, hw_buffer, 0, NO_REPLY)) < 0) { in dst_check_ca_pmt()
476 static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message, void __user *arg) in ca_send_message() argument
490 if (copy_from_user(p_ca_message, arg, sizeof (struct ca_msg))) { in ca_send_message()
499 command = command | p_ca_message->msg[i]; in ca_send_message()
508 if ((ca_set_pmt(state, p_ca_message, hw_buffer, 0, 0)) < 0) { // code simplification started in ca_send_message()
518 if ((dst_check_ca_pmt(state, p_ca_message, hw_buffer)) < 0) { in ca_send_message()
559 struct ca_msg *p_ca_message; in dst_ca_ioctl() local
566 p_ca_message = kmalloc(sizeof (struct ca_msg), GFP_KERNEL); in dst_ca_ioctl()
569 if (!p_ca_message || !p_ca_slot_info || !p_ca_caps) { in dst_ca_ioctl()
579 if ((ca_send_message(state, p_ca_message, arg)) < 0) { in dst_ca_ioctl()
587 if ((ca_get_message(state, p_ca_message, arg)) < 0) { in dst_ca_ioctl()
619 if ((ca_get_slot_descr(state, p_ca_message, arg)) < 0) { in dst_ca_ioctl()
647 kfree (p_ca_message); in dst_ca_ioctl()