<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/net/nfc/digital.h, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-07-25T08:21:21+00:00</updated>
<entry>
<title>nfc: constify nfc_digital_ops</title>
<updated>2021-07-25T08:21:21+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@canonical.com</email>
</author>
<published>2021-07-24T21:49:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7186aac9c22de855220ebc54df7af399647bd1fc'/>
<id>urn:sha1:7186aac9c22de855220ebc54df7af399647bd1fc</id>
<content type='text'>
Neither the core nor the drivers modify the passed pointer to struct
nfc_digital_ops, so make it a pointer to const for correctness and safety.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@canonical.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288</title>
<updated>2019-06-05T15:36:37+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-29T14:18:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2025cf9e193de05b0654570dd639acb49ebd3adf'/>
<id>urn:sha1:2025cf9e193de05b0654570dd639acb49ebd3adf</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms and conditions of the gnu general public license
  version 2 as published by the free software foundation this program
  is distributed in the hope it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 263 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141901.208660670@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>NFC: digital: Add support for NFC DEP Response Waiting Time</title>
<updated>2016-07-11T00:01:14+00:00</updated>
<author>
<name>Thierry Escande</name>
<email>thierry.escande@collabora.com</email>
</author>
<published>2016-07-08T13:52:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a09c56f545c8ff8d338a38c7c40d79f4165a94c'/>
<id>urn:sha1:1a09c56f545c8ff8d338a38c7c40d79f4165a94c</id>
<content type='text'>
When sending an ATR_REQ, the initiator must wait for the ATR_RES at
least 'RWT(nfcdep,activation) + dRWT(nfcdep)' and no more than
'RWT(nfcdep,activation) + dRWT(nfcdep) + dT(nfcdep,initiator)'. This
gives a timeout value between 1237 ms and 1337 ms. This patch defines
DIGITAL_ATR_RES_RWT to 1337 used for the timeout value of ATR_REQ
command.

For other DEP PDUs, the initiator must wait between 'RWT + dRWT(nfcdep)'
and 'RWT + dRWT(nfcdep) + dT(nfcdep,initiator)' where RWT is given by
the following formula: '(256 * 16 / f(c)) * 2^wt' where wt is the value
of the TO field in the ATR_RES response and is in the range between 0
and 14. This patch declares a mapping table for wt values and gives RWT
max values between 100 ms and 5049 ms.

This patch also defines DIGITAL_ATR_RES_TO_WT, the maximum wt value in
target mode, to 8.

Signed-off-by: Thierry Escande &lt;thierry.escande@collabora.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: digital: Fix handling of saved PDU sk_buff pointers</title>
<updated>2016-07-10T23:55:42+00:00</updated>
<author>
<name>Thierry Escande</name>
<email>thierry.escande@collabora.com</email>
</author>
<published>2016-07-08T13:52:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1d984c2e03c1fb21539a9f50627e312788512013'/>
<id>urn:sha1:1d984c2e03c1fb21539a9f50627e312788512013</id>
<content type='text'>
This patch fixes the way an I-PDU is saved in case it needs to be sent
again. It is now copied using pskb_copy() and not simply referenced
using skb_get() since it could be modified by the driver.

digital_in_send_saved_skb() and digital_tg_send_saved_skb() still get a
reference on the saved skb which is re-sent but release it if the send
operation fails. That way the caller doesn't have to take care about skb
ref in case of error.

RTOX supervisor PDU must not be saved as this can override a previously
saved I-PDU that should be re-sent later on.

Signed-off-by: Thierry Escande &lt;thierry.escande@collabora.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: digital: Add a delay between poll cycles</title>
<updated>2016-07-04T10:26:27+00:00</updated>
<author>
<name>Thierry Escande</name>
<email>thierry.escande@collabora.com</email>
</author>
<published>2016-06-07T14:21:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7854a44526de84142e367f08288c9f3a33c4c8ee'/>
<id>urn:sha1:7854a44526de84142e367f08288c9f3a33c4c8ee</id>
<content type='text'>
This replaces the polling work struct with a delayed work struct and add
a 10 ms delay between 2 poll cycles. This avoids to flood the device
with 'switch off'/'switch on' commands.

