You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/01/28 00:24:28 UTC

[2/4] incubator-mynewt-larva git commit: Set preferred ATT MTU to 240 at startup.

Set preferred ATT MTU to 240 at startup.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/053f7fa2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/053f7fa2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/053f7fa2

Branch: refs/heads/master
Commit: 053f7fa2327db31c471735ed9f3030f3ab64b6f8
Parents: 0f06e5f
Author: Christopher Collins <cc...@gmail.com>
Authored: Wed Jan 27 14:48:51 2016 -0500
Committer: Christopher Collins <cc...@gmail.com>
Committed: Wed Jan 27 18:21:09 2016 -0500

----------------------------------------------------------------------
 net/nimble/host/src/ble_att.c               | 2 +-
 net/nimble/host/src/ble_att_priv.h          | 5 +++--
 net/nimble/host/src/test/ble_hs_conn_test.c | 6 +++---
 3 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/053f7fa2/net/nimble/host/src/ble_att.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_att.c b/net/nimble/host/src/ble_att.c
index f301a76..89e75b4 100644
--- a/net/nimble/host/src/ble_att.c
+++ b/net/nimble/host/src/ble_att.c
@@ -184,5 +184,5 @@ ble_att_get_pkthdr(void)
 void
 ble_att_init(void)
 {
-    ble_att_preferred_mtu = BLE_ATT_MTU_DFLT;
+    ble_att_preferred_mtu = BLE_ATT_MTU_PREFERRED_DFLT;
 }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/053f7fa2/net/nimble/host/src/ble_att_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_att_priv.h b/net/nimble/host/src/ble_att_priv.h
index f21cd81..384ad20 100644
--- a/net/nimble/host/src/ble_att_priv.h
+++ b/net/nimble/host/src/ble_att_priv.h
@@ -38,8 +38,9 @@ struct ble_att_exec_write_req;
 struct ble_att_notify_req;
 struct ble_att_indicate_req;
 
-#define BLE_ATT_MTU_DFLT         23  /* Also the minimum. */
-#define BLE_ATT_MTU_MAX          240 /* XXX: Temporary to prevent mbuf bugs. */
+#define BLE_ATT_MTU_DFLT                23  /* Also the minimum. */
+#define BLE_ATT_MTU_MAX                 240
+#define BLE_ATT_MTU_PREFERRED_DFLT      240
 
 struct ble_att_prep_entry {
     SLIST_ENTRY(ble_att_prep_entry) bape_next;

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/053f7fa2/net/nimble/host/src/test/ble_hs_conn_test.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/test/ble_hs_conn_test.c b/net/nimble/host/src/test/ble_hs_conn_test.c
index e3f06ed..504504f 100644
--- a/net/nimble/host/src/test/ble_hs_conn_test.c
+++ b/net/nimble/host/src/test/ble_hs_conn_test.c
@@ -74,7 +74,7 @@ TEST_CASE(ble_hs_conn_test_direct_connect_success)
 
     chan = ble_hs_conn_chan_find(conn, BLE_L2CAP_CID_ATT);
     TEST_ASSERT_FATAL(chan != NULL);
-    TEST_ASSERT(chan->blc_my_mtu == BLE_ATT_MTU_DFLT);
+    TEST_ASSERT(chan->blc_my_mtu == BLE_ATT_MTU_PREFERRED_DFLT);
     TEST_ASSERT(chan->blc_peer_mtu == 0);
     TEST_ASSERT(chan->blc_default_mtu == BLE_ATT_MTU_DFLT);
 }
@@ -169,7 +169,7 @@ TEST_CASE(ble_hs_conn_test_direct_connectable_success)
 
     chan = ble_hs_conn_chan_find(conn, BLE_L2CAP_CID_ATT);
     TEST_ASSERT_FATAL(chan != NULL);
-    TEST_ASSERT(chan->blc_my_mtu == BLE_ATT_MTU_DFLT);
+    TEST_ASSERT(chan->blc_my_mtu == BLE_ATT_MTU_PREFERRED_DFLT);
     TEST_ASSERT(chan->blc_peer_mtu == 0);
     TEST_ASSERT(chan->blc_default_mtu == BLE_ATT_MTU_DFLT);
 }
@@ -262,7 +262,7 @@ TEST_CASE(ble_hs_conn_test_undirect_connectable_success)
 
     chan = ble_hs_conn_chan_find(conn, BLE_L2CAP_CID_ATT);
     TEST_ASSERT_FATAL(chan != NULL);
-    TEST_ASSERT(chan->blc_my_mtu == BLE_ATT_MTU_DFLT);
+    TEST_ASSERT(chan->blc_my_mtu == BLE_ATT_MTU_PREFERRED_DFLT);
     TEST_ASSERT(chan->blc_peer_mtu == 0);
     TEST_ASSERT(chan->blc_default_mtu == BLE_ATT_MTU_DFLT);
 }