Lines Matching refs:p_ca_message

255 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
301 static int ca_get_message(struct dst_state *state, struct ca_msg *p_ca_message, void __user *arg) in ca_get_message() argument
306 if (copy_from_user(p_ca_message, arg, sizeof (struct ca_msg))) in ca_get_message()
310 3, p_ca_message->msg); in ca_get_message()
313 command = command | p_ca_message->msg[i]; in ca_get_message()
321 memcpy(p_ca_message->msg, state->messages, 128); in ca_get_message()
322 if (copy_to_user(arg, p_ca_message, sizeof (struct ca_msg)) ) in ca_get_message()
326 memcpy(p_ca_message->msg, state->messages, 128); in ca_get_message()
327 if (copy_to_user(arg, p_ca_message, sizeof (struct ca_msg)) ) in ca_get_message()
335 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
338 hw_buffer->msg[2] = p_ca_message->msg[1]; /* MSB */ in handle_dst_tag()
339 hw_buffer->msg[3] = p_ca_message->msg[2]; /* LSB */ in handle_dst_tag()
357 memcpy(&hw_buffer->msg[7], &p_ca_message->msg[4], length); in handle_dst_tag()
410 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
415 length = asn_1_decode(&p_ca_message->msg[3]); in ca_set_pmt()
417 debug_string(&p_ca_message->msg[4], length, 0); /* length is excluding tag & length */ in ca_set_pmt()
420 handle_dst_tag(state, p_ca_message, hw_buffer, length); in ca_set_pmt()
431 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
440 if ((ca_set_pmt(state, p_ca_message, hw_buffer, 1, GET_REPLY)) < 0) { in dst_check_ca_pmt()
451 if ((ca_set_pmt(state, p_ca_message, hw_buffer, 0, NO_REPLY)) < 0) { in dst_check_ca_pmt()
462 static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message, void __user *arg) in ca_send_message() argument
474 if (copy_from_user(p_ca_message, arg, sizeof (struct ca_msg))) { in ca_send_message()
483 command = command | p_ca_message->msg[i]; in ca_send_message()
492 if ((ca_set_pmt(state, p_ca_message, hw_buffer, 0, 0)) < 0) { // code simplification started in ca_send_message()
502 if ((dst_check_ca_pmt(state, p_ca_message, hw_buffer)) < 0) { in ca_send_message()
543 struct ca_msg *p_ca_message; in dst_ca_ioctl() local
550 p_ca_message = kmalloc(sizeof (struct ca_msg), GFP_KERNEL); in dst_ca_ioctl()
553 if (!p_ca_message || !p_ca_slot_info || !p_ca_caps) { in dst_ca_ioctl()
562 result = ca_send_message(state, p_ca_message, arg); in dst_ca_ioctl()
571 result = ca_get_message(state, p_ca_message, arg); in dst_ca_ioctl()
604 result = ca_get_slot_descr(state, p_ca_message, arg); in dst_ca_ioctl()
615 kfree (p_ca_message); in dst_ca_ioctl()