diff --git a/os/hal/src/mac.c b/os/hal/src/mac.c index 2cafbcdbc..365c3c420 100644 --- a/os/hal/src/mac.c +++ b/os/hal/src/mac.c @@ -130,8 +130,10 @@ msg_t macWaitTransmitDescriptor(MACDriver *macp, (time > 0)) { chSysLock(); systime_t now = chTimeNow(); - if ((msg = chSemWaitTimeoutS(&macp->md_tdsem, time)) == RDY_TIMEOUT) + if ((msg = chSemWaitTimeoutS(&macp->md_tdsem, time)) == RDY_TIMEOUT) { + chSysUnlock(); break; + } if (time != TIME_INFINITE) time -= (chTimeNow() - now); chSysUnlock(); @@ -180,8 +182,10 @@ msg_t macWaitReceiveDescriptor(MACDriver *macp, (time > 0)) { chSysLock(); systime_t now = chTimeNow(); - if ((msg = chSemWaitTimeoutS(&macp->md_rdsem, time)) == RDY_TIMEOUT) + if ((msg = chSemWaitTimeoutS(&macp->md_rdsem, time)) == RDY_TIMEOUT) { + chSysUnlock(); break; + } if (time != TIME_INFINITE) time -= (chTimeNow() - now); chSysUnlock(); diff --git a/readme.txt b/readme.txt index 5499817d1..2485d3c8d 100644 --- a/readme.txt +++ b/readme.txt @@ -69,6 +69,7 @@ ***************************************************************************** *** 2.2.1 *** +- FIX: Error in MAC driver (bug 3179783). - FIX: Fixed wrong serial driver macros (bug 3173336). *** 2.2.0 ***