diff --git a/core/net/mac/mac.h b/core/net/mac/mac.h index d5ebcf6d6..acaf43110 100644 --- a/core/net/mac/mac.h +++ b/core/net/mac/mac.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: mac.h,v 1.1 2007/05/25 06:40:19 adamdunkels Exp $ + * $Id: mac.h,v 1.2 2008/02/24 21:05:28 adamdunkels Exp $ */ /** @@ -58,7 +58,7 @@ struct mac_driver { int (* on)(void); /** Turn the MAC layer off. */ - int (* off)(void); + int (* off)(int keep_radio_on); }; diff --git a/core/net/mac/nullmac.c b/core/net/mac/nullmac.c index f2ea792e3..5a8dcc8de 100644 --- a/core/net/mac/nullmac.c +++ b/core/net/mac/nullmac.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: nullmac.c,v 1.6 2007/12/23 14:56:54 oliverschmidt Exp $ + * $Id: nullmac.c,v 1.7 2008/02/24 21:05:28 adamdunkels Exp $ */ /** @@ -81,9 +81,13 @@ on(void) } /*---------------------------------------------------------------------------*/ static int -off(void) +off(int keep_radio_on) { - return radio->off(); + if(keep_radio_on) { + return radio->on(); + } else { + return radio->off(); + } } /*---------------------------------------------------------------------------*/ const struct mac_driver nullmac_driver = {