From 41d0c7a7da1903b944db6d09220e3977c8bf8c45 Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Wed, 20 Apr 2011 21:20:55 -0400 Subject: [PATCH 1/2] fix channels 8 and 11, VCODivI table was incorrect. --- lib/maca.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/maca.c b/lib/maca.c index fb14052bb..808fd5131 100644 --- a/lib/maca.c +++ b/lib/maca.c @@ -1037,14 +1037,14 @@ const uint8_t VCODivI[16] = { 0x2f, 0x2f, 0x2f, - 0x30, - 0x30, - 0x30, 0x2f, 0x30, 0x30, 0x30, 0x30, + 0x30, + 0x30, + 0x30, }; const uint32_t VCODivF[16] = { From b79cba9d7fac058a00ede5f7a5a26494f9f6efe8 Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Sat, 30 Apr 2011 15:24:10 -0400 Subject: [PATCH 2/2] don't do the autoack delay on RX if promiscuous --- this allows a sniffer to catch 802.15.4 acks. --- lib/maca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/maca.c b/lib/maca.c index 808fd5131..e6ea4a2a8 100644 --- a/lib/maca.c +++ b/lib/maca.c @@ -618,7 +618,7 @@ void maca_isr(void) { dma_rx->rx_time = *MACA_TIMESTAMP; /* check if received packet needs an ack */ - if(dma_rx->data[1] & 0x20) { + if(prm_mode == AUTOACK && (dma_rx->data[1] & 0x20)) { /* this wait is necessary to auto-ack */ volatile uint32_t wait_clk; wait_clk = *MACA_CLK + 200;