提交 10994ce6 编写于 作者: J Johan Hedberg 提交者: Marcel Holtmann

Bluetooth: Check for flag instead of features in update_adv_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: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 7751ef1b
......@@ -632,7 +632,7 @@ static void update_adv_data(struct hci_request *req)
struct hci_cp_le_set_adv_data cp;
u8 len;
if (!lmp_le_capable(hdev))
if (!test_bit(HCI_LE_ENABLED, &hdev->dev_flags))
return;
memset(&cp, 0, sizeof(cp));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册