diff options
author | Christophe Ricard <christophe.ricard@gmail.com> | 2015-01-26 19:18:12 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2015-01-27 17:39:32 -0500 |
commit | 118278f20aa89efe45fa1e2b1829f198d557f8fe (patch) | |
tree | edac7f90f582e3c29f13290a016f12b0068a4ff2 /include/net/nfc | |
parent | fda7a49cb991e9da15f5955d1ea292f8ec74f27a (diff) |
NFC: hci: Add pipes table to reference them with a tuple {gate, host}
In order to keep host source information on specific hci event (such as
evt_connectivity or evt_transaction) and because 2 pipes can be connected
to the same gate, it is necessary to add a table referencing every pipe
with a {gate, host} tuple.
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/net/nfc')
-rw-r--r-- | include/net/nfc/hci.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h index 031c0be9fb32..5570f4a316d1 100644 --- a/include/net/nfc/hci.h +++ b/include/net/nfc/hci.h | |||
@@ -63,8 +63,10 @@ struct nfc_hci_ops { | |||
63 | }; | 63 | }; |
64 | 64 | ||
65 | /* Pipes */ | 65 | /* Pipes */ |
66 | #define NFC_HCI_INVALID_PIPE 0x80 | ||
67 | #define NFC_HCI_DO_NOT_CREATE_PIPE 0x81 | 66 | #define NFC_HCI_DO_NOT_CREATE_PIPE 0x81 |
67 | #define NFC_HCI_INVALID_PIPE 0x80 | ||
68 | #define NFC_HCI_INVALID_GATE 0xFF | ||
69 | #define NFC_HCI_INVALID_HOST 0x80 | ||
68 | #define NFC_HCI_LINK_MGMT_PIPE 0x00 | 70 | #define NFC_HCI_LINK_MGMT_PIPE 0x00 |
69 | #define NFC_HCI_ADMIN_PIPE 0x01 | 71 | #define NFC_HCI_ADMIN_PIPE 0x01 |
70 | 72 | ||
@@ -73,7 +75,13 @@ struct nfc_hci_gate { | |||
73 | u8 pipe; | 75 | u8 pipe; |
74 | }; | 76 | }; |
75 | 77 | ||
78 | struct nfc_hci_pipe { | ||
79 | u8 gate; | ||
80 | u8 dest_host; | ||
81 | }; | ||
82 | |||
76 | #define NFC_HCI_MAX_CUSTOM_GATES 50 | 83 | #define NFC_HCI_MAX_CUSTOM_GATES 50 |
84 | #define NFC_HCI_MAX_PIPES 127 | ||
77 | struct nfc_hci_init_data { | 85 | struct nfc_hci_init_data { |
78 | u8 gate_count; | 86 | u8 gate_count; |
79 | struct nfc_hci_gate gates[NFC_HCI_MAX_CUSTOM_GATES]; | 87 | struct nfc_hci_gate gates[NFC_HCI_MAX_CUSTOM_GATES]; |
@@ -125,6 +133,7 @@ struct nfc_hci_dev { | |||
125 | void *clientdata; | 133 | void *clientdata; |
126 | 134 | ||
127 | u8 gate2pipe[NFC_HCI_MAX_GATES]; | 135 | u8 gate2pipe[NFC_HCI_MAX_GATES]; |
136 | struct nfc_hci_pipe pipes[NFC_HCI_MAX_PIPES]; | ||
128 | 137 | ||
129 | u8 sw_romlib; | 138 | u8 sw_romlib; |
130 | u8 sw_patch; | 139 | u8 sw_patch; |
@@ -167,6 +176,8 @@ void *nfc_hci_get_clientdata(struct nfc_hci_dev *hdev); | |||
167 | void nfc_hci_driver_failure(struct nfc_hci_dev *hdev, int err); | 176 | void nfc_hci_driver_failure(struct nfc_hci_dev *hdev, int err); |
168 | 177 | ||
169 | int nfc_hci_result_to_errno(u8 result); | 178 | int nfc_hci_result_to_errno(u8 result); |
179 | void nfc_hci_reset_pipes(struct nfc_hci_dev *dev); | ||
180 | void nfc_hci_reset_pipes_per_host(struct nfc_hci_dev *hdev, u8 host); | ||
170 | 181 | ||
171 | /* Host IDs */ | 182 | /* Host IDs */ |
172 | #define NFC_HCI_HOST_CONTROLLER_ID 0x00 | 183 | #define NFC_HCI_HOST_CONTROLLER_ID 0x00 |