Home | History | Annotate | Download | only in hci

Lines Matching defs:p_pipe

54 static void nfa_hci_handle_identity_mgmt_gate_pkt (UINT8 *p_data, tNFA_HCI_DYN_PIPE *p_pipe);
55 static void nfa_hci_handle_loopback_gate_pkt (UINT8 *p_data, UINT16 data_len, tNFA_HCI_DYN_PIPE *p_pipe);
56 static void nfa_hci_handle_connectivity_gate_pkt (UINT8 *p_data, UINT16 data_len, tNFA_HCI_DYN_PIPE *p_pipe);
57 static void nfa_hci_handle_generic_gate_cmd (UINT8 *p_data, UINT8 data_len, tNFA_HCI_DYN_GATE *p_gate, tNFA_HCI_DYN_PIPE *p_pipe);
58 static void nfa_hci_handle_generic_gate_rsp (UINT8 *p_data, UINT8 data_len, tNFA_HCI_DYN_GATE *p_gate, tNFA_HCI_DYN_PIPE *p_pipe);
59 static void nfa_hci_handle_generic_gate_evt (UINT8 *p_data, UINT16 data_len, tNFA_HCI_DYN_GATE *p_gate, tNFA_HCI_DYN_PIPE *p_pipe);
323 tNFA_HCI_DYN_PIPE *p_pipe;
375 else if ((p_pipe = nfa_hciu_find_active_pipe_by_owner (nfa_hci_cb.app_in_use)) == NULL)
400 nfa_hciu_send_delete_pipe_cmd (p_pipe->pipe_id);
499 tNFA_HCI_DYN_PIPE *p_pipe;
541 else if ((p_pipe = nfa_hciu_find_active_pipe_on_gate (p_gate->gate_id)) == NULL)
557 nfa_hciu_send_delete_pipe_cmd (p_pipe->pipe_id);
642 tNFA_HCI_DYN_PIPE *p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->open_pipe.pipe);
645 if (p_pipe != NULL)
646 p_gate = nfa_hciu_find_gate_by_gid (p_pipe->local_gate);
648 if ( (p_pipe != NULL)
650 &&(nfa_hciu_is_active_host (p_pipe->dest_host))
653 if (p_pipe->pipe_state == NFA_HCI_PIPE_CLOSED)
686 tNFA_HCI_DYN_PIPE *p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->get_registry.pipe);
691 if (p_pipe != NULL)
693 p_gate = nfa_hciu_find_gate_by_gid (p_pipe->local_gate);
695 if ((p_gate != NULL) && (nfa_hciu_is_active_host (p_pipe->dest_host)) && (p_gate->gate_owner == p_evt_data->get_registry.hci_handle))
699 if (nfa_hciu_is_host_reseting (p_pipe->dest_host))
705 if (p_pipe->pipe_state == NFA_HCI_PIPE_CLOSED)
736 tNFA_HCI_DYN_PIPE *p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->set_registry.pipe);
741 if (p_pipe != NULL)
743 p_gate = nfa_hciu_find_gate_by_gid (p_pipe->local_gate);
745 if ((p_gate != NULL) && (nfa_hciu_is_active_host (p_pipe->dest_host)) && (p_gate->gate_owner == p_evt_data->set_registry.hci_handle))
749 if (nfa_hciu_is_host_reseting (p_pipe->dest_host))
755 if (p_pipe->pipe_state == NFA_HCI_PIPE_CLOSED)
786 tNFA_HCI_DYN_PIPE *p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->close_pipe.pipe);
789 if (p_pipe != NULL)
790 p_gate = nfa_hciu_find_gate_by_gid (p_pipe->local_gate);
792 if ( (p_pipe != NULL)
794 &&(nfa_hciu_is_active_host (p_pipe->dest_host))
797 if (p_pipe->pipe_state == NFA_HCI_PIPE_OPENED)
830 tNFA_HCI_DYN_PIPE *p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->delete_pipe.pipe);
833 if (p_pipe != NULL)
835 p_gate = nfa_hciu_find_gate_by_gid (p_pipe->local_gate);
838 &&(nfa_hciu_is_active_host (p_pipe->dest_host)) )
863 tNFA_HCI_DYN_PIPE *p_pipe;
867 if ((p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->send_cmd.pipe)) != NULL)
871 if ( (nfa_hciu_is_active_host (p_pipe->dest_host))
872 &&((app_handle == p_evt_data->send_cmd.hci_handle || p_pipe->local_gate == NFA_HCI_CONNECTIVITY_GATE)) )
874 if (nfa_hciu_is_host_reseting (p_pipe->dest_host))
880 if (p_pipe->pipe_state == NFA_HCI_PIPE_OPENED)
883 if ((status = nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_COMMAND_TYPE, p_evt_data->send_cmd.cmd_code,
889 NFA_TRACE_WARNING1 ("nfa_hci_api_send_cmd pipe:%d not open", p_pipe->pipe_id);
895 p_pipe->pipe_id);
922 tNFA_HCI_DYN_PIPE *p_pipe;
926 if ((p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->send_rsp.pipe)) != NULL)
930 if ( (nfa_hciu_is_active_host (p_pipe->dest_host))
931 &&((app_handle == p_evt_data->send_rsp.hci_handle || p_pipe->local_gate == NFA_HCI_CONNECTIVITY_GATE)) )
933 if (p_pipe->pipe_state == NFA_HCI_PIPE_OPENED)
935 if ((status = nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_RESPONSE_TYPE, p_evt_data->send_rsp.response,
941 NFA_TRACE_WARNING1 ("nfa_hci_api_send_rsp pipe:%d not open", p_pipe->pipe_id);
947 p_pipe->pipe_id);
974 tNFA_HCI_DYN_PIPE *p_pipe;
978 if ((p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->send_evt.pipe)) != NULL)
982 if ( (nfa_hciu_is_active_host (p_pipe->dest_host))
983 &&((app_handle == p_evt_data->send_evt.hci_handle || p_pipe->local_gate == NFA_HCI_CONNECTIVITY_GATE)) )
985 if (nfa_hciu_is_host_reseting (p_pipe->dest_host))
991 if (p_pipe->pipe_state == NFA_HCI_PIPE_OPENED)
993 status = nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_EVENT_TYPE, p_evt_data->send_evt.evt_code,
998 if (p_pipe->local_gate == NFA_HCI_LOOP_BACK_GATE)
1015 else if (p_pipe->local_gate == NFA_HCI_LOOP_BACK_GATE)
1022 if (p_pipe->local_gate == NFA_HCI_LOOP_BACK_GATE)
1034 NFA_TRACE_WARNING1 ("nfa_hci_api_send_event pipe:%d not open", p_pipe->pipe_id);
1040 p_pipe->pipe_id);
1179 void nfa_hci_handle_pipe_open_close_cmd (tNFA_HCI_DYN_PIPE *p_pipe)
1188 if ((p_gate = nfa_hciu_find_gate_by_gid(p_pipe->local_gate)) != NULL)
1193 p_pipe->pipe_state = NFA_HCI_PIPE_OPENED;
1198 p_pipe->pipe_state = NFA_HCI_PIPE_CLOSED;
1201 nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_RESPONSE_TYPE, response, rsp_len, data);
1692 tNFA_HCI_DYN_PIPE *p_pipe = nfa_hciu_find_pipe_by_pid (pipe_id);
1695 if (p_pipe == NULL)
1704 if (p_pipe->local_gate == NFA_HCI_IDENTITY_MANAGEMENT_GATE)
1706 nfa_hci_handle_identity_mgmt_gate_pkt (p_data, p_pipe);
1708 else if (p_pipe->local_gate == NFA_HCI_LOOP_BACK_GATE)
1710 nfa_hci_handle_loopback_gate_pkt (p_data, data_len, p_pipe);
1712 else if (p_pipe->local_gate == NFA_HCI_CONNECTIVITY_GATE)
1714 nfa_hci_handle_connectivity_gate_pkt (p_data, data_len, p_pipe);
1718 p_gate = nfa_hciu_find_gate_by_gid (p_pipe->local_gate);
1721 NFA_TRACE_ERROR1 ("nfa_hci_handle_dyn_pipe_pkt - Pipe's gate %d is corrupt",p_pipe
1731 nfa_hci_handle_generic_gate_cmd (p_data, (UINT8) data_len, p_gate, p_pipe);
1735 nfa_hci_handle_generic_gate_rsp (p_data, (UINT8) data_len, p_gate, p_pipe);
1739 nfa_hci_handle_generic_gate_evt (p_data, data_len, p_gate, p_pipe);
1755 static void nfa_hci_handle_identity_mgmt_gate_pkt (UINT8 *p_data, tNFA_HCI_DYN_PIPE *p_pipe)
1774 if (p_pipe->pipe_state == NFA_HCI_PIPE_OPENED)
1830 p_pipe->pipe_state = NFA_HCI_PIPE_OPENED;
1834 p_pipe->pipe_state = NFA_HCI_PIPE_CLOSED;
1842 nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_RESPONSE_TYPE, response, rsp_len, p_rsp);
1855 static void nfa_hci_handle_generic_gate_cmd (UINT8 *p_data, UINT8 data_len, tNFA_HCI_DYN_GATE *p_gate, tNFA_HCI_DYN_PIPE *p_pipe)
1858 tNFA_HANDLE app_handle = nfa_hciu_get_pipe_owner (p_pipe->pipe_id);
1863 evt_data.registry.pipe = p_pipe->pipe_id;
1875 evt_data.registry.pipe = p_pipe->pipe_id;
1883 nfa_hci_handle_pipe_open_close_cmd (p_pipe);
1885 evt_data.opened.pipe = p_pipe->pipe_id;
1892 nfa_hci_handle_pipe_open_close_cmd (p_pipe);
1894 evt_data.closed.pipe = p_pipe->pipe_id;
1903 evt_data.cmd_rcvd.pipe = p_pipe->pipe_id;;
1925 static void nfa_hci_handle_generic_gate_rsp (UINT8 *p_data, UINT8 data_len, tNFA_HCI_DYN_GATE *p_gate, tNFA_HCI_DYN_PIPE *p_pipe)
1936 p_pipe->pipe_state = NFA_HCI_PIPE_OPENED;
1941 evt_data.opened.pipe = p_pipe->pipe_id;
1947 p_pipe->pipe_state = NFA_HCI_PIPE_CLOSED;
1952 evt_data.opened.pipe = p_pipe->pipe_id;
1960 evt_data.registry.pipe = p_pipe->pipe_id;
1972 evt_data.registry.pipe = p_pipe->pipe_id;
1980 evt_data.rsp_rcvd.pipe = p_pipe->pipe_id;;
2001 static void nfa_hci_handle_connectivity_gate_pkt (UINT8 *p_data, UINT16 data_len, tNFA_HCI_DYN_PIPE *p_pipe)
2011 nfa_hci_handle_pipe_open_close_cmd (p_pipe);
2017 nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_RESPONSE_TYPE, NFA_HCI_ANY_E_CMD_NOT_SUPPORTED, 0, NULL);
2021 nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_RESPONSE_TYPE, NFA_HCI_ANY_E_CMD_NOT_SUPPORTED, 0, NULL);
2028 p_pipe->pipe_state = NFA_HCI_PIPE_OPENED;
2030 p_pipe->pipe_state = NFA_HCI_PIPE_CLOSED;
2034 evt_data.rsp_rcvd.pipe = p_pipe->pipe_id;;
2045 evt_data.rcvd_evt.pipe = p_pipe->pipe_id;
2064 static void nfa_hci_handle_loopback_gate_pkt (UINT8 *p_data, UINT16 data_len, tNFA_HCI_DYN_PIPE *p_pipe)
2078 p_pipe->pipe_state = NFA_HCI_PIPE_OPENED;
2082 p_pipe->pipe_state = NFA_HCI_PIPE_CLOSED;
2087 nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_RESPONSE_TYPE, response, rsp_len, data);
2092 p_pipe->pipe_state = NFA_HCI_PIPE_OPENED;
2094 p_pipe->pipe_state = NFA_HCI_PIPE_CLOSED;
2098 evt_data.rsp_rcvd.pipe = p_pipe->pipe_id;;
2111 evt_data.rcvd_evt.pipe = p_pipe->pipe_id;
2121 nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_EVENT_TYPE, NFA_HCI_EVT_POST_DATA, data_len, p_data);
2135 static void nfa_hci_handle_generic_gate_evt (UINT8 *p_data, UINT16 data_len, tNFA_HCI_DYN_GATE *p_gate, tNFA_HCI_DYN_PIPE *p_pipe)
2139 evt_data.rcvd_evt.pipe = p_pipe->pipe_id;