File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
features/netsocket/emac-drivers/TARGET_NXP_EMAC/TARGET_IMX Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,8 @@ bool Kinetis_EMAC::low_level_init_successful()
189189
190190 /* Create buffers for each receive BD */
191191 for (i = 0 ; i < ENET_RX_RING_LEN; i++) {
192- rx_buff[i] = memory_manager->alloc_heap (ENET_ETH_MAX_FLEN, ENET_BUFF_ALIGNMENT);
192+ rx_buff[i] = memory_manager->alloc_heap (ENET_ALIGN (ENET_ETH_MAX_FLEN, ENET_BUFF_ALIGNMENT),
193+ ENET_BUFF_ALIGNMENT);
193194 if (NULL == rx_buff[i])
194195 return false ;
195196
@@ -279,7 +280,8 @@ emac_mem_buf_t *Kinetis_EMAC::low_level_input(int idx)
279280 memory_manager->set_len (p, length);
280281
281282 /* Attempt to queue new buffer */
282- temp_rxbuf = memory_manager->alloc_heap (ENET_ETH_MAX_FLEN, ENET_BUFF_ALIGNMENT);
283+ temp_rxbuf = memory_manager->alloc_heap (ENET_ALIGN (ENET_ETH_MAX_FLEN, ENET_BUFF_ALIGNMENT),
284+ ENET_BUFF_ALIGNMENT);
283285 if (NULL == temp_rxbuf) {
284286 /* Re-queue the same buffer */
285287 update_read_buffer (NULL );
You can’t perform that action at this time.
0 commit comments