From: Julia Lawall <julia.lawall@lip6.fr>
To: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>,
Marcel Holtmann <marcel@holtmann.org>,
kernel-janitors@vger.kernel.org,
Gustavo Padovan <gustavo@padovan.org>,
"David S. Miller" <davem@davemloft.net>,
linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Use hci_conn_hash_lookup_le
Date: Mon, 2 May 2016 21:33:25 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.02.1605022133030.2048@localhost6.localdomain6> (raw)
In-Reply-To: <20160502180256.GA22757@t440s>
On Mon, 2 May 2016, Johan Hedberg wrote:
> Hi,
>
> On Fri, Apr 29, 2016, Julia Lawall wrote:
> > --- a/net/bluetooth/mgmt.c
> > +++ b/net/bluetooth/mgmt.c
> > @@ -4773,7 +4773,8 @@ static int get_conn_info(struct sock *sk, struct hci_dev *hdev, void *data,
> > conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK,
> > &cp->addr.bdaddr);
> > else
> > - conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &cp->addr.bdaddr);
> > + conn = hci_conn_hash_lookup_le(hdev, &cp->addr.bdaddr,
> > + cp->addr.type);
>
> I don't think is is correct. There are two possible domains for address
> types: the user space-facing interface that has three values: BR/EDR, LE
> public & LE random, and the internal one which maps to HCI that has two
> values: random or public. You'd need to convert from the former to the
> latter when making the lookup call, i.e:
>
> conn = hci_conn_hash_lookup_le(hdev, &cp->addr.bdaddr,
> le_addr_type(cp->addr.type));
OK, thanks for the feedback.
julia
>
>
> Johan
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2016-05-02 19:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 19:22 [PATCH] Bluetooth: Use hci_conn_hash_lookup_le Julia Lawall
2016-05-02 18:02 ` Johan Hedberg
2016-05-02 19:33 ` Julia Lawall [this message]
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.1605022133030.2048@localhost6.localdomain6 \
--to=julia.lawall@lip6.fr \
--cc=davem@davemloft.net \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=netdev@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