linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Fix bug in l2cap_parse_conf_rsp()
@ 2010-09-16  8:26 haijun liu
  2010-09-16  9:00 ` Andrei Emeltchenko
  0 siblings, 1 reply; 3+ messages in thread
From: haijun liu @ 2010-09-16  8:26 UTC (permalink / raw)
  To: linux-bluetooth, dantian.ip, Mat Martineau

 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: Fix bug in l2cap_parse_conf_rsp()
  2010-09-16  8:26 [PATCH] Bluetooth: Fix bug in l2cap_parse_conf_rsp() haijun liu
@ 2010-09-16  9:00 ` Andrei Emeltchenko
  2010-09-16 14:13   ` Gustavo F. Padovan
  0 siblings, 1 reply; 3+ messages in thread
From: Andrei Emeltchenko @ 2010-09-16  9:00 UTC (permalink / raw)
  To: haijun liu; +Cc: linux-bluetooth, dantian.ip, Mat Martineau

Hi,

Duplicated:
http://www.spinics.net/lists/linux-bluetooth/msg07366.html

BTW: How long will it tale to get the patch in?

On Thu, Sep 16, 2010 at 11:26 AM, haijun liu <liuhaijun.er@gmail.com> wrote:
>  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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: Fix bug in l2cap_parse_conf_rsp()
  2010-09-16  9:00 ` Andrei Emeltchenko
@ 2010-09-16 14:13   ` Gustavo F. Padovan
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo F. Padovan @ 2010-09-16 14:13 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: haijun liu, linux-bluetooth, dantian.ip, Mat Martineau

* Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com> [2010-09-16 12:00:50 +0300]:

> Hi,
> 
> Duplicated:
> http://www.spinics.net/lists/linux-bluetooth/msg07366.html
> 
> BTW: How long will it tale to get the patch in?

We are planning to put it in 2.6.36. I'm tracking it.

-- 
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-16 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-16  8:26 [PATCH] Bluetooth: Fix bug in l2cap_parse_conf_rsp() haijun liu
2010-09-16  9:00 ` Andrei Emeltchenko
2010-09-16 14:13   ` Gustavo F. Padovan

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).