11 Mar, 2014
3 commits
-
Add support for ISO/IEC 15693 RF technology and Type 5 tags.
Note that Type 5 tags used to be referred to as Type V tags.CC: Erick Macias
CC: Felipe Balbi
Signed-off-by: Mark A. Greer
Signed-off-by: Samuel Ortiz -
Add support for Type 4A Tags which includes
supporting the underlying ISO/IEC 14443-A
protocol.Signed-off-by: Mark A. Greer
Signed-off-by: Samuel Ortiz -
Add a driver for the Texas Instruments TRF7970a RFID/NFC/15693
transceiver. The driver currently supports ISO/IEC 14443 Type 2
tags only (MIFARE Ultralight and Ultralight C but not Classic).CC: Erick Macias
CC: Felipe Balbi
Signed-off-by: Mark A. Greer
Signed-off-by: Samuel Ortiz
24 Feb, 2014
2 commits
-
Signed-off-by: Axel Lin
Signed-off-by: Samuel Ortiz -
Signed-off-by: Axel Lin
Signed-off-by: Samuel Ortiz
17 Feb, 2014
4 commits
-
This adds support for ISO-DEP protocol over NFC-A rf technology. The
port100 already supports NFC-A and ATS request and response for type 4A
tags are handled at digital level. This patch adds NFC_PROTO_ISO14443
to the supported protocols and an entry for framing configuration which
is the same as NFC-A standard frame with CRC handling.Signed-off-by: Thierry Escande
Signed-off-by: Samuel Ortiz -
The arrays for protocols and rf techs must define a number of entries
corresponding to their maximum possible index values.Reported-by: Dan Carpenter
Signed-off-by: Thierry Escande
Signed-off-by: Samuel Ortiz -
PN544 C3 firmwares already contain the command frames to be sent, but as
they may exceed the i2c maximum payload, we need to fragment them into
secure chunks and send them through the secure write command.Signed-off-by: Arron Wang
Signed-off-by: Samuel Ortiz -
Different pn544 hardware variant may use different commands to download
new firmwares. The C2 does a regular firmware download while the C3 uses
a more secure protocol.
As a consequence we need to pass the hardware variant from the HCI SW
version command reply down to the pn544 i2c layer, in order to use the
right protocol at run time.Signed-off-by: Arron Wang
Signed-off-by: Samuel Ortiz
09 Jan, 2014
1 commit
-
This patch fixes memory leaks in the error paths of
nfcmrvl_nci_register_dev() routine.Reported-by: Dan Carpenter
Signed-off-by: Amitkumar Karwar
Signed-off-by: Bing Zhao
Signed-off-by: Samuel Ortiz
07 Jan, 2014
2 commits
-
Marvell nfc device provides support for external coexistance
control. It allows Device Host to inhibit the NFCC from polling
when required by asserting a GPIO pin. A second pin allows the
DH to have feedback on the current NFCC state.The required configuration for this feature is done in setup
handler.Signed-off-by: Amitkumar Karwar
Signed-off-by: Bing Zhao
Signed-off-by: Samuel Ortiz -
This patch adds NFC support for Marvell 8897 NFC-over-USB chipset.
Signed-off-by: Amitkumar Karwar
Signed-off-by: Bing Zhao
Signed-off-by: Samuel Ortiz
05 Jan, 2014
1 commit
-
port100_probe() calls usb_get_dev(), but there is no usb_put_dev()
in port100_disconnect(). The patch adds one.Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov
Signed-off-by: Samuel Ortiz
04 Jan, 2014
3 commits
-
Some ACR122 firmwares seem to send 0 length data frames. Before using
that length as a data index, we check that it's not 0. If it is we
report the frame as being invalid.Reported-by: Arthur Taylor
Signed-off-by: Samuel Ortiz -
Some of the EEPROM configurations that are assigned by the PN544 driver
are set by the firmware and should not be modified by the driver. Others
are certain user mode configurations that are currently getting set to values
that shouldn't necessarily be dictated by the driver. This patch changes
most user and system mode configurations to the firmware defaults.Signed-off-by: Arman Uguray
Signed-off-by: Samuel Ortiz -
Using kfree_skb() instead of kfree() for struct sk_buff
Signed-off-by: Salil Kapur
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
07 Oct, 2013
4 commits
-
This implements the target NFC digital operations tg_configure_hw(),
tg_listen(), tg_listen_mdaa(), and tg_send_cmd().The target mode supports NFC-A technology at 106kbits/s and NFC-F
technologies at 212 and 424kbits/s.Signed-off-by: Thierry Escande
Cc: Stephen Tiedemann
Tested-by: Cho, Yu-Chen
Signed-off-by: Samuel Ortiz -
This patch implements the initiator NFC operations in_configure_hw()
and in_send_cmd(). It also implements the switch_rf() operation.The initiator mode supports NFC-A technology at 106kbits/s and NFC-F
technologies at 212 and 424kbits/s.Signed-off-by: Thierry Escande
Cc: Stephen Tiedemann
Tested-by: Cho, Yu-Chen
Signed-off-by: Samuel Ortiz -
This patch implements the command handling mechanism. The digital stack
serializes all commands sent to the driver. This means that the digital
stack waits for the reply of the current command before sending a new
one. So there is no command queue managed at driver level.All Port-100 commands are asynchronous. If the command has been sent
successfully to the device, it replies with an ACK frame. Then the
command response is received (or actually no-response in case of
timeout or error) and a command complete work on the system workqueue
is responsible for sending the response (or the error) back to the
digital stack.The digital stack requires some commands to be synchronous, mainly
hardware configuration ones. These commands use the asynchronous
command path but are made synchronous by using a completion object.Signed-off-by: Thierry Escande
Cc: Stephen Tiedemann
Tested-by: Cho, Yu-Chen
Signed-off-by: Samuel Ortiz -
This adds support for the Sony NFC USB dongle RC-S380, based on the
Port-100 chip. This dongle is an analog frontend and does not implement
the digital layer. This driver uses the nfc_digital module which is an
implementation of the NFC Digital Protocol stack.This patch is a skeleton. It only registers the dongle against the NFC
digital protocol stack. All NFC digital operation functions are stubbed
out.Signed-off-by: Thierry Escande
Cc: Stephen Tiedemann
Tested-by: Cho, Yu-Chen
Signed-off-by: Samuel Ortiz
25 Sep, 2013
12 commits
-
In target mode, when we want to send frames larger than the max length
(PN533_CMD_DATAEXCH_DATA_MAXLEN), we have to split the frame in smaller
chunks and send them, using a specific working queue, with the TgSetMetaData
command. TgSetMetaData sets his own MI bit in the PFB.
The last chunk is sent using the TgSetData command.Signed-off-by: Olivier Guiter
Signed-off-by: Samuel Ortiz -
This code processes, for Target Mode, incoming fragmented frames.
If the MI bit is present, we start a working queue to grab and aggregate
all the parts (using TmGetData between each parts). On the last one, as
there's no more MI bit, we jump on the usual behavior.Signed-off-by: Olivier Guiter
Signed-off-by: Samuel Ortiz -
The fragmentation routine (used to split big frames) could be used in
target or initiator mode (TgSetMetaData vs InDataExchange), but the
MI/TG bytes are not needed in target mode (TgSetMetaData), so we
add a check on the modeSigned-off-by: Olivier Guiter
Signed-off-by: Samuel Ortiz -
Local symbols used only in this file are made static.
Signed-off-by: Sachin Kamat
Signed-off-by: Samuel Ortiz -
Driver core sets driver data to NULL upon failure or remove.
Cc: Ilan Elias
Signed-off-by: Sachin Kamat
Signed-off-by: Samuel Ortiz -
If we start the polling loop from a listening cycle, we need to start
the corresponding timer as well.
This bug showed up after commit dfccd0f5 as it was impossible to start
from a listening cycle before it.Signed-off-by: Samuel Ortiz
-
In order to improve active devices detection, we send an ATR_REQ between
each passive detection cycle. Without this algorithm, Android 4.3 based
devices running the Broadcom stack are hardly detected.Signed-off-by: Samuel Ortiz
-
Use standardized styles to minimize coding defects.
Always use nfc_ where feasible.
Add \n to formats where appropriate.
Typo "it it" correction.
Add #define pr_fmt where appropriate.
Remove function tracing logging messages.
Remove OOM messages.Signed-off-by: Joe Perches
Signed-off-by: Samuel Ortiz -
Use a more standard kernel style macro logging name.
Standardize the spacing of the "NFC: " prefix.
Add \n to uses, remove from macro.
Fix the defective uses that already had a \n.Signed-off-by: Joe Perches
Signed-off-by: Samuel Ortiz -
Use the generic kernel function instead of a home-grown
one that does the same thing.Add \n to uses not at the macro. Don't add \n where
the nfc_dev_dbg macro mistakenly had them already.Signed-off-by: Joe Perches
Signed-off-by: Samuel Ortiz -
To enable the UICC secure element, we first enable the UICC gate list in
order for the SE to be able to use all RF technologies.
For the embedded SE, we just turn the eSE default mode to ON.Signed-off-by: Arron Wang
Signed-off-by: Samuel Ortiz -
For the SWP secure element, we send the proprietary SELF_TEST_SWP
command and check the response.
For the WI secure element, we simply try to switch to the default
embedded SE mode. If that works, it means we have an embedded SE.Signed-off-by: Arron Wang
Signed-off-by: Samuel Ortiz
14 Aug, 2013
7 commits
-
The pn544 can enter a firmware update mode where firmware blobs can be
pushed through the i2c line and flashed on the target.
A special command allows to verify that blobs are correctly flashed and
this is what we do for every downloaded firmware blob.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
The firmware operation callback is passed by the physical layer to the
hci driver during probe. All the driver does is to store it and call it
when the fw_upload hci ops is invoked.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
This is in preparation for pn544-i2c firmware download feature, where we
need to know if we're in regular or firmware upload mode.Signed-off-by: Eric Lapuyade
Signed-off-by: Samuel Ortiz -
By not always starting the polling loop from the same modulation, we
avoid entering infinite loops where devices exporting 2 targets (on 2
different modulations) get the same target activated over and over.
If this target is not readable (e.g. a wallet emulating a tag), we will
stay in an error loop for ever.Signed-off-by: Samuel Ortiz
-
It seems that some pn533 firmwares go belly up when being asked to send
poll frames too frequently. Adding a 10ms delay between each of them
calm the chip down and prevent it from crashing.Signed-off-by: Samuel Ortiz
-
The extended information frame are sent by PN533 to exchange frames
larger than 255 bytes. These extended frame are very close from the
standard ones except for the header size length. On each incoming
frame, we set the correct header length, and we do that only for the
standard pn533 chipsets as the acr122 does not seem to support extended
frames properly.Signed-off-by: Olivier Guiter
Signed-off-by: Samuel Ortiz -
On sending large frames (size > 262), we split it in multiple chunks and
send them asynchronously with MI bit.Signed-off-by: Olivier Guiter
Signed-off-by: Samuel Ortiz