Skip to content

Commit eb498c3

Browse files
szymon-czaprackisjanc
authored andcommitted
nimble/ll: Ensure host-driven octet changes trigger DLE
When BLE_LL_CONN_INIT_AUTO_DLE is disabled, apply host-requested changes to max_tx_octets and max_rx_octets. This ensures that host-driven updates to TX/RX octets correctly generate the LE Meta Event: Data Length Change. This keeps DLE behavior consistent with host expectations.
1 parent a2403db commit eb498c3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

nimble/controller/src/ble_ll_conn.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,6 +1854,18 @@ ble_ll_conn_set_data_len(struct ble_ll_conn_sm *connsm,
18541854
rx_time = MIN(rx_time, BLE_LL_CONN_SUPP_TIME_MAX_UNCODED);
18551855
#endif
18561856

1857+
#if !MYNEWT_VAL(BLE_LL_CONN_INIT_AUTO_DLE)
1858+
if (connsm->eff_max_tx_octets != tx_octets) {
1859+
connsm->max_tx_octets = tx_octets;
1860+
init_dle = 1;
1861+
}
1862+
1863+
if (rx_octets && connsm->eff_max_rx_octets != rx_octets) {
1864+
connsm->max_rx_octets = rx_octets;
1865+
init_dle = 1;
1866+
}
1867+
#endif
1868+
18571869
if (connsm->max_tx_time != tx_time) {
18581870
connsm->max_tx_time = tx_time;
18591871
init_dle = 1;

0 commit comments

Comments
 (0)