Merged in antmerlino/nuttx/mac802154 (pull request #527)

mac802154: Fixes a warning for unused variable and returns -1 from macnet_notify() if event is not used.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Anthony Merlino 2017-11-03 16:08:17 +00:00 committed by Gregory Nutt
parent c1de4380e9
commit 6853569633
2 changed files with 8 additions and 1 deletions

View File

@ -228,7 +228,9 @@ static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv)
FAR struct ieee802154_radio_s *radio;
MACHANDLE mac;
FAR struct spi_dev_s *spi;
#ifdef CONFIG_IEEE802154_NETDEV
int ret;
#endif
/* Configure the interrupt pin */

View File

@ -445,9 +445,14 @@ static int macnet_notify(FAR struct mac802154_maccb_s *maccb,
#endif
nxsem_post(&priv->md_exclsem);
return OK;
}
return OK;
/* By returning a negative value, we let the MAC know that we don't want the
* primitive and it will free it for us
*/
return -1;
}
/****************************************************************************