File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,9 @@ __weak void bt_testing_trace_event_acl_pool_destroy(struct net_buf *buf)
273273#if defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL )
274274void bt_hci_host_num_completed_packets (struct net_buf * buf )
275275{
276+ struct bt_hci_cp_host_num_completed_packets * cp ;
276277 uint16_t handle = acl (buf )-> handle ;
278+ struct bt_hci_handle_count * hc ;
277279 struct bt_conn * conn ;
278280 uint8_t index = acl (buf )-> index ;
279281
@@ -303,7 +305,23 @@ void bt_hci_host_num_completed_packets(struct net_buf *buf)
303305
304306 bt_conn_unref (conn );
305307
306- bt_send_one_host_num_completed_packets (handle );
308+ LOG_DBG ("Reporting completed packet for handle %u" , handle );
309+
310+ buf = bt_hci_cmd_create (BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS ,
311+ sizeof (* cp ) + sizeof (* hc ));
312+ if (!buf ) {
313+ LOG_ERR ("Unable to allocate new HCI command" );
314+ return ;
315+ }
316+
317+ cp = net_buf_add (buf , sizeof (* cp ));
318+ cp -> num_handles = sys_cpu_to_le16 (1 );
319+
320+ hc = net_buf_add (buf , sizeof (* hc ));
321+ hc -> handle = sys_cpu_to_le16 (handle );
322+ hc -> count = sys_cpu_to_le16 (1 );
323+
324+ bt_hci_cmd_send (BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS , buf );
307325}
308326#endif /* defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL) */
309327
You can’t perform that action at this time.
0 commit comments