forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Showing
6 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
/* | ||
* Copyright (C) 2021 Intel Corporation | ||
*/ | ||
|
||
#if IS_ENABLED(CONFIG_BT_AOSPEXT) | ||
|
||
void aosp_do_open(struct hci_dev *hdev); | ||
void aosp_do_close(struct hci_dev *hdev); | ||
|
||
#else | ||
|
||
static inline void aosp_do_open(struct hci_dev *hdev) {} | ||
static inline void aosp_do_close(struct hci_dev *hdev) {} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters