Lines Matching refs:pipe
21 u8 pipe;
38 u8 pipe;
42 u8 pipe;
55 u8 header; /* cbit+pipe */
142 static int nci_hci_send_data(struct nci_dev *ndev, u8 pipe,
149 u8 cb = pipe;
203 nci_hci_send_data(ndev, data->pipe, data->cmd,
210 u8 pipe = ndev->hci_dev->gate2pipe[gate];
212 if (pipe == NCI_HCI_INVALID_PIPE)
215 return nci_hci_send_data(ndev, pipe,
229 u8 pipe = ndev->hci_dev->gate2pipe[gate];
231 if (pipe == NCI_HCI_INVALID_PIPE)
239 data.pipe = pipe;
274 static void nci_hci_event_received(struct nci_dev *ndev, u8 pipe,
278 ndev->ops->hci_event_received(ndev, pipe, event, skb);
281 static void nci_hci_cmd_received(struct nci_dev *ndev, u8 pipe,
284 u8 gate = ndev->hci_dev->pipes[pipe].gate;
291 pr_debug("from gate %x pipe %x cmd %x\n", gate, pipe, cmd);
301 new_pipe = create_info->pipe;
307 /* Save the new created pipe and bind with local gate,
318 /* If the pipe is not created report an error */
330 if (delete_info->pipe >= NCI_HCI_MAX_PIPES) {
335 ndev->hci_dev->pipes[delete_info->pipe].gate =
337 ndev->hci_dev->pipes[delete_info->pipe].host =
356 ndev->ops->hci_cmd_received(ndev, pipe, cmd, skb);
359 nci_hci_send_data(ndev, pipe, status, NULL, 0);
364 static void nci_hci_resp_received(struct nci_dev *ndev, u8 pipe,
379 /* Receive hcp message for pipe, with type and cmd.
382 static void nci_hci_hcp_message_rx(struct nci_dev *ndev, u8 pipe,
387 nci_hci_resp_received(ndev, pipe, skb);
390 nci_hci_cmd_received(ndev, pipe, instruction, skb);
393 nci_hci_event_received(ndev, pipe, instruction, skb);
411 u8 pipe, type, instruction;
415 pipe = NCI_HCP_MSG_GET_PIPE(skb->data[0]);
422 nci_hci_hcp_message_rx(hdev->ndev, pipe,
432 u8 pipe, type;
450 pipe = NCI_HCP_MSG_GET_PIPE(packet->header);
466 skb_put_u8(hcp_skb, pipe);
488 pipe = NCI_HCP_MSG_GET_PIPE(packet->header);
490 nci_hci_hcp_message_rx(ndev, pipe, type,
498 int nci_hci_open_pipe(struct nci_dev *ndev, u8 pipe)
508 data.pipe = pipe;
522 u8 pipe;
540 pipe = resp->pipe;
543 pr_debug("pipe created=%d\n", pipe);
545 return pipe;
548 static int nci_hci_delete_pipe(struct nci_dev *ndev, u8 pipe)
551 NCI_HCI_ADM_DELETE_PIPE, &pipe, 1, NULL);
562 u8 pipe = ndev->hci_dev->gate2pipe[gate];
566 if (pipe == NCI_HCI_INVALID_PIPE)
581 data.pipe = pipe;
608 u8 pipe = ndev->hci_dev->gate2pipe[gate];
612 if (pipe == NCI_HCI_INVALID_PIPE)
620 data.pipe = pipe;
644 u8 dest_host, u8 dest_gate, u8 pipe)
649 if (pipe == NCI_HCI_DO_NOT_OPEN_PIPE)
655 if (pipe != NCI_HCI_INVALID_PIPE)
660 pipe = NCI_HCI_LINK_MGMT_PIPE;
663 pipe = NCI_HCI_ADMIN_PIPE;
666 pipe = nci_hci_create_pipe(ndev, dest_host, dest_gate, &r);
667 if (pipe == NCI_HCI_INVALID_PIPE)
674 r = nci_hci_open_pipe(ndev, pipe);
677 if (nci_hci_delete_pipe(ndev, pipe) < 0) {
678 /* TODO: Cannot clean by deleting pipe...
686 ndev->hci_dev->pipes[pipe].gate = dest_gate;
687 ndev->hci_dev->pipes[pipe].host = dest_host;
688 ndev->hci_dev->gate2pipe[dest_gate] = pipe;
702 gates->gate, gates->pipe);
735 ndev->hci_dev->init_data.gates[0].pipe);
748 /* Restore gate<->pipe table from some proprietary location. */