MYNEWT-387: Separate ACL data buffer pool for controller only This change insures that there is the proper user header on the mbufs that the HCI interface hands to the controller. It worked before as the controller was using the bytes that were stripped from the hci header.
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/959b3891 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/959b3891 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/959b3891 Branch: refs/heads/develop Commit: 959b389154a3f65e4347642d624bceca6479622f Parents: 6773301 Author: William San Filippo <[email protected]> Authored: Tue Sep 13 12:27:44 2016 -0700 Committer: William San Filippo <[email protected]> Committed: Tue Sep 13 12:34:59 2016 -0700 ---------------------------------------------------------------------- net/nimble/transport/uart/src/ble_hci_uart.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/959b3891/net/nimble/transport/uart/src/ble_hci_uart.c ---------------------------------------------------------------------- diff --git a/net/nimble/transport/uart/src/ble_hci_uart.c b/net/nimble/transport/uart/src/ble_hci_uart.c index 98e3eb2..8cf5b9e 100755 --- a/net/nimble/transport/uart/src/ble_hci_uart.c +++ b/net/nimble/transport/uart/src/ble_hci_uart.c @@ -136,7 +136,12 @@ ble_hci_trans_acl_buf_alloc(void) { struct os_mbuf *m; - m = os_mbuf_get_pkthdr(&ble_hci_uart_acl_mbuf_pool, 0); + /* + * XXX: note that for host only there would be no need to allocate + * a user header. Address this later. + */ + m = os_mbuf_get_pkthdr(&ble_hci_uart_acl_mbuf_pool, + sizeof(struct ble_mbuf_hdr)); return m; }
