Skip to content

Instantly share code, notes, and snippets.

View Vudentz's full-sized avatar

Luiz Augusto von Dentz Vudentz

View GitHub Profile
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 1ada4f85e982..63e0b58d2009 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -586,6 +586,15 @@ static inline struct sk_buff *bt_skb_sendmmsg(struct sock *sk,
return skb;
}
+static inline int bt_copy_from_sockptr(void *dst, size_t dst_size,
+ sockptr_t src, size_t src_size)
diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 2b44273b24e7..c1636c7415a7 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -1969,6 +1969,7 @@ static void setup_connect_io_broadcast(struct bap_data *data,
bdaddr_t dst_addr = {0};
char addr[18];
struct bt_iso_base base;
+ struct iovec *iov;
btproxy[2554899]: < HCI Command: LE Set Periodic Advertising Data (0x08|0x003f) plen 41 #2041 [hci2] 09:27:16.438587
Handle: 1
Operation: Complete ext advertising data (0x03)
Data length: 0x26
Service Data: Basic Audio Announcement (0x1851)
Presetation Delay: 40000
Number of Subgroups: 1
Subgroup #0:
Number of BIS(s): 1
Codec: LC3 (0x06)
Create a local endpoint and an endpoint for BIS1:
endpoint.register 00001852-0000-1000-8000-00805f9b34fb 0x06
[/local/endpoint/ep0] Auto Accept (yes/no): y
[/local/endpoint/ep0] Max Transports (auto/value): a
[/local/endpoint/ep0] Locations: 0x03
[/local/endpoint/ep0] Supported Context (value): 0
Configure BIS1, create BIS1 transport and endpoint for BIS2:
endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1
[/local/endpoint/ep0] BIG (auto/value): 0x01
< HCI Command: LE Periodic.. (0x08|0x0044) plen 14 #111 [hci0] 09:02:31.796831
Options: 0x0000
Use advertising SID, Advertiser Address Type and address
Reporting initially enabled
SID: 0x00
Adv address type: Public (0x00)
Adv address: 00:AA:01:01:00:00 (Intel Corporation)
Skip: 0x0000
Sync timeout: 163840 msec (0x4000)
Sync CTE type: 0x0000
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 34c8dca2069f..d39e9c158dae 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1522,8 +1522,8 @@ static void hci_cmd_timeout(struct work_struct *work)
struct hci_dev *hdev = container_of(work, struct hci_dev,
cmd_timer.work);
- if (hdev->sent_cmd) {
- u16 opcode = hci_skb_opcode(hdev->sent_cmd);
> HCI Event: LE Meta Event (0x3e) plen 16 #376 [hci2] 13:39:24.536443
LE Periodic Advertising Sync Established (0x0e)
Status: Success (0x00)
Sync handle: 1
Advertising SID: 0x00
Advertiser address type: Random (0x01)
Advertiser address: 30:CC:09:D8:45:8C (Non-Resolvable)
Advertiser PHY: LE 1M (0x01)
Periodic advertising interval: 240.00 msec (0x00c0)
Advertiser clock accuracy: 0x07
[bluetooth]# endpoint.config /org/bluez/hci0/dev_1B_2D_FB_E6_89_5B/pac_bcast0 /local/endpoint
/ep0 16_2_1
Configuration.#0: len 0x02 type 0x01
Configuration.Sampling Frequency: 16 Khz (0x03)
Configuration.#1: len 0x02 type 0x02
Configuration.Frame Duration: 10 ms (0x01)
Configuration.#2: len 0x03 type 0x04
Configuration.Frame Length: 40 (0x0028)
BIG 0x00
BIS 0x00
diff --git a/obexd/src/plugin.c b/obexd/src/plugin.c
index 212299fa5b32..74b5c79780f6 100644
--- a/obexd/src/plugin.c
+++ b/obexd/src/plugin.c
@@ -34,17 +34,17 @@
#define PLUGINFLAG (RTLD_NOW)
#endif
+#define IS_ENABLED(x) (x)
+
[bluetooth]# endpoint.config /org/bluez/hci0/dev_36_99_49_AC_BE_BA/pac_bcast0 /local/endpoint
/bcaa/lc3 16_2_1
bluetoothd[39]: profiles/audio/bap.c:setup_create_io() setup 0x5b9c860 stream 0x5b9cba0 defer true
==39== Invalid read of size 1
==39== at 0x438159: btd_device_get_bdaddr_type (device.c:3221)
==39== by 0x38F32B: setup_listen_io_broadcast (bap.c:1924)
==39== by 0x38F32B: setup_create_bcast_io (bap.c:2018)
==39== by 0x38F32B: setup_create_io (bap.c:2038)
==39== by 0x390B99: bap_state (bap.c:2072)
==39== by 0x4ED261: bap_stream_state_changed (bap.c:1318)