summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorMichał Narajowski <michal.narajowski@codecoup.pl>2016-09-22 17:01:39 +0300
committerMarcel Holtmann <marcel@holtmann.org>2016-09-22 18:48:23 +0300
commit7dc6f16c68757548a332a0c5fbe661987c2189a9 (patch)
tree181d0379a7c402f044c7bbfb6d969c7323ba9fda /net/bluetooth
parent1144a4eed04b2c3e7d20146d1b76f7669b55971d (diff)
downloadlinux-7dc6f16c68757548a332a0c5fbe661987c2189a9.tar.xz
Bluetooth: Fix not updating scan rsp when adv off
Scan response data should not be updated unless there is an advertising instance. Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/mgmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 63f42f45a96a..19b8a5e9420d 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -3159,7 +3159,7 @@ static int set_local_name(struct sock *sk, struct hci_dev *hdev, void *data,
/* The name is stored in the scan response data and so
* no need to udpate the advertising data here.
*/
- if (lmp_le_capable(hdev))
+ if (lmp_le_capable(hdev) && hci_dev_test_flag(hdev, HCI_ADVERTISING))
__hci_req_update_scan_rsp_data(&req, hdev->cur_adv_instance);
err = hci_req_run(&req, set_name_complete);