summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThierry Escande <thierry.escande@collabora.com>2016-07-08 15:52:45 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2016-07-11 02:01:14 +0200
commit1a09c56f545c8ff8d338a38c7c40d79f4165a94c (patch)
treeb9324ff10a1ecd1432449a18c3aeba9de7b5c330 /include
parente200f008ace69eebac0a1432dc9e24ab5cd0d029 (diff)
downloadlinux-1a09c56f545c8ff8d338a38c7c40d79f4165a94c.tar.bz2
NFC: digital: Add support for NFC DEP Response Waiting Time
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 <thierry.escande@collabora.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/nfc/digital.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/nfc/digital.h b/include/net/nfc/digital.h
index f9a4e4771861..74fa7eb94e72 100644
--- a/include/net/nfc/digital.h
+++ b/include/net/nfc/digital.h
@@ -226,6 +226,7 @@ struct nfc_digital_dev {
u8 curr_rf_tech;
u8 curr_nfc_dep_pni;
u8 did;
+ u16 dep_rwt;
u8 local_payload_max;
u8 remote_payload_max;