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: ae7d925b5c
("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>
This commit is contained in:
Родитель
d1dcbf615a
Коммит
823f3bc4e2
|
@ -3863,19 +3863,12 @@ static int read_exp_features_info(struct sock *sk, struct hci_dev *hdev,
|
||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hdev) {
|
if (hdev && hdev->set_quality_report) {
|
||||||
if (hdev->set_quality_report) {
|
if (hci_dev_test_flag(hdev, HCI_QUALITY_REPORT))
|
||||||
/* BIT(0): indicating if set_quality_report is
|
|
||||||
* supported by controller.
|
|
||||||
*/
|
|
||||||
flags = BIT(0);
|
flags = BIT(0);
|
||||||
|
else
|
||||||
/* BIT(1): indicating if the feature is enabled. */
|
|
||||||
if (hci_dev_test_flag(hdev, HCI_QUALITY_REPORT))
|
|
||||||
flags |= BIT(1);
|
|
||||||
} else {
|
|
||||||
flags = 0;
|
flags = 0;
|
||||||
}
|
|
||||||
memcpy(rp->features[idx].uuid, quality_report_uuid, 16);
|
memcpy(rp->features[idx].uuid, quality_report_uuid, 16);
|
||||||
rp->features[idx].flags = cpu_to_le32(flags);
|
rp->features[idx].flags = cpu_to_le32(flags);
|
||||||
idx++;
|
idx++;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче