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