summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2011-01-04 11:54:26 +0200
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-08 01:40:05 -0200
commitebc99feba7378349e2bfae7018af062767382f6c (patch)
tree9b96786754f82be87e562c15c9defc88e46db855 /net/bluetooth/mgmt.c
parent72a734ec1aca8cd2ef3fc85428c11bde662e149e (diff)
downloadblackbird-op-linux-ebc99feba7378349e2bfae7018af062767382f6c.tar.gz
blackbird-op-linux-ebc99feba7378349e2bfae7018af062767382f6c.zip
Bluetooth: Add flag to track managment controlled adapters
This patch adds a HCI_MGMT flag to track adapters which are under the control of the management interface. This is needed to make sure that new kernels will work with old user space versions. I.e. behaviour which could break old user space versions (but is needed by the management interface) should not be exhibited when the HCI_MGMT flag is not set. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index dbb1e5776644..5f871b385a27 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -142,6 +142,8 @@ static int read_index_list(struct sock *sk)
hci_del_off_timer(d);
+ set_bit(HCI_MGMT, &d->flags);
+
if (test_bit(HCI_SETUP, &d->flags))
continue;
@@ -200,6 +202,8 @@ static int read_controller_info(struct sock *sk, unsigned char *data, u16 len)
hci_dev_lock_bh(hdev);
+ set_bit(HCI_MGMT, &hdev->flags);
+
put_unaligned_le16(hdev->id, &rp->index);
rp->type = hdev->dev_type;
OpenPOWER on IntegriCloud