summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-02 16:37:34 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-07-03 17:42:58 +0200
commitc103aea6f709c68916160eca4ed20224934e62d7 (patch)
tree8f0884cd232cc62620df8126cb273e1872314b0e /net/bluetooth/mgmt.c
parentBluetooth: Make is_identity_address a global function (diff)
downloadlinux-c103aea6f709c68916160eca4ed20224934e62d7.tar.xz
linux-c103aea6f709c68916160eca4ed20224934e62d7.zip
Bluetooth: Don't send connection parameters without identity address
If we don't have an identity address for connection parameters it doesn't really make sense to send them to user space. Instead just ignore them for now. Later we can add support for sending them when we eventually get the identity through pairing. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to '')
-rw-r--r--net/bluetooth/mgmt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index fb1aa0cac137..50a0a3ec50b0 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5795,6 +5795,9 @@ void mgmt_new_conn_param(struct hci_dev *hdev, bdaddr_t *bdaddr,
{
struct mgmt_ev_new_conn_param ev;
+ if (!hci_is_identity_address(bdaddr, bdaddr_type))
+ return;
+
memset(&ev, 0, sizeof(ev));
bacpy(&ev.addr.bdaddr, bdaddr);
ev.addr.type = link_to_bdaddr(LE_LINK, bdaddr_type);