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 <keithp@keithp.com>
void
ao_radio_abort(void)
{
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();
+ }