Skip to content

Commit

Permalink
nl802154: use nla_get_le64 for get extended addr
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Aring authored and Marcel Holtmann committed Sep 30, 2015
1 parent c648a01 commit 1ee06ef
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/ieee802154/nl802154.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1ee06ef

Please sign in to comment.