STATE_MAC_STOPPING
dev->state |= STATE_MAC_STOPPING;
dev->state &= ~(STATE_MAC_STOPPING | STATE_MAC_STARTED);
(dev->state & STATE_MAC_STOPPING) ||