From: Johan Hedberg <johan.hedberg@gmail.com>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Add local Extended Inquiry Response (EIR) support
Date: Fri, 25 Mar 2011 18:49:02 +0200 [thread overview]
Message-ID: <20110325164902.GA10252@jh-x301> (raw)
In-Reply-To: <20110325163549.GA9894@jh-x301>
Hi,
On Fri, Mar 25, 2011, Johan Hedberg wrote:
> > > + }
> > > +
> > > + memcpy(&val, uuid128, 4);
> > > +
> > > + val = be32_to_cpu(val);
> >
> > I noticed just know the those UUID handling functions from management
> > API are assuming UUIDs in network order. We will need to change this,
> > or take extra care when reusing them for Advertising Data and GATT
> > uuids.
>
> Right. This code is pretty much a copy of what user space already has
> (hciops.c), and that code is relying on SDP (i.e. network) byte order
> UUID-128s.
Actually now that I think about it, for consistency with everything else
in the management interface the byte order, at least in the management
protocol, should probably stay little endian (mimicing HCI). We *could*
store the UUIDs in hdev->uuids in host byte order, but then we'll need
to add all the byte-order dependent code that we've recently created for
user space with bt_uuid.
The really important part is the management protocol since that's what's
visible to user space. The internal storage of these UUIDs in the kernel
is secondary. Personally, I'd like to avoid any 128-bit byte order
conversions if possible but I can see how this can be argued in both
ways.
Johan
next prev parent reply other threads:[~2011-03-25 16:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 13:25 [PATCH] Bluetooth: Add local Extended Inquiry Response (EIR) support johan.hedberg
2011-03-25 15:36 ` Anderson Lizardo
2011-03-25 16:35 ` Johan Hedberg
2011-03-25 16:49 ` Johan Hedberg [this message]
2011-03-25 17:23 ` Anderson Lizardo
2011-03-25 17:26 ` Anderson Lizardo
2011-03-25 17:28 ` Johan Hedberg
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=20110325164902.GA10252@jh-x301 \
--to=johan.hedberg@gmail.com \
--cc=anderson.lizardo@openbossa.org \
--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