Bluetooth: controller: Fix slave latency enable at conn setup
Fix implementation to maintain a connection in the slave role not taking slave latency into use before receiving an acknowledgement from the master. This fixes TP/CON/ADV/BV-03-C [Master Missing Slave Packets] in LL.TS.5.0.0. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no> Tested-by: Ulrich Myhre <ulmy@nordicsemi.no>
This commit is contained in:
parent
3ac9ca0859
commit
9fc4fefc47
2 changed files with 13 additions and 3 deletions
|
@ -2450,6 +2450,13 @@ isr_rx_conn_pkt(struct radio_pdu_node_rx *radio_pdu_node_rx,
|
|||
/* Increment serial number */
|
||||
_radio.conn_curr->sn++;
|
||||
|
||||
/* First ack (and redundantly any other ack) enable use of
|
||||
* slave latency.
|
||||
*/
|
||||
if (_radio.role == ROLE_SLAVE) {
|
||||
_radio.conn_curr->slave.latency_enabled = 1;
|
||||
}
|
||||
|
||||
if (_radio.conn_curr->empty == 0) {
|
||||
struct radio_pdu_node_tx *node_tx;
|
||||
u8_t pdu_data_tx_len, pdu_data_tx_ll_id;
|
||||
|
@ -3067,13 +3074,11 @@ static inline void isr_close_conn(void)
|
|||
preamble_to_addr_us);
|
||||
}
|
||||
|
||||
|
||||
/* Reset window widening, as anchor point sync-ed */
|
||||
_radio.conn_curr->slave.window_widening_event_us = 0;
|
||||
_radio.conn_curr->slave.window_size_event_us = 0;
|
||||
|
||||
/* apply latency if no more data */
|
||||
_radio.conn_curr->latency_event = _radio.conn_curr->latency;
|
||||
if (_radio.conn_curr->pkt_tx_head) {
|
||||
struct pdu_data *pdu_data_tx;
|
||||
|
||||
|
@ -3083,6 +3088,9 @@ static inline void isr_close_conn(void)
|
|||
_radio.conn_curr->packet_tx_head_offset) {
|
||||
_radio.conn_curr->latency_event = 0;
|
||||
}
|
||||
} else if (_radio.conn_curr->slave.latency_enabled) {
|
||||
_radio.conn_curr->latency_event =
|
||||
_radio.conn_curr->latency;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8314,6 +8322,7 @@ u32_t radio_adv_enable(u16_t interval, u8_t chan_map, u8_t filter_policy,
|
|||
|
||||
conn->role = 1;
|
||||
conn->connect_expire = 6;
|
||||
conn->slave.latency_enabled = 0;
|
||||
conn->slave.latency_cancel = 0;
|
||||
conn->slave.window_widening_prepare_us = 0;
|
||||
conn->slave.window_widening_event_us = 0;
|
||||
|
|
|
@ -91,8 +91,9 @@ struct connection {
|
|||
#endif /* CONFIG_BLUETOOTH_CONTROLLER_LE_PING */
|
||||
|
||||
struct {
|
||||
u8_t sca:3;
|
||||
u8_t latency_enabled:1;
|
||||
u8_t latency_cancel:1;
|
||||
u8_t sca:3;
|
||||
u32_t window_widening_periodic_us;
|
||||
u32_t window_widening_max_us;
|
||||
u32_t window_widening_prepare_us;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue