diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2021-09-28 12:10:15 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-09-28 14:39:40 -0700 |
commit | 7f7fd17ed7c5228229f55f2082c0fd784cc4dad4 (patch) | |
tree | d5f23d3865d5aeb000534289edc5219d82c4ca57 /net/bluetooth | |
parent | 823f3bc4e2eca7170c2367c050c5361cb1cd7c25 (diff) | |
download | linux-7f7fd17ed7c5228229f55f2082c0fd784cc4dad4.tar.bz2 |
Bluetooth: Fix handling of experimental feature for codec offload
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: ad93315183285 ("Bluetooth: Add offload feature under experimental flag")
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 | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 84336be4d00d..3e5283607b97 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -3874,21 +3874,12 @@ static int read_exp_features_info(struct sock *sk, struct hci_dev *hdev, idx++; } - if (hdev) { - if (hdev->get_data_path_id) { - /* BIT(0): indicating if offload codecs are - * supported by controller. - */ + if (hdev && hdev->get_data_path_id) { + if (hci_dev_test_flag(hdev, HCI_OFFLOAD_CODECS_ENABLED)) flags = BIT(0); - - /* BIT(1): indicating if codec offload feature - * is enabled. - */ - if (hci_dev_test_flag(hdev, HCI_OFFLOAD_CODECS_ENABLED)) - flags |= BIT(1); - } else { + else flags = 0; - } + memcpy(rp->features[idx].uuid, offload_codecs_uuid, 16); rp->features[idx].flags = cpu_to_le32(flags); idx++; |