Bluetooth: controller: Fix ull_conn LSTO for must_expire
When CONFIG_BT_CTLR_CONN_META is enabled and the ticker "must_expire" feature is used, collisions may cause incorrect decrement of the supervision_expire counter, resulting in a too early link supervision timeout. Signed-off-by: Morten Priess <mtpr@oticon.com>
This commit is contained in:
parent
c8ccf4fbc8
commit
392e044548
4 changed files with 16 additions and 0 deletions
|
@ -1084,7 +1084,14 @@ void ull_conn_done(struct node_rx_event_done *done)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Events elapsed used in timeout checks below */
|
/* Events elapsed used in timeout checks below */
|
||||||
|
#if defined(CONFIG_BT_CTLR_CONN_META)
|
||||||
|
/* If event has shallow expiry do not add latency, but rely on
|
||||||
|
* accumulated lazy count.
|
||||||
|
*/
|
||||||
|
latency_event = conn->common.is_must_expire ? 0 : lll->latency_event;
|
||||||
|
#else
|
||||||
latency_event = lll->latency_event;
|
latency_event = lll->latency_event;
|
||||||
|
#endif
|
||||||
elapsed_event = latency_event + 1;
|
elapsed_event = latency_event + 1;
|
||||||
|
|
||||||
/* Slave drift compensation calc and new latency or
|
/* Slave drift compensation calc and new latency or
|
||||||
|
|
|
@ -59,6 +59,9 @@ struct ll_conn {
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
uint8_t fex_valid:1;
|
uint8_t fex_valid:1;
|
||||||
|
#if defined(CONFIG_BT_CTLR_CONN_META)
|
||||||
|
uint8_t is_must_expire:1;
|
||||||
|
#endif /* CONFIG_BT_CTLR_CONN_META */
|
||||||
} common;
|
} common;
|
||||||
|
|
||||||
#if defined(CONFIG_BT_PERIPHERAL)
|
#if defined(CONFIG_BT_PERIPHERAL)
|
||||||
|
|
|
@ -750,6 +750,9 @@ void ull_master_ticker_cb(uint32_t ticks_at_expire, uint32_t remainder, uint16_t
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(CONFIG_BT_CTLR_CONN_META)
|
||||||
|
conn->common.is_must_expire = (lazy == TICKER_LAZY_MUST_EXPIRE);
|
||||||
|
#endif
|
||||||
/* If this is a must-expire callback, LLCP state machine does not need
|
/* If this is a must-expire callback, LLCP state machine does not need
|
||||||
* to know. Will be called with lazy > 0 when scheduled in air.
|
* to know. Will be called with lazy > 0 when scheduled in air.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -375,6 +375,9 @@ void ull_slave_ticker_cb(uint32_t ticks_at_expire, uint32_t remainder,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(CONFIG_BT_CTLR_CONN_META)
|
||||||
|
conn->common.is_must_expire = (lazy == TICKER_LAZY_MUST_EXPIRE);
|
||||||
|
#endif
|
||||||
/* If this is a must-expire callback, LLCP state machine does not need
|
/* If this is a must-expire callback, LLCP state machine does not need
|
||||||
* to know. Will be called with lazy > 0 when scheduled in air.
|
* to know. Will be called with lazy > 0 when scheduled in air.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue