fix a race condition regarding advancement of the softclock. Without

this, the advancment would fail to trigger a tx cycle
occasionally. This would cause the packet to get deferred until the
next expiration of the softclock.
This commit is contained in:
Mariano Alvira 2011-01-17 07:41:44 -05:00
parent 92164e7eff
commit e4f644f7b1

View file

@ -461,7 +461,7 @@ void tx_packet(volatile packet_t *p) {
if(bit_is_set(*NIPEND, INT_NUM_MACA)) { *INTFRC = (1 << INT_NUM_MACA); }
if(last_post == NO_POST) { *INTFRC = (1<<INT_NUM_MACA); }
/* if we are in a reception cycle, advance the softclock timeout to now */
if(last_post == RX_POST) { *MACA_SFTCLK = *MACA_CLK; }
if(last_post == RX_POST) { *MACA_SFTCLK = *MACA_CLK + CLK_PER_BYTE; }
return;
}