diff options
Diffstat (limited to 'os/hal/src/hal_mac.c')
-rw-r--r-- | os/hal/src/hal_mac.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/os/hal/src/hal_mac.c b/os/hal/src/hal_mac.c index c4027f500..7d0f4cf43 100644 --- a/os/hal/src/hal_mac.c +++ b/os/hal/src/hal_mac.c @@ -117,10 +117,14 @@ void macStop(MACDriver *macp) { osalDbgCheck(macp != NULL);
osalSysLock();
+
osalDbgAssert((macp->state == MAC_STOP) || (macp->state == MAC_ACTIVE),
"invalid state");
+
mac_lld_stop(macp);
- macp->state = MAC_STOP;
+ macp->config = NULL;
+ macp->state = MAC_STOP;
+
osalSysUnlock();
}
|