diff --git a/core/net/mac/xmac.c b/core/net/mac/xmac.c index 5e626b4b8..f23d006b9 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.44 2009/12/06 13:16:59 adamdunkels Exp $ + * $Id: xmac.c,v 1.45 2009/12/06 17:05:45 adamdunkels Exp $ */ /** @@ -511,10 +511,6 @@ send_packet(void) return MAC_TX_ERR; } - /* By setting we_are_sending to one, we ensure that the rtimer - powercycle interrupt do not interfere with us sending the packet. */ - we_are_sending = 1; - #if WITH_STREAMING if(is_streaming == 1 && (rimeaddr_cmp(packetbuf_addr(PACKETBUF_ADDR_RECEIVER), @@ -576,6 +572,10 @@ send_packet(void) } #endif /* WITH_ENCOUNTER_OPTIMIZATION */ + /* By setting we_are_sending to one, we ensure that the rtimer + powercycle interrupt do not interfere with us sending the packet. */ + we_are_sending = 1; + t0 = RTIMER_NOW(); strobes = 0;