diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-10-06 11:40:43 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-10-06 14:53:08 +0200 |
commit | 03d87419defc809261c4953e5b44f9e0c8f9029a (patch) | |
tree | 97d8886df89deff2bcd25d5270299bc6dc76dd4f | |
parent | Bluetooth: Add HCI structure for LE advertising parameters command (diff) | |
download | linux-03d87419defc809261c4953e5b44f9e0c8f9029a.tar.xz linux-03d87419defc809261c4953e5b44f9e0c8f9029a.zip |
Bluetooth: Make it clear that disabling LE disables advertising
This is not a functional change, just change the code to make it easy
to understand that advertising gets disabled before LE support will
be turned off.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r-- | net/bluetooth/mgmt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 719672203d02..e09ceff5979b 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1505,8 +1505,11 @@ static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len) hci_req_init(&req, hdev); - if (test_bit(HCI_ADVERTISING, &hdev->dev_flags) && !val) - hci_req_add(&req, HCI_OP_LE_SET_ADV_ENABLE, sizeof(val), &val); + if (test_bit(HCI_ADVERTISING, &hdev->dev_flags) && !val) { + u8 adv = 0x00; + + hci_req_add(&req, HCI_OP_LE_SET_ADV_ENABLE, sizeof(adv), &adv); + } hci_req_add(&req, HCI_OP_WRITE_LE_HOST_SUPPORTED, sizeof(hci_cp), &hci_cp); |