From: Keith Packard Date: Mon, 5 Apr 2010 02:48:50 +0000 (-0700) Subject: Make ao_radio_idle keep trying to get the radio to idle. X-Git-Tag: debian/0.6+163+g01e524f~15 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=b0b99f30c4e00689e9faceb363a5c7284541c6be;ds=sidebyside 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. --- 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); }