27 Oct, 2015
2 commits
-
Add support for proprietary commands useful mainly
for factory testings.Here is a list:
- FACTORY_MODE: Allow to set the driver into a mode where no
secure element are activated. It does not consider any
NFC_ATTR_VENDOR_DATA.
- HCI_CLEAR_ALL_PIPES: Allow to execute a HCI clear all pipes
command. It does not consider any NFC_ATTR_VENDOR_DATA.
- HCI_DM_PUT_DATA: Allow to configure specific CLF registry as
for example RF trimmings or low level drivers configurations
(I2C, SPI, SWP).
- HCI_DM_UPDATE_AID: Allow to configure an AID routing into the
CLF routing table following RF technology, CLF mode or protocol.
- HCI_DM_GET_INFO: Allow to retrieve CLF information.
- HCI_DM_GET_DATA: Allow to retrieve CLF configurable data such as
low level drivers configurations or RF trimmings.
- HCI_DM_LOAD: Allow to load a firmware into the CLF. A complete
packet can be more than 8KB.
- HCI_DM_RESET: Allow to run a CLF reset in order to "commit" CLF
configuration changes without CLF power off.
- HCI_GET_PARAM: Allow to retrieve an HCI CLF parameter (for example
the white list).
- HCI_DM_FIELD_GENERATOR: Allow to generate different kind of RF
technology. When using this command to anti-collision is done.
- HCI_LOOPBACK: Allow to echo a command and test the Dh to CLF
connectivity.Signed-off-by: Christophe Ricard
Signed-off-by: Samuel Ortiz -
In order to manage in a better way the nci poll mode state machine,
add mode parameter to deactivate_target functions.
This way we can manage different target state.
mode parameter make sense only in nci core.Signed-off-by: Christophe Ricard
Signed-off-by: Samuel Ortiz
28 Jan, 2015
6 commits
-
With the newly introduced pipes table hci_dev fields,
the nfc_hci_pipe2gate routine is no longer needed.Signed-off-by: Christophe Ricard
Signed-off-by: Samuel Ortiz -
When a command is received, it is sometime needed to let the CLF driver do
some additional operations. (ex: count remaining pipe notification...)Signed-off-by: Christophe Ricard
Signed-off-by: Samuel Ortiz -
We update the tracked pipes status when receiving HCI commands.
Also we forward HCI errors and we reply to any HCI command, even though
we don't support it.Signed-off-by: Christophe Ricard
Signed-off-by: Samuel Ortiz -
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
Signed-off-by: Samuel Ortiz -
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
Signed-off-by: Samuel Ortiz -
Several pipes may point to the same CLF gate, so getting the gate ID
as an input is not enough.
For example dual secure element may have 2 pipes (1 for uicc and
1 for eSE) pointing to the connectivity gate.As resolving gate and host IDs can be done from a pipe, we now pass
the pipe ID to the event received handler.Signed-off-by: Christophe Ricard
Signed-off-by: Samuel Ortiz
03 Dec, 2014
1 commit
-
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
Signed-off-by: Samuel Ortiz
02 Dec, 2014
3 commits
-
When switching from UICC to another, the CLF may signals to the Terminal
Host that some existing pipe are cleared for future update.This notification needs to be "acked" by the Terminal Host with a ANY_OK
message.Signed-off-by: Christophe Ricard
Signed-off-by: Samuel Ortiz -
If our terminal connect with other host like UICC, it may create
a pipe with us, the host controller will notify us new pipe
created, after that UICC will open that pipe, if we don't handle
that request, UICC may failed to continue initialize which may
lead to card emulation feature failed to workSigned-off-by: Arron Wang
Signed-off-by: Christophe Ricard
Signed-off-by: Samuel Ortiz -
se_io allows to send apdu over the CLF to the embedded Secure Element.
Signed-off-by: Christophe Ricard
Signed-off-by: Samuel Ortiz
23 Jul, 2014
1 commit
-
stop_poll allows to stop CLF reader polling. Some other operations might be
necessary for some CLF to stop polling. For example in card mode.Signed-off-by: Christophe Ricard
Signed-off-by: Samuel Ortiz
22 Apr, 2014
3 commits
-
Fixing "sparse: cast to restricted __be16" message when building with
make C=1 CF=-D__CHECK_ENDIAN__Signed-off-by: Christophe Ricard
Signed-off-by: Samuel Ortiz -
load_session allows a CLF to restore the gate pipe table from some
proprietary location.
The main advantage to add this function is to reduce the memory wear by
running pipe creation (and storing) only once.Signed-off-by: Christophe Ricard
Signed-off-by: Samuel Ortiz -
Extend it up to the maximum FWI value 4949 ms defined by the
ISO14443-3 specification.Signed-off-by: Christophe Ricard
Signed-off-by: Samuel Ortiz
24 Feb, 2014
1 commit
-
Signed-off-by: Axel Lin
Signed-off-by: Samuel Ortiz
18 Jan, 2014
1 commit
-
…wireless-next into for-davem
15 Jan, 2014
1 commit
-
Signed-off-by: Geert Uytterhoeven
Signed-off-by: David S. Miller
04 Jan, 2014
1 commit
-
If the device is polling, this will trigger a netlink event to notify
userspace about the polling error.Signed-off-by: Samuel Ortiz
11 Dec, 2013
1 commit
-
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 so that we do not have to keep
updating the header comments anytime the address changes.CC: linux-wireless@vger.kernel.org
CC: Lauro Ramos Venancio
CC: Aloisio Almeida Jr
CC: Samuel Ortiz
Signed-off-by: Jeff Kirsher
Signed-off-by: John W. Linville
14 Aug, 2013
1 commit
-
There is a cut and paste bug so we enable a second time instead of
disabling.Signed-off-by: Dan Carpenter
Signed-off-by: Samuel Ortiz
31 Jul, 2013
1 commit
-
Loading a firmware into a target is typically called firmware
download, not firmware upload. So we rename the netlink API to
NFC_CMD_FW_DOWNLOAD in order to avoid any terminology confusion from
userspace.Signed-off-by: Samuel Ortiz
14 Jun, 2013
4 commits
-
Secure elements need to be discovered after enabling the NFC controller.
This is typically done by the NCI core and the HCI drivers (HCI does not
specify how to discover SEs, it is left to the specific drivers).
Also, the SE enable/disable API explicitely takes a SE index as its
argument.Signed-off-by: Samuel Ortiz
-
Supported secure elements are typically found during a discovery process
initiated when the NFC controller is up and running. For a given NFC
chipset there can be many configurations (embedded SE or not, with or
without a SIM card wired to the NFC controller SWP interface, etc...) and
thus driver code will never know before hand which SEs are available.
So we remove this field, it will be replaced by a real SE discovery
mechanism.Signed-off-by: Samuel Ortiz
-
Exiting on the error case is more typical to the kernel coding style.
Signed-off-by: Samuel Ortiz
-
This is a simple forward to the HCI driver. When driver is done with the
operation, it shall directly notify NFC Core by calling
nfc_fw_upload_done().Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz
10 Jan, 2013
6 commits
-
Each NFC adapter can have several links to different secure elements and
that property needs to be exported by the drivers.
A secure element link can be enabled and disabled, and card emulation will
be handled by the currently active one. Otherwise card emulation will be
host implemented.Signed-off-by: Samuel Ortiz
-
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
Signed-off-by: Samuel Ortiz -
Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
Some chips use a standard HCI event code, destined to a proprietary
gate, with a different meaning. Therefore, the HCI driver must always
have a chance to intercept the event before standard processing is
attempted.
The new semantic specifies that the result value "1" means that the
driver doesn't especially handle the event. result
Signed-off-by: Samuel Ortiz -
There is no use to return an error if the caller doesn't get it.
Signed-off-by: Samuel Ortiz
-
When an adapter is removed, it will unregister itself from hci and/or
nfc core. In order to do that safely, work tasks must first be canceled
and prevented to be scheduled again, before the hci or nfc device can be
destroyed.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz
20 Nov, 2012
5 commits
-
Some HCI drivers will need it.
Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
A chip with pre-opened gates may send events on a gate that nobody
has opened in the handset host. Discard those events.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
NFC_HCI_ID_MGMT_VERSION_SW and NFC_HCI_ID_MGMT_VERSION_HW are optional
registers for gate NFC_HCI_ID_MGMT_GATE in standard HCI. When chip
doesn't implement, just leave all the information as zeros.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
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
Signed-off-by: Samuel Ortiz
27 Oct, 2012
2 commits
-
Signed-off-by: Szymon Janc
Signed-off-by: Samuel Ortiz -
Signed-off-by: Arron Wang
Signed-off-by: Samuel Ortiz