All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: NFC: llcp: Only keep raw sockets alive when the LLCP local leaves
       [not found] <20130501212445.496FB660D7C@gitolite.kernel.org>
@ 2013-05-01 23:36 ` paul.ferrari
  0 siblings, 0 replies; only message in thread
From: paul.ferrari @ 2013-05-01 23:36 UTC (permalink / raw)
  To: Linux Kernel Mailing List

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2947 bytes --]

Dd0 ddddDDddD$

Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From:	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Sender:	git-commits-head-owner@vger.kernel.org
Date:	Wed,  1 May 2013 21:24:45 
To: <git-commits-head@vger.kernel.org>
Subject: NFC: llcp: Only keep raw sockets alive when the LLCP local leaves

Gitweb:     http://git.kernel.org/linus/;a=commit;h=b436a13debec2b3d2c671d6bebcdb91dabcb0795
Commit:     b436a13debec2b3d2c671d6bebcdb91dabcb0795
Parent:     495af72e1434724559e756ba32d9040125ac506b
Author:     Samuel Ortiz <sameo@linux.intel.com>
AuthorDate: Wed Apr 3 16:34:19 2013 +0200
Committer:  Samuel Ortiz <sameo@linux.intel.com>
CommitDate: Thu Apr 11 16:29:09 2013 +0200

    NFC: llcp: Only keep raw sockets alive when the LLCP local leaves
    
    When the MAC goes down, connected and connection less sockets should be
    notified, but raw sockets should be kept alive.
    They will get notified only when the physical devices goes away.
    
    Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
---
 net/nfc/llcp/llcp.c |   26 +++-----------------------
 1 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/net/nfc/llcp/llcp.c b/net/nfc/llcp/llcp.c
index 83e788e..99ec39d 100644
--- a/net/nfc/llcp/llcp.c
+++ b/net/nfc/llcp/llcp.c
@@ -76,7 +76,7 @@ static void nfc_llcp_socket_purge(struct nfc_llcp_sock *sock)
 	}
 }
 
-static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen,
+static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool device,
 				    int err)
 {
 	struct sock *sk;
@@ -116,23 +116,6 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen,
 
 				bh_unlock_sock(accept_sk);
 			}
-
-			if (listen == true) {
-				nfc_llcp_socket_remote_param_init(llcp_sock);
-				bh_unlock_sock(sk);
-				continue;
-			}
-		}
-
-		/*
-		 * If we have a connection less socket bound, we keep it alive
-		 * if the device is still present.
-		 */
-		if (sk->sk_state == LLCP_BOUND && sk->sk_type == SOCK_DGRAM &&
-		    listen == true) {
-			nfc_llcp_socket_remote_param_init(llcp_sock);
-			bh_unlock_sock(sk);
-			continue;
 		}
 
 		if (err)
@@ -147,11 +130,8 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool listen,
 
 	write_unlock(&local->sockets.lock);
 
-	/*
-	 * If we want to keep the listening sockets alive,
-	 * we don't touch the RAW ones.
-	 */
-	if (listen == true)
+	/* If we still have a device, we keep the RAW sockets alive */
+	if (device == true)
 		return;
 
 	write_lock(&local->raw_sockets.lock);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-01 23:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20130501212445.496FB660D7C@gitolite.kernel.org>
2013-05-01 23:36 ` NFC: llcp: Only keep raw sockets alive when the LLCP local leaves paul.ferrari

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.