aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/nfc/hci.h
diff options
context:
space:
mode:
authorEric Lapuyade <eric.lapuyade@linux.intel.com>2012-06-05 08:42:11 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-07-09 16:42:12 -0400
commita10d595b1074d04446f77161eea165e5809e163c (patch)
tree4ba305673685b1602cc4ec66083a7c06a1d0b06e /include/net/nfc/hci.h
parenteae202aa2083eb6f7fdb686e2c42d7db4ef63632 (diff)
NFC: Allow HCI driver to pre-open pipes to some gates
Some NFC chips will statically create and open pipes for both standard and proprietary gates. The driver can now pass this information to HCI such that HCI will not attempt to create and open them, but will instead directly use the passed pipe ids. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/net/nfc/hci.h')
-rw-r--r--include/net/nfc/hci.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h
index d25dd9b99877..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
@@ -182,7 +192,8 @@ void nfc_hci_event_received(struct nfc_hci_dev *hdev, u8 pipe, u8 event,
182void 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);
183 193
184/* connecting to gates and sending hci instructions */ 194/* connecting to gates and sending hci instructions */
185int 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);
186int nfc_hci_disconnect_gate(struct nfc_hci_dev *hdev, u8 gate); 197int nfc_hci_disconnect_gate(struct nfc_hci_dev *hdev, u8 gate);
187int nfc_hci_disconnect_all_gates(struct nfc_hci_dev *hdev); 198int nfc_hci_disconnect_all_gates(struct nfc_hci_dev *hdev);
188int 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,