From b0b99f30c4e00689e9faceb363a5c7284541c6be Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 4 Apr 2010 19:48:50 -0700 Subject: [PATCH 1/1] 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. --- src/ao_radio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.30.2