aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-01-20 12:52:14 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-21 21:13:04 -0500
commit07fc67befd2e843da8ad01785d559d9c257d7fd4 (patch)
tree4bc5536df080fdf510273e2c1ec92569d6148f3e /net/8021q
parent70fccb7e34f029755a5371b6b786f8425c2f27a1 (diff)
8021q: Use ether_addr_copy
Use ether_addr_copy instead of memcpy(a, b, ETH_ALEN) to save some cycles on arm and powerpc. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan.c2
-rw-r--r--net/8021q/vlan_dev.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index b3d17d1c49c3..ec9909935fb6 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -301,7 +301,7 @@ static void vlan_sync_address(struct net_device *dev,
301 !ether_addr_equal(vlandev->dev_addr, dev->dev_addr)) 301 !ether_addr_equal(vlandev->dev_addr, dev->dev_addr))
302 dev_uc_add(dev, vlandev->dev_addr); 302 dev_uc_add(dev, vlandev->dev_addr);
303 303
304 memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); 304 ether_addr_copy(vlan->real_dev_addr, dev->dev_addr);
305} 305}
306 306
307static void vlan_transfer_features(struct net_device *dev, 307static void vlan_transfer_features(struct net_device *dev,
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 47c908f1f626..de51c48c4393 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -61,7 +61,7 @@ static int vlan_dev_rebuild_header(struct sk_buff *skb)
61 pr_debug("%s: unable to resolve type %X addresses\n", 61 pr_debug("%s: unable to resolve type %X addresses\n",
62 dev->name, ntohs(veth->h_vlan_encapsulated_proto)); 62 dev->name, ntohs(veth->h_vlan_encapsulated_proto));
63 63
64 memcpy(veth->h_source, dev->dev_addr, ETH_ALEN); 64 ether_addr_copy(veth->h_source, dev->dev_addr);
65 break; 65 break;
66 } 66 }
67 67
@@ -303,7 +303,7 @@ static int vlan_dev_open(struct net_device *dev)
303 goto clear_allmulti; 303 goto clear_allmulti;
304 } 304 }
305 305
306 memcpy(vlan->real_dev_addr, real_dev->dev_addr, ETH_ALEN); 306 ether_addr_copy(vlan->real_dev_addr, real_dev->dev_addr);
307 307
308 if (vlan->flags & VLAN_FLAG_GVRP) 308 if (vlan->flags & VLAN_FLAG_GVRP)
309 vlan_gvrp_request_join(dev); 309 vlan_gvrp_request_join(dev);
@@ -367,7 +367,7 @@ static int vlan_dev_set_mac_address(struct net_device *dev, void *p)
367 dev_uc_del(real_dev, dev->dev_addr); 367 dev_uc_del(real_dev, dev->dev_addr);
368 368
369out: 369out:
370 memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); 370 ether_addr_copy(dev->dev_addr, addr->sa_data);
371 return 0; 371 return 0;
372} 372}
373 373