summaryrefslogtreecommitdiff
path: root/emulator/btdev.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-10-14 17:25:04 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-10-18 13:04:27 -0700
commit016084253bbdb1be81c5aef7d446f3c13bb4e823 (patch)
treecf25e4b0041bddb535be2297837ca91e416231fd /emulator/btdev.c
parent135f5d82586b42d7f68d04f97254702a3fb514f9 (diff)
downloadbluez-016084253bbdb1be81c5aef7d446f3c13bb4e823.tar.gz
vhci: Add functions to interface with debugfs
This adds functions that can be used to set debugfs options.
Diffstat (limited to 'emulator/btdev.c')
-rw-r--r--emulator/btdev.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/emulator/btdev.c b/emulator/btdev.c
index 0c0ebde40..f28187362 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -46,8 +46,6 @@
#define ISO_HANDLE 257
#define SCO_HANDLE 257
-#define DEBUGFS_PATH "/sys/kernel/debug/bluetooth"
-
struct hook {
btdev_hook_func handler;
void *user_data;
@@ -141,6 +139,7 @@ struct btdev {
uint8_t le_states[8];
const struct btdev_cmd *cmds;
uint16_t msft_opcode;
+ bool aosp_capable;
uint16_t default_link_policy;
uint8_t event_mask[8];
@@ -6677,3 +6676,23 @@ bool btdev_del_hook(struct btdev *btdev, enum btdev_hook_type type,
return false;
}
+
+int btdev_set_msft_opcode(struct btdev *btdev, uint16_t opcode)
+{
+ if (!btdev)
+ return -EINVAL;
+
+ btdev->msft_opcode = opcode;
+
+ return 0;
+}
+
+int btdev_set_aosp_capable(struct btdev *btdev, bool enable)
+{
+ if (!btdev)
+ return -EINVAL;
+
+ btdev->aosp_capable = enable;
+
+ return 0;
+}