No jira ticket for this commit. In the case of the combined host/controller, the length of the ACL data packet (as reported by read buffer size) was technically incorrect (although there are no issues with it because the host will only use the available mbuf and the controller does nothing with the ACL data packet size). The code did not account for the 4 byte HCI header. Now we do account for it so it is consistent with the controller only code.
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/e3cdc2b2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/e3cdc2b2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/e3cdc2b2 Branch: refs/heads/develop Commit: e3cdc2b2ff627dbcf5428b0db3ef39c97226a016 Parents: 473e050 Author: William San Filippo <[email protected]> Authored: Mon Sep 19 09:52:41 2016 -0700 Committer: William San Filippo <[email protected]> Committed: Mon Sep 19 09:57:00 2016 -0700 ---------------------------------------------------------------------- apps/blecent/src/main.c | 3 ++- apps/bleprph/src/main.c | 3 ++- apps/bletest/src/main.c | 3 ++- apps/bletiny/src/main.c | 3 ++- apps/bleuart/src/main.c | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e3cdc2b2/apps/blecent/src/main.c ---------------------------------------------------------------------- diff --git a/apps/blecent/src/main.c b/apps/blecent/src/main.c index 7056cc6..d92a848 100755 --- a/apps/blecent/src/main.c +++ b/apps/blecent/src/main.c @@ -571,7 +571,8 @@ main(void) blecent_stack, BLECENT_STACK_SIZE); /* Initialize the BLE LL */ - rc = ble_ll_init(BLE_LL_TASK_PRI, MBUF_NUM_MBUFS, BLE_MBUF_PAYLOAD_SIZE); + rc = ble_ll_init(BLE_LL_TASK_PRI, MBUF_NUM_MBUFS, + BLE_MBUF_PAYLOAD_SIZE - BLE_HCI_DATA_HDR_SZ); assert(rc == 0); /* Initialize the RAM HCI transport. */ http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e3cdc2b2/apps/bleprph/src/main.c ---------------------------------------------------------------------- diff --git a/apps/bleprph/src/main.c b/apps/bleprph/src/main.c index 0233bc1..f497d25 100755 --- a/apps/bleprph/src/main.c +++ b/apps/bleprph/src/main.c @@ -395,7 +395,8 @@ main(void) bleprph_stack, BLEPRPH_STACK_SIZE); /* Initialize the BLE LL */ - rc = ble_ll_init(BLE_LL_TASK_PRI, MBUF_NUM_MBUFS, BLE_MBUF_PAYLOAD_SIZE); + rc = ble_ll_init(BLE_LL_TASK_PRI, MBUF_NUM_MBUFS, + BLE_MBUF_PAYLOAD_SIZE - BLE_HCI_DATA_HDR_SZ); assert(rc == 0); /* Initialize the RAM HCI transport. */ http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e3cdc2b2/apps/bletest/src/main.c ---------------------------------------------------------------------- diff --git a/apps/bletest/src/main.c b/apps/bletest/src/main.c index 066d52e..ffc0b92 100755 --- a/apps/bletest/src/main.c +++ b/apps/bletest/src/main.c @@ -1170,7 +1170,8 @@ main(void) os_eventq_init(&g_bletest_evq); /* Initialize the BLE LL */ - rc = ble_ll_init(BLE_LL_TASK_PRI, MBUF_NUM_MBUFS, BLE_MBUF_PAYLOAD_SIZE); + rc = ble_ll_init(BLE_LL_TASK_PRI, MBUF_NUM_MBUFS, + BLE_MBUF_PAYLOAD_SIZE - BLE_HCI_DATA_HDR_SZ); assert(rc == 0); /* Initialize host */ http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e3cdc2b2/apps/bletiny/src/main.c ---------------------------------------------------------------------- diff --git a/apps/bletiny/src/main.c b/apps/bletiny/src/main.c index dfd0aee..561604e 100755 --- a/apps/bletiny/src/main.c +++ b/apps/bletiny/src/main.c @@ -1702,7 +1702,8 @@ main(void) assert(rc == 0); /* Initialize the BLE LL */ - rc = ble_ll_init(BLE_LL_TASK_PRI, MBUF_NUM_MBUFS, BLE_MBUF_PAYLOAD_SIZE); + rc = ble_ll_init(BLE_LL_TASK_PRI, MBUF_NUM_MBUFS, + BLE_MBUF_PAYLOAD_SIZE - BLE_HCI_DATA_HDR_SZ); assert(rc == 0); /* Initialize the RAM HCI transport. */ http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e3cdc2b2/apps/bleuart/src/main.c ---------------------------------------------------------------------- diff --git a/apps/bleuart/src/main.c b/apps/bleuart/src/main.c index 8ff7d82..2c54929 100755 --- a/apps/bleuart/src/main.c +++ b/apps/bleuart/src/main.c @@ -293,7 +293,8 @@ main(void) bleuart_stack, bleuart_STACK_SIZE); /* Initialize the BLE LL */ - rc = ble_ll_init(BLE_LL_TASK_PRI, MBUF_NUM_MBUFS, BLE_MBUF_PAYLOAD_SIZE); + rc = ble_ll_init(BLE_LL_TASK_PRI, MBUF_NUM_MBUFS, + BLE_MBUF_PAYLOAD_SIZE - BLE_HCI_DATA_HDR_SZ); assert(rc == 0); /* Initialize the RAM HCI transport. */
