This closes #171. Merge remote-tracking branch 'rymanluk/l2cap_coc_sig' into develop
* rymanluk/l2cap_coc_sig: bletiny: Add support to connect/disconnect L2CAP LE COC nimble/l2cap: Add support to disconnect L2CAP LE COC nimble/l2cap: Add support to connect L2CAP LE COC nimble/l2cap: Add LE L2CAP COC API nimble/l2cap: Move ble_l2cap_chan_mtu() to ble_att nimble/l2cap: Remove prefix blc_ and blh_ from L2CAP structs nimble/l2cap: Remove not needed checks kernel/queue: Fix SLIST_REMOVE macro 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/0727c55d Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/0727c55d Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/0727c55d Branch: refs/heads/sensors_branch Commit: 0727c55dcfb6a7718b38bcfec4068f652ca314fa Parents: 85638d2 8b73a4d Author: Christopher Collins <[email protected]> Authored: Mon Feb 13 11:23:27 2017 -0800 Committer: Christopher Collins <[email protected]> Committed: Mon Feb 13 11:23:27 2017 -0800 ---------------------------------------------------------------------- apps/bletiny/src/bletiny.h | 12 +- apps/bletiny/src/cmd.c | 145 ++++++ apps/bletiny/src/main.c | 222 +++++++++ kernel/os/include/os/queue.h | 9 +- net/nimble/host/include/host/ble_hs.h | 4 + net/nimble/host/include/host/ble_l2cap.h | 114 +++++ net/nimble/host/src/ble_att.c | 38 +- net/nimble/host/src/ble_att_clt.c | 6 +- net/nimble/host/src/ble_att_priv.h | 1 + net/nimble/host/src/ble_att_svr.c | 6 +- net/nimble/host/src/ble_gattc.c | 2 +- net/nimble/host/src/ble_hs_conn.c | 20 +- net/nimble/host/src/ble_hs_conn_priv.h | 3 + net/nimble/host/src/ble_hs_priv.h | 1 + net/nimble/host/src/ble_l2cap.c | 110 +++-- net/nimble/host/src/ble_l2cap_coc.c | 131 ++++++ net/nimble/host/src/ble_l2cap_coc_priv.h | 68 +++ net/nimble/host/src/ble_l2cap_priv.h | 39 +- net/nimble/host/src/ble_l2cap_sig.c | 563 ++++++++++++++++++++++- net/nimble/host/src/ble_l2cap_sig_cmd.c | 51 +- net/nimble/host/src/ble_l2cap_sig_priv.h | 44 +- net/nimble/host/src/ble_sm.c | 7 +- net/nimble/host/syscfg.yml | 5 + net/nimble/host/test/src/ble_att_svr_test.c | 14 +- net/nimble/host/test/src/ble_hs_conn_test.c | 15 +- net/nimble/host/test/src/ble_hs_test_util.c | 6 +- net/nimble/host/test/src/ble_l2cap_test.c | 15 +- 27 files changed, 1502 insertions(+), 149 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0727c55d/net/nimble/host/src/ble_l2cap.c ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0727c55d/net/nimble/host/test/src/ble_att_svr_test.c ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0727c55d/net/nimble/host/test/src/ble_l2cap_test.c ---------------------------------------------------------------------- diff --cc net/nimble/host/test/src/ble_l2cap_test.c index 2681b26,e8dbfa8..dc1c373 --- a/net/nimble/host/test/src/ble_l2cap_test.c +++ b/net/nimble/host/test/src/ble_l2cap_test.c @@@ -365,13 -364,8 +364,13 @@@ TEST_CASE(ble_l2cap_test_case_frag_chan conn = ble_hs_conn_find(2); TEST_ASSERT_FATAL(conn != NULL); TEST_ASSERT(conn->bhc_rx_chan != NULL && - conn->bhc_rx_chan->blc_cid == BLE_L2CAP_CID_ATT); + conn->bhc_rx_chan->scid == BLE_L2CAP_CID_ATT); ble_hs_unlock(); + + /* Terminate the connection. The received fragments should get freed. + * Mbuf leaks are tested in the post-test-case callback. + */ + ble_hs_test_util_conn_disconnect(2); } TEST_CASE(ble_l2cap_test_case_frag_timeout)
