NFC: llcp: Fix non blocking sockets connections
authorSamuel Ortiz <sameo@linux.intel.com>
Fri, 3 May 2013 16:29:30 +0000 (18:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2013 16:47:30 +0000 (09:47 -0700)
commitda989ee1c7702050741a551df6866cc1588f277b
treea2fe2c69db5b43e85ef2db088b1763618d571959
parentdfc855921b899a61b9cef8e48d74441a2876e75f
NFC: llcp: Fix non blocking sockets connections

commit b4011239a08e7e6c2c6e970dfa9e8ecb73139261 upstream.

Without the new LLCP_CONNECTING state, non blocking sockets will be
woken up with a POLLHUP right after calling connect() because their
state is stuck at LLCP_CLOSED.
That prevents userspace from implementing any proper non blocking
socket based NFC p2p client.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/nfc/llcp.h
net/nfc/llcp_sock.c