Bluetooth: Remove only enabled entries with Remove Device command
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 2 Jul 2014 14:37:28 +0000 (17:37 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 3 Jul 2014 15:42:57 +0000 (17:42 +0200)
commitc71593dd34ae1fd46777662a522a32cfde86f073
treeb83b4ed165bf1003e762079e06b26296d4d90e36
parenta3451d279f839d987cbcf25b0f3be666aef99d0b
Bluetooth: Remove only enabled entries with Remove Device command

The Remove Device mgmt command is supposed to undo what the Add Device
command does. An entry added by Add Device cannot have the
HCI_AUTO_CONN_DISABLED auto_connect value, so we should treat this as an
invalid entry to remove. This patch adds the necessary pieces to the
Remove Device command handler so that it only removes entries which were
added by Add Device.

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