]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
Bluetooth: Fix address value for early disconnection events
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 20 Mar 2014 10:54:16 +0000 (12:54 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 20 Mar 2014 16:14:26 +0000 (09:14 -0700)
commit61b1a7fbda6f761ebe16a62124578ca0779d9365
treeadbfc3fa3d25de3172044fff69a0ff50cedc146d
parent39adbffe4b16285c54016d3e64471396354ae49f
Bluetooth: Fix address value for early disconnection events

We need to ensure that we do not send events to user space with the
identity address if we have not yet notified user space of the IRK. The
code was previously trying to handle this for the mgmt_pair_device
response (which worked well enough) but this is not the only connection
related event that might be sent to user space before pairing is
successful: another important event is Device Disconnected.

The issue can actually be solved more simply than the solution
previously used for mgmt_pair_device. Since we do have the identity
address tracked as part of the remote IRK struct we can just copy it
over from there to the hci_conn struct once we've for real sent the mgmt
event for the new IRK.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt.c
net/bluetooth/smp.c