linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: haijun liu <liuhaijun.er@gmail.com>
To: linux-bluetooth@vger.kernel.org,
	"dantian.ip" <dantian.ip@gmail.com>,
	Mat Martineau <mathewm@codeaurora.org>
Subject: [PATCH] Bluetooth: Fix bug in l2cap_parse_conf_rsp()
Date: Thu, 16 Sep 2010 16:26:25 +0800	[thread overview]
Message-ID: <AANLkTi=JEhr6nO7WqBm2=bGrpCxuc6daG_hMGMd_-hxY@mail.gmail.com> (raw)

 Acording bluetooth spec [Host Volume] chapter, section
 of "7.1.2 Response path", in l2cap_parse_conf_rsp(), MTU should be
 incoming mtu, not outgoing mtu.

Signed-off-by: Haijun.Liu <Haijun.Liu@Atheros.com>
---
 net/bluetooth/l2cap.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 23e487e..1797277 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2771,10 +2771,10 @@ static int l2cap_parse_conf_rsp(struct sock
*sk, void *rsp, int len, void *data,
 		case L2CAP_CONF_MTU:
 			if (val < L2CAP_DEFAULT_MIN_MTU) {
 				*result = L2CAP_CONF_UNACCEPT;
-				pi->omtu = L2CAP_DEFAULT_MIN_MTU;
+				pi->imtu = L2CAP_DEFAULT_MIN_MTU;
 			} else
-				pi->omtu = val;
-			l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->omtu);
+				pi->imtu = val;
+			l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->imtu);
 			break;

 		case L2CAP_CONF_FLUSH_TO:
-- 
1.6.3.3

             reply	other threads:[~2010-09-16  8:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16  8:26 haijun liu [this message]
2010-09-16  9:00 ` [PATCH] Bluetooth: Fix bug in l2cap_parse_conf_rsp() Andrei Emeltchenko
2010-09-16 14:13   ` Gustavo F. Padovan

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='AANLkTi=JEhr6nO7WqBm2=bGrpCxuc6daG_hMGMd_-hxY@mail.gmail.com' \
    --to=liuhaijun.er@gmail.com \
    --cc=dantian.ip@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=mathewm@codeaurora.org \
    /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;
as well as URLs for NNTP newsgroup(s).