[riot-notifications] [RIOT-OS/RIOT] drivers: Add support for KW41Z builtin transceiver (#7107)

Thomas Stilwell notifications at github.com
Fri May 31 09:22:39 CEST 2019

> Looks like short addresses work correctly now, just they are not shown by ifconfig.

 @@ -615,12 +615,13 @@ int kw41zrf_netdev_get(netdev_t *netdev, netopt_t opt, void *value, size_t len)
          case NETOPT_ADDRESS:
 -            if (len != sizeof(uint16_t)) {
 +            if (len < sizeof(uint16_t)) {
                  res = -EOVERFLOW;
              *((uint16_t *)value) = kw41zrf_get_addr_short(dev);
 -            res = len;
 +            res = sizeof(uint16_t);
          case NETOPT_ADDRESS_LONG:

ifconfig uses the same `uint8_t[GNRC_NETIF_L2ADDR_MAXLEN]` buffer to get both long and short addresses, so for the short address it ends up calling netdev_get with a size of 8 rather than 2.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190531/ad6d28c2/attachment.html>

More information about the notifications mailing list