Skip to content

Commit e5a694b

Browse files
committed
Revert "[nrf noup] bluetooth: att: Allow ATT sent callback after data TX is done"
This reverts commit d1d9b2d. Signed-off-by: Marek Pieta <[email protected]>
1 parent 65b8128 commit e5a694b

File tree

2 files changed

+1
-33
lines changed

2 files changed

+1
-33
lines changed

subsys/bluetooth/host/Kconfig.gatt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,6 @@ config BT_ATT_RETRY_ON_SEC_ERR
3838
If an ATT request fails due to insufficient security, the host will
3939
try to elevate the security level and retry the ATT request.
4040

41-
config BT_ATT_SENT_CB_AFTER_TX
42-
bool "Delay ATT sent callback until data transmission is done by controller [EXPERIMENTAL]"
43-
select EXPERIMENTAL
44-
help
45-
By default, the BLE stack calls sent callback for ATT data when the
46-
data is passed to BLE controller for transmission. Enabling this
47-
Kconfig option delays calling the sent callback until data
48-
transmission is finished by BLE controller (the callback is called
49-
upon receiving the Number of Completed Packets HCI Event).
50-
51-
The feature is not available in Zephyr RTOS (it's specific to NCS
52-
Zephyr fork). It is a temporary solution allowing to control flow of
53-
GATT notifications with HID reports for HID use-case.
54-
55-
Enabling this option may require increasing CONFIG_BT_CONN_TX_MAX in
56-
configuration, because ATT would use additional TX contexts.
57-
5841
config BT_EATT
5942
bool "Enhanced ATT Bearers support [EXPERIMENTAL]"
6043
depends on BT_L2CAP_ECRED

subsys/bluetooth/host/att.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -328,13 +328,6 @@ static void att_disconnect(struct bt_att_chan *chan)
328328
}
329329
}
330330

331-
static void chan_sent_cb(struct bt_conn *conn, void *user_data, int err)
332-
{
333-
struct net_buf *nb = user_data;
334-
335-
net_buf_unref(nb);
336-
}
337-
338331
/* In case of success the ownership of the buffer is transferred to the stack
339332
* which takes care of releasing it when it completes transmitting to the
340333
* controller.
@@ -428,15 +421,7 @@ static int chan_send(struct bt_att_chan *chan, struct net_buf *buf)
428421

429422
data->att_chan = chan;
430423

431-
if (IS_ENABLED(CONFIG_BT_ATT_SENT_CB_AFTER_TX)) {
432-
err = bt_l2cap_send_pdu(&chan->chan, buf, chan_sent_cb, net_buf_ref(buf));
433-
if (err) {
434-
net_buf_unref(buf);
435-
}
436-
} else {
437-
err = bt_l2cap_send_pdu(&chan->chan, buf, NULL, NULL);
438-
}
439-
424+
err = bt_l2cap_send_pdu(&chan->chan, buf, NULL, NULL);
440425
if (err) {
441426
if (err == -ENOBUFS) {
442427
LOG_ERR("Ran out of TX buffers or contexts.");

0 commit comments

Comments
 (0)