linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mat Martineau <mathewm@codeaurora.org>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <padovan@profusion.mobi>,
	Szymon Janc <szymon.janc@tieto.com>,
	linux-bluetooth@vger.kernel.org, ulrik.lauren@stericsson.com,
	kanak.gupta@stericsson.com
Subject: Re: [PATCH 2/2] Bluetooth: Add ability to force local busy condition on L2CAP ERTM
Date: Fri, 4 Nov 2011 15:25:09 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.02.1111041513330.11981@mathewm-linux> (raw)
In-Reply-To: <1320441040.15441.303.camel@aeonflux>


Hi everyone -

On Fri, 4 Nov 2011, Marcel Holtmann wrote:

> Hi Gustavo,
>
>>> This is required to pass PTS TP/ERM/BV-07-C (Send S-Frame [RNR]).
>>>
>>> Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
>>> ---
>>>  net/bluetooth/l2cap_core.c |   43 ++++++++++++++++++++++++++++++++++++++++++-
>>>  1 files changed, 42 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
>>> index 9dcbf3d..6202009 100644
>>> --- a/net/bluetooth/l2cap_core.c
>>> +++ b/net/bluetooth/l2cap_core.c
>>> @@ -59,6 +59,8 @@
>>>  int disable_ertm;
>>>  int enable_hs;
>>>
>>> +static int force_local_busy;
>>> +
>>>  static u32 l2cap_feat_mask = L2CAP_FEAT_FIXED_CHAN;
>>>  static u8 l2cap_fixed_chan[8] = { 0x02, };
>>>
>>> @@ -3522,7 +3524,7 @@ void l2cap_chan_busy(struct l2cap_chan *chan, int busy)
>>>  	if (chan->mode == L2CAP_MODE_ERTM) {
>>>  		if (busy)
>>>  			l2cap_ertm_enter_local_busy(chan);
>>> -		else
>>> +		else if (!force_local_busy)
>>>  			l2cap_ertm_exit_local_busy(chan);
>>
>> NACK on this. I don't wanna move code with the specific purpose of pass a PTS
>> test into the tree. This kinda of thing can survive outside of the tree.
>
> actually it can not life outside the tree. We need to be able to pass
> the PTS test cases with an upstream source.
>
> However instead of hacking this in, what is the actual test case details
> here that we need to have support for?

ERTM will send an RNR when the socket receive buffer fills up.  For 
this test case, it works to just set the SO_RCVBUF sockopt to 
a small enough value that the recv buffer fills before the transmit 
window does - no kernel changes required.

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

  reply	other threads:[~2011-11-04 22:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03 15:05 [PATCH 1/2] Bluetooth: Add debug print to l2cap_chan_create Szymon Janc
2011-11-03 15:05 ` [PATCH 2/2] Bluetooth: Add ability to force local busy condition on L2CAP ERTM Szymon Janc
2011-11-04 17:15   ` Gustavo Padovan
2011-11-04 21:10     ` Marcel Holtmann
2011-11-04 22:25       ` Mat Martineau [this message]
2011-11-09 13:46         ` Szymon Janc
2011-11-09 14:48           ` Marcel Holtmann
2011-11-09 17:15             ` Luiz Augusto von Dentz
2011-11-10 18:03             ` Mat Martineau
2011-11-04 17:12 ` [PATCH 1/2] Bluetooth: Add debug print to l2cap_chan_create Gustavo 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=alpine.DEB.2.02.1111041513330.11981@mathewm-linux \
    --to=mathewm@codeaurora.org \
    --cc=kanak.gupta@stericsson.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=padovan@profusion.mobi \
    --cc=szymon.janc@tieto.com \
    --cc=ulrik.lauren@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;
as well as URLs for NNTP newsgroup(s).