diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2021-09-28 13:10:14 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-09-29 00:39:40 +0300 |
commit | 823f3bc4e2eca7170c2367c050c5361cb1cd7c25 (patch) | |
tree | 04f160a3fee73d5a22eceb0a61a00753ecffa843 /net/bluetooth | |
parent | d1dcbf615af6c3d743fed00833b409259feb540a (diff) | |
download | linux-823f3bc4e2eca7170c2367c050c5361cb1cd7c25.tar.xz |
Bluetooth: Fix handling of experimental feature for quality reports
The existence of the experimental feature identifiy is the indication
that it is supported or not. No extra flag needed and the initial flag
should define if a feature is enabled or not. This is actually defined
in the management API definition.
Fixes: ae7d925b5c043 ("Bluetooth: Support the quality report events")
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/mgmt.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index a6aeefd2c14f..84336be4d00d 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -3863,19 +3863,12 @@ static int read_exp_features_info(struct sock *sk, struct hci_dev *hdev, idx++; } - if (hdev) { - if (hdev->set_quality_report) { - /* BIT(0): indicating if set_quality_report is - * supported by controller. - */ + if (hdev && hdev->set_quality_report) { + if (hci_dev_test_flag(hdev, HCI_QUALITY_REPORT)) flags = BIT(0); - - /* BIT(1): indicating if the feature is enabled. */ - if (hci_dev_test_flag(hdev, HCI_QUALITY_REPORT)) - flags |= BIT(1); - } else { + else flags = 0; - } + memcpy(rp->features[idx].uuid, quality_report_uuid, 16); rp->features[idx].flags = cpu_to_le32(flags); idx++; |