diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2016-11-12 17:03:07 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2016-11-22 22:50:46 +0100 |
commit | 39385cb5f3274735b03ed1f8e7ff517b02a0beed (patch) | |
tree | 3c6ec16600b7ec16f3b019bbbdae493de90eefb0 /net/bluetooth/l2cap_core.c | |
parent | c9b8af1330198ae241cd545e1f040019010d44d9 (diff) | |
download | talos-op-linux-39385cb5f3274735b03ed1f8e7ff517b02a0beed.tar.gz talos-op-linux-39385cb5f3274735b03ed1f8e7ff517b02a0beed.zip |
Bluetooth: Fix using the correct source address type
The hci_get_route() API is used to look up local HCI devices, however
so far it has been incapable of dealing with anything else than the
public address of HCI devices. This completely breaks with LE-only HCI
devices that do not come with a public address, but use a static
random address instead.
This patch exteds the hci_get_route() API with a src_type parameter
that's used for comparing with the right address of each HCI device.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index d4cad29b033f..577f1c01454a 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -7060,7 +7060,7 @@ int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid, BT_DBG("%pMR -> %pMR (type %u) psm 0x%2.2x", &chan->src, dst, dst_type, __le16_to_cpu(psm)); - hdev = hci_get_route(dst, &chan->src); + hdev = hci_get_route(dst, &chan->src, chan->src_type); if (!hdev) return -EHOSTUNREACH; |