mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-07-31 15:17:54 +00:00
Merge pull request #837 from andrzej-kaczmarek/nimble-numpktcmp-fix
nimble/ll: Fix sending HCI Number of Completed Packets event X-Original-Commit: 356528ca3c7307d38ceb6b44ab452e9c6d74f2a9
This commit is contained in:
@@ -279,8 +279,8 @@ ble_ll_conn_num_comp_pkts_event_send(struct ble_ll_conn_sm *connsm)
|
||||
* have completed but there are data packets in the controller buffers
|
||||
* (i.e. enqueued in a connection state machine).
|
||||
*/
|
||||
if ((uint32_t)(g_ble_ll_last_num_comp_pkt_evt - os_time_get()) <
|
||||
(MYNEWT_VAL(BLE_NUM_COMP_PKT_RATE) * OS_TICKS_PER_SEC)) {
|
||||
if ((int32_t)(os_time_get() - g_ble_ll_last_num_comp_pkt_evt) <
|
||||
MYNEWT_VAL(BLE_NUM_COMP_PKT_RATE)) {
|
||||
/*
|
||||
* If this connection has completed packets, send an event right away.
|
||||
* We do this to increase throughput but we dont want to search the
|
||||
@@ -354,8 +354,7 @@ skip_conn:
|
||||
}
|
||||
|
||||
if (event_sent) {
|
||||
g_ble_ll_last_num_comp_pkt_evt = os_time_get() +
|
||||
(MYNEWT_VAL(BLE_NUM_COMP_PKT_RATE) * OS_TICKS_PER_SEC);
|
||||
g_ble_ll_last_num_comp_pkt_evt = os_time_get();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ syscfg.defs:
|
||||
Determines the maximum rate at which the controller will send the
|
||||
number of completed packets event to the host. Rate is in os time
|
||||
ticks.
|
||||
value: '((2000 * OS_TICKS_PER_SEC) / 1000)'
|
||||
value: '(2 * OS_TICKS_PER_SEC)'
|
||||
|
||||
BLE_LL_MFRG_ID:
|
||||
description: >
|
||||
|
||||
Reference in New Issue
Block a user