summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorWilliam San Filippo <wills@runtime.io>2016-04-25 19:24:52 -0700
committerWilliam San Filippo <wills@runtime.io>2016-04-25 20:11:39 -0700
commit4ad86e91ab5be6693aa13668e7f9f6ef50d72f4c (patch)
treee57dc0e032295dc5d6d318a23c90ba26fdccac81 /net
parent4f9a1f840911d8dbffb5e06dcc23f4f3e6e042d9 (diff)
Fix bug in data length extension procedure
Changes were made to make sure that the hosts suggested data sizes were never greater than the supported controller size. That check was wrong (should have been less than or equal to) so the controller would not perform the data length extension procedure in some cases (when the maximum supported size was requested).
Diffstat (limited to 'net')
-rw-r--r--net/nimble/controller/src/ble_ll_hci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/nimble/controller/src/ble_ll_hci.c b/net/nimble/controller/src/ble_ll_hci.c
index 8149bf43..1d3b22e8 100644
--- a/net/nimble/controller/src/ble_ll_hci.c
+++ b/net/nimble/controller/src/ble_ll_hci.c
@@ -311,8 +311,8 @@ ble_ll_hci_le_wr_sugg_data_len(uint8_t *cmdbuf)
g_ble_ll_conn_params.sugg_tx_octets = (uint8_t)tx_oct;
g_ble_ll_conn_params.sugg_tx_time = tx_time;
- if ((tx_time < g_ble_ll_conn_params.supp_max_tx_time) &&
- (tx_oct < g_ble_ll_conn_params.supp_max_tx_octets)) {
+ if ((tx_time <= g_ble_ll_conn_params.supp_max_tx_time) &&
+ (tx_oct <= g_ble_ll_conn_params.supp_max_tx_octets)) {
g_ble_ll_conn_params.conn_init_max_tx_octets = tx_oct;
g_ble_ll_conn_params.conn_init_max_tx_time = tx_time;
}