mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-06 05:14:45 +00:00
nimble/ll: Fix BLE_LL_CONN_INIT_MIN_WIN_OFFSET
The code which calculates earliest connection event start does not take BLE_LL_CONN_INIT_MIN_WIN_OFFSET into account, but we still update tx windows offset in state machine with its value. As a result when this setting is set to non-zero value we schedule first connection event earlier than what slave calculates from CONNECT_IND PDU so connection cannot be established. X-Original-Commit: cf8ca1b0a6fab4e5d1c579fe37ee2adc4e3a1e07
This commit is contained in:
@@ -402,6 +402,8 @@ ble_ll_sched_master_new(struct ble_ll_conn_sm *connsm,
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
earliest_start += MYNEWT_VAL(BLE_LL_CONN_INIT_MIN_WIN_OFFSET) *
|
||||
BLE_LL_SCHED_32KHZ_TICKS_PER_SLOT;
|
||||
itvl_t = connsm->conn_itvl_ticks;
|
||||
|
||||
/* We have to find a place for this schedule */
|
||||
@@ -630,6 +632,8 @@ ble_ll_sched_master_new(struct ble_ll_conn_sm *connsm,
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
earliest_start += MYNEWT_VAL(BLE_LL_CONN_INIT_MIN_WIN_OFFSET) *
|
||||
BLE_LL_SCHED_32KHZ_TICKS_PER_SLOT;
|
||||
earliest_end = earliest_start + dur;
|
||||
itvl_t = connsm->conn_itvl_ticks;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user