Lines Matching defs:hw_buffer

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 */
333 hw_buffer->msg[0] = (length & 0xff) + 7;
334 hw_buffer->msg[1] = 0x40;
335 hw_buffer->msg[2] = 0x03;
336 hw_buffer->msg[3] = 0x00;
337 hw_buffer->msg[4] = 0x03;
338 hw_buffer->msg[5] = length & 0xff;
339 hw_buffer->msg[6] = 0x00;
345 memcpy(&hw_buffer->msg[7], &p_ca_message->msg[4], length);
351 static int write_to_8820(struct dst_state *state, struct ca_msg *hw_buffer, u8 length, u8 reply)
353 if ((dst_put_ci(state, hw_buffer->msg, length, hw_buffer->msg, reply)) < 0) {
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)
407 memset(hw_buffer->msg, '\0', length);
408 handle_dst_tag(state, p_ca_message, hw_buffer, length);
409 put_checksum(hw_buffer->msg, hw_buffer->msg[0]);
411 debug_string(hw_buffer->msg, (length + tag_length), 0); /* tags too */
412 write_to_8820(state, hw_buffer, (length + tag_length), reply);
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) {
454 struct ca_msg *hw_buffer;
457 hw_buffer = kmalloc(sizeof(*hw_buffer), GFP_KERNEL);
458 if (!hw_buffer)
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) {
520 kfree (hw_buffer);