diff options
author | Antonio Quartulli <antonio@meshcoding.com> | 2014-01-21 18:42:11 -0500 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2014-03-22 03:50:26 -0400 |
commit | 8fdd01530cda849ba531e7e9d8674fbc81ab5782 (patch) | |
tree | d2a19df1128530d694d7dce1c04d6f24515beb26 /net/batman-adv/main.c | |
parent | e88b617d84b53170f0781cc0756019c5b1855890 (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/main.c')
-rw-r--r-- | net/batman-adv/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 66ae135b9f27..fbeaebde080d 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c | |||
@@ -1133,8 +1133,8 @@ void batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, uint8_t *src, | |||
1133 | unicast_tvlv_packet->reserved = 0; | 1133 | unicast_tvlv_packet->reserved = 0; |
1134 | unicast_tvlv_packet->tvlv_len = htons(tvlv_len); | 1134 | unicast_tvlv_packet->tvlv_len = htons(tvlv_len); |
1135 | unicast_tvlv_packet->align = 0; | 1135 | unicast_tvlv_packet->align = 0; |
1136 | memcpy(unicast_tvlv_packet->src, src, ETH_ALEN); | 1136 | ether_addr_copy(unicast_tvlv_packet->src, src); |
1137 | memcpy(unicast_tvlv_packet->dst, dst, ETH_ALEN); | 1137 | ether_addr_copy(unicast_tvlv_packet->dst, dst); |
1138 | 1138 | ||
1139 | tvlv_buff = (unsigned char *)(unicast_tvlv_packet + 1); | 1139 | tvlv_buff = (unsigned char *)(unicast_tvlv_packet + 1); |
1140 | tvlv_hdr = (struct batadv_tvlv_hdr *)tvlv_buff; | 1140 | tvlv_hdr = (struct batadv_tvlv_hdr *)tvlv_buff; |