Signed-off-by: Thierry Escande &lt;thierry.escande@collabora.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: digital: Add NFC-DEP Initiator-side ATN Support</title>
<updated>2014-11-28T11:39:55+00:00</updated>
<author>
<name>Mark A. Greer</name>
<email>mgreer@animalcreek.com</email>
</author>
<published>2014-09-23T23:38:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=384ab1d174a11292af63674a26eaa99864db9b48'/>
<id>urn:sha1:384ab1d174a11292af63674a26eaa99864db9b48</id>
<content type='text'>
When an NFC-DEP Initiator times out when waiting for
a DEP_RES from the Target, its supposed to send an
ATN to the Target.  The Target should respond to the
ATN with a similar ATN PDU and the Initiator can then
resend the last non-ATN PDU that it sent.  No more
than 'N(retry,atn)' are to be send where
2 &lt;= 'N(retry,atn)' &lt;= 5.  If the Initiator had just
sent a NACK PDU when the timeout occurred, it is to
continue sending NACKs until 'N(retry,nack)' NACKs
have been send.  This is described in section
14.12.5.6 of the NFC-DEP Digital Protocol Spec.

The digital layer's NFC-DEP code doesn't implement
this so add that support.

The value chosen for 'N(retry,atn)' is 2.

Reviewed-by: Thierry Escande &lt;thierry.escande@linux.intel.com&gt;
Tested-by: Thierry Escande &lt;thierry.escande@linux.intel.com&gt;
Signed-off-by: Mark A. Greer &lt;mgreer@animalcreek.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: digital: Add NFC-DEP Target-side NACK Support</title>
<updated>2014-11-28T11:39:47+00:00</updated>
<author>
<name>Mark A. Greer</name>
<email>mgreer@animalcreek.com</email>
</author>
<published>2014-09-23T23:38:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=49dbb14e30c3249f98fe243c3e21b91d10c5c59b'/>
<id>urn:sha1:49dbb14e30c3249f98fe243c3e21b91d10c5c59b</id>
<content type='text'>
When an NFC-DEP Target receives a NACK PDU with
a PNI equal to 1 less than the current PNI, it
is supposed to re-send the last PDU.  This is
implied in section 14.12.5.4 of the NFC Digital
Protocol Spec.

The digital layer's NFC-DEP code doesn't implement
Target-side NACK handing so add it.  The last PDU
that was sent is saved in the 'nfc_digital_dev'
structure's 'saved_skb' member.  The skb will have
an additional reference taken to ensure that the skb
isn't freed when the driver performs a kfree_skb()
on the skb.  The length of the skb/PDU is also saved
so the length can be restored when re-sending the PDU
in the skb (the driver will perform an skb_pull() so
an skb_push() needs to be done to restore the skb's
data pointer/length).

Reviewed-by: Thierry Escande &lt;thierry.escande@linux.intel.com&gt;
Tested-by: Thierry Escande &lt;thierry.escande@linux.intel.com&gt;
Signed-off-by: Mark A. Greer &lt;mgreer@animalcreek.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: digital: Add NFC-DEP Initiator-side NACK Support</title>
<updated>2014-11-28T11:39:33+00:00</updated>
<author>
<name>Mark A. Greer</name>
<email>mgreer@animalcreek.com</email>
</author>
<published>2014-09-23T23:38:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a80509c76bf2b10dae76f3caea343ac4b85c72b4'/>
<id>urn:sha1:a80509c76bf2b10dae76f3caea343ac4b85c72b4</id>
<content type='text'>
When an NFC-DEP Initiator receives a frame with
an incorrect CRC or with a parity error, and the
frame is at least 4 bytes long, its supposed to
send a NACK to the Target.  The Initiator can
send up to 'N(retry,nack)' consecutive NACKs
where 2 &lt;= 'N(retry,nack)' &lt;= 5.  When the limit
is exceeded, a PROTOCOL EXCEPTION is raised.
Any other type of transmission error is to be
ignored and the Initiator should continue
waiting for a new frame.  This is described
in section 14.12.5.4 of the NFC Digital Protocol
Spec.

