Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291215
b: refs/heads/master
c: b9a76f1
h: refs/heads/master
i:
  291213: 502651a
  291211: 0a570b1
  291207: 996ac46
  291199: 669eebe
v: v3
  • Loading branch information
Samuel Ortiz authored and John W. Linville committed Mar 6, 2012
1 parent dc7983f commit d177afe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98b3ac1b980b0c0ffff24fda8d13ab8c216df4d1
refs/heads/master: b9a76f1d3c6da47b2fa115ff1c0de229e8d06f8f
13 changes: 13 additions & 0 deletions trunk/net/nfc/llcp/llcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local)
mutex_unlock(&local->socket_lock);
}

static void nfc_llcp_clear_sdp(struct nfc_llcp_local *local)
{
mutex_lock(&local->sdp_lock);

local->local_wks = 0;
local->local_sdp = 0;
local->local_sap = 0;

mutex_unlock(&local->sdp_lock);
}

static void nfc_llcp_timeout_work(struct work_struct *work)
{
struct nfc_llcp_local *local = container_of(work, struct nfc_llcp_local,
Expand Down Expand Up @@ -857,6 +868,8 @@ void nfc_llcp_mac_is_down(struct nfc_dev *dev)
if (local == NULL)
return;

nfc_llcp_clear_sdp(local);

/* Close and purge all existing sockets */
nfc_llcp_socket_release(local);
}
Expand Down

0 comments on commit d177afe

Please sign in to comment.