From: Brian Gix <bgix@codeaurora.org>
To: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Cc: Claudio Takahasi <claudio.takahasi@openbossa.org>,
BlueZ development <linux-bluetooth@vger.kernel.org>
Subject: SMP data within struct l2cap_conn -vs- single threading SMP
Date: Thu, 17 Mar 2011 15:09:40 -0700 [thread overview]
Message-ID: <4D8286A4.4000706@codeaurora.org> (raw)
Hi Vinicius,
As you probably know, I am working on adding mgmt.c plumbing into SMP,
to enable user level input (Confirmation, passkeys, perhaps OOB).
One issue I am running into is matching up the return of user
confirmation with the (struct l2cap_conn *). There is nothing within
the user confirmation aside from the bdaddr that identifies who it is
intended for, and there is no one-to-one relationship between bdaddrs
and L2CAP channels.
What would you think about enforcing a "one at a time" SMP process?
The SMP pairing data within the l2cap_conn structure is certainly a
handy place for it, however it is bulky for the times (most of the time)
where SMP is *not* taking place, and as in the obvious case I mention
above, there is not a handy way to track the L2CAP connection back to
the user input.
I would like to suggest that all of the SMP data be pulled out of the
l2cap_conn structure, and put into a private structure within smp.c. It
can be malloc'd when the pairing process starts, free'd when it
completes, and any traffic (from either the User or the Baseband) that
takes place when another device is in the midst of pairing gets rejected.
This structure local to smp.c would store both the bdaddr (to match up
with user input) and the l2cap_conn * to match up with BB traffic, and
provide the outbound path for the user confirmation which would
otherwise be difficult to track down.
Your Thoughts?
--
Brian Gix
bgix@codeaurora.org
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
next reply other threads:[~2011-03-17 22:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 22:09 Brian Gix [this message]
2011-03-21 22:28 ` SMP data within struct l2cap_conn -vs- single threading SMP Vinicius Costa Gomes
2011-03-21 23:09 ` Brian Gix
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=4D8286A4.4000706@codeaurora.org \
--to=bgix@codeaurora.org \
--cc=claudio.takahasi@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=vinicius.gomes@openbossa.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).