From e6a92481a18ca5288a6a50dca8d078159c937d39 Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Tue, 6 Apr 2010 12:53:57 -0400 Subject: [PATCH] initialize packet pointers properly. --- lib/maca.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/maca.c b/lib/maca.c index a9a4cbf35..535a59ae1 100644 --- a/lib/maca.c +++ b/lib/maca.c @@ -36,7 +36,7 @@ #define reg(x) (*(volatile uint32_t *)(x)) static volatile packet_t packet_pool[NUM_PACKETS]; -static volatile packet_t *free_head, *rx_end, *tx_end, *dma_tx, *dma_rx = 0; +static volatile packet_t *free_head, *rx_end, *tx_end, *dma_tx, *dma_rx; /* rx_head and tx_head are visible to the outside */ /* so you can peek at it and see if there is data */ @@ -65,6 +65,7 @@ void maca_init(void) { radio_init(); flyback_init(); init_phy(); + free_head = 0; rx_end = 0; tx_end = 0; dma_tx = 0; dma_rx = 0; free_all_packets(); /* initial radio command */