From: Johan Hedberg <johan.hedberg@gmail.com>
To: Jakub Tyszkowski <jakub.tyszkowski@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 5/8] emulator/btdev: Overwrite default feature mask when SPP is toggled
Date: Wed, 3 Sep 2014 12:39:38 +0300 [thread overview]
Message-ID: <20140903093938.GA23986@t440s.lan> (raw)
In-Reply-To: <1409734969-10716-5-git-send-email-jakub.tyszkowski@tieto.com>
Hi Jakub,
On Wed, Sep 03, 2014, Jakub Tyszkowski wrote:
> Without this we cannot test the legacy HID Device reconnection, as L2Cap
> connection is refused when SSP is reported in remote device's features.
> ---
> emulator/btdev.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/emulator/btdev.c b/emulator/btdev.c
> index 86fd3d9..8aebb8f 100644
> --- a/emulator/btdev.c
> +++ b/emulator/btdev.c
> @@ -2332,6 +2332,13 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
> goto unsupported;
> wspm = data;
> btdev->simple_pairing_mode = wspm->mode;
> +
> + /* set SSP feature mask */
> + if (wspm->mode)
> + btdev->features[6] |= 0x08;
> + else
> + btdev->features[6] &= ~0x08;
> +
This looks suspicious to me. The only thing that should matter is
whether the host features bit is set on or not. That already looks
correct to me in the btdev_get_host_features() function. I.e. isn't your
problem with some piece of code higher up in the stack that's not
keeping SSP properly disabled? (since what you're now doing is not just
disabling SSP but making it look like SSP was never supported to begin
with as soon as you disable it).
Johan
next prev parent reply other threads:[~2014-09-03 9:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 9:02 [PATCH 1/8] android/tester: Add action to verify encryption change Jakub Tyszkowski
2014-09-03 9:02 ` [PATCH 2/8] android/tester: Allow HIDHost to use custom sdp response Jakub Tyszkowski
2014-09-03 9:02 ` [PATCH 3/8] android/tester: Add case verifying encryption on HIDHost Jakub Tyszkowski
2014-09-03 9:02 ` [PATCH 4/8] android/tester: Fix HIDHost cases sending fixed tid sdp responses Jakub Tyszkowski
2014-09-03 9:02 ` [PATCH 5/8] emulator/btdev: Overwrite default feature mask when SPP is toggled Jakub Tyszkowski
2014-09-03 9:39 ` Johan Hedberg [this message]
2014-09-03 13:34 ` Tyszkowski Jakub
2014-09-04 10:54 ` Tyszkowski Jakub
2014-09-04 11:09 ` Johan Hedberg
2014-09-04 11:57 ` Tyszkowski Jakub
2014-09-03 9:02 ` [PATCH 6/8] android/tester: Enable SSP in emulator by default Jakub Tyszkowski
2014-09-03 9:02 ` [PATCH 7/8] android/tester: Add support for rejected connections Jakub Tyszkowski
2014-09-03 9:02 ` [PATCH 8/8] android/tester: Add Hidhost rejecting connection case Jakub Tyszkowski
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=20140903093938.GA23986@t440s.lan \
--to=johan.hedberg@gmail.com \
--cc=jakub.tyszkowski@tieto.com \
--cc=linux-bluetooth@vger.kernel.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).