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)
228
228
#if defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL )
229
229
void bt_hci_host_num_completed_packets (struct net_buf * buf )
230
230
{
231
+ struct bt_hci_cp_host_num_completed_packets * cp ;
231
232
uint16_t handle = acl (buf )-> handle ;
233
+ struct bt_hci_handle_count * hc ;
232
234
struct bt_conn * conn ;
233
235
uint8_t index = acl (buf )-> index ;
234
236
@@ -254,7 +256,23 @@ void bt_hci_host_num_completed_packets(struct net_buf *buf)
254
256
255
257
bt_conn_unref (conn );
256
258
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 );
258
276
}
259
277
#endif /* defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL) */
260
278
You can’t perform that action at this time.
0 commit comments