mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-03 21:47:22 +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
|
* have completed but there are data packets in the controller buffers
|
||||||
* (i.e. enqueued in a connection state machine).
|
* (i.e. enqueued in a connection state machine).
|
||||||
*/
|
*/
|
||||||
if ((uint32_t)(g_ble_ll_last_num_comp_pkt_evt - os_time_get()) <
|
if ((int32_t)(os_time_get() - g_ble_ll_last_num_comp_pkt_evt) <
|
||||||
(MYNEWT_VAL(BLE_NUM_COMP_PKT_RATE) * OS_TICKS_PER_SEC)) {
|
MYNEWT_VAL(BLE_NUM_COMP_PKT_RATE)) {
|
||||||
/*
|
/*
|
||||||
* If this connection has completed packets, send an event right away.
|
* If this connection has completed packets, send an event right away.
|
||||||
* We do this to increase throughput but we dont want to search the
|
* We do this to increase throughput but we dont want to search the
|
||||||
@@ -354,8 +354,7 @@ skip_conn:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (event_sent) {
|
if (event_sent) {
|
||||||
g_ble_ll_last_num_comp_pkt_evt = os_time_get() +
|
g_ble_ll_last_num_comp_pkt_evt = os_time_get();
|
||||||
(MYNEWT_VAL(BLE_NUM_COMP_PKT_RATE) * OS_TICKS_PER_SEC);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ syscfg.defs:
|
|||||||
Determines the maximum rate at which the controller will send the
|
Determines the maximum rate at which the controller will send the
|
||||||
number of completed packets event to the host. Rate is in os time
|
number of completed packets event to the host. Rate is in os time
|
||||||
ticks.
|
ticks.
|
||||||
value: '((2000 * OS_TICKS_PER_SEC) / 1000)'
|
value: '(2 * OS_TICKS_PER_SEC)'
|
||||||
|
|
||||||
BLE_LL_MFRG_ID:
|
BLE_LL_MFRG_ID:
|
||||||
description: >
|
description: >
|
||||||
|
|||||||
Reference in New Issue
Block a user