diff options
Diffstat (limited to 'include/net/nfc/hci.h')
-rw-r--r-- | include/net/nfc/hci.h | 19 |
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 | |||
52 | struct nfc_hci_gate { | ||
53 | u8 gate; | ||
54 | u8 pipe; | ||
55 | }; | ||
56 | |||
57 | #define NFC_HCI_MAX_CUSTOM_GATES 50 | ||
48 | struct nfc_hci_init_data { | 58 | struct 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); | |||
112 | void nfc_hci_set_clientdata(struct nfc_hci_dev *hdev, void *clientdata); | 122 | void nfc_hci_set_clientdata(struct nfc_hci_dev *hdev, void *clientdata); |
113 | void *nfc_hci_get_clientdata(struct nfc_hci_dev *hdev); | 123 | void *nfc_hci_get_clientdata(struct nfc_hci_dev *hdev); |
114 | 124 | ||
125 | void 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, | |||
180 | void nfc_hci_recv_frame(struct nfc_hci_dev *hdev, struct sk_buff *skb); | 192 | void 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 */ |
183 | int nfc_hci_connect_gate(struct nfc_hci_dev *hdev, u8 dest_host, u8 dest_gate); | 195 | int nfc_hci_connect_gate(struct nfc_hci_dev *hdev, u8 dest_host, u8 dest_gate, |
196 | u8 pipe); | ||
184 | int nfc_hci_disconnect_gate(struct nfc_hci_dev *hdev, u8 gate); | 197 | int nfc_hci_disconnect_gate(struct nfc_hci_dev *hdev, u8 gate); |
185 | int nfc_hci_disconnect_all_gates(struct nfc_hci_dev *hdev); | 198 | int nfc_hci_disconnect_all_gates(struct nfc_hci_dev *hdev); |
186 | int nfc_hci_get_param(struct nfc_hci_dev *hdev, u8 gate, u8 idx, | 199 | int nfc_hci_get_param(struct nfc_hci_dev *hdev, u8 gate, u8 idx, |