ccat/netdev: fix fifo initialization

ccat crashed when first timer callback was triggered before link_up was called
This commit is contained in:
Steffen Dirkwinkel 2016-07-12 14:21:47 +02:00 committed by Bjarne von Horn
parent a75cc062ef
commit 84b53c1e89
1 changed files with 2 additions and 0 deletions

View File

@ -249,9 +249,11 @@ struct ccat_mac_register {
u8 mii_connected; u8 mii_connected;
}; };
static void ccat_eth_fifo_reset(struct ccat_eth_fifo *const fifo);
static void fifo_set_end(struct ccat_eth_fifo *const fifo, size_t size) static void fifo_set_end(struct ccat_eth_fifo *const fifo, size_t size)
{ {
fifo->end = fifo->mem.start + size - sizeof(struct ccat_eth_frame); fifo->end = fifo->mem.start + size - sizeof(struct ccat_eth_frame);
ccat_eth_fifo_reset(fifo);
} }
static void ccat_dma_free(struct ccat_eth_priv *const priv) static void ccat_dma_free(struct ccat_eth_priv *const priv)