diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-07-08 14:07:51 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-08 14:22:06 +0200 |
commit | 73e082f80d990c017c695a6750f7ac96cdc6308a (patch) | |
tree | 23c41de743bdbdbfbf60af11d4c4439d0b599219 /net/bluetooth | |
parent | Bluetooth: Simplify usage of the enable_advertising function (diff) | |
download | linux-73e082f80d990c017c695a6750f7ac96cdc6308a.tar.xz linux-73e082f80d990c017c695a6750f7ac96cdc6308a.zip |
Bluetooth: Use the correct flag to decide to disable advertising
When deciding to call disable_advertising() we're interested in the real
state instead of the mgmt setting. Use therefore HCI_LE_ADV instead of
the HCI_ADVERTISING flag.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/mgmt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 68c0698124fb..9549d7366da2 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1301,7 +1301,7 @@ static int clean_up_hci_state(struct hci_dev *hdev) hci_req_add(&req, HCI_OP_WRITE_SCAN_ENABLE, 1, &scan); } - if (test_bit(HCI_ADVERTISING, &hdev->dev_flags)) + if (test_bit(HCI_LE_ADV, &hdev->dev_flags)) disable_advertising(&req); hci_stop_discovery(&req); @@ -2230,7 +2230,7 @@ static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len) hci_cp.le = val; hci_cp.simul = lmp_le_br_capable(hdev); } else { - if (test_bit(HCI_ADVERTISING, &hdev->dev_flags)) + if (test_bit(HCI_LE_ADV, &hdev->dev_flags)) disable_advertising(&req); } |