1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #10599 from miri64/pkg/cleanup/openthread-rm-NETOPT_IPV6_IID

openthread: use l2util_ipv6_iid_from_addr() instead of NETOPT_IPV6_IID
This commit is contained in:
José Alamos 2019-03-29 12:33:21 +01:00 committed by GitHub
commit b5aaa6186f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -5,6 +5,7 @@ endif
ifneq (,$(filter openthread_contrib,$(USEMODULE)))
USEMODULE += openthread_contrib_netdev
USEMODULE += l2util
USEMODULE += xtimer
FEATURES_REQUIRED += cpp
endif

View File

@ -25,6 +25,7 @@
#include "net/ethernet/hdr.h"
#include "net/ethertype.h"
#include "net/ieee802154.h"
#include "net/l2util.h"
#include "net/netdev/ieee802154.h"
#include "openthread/config.h"
#include "openthread/openthread.h"
@ -457,8 +458,13 @@ otError otPlatRadioEnergyScan(otInstance *aInstance, uint8_t aScanChannel, uint1
void otPlatRadioGetIeeeEui64(otInstance *aInstance, uint8_t *aIeee64Eui64)
{
(void) aInstance;
_dev->driver->get(_dev, NETOPT_IPV6_IID, aIeee64Eui64, sizeof(eui64_t));
uint8_t addr[IEEE802154_LONG_ADDRESS_LEN];
(void)aInstance;
_dev->driver->get(_dev, NETOPT_ADDRESS_LONG, addr, sizeof(addr));
l2util_ipv6_iid_from_addr(NETDEV_TYPE_IEEE802154,
addr, sizeof(eui64_t),
(eui64_t *)aIeee64Eui64);
}
int8_t otPlatRadioGetReceiveSensitivity(otInstance *aInstance)