The digital layer's NFC-DEP code doesn't implement
any of this so add it.  This support diverges from
the spec in two significant ways:

a) NACKs will be sent for ANY error reported by the
   driver except a timeout.  This is done because
   there is currently no way for the digital layer
   to distinguish a CRC or parity error from any
   other type of error reported by the driver.

b) All other errors will cause a PROTOCOL EXCEPTION
   even frames with CRC errors that are less than 4
   bytes.

The value chosen for 'N(retry,nack)' is 2.

Targets do not send NACK PDUs.

Reviewed-by: Thierry Escande &lt;thierry.escande@linux.intel.com&gt;
Tested-by: Thierry Escande &lt;thierry.escande@linux.intel.com&gt;
Signed-off-by: Mark A. Greer &lt;mgreer@animalcreek.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: digital: Add NFC-DEP Send Chaining Support</title>
<updated>2014-11-28T11:39:10+00:00</updated>
<author>
<name>Mark A. Greer</name>
<email>mgreer@animalcreek.com</email>
</author>
<published>2014-09-23T23:38:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3bd2a5bcc6cd7b8d588aa9ffa947177721eba18e'/>
<id>urn:sha1:3bd2a5bcc6cd7b8d588aa9ffa947177721eba18e</id>
<content type='text'>
When the NFC-DEP code is given a packet to send
that is larger than the peer's maximum payload,
its supposed to set the 'MI' bit in the 'I' PDU's
Protocol Frame Byte (PFB).  Setting this bit
indicates that NFC-DEP chaining is to occur.

When NFC-DEP chaining is progress, sender 'I' PDUs
are acknowledged with 'ACK' PDUs until the last 'I'
PDU in the chain (which has the 'MI' bit cleared)
is responded to with a normal 'I' PDU.  This can
occur while in Initiator mode or in Target mode.

Sender NFC-DEP chaining is currently not implemented
in the digital layer so add that support.  Unfortunately,
since sending a frame may require writing the CRC to the
end of the data, the relevant data part of the original
skb must be copied for each intermediate frame.

Reviewed-by: Thierry Escande &lt;thierry.escande@linux.intel.com&gt;
Tested-by: Thierry Escande &lt;thierry.escande@linux.intel.com&gt;
Signed-off-by: Mark A. Greer &lt;mgreer@animalcreek.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: digital: Implement NFC-DEP max payload lengths</title>
<updated>2014-11-28T11:38:59+00:00</updated>
<author>
<name>Mark A. Greer</name>
<email>mgreer@animalcreek.com</email>
</author>
<published>2014-09-23T23:38:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b08147cbc4d1b63d65f6c7c522fed9ef3212bc52'/>
<id>urn:sha1:b08147cbc4d1b63d65f6c7c522fed9ef3212bc52</id>
<content type='text'>
The maximum payload for NFC-DEP exchanges (i.e., the
number of bytes between SoD and EoD) is negotiated
using the ATR_REQ, ATR_RES, and PSL_REQ commands.
The valid maximum lengths are 64, 128, 192, and 254
bytes.

Currently, NFC-DEP code assumes that both sides are
always using 254 byte maximums and ignores attempts
by the peer to change it.  Instead, implement the
negotiation code, enforce the local maximum when
receiving data from the peer, and don't send payloads
that exceed the remote's maximum.  The default local
maximum is 254 bytes.

Reviewed-by: Thierry Escande &lt;thierry.escande@linux.intel.com&gt;
Tested-by: Thierry Escande &lt;thierry.escande@linux.intel.com&gt;
Signed-off-by: Mark A. Greer &lt;mgreer@animalcreek.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
</feed>
