Skip to content
Snippets Groups Projects
Commit acbdfe88 authored by Martine Lenders's avatar Martine Lenders Committed by GitHub
Browse files

Merge pull request #7285 from aabadie/forupstream_radio_fix

drivers/at86rf2xx: remove redundant radio wakeup
parents 6c8c50b3 112a446b
No related branches found
No related tags found
No related merge requests found
...@@ -359,8 +359,11 @@ static int _set(netdev_t *netdev, netopt_t opt, void *val, size_t len) ...@@ -359,8 +359,11 @@ static int _set(netdev_t *netdev, netopt_t opt, void *val, size_t len)
return -ENODEV; return -ENODEV;
} }
/* temporarily wake up if sleeping */ /* temporarily wake up if sleeping and opt != NETOPT_STATE.
if (old_state == AT86RF2XX_STATE_SLEEP) { * opt != NETOPT_STATE check prevents redundant wake-up.
* when opt == NETOPT_STATE, at86rf2xx_set_state() will wake up the
* radio if needed. */
if ((old_state == AT86RF2XX_STATE_SLEEP) && (opt != NETOPT_STATE)) {
at86rf2xx_assert_awake(dev); at86rf2xx_assert_awake(dev);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment