Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315297
b: refs/heads/master
c: 4d22ea1
h: refs/heads/master
i:
  315295: 021cf10
v: v3
  • Loading branch information
Samuel Ortiz authored and John W. Linville committed Jul 9, 2012
1 parent 1c36ad8 commit c797bc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b8e7a06d9cd4c0e778b1d12cef1ef414e0fb6d7e
refs/heads/master: 4d22ea1532ba5730b665343e513d813c108c84ff
11 changes: 8 additions & 3 deletions trunk/net/nfc/llcp/llcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void nfc_llcp_sock_unlink(struct llcp_sock_list *l, struct sock *sk)
write_unlock(&l->lock);
}

static void nfc_llcp_socket_release(struct nfc_llcp_local *local)
static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen)
{
struct sock *sk;
struct hlist_node *node, *tmp;
Expand Down Expand Up @@ -78,6 +78,11 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local)

sock_orphan(accept_sk);
}

if (listen == true) {
release_sock(sk);
continue;
}
}

sk->sk_state = LLCP_CLOSED;
Expand Down Expand Up @@ -106,7 +111,7 @@ static void local_release(struct kref *ref)
local = container_of(ref, struct nfc_llcp_local, ref);

list_del(&local->list);
nfc_llcp_socket_release(local);
nfc_llcp_socket_release(local, false);
del_timer_sync(&local->link_timer);
skb_queue_purge(&local->tx_queue);
destroy_workqueue(local->tx_wq);
Expand Down Expand Up @@ -991,7 +996,7 @@ void nfc_llcp_mac_is_down(struct nfc_dev *dev)
nfc_llcp_clear_sdp(local);

/* Close and purge all existing sockets */
nfc_llcp_socket_release(local);
nfc_llcp_socket_release(local, true);
}

void nfc_llcp_mac_is_up(struct nfc_dev *dev, u32 target_idx,
Expand Down

0 comments on commit c797bc7

Please sign in to comment.