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
---
include/net/nfc/nfc.h | 2 +-
net/nfc/core.c
Add a minor code style fixes
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/core.c | 2 --
drivers/nfc/st21nfca/i2c.c | 1 +
drivers/nfc/st21nfca/se.c | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/nfc/st21nfca/core.c b
Potentially an unexpected HCI event may occur because of a firmware bug.
It could be transparent for the user but at least log this.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/core.c | 2 ++
drivers/nfc/st21nfca/dep.c | 1 +
drivers/nfc/st21nfca/se.c | 4
3 files changed
Remove SPI_DUMP_SKB and I2C_DUMP_SKB as skb is already dumped in ndlc
layer.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/i2c.c | 11 ---
drivers/nfc/st-nci/spi.c | 11 ---
2 files changed, 22 deletions(-)
diff --git a/drivers/nfc/st-nci
-collision is done.
- HCI_LOOPBACK: Allow to echo a command and test the Dh to CLF
connectivity.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/Makefile | 2 +-
drivers/nfc/st21nfca/core.c| 3 +
drivers/nfc/st21nfca/se.c | 4 +-
drivers/nfc/st21nfca/st21nfca.
A secure element can be activated in different order. The host_list is
updated keeping a fixed order: .
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/se.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/nfc/st21nfca/se.c
A secure element can be activated in different order. The host_list is
updated keeping a fixed order: .
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/nfc/st-nci/se.c b
Add some few code style fixes.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/i2c.c | 2 +-
drivers/nfc/st-nci/se.c | 2 +-
net/nfc/nci/hci.c| 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc
Upon some conditions (timing, CLF errors, platform errors...), the irq might
be already active when powering the device.
Add irq_active variable as a guard to avoid kernel warning message
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/i2c.c | 8 +++-
drivers/nfc/st-nci/spi.c | 8
Replace 1 missing st21nfcb by st_nci
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/st-nci/Makefile b/drivers/nfc/st-nci/Makefile
index ea40ace..439b2fa 100644
--- a/drivers/nfc/st-nci/Makefile
NFC_HCI_LINK_MGMT_PIPE was never open in nfc_hci_load_session.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/core.c | 19 +--
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca
It is useless to start from index 0 when looking for a gate because only
dynamic pipes are retrieved with
ST21NFCA_DM_GETINFO(ST21NFCA_DM_GETINFO_PIPE_LIST).
The first dynamic pipe is present at index 3.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca
NFC_CMD_ACTIVATE_TARGET and NFC_ATTR_SE_PARAMS comments are missing.
Signed-off-by: Christophe Ricard
---
include/uapi/linux/nfc.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h
index dd3f753..399f39f 100644
--- a/include/uapi/linux
When initializing ndev->hci_dev->init_data, only gates field was set.
gate_count needs to be initialized as well.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nfc/st-nci/se.c b/drivers/
After internal discussion, it appears this timing should be increase to
20 ms for interoperability reason.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c
index
It is useless to start from index 0 when looking for a gate because only
dynamic pipes are retrieved with ST_NCI_DM_GETINFO(ST_NCI_DM_GETINFO_PIPE_LIST).
The first dynamic pipe is present at index 3.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 2
: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/core.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca/core.c
index 819a94a..b4451f8 100644
--- a/drivers/nfc/st21nfca/core.c
+++ b
NCI_HCI_IDENTITY_MGMT_GATE might be useful to get information for example
about hardware or firmware version.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c| 3 +++
include/net/nfc/nci_core.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/nfc/st-nci/se.c b
Potentially an unexpected HCI event may occur because of a firmware bug.
It could be transparent for the user but at least log this.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st
a
received during a NCI_CORE_INIT_CMD.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/Makefile | 2 +-
drivers/nfc/st-nci/core.c| 13 +-
drivers/nfc/st-nci/se.c | 29 ++-
drivers/nfc/st-nci/st-nci.h | 68 ++
drivers/nfc/st-nci/vendor_cm
...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c
index 3522165..df2dc54 100644
--- a/drivers/nfc/st-nci/se.c
+++ b/drivers/nfc/st-nci/se.c
: Christophe Ricard
---
.../devicetree/bindings/net/nfc/st-nci-i2c.txt | 7 ++
.../devicetree/bindings/net/nfc/st-nci-spi.txt | 9 +-
drivers/nfc/st-nci/core.c | 4 +-
drivers/nfc/st-nci/i2c.c | 12 ++-
drivers/nfc/st-nci/ndlc.c
ndev->hci_dev->init_data.gates is already initialized in st_nci_hci_network.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c
index 4acb945..3
When session_id is filled to ff, the pipe configuration is probably
incorrect.
Signed-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 4
1 file changed, 4 insertions(+)
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index 43d7931..a937bc6 100644
--- a/net/nfc/nci/hci.c
+++ b/net/nfc
lude "st21nfca_vendor_cmds.h" in vendor_cmds as this one does not
exist.
v2:
- Propose a more elegant way to switch between NFC target mode (SLEEP, IDLE).
- Remove st21nfca_ and st-nci_ file name prefix.
- Merge st21nfca_xxx.h headers into st21nfca.h. Same for st-nci_xxx.h
Best Regards
Christophe
Christo
nci_hci_clear_all_pipes might be use full in some cases for example after
a firmware update.
Signed-off-by: Christophe Ricard
---
include/net/nfc/nci_core.h | 1 +
net/nfc/nci/hci.c | 15 +++
2 files changed, 16 insertions(+)
diff --git a/include/net/nfc/nci_core.h b
Align st21nfca driver with or nfc driver:
- Remove st21nfca_ prefix
- Merge st21nfca_se.h, st21nfca_dep.h in st21nfca.h
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/Makefile |2 +-
drivers/nfc/st21nfca/core.c | 1062 ++
drivers/nfc
When receiving data in nci_hci_msg_rx_work, extract pipe value using
NCI_HCP_MSG_GET_PIPE macro.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index
When sending data over SPI, the maximum expected length is the maximum
nci packet payload + data header size + the frame head room (1 for the
ndlc header) + the frame trail room (0).
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/spi.c | 4 +++-
1 file
st-nci.h already include ndlc.h.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/i2c.c | 2 +-
drivers/nfc/st-nci/ndlc.c | 1 -
drivers/nfc/st-nci/spi.c | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc/st-nci/i2c.c
index
-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 55 ++-
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index a937bc6..1d6aa5d 100644
--- a/net/nfc/nci/hci.c
+++ b/net/nfc/nci/hci.c
@@ -79,6
value.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 60 ---
1 file changed, 44 insertions(+), 16 deletions(-)
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index bc6b9d5..73afb47 100644
--- a/net/nfc
When sending HCI data over NCI, cmd information should be present only on
the first packet. Each packet shall be specifically allocated and sent to
the NCI layer.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 19 ---
1 file changed, 12
NCI_HCI_LINK_MGMT_PIPE was never open in st_nci_hci_load_session.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c
index 3ffac0e..3522165 100644
--- a/drivers/nfc/st-nci
hdev->init_data.gates is already initialized in st21nfca_hci_probe.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca/core.c
index 42f1974..67d1
Align st-nci driver with or nfc driver:
- Remove st-nci_ prefix
- Merge se.h in st-nci.h
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/core.c | 1 -
drivers/nfc/st-nci/se.c | 1 -
drivers/nfc/st-nci/se.h | 61 -
drivers/nfc/st
, Samuel Ortiz wrote:
Hi Christophe,
On Sun, Oct 25, 2015 at 10:54:15PM +0100, Christophe Ricard wrote:
Hi Samuel,
Please find in the following patchset severals fixes as well as vendor_cmds
support
for st21nfca and st-nci.
vendor_cmds includes production test, trimmings & firmware update comm
After internal discussion, it appears this timing should be increase to
20 ms for interoperability reason.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c
index
Potentially an unexpected HCI event may occur because of a firmware bug.
It could be transparent for the user but at least log this.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st
NFC_CMD_ACTIVATE_TARGET and NFC_ATTR_SE_PARAMS comments are missing.
Signed-off-by: Christophe Ricard
---
include/uapi/linux/nfc.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h
index dd3f753..399f39f 100644
--- a/include/uapi/linux
A secure element can be activated in different order. The host_list is
updated keeping a fixed order: .
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/nfc/st-nci/se.c b
A secure element can be activated in different order. The host_list is
updated keeping a fixed order: .
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/se.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/nfc/st21nfca/se.c
Replace 1 missing st21nfcb by st_nci
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/st-nci/Makefile b/drivers/nfc/st-nci/Makefile
index ea40ace..439b2fa 100644
--- a/drivers/nfc/st-nci/Makefile
: Christophe Ricard
---
.../devicetree/bindings/net/nfc/st-nci-i2c.txt | 7 ++
.../devicetree/bindings/net/nfc/st-nci-spi.txt | 9 +-
drivers/nfc/st-nci/core.c | 4 +-
drivers/nfc/st-nci/i2c.c | 12 ++-
drivers/nfc/st-nci/ndlc.c
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
---
include/net/nfc/nfc.h | 2 +-
net/nfc/core.c
value.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 60 ---
1 file changed, 44 insertions(+), 16 deletions(-)
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index bc6b9d5..73afb47 100644
--- a/net/nfc
When initializing ndev->hci_dev->init_data, only gates field was set.
gate_count needs to be initialized as well.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nfc/st-nci/se.c b/drivers/
Add a minor code style fixes
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/core.c | 2 --
drivers/nfc/st21nfca/i2c.c | 1 +
drivers/nfc/st21nfca/se.c | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/nfc/st21nfca/core.c b
Potentially an unexpected HCI event may occur because of a firmware bug.
It could be transparent for the user but at least log this.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/core.c | 2 ++
drivers/nfc/st21nfca/dep.c | 1 +
drivers/nfc/st21nfca/se.c | 4
3 files changed
-collision is done.
- HCI_LOOPBACK: Allow to echo a command and test the Dh to CLF
connectivity.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/Makefile | 2 +-
drivers/nfc/st21nfca/core.c| 3 +
drivers/nfc/st21nfca/se.c | 4 +-
drivers/nfc/st21nfca/st21nfca.
...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c
index 3522165..df2dc54 100644
--- a/drivers/nfc/st-nci/se.c
+++ b/drivers/nfc/st-nci/se.c
Remove SPI_DUMP_SKB and I2C_DUMP_SKB as skb is already dumped in ndlc
layer.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/i2c.c | 11 ---
drivers/nfc/st-nci/spi.c | 11 ---
2 files changed, 22 deletions(-)
diff --git a/drivers/nfc/st-nci
When sending HCI data over NCI, cmd information should be present only on
the first packet. Each packet shall be specifically allocated and sent to
the NCI layer.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 19 ---
1 file changed, 12
Add some few code style fixes.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/i2c.c | 2 +-
drivers/nfc/st-nci/se.c | 2 +-
net/nfc/nci/hci.c| 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc
When sending data over SPI, the maximum expected length is the maximum
nci packet payload + data header size + the frame head room (1 for the
ndlc header) + the frame trail room (0).
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/spi.c | 4 +++-
1 file
: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/core.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca/core.c
index 819a94a..b4451f8 100644
--- a/drivers/nfc/st21nfca/core.c
+++ b
Upon some conditions (timing, CLF errors, platform errors...), the irq might
be already active when powering the device.
Add irq_active variable as a guard to avoid kernel warning message
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/i2c.c | 8 +++-
drivers/nfc/st-nci/spi.c | 8
NFC_HCI_LINK_MGMT_PIPE was never open in nfc_hci_load_session.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/core.c | 19 +--
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca
It is useless to start from index 0 when looking for a gate because only
dynamic pipes are retrieved with
ST21NFCA_DM_GETINFO(ST21NFCA_DM_GETINFO_PIPE_LIST).
The first dynamic pipe is present at index 3.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca
st-nci.h already include ndlc.h.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/i2c.c | 2 +-
drivers/nfc/st-nci/ndlc.c | 1 -
drivers/nfc/st-nci/spi.c | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc/st-nci/i2c.c
index
Align st21nfca driver with or nfc driver:
- Remove st21nfca_ prefix
- Merge st21nfca_se.h, st21nfca_dep.h in st21nfca.h
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/Makefile |2 +-
drivers/nfc/st21nfca/core.c | 1062 ++
drivers/nfc
When receiving data in nci_hci_msg_rx_work, extract pipe value using
NCI_HCP_MSG_GET_PIPE macro.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index
hdev->init_data.gates is already initialized in st21nfca_hci_probe.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/nfc/st21nfca/core.c b/drivers/nfc/st21nfca/core.c
index 42f1974..67d1
It is useless to start from index 0 when looking for a gate because only
dynamic pipes are retrieved with ST_NCI_DM_GETINFO(ST_NCI_DM_GETINFO_PIPE_LIST).
The first dynamic pipe is present at index 3.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 2
When session_id is filled to ff, the pipe configuration is probably
incorrect.
Signed-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 4
1 file changed, 4 insertions(+)
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index 43d7931..a937bc6 100644
--- a/net/nfc/nci/hci.c
+++ b/net/nfc
NCI_HCI_IDENTITY_MGMT_GATE might be useful to get information for example
about hardware or firmware version.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c| 3 +++
include/net/nfc/nci_core.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/nfc/st-nci/se.c b
nci_hci_clear_all_pipes might be use full in some cases for example after
a firmware update.
Signed-off-by: Christophe Ricard
---
include/net/nfc/nci_core.h | 1 +
net/nfc/nci/hci.c | 15 +++
2 files changed, 16 insertions(+)
diff --git a/include/net/nfc/nci_core.h b
NCI_HCI_LINK_MGMT_PIPE was never open in st_nci_hci_load_session.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c
index 3ffac0e..3522165 100644
--- a/drivers/nfc/st-nci
ndev->hci_dev->init_data.gates is already initialized in st_nci_hci_network.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/se.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c
index 4acb945..3
-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 55 ++-
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index a937bc6..1d6aa5d 100644
--- a/net/nfc/nci/hci.c
+++ b/net/nfc/nci/hci.c
@@ -79,6
a
received during a NCI_CORE_INIT_CMD.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/Makefile | 2 +-
drivers/nfc/st-nci/core.c| 13 +-
drivers/nfc/st-nci/se.c | 29 ++-
drivers/nfc/st-nci/st-nci.h | 68 ++
drivers/nfc/st-nci/vendor_cm
Align st-nci driver with or nfc driver:
- Remove st-nci_ prefix
- Merge se.h in st-nci.h
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/core.c | 1 -
drivers/nfc/st-nci/se.c | 1 -
drivers/nfc/st-nci/se.h | 61 -
drivers/nfc/st
move st21nfca_ and st-nci_ file name prefix.
- Merge st21nfca_xxx.h headers into st21nfca.h. Same for st-nci_xxx.h
Best Regards
Christophe
Christophe Ricard (35):
nfc: st-nci: Align st-nci driver with other nfc driver
nfc: st-nci: include st-nci.h instead of ndlc.h
nfc: st21nfca: Align st21nfca dr
right considering a system should not be locked because of a
buggy NFC controller.
Also an error message will be enough to notify a potential bug...
I will apply your remark where possible.
Sorry for that.
Best Regards
Christophe
On 24/10/2015 14:19, Christophe Ricard wrote:
Hi Samuel,
On 24/1
Hi Samuel,
On 24/10/2015 08:48, Samuel Ortiz wrote:
Hi Christophe,
Just a couple of nitpicks:
On Tue, Oct 20, 2015 at 11:48:09PM +0200, Christophe Ricard wrote:
diff --git a/drivers/nfc/st-nci/Makefile b/drivers/nfc/st-nci/Makefile
index 348ce76..60e569b 100644
--- a/drivers/nfc/st-nci
When sending HCI data over NCI, cmd information should be present only on
the first packet. Each packet shall be specifically allocated and sent to
the NCI layer.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 19 ---
1 file changed, 12
When sending data over SPI, the maximum expected length is the maximum
nci packet payload + data header size + the frame head room (1 for the
ndlc header) + the frame trail room (0).
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/spi.c | 4 +++-
1 file
Hi Samuel,
Please find in the following patchset severals fixes as well as vendor_cmds
support
for st21nfca and st-nci.
vendor_cmds includes production test, trimmings & firmware update commands.
Best Regards
Christophe
Christophe Ricard (30):
nfc: st-nci: Fix incorrect spi buffer size
value.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 60 ---
1 file changed, 44 insertions(+), 16 deletions(-)
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index bc6b9d5..73afb47 100644
--- a/net/nfc
ndev->hci_dev->init_data.gates is already initialized in st_nci_hci_network.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/st-nci_se.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/nfc/st-nci/st-nci_se.c b/drivers/nfc/st-nci/st-nci_se.c
NCI_HCI_LINK_MGMT_PIPE was never open in st_nci_hci_load_session.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/st-nci_se.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/nfc/st-nci/st-nci_se.c b/drivers/nfc/st-nci/st-nci_se.c
index 15fb0bb..3ea5384 100644
--- a
...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/st-nci_se.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/nfc/st-nci/st-nci_se.c b/drivers/nfc/st-nci/st-nci_se.c
index 3ea5384..2a475ce 100644
--- a/drivers/nfc/st-nci/st-nci_se.c
hdev->init_data.gates is already initialized in st21nfca_hci_probe.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/st21nfca.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/nfc/st21nfca/st21nfca.c b/drivers/nfc/st21nfca/st21nfca.c
index 0512
Add a minor code style fixes
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/i2c.c | 1 +
drivers/nfc/st21nfca/st21nfca.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index
Replace 1 missing st21nfcb by st_nci
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/st-nci/Makefile b/drivers/nfc/st-nci/Makefile
index 60e569b..bd74c60 100644
--- a/drivers/nfc/st-nci/Makefile
NFC_HCI_LINK_MGMT_PIPE was never open in nfc_hci_load_session.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/st21nfca.c | 19 +--
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/nfc/st21nfca/st21nfca.c b/drivers/nfc
Remove SPI_DUMP_SKB and I2C_DUMP_SKB as skb is already dumped in ndlc
layer.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/i2c.c | 11 ---
drivers/nfc/st-nci/spi.c | 11 ---
2 files changed, 22 deletions(-)
diff --git a/drivers/nfc/st-nci
nci_hci_clear_all_pipes might be use full in some cases for example after
a firmware update.
Signed-off-by: Christophe Ricard
---
include/net/nfc/nci_core.h | 1 +
net/nfc/nci/hci.c | 15 +++
2 files changed, 16 insertions(+)
diff --git a/include/net/nfc/nci_core.h b
When receiving data in nci_hci_msg_rx_work, extract pipe value using
NCI_HCP_MSG_GET_PIPE macro.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index
Upon some conditions (timing, CLF errors, platform errors...), the irq might
be already active when powering the device.
Add irq_active variable as a guard to avoid kernel warning message
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/i2c.c | 8 +++-
drivers/nfc/st-nci/spi.c | 8
Add some few code style fixes.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/i2c.c | 2 +-
drivers/nfc/st-nci/st-nci_se.c | 2 +-
net/nfc/nci/hci.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/nfc/st-nci
In order to manage in a better way the nci poll mode state machine, add
a suspend_target handler. In this way the netlink nfc_genl_activate_target
rely on a new function nfc_reactivate_target calling suspend_target handler
if available (only in nci core).
Signed-off-by: Christophe Ricard
-collision is done.
- HCI_LOOPBACK: Allow to echo a command and test the Dh to CLF
connectivity.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca/Makefile | 2 +-
drivers/nfc/st21nfca/st21nfca.c | 4 +
drivers/nfc/st21nfca/st21nfca.h | 4 +-
d
-off-by: Christophe Ricard
---
net/nfc/nci/hci.c | 55 ++-
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index 1b83219..5212ef2 100644
--- a/net/nfc/nci/hci.c
+++ b/net/nfc/nci/hci.c
@@ -79,6
A secure element can be activated in different order. The host_list is
updated keeping a fixed order: .
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/st-nci_se.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/nfc/st-nci/st
NCI_HCI_IDENTITY_MGMT_GATE might be useful to get information for example
about hardware or firmware version.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/st-nci_se.c | 3 +++
include/net/nfc/nci_core.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/nfc/st-nci/st
a
received during a NCI_CORE_INIT_CMD.
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/Makefile | 2 +-
drivers/nfc/st-nci/core.c | 14 +-
drivers/nfc/st-nci/st-nci.h | 4 +
drivers/nfc/st-nci/st-nci_se.c | 30 +-
drivers/nfc
It is useless to start from index 0 when looking for a gate because only
dynamic pipes are retrieved with ST_NCI_DM_GETINFO(ST_NCI_DM_GETINFO_PIPE_LIST).
The first dynamic pipe is present at index 3.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st-nci/st-nci_se.c
It is useless to start from index 0 when looking for a gate because only
dynamic pipes are retrieved with
ST21NFCA_DM_GETINFO(ST21NFCA_DM_GETINFO_PIPE_LIST).
The first dynamic pipe is present at index 3.
Cc: sta...@vger.kernel.org
Signed-off-by: Christophe Ricard
---
drivers/nfc/st21nfca
several trials on commercial and qualified firmware it appears that
nci_nfcee_mode_set(ENABLE) and nci_nfcee_mode_set(DISABLE) are properly
supported.
Such feature also help us to eventually save some time (~5ms) if only
one secure element is connected.
Signed-off-by: Christophe Ricard
1 - 100 of 463 matches
Mail list logo