diff --git a/drivers/net/mmnif.c b/drivers/net/mmnif.c index 7eeb1ce4..e6142260 100644 --- a/drivers/net/mmnif.c +++ b/drivers/net/mmnif.c @@ -1570,7 +1570,9 @@ static void mmnif_irqhandler(struct state* s) { static int z = -1; int tmp; +#if !NO_SYS mmnif_t *mmnif; +#endif if (z < 0) // Find out who I am... z = Z_PID(RC_MY_COREID); @@ -1582,18 +1584,18 @@ static void mmnif_irqhandler(struct state* s) return; } - mmnif = (mmnif_t *) mmnif_dev->state; - if (!mmnif->check_in_progress) { #if NO_SYS mmnif_rx((void*) mmnif_dev); #else + mmnif = (mmnif_t *) mmnif_dev->state; + if (!mmnif->check_in_progress) { if (tcpip_callback_with_block(mmnif_rx, (void*) mmnif_dev, 0) == ERR_OK) { mmnif->check_in_progress = 1; } else { DEBUGPRINTF("rckemacif_handler: unable to send a poll request to the tcpip thread\n"); } -#endif } +#endif tmp = ReadConfigReg(CRB_OWN + (z==0 ? GLCFG0 : GLCFG1)); tmp &= ~1;