From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755075AbcEBTdi (ORCPT ); Mon, 2 May 2016 15:33:38 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:29462 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754736AbcEBTd3 (ORCPT ); Mon, 2 May 2016 15:33:29 -0400 X-IronPort-AV: E=Sophos;i="5.24,568,1454972400"; d="scan'208";a="216681327" Date: Mon, 2 May 2016 21:33:25 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 To: Johan Hedberg cc: Julia Lawall , Marcel Holtmann , kernel-janitors@vger.kernel.org, Gustavo Padovan , "David S. Miller" , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Bluetooth: Use hci_conn_hash_lookup_le In-Reply-To: <20160502180256.GA22757@t440s> Message-ID: References: <1461957760-753-1-git-send-email-Julia.Lawall@lip6.fr> <20160502180256.GA22757@t440s> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >