summaryrefslogtreecommitdiffstats
path: root/net/nfc/llcp/llcp.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-06-22 14:48:11 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-07-09 16:42:17 -0400
commitcbbf472181bd5d6229decda96b34b0c2bbcb3050 (patch)
tree152e06ea436fcc419af1604a2f118f6be0ff33c9 /net/nfc/llcp/llcp.c
parent4d22ea1532ba5730b665343e513d813c108c84ff (diff)
downloadop-kernel-dev-cbbf472181bd5d6229decda96b34b0c2bbcb3050.zip
op-kernel-dev-cbbf472181bd5d6229decda96b34b0c2bbcb3050.tar.gz
NFC: Release LLCP SAP when the owner is released
The LLCP SAP should only be freed when the socket owning it is released. As long as the socket is alive, the SAP should be reserved in order to e.g. send the right wks array when bringing the MAC up. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc/llcp/llcp.c')
-rw-r--r--net/nfc/llcp/llcp.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/net/nfc/llcp/llcp.c b/net/nfc/llcp/llcp.c
index 0c8d25e..1031abd 100644
--- a/net/nfc/llcp/llcp.c
+++ b/net/nfc/llcp/llcp.c
@@ -131,17 +131,6 @@ int nfc_llcp_local_put(struct nfc_llcp_local *local)
return kref_put(&local->ref, local_release);
}
-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,
@@ -993,8 +982,6 @@ 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, true);
}
OpenPOWER on IntegriCloud