]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - net/nfc/digital_core.c
NFC: digital: Set current target active on activate_target() call
authorThierry Escande <thierry.escande@linux.intel.com>
Mon, 6 Jan 2014 22:34:37 +0000 (23:34 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 7 Jan 2014 17:48:12 +0000 (18:48 +0100)
commit48e1044515967a0d88ee076045b2141535557d8e
tree564a069a933c1567908725f4a9150c2d7afbb5c4
parent15203b4c79aaeb443f89ac3190eed3447bf2178b
NFC: digital: Set current target active on activate_target() call

The curr_protocol field of nfc_digital_dev structure used to determine
if a target is currently active was set too soon, immediately when a
target is found. This is not good since there is no other way than
deactivate_target() to reset curr_protocol and if activate_target() is
not called, the target remains active and it's not possible to put the
device in poll mode anymore.

With this patch curr_protocol is set when nfc core activates a target,
puts a device up, or when an ATR_REQ is received in target mode.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/digital_core.c
net/nfc/digital_dep.c