Lines Matching defs:p_ca_message

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