summaryrefslogtreecommitdiff
path: root/net/batman-adv/originator.c
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@meshcoding.com>2014-01-22 00:42:11 +0100
committerAntonio Quartulli <antonio@meshcoding.com>2014-03-22 08:50:26 +0100
commit8fdd01530cda849ba531e7e9d8674fbc81ab5782 (patch)
treed2a19df1128530d694d7dce1c04d6f24515beb26 /net/batman-adv/originator.c
parente88b617d84b53170f0781cc0756019c5b1855890 (diff)
batman-adv: prefer ether_addr_copy to memcpy
On some architectures ether_addr_copy() is slightly faster than memcpy() therefore use the former when possible. Signed-off-by: Antonio Quartulli <antonio@meshcoding.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv/originator.c')
-rw-r--r--net/batman-adv/originator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index 853941629dc1..9f2da37d0210 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -446,7 +446,7 @@ batadv_neigh_node_new(struct batadv_hard_iface *hard_iface,
INIT_HLIST_HEAD(&neigh_node->ifinfo_list);
spin_lock_init(&neigh_node->ifinfo_lock);
- memcpy(neigh_node->addr, neigh_addr, ETH_ALEN);
+ ether_addr_copy(neigh_node->addr, neigh_addr);
neigh_node->if_incoming = hard_iface;
neigh_node->orig_node = orig_node;
@@ -666,7 +666,7 @@ struct batadv_orig_node *batadv_orig_node_new(struct batadv_priv *bat_priv,
orig_node->tt_initialised = false;
orig_node->bat_priv = bat_priv;
- memcpy(orig_node->orig, addr, ETH_ALEN);
+ ether_addr_copy(orig_node->orig, addr);
batadv_dat_init_orig_node_addr(orig_node);
atomic_set(&orig_node->last_ttvn, 0);
orig_node->tt_buff = NULL;