mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
![Marcel Holtmann](/assets/img/avatar_default.png)
When drivers indicate support for AOSP vendor extension, initialize them and read its capabilities. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
35 lines
647 B
C
35 lines
647 B
C
// 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");
|
|
}
|