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 @@ -292,7 +292,9 @@ __weak void bt_testing_trace_event_acl_pool_destroy(struct net_buf *buf)
292292#if defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL )
293293void bt_hci_host_num_completed_packets (struct net_buf * buf )
294294{
295+ struct bt_hci_cp_host_num_completed_packets * cp ;
295296 uint16_t handle = acl (buf )-> handle ;
297+ struct bt_hci_handle_count * hc ;
296298 struct bt_conn * conn ;
297299 uint8_t index = acl (buf )-> index ;
298300
@@ -322,7 +324,23 @@ void bt_hci_host_num_completed_packets(struct net_buf *buf)
322324
323325 bt_conn_unref (conn );
324326
325- bt_send_one_host_num_completed_packets (handle );
327+ LOG_DBG ("Reporting completed packet for handle %u" , handle );
328+
329+ buf = bt_hci_cmd_create (BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS ,
330+ sizeof (* cp ) + sizeof (* hc ));
331+ if (!buf ) {
332+ LOG_ERR ("Unable to allocate new HCI command" );
333+ return ;
334+ }
335+
336+ cp = net_buf_add (buf , sizeof (* cp ));
337+ cp -> num_handles = sys_cpu_to_le16 (1 );
338+
339+ hc = net_buf_add (buf , sizeof (* hc ));
340+ hc -> handle = sys_cpu_to_le16 (handle );
341+ hc -> count = sys_cpu_to_le16 (1 );
342+
343+ bt_hci_cmd_send (BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS , buf );
326344}
327345#endif /* defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL) */
328346
You can’t perform that action at this time.
0 commit comments