Bluetooth: Fix link security setting when powering on
authorJohan Hedberg <johan.hedberg@intel.com>
Sun, 27 Jan 2013 14:32:00 +0000 (08:32 -0600)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Fri, 1 Feb 2013 17:50:18 +0000 (15:50 -0200)
commitf0ff92fbfa14c1cf8c0346f1dde9c3eda26d5abf
tree0fe912f4c5f6d64f9e08ee77e6daf36d5caa3a82
parentc00d575bd550d3d57aeec2522defa0cea589560c
Bluetooth: Fix link security setting when powering on

If a controller is powered on while the HCI_AUTO_OFF flag is set the
link security setting (HCI_LINK_SECURITY) might not be in sync with the
actual state of the controller (HCI_AUTH). This patch fixes the issue by
checking for inequality between the intended and actual settings and
sends a HCI_Write_Auth_Enable command if necessary.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/mgmt.c