aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2013-10-19 16:38:15 -0400
committerMarcel Holtmann <marcel@holtmann.org>2013-10-20 12:05:40 -0400
commit7751ef1b3184ecfaebc5e5a8981407814ce0be0b (patch)
tree72a25938388c97707e1e15858c3825d22bfc5e7d /net/bluetooth/mgmt.c
parent2be48b654242bf0fe3a72e1c3fbc790154e3984a (diff)
Bluetooth: Check for flag instead of features in update_scan_rsp_data()
It's better to check for the device flag instead of device features so that we avoid unnecessary HCI commands when the feature is supported but disabled (i.e. the flag is unset). Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-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 fb7fc9f17af1..f39bab059fcc 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -568,7 +568,7 @@ static void update_scan_rsp_data(struct hci_request *req)
568 struct hci_cp_le_set_scan_rsp_data cp; 568 struct hci_cp_le_set_scan_rsp_data cp;
569 u8 len; 569 u8 len;
570 570
571 if (!lmp_le_capable(hdev)) 571 if (!test_bit(HCI_LE_ENABLED, &hdev->dev_flags))
572 return; 572 return;
573 573
574 memset(&cp, 0, sizeof(cp)); 574 memset(&cp, 0, sizeof(cp));