• Home
  • Raw
  • Download

Lines Matching refs:hdev

31 static int nfc_hci_execute_cmd_async(struct nfc_hci_dev *hdev, u8 pipe, u8 cmd,  in nfc_hci_execute_cmd_async()  argument
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
83 hcp_ew.exec_result = nfc_hci_hcp_message_tx(hdev, pipe, in nfc_hci_execute_cmd()
103 int nfc_hci_send_event(struct nfc_hci_dev *hdev, u8 gate, u8 event, in nfc_hci_send_event() argument
110 pipe = hdev->gate2pipe[gate]; in nfc_hci_send_event()
114 return nfc_hci_hcp_message_tx(hdev, pipe, NFC_HCI_HCP_EVENT, event, in nfc_hci_send_event()
124 int nfc_hci_send_cmd(struct nfc_hci_dev *hdev, u8 gate, u8 cmd, in nfc_hci_send_cmd() argument
131 pipe = hdev->gate2pipe[gate]; in nfc_hci_send_cmd()
135 return nfc_hci_execute_cmd(hdev, pipe, cmd, param, param_len, skb); in nfc_hci_send_cmd()
139 int nfc_hci_send_cmd_async(struct nfc_hci_dev *hdev, u8 gate, u8 cmd, in nfc_hci_send_cmd_async() argument
147 pipe = hdev->gate2pipe[gate]; in nfc_hci_send_cmd_async()
151 return nfc_hci_execute_cmd_async(hdev, pipe, cmd, param, param_len, in nfc_hci_send_cmd_async()
156 int nfc_hci_set_param(struct nfc_hci_dev *hdev, u8 gate, u8 idx, in nfc_hci_set_param() argument
179 r = nfc_hci_send_cmd(hdev, gate, NFC_HCI_ANY_SET_PARAMETER, in nfc_hci_set_param()
188 int nfc_hci_get_param(struct nfc_hci_dev *hdev, u8 gate, u8 idx, in nfc_hci_get_param() argument
193 return nfc_hci_send_cmd(hdev, gate, NFC_HCI_ANY_GET_PARAMETER, in nfc_hci_get_param()
198 static int nfc_hci_open_pipe(struct nfc_hci_dev *hdev, u8 pipe) in nfc_hci_open_pipe() argument
205 r = nfc_hci_execute_cmd(hdev, pipe, NFC_HCI_ANY_OPEN_PIPE, in nfc_hci_open_pipe()
218 static int nfc_hci_close_pipe(struct nfc_hci_dev *hdev, u8 pipe) in nfc_hci_close_pipe() argument
222 return nfc_hci_execute_cmd(hdev, pipe, NFC_HCI_ANY_CLOSE_PIPE, in nfc_hci_close_pipe()
226 static u8 nfc_hci_create_pipe(struct nfc_hci_dev *hdev, u8 dest_host, in nfc_hci_create_pipe() argument
240 *result = nfc_hci_execute_cmd(hdev, NFC_HCI_ADMIN_PIPE, in nfc_hci_create_pipe()
255 static int nfc_hci_delete_pipe(struct nfc_hci_dev *hdev, u8 pipe) in nfc_hci_delete_pipe() argument
259 return nfc_hci_execute_cmd(hdev, NFC_HCI_ADMIN_PIPE, in nfc_hci_delete_pipe()
263 static int nfc_hci_clear_all_pipes(struct nfc_hci_dev *hdev) in nfc_hci_clear_all_pipes() argument
273 if (test_bit(NFC_HCI_QUIRK_SHORT_CLEAR, &hdev->quirks)) in nfc_hci_clear_all_pipes()
276 return nfc_hci_execute_cmd(hdev, NFC_HCI_ADMIN_PIPE, in nfc_hci_clear_all_pipes()
281 int nfc_hci_disconnect_gate(struct nfc_hci_dev *hdev, u8 gate) in nfc_hci_disconnect_gate() argument
284 u8 pipe = hdev->gate2pipe[gate]; in nfc_hci_disconnect_gate()
291 r = nfc_hci_close_pipe(hdev, pipe); in nfc_hci_disconnect_gate()
296 r = nfc_hci_delete_pipe(hdev, pipe); in nfc_hci_disconnect_gate()
301 hdev->gate2pipe[gate] = NFC_HCI_INVALID_PIPE; in nfc_hci_disconnect_gate()
307 int nfc_hci_disconnect_all_gates(struct nfc_hci_dev *hdev) in nfc_hci_disconnect_all_gates() argument
313 r = nfc_hci_clear_all_pipes(hdev); in nfc_hci_disconnect_all_gates()
317 nfc_hci_reset_pipes(hdev); in nfc_hci_disconnect_all_gates()
323 int nfc_hci_connect_gate(struct nfc_hci_dev *hdev, u8 dest_host, u8 dest_gate, in nfc_hci_connect_gate() argument
334 if (hdev->gate2pipe[dest_gate] != NFC_HCI_INVALID_PIPE) in nfc_hci_connect_gate()
348 pipe = nfc_hci_create_pipe(hdev, dest_host, dest_gate, &r); in nfc_hci_connect_gate()
356 r = nfc_hci_open_pipe(hdev, pipe); in nfc_hci_connect_gate()
359 if (nfc_hci_delete_pipe(hdev, pipe) < 0) { in nfc_hci_connect_gate()
366 hdev->pipes[pipe].gate = dest_gate; in nfc_hci_connect_gate()
367 hdev->pipes[pipe].dest_host = dest_host; in nfc_hci_connect_gate()
368 hdev->gate2pipe[dest_gate] = pipe; in nfc_hci_connect_gate()