*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
/* Wait for DMA to be done, for the radio receive process to
* get aborted or for a receive timeout to fire
*/
- if (timeout)
- ao_alarm(timeout);
__critical while (!ao_radio_dma_done && !ao_radio_abort)
- if (ao_sleep(&ao_radio_dma_done))
+ if (ao_sleep_for(&ao_radio_dma_done, timeout))
break;
- if (timeout)
- ao_clear_alarm();
/* If recv was aborted, clean up by stopping the DMA engine
* and idling the radio