You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2022/06/15 07:53:20 UTC
[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on a diff in pull request #1276: Properly accumulate full ACL packet before sending to BLE controller
andrzej-kaczmarek commented on code in PR #1276:
URL: https://github.com/apache/mynewt-nimble/pull/1276#discussion_r897652865
##########
nimble/transport/apollo3/src/apollo3_ble_hci.c:
##########
@@ -275,16 +255,22 @@ apollo3_ble_hci_acl_tx(struct os_mbuf *om)
{
struct os_mbuf *x;
int rc = 0;
+ hci_drv_write_t write_buf;
+ uint8_t *ptr = &write_buf.data[1];
+
+ write_buf.data[0] = HCI_H4_ACL;
+ write_buf.len = 1;
x = om;
while (x) {
- rc = apollo3_hci_write(HCI_H4_ACL, x->om_len, x->om_data);
- if (rc < 0) {
- break;
- }
+ memcpy(ptr, x->om_data, x->om_len);
Review Comment:
you can use `OS_MBUF_PKTLEN` here since all ACL data going to controller should be allocated with pkthdr
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org