From: Keith Packard Date: Wed, 24 Nov 2010 02:57:49 +0000 (-0800) Subject: altos: Don't abort radio transmissions with ao_radio_abort X-Git-Tag: debian/0.7.1+168+gcb08bc2~15^2~12 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=54468e5dc567aaac5c5c20e921859b7cec28bb88 altos: Don't abort radio transmissions with ao_radio_abort We only want to abort pending radio reception to release the radio for other use, or to change the radio channel. Let radio transmission proceed. This fixes a problem with using packet mode to configure the radio channel; if the packet transmission is aborted, the TM ends up wedged. Signed-off-by: Keith Packard --- diff --git a/src/ao_radio.c b/src/ao_radio.c index 3fb4afd7..b2105ff8 100644 --- a/src/ao_radio.c +++ b/src/ao_radio.c @@ -432,8 +432,11 @@ ao_radio_rdf(int ms) void ao_radio_abort(void) { - ao_dma_abort(ao_radio_dma); - ao_radio_idle(); + /* Only abort if a task is waiting to receive data */ + if (RFST == RFST_SRX) { + ao_dma_abort(ao_radio_dma); + ao_radio_idle(); + } } void