Lines Matching defs:pipe

19 static int nfc_hci_execute_cmd_async(struct nfc_hci_dev *hdev, u8 pipe, u8 cmd,
23 pr_debug("exec cmd async through pipe=%d, cmd=%d, plen=%zd\n", pipe,
29 return nfc_hci_hcp_message_tx(hdev, pipe, NFC_HCI_HCP_COMMAND, cmd,
55 static int nfc_hci_execute_cmd(struct nfc_hci_dev *hdev, u8 pipe, u8 cmd,
65 pr_debug("exec cmd sync through pipe=%d, cmd=%d, plen=%zd\n", pipe,
71 hcp_ew.exec_result = nfc_hci_hcp_message_tx(hdev, pipe,
94 u8 pipe;
98 pipe = hdev->gate2pipe[gate];
99 if (pipe == NFC_HCI_INVALID_PIPE)
102 return nfc_hci_hcp_message_tx(hdev, pipe, NFC_HCI_HCP_EVENT, event,
115 u8 pipe;
117 pipe = hdev->gate2pipe[gate];
118 if (pipe == NFC_HCI_INVALID_PIPE)
121 return nfc_hci_execute_cmd(hdev, pipe, cmd, param, param_len, skb);
129 u8 pipe;
131 pipe = hdev->gate2pipe[gate];
132 if (pipe == NFC_HCI_INVALID_PIPE)
135 return nfc_hci_execute_cmd_async(hdev, pipe, cmd, param, param_len,
182 static int nfc_hci_open_pipe(struct nfc_hci_dev *hdev, u8 pipe)
187 pr_debug("pipe=%d\n", pipe);
189 r = nfc_hci_execute_cmd(hdev, pipe, NFC_HCI_ANY_OPEN_PIPE,
202 static int nfc_hci_close_pipe(struct nfc_hci_dev *hdev, u8 pipe)
204 return nfc_hci_execute_cmd(hdev, pipe, NFC_HCI_ANY_CLOSE_PIPE,
214 u8 pipe;
229 pipe = resp->pipe;
232 pr_debug("pipe created=%d\n", pipe);
234 return pipe;
237 static int nfc_hci_delete_pipe(struct nfc_hci_dev *hdev, u8 pipe)
240 NFC_HCI_ADM_DELETE_PIPE, &pipe, 1, NULL);
262 u8 pipe = hdev->gate2pipe[gate];
264 if (pipe == NFC_HCI_INVALID_PIPE)
267 r = nfc_hci_close_pipe(hdev, pipe);
271 if (pipe != NFC_HCI_LINK_MGMT_PIPE && pipe != NFC_HCI_ADMIN_PIPE) {
272 r = nfc_hci_delete_pipe(hdev, pipe);
298 u8 pipe)
303 if (pipe == NFC_HCI_DO_NOT_CREATE_PIPE)
309 if (pipe != NFC_HCI_INVALID_PIPE)
314 pipe = NFC_HCI_LINK_MGMT_PIPE;
317 pipe = NFC_HCI_ADMIN_PIPE;
320 pipe = nfc_hci_create_pipe(hdev, dest_host, dest_gate, &r);
321 if (pipe == NFC_HCI_INVALID_PIPE)
328 r = nfc_hci_open_pipe(hdev, pipe);
331 if (nfc_hci_delete_pipe(hdev, pipe) < 0) {
332 /* TODO: Cannot clean by deleting pipe...
338 hdev->pipes[pipe].gate = dest_gate;
339 hdev->pipes[pipe].dest_host = dest_host;
340 hdev->gate2pipe[dest_gate] = pipe;