aboutsummaryrefslogtreecommitdiff
path: root/net/nfc/hci/command.c
AgeCommit message (Collapse)AuthorFilesLines
2015-01-27NFC: hci: Change nfc_hci_send_response gate parameter to pipeChristophe Ricard1-17/+0
As there can be several pipes connected to the same gate, we need to know which pipe ID to use when sending an HCI response. A gate ID is not enough. Instead of changing the nfc_hci_send_response() API to something not aligned with the rest of the HCI API, we call nfc_hci_hcp_message_tx directly. Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2015-01-27NFC: hci: Add pipes table to reference them with a tuple {gate, host}Christophe Ricard1-2/+4
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 <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: hci: Add specific hci macro to not create a pipeChristophe Ricard1-0/+3
Some pipe are only created by other host (different than the Terminal Host). The pipe values will for example be notified by NFC_HCI_ADM_NOTIFY_PIPE_CREATED. Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-04-22NFC: hci: Extend command execution delayChristophe Ricard1-2/+4
Extend it up to the maximum FWI value 4949 ms defined by the ISO14443-3 specification. Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-12-11nfc: Fix FSF address in file headersJeff Kirsher1-3/+1
Several files refer to an old address for the Free Software Foundation in the file header comment. Resolve by replacing the address with the URL <http://www.gnu.org/licenses/> so that we do not have to keep updating the header comments anytime the address changes. CC: [email protected] CC: Lauro Ramos Venancio <[email protected]> CC: Aloisio Almeida Jr <[email protected]> CC: Samuel Ortiz <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-01-10NFC: Add HCI quirks to support driver (non)standard implementationsEric Lapuyade1-1/+6
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 <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-11-19NFC: Fix hci_connect_gate() when a pre-opened pipe is passedEric Lapuyade1-2/+2
In some cases, pre-opened pipes don't stay open when a clear all pipes command is sent. They stay created however. Therefore, one can never assume that such a pipe is already open. As re-opening a pipe seems not to be a problem, we do that now. Signed-off-by: Eric Lapuyade <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-10-26NFC: Fix not propagating return code in nfc_hci_clear_all_pipesSzymon Janc1-6/+2
Return code from nfc_hci_execute_cmd was not propagated to caller. Signed-off-by: Szymon Janc <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-10-26NFC: Small nfc_hci_create_pipe refactoringSzymon Janc1-8/+8
Check for error and return if any. This makes it easier to see what is a 'positive' function flow. Signed-off-by: Szymon Janc <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-09-25NFC: Add a public nfc_hci_send_cmd_async methodEric Lapuyade1-1/+33
This method initiates execution of an HCI cmd. Result will be delivered through an asynchronous callback. Signed-off-by: Eric Lapuyade <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-09-25NFC: Changed the HCI cmd execution callback prototypeEric Lapuyade1-3/+8
Make it match the data_exchange_cb_t so that it can be used directly in the implementation of an asynchronous hci_transceive Signed-off-by: Eric Lapuyade <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-07-09NFC: Allow HCI driver to pre-open pipes to some gatesEric Lapuyade1-2/+6
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 <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-07-09NFC: Changed HCI cmd execution completion result to std linux errnoEric Lapuyade1-15/+3
An HCI command can complete either from an HCI response (with an HCI result) or as a consequence of any other system error during processing. The completion therefore needs to take a standard errno code. The HCI response will convert its result to a standard errno before calling the completion. Signed-off-by: Eric Lapuyade <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-04-12NFC: HCI supportEric Lapuyade1-0/+354
This is an implementation of ETSI TS 102 622 specification. Many NFC chipsets use HCI as the host <-> target protocol on top of a serial link like i2c. Signed-off-by: Eric Lapuyade <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>