nl802154: use nla_get_le64 for get extended addr
authorAlexander Aring <alex.aring@gmail.com>
Mon, 28 Sep 2015 07:00:24 +0000 (09:00 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 30 Sep 2015 11:16:44 +0000 (13:16 +0200)
This patch uses the nla_get_le64 function instead of doing a force
converting to le64.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/ieee802154/nl802154.c

index 3f89c0abdab170485a4bc83867c0f9609fe69c64..51110a6d3674b1e57b4dacce34b268f4c36f4e95 100644 (file)
@@ -753,10 +753,8 @@ static int nl802154_new_interface(struct sk_buff *skb, struct genl_info *info)
                        return -EINVAL;
        }
 
-       /* TODO add nla_get_le64 to netlink */
        if (info->attrs[NL802154_ATTR_EXTENDED_ADDR])
-               extended_addr = (__force __le64)nla_get_u64(
-                               info->attrs[NL802154_ATTR_EXTENDED_ADDR]);
+               extended_addr = nla_get_le64(info->attrs[NL802154_ATTR_EXTENDED_ADDR]);
 
        if (!rdev->ops->add_virtual_intf)
                return -EOPNOTSUPP;