Skip to content

Commit 44cd576

Browse files
krzkdavem330
authored andcommitted
nfc: llcp: Revert "NFC: Keep socket alive until the DISC PDU is actually sent"
This reverts commit 17f7ae1. The commit brought a new socket state LLCP_DISCONNECTING, which was never set, only read, so socket could never set to such state. Remove the dead code. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a06b804 commit 44cd576

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

net/nfc/llcp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
enum llcp_state {
77
LLCP_CONNECTED = 1, /* wait_for_packet() wants that */
88
LLCP_CONNECTING,
9-
LLCP_DISCONNECTING,
109
LLCP_CLOSED,
1110
LLCP_BOUND,
1211
LLCP_LISTEN,

net/nfc/llcp_core.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -737,13 +737,6 @@ static void nfc_llcp_tx_work(struct work_struct *work)
737737
print_hex_dump_debug("LLCP Tx: ", DUMP_PREFIX_OFFSET,
738738
16, 1, skb->data, skb->len, true);
739739

740-
if (ptype == LLCP_PDU_DISC && sk != NULL &&
741-
sk->sk_state == LLCP_DISCONNECTING) {
742-
nfc_llcp_sock_unlink(&local->sockets, sk);
743-
sock_orphan(sk);
744-
sock_put(sk);
745-
}
746-
747740
if (ptype == LLCP_PDU_I)
748741
copy_skb = skb_copy(skb, GFP_ATOMIC);
749742

net/nfc/llcp_sock.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -641,13 +641,6 @@ static int llcp_sock_release(struct socket *sock)
641641

642642
release_sock(sk);
643643

644-
/* Keep this sock alive and therefore do not remove it from the sockets
645-
* list until the DISC PDU has been actually sent. Otherwise we would
646-
* reply with DM PDUs before sending the DISC one.
647-
*/
648-
if (sk->sk_state == LLCP_DISCONNECTING)
649-
return err;
650-
651644
out:
652645
sock_orphan(sk);
653646
sock_put(sk);

0 commit comments

Comments
 (0)