mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gnrc_netif_ieee802154: avoid explicit cast to netdev
This commit is contained in:
parent
fef46029be
commit
d33008483e
@ -185,8 +185,11 @@ static gnrc_pktsnip_t *_recv(gnrc_netif_t *netif)
|
||||
uint16_t payload_size = 0;
|
||||
uint8_t *mic = NULL;
|
||||
uint8_t mic_size = 0;
|
||||
netdev_ieee802154_t *netdev_ieee802154 = container_of(dev,
|
||||
netdev_ieee802154_t,
|
||||
netdev);
|
||||
if (mhr[0] & NETDEV_IEEE802154_SECURITY_EN) {
|
||||
if (ieee802154_sec_decrypt_frame(&((netdev_ieee802154_t *)dev)->sec_ctx,
|
||||
if (ieee802154_sec_decrypt_frame(&netdev_ieee802154->sec_ctx,
|
||||
nread,
|
||||
mhr, (uint8_t *)&mhr_len,
|
||||
&payload, &payload_size,
|
||||
@ -248,7 +251,7 @@ static gnrc_pktsnip_t *_recv(gnrc_netif_t *netif)
|
||||
static int _send(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
|
||||
{
|
||||
netdev_t *dev = netif->dev;
|
||||
netdev_ieee802154_t *state = (netdev_ieee802154_t *)netif->dev;
|
||||
netdev_ieee802154_t *state = container_of(dev, netdev_ieee802154_t, netdev);
|
||||
gnrc_netif_hdr_t *netif_hdr;
|
||||
const uint8_t *src, *dst = NULL;
|
||||
int res = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user