diff --git a/nimble/host/src/ble_hs_hci.c b/nimble/host/src/ble_hs_hci.c index 352273230..f8a64e931 100644 --- a/nimble/host/src/ble_hs_hci.c +++ b/nimble/host/src/ble_hs_hci.c @@ -413,6 +413,7 @@ ble_hs_hci_rx_evt(uint8_t *hci_ev, void *arg) return 0; } +#if !(SOC_ESP_NIMBLE_CONTROLLER) /** * Calculates the largest ACL payload that the controller can accept. */ @@ -426,6 +427,7 @@ ble_hs_hci_max_acl_payload_sz(void) */ return ble_hs_hci_buf_sz; } +#endif /** * Allocates an mbuf to contain an outgoing ACL data fragment. @@ -534,8 +536,11 @@ ble_hs_hci_acl_tx_now(struct ble_hs_conn *conn, struct os_mbuf **om) /* Send fragments until the entire packet has been sent. */ while (txom != NULL && ble_hs_hci_avail_pkts > 0) { - frag = mem_split_frag(&txom, ble_hs_hci_max_acl_payload_sz(), - ble_hs_hci_frag_alloc, NULL); +#if SOC_ESP_NIMBLE_CONTROLLER + frag = mem_split_frag(&txom, BLE_ACL_MAX_PKT_SIZE, ble_hs_hci_frag_alloc, NULL); +#else + frag = mem_split_frag(&txom, ble_hs_hci_max_acl_payload_sz(), ble_hs_hci_frag_alloc, NULL); +#endif if (frag == NULL) { *om = txom; return BLE_HS_EAGAIN;