diff options
author | Chethan T N <chethan.tumkur.narayan@intel.com> | 2022-11-22 10:02:57 +0100 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-12-02 22:09:31 +0100 |
commit | 828cea2b71de501827f62d3c92d149f6052ad01e (patch) | |
tree | 3c9687924f42dca349d510417f19f3a2bfe1536f /net/bluetooth/hci_sync.c | |
parent | Bluetooth: Remove codec id field in vendor codec definition (diff) | |
download | linux-828cea2b71de501827f62d3c92d149f6052ad01e.tar.xz linux-828cea2b71de501827f62d3c92d149f6052ad01e.zip |
Bluetooth: Fix support for Read Local Supported Codecs V2
Handling of Read Local Supported Codecs was broken during the
HCI serialization design change patches.
Fixes: d0b137062b2d ("Bluetooth: hci_sync: Rework init stages")
Signed-off-by: Chethan T N <chethan.tumkur.narayan@intel.com>
Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth/hci_sync.c')
-rw-r--r-- | net/bluetooth/hci_sync.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index a91145e167f2..1fc693122a47 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -12,6 +12,7 @@ #include <net/bluetooth/mgmt.h> #include "hci_request.h" +#include "hci_codec.h" #include "hci_debugfs.h" #include "smp.h" #include "eir.h" @@ -4239,11 +4240,12 @@ static int hci_set_event_mask_page_2_sync(struct hci_dev *hdev) /* Read local codec list if the HCI command is supported */ static int hci_read_local_codecs_sync(struct hci_dev *hdev) { - if (!(hdev->commands[29] & 0x20)) - return 0; + if (hdev->commands[45] & 0x04) + hci_read_supported_codecs_v2(hdev); + else if (hdev->commands[29] & 0x20) + hci_read_supported_codecs(hdev); - return __hci_cmd_sync_status(hdev, HCI_OP_READ_LOCAL_CODECS, 0, NULL, - HCI_CMD_TIMEOUT); + return 0; } /* Read local pairing options if the HCI command is supported */ |