diff options
Diffstat (limited to 'include/net/nfc/hci.h')
-rw-r--r-- | include/net/nfc/hci.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h index e900072950cb..671953e11575 100644 --- a/include/net/nfc/hci.h +++ b/include/net/nfc/hci.h | |||
@@ -24,6 +24,12 @@ | |||
24 | 24 | ||
25 | #include <net/nfc/nfc.h> | 25 | #include <net/nfc/nfc.h> |
26 | 26 | ||
27 | struct nfc_phy_ops { | ||
28 | int (*write)(void *dev_id, struct sk_buff *skb); | ||
29 | int (*enable)(void *dev_id); | ||
30 | void (*disable)(void *dev_id); | ||
31 | }; | ||
32 | |||
27 | struct nfc_hci_dev; | 33 | struct nfc_hci_dev; |
28 | 34 | ||
29 | struct nfc_hci_ops { | 35 | struct nfc_hci_ops { |
@@ -38,15 +44,21 @@ struct nfc_hci_ops { | |||
38 | int (*xmit) (struct nfc_hci_dev *hdev, struct sk_buff *skb); | 44 | int (*xmit) (struct nfc_hci_dev *hdev, struct sk_buff *skb); |
39 | int (*start_poll) (struct nfc_hci_dev *hdev, | 45 | int (*start_poll) (struct nfc_hci_dev *hdev, |
40 | u32 im_protocols, u32 tm_protocols); | 46 | u32 im_protocols, u32 tm_protocols); |
47 | int (*dep_link_up)(struct nfc_hci_dev *hdev, struct nfc_target *target, | ||
48 | u8 comm_mode, u8 *gb, size_t gb_len); | ||
49 | int (*dep_link_down)(struct nfc_hci_dev *hdev); | ||
41 | int (*target_from_gate) (struct nfc_hci_dev *hdev, u8 gate, | 50 | int (*target_from_gate) (struct nfc_hci_dev *hdev, u8 gate, |
42 | struct nfc_target *target); | 51 | struct nfc_target *target); |
43 | int (*complete_target_discovered) (struct nfc_hci_dev *hdev, u8 gate, | 52 | int (*complete_target_discovered) (struct nfc_hci_dev *hdev, u8 gate, |
44 | struct nfc_target *target); | 53 | struct nfc_target *target); |
45 | int (*data_exchange) (struct nfc_hci_dev *hdev, | 54 | int (*im_transceive) (struct nfc_hci_dev *hdev, |
46 | struct nfc_target *target, struct sk_buff *skb, | 55 | struct nfc_target *target, struct sk_buff *skb, |
47 | data_exchange_cb_t cb, void *cb_context); | 56 | data_exchange_cb_t cb, void *cb_context); |
57 | int (*tm_send)(struct nfc_hci_dev *hdev, struct sk_buff *skb); | ||
48 | int (*check_presence)(struct nfc_hci_dev *hdev, | 58 | int (*check_presence)(struct nfc_hci_dev *hdev, |
49 | struct nfc_target *target); | 59 | struct nfc_target *target); |
60 | void (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event, | ||
61 | struct sk_buff *skb); | ||
50 | }; | 62 | }; |
51 | 63 | ||
52 | /* Pipes */ | 64 | /* Pipes */ |
@@ -114,6 +126,9 @@ struct nfc_hci_dev { | |||
114 | int async_cb_type; | 126 | int async_cb_type; |
115 | data_exchange_cb_t async_cb; | 127 | data_exchange_cb_t async_cb; |
116 | void *async_cb_context; | 128 | void *async_cb_context; |
129 | |||
130 | u8 *gb; | ||
131 | size_t gb_len; | ||
117 | }; | 132 | }; |
118 | 133 | ||
119 | /* hci device allocation */ | 134 | /* hci device allocation */ |
@@ -134,6 +149,8 @@ void *nfc_hci_get_clientdata(struct nfc_hci_dev *hdev); | |||
134 | 149 | ||
135 | void nfc_hci_driver_failure(struct nfc_hci_dev *hdev, int err); | 150 | void nfc_hci_driver_failure(struct nfc_hci_dev *hdev, int err); |
136 | 151 | ||
152 | int nfc_hci_result_to_errno(u8 result); | ||
153 | |||
137 | /* Host IDs */ | 154 | /* Host IDs */ |
138 | #define NFC_HCI_HOST_CONTROLLER_ID 0x00 | 155 | #define NFC_HCI_HOST_CONTROLLER_ID 0x00 |
139 | #define NFC_HCI_TERMINAL_HOST_ID 0x01 | 156 | #define NFC_HCI_TERMINAL_HOST_ID 0x01 |
@@ -219,5 +236,7 @@ int nfc_hci_send_response(struct nfc_hci_dev *hdev, u8 gate, u8 response, | |||
219 | const u8 *param, size_t param_len); | 236 | const u8 *param, size_t param_len); |
220 | int nfc_hci_send_event(struct nfc_hci_dev *hdev, u8 gate, u8 event, | 237 | int nfc_hci_send_event(struct nfc_hci_dev *hdev, u8 gate, u8 event, |
221 | const u8 *param, size_t param_len); | 238 | const u8 *param, size_t param_len); |
239 | int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate); | ||
240 | u32 nfc_hci_sak_to_protocol(u8 sak); | ||
222 | 241 | ||
223 | #endif /* __NET_HCI_H */ | 242 | #endif /* __NET_HCI_H */ |