kernel-hacking-2024-linux-s.../net
Thierry Escande 482333b277 NFC: digital: Fix ACK & NACK PDUs handling in target mode
When the target receives a NACK PDU, it re-sends the last sent PDU.

ACK PDUs are received by the target as a reply from the initiator to
chained I-PDUs. There are 3 cases to handle:
- If the target has previously received 1 or more ATN PDUs and the PNI
  in the ACK PDU is equal to the target PNI - 1, then it means that the
  initiator did not received the last issued PDU from the target. In
  this case it re-sends this PDU.
- If the target has received 1 or more ATN PDUs but the ACK PNI is not
  the target PNI - 1, then this means that this ACK is the reply of the
  previous chained I-PDU sent by the target. The target did not received
  it on the first attempt and it is being re-sent by the initiator. The
  process continues as usual.
- No ATN PDU received before this ACK PDU. This is the reply of a
  chained I-PDU. The target keeps on processing its chained I-PDU.

The code has been refactored to avoid too many indentation levels.

Also, ACK and NACK PDUs were not freed. This is now fixed.

Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2016-07-11 01:58:46 +02:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25 AX.25: Close socket connection on session completion 2016-06-18 20:55:34 -07:00
batman-adv This feature patchset includes the following changes: 2016-07-01 17:05:00 -04:00
bluetooth
bridge net: bridge: add support for IGMP/MLD stats and export them via netlink 2016-06-30 06:18:24 -04:00
caif caif: Remove unneeded header file 2016-06-28 05:26:14 -04:00
can can: only call can_stat_update with procfs 2016-06-23 11:23:49 +02:00
ceph
core net/devlink: Add E-Switch mode control 2016-07-02 14:40:40 -04:00
dcb
dccp
decnet
dns_resolver
dsa
ethernet
hsr
ieee802154
ipv4 tcp: md5: use kmalloc() backed scratch areas 2016-07-01 04:02:55 -04:00
ipv6 tcp: md5: use kmalloc() backed scratch areas 2016-07-01 04:02:55 -04:00
ipx
irda
iucv
kcm bpf: refactor bpf_prog_get and type check into helper 2016-07-01 16:00:47 -04:00
key
l2tp
l3mdev net: vrf: Implement get_saddr for IPv6 2016-06-17 21:25:29 -07:00
lapb
llc
mac80211 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-06-30 05:03:36 -04:00
mac802154
mpls
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-06-30 05:03:36 -04:00
netlabel
netlink
netrom
nfc NFC: digital: Fix ACK & NACK PDUs handling in target mode 2016-07-11 01:58:46 +02:00
openvswitch Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-06-30 05:03:36 -04:00
packet bpf: refactor bpf_prog_get and type check into helper 2016-07-01 16:00:47 -04:00
phonet
qrtr
rds RDS: Do not send a pong to an incoming ping with 0 src port 2016-07-01 16:45:18 -04:00
rfkill
rose
rxrpc rxrpc: Kill off the rxrpc_transport struct 2016-06-22 14:00:23 +01:00
sched bpf: refactor bpf_prog_get and type check into helper 2016-07-01 16:00:47 -04:00
sctp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-06-30 05:03:36 -04:00
sunrpc
switchdev
tipc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-06-30 05:03:36 -04:00
unix
vmw_vsock vsock: make listener child lock ordering explicit 2016-06-27 10:44:46 -04:00
wimax
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-06-30 05:03:36 -04:00
x25
xfrm
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c