diff options
author | Eric Lapuyade <eric.lapuyade@linux.intel.com> | 2012-12-18 08:15:49 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-01-09 18:51:51 -0500 |
commit | bf71ab8ba53081c28b960d48e0c4cd1c17588aa6 (patch) | |
tree | fb6444f45ac21850fa5b7bed05fb19a93b4ee313 /include/net | |
parent | 924d4a023ee6da2e40c78578829e68bcbabee2dd (diff) |
NFC: Add HCI quirks to support driver (non)standard implementations
Some chips diverge from the HCI spec in their implementation of standard
features. This adds a new quirks parameter to
nfc_hci_allocate_device() to let the driver indicate its divergence.
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/nfc/hci.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h index 834e36481aff..2ff71750c428 100644 --- a/include/net/nfc/hci.h +++ b/include/net/nfc/hci.h | |||
@@ -82,6 +82,16 @@ typedef int (*xmit) (struct sk_buff *skb, void *cb_data); | |||
82 | 82 | ||
83 | #define NFC_HCI_MAX_GATES 256 | 83 | #define NFC_HCI_MAX_GATES 256 |
84 | 84 | ||
85 | /* | ||
86 | * These values can be specified by a driver to indicate it requires some | ||
87 | * adaptation of the HCI standard. | ||
88 | * | ||
89 | * NFC_HCI_QUIRK_SHORT_CLEAR - send HCI_ADM_CLEAR_ALL_PIPE cmd with no params | ||
90 | */ | ||
91 | enum { | ||
92 | NFC_HCI_QUIRK_SHORT_CLEAR = 0, | ||
93 | }; | ||
94 | |||
85 | struct nfc_hci_dev { | 95 | struct nfc_hci_dev { |
86 | struct nfc_dev *ndev; | 96 | struct nfc_dev *ndev; |
87 | 97 | ||
@@ -131,11 +141,14 @@ struct nfc_hci_dev { | |||
131 | 141 | ||
132 | u8 *gb; | 142 | u8 *gb; |
133 | size_t gb_len; | 143 | size_t gb_len; |
144 | |||
145 | unsigned long quirks; | ||
134 | }; | 146 | }; |
135 | 147 | ||
136 | /* hci device allocation */ | 148 | /* hci device allocation */ |
137 | struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops, | 149 | struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops, |
138 | struct nfc_hci_init_data *init_data, | 150 | struct nfc_hci_init_data *init_data, |
151 | unsigned long quirks, | ||
139 | u32 protocols, | 152 | u32 protocols, |
140 | const char *llc_name, | 153 | const char *llc_name, |
141 | int tx_headroom, | 154 | int tx_headroom, |