Skip to content

Commit f31b974

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Host: Fix incorrect ACL buffer count
Fix incorrect ACL buffer count use when Controller used supports separate ISO buffers. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent a5265c5 commit f31b974

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

subsys/bluetooth/host/conn.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,15 @@ struct k_sem *bt_conn_get_pkts(struct bt_conn *conn)
132132
}
133133
#endif /* CONFIG_BT_BREDR */
134134
#if defined(CONFIG_BT_ISO)
135-
if (conn->type == BT_CONN_TYPE_ISO || bt_dev.le.iso_mtu) {
136-
if (bt_dev.le.iso_pkts.limit) {
135+
/* Use ISO pkts semaphore if LE Read Buffer Size command returned
136+
* dedicated ISO buffers.
137+
*/
138+
if (conn->type == BT_CONN_TYPE_ISO) {
139+
if (bt_dev.le.iso_mtu && bt_dev.le.iso_pkts.limit) {
137140
return &bt_dev.le.iso_pkts;
138141
}
142+
143+
return NULL;
139144
}
140145
#endif /* CONFIG_BT_ISO */
141146
#if defined(CONFIG_BT_CONN)

0 commit comments

Comments
 (0)