aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/nfc/hci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/nfc/hci.h')
-rw-r--r--include/net/nfc/hci.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h
index e30e6a869714..f5169b04f082 100644
--- a/include/net/nfc/hci.h
+++ b/include/net/nfc/hci.h
@@ -44,10 +44,20 @@ struct nfc_hci_ops {
44 struct nfc_target *target); 44 struct nfc_target *target);
45}; 45};
46 46
47#define NFC_HCI_MAX_CUSTOM_GATES 15 47/* Pipes */
48#define NFC_HCI_INVALID_PIPE 0x80
49#define NFC_HCI_LINK_MGMT_PIPE 0x00
50#define NFC_HCI_ADMIN_PIPE 0x01
51
52struct nfc_hci_gate {
53 u8 gate;
54 u8 pipe;
55};
56
57#define NFC_HCI_MAX_CUSTOM_GATES 50
48struct nfc_hci_init_data { 58struct nfc_hci_init_data {
49 u8 gate_count; 59 u8 gate_count;
50 u8 gates[NFC_HCI_MAX_CUSTOM_GATES]; 60 struct nfc_hci_gate gates[NFC_HCI_MAX_CUSTOM_GATES];
51 char session_id[9]; 61 char session_id[9];
52}; 62};
53 63
@@ -112,6 +122,8 @@ void nfc_hci_unregister_device(struct nfc_hci_dev *hdev);
112void nfc_hci_set_clientdata(struct nfc_hci_dev *hdev, void *clientdata); 122void nfc_hci_set_clientdata(struct nfc_hci_dev *hdev, void *clientdata);
113void *nfc_hci_get_clientdata(struct nfc_hci_dev *hdev); 123void *nfc_hci_get_clientdata(struct nfc_hci_dev *hdev);
114 124
125void nfc_hci_driver_failure(struct nfc_hci_dev *hdev, int err);
126
115/* Host IDs */ 127/* Host IDs */
116#define NFC_HCI_HOST_CONTROLLER_ID 0x00 128#define NFC_HCI_HOST_CONTROLLER_ID 0x00
117#define NFC_HCI_TERMINAL_HOST_ID 0x01 129#define NFC_HCI_TERMINAL_HOST_ID 0x01
@@ -180,7 +192,8 @@ void nfc_hci_event_received(struct nfc_hci_dev *hdev, u8 pipe, u8 event,
180void nfc_hci_recv_frame(struct nfc_hci_dev *hdev, struct sk_buff *skb); 192void nfc_hci_recv_frame(struct nfc_hci_dev *hdev, struct sk_buff *skb);
181 193
182/* connecting to gates and sending hci instructions */ 194/* connecting to gates and sending hci instructions */
183int nfc_hci_connect_gate(struct nfc_hci_dev *hdev, u8 dest_host, u8 dest_gate); 195int nfc_hci_connect_gate(struct nfc_hci_dev *hdev, u8 dest_host, u8 dest_gate,
196 u8 pipe);
184int nfc_hci_disconnect_gate(struct nfc_hci_dev *hdev, u8 gate); 197int nfc_hci_disconnect_gate(struct nfc_hci_dev *hdev, u8 gate);
185int nfc_hci_disconnect_all_gates(struct nfc_hci_dev *hdev); 198int nfc_hci_disconnect_all_gates(struct nfc_hci_dev *hdev);
186int nfc_hci_get_param(struct nfc_hci_dev *hdev, u8 gate, u8 idx, 199int nfc_hci_get_param(struct nfc_hci_dev *hdev, u8 gate, u8 idx,