diff --git a/core/net/mac/xmac.c b/core/net/mac/xmac.c index 22e6d6a77..2f1c40508 100644 --- a/core/net/mac/xmac.c +++ b/core/net/mac/xmac.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: xmac.c,v 1.55 2010/03/01 13:30:23 nifi Exp $ + * $Id: xmac.c,v 1.56 2010/04/30 07:32:39 adamdunkels Exp $ */ /** @@ -61,7 +61,7 @@ #include #ifndef WITH_ACK_OPTIMIZATION -#define WITH_ACK_OPTIMIZATION 1 +#define WITH_ACK_OPTIMIZATION 0 #endif #ifndef WITH_ENCOUNTER_OPTIMIZATION #define WITH_ENCOUNTER_OPTIMIZATION 1 @@ -298,7 +298,7 @@ powercycle(struct rtimer *t, void *ptr) schedule_powercycle(t, xmac_config.on_time); PT_YIELD(&pt); - if(xmac_config.off_time > 0) { + if(xmac_config.off_time > 0 && !NETSTACK_RADIO.receiving_packet()) { powercycle_turn_radio_off(); if(waiting_for_packet != 0) { waiting_for_packet++;