From: Johan Hedberg Date: Sat, 19 Oct 2013 20:38:15 +0000 (+0300) Subject: Bluetooth: Check for flag instead of features in update_scan_rsp_data() X-Git-Tag: next-20131021~69^2~8 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7751ef1b3184ecfaebc5e5a8981407814ce0be0b;p=karo-tx-linux.git 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 Signed-off-by: Marcel Holtmann --- 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) struct hci_cp_le_set_scan_rsp_data cp; u8 len; - if (!lmp_le_capable(hdev)) + if (!test_bit(HCI_LE_ENABLED, &hdev->dev_flags)) return; memset(&cp, 0, sizeof(cp));