You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2016/04/26 05:11:47 UTC

[2/2] incubator-mynewt-core git commit: Fix bug in data length extension procedure

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).


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/4ad86e91
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/4ad86e91
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/4ad86e91

Branch: refs/heads/develop
Commit: 4ad86e91ab5be6693aa13668e7f9f6ef50d72f4c
Parents: 4f9a1f8
Author: William San Filippo <wi...@runtime.io>
Authored: Mon Apr 25 19:24:52 2016 -0700
Committer: William San Filippo <wi...@runtime.io>
Committed: Mon Apr 25 20:11:39 2016 -0700

----------------------------------------------------------------------
 net/nimble/controller/src/ble_ll_hci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/4ad86e91/net/nimble/controller/src/ble_ll_hci.c
----------------------------------------------------------------------
diff --git a/net/nimble/controller/src/ble_ll_hci.c b/net/nimble/controller/src/ble_ll_hci.c
index 8149bf4..1d3b22e 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;
         }