diff --git a/drivers/kw2xrf/kw2xrf_getset.c b/drivers/kw2xrf/kw2xrf_getset.c index 3aad766e512c30ac9d55f2f21047e7177ba8441d..e0a3b0ab977bd10ba9744ca0be9ec14c9037dce6 100644 --- a/drivers/kw2xrf/kw2xrf_getset.c +++ b/drivers/kw2xrf/kw2xrf_getset.c @@ -293,7 +293,11 @@ void kw2xrf_set_addr_long(kw2xrf_t *dev, uint64_t addr) uint16_t kw2xrf_get_addr_short(kw2xrf_t *dev) { - return (dev->netdev.short_addr[0] << 8) | dev->netdev.short_addr[1]; + uint16_t addr; + uint8_t *ap = (uint8_t *)(&addr); + kw2xrf_read_iregs(dev, MKW2XDMI_MACSHORTADDRS0_LSB, ap, + IEEE802154_SHORT_ADDRESS_LEN); + return byteorder_swaps(addr); } uint64_t kw2xrf_get_addr_long(kw2xrf_t *dev)