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);
526 tNFA_HCI_DYN_PIPE *p_pipe;
568 else if ((p_pipe = nfa_hciu_find_active_pipe_on_gate (p_gate->gate_id)) == NULL)
584 nfa_hciu_send_delete_pipe_cmd (p_pipe->pipe_id);
681 tNFA_HCI_DYN_PIPE *p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->open_pipe.pipe);
684 if (p_pipe != NULL)
685 p_gate = nfa_hciu_find_gate_by_gid (p_pipe->local_gate);
687 if ( (p_pipe != NULL)
689 &&(nfa_hciu_is_active_host (p_pipe->dest_host))
692 if (p_pipe->pipe_state == NFA_HCI_PIPE_CLOSED)
725 tNFA_HCI_DYN_PIPE *p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->get_registry.pipe);
730 if (p_pipe != NULL)
732 p_gate = nfa_hciu_find_gate_by_gid (p_pipe->local_gate);
734 if ((p_gate != NULL) && (nfa_hciu_is_active_host (p_pipe->dest_host)) && (p_gate->gate_owner == p_evt_data->get_registry.hci_handle))
738 if (nfa_hciu_is_host_reseting (p_pipe->dest_host))
744 if (p_pipe->pipe_state == NFA_HCI_PIPE_CLOSED)
775 tNFA_HCI_DYN_PIPE *p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->set_registry.pipe);
780 if (p_pipe != NULL)
782 p_gate = nfa_hciu_find_gate_by_gid (p_pipe->local_gate);
784 if ((p_gate != NULL) && (nfa_hciu_is_active_host (p_pipe->dest_host)) && (p_gate->gate_owner == p_evt_data->set_registry.hci_handle))
788 if (nfa_hciu_is_host_reseting (p_pipe->dest_host))
794 if (p_pipe->pipe_state == NFA_HCI_PIPE_CLOSED)
825 tNFA_HCI_DYN_PIPE *p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->close_pipe.pipe);
828 if (p_pipe != NULL)
829 p_gate = nfa_hciu_find_gate_by_gid (p_pipe->local_gate);
831 if ( (p_pipe != NULL)
833 &&(nfa_hciu_is_active_host (p_pipe->dest_host))
836 if (p_pipe->pipe_state == NFA_HCI_PIPE_OPENED)
869 tNFA_HCI_DYN_PIPE *p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->delete_pipe.pipe);
872 if (p_pipe != NULL)
874 p_gate = nfa_hciu_find_gate_by_gid (p_pipe->local_gate);
877 &&(nfa_hciu_is_active_host (p_pipe->dest_host)) )
902 tNFA_HCI_DYN_PIPE *p_pipe;
906 if ((p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->send_cmd.pipe)) != NULL)
910 if ( (nfa_hciu_is_active_host (p_pipe->dest_host))
911 &&((app_handle == p_evt_data->send_cmd.hci_handle || p_pipe->local_gate == NFA_HCI_CONNECTIVITY_GATE)) )
913 if (nfa_hciu_is_host_reseting (p_pipe->dest_host))
919 if (p_pipe->pipe_state == NFA_HCI_PIPE_OPENED)
922 if ((status = nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_COMMAND_TYPE, p_evt_data->send_cmd.cmd_code,
928 NFA_TRACE_WARNING1 ("nfa_hci_api_send_cmd pipe:%d not open", p_pipe->pipe_id);
934 p_pipe->pipe_id);
961 tNFA_HCI_DYN_PIPE *p_pipe;
965 if ((p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->send_rsp.pipe)) != NULL)
969 if ( (nfa_hciu_is_active_host (p_pipe->dest_host))
970 &&((app_handle == p_evt_data->send_rsp.hci_handle || p_pipe->local_gate == NFA_HCI_CONNECTIVITY_GATE)) )
972 if (p_pipe->pipe_state == NFA_HCI_PIPE_OPENED)
974 if ((status = nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_RESPONSE_TYPE, p_evt_data->send_rsp.response,
980 NFA_TRACE_WARNING1 ("nfa_hci_api_send_rsp pipe:%d not open", p_pipe->pipe_id);
986 p_pipe->pipe_id);
1013 tNFA_HCI_DYN_PIPE *p_pipe;
1017 if ((p_pipe = nfa_hciu_find_pipe_by_pid (p_evt_data->send_evt.pipe)) != NULL)
1021 if ( (nfa_hciu_is_active_host (p_pipe->dest_host))
1022 &&((app_handle == p_evt_data->send_evt.hci_handle || p_pipe->local_gate == NFA_HCI_CONNECTIVITY_GATE)) )
1024 if (nfa_hciu_is_host_reseting (p_pipe->dest_host))
1030 if (p_pipe->pipe_state == NFA_HCI_PIPE_OPENED)
1032 status = nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_EVENT_TYPE, p_evt_data->send_evt.evt_code,
1037 if (p_pipe->local_gate == NFA_HCI_LOOP_BACK_GATE)
1054 else if (p_pipe->local_gate == NFA_HCI_LOOP_BACK_GATE)
1061 if (p_pipe->local_gate == NFA_HCI_LOOP_BACK_GATE)
1073 NFA_TRACE_WARNING1 ("nfa_hci_api_send_event pipe:%d not open", p_pipe->pipe_id);
1079 p_pipe->pipe_id);
1218 void nfa_hci_handle_pipe_open_close_cmd (tNFA_HCI_DYN_PIPE *p_pipe)
1227 if ((p_gate = nfa_hciu_find_gate_by_gid(p_pipe->local_gate)) != NULL)
1232 p_pipe->pipe_state = NFA_HCI_PIPE_OPENED;
1237 p_pipe->pipe_state = NFA_HCI_PIPE_CLOSED;
1240 nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_RESPONSE_TYPE, response, rsp_len, data);
1742 tNFA_HCI_DYN_PIPE *p_pipe = nfa_hciu_find_pipe_by_pid (pipe_id);
1745 if (p_pipe == NULL)
1754 if (p_pipe->local_gate == NFA_HCI_IDENTITY_MANAGEMENT_GATE)
1756 nfa_hci_handle_identity_mgmt_gate_pkt (p_data, p_pipe);
1758 else if (p_pipe->local_gate == NFA_HCI_LOOP_BACK_GATE)
1760 nfa_hci_handle_loopback_gate_pkt (p_data, data_len, p_pipe);
1762 else if (p_pipe->local_gate == NFA_HCI_CONNECTIVITY_GATE)
1764 nfa_hci_handle_connectivity_gate_pkt (p_data, data_len, p_pipe);
1768 p_gate = nfa_hciu_find_gate_by_gid (p_pipe->local_gate);
1771 NFA_TRACE_ERROR1 ("nfa_hci_handle_dyn_pipe_pkt - Pipe's gate %d is corrupt",p_pipe->local_gate);
1781 nfa_hci_handle_generic_gate_cmd (p_data, (UINT8) data_len, p_gate, p_pipe);
1785 nfa_hci_handle_generic_gate_rsp (p_data, (UINT8) data_len, p_gate, p_pipe);
1789 nfa_hci_handle_generic_gate_evt (p_data, data_len, p_gate, p_pipe);
1805 static void nfa_hci_handle_identity_mgmt_gate_pkt (UINT8 *p_data, tNFA_HCI_DYN_PIPE *p_pipe)
1824 if (p_pipe->pipe_state == NFA_HCI_PIPE_OPENED)
1880 p_pipe->pipe_state = NFA_HCI_PIPE_OPENED;
1884 p_pipe->pipe_state = NFA_HCI_PIPE_CLOSED;
1892 nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_RESPONSE_TYPE, response, rsp_len, p_rsp);
1905 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)
1908 tNFA_HANDLE app_handle = nfa_hciu_get_pipe_owner (p_pipe->pipe_id);
1913 evt_data.registry.pipe = p_pipe->pipe_id;
1925 evt_data.registry.pipe = p_pipe->pipe_id;
1933 nfa_hci_handle_pipe_open_close_cmd (p_pipe);
1935 evt_data.opened.pipe = p_pipe->pipe_id;
1942 nfa_hci_handle_pipe_open_close_cmd (p_pipe);
1944 evt_data.closed.pipe = p_pipe->pipe_id;
1953 evt_data.cmd_rcvd.pipe = p_pipe->pipe_id;;
1975 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)
1986 p_pipe->pipe_state = NFA_HCI_PIPE_OPENED;
1991 evt_data.opened.pipe = p_pipe->pipe_id;
1997 p_pipe->pipe_state = NFA_HCI_PIPE_CLOSED;
2002 evt_data.opened.pipe = p_pipe->pipe_id;
2010 evt_data.registry.pipe = p_pipe->pipe_id;
2022 evt_data.registry.pipe = p_pipe->pipe_id;
2030 evt_data.rsp_rcvd.pipe = p_pipe->pipe_id;;
2051 static void nfa_hci_handle_connectivity_gate_pkt (UINT8 *p_data, UINT16 data_len, tNFA_HCI_DYN_PIPE *p_pipe)
2061 nfa_hci_handle_pipe_open_close_cmd (p_pipe);
2067 nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_RESPONSE_TYPE, NFA_HCI_ANY_E_CMD_NOT_SUPPORTED, 0, NULL);
2071 nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_RESPONSE_TYPE, NFA_HCI_ANY_E_CMD_NOT_SUPPORTED, 0, NULL);
2078 p_pipe->pipe_state = NFA_HCI_PIPE_OPENED;
2080 p_pipe->pipe_state = NFA_HCI_PIPE_CLOSED;
2084 evt_data.rsp_rcvd.pipe = p_pipe->pipe_id;;
2095 evt_data.rcvd_evt.pipe = p_pipe->pipe_id;
2114 static void nfa_hci_handle_loopback_gate_pkt (UINT8 *p_data, UINT16 data_len, tNFA_HCI_DYN_PIPE *p_pipe)
2128 p_pipe->pipe_state = NFA_HCI_PIPE_OPENED;
2132 p_pipe->pipe_state = NFA_HCI_PIPE_CLOSED;
2137 nfa_hciu_send_msg (p_pipe->pipe_id, NFA_HCI_RESPONSE_TYPE, response, rsp_len, data);
2142 p_pipe->pipe_state = NFA_HCI_PIPE_OPENED;
2144 p_pipe->pipe_state = NFA_HCI_PIPE_CLOSED;
2148 evt_data.rsp_rcvd.pipe = p_pipe->pipe_id;;
2161 evt_data.rcvd_evt.pipe = p_pipe->pipe_id;
2171 nfa_hciu_send_msg (p_pipe
2185 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)
2189 evt_data.rcvd_evt.pipe = p_pipe->pipe_id;