Revert "Bluetooth: host: extract sending of host num complete"
This reverts commit 32212bfb63
.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit is contained in:
parent
da9acbcf11
commit
971c2c9426
1 changed files with 19 additions and 1 deletions
|
@ -292,7 +292,9 @@ __weak void bt_testing_trace_event_acl_pool_destroy(struct net_buf *buf)
|
|||
#if defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL)
|
||||
void bt_hci_host_num_completed_packets(struct net_buf *buf)
|
||||
{
|
||||
struct bt_hci_cp_host_num_completed_packets *cp;
|
||||
uint16_t handle = acl(buf)->handle;
|
||||
struct bt_hci_handle_count *hc;
|
||||
struct bt_conn *conn;
|
||||
uint8_t index = acl(buf)->index;
|
||||
|
||||
|
@ -322,7 +324,23 @@ void bt_hci_host_num_completed_packets(struct net_buf *buf)
|
|||
|
||||
bt_conn_unref(conn);
|
||||
|
||||
bt_send_one_host_num_completed_packets(handle);
|
||||
LOG_DBG("Reporting completed packet for handle %u", handle);
|
||||
|
||||
buf = bt_hci_cmd_create(BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS,
|
||||
sizeof(*cp) + sizeof(*hc));
|
||||
if (!buf) {
|
||||
LOG_ERR("Unable to allocate new HCI command");
|
||||
return;
|
||||
}
|
||||
|
||||
cp = net_buf_add(buf, sizeof(*cp));
|
||||
cp->num_handles = sys_cpu_to_le16(1);
|
||||
|
||||
hc = net_buf_add(buf, sizeof(*hc));
|
||||
hc->handle = sys_cpu_to_le16(handle);
|
||||
hc->count = sys_cpu_to_le16(1);
|
||||
|
||||
bt_hci_cmd_send(BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS, buf);
|
||||
}
|
||||
#endif /* defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL) */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue