diff options
| author | Marcel Holtmann <[email protected]> | 2021-04-06 19:55:52 +0000 |
|---|---|---|
| committer | Luiz Augusto von Dentz <[email protected]> | 2021-04-06 21:11:23 +0000 |
| commit | f67743f9e03a67dbbf931d1787e6faf50766e521 (patch) | |
| tree | 782f23cbd3708bc26ddc6126ba340a4a001d5fbb /net/bluetooth/aosp.c | |
| parent | Bluetooth: LL privacy allow RPA (diff) | |
| download | kernel-f67743f9e03a67dbbf931d1787e6faf50766e521.tar.gz kernel-f67743f9e03a67dbbf931d1787e6faf50766e521.zip | |
Bluetooth: Add support for reading AOSP vendor capabilities
When drivers indicate support for AOSP vendor extension, initialize them
and read its capabilities.
Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Luiz Augusto von Dentz <[email protected]>
Diffstat (limited to 'net/bluetooth/aosp.c')
| -rw-r--r-- | net/bluetooth/aosp.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/net/bluetooth/aosp.c b/net/bluetooth/aosp.c new file mode 100644 index 000000000000..a1b7762335a5 --- /dev/null +++ b/net/bluetooth/aosp.c @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2021 Intel Corporation + */ + +#include <net/bluetooth/bluetooth.h> +#include <net/bluetooth/hci_core.h> + +#include "aosp.h" + +void aosp_do_open(struct hci_dev *hdev) +{ + struct sk_buff *skb; + + if (!hdev->aosp_capable) + return; + + bt_dev_dbg(hdev, "Initialize AOSP extension"); + + /* LE Get Vendor Capabilities Command */ + skb = __hci_cmd_sync(hdev, hci_opcode_pack(0x3f, 0x153), 0, NULL, + HCI_CMD_TIMEOUT); + if (IS_ERR(skb)) + return; + + kfree_skb(skb); +} + +void aosp_do_close(struct hci_dev *hdev) +{ + if (!hdev->aosp_capable) + return; + + bt_dev_dbg(hdev, "Cleanup of AOSP extension"); +} |
