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 @@ -228,7 +228,9 @@ void bt_send_one_host_num_completed_packets(uint16_t handle)
228228#if defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL )
229229void bt_hci_host_num_completed_packets (struct net_buf * buf )
230230{
231+ struct bt_hci_cp_host_num_completed_packets * cp ;
231232 uint16_t handle = acl (buf )-> handle ;
233+ struct bt_hci_handle_count * hc ;
232234 struct bt_conn * conn ;
233235 uint8_t index = acl (buf )-> index ;
234236
@@ -254,7 +256,23 @@ void bt_hci_host_num_completed_packets(struct net_buf *buf)
254256
255257 bt_conn_unref (conn );
256258
257- bt_send_one_host_num_completed_packets (handle );
259+ LOG_DBG ("Reporting completed packet for handle %u" , handle );
260+
261+ buf = bt_hci_cmd_create (BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS ,
262+ sizeof (* cp ) + sizeof (* hc ));
263+ if (!buf ) {
264+ LOG_ERR ("Unable to allocate new HCI command" );
265+ return ;
266+ }
267+
268+ cp = net_buf_add (buf , sizeof (* cp ));
269+ cp -> num_handles = sys_cpu_to_le16 (1 );
270+
271+ hc = net_buf_add (buf , sizeof (* hc ));
272+ hc -> handle = sys_cpu_to_le16 (handle );
273+ hc -> count = sys_cpu_to_le16 (1 );
274+
275+ bt_hci_cmd_send (BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS , buf );
258276}
259277#endif /* defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL) */
260278
You can’t perform that action at this time.
0 commit comments