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 2020/05/14 12:53:16 UTC

[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on a change in pull request #815: nimble/ll: Add controller-to-host flow control support

andrzej-kaczmarek commented on a change in pull request #815:
URL: https://github.com/apache/mynewt-nimble/pull/815#discussion_r425111753



##########
File path: nimble/controller/src/ble_ll_conn.c
##########
@@ -3612,22 +3611,33 @@ ble_ll_conn_rx_isr_end(uint8_t *rxbuf, struct ble_mbuf_hdr *rxhdr)
     uint32_t add_usecs;
     struct os_mbuf *txpdu;
     struct ble_ll_conn_sm *connsm;
-    struct os_mbuf *rxpdu;
+    struct os_mbuf *rxpdu = NULL;
     struct ble_mbuf_hdr *txhdr;
     int rx_phy_mode;
+    bool alloc_rxpdu = true;
 
     /* Retrieve the header and payload length */
     hdr_byte = rxbuf[0];
     rx_pyld_len = rxbuf[1];
 
+    /*
+     * No need to alloc rxpdu for packets with invalid CRC, we would throw them
+     * away instantly from LL anyway.
+     */
+    if (!BLE_MBUF_HDR_CRC_OK(rxhdr)) {

Review comment:
       this is done only for data pdu, aux_connect_rsp is handled by other code




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org