]> Pileus Git - ~andy/linux/commitdiff
Bluetooth: Set HCI_MGMT flag only in read_controller_info
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 24 Oct 2011 20:36:26 +0000 (22:36 +0200)
committerGustavo F. Padovan <padovan@profusion.mobi>
Mon, 7 Nov 2011 19:24:51 +0000 (17:24 -0200)
The HCI_MGMT flag should only be set when user space requests the full
controller information. This way we avoid potential issues with setting
change events ariving before the actual read_controller_info command
finishes.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/mgmt.c

index 38220a2dc31e9f3e45daf98f6dae303d9d026369..cbc8a6dfa5ed3e665355564907886fb8189792f7 100644 (file)
@@ -150,8 +150,6 @@ static int read_index_list(struct sock *sk)
        list_for_each_entry(d, &hci_dev_list, list) {
                hci_del_off_timer(d);
 
-               set_bit(HCI_MGMT, &d->flags);
-
                if (test_bit(HCI_SETUP, &d->flags))
                        continue;