NFC: Update LLCP socket target index when getting a connection
authorSamuel Ortiz <sameo@linux.intel.com>
Mon, 18 Jun 2012 19:38:09 +0000 (21:38 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 9 Jul 2012 20:42:14 +0000 (16:42 -0400)
Getting a valid CONNECT means we have a valid target index.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/llcp/llcp.c

index 5d503eeb15a1a3f85732b289a5ff04e9f54ac887..eee4b9286f8dbfab9335e4a41f48fd6582596c7c 100644 (file)
@@ -677,6 +677,7 @@ static void nfc_llcp_recv_connect(struct nfc_llcp_local *local,
        new_sock->nfc_protocol = sock->nfc_protocol;
        new_sock->ssap = sock->ssap;
        new_sock->dsap = ssap;
+       new_sock->target_idx = local->target_idx;
        new_sock->parent = parent;
 
        nfc_llcp_parse_connection_tlv(new_sock, &skb->data[LLCP_HEADER_SIZE],