Lines Matching refs:pipe
31 static int nfc_hci_execute_cmd_async(struct nfc_hci_dev *hdev, u8 pipe, u8 cmd, in nfc_hci_execute_cmd_async() argument
35 pr_debug("exec cmd async through pipe=%d, cmd=%d, plen=%zd\n", pipe, in nfc_hci_execute_cmd_async()
41 return nfc_hci_hcp_message_tx(hdev, pipe, NFC_HCI_HCP_COMMAND, cmd, in nfc_hci_execute_cmd_async()
67 static int nfc_hci_execute_cmd(struct nfc_hci_dev *hdev, u8 pipe, u8 cmd, in nfc_hci_execute_cmd() argument
77 pr_debug("exec cmd sync through pipe=%d, cmd=%d, plen=%zd\n", pipe, in nfc_hci_execute_cmd()
83 hcp_ew.exec_result = nfc_hci_hcp_message_tx(hdev, pipe, in nfc_hci_execute_cmd()
106 u8 pipe; in nfc_hci_send_event() local
110 pipe = hdev->gate2pipe[gate]; in nfc_hci_send_event()
111 if (pipe == NFC_HCI_INVALID_PIPE) in nfc_hci_send_event()
114 return nfc_hci_hcp_message_tx(hdev, pipe, NFC_HCI_HCP_EVENT, event, in nfc_hci_send_event()
122 u8 pipe; in nfc_hci_send_response() local
126 pipe = hdev->gate2pipe[gate]; in nfc_hci_send_response()
127 if (pipe == NFC_HCI_INVALID_PIPE) in nfc_hci_send_response()
130 return nfc_hci_hcp_message_tx(hdev, pipe, NFC_HCI_HCP_RESPONSE, in nfc_hci_send_response()
144 u8 pipe; in nfc_hci_send_cmd() local
148 pipe = hdev->gate2pipe[gate]; in nfc_hci_send_cmd()
149 if (pipe == NFC_HCI_INVALID_PIPE) in nfc_hci_send_cmd()
152 return nfc_hci_execute_cmd(hdev, pipe, cmd, param, param_len, skb); in nfc_hci_send_cmd()
160 u8 pipe; in nfc_hci_send_cmd_async() local
164 pipe = hdev->gate2pipe[gate]; in nfc_hci_send_cmd_async()
165 if (pipe == NFC_HCI_INVALID_PIPE) in nfc_hci_send_cmd_async()
168 return nfc_hci_execute_cmd_async(hdev, pipe, cmd, param, param_len, in nfc_hci_send_cmd_async()
215 static int nfc_hci_open_pipe(struct nfc_hci_dev *hdev, u8 pipe) in nfc_hci_open_pipe() argument
220 pr_debug("pipe=%d\n", pipe); in nfc_hci_open_pipe()
222 r = nfc_hci_execute_cmd(hdev, pipe, NFC_HCI_ANY_OPEN_PIPE, in nfc_hci_open_pipe()
235 static int nfc_hci_close_pipe(struct nfc_hci_dev *hdev, u8 pipe) in nfc_hci_close_pipe() argument
239 return nfc_hci_execute_cmd(hdev, pipe, NFC_HCI_ANY_CLOSE_PIPE, in nfc_hci_close_pipe()
249 u8 pipe; in nfc_hci_create_pipe() local
264 pipe = resp->pipe; in nfc_hci_create_pipe()
267 pr_debug("pipe created=%d\n", pipe); in nfc_hci_create_pipe()
269 return pipe; in nfc_hci_create_pipe()
272 static int nfc_hci_delete_pipe(struct nfc_hci_dev *hdev, u8 pipe) in nfc_hci_delete_pipe() argument
277 NFC_HCI_ADM_DELETE_PIPE, &pipe, 1, NULL); in nfc_hci_delete_pipe()
301 u8 pipe = hdev->gate2pipe[gate]; in nfc_hci_disconnect_gate() local
305 if (pipe == NFC_HCI_INVALID_PIPE) in nfc_hci_disconnect_gate()
308 r = nfc_hci_close_pipe(hdev, pipe); in nfc_hci_disconnect_gate()
312 if (pipe != NFC_HCI_LINK_MGMT_PIPE && pipe != NFC_HCI_ADMIN_PIPE) { in nfc_hci_disconnect_gate()
313 r = nfc_hci_delete_pipe(hdev, pipe); in nfc_hci_disconnect_gate()
341 u8 pipe) in nfc_hci_connect_gate() argument
351 if (pipe != NFC_HCI_INVALID_PIPE) in nfc_hci_connect_gate()
356 pipe = NFC_HCI_LINK_MGMT_PIPE; in nfc_hci_connect_gate()
359 pipe = NFC_HCI_ADMIN_PIPE; in nfc_hci_connect_gate()
362 pipe = nfc_hci_create_pipe(hdev, dest_host, dest_gate, &r); in nfc_hci_connect_gate()
363 if (pipe == NFC_HCI_INVALID_PIPE) in nfc_hci_connect_gate()
370 r = nfc_hci_open_pipe(hdev, pipe); in nfc_hci_connect_gate()
373 if (nfc_hci_delete_pipe(hdev, pipe) < 0) { in nfc_hci_connect_gate()
380 hdev->gate2pipe[dest_gate] = pipe; in nfc_hci_connect_gate()