summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-04-04 19:48:50 -0700
committerKeith Packard <keithp@keithp.com>2010-04-04 19:48:50 -0700
commitb0b99f30c4e00689e9faceb363a5c7284541c6be (patch)
treef06262dc57d1e5ae6f6d445abe9a576e81fabee2
parent0e7abc9fedec568b431c983d3df1b0b29f4f10e3 (diff)
Make ao_radio_idle keep trying to get the radio to idle.
Attempting to abort a radio operation could lead to a hang if the user of the radio jumped in and started using it again before the task attempting to abort woke up. This change just keeps smacking the radio until the radio goes idle long enough to detect it.
-rw-r--r--src/ao_radio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ao_radio.c b/src/ao_radio.c
index bb19c6a9..0849349e 100644
--- a/src/ao_radio.c
+++ b/src/ao_radio.c
@@ -317,8 +317,8 @@ ao_radio_idle(void)
{
if (RF_MARCSTATE != RF_MARCSTATE_IDLE)
{
- RFST = RFST_SIDLE;
do {
+ RFST = RFST_SIDLE;
ao_yield();
} while (RF_MARCSTATE != RF_MARCSTATE_IDLE);
}