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()
323 if (p_ca_message->msg) { in ca_get_message()
325 3, p_ca_message->msg); in ca_get_message()
328 command = command | p_ca_message->msg[i]; in ca_get_message()
336 memcpy(p_ca_message->msg, state->messages, 128); in ca_get_message()
337 if (copy_to_user(arg, p_ca_message, sizeof (struct ca_msg)) ) in ca_get_message()
341 memcpy(p_ca_message->msg, state->messages, 128); in ca_get_message()
342 if (copy_to_user(arg, p_ca_message, sizeof (struct ca_msg)) ) in ca_get_message()
351 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
354 hw_buffer->msg[2] = p_ca_message->msg[1]; /* MSB */ in handle_dst_tag()
355 hw_buffer->msg[3] = p_ca_message->msg[2]; /* LSB */ in handle_dst_tag()
373 memcpy(&hw_buffer->msg[7], &p_ca_message->msg[4], length); in handle_dst_tag()
426 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
431 length = asn_1_decode(&p_ca_message->msg[3]); in ca_set_pmt()
433 debug_string(&p_ca_message->msg[4], length, 0); /* length is excluding tag & length */ in ca_set_pmt()
436 handle_dst_tag(state, p_ca_message, hw_buffer, length); in ca_set_pmt()
447 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
456 if ((ca_set_pmt(state, p_ca_message, hw_buffer, 1, GET_REPLY)) < 0) { in dst_check_ca_pmt()
467 if ((ca_set_pmt(state, p_ca_message, hw_buffer, 0, NO_REPLY)) < 0) { in dst_check_ca_pmt()
478 static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message, void __user *arg) in ca_send_message() argument
492 if (copy_from_user(p_ca_message, arg, sizeof (struct ca_msg))) { in ca_send_message()
498 if (p_ca_message->msg) { in ca_send_message()
503 command = command | p_ca_message->msg[i]; in ca_send_message()
512 if ((ca_set_pmt(state, p_ca_message, hw_buffer, 0, 0)) < 0) { // code simplification started in ca_send_message()
522 if ((dst_check_ca_pmt(state, p_ca_message, hw_buffer)) < 0) { in ca_send_message()
563 struct ca_msg *p_ca_message; in dst_ca_ioctl() local
570 p_ca_message = kmalloc(sizeof (struct ca_msg), GFP_KERNEL); in dst_ca_ioctl()
573 if (!p_ca_message || !p_ca_slot_info || !p_ca_caps) { in dst_ca_ioctl()
583 if ((ca_send_message(state, p_ca_message, arg)) < 0) { in dst_ca_ioctl()
591 if ((ca_get_message(state, p_ca_message, arg)) < 0) { in dst_ca_ioctl()
623 if ((ca_get_slot_descr(state, p_ca_message, arg)) < 0) { in dst_ca_ioctl()
651 kfree (p_ca_message); in dst_ca_ioctl()