diff options
author | Eric Lapuyade <eric.lapuyade@linux.intel.com> | 2012-12-18 17:15:49 +0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-01-10 03:51:51 +0400 |
commit | bf71ab8ba53081c28b960d48e0c4cd1c17588aa6 (patch) | |
tree | fb6444f45ac21850fa5b7bed05fb19a93b4ee313 /net/nfc/hci/command.c | |
parent | 924d4a023ee6da2e40c78578829e68bcbabee2dd (diff) | |
download | linux-bf71ab8ba53081c28b960d48e0c4cd1c17588aa6.tar.xz |
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 'net/nfc/hci/command.c')
-rw-r--r-- | net/nfc/hci/command.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/nfc/hci/command.c b/net/nfc/hci/command.c index 7d99410e6c1a..64f922be9281 100644 --- a/net/nfc/hci/command.c +++ b/net/nfc/hci/command.c @@ -280,14 +280,19 @@ static int nfc_hci_delete_pipe(struct nfc_hci_dev *hdev, u8 pipe) static int nfc_hci_clear_all_pipes(struct nfc_hci_dev *hdev) { u8 param[2]; + size_t param_len = 2; /* TODO: Find out what the identity reference data is * and fill param with it. HCI spec 6.1.3.5 */ pr_debug("\n"); + if (test_bit(NFC_HCI_QUIRK_SHORT_CLEAR, &hdev->quirks)) + param_len = 0; + return nfc_hci_execute_cmd(hdev, NFC_HCI_ADMIN_PIPE, - NFC_HCI_ADM_CLEAR_ALL_PIPE, param, 2, NULL); + NFC_HCI_ADM_CLEAR_ALL_PIPE, param, param_len, + NULL); } int nfc_hci_disconnect_gate(struct nfc_hci_dev *hdev, u8 gate) |