summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-09-28 09:00:24 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-09-30 13:16:44 +0200
commit1ee06ef1596dcc5858ea29ef9faf0f29e139dfcc (patch)
tree13b9f254b9fd03611f7c4e2b605dcafea46968a2
parentc648a0138b8f79b6cb4bd092dfab761e4becb1c2 (diff)
downloadlinux-1ee06ef1596dcc5858ea29ef9faf0f29e139dfcc.tar.bz2
nl802154: use nla_get_le64 for get extended addr
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>
-rw-r--r--net/ieee802154/nl802154.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 3f89c0abdab1..51110a6d3674 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -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;