public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: "Collin R. Mulliner" <collin@betaversion.net>
Cc: bluez-devel@lists.sf.net
Subject: Re: [Bluez-devel] L2CAP raw socket patch
Date: Tue, 10 Feb 2004 23:16:48 +0100	[thread overview]
Message-ID: <1076451408.2777.13.camel@pegasus> (raw)
In-Reply-To: <20040210124942.393a6da0.collin@betaversion.net>

[-- Attachment #1: Type: text/plain, Size: 774 bytes --]

Hi Collin,

> I have written a small patch for l2cap.c to improve the capabilities of
> L2CAP raw sockets. Currently only very few responses travel back to a
> RAW socket (which is very bad if you need to see command responses).
> The patch is very simple - it just puts all responses on the
> Sig-Channel to all open RAW sockets. The owner of the raw socket just
> needs to select his packets and in normal operation there shouldn't be
> much use of RAW sockets so I don't think this is a performance issue.

do anyone have comments about this patch?

> I have attached the patch file to this email, hope this is ok.

BTW this patch is wrong, because we must keep the case statements.
Otherwise the kernel log will be filled with unneeded error messages.

Regards

Marcel


[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 707 bytes --]

diff -urN linux-2.6.2/net/bluetooth/l2cap.c linux-2.6.2-mh/net/bluetooth/l2cap.c
--- linux-2.6.2/net/bluetooth/l2cap.c	2004-02-04 04:44:04.000000000 +0100
+++ linux-2.6.2-mh/net/bluetooth/l2cap.c	2004-02-10 23:04:49.000000000 +0100
@@ -1643,6 +1643,8 @@
 			break;
 		}
 
+		l2cap_raw_recv(conn, skb);
+
 		switch (cmd.code) {
 		case L2CAP_CONN_REQ:
 			err = l2cap_connect_req(conn, &cmd, data);
@@ -1670,7 +1672,6 @@
 
 		case L2CAP_COMMAND_REJ:
 			/* FIXME: We should process this */
-			l2cap_raw_recv(conn, skb);
 			break;
 
 		case L2CAP_ECHO_REQ:
@@ -1680,7 +1681,6 @@
 		case L2CAP_ECHO_RSP:
 		case L2CAP_INFO_REQ:
 		case L2CAP_INFO_RSP:
-			l2cap_raw_recv(conn, skb);
 			break;
 
 		default:

  reply	other threads:[~2004-02-10 22:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-10 11:49 [Bluez-devel] L2CAP raw socket patch Collin R. Mulliner
2004-02-10 22:16 ` Marcel Holtmann [this message]
     [not found]   ` <20040210232330.4cf4935d.collin@betaversion.net>
2004-02-10 22:32     ` Marcel Holtmann
2004-02-10 23:07       ` Collin R. Mulliner
2004-02-22 15:31         ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1076451408.2777.13.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sf.net \
    --cc=collin@betaversion.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox