Linux bluetooth development
 help / color / mirror / Atom feed
From: Mat Martineau <mathewm@codeaurora.org>
To: Manoj <manojkr.sharma@stericsson.com>
Cc: linux-bluetooth@vger.kernel.org,
	Anurag Gupta <anurag.gupta@stericsson.com>
Subject: Re: [PATCH 2/2] Bluetooth: Fix retransmission of ERTM packets
Date: Wed, 25 Apr 2012 08:33:55 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.02.1204250827200.20357@mathewm-linux> (raw)
In-Reply-To: <1335342544-17320-2-git-send-email-manojkr.sharma@stericsson.com>


Hi Manoj -

On Wed, 25 Apr 2012, Manoj wrote:

> State CONN_REJ_ACT of connection is not handled properly.
> ERTM packets should be transmitted only if bit corresponding to
> CONN_REJ_ACT in conn_state field is set. Opposite was being
> done, which has been fixed by this patch.

This is incorrect.  CONN_REJ_ACT maps to "RejActioned" in the ERTM 
spec.  RejActioned means the REJ has already been processed but there 
was an outstanding Poll, and the Final flag should not trigger 
retransmission of iframes.  Please review the spec and let us know if 
you still think there is a problem with CONN_REJ_ACT.

>
> Signed-off-by: Manoj <manojkr.sharma@stericsson.com>
> ---
> net/bluetooth/l2cap_core.c |    6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index a9319e2..485d374 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -4324,7 +4324,7 @@ expected:
> 	}
>
> 	if (__is_ctrl_final(chan, rx_control)) {
> -		if (!test_and_clear_bit(CONN_REJ_ACT, &chan->conn_state))
> +		if (test_and_clear_bit(CONN_REJ_ACT, &chan->conn_state))
> 			l2cap_retransmit_frames(chan);
> 	}
>
> @@ -4366,7 +4366,7 @@ static inline void l2cap_data_channel_rrframe(struct l2cap_chan *chan, u32 rx_co
> 	} else if (__is_ctrl_final(chan, rx_control)) {
> 		clear_bit(CONN_REMOTE_BUSY, &chan->conn_state);
>
> -		if (!test_and_clear_bit(CONN_REJ_ACT, &chan->conn_state))
> +		if (test_and_clear_bit(CONN_REJ_ACT, &chan->conn_state))
> 			l2cap_retransmit_frames(chan);
>
> 	} else {
> @@ -4394,7 +4394,7 @@ static inline void l2cap_data_channel_rejframe(struct l2cap_chan *chan, u32 rx_c
> 	l2cap_drop_acked_frames(chan);
>
> 	if (__is_ctrl_final(chan, rx_control)) {
> -		if (!test_and_clear_bit(CONN_REJ_ACT, &chan->conn_state))
> +		if (test_and_clear_bit(CONN_REJ_ACT, &chan->conn_state))
> 			l2cap_retransmit_frames(chan);
> 	} else {
> 		l2cap_retransmit_frames(chan);
> -- 
> 1.6.6.1
>

Regards,
--
Mat Martineau
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

  reply	other threads:[~2012-04-25 15:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-25  8:29 [PATCH 1/2] Bluetooth: Fix L2CAP ERTM packet queue corruption Manoj
2012-04-25  8:29 ` [PATCH 2/2] Bluetooth: Fix retransmission of ERTM packets Manoj
2012-04-25 15:33   ` Mat Martineau [this message]
2012-04-25 17:29     ` Manoj Sharma
2013-01-11  8:32     ` Obexd OPP filesend fails with Windows7 stack Syam Sidhardhan
2013-01-13 15:42       ` Luiz Augusto von Dentz
2013-01-13 18:35         ` Syam Sidhardhan
2012-04-25  8:46 ` [PATCH 1/2] Bluetooth: Fix L2CAP ERTM packet queue corruption Andrei Emeltchenko
2012-04-25 16:05   ` Mat Martineau
2012-04-25 17:26     ` Manoj Sharma

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=alpine.DEB.2.02.1204250827200.20357@mathewm-linux \
    --to=mathewm@codeaurora.org \
    --cc=anurag.gupta@stericsson.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=manojkr.sharma@stericsson.com \
    /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