* [PATCH] Bluetooth: fix MTU L2CAP configuration parameter
@ 2010-09-01 12:17 Emeltchenko Andrei
2010-09-02 9:34 ` Ville Tervo
2010-09-02 19:49 ` Gustavo F. Padovan
0 siblings, 2 replies; 3+ messages in thread
From: Emeltchenko Andrei @ 2010-09-01 12:17 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
When receiving L2CAP negative configuration response with respect
to MTU parameter we modify wrong field. MTU here means proposed
value of MTU that the remote device intends to transmit. So for local
L2CAP socket it is pi->imtu.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.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 c784703..9fad312 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.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Bluetooth: fix MTU L2CAP configuration parameter
2010-09-01 12:17 [PATCH] Bluetooth: fix MTU L2CAP configuration parameter Emeltchenko Andrei
@ 2010-09-02 9:34 ` Ville Tervo
2010-09-02 19:49 ` Gustavo F. Padovan
1 sibling, 0 replies; 3+ messages in thread
From: Ville Tervo @ 2010-09-02 9:34 UTC (permalink / raw)
To: ext Emeltchenko Andrei; +Cc: linux-bluetooth@vger.kernel.org
On Wed, Sep 01, 2010 at 02:17:25PM +0200, ext Emeltchenko Andrei wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
>
> When receiving L2CAP negative configuration response with respect
> to MTU parameter we modify wrong field. MTU here means proposed
> value of MTU that the remote device intends to transmit. So for local
> L2CAP socket it is pi->imtu.
>
Yes imtu is negotiated in this phase.
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Ville Tervo <ville.tervo@nokia.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 c784703..9fad312 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.7.0.4
--
Ville
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Bluetooth: fix MTU L2CAP configuration parameter
2010-09-01 12:17 [PATCH] Bluetooth: fix MTU L2CAP configuration parameter Emeltchenko Andrei
2010-09-02 9:34 ` Ville Tervo
@ 2010-09-02 19:49 ` Gustavo F. Padovan
1 sibling, 0 replies; 3+ messages in thread
From: Gustavo F. Padovan @ 2010-09-02 19:49 UTC (permalink / raw)
To: Emeltchenko Andrei; +Cc: linux-bluetooth
* Emeltchenko Andrei <Andrei.Emeltchenko.news@gmail.com> [2010-09-01 15:17:25 +0300]:
> From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
>
> When receiving L2CAP negative configuration response with respect
> to MTU parameter we modify wrong field. MTU here means proposed
> value of MTU that the remote device intends to transmit. So for local
> L2CAP socket it is pi->imtu.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
> ---
> net/bluetooth/l2cap.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
--
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-02 19:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-01 12:17 [PATCH] Bluetooth: fix MTU L2CAP configuration parameter Emeltchenko Andrei
2010-09-02 9:34 ` Ville Tervo
2010-09-02 19:49 ` Gustavo F. Padovan
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.