Lines Matching refs:p_ca_message
243 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
289 static int ca_get_message(struct dst_state *state, struct ca_msg *p_ca_message, void __user *arg) in ca_get_message() argument
294 if (copy_from_user(p_ca_message, arg, sizeof (struct ca_msg))) in ca_get_message()
298 3, p_ca_message->msg); in ca_get_message()
301 command = command | p_ca_message->msg[i]; in ca_get_message()
309 memcpy(p_ca_message->msg, state->messages, 128); in ca_get_message()
310 if (copy_to_user(arg, p_ca_message, sizeof (struct ca_msg)) ) in ca_get_message()
314 memcpy(p_ca_message->msg, state->messages, 128); in ca_get_message()
315 if (copy_to_user(arg, p_ca_message, sizeof (struct ca_msg)) ) in ca_get_message()
323 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
326 hw_buffer->msg[2] = p_ca_message->msg[1]; /* MSB */ in handle_dst_tag()
327 hw_buffer->msg[3] = p_ca_message->msg[2]; /* LSB */ in handle_dst_tag()
345 memcpy(&hw_buffer->msg[7], &p_ca_message->msg[4], length); in handle_dst_tag()
398 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
403 length = asn_1_decode(&p_ca_message->msg[3]); in ca_set_pmt()
405 debug_string(&p_ca_message->msg[4], length, 0); /* length is excluding tag & length */ in ca_set_pmt()
408 handle_dst_tag(state, p_ca_message, hw_buffer, length); in ca_set_pmt()
419 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
428 if ((ca_set_pmt(state, p_ca_message, hw_buffer, 1, GET_REPLY)) < 0) { in dst_check_ca_pmt()
439 if ((ca_set_pmt(state, p_ca_message, hw_buffer, 0, NO_REPLY)) < 0) { in dst_check_ca_pmt()
450 static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message, void __user *arg) in ca_send_message() argument
462 if (copy_from_user(p_ca_message, arg, sizeof (struct ca_msg))) { in ca_send_message()
471 command = command | p_ca_message->msg[i]; in ca_send_message()
480 if ((ca_set_pmt(state, p_ca_message, hw_buffer, 0, 0)) < 0) { // code simplification started in ca_send_message()
490 if ((dst_check_ca_pmt(state, p_ca_message, hw_buffer)) < 0) { in ca_send_message()
531 struct ca_msg *p_ca_message; in dst_ca_ioctl() local
538 p_ca_message = kmalloc(sizeof (struct ca_msg), GFP_KERNEL); in dst_ca_ioctl()
541 if (!p_ca_message || !p_ca_slot_info || !p_ca_caps) { in dst_ca_ioctl()
550 result = ca_send_message(state, p_ca_message, arg); in dst_ca_ioctl()
559 result = ca_get_message(state, p_ca_message, arg); in dst_ca_ioctl()
592 result = ca_get_slot_descr(state, p_ca_message, arg); in dst_ca_ioctl()
603 kfree (p_ca_message); in dst_ca_ioctl()