/* NOTE: this is only used when the mbuf is created by the controller; it should not be used for data packets (ACL data packets) that come from the host. This routine assumes that the entire pdu length can fit in one mbuf contiguously. */
void ble_ll_mbuf_init(struct os_mbuf *m, uint8_t pdulen, uint8_t hdr)
/* NOTE: this is only used when the mbuf is created by the controller; it should not be used for data packets (ACL data packets) that come from the host. This routine assumes that the entire pdu length can fit in one mbuf contiguously. */
void ble_ll_mbuf_init(struct os_mbuf *m, uint8_t pdulen, uint8_t hdr)
{
    struct ble_mbuf_hdr *ble_hdr;
    m->om_len = pdulen;
    OS_MBUF_PKTHDR(m)->omp_len = pdulen;
    ble_hdr = BLE_MBUF_HDR_PTR(m);
    ble_hdr->txinfo.flags = 0;
    ble_hdr->txinfo.offset = 0;
    ble_hdr->txinfo.pyld_len = pdulen;
    ble_hdr->txinfo.hdr_byte = hdr;
}