Lines Matching refs:pipe

20 	u8              pipe;
37 u8 pipe;
41 u8 pipe;
54 u8 header; /* cbit+pipe */
141 static int nci_hci_send_data(struct nci_dev *ndev, u8 pipe,
148 u8 cb = pipe;
204 nci_hci_send_data(ndev, data->pipe, data->cmd,
211 u8 pipe = ndev->hci_dev->gate2pipe[gate];
213 if (pipe == NCI_HCI_INVALID_PIPE)
216 return nci_hci_send_data(ndev, pipe,
230 u8 pipe = ndev->hci_dev->gate2pipe[gate];
232 if (pipe == NCI_HCI_INVALID_PIPE)
240 data.pipe = pipe;
275 static void nci_hci_event_received(struct nci_dev *ndev, u8 pipe,
279 ndev->ops->hci_event_received(ndev, pipe, event, skb);
282 static void nci_hci_cmd_received(struct nci_dev *ndev, u8 pipe,
285 u8 gate = ndev->hci_dev->pipes[pipe].gate;
292 pr_debug("from gate %x pipe %x cmd %x\n", gate, pipe, cmd);
302 new_pipe = create_info->pipe;
308 /* Save the new created pipe and bind with local gate,
319 /* If the pipe is not created report an error */
331 if (delete_info->pipe >= NCI_HCI_MAX_PIPES) {
336 ndev->hci_dev->pipes[delete_info->pipe].gate =
338 ndev->hci_dev->pipes[delete_info->pipe].host =
357 ndev->ops->hci_cmd_received(ndev, pipe, cmd, skb);
360 nci_hci_send_data(ndev, pipe, status, NULL, 0);
365 static void nci_hci_resp_received(struct nci_dev *ndev, u8 pipe,
383 /* Receive hcp message for pipe, with type and cmd.
386 static void nci_hci_hcp_message_rx(struct nci_dev *ndev, u8 pipe,
391 nci_hci_resp_received(ndev, pipe, instruction, skb);
394 nci_hci_cmd_received(ndev, pipe, instruction, skb);
397 nci_hci_event_received(ndev, pipe, instruction, skb);
415 u8 pipe, type, instruction;
418 pipe = NCI_HCP_MSG_GET_PIPE(skb->data[0]);
425 nci_hci_hcp_message_rx(hdev->ndev, pipe,
435 u8 pipe, type;
455 pipe = NCI_HCP_MSG_GET_PIPE(packet->header);
471 skb_put_u8(hcp_skb, pipe);
493 pipe = NCI_HCP_MSG_GET_PIPE(packet->header);
495 nci_hci_hcp_message_rx(ndev, pipe, type,
503 int nci_hci_open_pipe(struct nci_dev *ndev, u8 pipe)
513 data.pipe = pipe;
528 u8 pipe;
546 pipe = resp->pipe;
549 pr_debug("pipe created=%d\n", pipe);
551 return pipe;
554 static int nci_hci_delete_pipe(struct nci_dev *ndev, u8 pipe)
559 NCI_HCI_ADM_DELETE_PIPE, &pipe, 1, NULL);
570 u8 pipe = ndev->hci_dev->gate2pipe[gate];
574 if (pipe == NCI_HCI_INVALID_PIPE)
589 data.pipe = pipe;
617 u8 pipe = ndev->hci_dev->gate2pipe[gate];
621 if (pipe == NCI_HCI_INVALID_PIPE)
629 data.pipe = pipe;
653 u8 dest_host, u8 dest_gate, u8 pipe)
658 if (pipe == NCI_HCI_DO_NOT_OPEN_PIPE)
664 if (pipe != NCI_HCI_INVALID_PIPE)
669 pipe = NCI_HCI_LINK_MGMT_PIPE;
672 pipe = NCI_HCI_ADMIN_PIPE;
675 pipe = nci_hci_create_pipe(ndev, dest_host, dest_gate, &r);
676 if (pipe == NCI_HCI_INVALID_PIPE)
683 r = nci_hci_open_pipe(ndev, pipe);
686 if (nci_hci_delete_pipe(ndev, pipe) < 0) {
687 /* TODO: Cannot clean by deleting pipe...
695 ndev->hci_dev->pipes[pipe].gate = dest_gate;
696 ndev->hci_dev->pipes[pipe].host = dest_host;
697 ndev->hci_dev->gate2pipe[dest_gate] = pipe;
711 gates->gate, gates->pipe);
744 ndev->hci_dev->init_data.gates[0].pipe);
757 /* Restore gate<->pipe table from some proprietary location. */