Bluetooth: Controller: Fix LE Ping PDU dispatch
It was observed that due to possible CRC errors, one connection interval was not sufficient by the peer to respond to LE Ping PDU which caused the Controller to generate the Authenticated Payload Timeout event to host. This fix advanced the dispatch of LE Ping PDU by 6 connection intervals that the peer would listen to before the 30s timeout. Change-id: I6c292c623047a05b4e771e70093d87228db62cce Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
This commit is contained in:
parent
16ef73423e
commit
c78601481d
1 changed files with 26 additions and 12 deletions
|
@ -662,12 +662,16 @@ static inline uint32_t isr_rx_adv(uint8_t devmatch_ok, uint8_t irkmatch_ok,
|
|||
conn_interval_us);
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_CONTROLLER_LE_PING)
|
||||
/* APTO in no. of connection events */
|
||||
conn->apto_reload = RADIO_CONN_EVENTS((30 * 1000 * 1000),
|
||||
conn_interval_us);
|
||||
conn->appto_reload =
|
||||
(conn->apto_reload > (conn->latency + 2)) ?
|
||||
(conn->apto_reload - (conn->latency + 2)) :
|
||||
conn->apto_reload;
|
||||
/* Dispatch LE Ping PDU 6 connection events (that peer would
|
||||
* listen to) before 30s timeout
|
||||
* TODO: "peer listens to" is greater than 30s due to latency
|
||||
*/
|
||||
conn->appto_reload = (conn->apto_reload > (conn->latency + 6)) ?
|
||||
(conn->apto_reload - (conn->latency + 6)) :
|
||||
conn->apto_reload;
|
||||
#endif /* CONFIG_BLUETOOTH_CONTROLLER_LE_PING */
|
||||
|
||||
/* Prepare the rx packet structure */
|
||||
|
@ -4742,12 +4746,16 @@ static inline uint32_t event_conn_update_prep(struct connection *conn,
|
|||
RADIO_CONN_EVENTS((40 * 1000 * 1000), conn_interval_us);
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_CONTROLLER_LE_PING)
|
||||
/* APTO in no. of connection events */
|
||||
conn->apto_reload = RADIO_CONN_EVENTS((30 * 1000 * 1000),
|
||||
conn_interval_us);
|
||||
conn->appto_reload =
|
||||
(conn->apto_reload > (conn->latency + 2)) ?
|
||||
(conn->apto_reload - (conn->latency + 2)) :
|
||||
conn->apto_reload;
|
||||
/* Dispatch LE Ping PDU 6 connection events (that peer would
|
||||
* listen to) before 30s timeout
|
||||
* TODO: "peer listens to" is greater than 30s due to latency
|
||||
*/
|
||||
conn->appto_reload = (conn->apto_reload > (conn->latency + 6)) ?
|
||||
(conn->apto_reload - (conn->latency + 6)) :
|
||||
conn->apto_reload;
|
||||
#endif /* CONFIG_BLUETOOTH_CONTROLLER_LE_PING */
|
||||
|
||||
if (!conn->llcp.connection_update.is_internal) {
|
||||
|
@ -7337,11 +7345,17 @@ uint32_t radio_connect_enable(uint8_t adv_addr_type, uint8_t *adv_addr,
|
|||
conn->procedure_expire = 0;
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_CONTROLLER_LE_PING)
|
||||
conn->apto_reload =
|
||||
RADIO_CONN_EVENTS((30 * 1000 * 1000), conn_interval_us);
|
||||
/* APTO in no. of connection events */
|
||||
conn->apto_reload = RADIO_CONN_EVENTS((30 * 1000 * 1000),
|
||||
conn_interval_us);
|
||||
/* Dispatch LE Ping PDU 6 connection events (that peer would listen to)
|
||||
* before 30s timeout
|
||||
* TODO: "peer listens to" is greater than 30s due to latency
|
||||
*/
|
||||
conn->appto_reload = (conn->apto_reload > (conn->latency + 6)) ?
|
||||
(conn->apto_reload - (conn->latency + 6)) :
|
||||
conn->apto_reload;
|
||||
conn->apto_expire = 0;
|
||||
conn->appto_reload = (conn->apto_reload > (conn->latency + 2)) ?
|
||||
(conn->apto_reload - (conn->latency + 2)) : conn->apto_reload;
|
||||
conn->appto_expire = 0;
|
||||
#endif /* CONFIG_BLUETOOTH_CONTROLLER_LE_PING */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue